configure 406 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873
  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: yes)"
  53. ac_help="$ac_help
  54. --with-freetype support FreeType functionality (default: yes)"
  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-gdal[=path/gdal-config] enable GDAL/OGR support (gdal-config with path, \
  67. e.g. '--with-gdal=/usr/local/bin/gdal-config')"
  68. ac_help="$ac_help
  69. --with-python[=path/python-config] enable support for Python SWIG bindings and wxGUI Python extensions \
  70. (python-config with path, e.g. '--with-python=/usr/bin/python2.5-config', \
  71. default: no)"
  72. ac_help="$ac_help
  73. --with-wxwidgets[=path/wx-config] enable wxWidgets support (wx-config with path, \
  74. e.g. '--with-wxwidgets=/usr/local/bin/wx-config', default: no)"
  75. ac_help="$ac_help
  76. --with-geos[=path/geos-config] enable GEOS support (geos-config with path, \
  77. e.g. '--with-geos=/usr/local/bin/geos-config', default: no)"
  78. ac_help="$ac_help
  79. --with-includes=DIRS site include files are in DIRS"
  80. ac_help="$ac_help
  81. --with-libs=DIRS site library files are in DIRS"
  82. ac_help="$ac_help
  83. --with-zlib-includes=DIRS
  84. zlib include files are in DIRS"
  85. ac_help="$ac_help
  86. --with-zlib-libs=DIRS zlib library files are in DIRS"
  87. ac_help="$ac_help
  88. --with-readline-includes=DIRS
  89. Readline include files are in DIRS"
  90. ac_help="$ac_help
  91. --with-readline-libs=DIRS
  92. Readline library files are in DIRS"
  93. ac_help="$ac_help
  94. --with-jpeg-includes=DIRS
  95. JPEG include files are in DIRS"
  96. ac_help="$ac_help
  97. --with-jpeg-libs=DIRS JPEG library files are in DIRS"
  98. ac_help="$ac_help
  99. --with-tiff-includes=DIRS
  100. TIFF include files are in DIRS"
  101. ac_help="$ac_help
  102. --with-tiff-libs=DIRS TIFF library files are in DIRS"
  103. ac_help="$ac_help
  104. --with-png-includes=DIRS
  105. PNG include files are in DIRS"
  106. ac_help="$ac_help
  107. --with-png-libs=DIRS PNG library files are in DIRS"
  108. ac_help="$ac_help
  109. --with-tcltk-includes=DIRS
  110. Tcl/Tk include files are in DIRS"
  111. ac_help="$ac_help
  112. --with-tcltk-libs=DIRS Tcl/Tk library files are in DIRS"
  113. ac_help="$ac_help
  114. --with-postgres-includes=DIRS
  115. PostgreSQL include files are in DIRS"
  116. ac_help="$ac_help
  117. --with-postgres-libs=DIRS
  118. PostgreSQL library files are in DIRS"
  119. ac_help="$ac_help
  120. --with-mysql-includes=DIRS
  121. MySQL include files are in DIRS"
  122. ac_help="$ac_help
  123. --with-mysql-libs=DIRS MySQL library files are in DIRS"
  124. ac_help="$ac_help
  125. --with-sqlite-includes=DIRS
  126. SQLite include files are in DIRS"
  127. ac_help="$ac_help
  128. --with-sqlite-libs=DIRS SQLite library files are in DIRS"
  129. ac_help="$ac_help
  130. --with-ffmpeg-includes=DIRS
  131. FFMPEG include files are in DIRS"
  132. ac_help="$ac_help
  133. --with-ffmpeg-libs=DIRS FFMPEG library files are in DIRS"
  134. ac_help="$ac_help
  135. --with-opengl-includes=DIRS
  136. OpenGL include files are in DIRS"
  137. ac_help="$ac_help
  138. --with-opengl-libs=DIRS OpenGL library files are in DIRS"
  139. ac_help="$ac_help
  140. --with-opengl-framework=DIR
  141. OpenGL framework is in DIR"
  142. ac_help="$ac_help
  143. --with-odbc-includes=DIRS
  144. ODBC include files are in DIRS"
  145. ac_help="$ac_help
  146. --with-odbc-libs=DIRS ODBC library files are in DIRS"
  147. ac_help="$ac_help
  148. --with-fftw-includes=DIRS
  149. FFTW include files are in DIRS"
  150. ac_help="$ac_help
  151. --with-fftw-libs=DIRS FFTW library files are in DIRS"
  152. ac_help="$ac_help
  153. --with-blas-includes=DIRS
  154. BLAS include files are in DIRS"
  155. ac_help="$ac_help
  156. --with-blas-libs=DIRS BLAS library files are in DIRS"
  157. ac_help="$ac_help
  158. --with-lapack-includes=DIRS
  159. LAPACK include files are in DIRS"
  160. ac_help="$ac_help
  161. --with-lapack-libs=DIRS LAPACK library files are in DIRS"
  162. ac_help="$ac_help
  163. --with-cairo-includes=DIRS
  164. cairo include files are in DIRS"
  165. ac_help="$ac_help
  166. --with-cairo-libs=DIRS cairo library files are in DIRS"
  167. ac_help="$ac_help
  168. --with-cairo-ldflags=FLAGS
  169. cairo needs FLAGS when linking"
  170. ac_help="$ac_help
  171. --with-freetype-includes=DIRS
  172. FreeType include files are in DIRS"
  173. ac_help="$ac_help
  174. --with-freetype-libs=DIRS
  175. FreeType library files are in DIRS"
  176. ac_help="$ac_help
  177. --with-proj-includes=DIRS
  178. External PROJ.4 include files are in DIRS"
  179. ac_help="$ac_help
  180. --with-proj-libs=DIRS External PROJ.4 library files are in DIRS"
  181. ac_help="$ac_help
  182. --with-proj-share=DIR External PROJ.4 data files are in DIR"
  183. ac_help="$ac_help
  184. --with-opendwg-includes=DIRS
  185. openDWG include files are in DIRS"
  186. ac_help="$ac_help
  187. --with-opendwg-libs=DIRS
  188. openDWG library files are in DIRS"
  189. ac_help="$ac_help
  190. --with-regex-includes=DIRS
  191. regex include files are in DIRS"
  192. ac_help="$ac_help
  193. --with-regex-libs=DIRS regex library files are in DIRS"
  194. ac_help="$ac_help
  195. --with-pthread-includes=DIRS
  196. POSIX threads include files are in DIRS"
  197. ac_help="$ac_help
  198. --with-pthread-libs=DIRS
  199. POSIX threads library files are in DIRS"
  200. ac_help="$ac_help
  201. --with-x use the X Window System"
  202. ac_help="$ac_help
  203. --enable-largefile enable support for large files (LFS)"
  204. # Initialize some variables set by options.
  205. # The variables have the same names as the options, with
  206. # dashes changed to underlines.
  207. build=NONE
  208. cache_file=./config.cache
  209. exec_prefix=NONE
  210. host=NONE
  211. no_create=
  212. nonopt=NONE
  213. no_recursion=
  214. prefix=NONE
  215. program_prefix=NONE
  216. program_suffix=NONE
  217. program_transform_name=s,x,x,
  218. silent=
  219. site=
  220. srcdir=
  221. target=NONE
  222. verbose=
  223. x_includes=NONE
  224. x_libraries=NONE
  225. bindir='${exec_prefix}/bin'
  226. sbindir='${exec_prefix}/sbin'
  227. libexecdir='${exec_prefix}/libexec'
  228. datadir='${prefix}/share'
  229. sysconfdir='${prefix}/etc'
  230. sharedstatedir='${prefix}/com'
  231. localstatedir='${prefix}/var'
  232. libdir='${exec_prefix}/lib'
  233. includedir='${prefix}/include'
  234. oldincludedir='/usr/include'
  235. infodir='${prefix}/info'
  236. mandir='${prefix}/man'
  237. # Initialize some other variables.
  238. subdirs=
  239. MFLAGS= MAKEFLAGS=
  240. SHELL=${CONFIG_SHELL-/bin/sh}
  241. # Maximum number of lines to put in a shell here document.
  242. ac_max_here_lines=12
  243. ac_prev=
  244. for ac_option
  245. do
  246. # If the previous option needs an argument, assign it.
  247. if test -n "$ac_prev"; then
  248. eval "$ac_prev=\$ac_option"
  249. ac_prev=
  250. continue
  251. fi
  252. case "$ac_option" in
  253. -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  254. *) ac_optarg= ;;
  255. esac
  256. # Accept the important Cygnus configure options, so we can diagnose typos.
  257. case "$ac_option" in
  258. -bindir | --bindir | --bindi | --bind | --bin | --bi)
  259. ac_prev=bindir ;;
  260. -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  261. bindir="$ac_optarg" ;;
  262. -build | --build | --buil | --bui | --bu)
  263. ac_prev=build ;;
  264. -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  265. build="$ac_optarg" ;;
  266. -cache-file | --cache-file | --cache-fil | --cache-fi \
  267. | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  268. ac_prev=cache_file ;;
  269. -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  270. | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  271. cache_file="$ac_optarg" ;;
  272. -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  273. ac_prev=datadir ;;
  274. -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  275. | --da=*)
  276. datadir="$ac_optarg" ;;
  277. -disable-* | --disable-*)
  278. ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  279. # Reject names that are not valid shell variable names.
  280. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  281. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  282. fi
  283. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  284. eval "enable_${ac_feature}=no" ;;
  285. -enable-* | --enable-*)
  286. ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  287. # Reject names that are not valid shell variable names.
  288. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  289. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  290. fi
  291. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  292. case "$ac_option" in
  293. *=*) ;;
  294. *) ac_optarg=yes ;;
  295. esac
  296. eval "enable_${ac_feature}='$ac_optarg'" ;;
  297. -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  298. | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  299. | --exec | --exe | --ex)
  300. ac_prev=exec_prefix ;;
  301. -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  302. | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  303. | --exec=* | --exe=* | --ex=*)
  304. exec_prefix="$ac_optarg" ;;
  305. -gas | --gas | --ga | --g)
  306. # Obsolete; use --with-gas.
  307. with_gas=yes ;;
  308. -help | --help | --hel | --he)
  309. # Omit some internal or obsolete options to make the list less imposing.
  310. # This message is too long to be a string in the A/UX 3.1 sh.
  311. cat << EOF
  312. Usage: configure [options] [host]
  313. Options: [defaults in brackets after descriptions]
  314. Configuration:
  315. --cache-file=FILE cache test results in FILE
  316. --help print this message
  317. --no-create do not create output files
  318. --quiet, --silent do not print \`checking...' messages
  319. --version print the version of autoconf that created configure
  320. Directory and file names:
  321. --prefix=PREFIX install architecture-independent files in PREFIX
  322. [$ac_default_prefix]
  323. --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
  324. [same as prefix]
  325. --bindir=DIR user executables in DIR [EPREFIX/bin]
  326. --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
  327. --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
  328. --datadir=DIR read-only architecture-independent data in DIR
  329. [PREFIX/share]
  330. --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
  331. --sharedstatedir=DIR modifiable architecture-independent data in DIR
  332. [PREFIX/com]
  333. --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
  334. --libdir=DIR object code libraries in DIR [EPREFIX/lib]
  335. --includedir=DIR C header files in DIR [PREFIX/include]
  336. --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
  337. --infodir=DIR info documentation in DIR [PREFIX/info]
  338. --mandir=DIR man documentation in DIR [PREFIX/man]
  339. --srcdir=DIR find the sources in DIR [configure dir or ..]
  340. --program-prefix=PREFIX prepend PREFIX to installed program names
  341. --program-suffix=SUFFIX append SUFFIX to installed program names
  342. --program-transform-name=PROGRAM
  343. run sed PROGRAM on installed program names
  344. EOF
  345. cat << EOF
  346. Host type:
  347. --build=BUILD configure for building on BUILD [BUILD=HOST]
  348. --host=HOST configure for HOST [guessed]
  349. --target=TARGET configure for TARGET [TARGET=HOST]
  350. Features and packages:
  351. --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
  352. --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
  353. --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
  354. --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
  355. --x-includes=DIR X include files are in DIR
  356. --x-libraries=DIR X library files are in DIR
  357. EOF
  358. if test -n "$ac_help"; then
  359. echo "--enable and --with options recognized:$ac_help"
  360. fi
  361. exit 0 ;;
  362. -host | --host | --hos | --ho)
  363. ac_prev=host ;;
  364. -host=* | --host=* | --hos=* | --ho=*)
  365. host="$ac_optarg" ;;
  366. -includedir | --includedir | --includedi | --included | --include \
  367. | --includ | --inclu | --incl | --inc)
  368. ac_prev=includedir ;;
  369. -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  370. | --includ=* | --inclu=* | --incl=* | --inc=*)
  371. includedir="$ac_optarg" ;;
  372. -infodir | --infodir | --infodi | --infod | --info | --inf)
  373. ac_prev=infodir ;;
  374. -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  375. infodir="$ac_optarg" ;;
  376. -libdir | --libdir | --libdi | --libd)
  377. ac_prev=libdir ;;
  378. -libdir=* | --libdir=* | --libdi=* | --libd=*)
  379. libdir="$ac_optarg" ;;
  380. -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  381. | --libexe | --libex | --libe)
  382. ac_prev=libexecdir ;;
  383. -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  384. | --libexe=* | --libex=* | --libe=*)
  385. libexecdir="$ac_optarg" ;;
  386. -localstatedir | --localstatedir | --localstatedi | --localstated \
  387. | --localstate | --localstat | --localsta | --localst \
  388. | --locals | --local | --loca | --loc | --lo)
  389. ac_prev=localstatedir ;;
  390. -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  391. | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  392. | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  393. localstatedir="$ac_optarg" ;;
  394. -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  395. ac_prev=mandir ;;
  396. -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  397. mandir="$ac_optarg" ;;
  398. -nfp | --nfp | --nf)
  399. # Obsolete; use --without-fp.
  400. with_fp=no ;;
  401. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  402. | --no-cr | --no-c)
  403. no_create=yes ;;
  404. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  405. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  406. no_recursion=yes ;;
  407. -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  408. | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  409. | --oldin | --oldi | --old | --ol | --o)
  410. ac_prev=oldincludedir ;;
  411. -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  412. | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  413. | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  414. oldincludedir="$ac_optarg" ;;
  415. -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  416. ac_prev=prefix ;;
  417. -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  418. prefix="$ac_optarg" ;;
  419. -program-prefix | --program-prefix | --program-prefi | --program-pref \
  420. | --program-pre | --program-pr | --program-p)
  421. ac_prev=program_prefix ;;
  422. -program-prefix=* | --program-prefix=* | --program-prefi=* \
  423. | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  424. program_prefix="$ac_optarg" ;;
  425. -program-suffix | --program-suffix | --program-suffi | --program-suff \
  426. | --program-suf | --program-su | --program-s)
  427. ac_prev=program_suffix ;;
  428. -program-suffix=* | --program-suffix=* | --program-suffi=* \
  429. | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  430. program_suffix="$ac_optarg" ;;
  431. -program-transform-name | --program-transform-name \
  432. | --program-transform-nam | --program-transform-na \
  433. | --program-transform-n | --program-transform- \
  434. | --program-transform | --program-transfor \
  435. | --program-transfo | --program-transf \
  436. | --program-trans | --program-tran \
  437. | --progr-tra | --program-tr | --program-t)
  438. ac_prev=program_transform_name ;;
  439. -program-transform-name=* | --program-transform-name=* \
  440. | --program-transform-nam=* | --program-transform-na=* \
  441. | --program-transform-n=* | --program-transform-=* \
  442. | --program-transform=* | --program-transfor=* \
  443. | --program-transfo=* | --program-transf=* \
  444. | --program-trans=* | --program-tran=* \
  445. | --progr-tra=* | --program-tr=* | --program-t=*)
  446. program_transform_name="$ac_optarg" ;;
  447. -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  448. | -silent | --silent | --silen | --sile | --sil)
  449. silent=yes ;;
  450. -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  451. ac_prev=sbindir ;;
  452. -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  453. | --sbi=* | --sb=*)
  454. sbindir="$ac_optarg" ;;
  455. -sharedstatedir | --sharedstatedir | --sharedstatedi \
  456. | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  457. | --sharedst | --shareds | --shared | --share | --shar \
  458. | --sha | --sh)
  459. ac_prev=sharedstatedir ;;
  460. -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  461. | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  462. | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  463. | --sha=* | --sh=*)
  464. sharedstatedir="$ac_optarg" ;;
  465. -site | --site | --sit)
  466. ac_prev=site ;;
  467. -site=* | --site=* | --sit=*)
  468. site="$ac_optarg" ;;
  469. -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  470. ac_prev=srcdir ;;
  471. -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  472. srcdir="$ac_optarg" ;;
  473. -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  474. | --syscon | --sysco | --sysc | --sys | --sy)
  475. ac_prev=sysconfdir ;;
  476. -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  477. | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  478. sysconfdir="$ac_optarg" ;;
  479. -target | --target | --targe | --targ | --tar | --ta | --t)
  480. ac_prev=target ;;
  481. -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  482. target="$ac_optarg" ;;
  483. -v | -verbose | --verbose | --verbos | --verbo | --verb)
  484. verbose=yes ;;
  485. -version | --version | --versio | --versi | --vers)
  486. echo "configure generated by autoconf version 2.13"
  487. exit 0 ;;
  488. -with-* | --with-*)
  489. ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  490. # Reject names that are not valid shell variable names.
  491. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  492. { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  493. fi
  494. ac_package=`echo $ac_package| sed 's/-/_/g'`
  495. case "$ac_option" in
  496. *=*) ;;
  497. *) ac_optarg=yes ;;
  498. esac
  499. eval "with_${ac_package}='$ac_optarg'" ;;
  500. -without-* | --without-*)
  501. ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  502. # Reject names that are not valid shell variable names.
  503. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  504. { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  505. fi
  506. ac_package=`echo $ac_package| sed 's/-/_/g'`
  507. eval "with_${ac_package}=no" ;;
  508. --x)
  509. # Obsolete; use --with-x.
  510. with_x=yes ;;
  511. -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  512. | --x-incl | --x-inc | --x-in | --x-i)
  513. ac_prev=x_includes ;;
  514. -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  515. | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  516. x_includes="$ac_optarg" ;;
  517. -x-libraries | --x-libraries | --x-librarie | --x-librari \
  518. | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  519. ac_prev=x_libraries ;;
  520. -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  521. | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  522. x_libraries="$ac_optarg" ;;
  523. -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  524. ;;
  525. *)
  526. if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  527. echo "configure: warning: $ac_option: invalid host type" 1>&2
  528. fi
  529. if test "x$nonopt" != xNONE; then
  530. { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  531. fi
  532. nonopt="$ac_option"
  533. ;;
  534. esac
  535. done
  536. if test -n "$ac_prev"; then
  537. { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  538. fi
  539. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  540. # File descriptor usage:
  541. # 0 standard input
  542. # 1 file creation
  543. # 2 errors and warnings
  544. # 3 some systems may open it to /dev/tty
  545. # 4 used on the Kubota Titan
  546. # 6 checking for... messages and results
  547. # 5 compiler messages saved in config.log
  548. if test "$silent" = yes; then
  549. exec 6>/dev/null
  550. else
  551. exec 6>&1
  552. fi
  553. exec 5>./config.log
  554. echo "\
  555. This file contains any messages produced by compilers while
  556. running configure, to aid debugging if configure makes a mistake.
  557. " 1>&5
  558. # Strip out --no-create and --no-recursion so they do not pile up.
  559. # Also quote any args containing shell metacharacters.
  560. ac_configure_args=
  561. for ac_arg
  562. do
  563. case "$ac_arg" in
  564. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  565. | --no-cr | --no-c) ;;
  566. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  567. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  568. *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  569. ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  570. *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  571. esac
  572. done
  573. # NLS nuisances.
  574. # Only set these to C if already set. These must not be set unconditionally
  575. # because not all systems understand e.g. LANG=C (notably SCO).
  576. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  577. # Non-C LC_CTYPE values break the ctype check.
  578. if test "${LANG+set}" = set; then LANG=C; export LANG; fi
  579. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  580. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  581. if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
  582. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  583. rm -rf conftest* confdefs.h
  584. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  585. echo > confdefs.h
  586. # A filename unique to this package, relative to the directory that
  587. # configure is in, which we can look for to find out if srcdir is correct.
  588. ac_unique_file=configure.in
  589. # Find the source files, if location was not specified.
  590. if test -z "$srcdir"; then
  591. ac_srcdir_defaulted=yes
  592. # Try the directory containing this script, then its parent.
  593. ac_prog=$0
  594. ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  595. test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  596. srcdir=$ac_confdir
  597. if test ! -r $srcdir/$ac_unique_file; then
  598. srcdir=..
  599. fi
  600. else
  601. ac_srcdir_defaulted=no
  602. fi
  603. if test ! -r $srcdir/$ac_unique_file; then
  604. if test "$ac_srcdir_defaulted" = yes; then
  605. { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  606. else
  607. { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  608. fi
  609. fi
  610. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  611. # Prefer explicitly selected file to automatically selected ones.
  612. if test -z "$CONFIG_SITE"; then
  613. if test "x$prefix" != xNONE; then
  614. CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  615. else
  616. CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  617. fi
  618. fi
  619. for ac_site_file in $CONFIG_SITE; do
  620. if test -r "$ac_site_file"; then
  621. echo "loading site script $ac_site_file"
  622. . "$ac_site_file"
  623. fi
  624. done
  625. ac_ext=c
  626. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  627. ac_cpp='$CPP $CPPFLAGS'
  628. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  629. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  630. cross_compiling=$ac_cv_prog_cc_cross
  631. ac_exeext=
  632. ac_objext=o
  633. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  634. # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  635. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  636. ac_n= ac_c='
  637. ' ac_t=' '
  638. else
  639. ac_n=-n ac_c= ac_t=
  640. fi
  641. else
  642. ac_n= ac_c='\c' ac_t=
  643. fi
  644. ac_aux_dir=
  645. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  646. if 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. elif test -f $ac_dir/install.sh; then
  651. ac_aux_dir=$ac_dir
  652. ac_install_sh="$ac_aux_dir/install.sh -c"
  653. break
  654. fi
  655. done
  656. if test -z "$ac_aux_dir"; then
  657. { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  658. fi
  659. ac_config_guess=$ac_aux_dir/config.guess
  660. ac_config_sub=$ac_aux_dir/config.sub
  661. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  662. # Make sure we can run config.sub.
  663. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
  664. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  665. fi
  666. echo $ac_n "checking host system type""... $ac_c" 1>&6
  667. echo "configure:739: checking host system type" >&5
  668. host_alias=$host
  669. case "$host_alias" in
  670. NONE)
  671. case $nonopt in
  672. NONE)
  673. if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
  674. else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  675. fi ;;
  676. *) host_alias=$nonopt ;;
  677. esac ;;
  678. esac
  679. host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
  680. host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  681. host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  682. host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  683. echo "$ac_t""$host" 1>&6
  684. # Extract the first word of "gcc", so it can be a program name with args.
  685. set dummy gcc; ac_word=$2
  686. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  687. echo "configure:762: checking for $ac_word" >&5
  688. if test -n "$CC"; then
  689. ac_cv_prog_CC="$CC" # Let the user override the test.
  690. else
  691. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  692. ac_dummy="$PATH"
  693. for ac_dir in $ac_dummy; do
  694. test -z "$ac_dir" && ac_dir=.
  695. if test -f $ac_dir/$ac_word; then
  696. ac_cv_prog_CC="gcc"
  697. break
  698. fi
  699. done
  700. IFS="$ac_save_ifs"
  701. fi
  702. CC="$ac_cv_prog_CC"
  703. if test -n "$CC"; then
  704. echo "$ac_t""$CC" 1>&6
  705. else
  706. echo "$ac_t""no" 1>&6
  707. fi
  708. if test -z "$CC"; then
  709. # Extract the first word of "cc", so it can be a program name with args.
  710. set dummy cc; ac_word=$2
  711. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  712. echo "configure:789: checking for $ac_word" >&5
  713. if test -n "$CC"; then
  714. ac_cv_prog_CC="$CC" # Let the user override the test.
  715. else
  716. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  717. ac_prog_rejected=no
  718. ac_dummy="$PATH"
  719. for ac_dir in $ac_dummy; do
  720. test -z "$ac_dir" && ac_dir=.
  721. if test -f $ac_dir/$ac_word; then
  722. if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  723. ac_prog_rejected=yes
  724. continue
  725. fi
  726. ac_cv_prog_CC="cc"
  727. break
  728. fi
  729. done
  730. IFS="$ac_save_ifs"
  731. if test $ac_prog_rejected = yes; then
  732. # We found a bogon in the path, so make sure we never use it.
  733. set dummy $ac_cv_prog_CC
  734. shift
  735. if test $# -gt 0; then
  736. # We chose a different compiler from the bogus one.
  737. # However, it has the same basename, so the bogon will be chosen
  738. # first if we set CC to just the basename; use the full file name.
  739. shift
  740. set dummy "$ac_dir/$ac_word" "$@"
  741. shift
  742. ac_cv_prog_CC="$@"
  743. fi
  744. fi
  745. fi
  746. CC="$ac_cv_prog_CC"
  747. if test -n "$CC"; then
  748. echo "$ac_t""$CC" 1>&6
  749. else
  750. echo "$ac_t""no" 1>&6
  751. fi
  752. if test -z "$CC"; then
  753. case "`uname -s`" in
  754. *win32* | *WIN32*)
  755. # Extract the first word of "cl", so it can be a program name with args.
  756. set dummy cl; ac_word=$2
  757. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  758. echo "configure:837: checking for $ac_word" >&5
  759. if test -n "$CC"; then
  760. ac_cv_prog_CC="$CC" # Let the user override the test.
  761. else
  762. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  763. ac_dummy="$PATH"
  764. for ac_dir in $ac_dummy; do
  765. test -z "$ac_dir" && ac_dir=.
  766. if test -f $ac_dir/$ac_word; then
  767. ac_cv_prog_CC="cl"
  768. break
  769. fi
  770. done
  771. IFS="$ac_save_ifs"
  772. fi
  773. CC="$ac_cv_prog_CC"
  774. if test -n "$CC"; then
  775. echo "$ac_t""$CC" 1>&6
  776. else
  777. echo "$ac_t""no" 1>&6
  778. fi
  779. ;;
  780. esac
  781. fi
  782. test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  783. fi
  784. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  785. echo "configure:866: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  786. ac_ext=c
  787. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  788. ac_cpp='$CPP $CPPFLAGS'
  789. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  790. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  791. cross_compiling=$ac_cv_prog_cc_cross
  792. cat > conftest.$ac_ext << EOF
  793. #line 877 "configure"
  794. #include "confdefs.h"
  795. main(){return(0);}
  796. EOF
  797. if { (eval echo configure:882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  798. ac_cv_prog_cc_works=yes
  799. # If we can't run a trivial program, we are probably using a cross compiler.
  800. if (./conftest; exit) 2>/dev/null; then
  801. ac_cv_prog_cc_cross=no
  802. else
  803. ac_cv_prog_cc_cross=yes
  804. fi
  805. else
  806. echo "configure: failed program was:" >&5
  807. cat conftest.$ac_ext >&5
  808. ac_cv_prog_cc_works=no
  809. fi
  810. rm -fr conftest*
  811. ac_ext=c
  812. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  813. ac_cpp='$CPP $CPPFLAGS'
  814. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  815. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  816. cross_compiling=$ac_cv_prog_cc_cross
  817. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  818. if test $ac_cv_prog_cc_works = no; then
  819. { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  820. fi
  821. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  822. echo "configure:908: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  823. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  824. cross_compiling=$ac_cv_prog_cc_cross
  825. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  826. echo "configure:913: checking whether we are using GNU C" >&5
  827. cat > conftest.c <<EOF
  828. #ifdef __GNUC__
  829. yes;
  830. #endif
  831. EOF
  832. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  833. ac_cv_prog_gcc=yes
  834. else
  835. ac_cv_prog_gcc=no
  836. fi
  837. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  838. if test $ac_cv_prog_gcc = yes; then
  839. GCC=yes
  840. else
  841. GCC=
  842. fi
  843. ac_test_CFLAGS="${CFLAGS+set}"
  844. ac_save_CFLAGS="$CFLAGS"
  845. CFLAGS=
  846. echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  847. echo "configure:938: checking whether ${CC-cc} accepts -g" >&5
  848. echo 'void f(){}' > conftest.c
  849. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  850. ac_cv_prog_cc_g=yes
  851. else
  852. ac_cv_prog_cc_g=no
  853. fi
  854. rm -f conftest*
  855. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  856. if test "$ac_test_CFLAGS" = set; then
  857. CFLAGS="$ac_save_CFLAGS"
  858. elif test $ac_cv_prog_cc_g = yes; then
  859. if test "$GCC" = yes; then
  860. CFLAGS="-g -O2"
  861. else
  862. CFLAGS="-g"
  863. fi
  864. else
  865. if test "$GCC" = yes; then
  866. CFLAGS="-O2"
  867. else
  868. CFLAGS=
  869. fi
  870. fi
  871. echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
  872. echo "configure:967: checking for Cygwin environment" >&5
  873. cat > conftest.$ac_ext <<EOF
  874. #line 970 "configure"
  875. #include "confdefs.h"
  876. int main() {
  877. #ifndef __CYGWIN__
  878. #define __CYGWIN__ __CYGWIN32__
  879. #endif
  880. return __CYGWIN__;
  881. ; return 0; }
  882. EOF
  883. if { (eval echo configure:981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  884. rm -rf conftest*
  885. ac_cv_cygwin=yes
  886. else
  887. echo "configure: failed program was:" >&5
  888. cat conftest.$ac_ext >&5
  889. rm -rf conftest*
  890. ac_cv_cygwin=no
  891. fi
  892. rm -f conftest*
  893. rm -f conftest*
  894. echo "$ac_t""$ac_cv_cygwin" 1>&6
  895. CYGWIN=
  896. test "$ac_cv_cygwin" = yes && CYGWIN=yes
  897. echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
  898. echo "configure:997: checking for mingw32 environment" >&5
  899. cat > conftest.$ac_ext <<EOF
  900. #line 1000 "configure"
  901. #include "confdefs.h"
  902. int main() {
  903. return __MINGW32__;
  904. ; return 0; }
  905. EOF
  906. if { (eval echo configure:1007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  907. rm -rf conftest*
  908. ac_cv_mingw32=yes
  909. else
  910. echo "configure: failed program was:" >&5
  911. cat conftest.$ac_ext >&5
  912. rm -rf conftest*
  913. ac_cv_mingw32=no
  914. fi
  915. rm -f conftest*
  916. rm -f conftest*
  917. echo "$ac_t""$ac_cv_mingw32" 1>&6
  918. MINGW32=
  919. test "$ac_cv_mingw32" = yes && MINGW32=yes
  920. echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
  921. echo "configure:1025: checking for executable suffix" >&5
  922. if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
  923. ac_cv_exeext=.exe
  924. else
  925. ac_cv_exeext=no
  926. fi
  927. EXEEXT=""
  928. test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
  929. echo "$ac_t""${ac_cv_exeext}" 1>&6
  930. ac_exeext=$EXEEXT
  931. # Check for full floating-point support, including Infinity and NaN
  932. IEEEFLAG=
  933. echo $ac_n "checking for full floating-point support""... $ac_c" 1>&6
  934. echo "configure:1044: checking for full floating-point support" >&5
  935. if test "$cross_compiling" = yes; then
  936. echo "$ac_t""unknown (cross-compiling)" 1>&6
  937. echo $ac_n "checking whether "cc -mieee" works""... $ac_c" 1>&6
  938. echo "configure:1049: checking whether "cc -mieee" works" >&5
  939. ac_save_cflags=${CFLAGS}
  940. CFLAGS="$CFLAGS -mieee"
  941. cat > conftest.$ac_ext <<EOF
  942. #line 1053 "configure"
  943. #include "confdefs.h"
  944. int main() {
  945. ; return 0; }
  946. EOF
  947. if { (eval echo configure:1060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  948. rm -rf conftest*
  949. echo "$ac_t""yes" 1>&6
  950. IEEEFLAG="-mieee"
  951. else
  952. echo "configure: failed program was:" >&5
  953. cat conftest.$ac_ext >&5
  954. rm -rf conftest*
  955. echo "$ac_t""no" 1>&6
  956. fi
  957. rm -f conftest*
  958. CFLAGS=${ac_save_cflags}
  959. else
  960. cat > conftest.$ac_ext <<EOF
  961. #line 1076 "configure"
  962. #include "confdefs.h"
  963. #include <float.h>
  964. int main(void) {
  965. double one = 1.0;
  966. double zero = 0.0;
  967. if (one/zero > DBL_MAX) /* infinity */
  968. if (zero/zero != zero/zero) /* NaN */
  969. return 0;
  970. return 1;
  971. }
  972. EOF
  973. if { (eval echo configure:1090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  974. then
  975. echo "$ac_t""yes" 1>&6
  976. else
  977. echo "configure: failed program was:" >&5
  978. cat conftest.$ac_ext >&5
  979. rm -fr conftest*
  980. echo "$ac_t""no" 1>&6
  981. ac_save_cflags=${CFLAGS}
  982. CFLAGS=-mieee
  983. echo $ac_n "checking for full floating-point support with -mieee""... $ac_c" 1>&6
  984. echo "configure:1103: checking for full floating-point support with -mieee" >&5
  985. if test "$cross_compiling" = yes; then
  986. echo "$ac_t""unknown (cross-compiling)" 1>&6
  987. { echo "configure: error: *** INTERNAL CONFIGURE ERROR" 1>&2; exit 1; }
  988. else
  989. cat > conftest.$ac_ext <<EOF
  990. #line 1110 "configure"
  991. #include "confdefs.h"
  992. #include <float.h>
  993. int main(void) {
  994. double one = 1.0;
  995. double zero = 0.0;
  996. if (one/zero > DBL_MAX) /* infinity */
  997. if (zero/zero != zero/zero) /* NaN */
  998. return 0;
  999. return 1;
  1000. }
  1001. EOF
  1002. if { (eval echo configure:1124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1003. then
  1004. echo "$ac_t""yes" 1>&6
  1005. IEEEFLAG="-mieee"
  1006. else
  1007. echo "configure: failed program was:" >&5
  1008. cat conftest.$ac_ext >&5
  1009. rm -fr conftest*
  1010. echo "$ac_t""no" 1>&6
  1011. echo "configure: warning: *** Incomplete floating-point support." 1>&2
  1012. fi
  1013. rm -fr conftest*
  1014. fi
  1015. CFLAGS=${ac_save_cflags}
  1016. fi
  1017. rm -fr conftest*
  1018. fi
  1019. CFLAGS="$CFLAGS $IEEEFLAG"
  1020. # Set BINDIR
  1021. if test -n "${bindir}"; then
  1022. BINDIR="${bindir}"
  1023. else
  1024. BINDIR=/usr/local/bin
  1025. fi
  1026. # Set SRCDIR and DSTDIR
  1027. # Extract the first word of "pwd", so it can be a program name with args.
  1028. set dummy pwd; ac_word=$2
  1029. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1030. echo "configure:1161: checking for $ac_word" >&5
  1031. case "$pwd" in
  1032. /*)
  1033. ac_cv_path_pwd="$pwd" # Let the user override the test with a path.
  1034. ;;
  1035. ?:/*)
  1036. ac_cv_path_pwd="$pwd" # Let the user override the test with a dos path.
  1037. ;;
  1038. *)
  1039. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1040. ac_dummy="$PATH"
  1041. for ac_dir in $ac_dummy; do
  1042. test -z "$ac_dir" && ac_dir=.
  1043. if test -f $ac_dir/$ac_word; then
  1044. ac_cv_path_pwd="$ac_dir/$ac_word"
  1045. break
  1046. fi
  1047. done
  1048. IFS="$ac_save_ifs"
  1049. test -z "$ac_cv_path_pwd" && ac_cv_path_pwd="pwd"
  1050. ;;
  1051. esac
  1052. pwd="$ac_cv_path_pwd"
  1053. if test -n "$pwd"; then
  1054. echo "$ac_t""$pwd" 1>&6
  1055. else
  1056. echo "$ac_t""no" 1>&6
  1057. fi
  1058. if test "$MINGW32" = yes ; then
  1059. winpwd="$pwd -W"
  1060. else
  1061. winpwd="$pwd"
  1062. fi
  1063. echo $ac_n "checking for source directory""... $ac_c" 1>&6
  1064. echo "configure:1199: checking for source directory" >&5
  1065. if test -z "$srcdir" ; then
  1066. SRCDIR=`$pwd`
  1067. else
  1068. SRCDIR=`(cd "$srcdir" ; $pwd)`
  1069. fi
  1070. echo "$ac_t"""$SRCDIR"" 1>&6
  1071. echo $ac_n "checking for build directory""... $ac_c" 1>&6
  1072. echo "configure:1210: checking for build directory" >&5
  1073. DSTDIR=`$pwd`
  1074. WINDSTDIR=`$winpwd`
  1075. echo "$ac_t"""$DSTDIR"" 1>&6
  1076. # Set ARCH
  1077. ARCH=
  1078. if test -z "${host}"; then
  1079. ARCH="unknown"
  1080. else
  1081. ARCH="${host}"
  1082. fi
  1083. # Use absolute path for aux directory so that install-sh works
  1084. ac_aux_dir=
  1085. for ac_dir in $SRCDIR $srcdir/$SRCDIR; do
  1086. if 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. elif test -f $ac_dir/install.sh; then
  1091. ac_aux_dir=$ac_dir
  1092. ac_install_sh="$ac_aux_dir/install.sh -c"
  1093. break
  1094. fi
  1095. done
  1096. if test -z "$ac_aux_dir"; then
  1097. { echo "configure: error: can not find install-sh or install.sh in $SRCDIR $srcdir/$SRCDIR" 1>&2; exit 1; }
  1098. fi
  1099. ac_config_guess=$ac_aux_dir/config.guess
  1100. ac_config_sub=$ac_aux_dir/config.sub
  1101. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  1102. # Set GISBASE and GRASS_BIN
  1103. GISBASE=${WINDSTDIR}/dist.${ARCH}
  1104. GRASS_BIN=${DSTDIR}/bin.${ARCH}
  1105. # Set GRASS_VERSION_*
  1106. GRASS_VERSION_FILE=include/VERSION
  1107. GRASS_VERSION_MAJOR=`sed -n 1p ${GRASS_VERSION_FILE}`
  1108. GRASS_VERSION_MINOR=`sed -n 2p ${GRASS_VERSION_FILE}`
  1109. GRASS_VERSION_RELEASE=`sed -n 3p ${GRASS_VERSION_FILE}`
  1110. GRASS_VERSION_DATE=`sed -n 4p ${GRASS_VERSION_FILE}`
  1111. GRASS_VERSION_NUMBER=`echo ${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}`
  1112. NAME_VER=`echo ${GRASS_VERSION_NUMBER} | sed 's/\..*//'`
  1113. LIB_VER=`echo ${GRASS_VERSION_NUMBER} | sed 's/^\([0-9.]*\).*$/\1/'`
  1114. # Check for MacOSX App
  1115. # Check whether --enable-macosx-app or --disable-macosx-app was given.
  1116. if test "${enable_macosx_app+set}" = set; then
  1117. enableval="$enable_macosx_app"
  1118. :
  1119. else
  1120. enable_macosx_app=no
  1121. fi
  1122. echo $ac_n "checking for MacOSX App""... $ac_c" 1>&6
  1123. echo "configure:1295: checking for MacOSX App" >&5
  1124. case "$enable_macosx_app" in
  1125. yes) MACOSX_APP=1 ;;
  1126. no) MACOSX_APP= ;;
  1127. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  1128. esac
  1129. echo "$ac_t"""$enable_macosx_app"" 1>&6
  1130. # Set INST_DIR
  1131. if test -n "$MACOSX_APP" ; then
  1132. INSTDIR='${prefix}'"/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.app/Contents/MacOS"
  1133. else
  1134. INSTDIR='${prefix}'"/grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}"
  1135. fi
  1136. # Get flags for building shared libraries
  1137. echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
  1138. echo "configure:1318: checking how to build libraries" >&5
  1139. # Check whether --enable-shared or --disable-shared was given.
  1140. if test "${enable_shared+set}" = set; then
  1141. enableval="$enable_shared"
  1142. shared_ok=$enableval
  1143. else
  1144. shared_ok=yes
  1145. fi
  1146. if test "${enable_shared+set}" = set; then
  1147. enableval="$enable_shared"
  1148. shared_ok=$enableval
  1149. else
  1150. shared_ok=yes
  1151. fi
  1152. if test "$shared_ok" = "yes" ; then
  1153. echo "$ac_t""shared" 1>&6
  1154. SHARED_BUILD=1
  1155. GRASS_LIB_PREFIX='$(SHLIB_PREFIX)'
  1156. GRASS_LIB_SUFFIX='$(SHLIB_SUFFIX)'
  1157. GRASS_LIBRARY_TYPE='shlib'
  1158. else
  1159. echo "$ac_t""static" 1>&6
  1160. SHARED_BUILD=0
  1161. cat >> confdefs.h <<\EOF
  1162. #define STATIC_BUILD 1
  1163. EOF
  1164. GRASS_LIB_PREFIX='$(STLIB_PREFIX)'
  1165. GRASS_LIB_SUFFIX='$(STLIB_SUFFIX)'
  1166. GRASS_LIBRARY_TYPE='stlib'
  1167. fi
  1168. ac_save_ldflags="$LDFLAGS"
  1169. # Extract the first word of "ranlib", so it can be a program name with args.
  1170. set dummy ranlib; ac_word=$2
  1171. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1172. echo "configure:1361: checking for $ac_word" >&5
  1173. if test -n "$RANLIB"; then
  1174. ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  1175. else
  1176. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1177. ac_dummy="$PATH"
  1178. for ac_dir in $ac_dummy; do
  1179. test -z "$ac_dir" && ac_dir=.
  1180. if test -f $ac_dir/$ac_word; then
  1181. ac_cv_prog_RANLIB="ranlib"
  1182. break
  1183. fi
  1184. done
  1185. IFS="$ac_save_ifs"
  1186. test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  1187. fi
  1188. RANLIB="$ac_cv_prog_RANLIB"
  1189. if test -n "$RANLIB"; then
  1190. echo "$ac_t""$RANLIB" 1>&6
  1191. else
  1192. echo "$ac_t""no" 1>&6
  1193. fi
  1194. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  1195. echo "configure:1386: checking how to run the C preprocessor" >&5
  1196. # On Suns, sometimes $CPP names a directory.
  1197. if test -n "$CPP" && test -d "$CPP"; then
  1198. CPP=
  1199. fi
  1200. if test -z "$CPP"; then
  1201. # This must be in double quotes, not single quotes, because CPP may get
  1202. # substituted into the Makefile and "${CC-cc}" will confuse make.
  1203. CPP="${CC-cc} -E"
  1204. # On the NeXT, cc -E runs the code through the compiler's parser,
  1205. # not just through cpp.
  1206. cat > conftest.$ac_ext <<EOF
  1207. #line 1399 "configure"
  1208. #include "confdefs.h"
  1209. #include <assert.h>
  1210. Syntax Error
  1211. EOF
  1212. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1213. { (eval echo configure:1405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1214. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1215. if test -z "$ac_err"; then
  1216. :
  1217. else
  1218. echo "$ac_err" >&5
  1219. echo "configure: failed program was:" >&5
  1220. cat conftest.$ac_ext >&5
  1221. rm -rf conftest*
  1222. CPP="${CC-cc} -E -traditional-cpp"
  1223. cat > conftest.$ac_ext <<EOF
  1224. #line 1416 "configure"
  1225. #include "confdefs.h"
  1226. #include <assert.h>
  1227. Syntax Error
  1228. EOF
  1229. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1230. { (eval echo configure:1422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1231. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1232. if test -z "$ac_err"; then
  1233. :
  1234. else
  1235. echo "$ac_err" >&5
  1236. echo "configure: failed program was:" >&5
  1237. cat conftest.$ac_ext >&5
  1238. rm -rf conftest*
  1239. CPP="${CC-cc} -nologo -E"
  1240. cat > conftest.$ac_ext <<EOF
  1241. #line 1433 "configure"
  1242. #include "confdefs.h"
  1243. #include <assert.h>
  1244. Syntax Error
  1245. EOF
  1246. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1247. { (eval echo configure:1439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1248. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1249. if test -z "$ac_err"; then
  1250. :
  1251. else
  1252. echo "$ac_err" >&5
  1253. echo "configure: failed program was:" >&5
  1254. cat conftest.$ac_ext >&5
  1255. rm -rf conftest*
  1256. CPP=/lib/cpp
  1257. fi
  1258. rm -f conftest*
  1259. fi
  1260. rm -f conftest*
  1261. fi
  1262. rm -f conftest*
  1263. ac_cv_prog_CPP="$CPP"
  1264. CPP="$ac_cv_prog_CPP"
  1265. else
  1266. ac_cv_prog_CPP="$CPP"
  1267. fi
  1268. echo "$ac_t""$CPP" 1>&6
  1269. # Step 0.a: Enable 64 bit support?
  1270. echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6
  1271. echo "configure:1467: checking if 64bit support is requested" >&5
  1272. # Check whether --enable-64bit or --disable-64bit was given.
  1273. if test "${enable_64bit+set}" = set; then
  1274. enableval="$enable_64bit"
  1275. :
  1276. else
  1277. enableval="no"
  1278. fi
  1279. if test "$enableval" = "yes"; then
  1280. do64bit=yes
  1281. else
  1282. do64bit=no
  1283. fi
  1284. echo "$ac_t""$do64bit" 1>&6
  1285. # Step 0.b: Enable Solaris 64 bit VIS support?
  1286. echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
  1287. echo "configure:1487: checking if 64bit Sparc VIS support is requested" >&5
  1288. # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
  1289. if test "${enable_64bit_vis+set}" = set; then
  1290. enableval="$enable_64bit_vis"
  1291. :
  1292. else
  1293. enableval="no"
  1294. fi
  1295. if test "$enableval" = "yes"; then
  1296. # Force 64bit on with VIS
  1297. do64bit=yes
  1298. do64bitVIS=yes
  1299. else
  1300. do64bitVIS=no
  1301. fi
  1302. echo "$ac_t""$do64bitVIS" 1>&6
  1303. # Step 1: set the variable "system" to hold the name and version number
  1304. # for the system. This can usually be done via the "uname" command, but
  1305. # there are a few systems, like Next, where this doesn't work.
  1306. echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
  1307. echo "configure:1511: checking system version (for dynamic loading)" >&5
  1308. if test -f /usr/lib/NextStep/software_version; then
  1309. system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
  1310. else
  1311. system=`uname -s`-`uname -r`
  1312. if test "$?" -ne 0 ; then
  1313. echo "$ac_t""unknown (can't find uname command)" 1>&6
  1314. system=unknown
  1315. else
  1316. # Special check for weird MP-RAS system (uname returns weird
  1317. # results, and the version is kept in special file).
  1318. if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
  1319. system=MP-RAS-`awk '{print }' /etc/.relid`
  1320. fi
  1321. if test "`uname -s`" = "AIX" ; then
  1322. system=AIX-`uname -v`.`uname -r`
  1323. fi
  1324. echo "$ac_t""$system" 1>&6
  1325. fi
  1326. fi
  1327. # Step 2: check for existence of -ldl library. This is needed because
  1328. # Linux can use either -ldl or -ldld for dynamic loading.
  1329. echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
  1330. echo "configure:1537: checking for dlopen in -ldl" >&5
  1331. ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  1332. ac_save_LIBS="$LIBS"
  1333. LIBS="-ldl $LIBS"
  1334. cat > conftest.$ac_ext <<EOF
  1335. #line 1543 "configure"
  1336. #include "confdefs.h"
  1337. /* Override any gcc2 internal prototype to avoid an error. */
  1338. /* We use char because int might match the return type of a gcc2
  1339. builtin and then its argument prototype would still apply. */
  1340. char dlopen();
  1341. int main() {
  1342. dlopen()
  1343. ; return 0; }
  1344. EOF
  1345. if { (eval echo configure:1554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1346. rm -rf conftest*
  1347. eval "ac_cv_lib_$ac_lib_var=yes"
  1348. else
  1349. echo "configure: failed program was:" >&5
  1350. cat conftest.$ac_ext >&5
  1351. rm -rf conftest*
  1352. eval "ac_cv_lib_$ac_lib_var=no"
  1353. fi
  1354. rm -f conftest*
  1355. LIBS="$ac_save_LIBS"
  1356. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1357. echo "$ac_t""yes" 1>&6
  1358. have_dl=yes
  1359. else
  1360. echo "$ac_t""no" 1>&6
  1361. have_dl=no
  1362. fi
  1363. # Require ranlib early so we can override it in special cases below.
  1364. # Step 3: set configuration options based on system name and version.
  1365. do64bit_ok=no
  1366. EXTRA_CFLAGS=""
  1367. GRASS_EXPORT_FILE_SUFFIX=""
  1368. UNSHARED_LIB_SUFFIX=""
  1369. GRASS_TRIM_DOTS='`echo ${LIB_VER} | tr -d .`'
  1370. ECHO_VERSION='`echo ${LIB_VER}`'
  1371. GRASS_LIB_VERSIONS_OK=ok
  1372. CFLAGS_DEBUG=-g
  1373. CFLAGS_OPTIMIZE=-O
  1374. if test "$GCC" = "yes" ; then
  1375. CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
  1376. else
  1377. CFLAGS_WARNING=""
  1378. fi
  1379. GRASS_NEEDS_EXP_FILE=0
  1380. GRASS_BUILD_EXP_FILE=""
  1381. GRASS_EXP_FILE=""
  1382. # Extract the first word of "ar", so it can be a program name with args.
  1383. set dummy ar; ac_word=$2
  1384. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1385. echo "configure:1601: checking for $ac_word" >&5
  1386. if test -n "$AR"; then
  1387. ac_cv_prog_AR="$AR" # Let the user override the test.
  1388. else
  1389. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1390. ac_dummy="$PATH"
  1391. for ac_dir in $ac_dummy; do
  1392. test -z "$ac_dir" && ac_dir=.
  1393. if test -f $ac_dir/$ac_word; then
  1394. ac_cv_prog_AR="ar"
  1395. break
  1396. fi
  1397. done
  1398. IFS="$ac_save_ifs"
  1399. fi
  1400. AR="$ac_cv_prog_AR"
  1401. if test -n "$AR"; then
  1402. echo "$ac_t""$AR" 1>&6
  1403. else
  1404. echo "$ac_t""no" 1>&6
  1405. fi
  1406. if test "${AR}" = "" ; then
  1407. { echo "configure: error: Required archive tool 'ar' not found on PATH." 1>&2; exit 1; }
  1408. fi
  1409. STLIB_LD='${AR} cr'
  1410. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1411. PLAT_OBJS=""
  1412. case $system in
  1413. AIX-5.*)
  1414. if test "${GRASS_THREADS}" = "1" -a "$GCC" != "yes" ; then
  1415. # AIX requires the _r compiler when gcc isn't being used
  1416. if test "${CC}" != "cc_r" ; then
  1417. CC=${CC}_r
  1418. fi
  1419. echo "$ac_t""Using $CC for compiling with threads" 1>&6
  1420. fi
  1421. LIBS="$LIBS -lc"
  1422. # AIX-5 uses ELF style dynamic libraries
  1423. SHLIB_CFLAGS=""
  1424. # Note: need the LIBS below, otherwise Tk won't find Tcl's
  1425. # symbols when dynamically loaded into tclsh.
  1426. SHLIB_LD_LIBS='${LIBS}'
  1427. SHLIB_SUFFIX=".so"
  1428. LDFLAGS=""
  1429. LD_LIBRARY_PATH_VAR="LIBPATH"
  1430. # Check to enable 64-bit flags for compiler/linker
  1431. if test "$do64bit" = "yes" ; then
  1432. if test "$GCC" = "yes" ; then
  1433. echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
  1434. else
  1435. do64bit_ok=yes
  1436. EXTRA_CFLAGS="-q64"
  1437. LDFLAGS="-q64"
  1438. RANLIB="${RANLIB} -X64"
  1439. AR="${AR} -X64"
  1440. SHLIB_LD_FLAGS="-b64"
  1441. fi
  1442. fi
  1443. if test "`uname -m`" = "ia64" ; then
  1444. # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
  1445. SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  1446. # AIX-5 has dl* in libc.so
  1447. if test "$GCC" = "yes" ; then
  1448. CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  1449. else
  1450. CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
  1451. fi
  1452. LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  1453. else
  1454. SHLIB_LD="${SRCDIR}/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry ${SHLIB_LD_FLAGS}"
  1455. CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  1456. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1457. GRASS_NEEDS_EXP_FILE=1
  1458. GRASS_EXPORT_FILE_SUFFIX='${LIB_VER}.exp'
  1459. fi
  1460. ;;
  1461. AIX-*)
  1462. if test "${GRASS_THREADS}" = "1" -a "$GCC" != "yes" ; then
  1463. # AIX requires the _r compiler when gcc isn't being used
  1464. if test "${CC}" != "cc_r" ; then
  1465. CC=${CC}_r
  1466. fi
  1467. echo "$ac_t""Using $CC for compiling with threads" 1>&6
  1468. fi
  1469. LIBS="$LIBS -lc"
  1470. SHLIB_CFLAGS=""
  1471. SHLIB_LD_LIBS='${LIBS}'
  1472. SHLIB_SUFFIX=".so"
  1473. LDFLAGS=""
  1474. CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  1475. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1476. LD_LIBRARY_PATH_VAR="LIBPATH"
  1477. GRASS_NEEDS_EXP_FILE=1
  1478. GRASS_EXPORT_FILE_SUFFIX='${LIB_VER}.exp'
  1479. # Check to enable 64-bit flags for compiler/linker
  1480. if test "$do64bit" = "yes" ; then
  1481. if test "$GCC" = "yes" ; then
  1482. echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
  1483. else
  1484. do64bit_ok=yes
  1485. EXTRA_CFLAGS="-q64"
  1486. LDFLAGS="-q64"
  1487. RANLIB="${RANLIB} -X64"
  1488. AR="${AR} -X64"
  1489. SHLIB_LD_FLAGS="-b64"
  1490. fi
  1491. fi
  1492. SHLIB_LD="${SRCDIR}/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry ${SHLIB_LD_FLAGS}"
  1493. # On AIX <=v4 systems, libbsd.a has to be linked in to support
  1494. # non-blocking file IO. This library has to be linked in after
  1495. # the MATH_LIBS or it breaks the pow() function. The way to
  1496. # insure proper sequencing, is to add it to the tail of MATH_LIBS.
  1497. # This library also supplies gettimeofday.
  1498. #
  1499. # AIX does not have a timezone field in struct tm. When the AIX
  1500. # bsd library is used, the timezone global and the gettimeofday
  1501. # methods are to be avoided for timezone deduction instead, we
  1502. # deduce the timezone by comparing the localtime result on a
  1503. # known GMT value.
  1504. echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
  1505. echo "configure:1730: checking for gettimeofday in -lbsd" >&5
  1506. ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
  1507. ac_save_LIBS="$LIBS"
  1508. LIBS="-lbsd $LIBS"
  1509. cat > conftest.$ac_ext <<EOF
  1510. #line 1736 "configure"
  1511. #include "confdefs.h"
  1512. /* Override any gcc2 internal prototype to avoid an error. */
  1513. /* We use char because int might match the return type of a gcc2
  1514. builtin and then its argument prototype would still apply. */
  1515. char gettimeofday();
  1516. int main() {
  1517. gettimeofday()
  1518. ; return 0; }
  1519. EOF
  1520. if { (eval echo configure:1747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1521. rm -rf conftest*
  1522. eval "ac_cv_lib_$ac_lib_var=yes"
  1523. else
  1524. echo "configure: failed program was:" >&5
  1525. cat conftest.$ac_ext >&5
  1526. rm -rf conftest*
  1527. eval "ac_cv_lib_$ac_lib_var=no"
  1528. fi
  1529. rm -f conftest*
  1530. LIBS="$ac_save_LIBS"
  1531. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1532. echo "$ac_t""yes" 1>&6
  1533. libbsd=yes
  1534. else
  1535. echo "$ac_t""no" 1>&6
  1536. libbsd=no
  1537. fi
  1538. if test $libbsd = yes; then
  1539. MATH_LIBS="$MATH_LIBS -lbsd"
  1540. cat >> confdefs.h <<\EOF
  1541. #define USE_DELTA_FOR_TZ 1
  1542. EOF
  1543. fi
  1544. ;;
  1545. BeOS*)
  1546. SHLIB_CFLAGS="-fPIC"
  1547. SHLIB_LD="${CC} -nostart"
  1548. SHLIB_LD_LIBS='${LIBS}'
  1549. SHLIB_SUFFIX=".so"
  1550. LDFLAGS=""
  1551. #-----------------------------------------------------------
  1552. # Check for inet_ntoa in -lbind, for BeOS (which also needs
  1553. # -lsocket, even if the network functions are in -lnet which
  1554. # is always linked to, for compatibility.
  1555. #-----------------------------------------------------------
  1556. echo $ac_n "checking for inet_ntoa in -lbind""... $ac_c" 1>&6
  1557. echo "configure:1788: checking for inet_ntoa in -lbind" >&5
  1558. ac_lib_var=`echo bind'_'inet_ntoa | sed 'y%./+-%__p_%'`
  1559. ac_save_LIBS="$LIBS"
  1560. LIBS="-lbind $LIBS"
  1561. cat > conftest.$ac_ext <<EOF
  1562. #line 1794 "configure"
  1563. #include "confdefs.h"
  1564. /* Override any gcc2 internal prototype to avoid an error. */
  1565. /* We use char because int might match the return type of a gcc2
  1566. builtin and then its argument prototype would still apply. */
  1567. char inet_ntoa();
  1568. int main() {
  1569. inet_ntoa()
  1570. ; return 0; }
  1571. EOF
  1572. if { (eval echo configure:1805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1573. rm -rf conftest*
  1574. eval "ac_cv_lib_$ac_lib_var=yes"
  1575. else
  1576. echo "configure: failed program was:" >&5
  1577. cat conftest.$ac_ext >&5
  1578. rm -rf conftest*
  1579. eval "ac_cv_lib_$ac_lib_var=no"
  1580. fi
  1581. rm -f conftest*
  1582. LIBS="$ac_save_LIBS"
  1583. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1584. echo "$ac_t""yes" 1>&6
  1585. LIBS="$LIBS -lbind -lsocket"
  1586. else
  1587. echo "$ac_t""no" 1>&6
  1588. fi
  1589. ;;
  1590. BSD/OS-2.1*|BSD/OS-3*)
  1591. SHLIB_CFLAGS=""
  1592. SHLIB_LD="shlicc -r"
  1593. SHLIB_LD_LIBS='${LIBS}'
  1594. SHLIB_SUFFIX=".so"
  1595. LDFLAGS=""
  1596. CC_SEARCH_FLAGS=""
  1597. LD_SEARCH_FLAGS=""
  1598. ;;
  1599. BSD/OS-4.*)
  1600. SHLIB_CFLAGS="-export-dynamic -fPIC"
  1601. SHLIB_LD="cc -shared"
  1602. SHLIB_LD_LIBS='${LIBS}'
  1603. SHLIB_SUFFIX=".so"
  1604. LDFLAGS="-export-dynamic"
  1605. CC_SEARCH_FLAGS=""
  1606. LD_SEARCH_FLAGS=""
  1607. ;;
  1608. dgux*)
  1609. SHLIB_CFLAGS="-K PIC"
  1610. SHLIB_LD="cc -G"
  1611. SHLIB_LD_LIBS=""
  1612. SHLIB_SUFFIX=".so"
  1613. LDFLAGS=""
  1614. CC_SEARCH_FLAGS=""
  1615. LD_SEARCH_FLAGS=""
  1616. ;;
  1617. HP-UX-*.11.*)
  1618. # Use updated header definitions where possible
  1619. cat >> confdefs.h <<\EOF
  1620. #define _XOPEN_SOURCE 1
  1621. EOF
  1622. # Use the XOPEN network library
  1623. cat >> confdefs.h <<\EOF
  1624. #define _XOPEN_SOURCE_EXTENDED 1
  1625. EOF
  1626. # Use the XOPEN network library
  1627. LIBS="$LIBS -lxnet" # Use the XOPEN network library
  1628. SHLIB_SUFFIX=".sl"
  1629. echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
  1630. echo "configure:1866: checking for shl_load in -ldld" >&5
  1631. ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  1632. ac_save_LIBS="$LIBS"
  1633. LIBS="-ldld $LIBS"
  1634. cat > conftest.$ac_ext <<EOF
  1635. #line 1872 "configure"
  1636. #include "confdefs.h"
  1637. /* Override any gcc2 internal prototype to avoid an error. */
  1638. /* We use char because int might match the return type of a gcc2
  1639. builtin and then its argument prototype would still apply. */
  1640. char shl_load();
  1641. int main() {
  1642. shl_load()
  1643. ; return 0; }
  1644. EOF
  1645. if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1646. rm -rf conftest*
  1647. eval "ac_cv_lib_$ac_lib_var=yes"
  1648. else
  1649. echo "configure: failed program was:" >&5
  1650. cat conftest.$ac_ext >&5
  1651. rm -rf conftest*
  1652. eval "ac_cv_lib_$ac_lib_var=no"
  1653. fi
  1654. rm -f conftest*
  1655. LIBS="$ac_save_LIBS"
  1656. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1657. echo "$ac_t""yes" 1>&6
  1658. shared_ok=yes
  1659. else
  1660. echo "$ac_t""no" 1>&6
  1661. shared_ok=no
  1662. fi
  1663. if test "$shared_ok" = yes; then
  1664. SHLIB_CFLAGS="+z"
  1665. SHLIB_LD="ld -b"
  1666. SHLIB_LD_LIBS='${LIBS}'
  1667. LDFLAGS="-Wl,-E"
  1668. CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
  1669. LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
  1670. LD_LIBRARY_PATH_VAR="SHLIB_PATH"
  1671. fi
  1672. # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
  1673. #EXTRA_CFLAGS="+DAportable"
  1674. # Check to enable 64-bit flags for compiler/linker
  1675. if test "$do64bit" = "yes" ; then
  1676. if test "$GCC" = "yes" ; then
  1677. hpux_arch=`gcc -dumpmachine`
  1678. case $hpux_arch in
  1679. hppa64*)
  1680. # 64-bit gcc in use. Fix flags for GNU ld.
  1681. do64bit_ok=yes
  1682. SHLIB_LD="gcc -shared"
  1683. SHLIB_LD_LIBS=""
  1684. LD_SEARCH_FLAGS=''
  1685. CC_SEARCH_FLAGS=''
  1686. ;;
  1687. *)
  1688. echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
  1689. ;;
  1690. esac
  1691. else
  1692. do64bit_ok=yes
  1693. if test "`uname -m`" = "ia64" ; then
  1694. EXTRA_CFLAGS="+DD64"
  1695. LDFLAGS="+DD64 $LDFLAGS"
  1696. else
  1697. EXTRA_CFLAGS="+DA2.0W"
  1698. LDFLAGS="+DA2.0W $LDFLAGS"
  1699. fi
  1700. fi
  1701. fi
  1702. ;;
  1703. HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
  1704. SHLIB_SUFFIX=".sl"
  1705. echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
  1706. echo "configure:1948: checking for shl_load in -ldld" >&5
  1707. ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  1708. ac_save_LIBS="$LIBS"
  1709. LIBS="-ldld $LIBS"
  1710. cat > conftest.$ac_ext <<EOF
  1711. #line 1954 "configure"
  1712. #include "confdefs.h"
  1713. /* Override any gcc2 internal prototype to avoid an error. */
  1714. /* We use char because int might match the return type of a gcc2
  1715. builtin and then its argument prototype would still apply. */
  1716. char shl_load();
  1717. int main() {
  1718. shl_load()
  1719. ; return 0; }
  1720. EOF
  1721. if { (eval echo configure:1965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1722. rm -rf conftest*
  1723. eval "ac_cv_lib_$ac_lib_var=yes"
  1724. else
  1725. echo "configure: failed program was:" >&5
  1726. cat conftest.$ac_ext >&5
  1727. rm -rf conftest*
  1728. eval "ac_cv_lib_$ac_lib_var=no"
  1729. fi
  1730. rm -f conftest*
  1731. LIBS="$ac_save_LIBS"
  1732. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1733. echo "$ac_t""yes" 1>&6
  1734. shared_ok=yes
  1735. else
  1736. echo "$ac_t""no" 1>&6
  1737. shared_ok=no
  1738. fi
  1739. if test "$shared_ok" = yes; then
  1740. SHLIB_CFLAGS="+z"
  1741. SHLIB_LD="ld -b"
  1742. SHLIB_LD_LIBS=""
  1743. LDFLAGS="-Wl,-E"
  1744. CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
  1745. LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
  1746. LD_LIBRARY_PATH_VAR="SHLIB_PATH"
  1747. fi
  1748. ;;
  1749. IRIX-4.*)
  1750. SHLIB_CFLAGS="-G 0"
  1751. SHLIB_SUFFIX=".a"
  1752. SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
  1753. SHLIB_LD_LIBS='${LIBS}'
  1754. LDFLAGS="-Wl,-D,08000000"
  1755. CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  1756. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1757. SHARED_LIB_SUFFIX='${LIB_VER}.a'
  1758. ;;
  1759. IRIX-5.*)
  1760. SHLIB_CFLAGS=""
  1761. SHLIB_LD="ld -shared -rdata_shared"
  1762. SHLIB_LD_LIBS='${LIBS}'
  1763. SHLIB_SUFFIX=".so"
  1764. CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1765. LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  1766. EXTRA_CFLAGS=""
  1767. LDFLAGS=""
  1768. ;;
  1769. IRIX-6.2)
  1770. SHLIB_CFLAGS=""
  1771. SHLIB_LD="ld -shared -rdata_shared"
  1772. SHLIB_LD_LIBS='${LIBS}'
  1773. SHLIB_SUFFIX=".so"
  1774. CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1775. LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  1776. ;;
  1777. IRIX-6.*|IRIX64-6.5*)
  1778. SHLIB_CFLAGS=""
  1779. SHLIB_LD="ld -n32 -shared -rdata_shared"
  1780. SHLIB_LD_LIBS='${LIBS}'
  1781. SHLIB_SUFFIX=".so"
  1782. CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1783. LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  1784. if test "$GCC" = "yes" ; then
  1785. EXTRA_CFLAGS="-mabi=n32"
  1786. LDFLAGS="-mabi=n32"
  1787. else
  1788. case $system in
  1789. IRIX-6.3)
  1790. # Use to build 6.2 compatible binaries on 6.3.
  1791. EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
  1792. ;;
  1793. *)
  1794. EXTRA_CFLAGS="-n32"
  1795. ;;
  1796. esac
  1797. LDFLAGS="-n32"
  1798. fi
  1799. ;;
  1800. IRIX64-6.*)
  1801. SHLIB_CFLAGS=""
  1802. SHLIB_LD="ld -n32 -shared -rdata_shared"
  1803. SHLIB_LD_LIBS='${LIBS}'
  1804. SHLIB_SUFFIX=".so"
  1805. LDFLAGS=""
  1806. CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1807. LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  1808. # Check to enable 64-bit flags for compiler/linker
  1809. if test "$do64bit" = "yes" ; then
  1810. if test "$GCC" = "yes" ; then
  1811. echo "configure: warning: 64bit mode not supported by gcc" 1>&2
  1812. else
  1813. do64bit_ok=yes
  1814. SHLIB_LD="ld -64 -shared -rdata_shared"
  1815. EXTRA_CFLAGS="-64"
  1816. LDFLAGS="-64"
  1817. fi
  1818. fi
  1819. ;;
  1820. Linux*)
  1821. SHLIB_CFLAGS="-fPIC"
  1822. SHLIB_LD_LIBS='${LIBS}'
  1823. SHLIB_SUFFIX=".so"
  1824. CFLAGS_OPTIMIZE=-O2
  1825. # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
  1826. # when you inline the string and math operations. Turn this off to
  1827. # get rid of the warnings.
  1828. #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
  1829. if test "$have_dl" = yes; then
  1830. SHLIB_LD="${CC} -shared"
  1831. LDFLAGS="-Wl,--export-dynamic"
  1832. CC_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
  1833. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1834. else
  1835. ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
  1836. echo $ac_n "checking for dld.h""... $ac_c" 1>&6
  1837. echo "configure:2087: checking for dld.h" >&5
  1838. cat > conftest.$ac_ext <<EOF
  1839. #line 2090 "configure"
  1840. #include "confdefs.h"
  1841. #include <dld.h>
  1842. EOF
  1843. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1844. { (eval echo configure:2095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1845. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1846. if test -z "$ac_err"; then
  1847. rm -rf conftest*
  1848. eval "ac_cv_header_$ac_safe=yes"
  1849. else
  1850. echo "$ac_err" >&5
  1851. echo "configure: failed program was:" >&5
  1852. cat conftest.$ac_ext >&5
  1853. rm -rf conftest*
  1854. eval "ac_cv_header_$ac_safe=no"
  1855. fi
  1856. rm -f conftest*
  1857. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1858. echo "$ac_t""yes" 1>&6
  1859. SHLIB_LD="ld -shared"
  1860. LDFLAGS=""
  1861. CC_SEARCH_FLAGS=""
  1862. LD_SEARCH_FLAGS=""
  1863. else
  1864. echo "$ac_t""no" 1>&6
  1865. fi
  1866. fi
  1867. if test "`uname -m`" = "alpha" ; then
  1868. EXTRA_CFLAGS="-mieee"
  1869. fi
  1870. # The combo of gcc + glibc has a bug related
  1871. # to inlining of functions like strtod(). The
  1872. # -fno-builtin flag should address this problem
  1873. # but it does not work. The -fno-inline flag
  1874. # is kind of overkill but it works.
  1875. # Disable inlining only when one of the
  1876. # files in compat/*.c is being linked in.
  1877. if test x"${USE_COMPAT}" != x ; then
  1878. EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
  1879. fi
  1880. # XIM peeking works under XFree86.
  1881. cat >> confdefs.h <<\EOF
  1882. #define PEEK_XCLOSEIM 1
  1883. EOF
  1884. ;;
  1885. GNU*)
  1886. SHLIB_CFLAGS="-fPIC"
  1887. SHLIB_LD_LIBS='${LIBS}'
  1888. SHLIB_SUFFIX=".so"
  1889. if test "$have_dl" = yes; then
  1890. SHLIB_LD="${CC} -shared"
  1891. LDFLAGS="-Wl,--export-dynamic"
  1892. CC_SEARCH_FLAGS=""
  1893. LD_SEARCH_FLAGS=""
  1894. else
  1895. ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
  1896. echo $ac_n "checking for dld.h""... $ac_c" 1>&6
  1897. echo "configure:2155: checking for dld.h" >&5
  1898. cat > conftest.$ac_ext <<EOF
  1899. #line 2158 "configure"
  1900. #include "confdefs.h"
  1901. #include <dld.h>
  1902. EOF
  1903. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1904. { (eval echo configure:2163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1905. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1906. if test -z "$ac_err"; then
  1907. rm -rf conftest*
  1908. eval "ac_cv_header_$ac_safe=yes"
  1909. else
  1910. echo "$ac_err" >&5
  1911. echo "configure: failed program was:" >&5
  1912. cat conftest.$ac_ext >&5
  1913. rm -rf conftest*
  1914. eval "ac_cv_header_$ac_safe=no"
  1915. fi
  1916. rm -f conftest*
  1917. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1918. echo "$ac_t""yes" 1>&6
  1919. SHLIB_LD="ld -shared"
  1920. LDFLAGS=""
  1921. CC_SEARCH_FLAGS=""
  1922. LD_SEARCH_FLAGS=""
  1923. else
  1924. echo "$ac_t""no" 1>&6
  1925. fi
  1926. fi
  1927. if test "`uname -m`" = "alpha" ; then
  1928. EXTRA_CFLAGS="-mieee"
  1929. fi
  1930. ;;
  1931. CYGWIN*)
  1932. SHLIB_CFLAGS=""
  1933. SHLIB_LD_LIBS='${LIBS}'
  1934. SHLIB_SUFFIX=".dll"
  1935. SHLIB_LD="${CC} -shared"
  1936. LDFLAGS="-Wl,--export-dynamic"
  1937. CC_SEARCH_FLAGS=""
  1938. LD_SEARCH_FLAGS=""
  1939. LD_LIBRARY_PATH_VAR="PATH"
  1940. ;;
  1941. MINGW*)
  1942. SHLIB_CFLAGS=""
  1943. SHLIB_LD_LIBS='${LIBS}'
  1944. SHLIB_SUFFIX=".dll"
  1945. SHLIB_LD="${CC} -shared"
  1946. LDFLAGS="-Wl,--export-dynamic,--enable-runtime-pseudo-reloc"
  1947. CC_SEARCH_FLAGS=""
  1948. LD_SEARCH_FLAGS=""
  1949. LD_LIBRARY_PATH_VAR="PATH"
  1950. ;;
  1951. MP-RAS-02*)
  1952. SHLIB_CFLAGS="-K PIC"
  1953. SHLIB_LD="cc -G"
  1954. SHLIB_LD_LIBS=""
  1955. SHLIB_SUFFIX=".so"
  1956. LDFLAGS=""
  1957. CC_SEARCH_FLAGS=""
  1958. LD_SEARCH_FLAGS=""
  1959. ;;
  1960. MP-RAS-*)
  1961. SHLIB_CFLAGS="-K PIC"
  1962. SHLIB_LD="cc -G"
  1963. SHLIB_LD_LIBS=""
  1964. SHLIB_SUFFIX=".so"
  1965. LDFLAGS="-Wl,-Bexport"
  1966. CC_SEARCH_FLAGS=""
  1967. LD_SEARCH_FLAGS=""
  1968. ;;
  1969. NetBSD-*)
  1970. # NetBSD has ELF.
  1971. SHLIB_CFLAGS="-fPIC"
  1972. SHLIB_LD="ld -Bshareable -x"
  1973. SHLIB_LD_LIBS="${LIBS}"
  1974. SHLIB_SUFFIX=".so"
  1975. LDFLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -export-dynamic'
  1976. CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1977. LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  1978. if test "${GRASS_THREADS}" = "1" ; then
  1979. # The -pthread needs to go in the CFLAGS, not LIBS
  1980. LIBS=`echo $LIBS | sed s/-pthread//`
  1981. EXTRA_CFLAGS="-pthread"
  1982. LDFLAGS="$LDFLAGS -pthread"
  1983. fi
  1984. # NetBSD doesn't handle version numbers with dots.
  1985. UNSHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
  1986. SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so',
  1987. GRASS_LIB_VERSIONS_OK=nodots
  1988. ;;
  1989. OpenBSD-*)
  1990. SHLIB_LD="${CC} -shared"
  1991. SHLIB_LD_LIBS='${LIBS}'
  1992. SHLIB_SUFFIX=".so"
  1993. LDFLAGS=""
  1994. CC_SEARCH_FLAGS=""
  1995. LD_SEARCH_FLAGS=""
  1996. echo $ac_n "checking for ELF""... $ac_c" 1>&6
  1997. echo "configure:2260: checking for ELF" >&5
  1998. cat > conftest.$ac_ext <<EOF
  1999. #line 2262 "configure"
  2000. #include "confdefs.h"
  2001. #ifdef __ELF__
  2002. yes
  2003. #endif
  2004. EOF
  2005. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2006. egrep "yes" >/dev/null 2>&1; then
  2007. rm -rf conftest*
  2008. echo "$ac_t""yes" 1>&6
  2009. SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so.1.0'
  2010. else
  2011. rm -rf conftest*
  2012. echo "$ac_t""no" 1>&6
  2013. SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so.1.0'
  2014. fi
  2015. rm -f conftest*
  2016. # OpenBSD doesn't do version numbers with dots.
  2017. UNSHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
  2018. GRASS_LIB_VERSIONS_OK=nodots
  2019. ;;
  2020. FreeBSD-[1-2].*)
  2021. # Not available on all versions: check for include file.
  2022. ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
  2023. echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
  2024. echo "configure:2292: checking for dlfcn.h" >&5
  2025. cat > conftest.$ac_ext <<EOF
  2026. #line 2295 "configure"
  2027. #include "confdefs.h"
  2028. #include <dlfcn.h>
  2029. EOF
  2030. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2031. { (eval echo configure:2300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2032. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2033. if test -z "$ac_err"; then
  2034. rm -rf conftest*
  2035. eval "ac_cv_header_$ac_safe=yes"
  2036. else
  2037. echo "$ac_err" >&5
  2038. echo "configure: failed program was:" >&5
  2039. cat conftest.$ac_ext >&5
  2040. rm -rf conftest*
  2041. eval "ac_cv_header_$ac_safe=no"
  2042. fi
  2043. rm -f conftest*
  2044. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2045. echo "$ac_t""yes" 1>&6
  2046. SHLIB_CFLAGS="-fPIC"
  2047. SHLIB_LD="ld -Bshareable -x"
  2048. SHLIB_LD_LIBS=""
  2049. SHLIB_SUFFIX=".so"
  2050. LDFLAGS=""
  2051. CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  2052. LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  2053. echo $ac_n "checking for ELF""... $ac_c" 1>&6
  2054. echo "configure:2324: checking for ELF" >&5
  2055. cat > conftest.$ac_ext <<EOF
  2056. #line 2326 "configure"
  2057. #include "confdefs.h"
  2058. #ifdef __ELF__
  2059. yes
  2060. #endif
  2061. EOF
  2062. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2063. egrep "yes" >/dev/null 2>&1; then
  2064. rm -rf conftest*
  2065. echo "$ac_t""yes" 1>&6
  2066. SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so'
  2067. else
  2068. rm -rf conftest*
  2069. echo "$ac_t""no" 1>&6
  2070. SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so.1.0'
  2071. fi
  2072. rm -f conftest*
  2073. else
  2074. echo "$ac_t""no" 1>&6
  2075. SHLIB_CFLAGS=""
  2076. SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
  2077. SHLIB_LD_LIBS='${LIBS}'
  2078. SHLIB_SUFFIX=".a"
  2079. LDFLAGS=""
  2080. CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  2081. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  2082. SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
  2083. fi
  2084. UNSHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
  2085. GRASS_LIB_VERSIONS_OK=nodots
  2086. ;;
  2087. FreeBSD-*)
  2088. # FreeBSD 3.* and greater have ELF.
  2089. SHLIB_CFLAGS="-fPIC"
  2090. SHLIB_LD="ld -Bshareable -x"
  2091. SHLIB_LD_LIBS='${LIBS}'
  2092. SHLIB_SUFFIX=".so"
  2093. LDFLAGS="-export-dynamic"
  2094. CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  2095. LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  2096. if test "${GRASS_THREADS}" = "1" ; then
  2097. # The -pthread needs to go in the CFLAGS, not LIBS
  2098. LIBS=`echo $LIBS | sed s/-pthread//`
  2099. EXTRA_CFLAGS="-pthread"
  2100. LDFLAGS="$LDFLAGS -pthread"
  2101. fi
  2102. case $system in
  2103. FreeBSD-3.*)
  2104. # FreeBSD-3 doesn't handle version numbers with dots.
  2105. UNSHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
  2106. SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so'
  2107. GRASS_LIB_VERSIONS_OK=nodots
  2108. ;;
  2109. esac
  2110. ;;
  2111. Rhapsody-*|Darwin-*)
  2112. SHLIB_CFLAGS="-fno-common"
  2113. 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}"
  2114. GRASS_SHLIB_LD_EXTRAS=""
  2115. SHLIB_LD_LIBS='${LIBS}'
  2116. SHLIB_SUFFIX=".dylib"
  2117. PLAT_OBJS=""
  2118. CC_SEARCH_FLAGS=""
  2119. LD_SEARCH_FLAGS=""
  2120. CFLAGS_OPTIMIZE="-Os"
  2121. LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
  2122. # for compatibility with autoconf vers 2.13 :
  2123. HACK=""
  2124. EXTRA_CFLAGS=""
  2125. LIBS="$LIBS"
  2126. ;;
  2127. NEXTSTEP-*)
  2128. SHLIB_CFLAGS=""
  2129. SHLIB_LD="cc -nostdlib -r"
  2130. SHLIB_LD_LIBS=""
  2131. SHLIB_SUFFIX=".so"
  2132. LDFLAGS=""
  2133. CC_SEARCH_FLAGS=""
  2134. LD_SEARCH_FLAGS=""
  2135. ;;
  2136. OS/390-*)
  2137. CFLAGS_OPTIMIZE="" # Optimizer is buggy
  2138. cat >> confdefs.h <<\EOF
  2139. #define _OE_SOCKETS 1
  2140. EOF
  2141. # needed in sys/socket.h
  2142. ;;
  2143. OSF1-1.0|OSF1-1.1|OSF1-1.2)
  2144. # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
  2145. SHLIB_CFLAGS=""
  2146. # Hack: make package name same as library name
  2147. SHLIB_LD='ld -R -export :'
  2148. SHLIB_LD_LIBS=""
  2149. SHLIB_SUFFIX=".so"
  2150. LDFLAGS=""
  2151. CC_SEARCH_FLAGS=""
  2152. LD_SEARCH_FLAGS=""
  2153. ;;
  2154. OSF1-1.*)
  2155. # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
  2156. SHLIB_CFLAGS="-fPIC"
  2157. if test "$SHARED_BUILD" = "1" ; then
  2158. SHLIB_LD="ld -shared"
  2159. else
  2160. SHLIB_LD="ld -non_shared"
  2161. fi
  2162. SHLIB_LD_LIBS=""
  2163. SHLIB_SUFFIX=".so"
  2164. LDFLAGS=""
  2165. CC_SEARCH_FLAGS=""
  2166. LD_SEARCH_FLAGS=""
  2167. ;;
  2168. OSF1-V*)
  2169. # Digital OSF/1
  2170. SHLIB_CFLAGS=""
  2171. if test "$SHARED_BUILD" = "1" ; then
  2172. SHLIB_LD='ld -shared -expect_unresolved "*"'
  2173. else
  2174. SHLIB_LD='ld -non_shared -expect_unresolved "*"'
  2175. fi
  2176. SHLIB_LD_LIBS=""
  2177. SHLIB_SUFFIX=".so"
  2178.  LDFLAGS=""
  2179. CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  2180. LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  2181. if test "$GCC" = "yes" ; then
  2182. EXTRA_CFLAGS="-mieee"
  2183. else
  2184. EXTRA_CFLAGS="-DHAVE_TZSET -std1 -ieee"
  2185. fi
  2186. # see pthread_intro(3) for pthread support on osf1, k.furukawa
  2187. if test "${GRASS_THREADS}" = "1" ; then
  2188. EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
  2189. EXTRA_CFLAGS="${EXTRA_CFLAGS} -DGRASS_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
  2190. LIBS=`echo $LIBS | sed s/-lpthreads//`
  2191. if test "$GCC" = "yes" ; then
  2192. LIBS="$LIBS -lpthread -lmach -lexc"
  2193. else
  2194. EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
  2195. LDFLAGS="-pthread"
  2196. fi
  2197. fi
  2198. ;;
  2199. QNX-6*)
  2200. # QNX RTP
  2201. # This may work for all QNX, but it was only reported for v6.
  2202. SHLIB_CFLAGS="-fPIC"
  2203. SHLIB_LD="ld -Bshareable -x"
  2204. SHLIB_LD_LIBS=""
  2205. SHLIB_SUFFIX=".so"
  2206. LDFLAGS=""
  2207. CC_SEARCH_FLAGS=""
  2208. LD_SEARCH_FLAGS=""
  2209. ;;
  2210. RISCos-*)
  2211. SHLIB_CFLAGS="-G 0"
  2212. SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
  2213. SHLIB_LD_LIBS='${LIBS}'
  2214. SHLIB_SUFFIX=".a"
  2215. LDFLAGS="-Wl,-D,08000000"
  2216. CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  2217. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  2218. ;;
  2219. SCO_SV-3.2*)
  2220. # Note, dlopen is available only on SCO 3.2.5 and greater. However,
  2221. # this test works, since "uname -s" was non-standard in 3.2.4 and
  2222. # below.
  2223. if test "$GCC" = "yes" ; then
  2224. SHLIB_CFLAGS="-fPIC -melf"
  2225. LDFLAGS="-melf -Wl,-Bexport"
  2226. else
  2227. SHLIB_CFLAGS="-Kpic -belf"
  2228. LDFLAGS="-belf -Wl,-Bexport"
  2229. fi
  2230. SHLIB_LD="ld -G"
  2231. SHLIB_LD_LIBS=""
  2232. SHLIB_SUFFIX=".so"
  2233. CC_SEARCH_FLAGS=""
  2234. LD_SEARCH_FLAGS=""
  2235. ;;
  2236. SINIX*5.4*)
  2237. SHLIB_CFLAGS="-K PIC"
  2238. SHLIB_LD="cc -G"
  2239. SHLIB_LD_LIBS=""
  2240. SHLIB_SUFFIX=".so"
  2241. LDFLAGS=""
  2242. CC_SEARCH_FLAGS=""
  2243. LD_SEARCH_FLAGS=""
  2244. ;;
  2245. SunOS-4*)
  2246. SHLIB_CFLAGS="-PIC"
  2247. SHLIB_LD="ld"
  2248. SHLIB_LD_LIBS=""
  2249. SHLIB_SUFFIX=".so"
  2250. LDFLAGS=""
  2251. CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  2252. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  2253. # SunOS can't handle version numbers with dots in them in library
  2254. # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it
  2255. # requires an extra version number at the end of .so file names.
  2256. # So, the library has to have a name like libtcl75.so.1.0
  2257. SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so.1.0'
  2258. UNSHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
  2259. GRASS_LIB_VERSIONS_OK=nodots
  2260. ;;
  2261. SunOS-5.[0-6].*)
  2262. # Note: If _REENTRANT isn't defined, then Solaris
  2263. # won't define thread-safe library routines.
  2264. cat >> confdefs.h <<\EOF
  2265. #define _REENTRANT 1
  2266. EOF
  2267. cat >> confdefs.h <<\EOF
  2268. #define _POSIX_PTHREAD_SEMANTICS 1
  2269. EOF
  2270. # Note: need the LIBS below, otherwise Tk won't find Tcl's
  2271. # symbols when dynamically loaded into tclsh.
  2272. SHLIB_LD_LIBS='${LIBS}'
  2273. SHLIB_SUFFIX=".so"
  2274. LDFLAGS=""
  2275. if test "$GCC" = "yes" ; then
  2276. SHLIB_CFLAGS="-fPIC"
  2277. SHLIB_LD="$CC -shared"
  2278. CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  2279. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  2280. else
  2281. SHLIB_CFLAGS="-KPIC"
  2282. SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  2283. CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  2284. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  2285. fi
  2286. ;;
  2287. SunOS-5*)
  2288. # Note: If _REENTRANT isn't defined, then Solaris
  2289. # won't define thread-safe library routines.
  2290. cat >> confdefs.h <<\EOF
  2291. #define _REENTRANT 1
  2292. EOF
  2293. cat >> confdefs.h <<\EOF
  2294. #define _POSIX_PTHREAD_SEMANTICS 1
  2295. EOF
  2296. LDFLAGS=""
  2297. # Check to enable 64-bit flags for compiler/linker
  2298. if test "$do64bit" = "yes" ; then
  2299. arch=`isainfo`
  2300. if test "$arch" = "sparcv9 sparc" ; then
  2301. if test "$GCC" = "yes" ; then
  2302. echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
  2303. else
  2304. SHLIB_CFLAGS="-KPIC"
  2305. do64bit_ok=yes
  2306. if test "$do64bitVIS" = "yes" ; then
  2307. EXTRA_CFLAGS="-xarch=v9a"
  2308. LDFLAGS="-xarch=v9a"
  2309. else
  2310. EXTRA_CFLAGS="-xarch=v9"
  2311. LDFLAGS="-xarch=v9"
  2312. fi
  2313. fi
  2314. else
  2315. echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
  2316. fi
  2317. fi
  2318. # Note: need the LIBS below, otherwise Tk won't find Tcl's
  2319. # symbols when dynamically loaded into tclsh.
  2320. SHLIB_LD_LIBS='${LIBS}'
  2321. SHLIB_SUFFIX=".so"
  2322. if test "$GCC" = "yes" ; then
  2323. SHLIB_CFLAGS="-fPIC"
  2324. SHLIB_LD="$CC -shared"
  2325. CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  2326. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  2327. else
  2328. SHLIB_CFLAGS="-KPIC"
  2329. SHLIB_LD="CC -G -z text"
  2330. CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  2331. LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  2332. fi
  2333. ;;
  2334. ULTRIX-4.*)
  2335. SHLIB_CFLAGS="-G 0"
  2336. SHLIB_SUFFIX=".a"
  2337. SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
  2338. SHLIB_LD_LIBS='${LIBS}'
  2339. LDFLAGS="-Wl,-D,08000000"
  2340. CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  2341. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  2342. if test "$GCC" != "yes" ; then
  2343. EXTRA_CFLAGS="-DHAVE_TZSET -std1"
  2344. fi
  2345. ;;
  2346. UNIX_SV* | UnixWare-5*)
  2347. SHLIB_CFLAGS="-KPIC"
  2348. SHLIB_LD="cc -G"
  2349. SHLIB_LD_LIBS=""
  2350. SHLIB_SUFFIX=".so"
  2351. # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
  2352. # that don't grok the -Bexport option. Test that it does.
  2353. hold_ldflags=$LDFLAGS
  2354. echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
  2355. echo "configure:2650: checking for ld accepts -Bexport flag" >&5
  2356. LDFLAGS="${LDFLAGS} -Wl,-Bexport"
  2357. cat > conftest.$ac_ext <<EOF
  2358. #line 2653 "configure"
  2359. #include "confdefs.h"
  2360. int main() {
  2361. int i;
  2362. ; return 0; }
  2363. EOF
  2364. if { (eval echo configure:2660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2365. rm -rf conftest*
  2366. found=yes
  2367. else
  2368. echo "configure: failed program was:" >&5
  2369. cat conftest.$ac_ext >&5
  2370. rm -rf conftest*
  2371. found=no
  2372. fi
  2373. rm -f conftest*
  2374. LDFLAGS=$hold_ldflags
  2375. echo "$ac_t""$found" 1>&6
  2376. if test $found = yes; then
  2377. LDFLAGS="-Wl,-Bexport"
  2378. else
  2379. LDFLAGS=""
  2380. fi
  2381. CC_SEARCH_FLAGS=""
  2382. LD_SEARCH_FLAGS=""
  2383. ;;
  2384. esac
  2385. # If we're running gcc, then change the C flags for compiling shared
  2386. # libraries to the right flags for gcc, instead of those for the
  2387. # standard manufacturer compiler.
  2388. if test "$GCC" = "yes" ; then
  2389. case $system in
  2390. AIX-*)
  2391. ;;
  2392. BSD/OS*)
  2393. ;;
  2394. *)
  2395. ;;
  2396. NetBSD-*|FreeBSD-*)
  2397. ;;
  2398. Rhapsody-*|Darwin-*)
  2399. ;;
  2400. RISCos-*)
  2401. ;;
  2402. SCO_SV-3.2*)
  2403. ;;
  2404. ULTRIX-4.*)
  2405. ;;
  2406. *)
  2407. SHLIB_CFLAGS="-fPIC"
  2408. ;;
  2409. esac
  2410. fi
  2411. if test "$SHARED_LIB_SUFFIX" = "" ; then
  2412. SHARED_LIB_SUFFIX='${LIB_VER}${SHLIB_SUFFIX}'
  2413. fi
  2414. if test "$UNSHARED_LIB_SUFFIX" = "" ; then
  2415. UNSHARED_LIB_SUFFIX='${LIB_VER}.a'
  2416. fi
  2417. if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
  2418. LIB_SUFFIX=${SHARED_LIB_SUFFIX}
  2419. MAKE_LIB='${SHLIB_LD} -o $@ ${SHLIB_LD_FLAGS} ${OBJS} ${SHLIB_LD_LIBS} ${GRASS_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
  2420. INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
  2421. else
  2422. LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
  2423. if test "$RANLIB" = "" ; then
  2424. MAKE_LIB='$(STLIB_LD) $@ ${OBJS}'
  2425. INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
  2426. else
  2427. MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@'
  2428. INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))'
  2429. fi
  2430. fi
  2431. # Stub lib does not depend on shared/static configuration
  2432. if test "$RANLIB" = "" ; then
  2433. MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}'
  2434. INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)'
  2435. else
  2436. MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@'
  2437. INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
  2438. fi
  2439. LDFLAGS="${ac_save_ldflags} $LDFLAGS"
  2440. # Enable options
  2441. # Check whether --enable-w11 or --disable-w11 was given.
  2442. if test "${enable_w11+set}" = set; then
  2443. enableval="$enable_w11"
  2444. :
  2445. else
  2446. enable_w11=no
  2447. fi
  2448. # With options
  2449. # Check whether --with-cxx or --without-cxx was given.
  2450. if test "${with_cxx+set}" = set; then
  2451. withval="$with_cxx"
  2452. :
  2453. else
  2454. with_cxx=no
  2455. fi
  2456. #LOC_ARG_WITH(g77, GNU Fortran 77, no)
  2457. # Check whether --with-jpeg or --without-jpeg was given.
  2458. if test "${with_jpeg+set}" = set; then
  2459. withval="$with_jpeg"
  2460. :
  2461. else
  2462. with_jpeg=yes
  2463. fi
  2464. # Check whether --with-tiff or --without-tiff was given.
  2465. if test "${with_tiff+set}" = set; then
  2466. withval="$with_tiff"
  2467. :
  2468. else
  2469. with_tiff=yes
  2470. fi
  2471. # Check whether --with-png or --without-png was given.
  2472. if test "${with_png+set}" = set; then
  2473. withval="$with_png"
  2474. :
  2475. else
  2476. with_png=yes
  2477. fi
  2478. # Check whether --with-tcltk or --without-tcltk was given.
  2479. if test "${with_tcltk+set}" = set; then
  2480. withval="$with_tcltk"
  2481. :
  2482. else
  2483. with_tcltk=yes
  2484. fi
  2485. # Check whether --with-postgres or --without-postgres was given.
  2486. if test "${with_postgres+set}" = set; then
  2487. withval="$with_postgres"
  2488. :
  2489. else
  2490. with_postgres=no
  2491. fi
  2492. # Check whether --with-mysql or --without-mysql was given.
  2493. if test "${with_mysql+set}" = set; then
  2494. withval="$with_mysql"
  2495. :
  2496. else
  2497. with_mysql=no
  2498. fi
  2499. # Check whether --with-sqlite or --without-sqlite was given.
  2500. if test "${with_sqlite+set}" = set; then
  2501. withval="$with_sqlite"
  2502. :
  2503. else
  2504. with_sqlite=no
  2505. fi
  2506. # Check whether --with-ffmpeg or --without-ffmpeg was given.
  2507. if test "${with_ffmpeg+set}" = set; then
  2508. withval="$with_ffmpeg"
  2509. :
  2510. else
  2511. with_ffmpeg=no
  2512. fi
  2513. # Check whether --with-opengl or --without-opengl was given.
  2514. if test "${with_opengl+set}" = set; then
  2515. withval="$with_opengl"
  2516. :
  2517. else
  2518. with_opengl=yes
  2519. fi
  2520. # Check whether --with-odbc or --without-odbc was given.
  2521. if test "${with_odbc+set}" = set; then
  2522. withval="$with_odbc"
  2523. :
  2524. else
  2525. with_odbc=no
  2526. fi
  2527. # Check whether --with-fftw or --without-fftw was given.
  2528. if test "${with_fftw+set}" = set; then
  2529. withval="$with_fftw"
  2530. :
  2531. else
  2532. with_fftw=yes
  2533. fi
  2534. # Check whether --with-blas or --without-blas was given.
  2535. if test "${with_blas+set}" = set; then
  2536. withval="$with_blas"
  2537. :
  2538. else
  2539. with_blas=no
  2540. fi
  2541. # Check whether --with-lapack or --without-lapack was given.
  2542. if test "${with_lapack+set}" = set; then
  2543. withval="$with_lapack"
  2544. :
  2545. else
  2546. with_lapack=no
  2547. fi
  2548. # Check whether --with-cairo or --without-cairo was given.
  2549. if test "${with_cairo+set}" = set; then
  2550. withval="$with_cairo"
  2551. :
  2552. else
  2553. with_cairo=yes
  2554. fi
  2555. # Check whether --with-freetype or --without-freetype was given.
  2556. if test "${with_freetype+set}" = set; then
  2557. withval="$with_freetype"
  2558. :
  2559. else
  2560. with_freetype=yes
  2561. fi
  2562. # Check whether --with-nls or --without-nls was given.
  2563. if test "${with_nls+set}" = set; then
  2564. withval="$with_nls"
  2565. :
  2566. else
  2567. with_nls=no
  2568. fi
  2569. # Check whether --with-readline or --without-readline was given.
  2570. if test "${with_readline+set}" = set; then
  2571. withval="$with_readline"
  2572. :
  2573. else
  2574. with_readline=no
  2575. fi
  2576. # Check whether --with-opendwg or --without-opendwg was given.
  2577. if test "${with_opendwg+set}" = set; then
  2578. withval="$with_opendwg"
  2579. :
  2580. else
  2581. with_opendwg=no
  2582. fi
  2583. # Check whether --with-regex or --without-regex was given.
  2584. if test "${with_regex+set}" = set; then
  2585. withval="$with_regex"
  2586. :
  2587. else
  2588. with_regex=yes
  2589. fi
  2590. # Check whether --with-pthread or --without-pthread was given.
  2591. if test "${with_pthread+set}" = set; then
  2592. withval="$with_pthread"
  2593. :
  2594. else
  2595. with_pthread=no
  2596. fi
  2597. # Check whether --with-gdal or --without-gdal was given.
  2598. if test "${with_gdal+set}" = set; then
  2599. withval="$with_gdal"
  2600. :
  2601. fi
  2602. # Check whether --with-python or --without-python was given.
  2603. if test "${with_python+set}" = set; then
  2604. withval="$with_python"
  2605. :
  2606. else
  2607. with_python="no"
  2608. fi
  2609. # Check whether --with-wxwidgets or --without-wxwidgets was given.
  2610. if test "${with_wxwidgets+set}" = set; then
  2611. withval="$with_wxwidgets"
  2612. :
  2613. else
  2614. with_wxwidgets="no"
  2615. fi
  2616. # With includes and libs options
  2617. # Check whether --with-geos or --without-geos was given.
  2618. if test "${with_geos+set}" = set; then
  2619. withval="$with_geos"
  2620. :
  2621. else
  2622. with_geos="no"
  2623. fi
  2624. # Check whether --with-includes or --without-includes was given.
  2625. if test "${with_includes+set}" = set; then
  2626. withval="$with_includes"
  2627. :
  2628. fi
  2629. # Check whether --with-libs or --without-libs was given.
  2630. if test "${with_libs+set}" = set; then
  2631. withval="$with_libs"
  2632. :
  2633. fi
  2634. # Check whether --with-zlib-includes or --without-zlib-includes was given.
  2635. if test "${with_zlib_includes+set}" = set; then
  2636. withval="$with_zlib_includes"
  2637. :
  2638. fi
  2639. # Check whether --with-zlib-libs or --without-zlib-libs was given.
  2640. if test "${with_zlib_libs+set}" = set; then
  2641. withval="$with_zlib_libs"
  2642. :
  2643. fi
  2644. # Check whether --with-readline-includes or --without-readline-includes was given.
  2645. if test "${with_readline_includes+set}" = set; then
  2646. withval="$with_readline_includes"
  2647. :
  2648. fi
  2649. # Check whether --with-readline-libs or --without-readline-libs was given.
  2650. if test "${with_readline_libs+set}" = set; then
  2651. withval="$with_readline_libs"
  2652. :
  2653. fi
  2654. # Check whether --with-jpeg-includes or --without-jpeg-includes was given.
  2655. if test "${with_jpeg_includes+set}" = set; then
  2656. withval="$with_jpeg_includes"
  2657. :
  2658. fi
  2659. # Check whether --with-jpeg-libs or --without-jpeg-libs was given.
  2660. if test "${with_jpeg_libs+set}" = set; then
  2661. withval="$with_jpeg_libs"
  2662. :
  2663. fi
  2664. # Check whether --with-tiff-includes or --without-tiff-includes was given.
  2665. if test "${with_tiff_includes+set}" = set; then
  2666. withval="$with_tiff_includes"
  2667. :
  2668. fi
  2669. # Check whether --with-tiff-libs or --without-tiff-libs was given.
  2670. if test "${with_tiff_libs+set}" = set; then
  2671. withval="$with_tiff_libs"
  2672. :
  2673. fi
  2674. # Check whether --with-png-includes or --without-png-includes was given.
  2675. if test "${with_png_includes+set}" = set; then
  2676. withval="$with_png_includes"
  2677. :
  2678. fi
  2679. # Check whether --with-png-libs or --without-png-libs was given.
  2680. if test "${with_png_libs+set}" = set; then
  2681. withval="$with_png_libs"
  2682. :
  2683. fi
  2684. # Check whether --with-tcltk-includes or --without-tcltk-includes was given.
  2685. if test "${with_tcltk_includes+set}" = set; then
  2686. withval="$with_tcltk_includes"
  2687. :
  2688. fi
  2689. # Check whether --with-tcltk-libs or --without-tcltk-libs was given.
  2690. if test "${with_tcltk_libs+set}" = set; then
  2691. withval="$with_tcltk_libs"
  2692. :
  2693. fi
  2694. # Check whether --with-postgres-includes or --without-postgres-includes was given.
  2695. if test "${with_postgres_includes+set}" = set; then
  2696. withval="$with_postgres_includes"
  2697. :
  2698. fi
  2699. # Check whether --with-postgres-libs or --without-postgres-libs was given.
  2700. if test "${with_postgres_libs+set}" = set; then
  2701. withval="$with_postgres_libs"
  2702. :
  2703. fi
  2704. # Check whether --with-mysql-includes or --without-mysql-includes was given.
  2705. if test "${with_mysql_includes+set}" = set; then
  2706. withval="$with_mysql_includes"
  2707. :
  2708. fi
  2709. # Check whether --with-mysql-libs or --without-mysql-libs was given.
  2710. if test "${with_mysql_libs+set}" = set; then
  2711. withval="$with_mysql_libs"
  2712. :
  2713. fi
  2714. # Check whether --with-sqlite-includes or --without-sqlite-includes was given.
  2715. if test "${with_sqlite_includes+set}" = set; then
  2716. withval="$with_sqlite_includes"
  2717. :
  2718. fi
  2719. # Check whether --with-sqlite-libs or --without-sqlite-libs was given.
  2720. if test "${with_sqlite_libs+set}" = set; then
  2721. withval="$with_sqlite_libs"
  2722. :
  2723. fi
  2724. # Check whether --with-ffmpeg-includes or --without-ffmpeg-includes was given.
  2725. if test "${with_ffmpeg_includes+set}" = set; then
  2726. withval="$with_ffmpeg_includes"
  2727. :
  2728. fi
  2729. # Check whether --with-ffmpeg-libs or --without-ffmpeg-libs was given.
  2730. if test "${with_ffmpeg_libs+set}" = set; then
  2731. withval="$with_ffmpeg_libs"
  2732. :
  2733. fi
  2734. # Check whether --with-opengl-includes or --without-opengl-includes was given.
  2735. if test "${with_opengl_includes+set}" = set; then
  2736. withval="$with_opengl_includes"
  2737. :
  2738. fi
  2739. # Check whether --with-opengl-libs or --without-opengl-libs was given.
  2740. if test "${with_opengl_libs+set}" = set; then
  2741. withval="$with_opengl_libs"
  2742. :
  2743. fi
  2744. # Check whether --with-opengl-framework or --without-opengl-framework was given.
  2745. if test "${with_opengl_framework+set}" = set; then
  2746. withval="$with_opengl_framework"
  2747. :
  2748. fi
  2749. # Check whether --with-odbc-includes or --without-odbc-includes was given.
  2750. if test "${with_odbc_includes+set}" = set; then
  2751. withval="$with_odbc_includes"
  2752. :
  2753. fi
  2754. # Check whether --with-odbc-libs or --without-odbc-libs was given.
  2755. if test "${with_odbc_libs+set}" = set; then
  2756. withval="$with_odbc_libs"
  2757. :
  2758. fi
  2759. # Check whether --with-fftw-includes or --without-fftw-includes was given.
  2760. if test "${with_fftw_includes+set}" = set; then
  2761. withval="$with_fftw_includes"
  2762. :
  2763. fi
  2764. # Check whether --with-fftw-libs or --without-fftw-libs was given.
  2765. if test "${with_fftw_libs+set}" = set; then
  2766. withval="$with_fftw_libs"
  2767. :
  2768. fi
  2769. # Check whether --with-blas-includes or --without-blas-includes was given.
  2770. if test "${with_blas_includes+set}" = set; then
  2771. withval="$with_blas_includes"
  2772. :
  2773. fi
  2774. # Check whether --with-blas-libs or --without-blas-libs was given.
  2775. if test "${with_blas_libs+set}" = set; then
  2776. withval="$with_blas_libs"
  2777. :
  2778. fi
  2779. # Check whether --with-lapack-includes or --without-lapack-includes was given.
  2780. if test "${with_lapack_includes+set}" = set; then
  2781. withval="$with_lapack_includes"
  2782. :
  2783. fi
  2784. # Check whether --with-lapack-libs or --without-lapack-libs was given.
  2785. if test "${with_lapack_libs+set}" = set; then
  2786. withval="$with_lapack_libs"
  2787. :
  2788. fi
  2789. # Check whether --with-cairo-includes or --without-cairo-includes was given.
  2790. if test "${with_cairo_includes+set}" = set; then
  2791. withval="$with_cairo_includes"
  2792. :
  2793. fi
  2794. # Check whether --with-cairo-libs or --without-cairo-libs was given.
  2795. if test "${with_cairo_libs+set}" = set; then
  2796. withval="$with_cairo_libs"
  2797. :
  2798. fi
  2799. # Check whether --with-cairo-ldflags or --without-cairo-ldflags was given.
  2800. if test "${with_cairo_ldflags+set}" = set; then
  2801. withval="$with_cairo_ldflags"
  2802. :
  2803. fi
  2804. # Check whether --with-freetype-includes or --without-freetype-includes was given.
  2805. if test "${with_freetype_includes+set}" = set; then
  2806. withval="$with_freetype_includes"
  2807. :
  2808. fi
  2809. # Check whether --with-freetype-libs or --without-freetype-libs was given.
  2810. if test "${with_freetype_libs+set}" = set; then
  2811. withval="$with_freetype_libs"
  2812. :
  2813. fi
  2814. # Check whether --with-proj-includes or --without-proj-includes was given.
  2815. if test "${with_proj_includes+set}" = set; then
  2816. withval="$with_proj_includes"
  2817. :
  2818. fi
  2819. # Check whether --with-proj-libs or --without-proj-libs was given.
  2820. if test "${with_proj_libs+set}" = set; then
  2821. withval="$with_proj_libs"
  2822. :
  2823. fi
  2824. # Check whether --with-proj-share or --without-proj-share was given.
  2825. if test "${with_proj_share+set}" = set; then
  2826. withval="$with_proj_share"
  2827. :
  2828. fi
  2829. # Check whether --with-opendwg-includes or --without-opendwg-includes was given.
  2830. if test "${with_opendwg_includes+set}" = set; then
  2831. withval="$with_opendwg_includes"
  2832. :
  2833. fi
  2834. # Check whether --with-opendwg-libs or --without-opendwg-libs was given.
  2835. if test "${with_opendwg_libs+set}" = set; then
  2836. withval="$with_opendwg_libs"
  2837. :
  2838. fi
  2839. # Check whether --with-regex-includes or --without-regex-includes was given.
  2840. if test "${with_regex_includes+set}" = set; then
  2841. withval="$with_regex_includes"
  2842. :
  2843. fi
  2844. # Check whether --with-regex-libs or --without-regex-libs was given.
  2845. if test "${with_regex_libs+set}" = set; then
  2846. withval="$with_regex_libs"
  2847. :
  2848. fi
  2849. # Check whether --with-pthread-includes or --without-pthread-includes was given.
  2850. if test "${with_pthread_includes+set}" = set; then
  2851. withval="$with_pthread_includes"
  2852. :
  2853. fi
  2854. # Check whether --with-pthread-libs or --without-pthread-libs was given.
  2855. if test "${with_pthread_libs+set}" = set; then
  2856. withval="$with_pthread_libs"
  2857. :
  2858. fi
  2859. # Put this early on so CPPFLAGS and LDFLAGS have any additional dirs
  2860. # With includes option
  2861. # Handle Fortran compiler choice
  2862. #LOC_CHECK_USE(g77, GNU Fortran 77, USE_G77)
  2863. # Done checking fortran
  2864. echo $ac_n "checking for additional include dirs""... $ac_c" 1>&6
  2865. echo "configure:3439: checking for additional include dirs" >&5
  2866. case "$with_includes" in
  2867. y | ye | yes | n | no)
  2868. { echo "configure: error: *** You must supply a directory to list --with-includes." 1>&2; exit 1; }
  2869. ;;
  2870. esac
  2871. echo "$ac_t""$with_includes" 1>&6
  2872. if test -n "$with_includes"; then
  2873. for dir in $with_includes; do
  2874. if test -d "$dir"; then
  2875. INCLUDE_DIRS="$INCLUDE_DIRS -I$dir"
  2876. else
  2877. { echo "configure: error: *** Include directory $dir does not exist." 1>&2; exit 1; }
  2878. fi
  2879. done
  2880. CPPFLAGS="$CPPFLAGS $INCLUDE_DIRS"
  2881. fi
  2882. # With libs option
  2883. echo $ac_n "checking for additional library dirs""... $ac_c" 1>&6
  2884. echo "configure:3462: checking for additional library dirs" >&5
  2885. case "$with_libs" in
  2886. y | ye | yes | n | no)
  2887. { echo "configure: error: *** You must supply a directory list to --with-libs." 1>&2; exit 1; }
  2888. ;;
  2889. esac
  2890. echo "$ac_t""$with_libs" 1>&6
  2891. if test -n "$with_libs"; then
  2892. for dir in $with_libs; do
  2893. if test -d "$dir"; then
  2894. LIBRARY_DIRS="$LIBRARY_DIRS -L$dir"
  2895. else
  2896. { echo "configure: error: *** Library directory $dir does not exist." 1>&2; exit 1; }
  2897. fi
  2898. done
  2899. LDFLAGS="$LDFLAGS $LIBRARY_DIRS"
  2900. fi
  2901. # Programs and standard headers, libraries, functions
  2902. # Find a good install program. We prefer a C program (faster),
  2903. # so one script is as good as another. But avoid the broken or
  2904. # incompatible versions:
  2905. # SysV /etc/install, /usr/sbin/install
  2906. # SunOS /usr/etc/install
  2907. # IRIX /sbin/install
  2908. # AIX /bin/install
  2909. # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  2910. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  2911. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  2912. # ./install, which can be erroneously created by make from ./install.sh.
  2913. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  2914. echo "configure:3496: checking for a BSD compatible install" >&5
  2915. if test -z "$INSTALL"; then
  2916. IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
  2917. for ac_dir in $PATH; do
  2918. # Account for people who put trailing slashes in PATH elements.
  2919. case "$ac_dir/" in
  2920. /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  2921. *)
  2922. # OSF1 and SCO ODT 3.0 have their own names for install.
  2923. # Don't use installbsd from OSF since it installs stuff as root
  2924. # by default.
  2925. for ac_prog in ginstall scoinst install; do
  2926. if test -f $ac_dir/$ac_prog; then
  2927. if test $ac_prog = install &&
  2928. grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  2929. # AIX install. It has an incompatible calling convention.
  2930. :
  2931. else
  2932. ac_cv_path_install="$ac_dir/$ac_prog -c"
  2933. break 2
  2934. fi
  2935. fi
  2936. done
  2937. ;;
  2938. esac
  2939. done
  2940. IFS="$ac_save_IFS"
  2941. if test "${ac_cv_path_install+set}" = set; then
  2942. INSTALL="$ac_cv_path_install"
  2943. else
  2944. # As a last resort, use the slow shell script. We don't cache a
  2945. # path for INSTALL within a source directory, because that will
  2946. # break other packages using the cache if that directory is
  2947. # removed, or if the path is relative.
  2948. INSTALL="$ac_install_sh"
  2949. fi
  2950. fi
  2951. echo "$ac_t""$INSTALL" 1>&6
  2952. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  2953. # It thinks the first close brace ends the variable substitution.
  2954. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  2955. test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  2956. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  2957. # Extract the first word of "flex", so it can be a program name with args.
  2958. set dummy flex; ac_word=$2
  2959. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2960. echo "configure:3549: checking for $ac_word" >&5
  2961. if test -n "$LEX"; then
  2962. ac_cv_prog_LEX="$LEX" # Let the user override the test.
  2963. else
  2964. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2965. ac_dummy="$PATH"
  2966. for ac_dir in $ac_dummy; do
  2967. test -z "$ac_dir" && ac_dir=.
  2968. if test -f $ac_dir/$ac_word; then
  2969. ac_cv_prog_LEX="flex"
  2970. break
  2971. fi
  2972. done
  2973. IFS="$ac_save_ifs"
  2974. test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
  2975. fi
  2976. LEX="$ac_cv_prog_LEX"
  2977. if test -n "$LEX"; then
  2978. echo "$ac_t""$LEX" 1>&6
  2979. else
  2980. echo "$ac_t""no" 1>&6
  2981. fi
  2982. if test -z "$LEXLIB"
  2983. then
  2984. case "$LEX" in
  2985. flex*) ac_lib=fl ;;
  2986. *) ac_lib=l ;;
  2987. esac
  2988. echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
  2989. echo "configure:3580: checking for yywrap in -l$ac_lib" >&5
  2990. ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
  2991. ac_save_LIBS="$LIBS"
  2992. LIBS="-l$ac_lib $LIBS"
  2993. cat > conftest.$ac_ext <<EOF
  2994. #line 3586 "configure"
  2995. #include "confdefs.h"
  2996. /* Override any gcc2 internal prototype to avoid an error. */
  2997. /* We use char because int might match the return type of a gcc2
  2998. builtin and then its argument prototype would still apply. */
  2999. char yywrap();
  3000. int main() {
  3001. yywrap()
  3002. ; return 0; }
  3003. EOF
  3004. if { (eval echo configure:3597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3005. rm -rf conftest*
  3006. eval "ac_cv_lib_$ac_lib_var=yes"
  3007. else
  3008. echo "configure: failed program was:" >&5
  3009. cat conftest.$ac_ext >&5
  3010. rm -rf conftest*
  3011. eval "ac_cv_lib_$ac_lib_var=no"
  3012. fi
  3013. rm -f conftest*
  3014. LIBS="$ac_save_LIBS"
  3015. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3016. echo "$ac_t""yes" 1>&6
  3017. LEXLIB="-l$ac_lib"
  3018. else
  3019. echo "$ac_t""no" 1>&6
  3020. fi
  3021. fi
  3022. if test "$LEX" = "lex"; then
  3023. # Extract the first word of "lex", so it can be a program name with args.
  3024. set dummy lex; ac_word=$2
  3025. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3026. echo "configure:3622: checking for $ac_word" >&5
  3027. case "$LEXPATH" in
  3028. /*)
  3029. ac_cv_path_LEXPATH="$LEXPATH" # Let the user override the test with a path.
  3030. ;;
  3031. ?:/*)
  3032. ac_cv_path_LEXPATH="$LEXPATH" # Let the user override the test with a dos path.
  3033. ;;
  3034. *)
  3035. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  3036. ac_dummy="$PATH"
  3037. for ac_dir in $ac_dummy; do
  3038. test -z "$ac_dir" && ac_dir=.
  3039. if test -f $ac_dir/$ac_word; then
  3040. ac_cv_path_LEXPATH="$ac_dir/$ac_word"
  3041. break
  3042. fi
  3043. done
  3044. IFS="$ac_save_ifs"
  3045. test -z "$ac_cv_path_LEXPATH" && ac_cv_path_LEXPATH="no"
  3046. ;;
  3047. esac
  3048. LEXPATH="$ac_cv_path_LEXPATH"
  3049. if test -n "$LEXPATH"; then
  3050. echo "$ac_t""$LEXPATH" 1>&6
  3051. else
  3052. echo "$ac_t""no" 1>&6
  3053. fi
  3054. if test "$LEXPATH" = "no"; then
  3055. { echo "configure: error: *** Unable to locate lex." 1>&2; exit 1; }
  3056. fi
  3057. fi
  3058. for ac_prog in 'bison -y' byacc
  3059. do
  3060. # Extract the first word of "$ac_prog", so it can be a program name with args.
  3061. set dummy $ac_prog; ac_word=$2
  3062. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3063. echo "configure:3662: checking for $ac_word" >&5
  3064. if test -n "$YACC"; then
  3065. ac_cv_prog_YACC="$YACC" # Let the user override the test.
  3066. else
  3067. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  3068. ac_dummy="$PATH"
  3069. for ac_dir in $ac_dummy; do
  3070. test -z "$ac_dir" && ac_dir=.
  3071. if test -f $ac_dir/$ac_word; then
  3072. ac_cv_prog_YACC="$ac_prog"
  3073. break
  3074. fi
  3075. done
  3076. IFS="$ac_save_ifs"
  3077. fi
  3078. YACC="$ac_cv_prog_YACC"
  3079. if test -n "$YACC"; then
  3080. echo "$ac_t""$YACC" 1>&6
  3081. else
  3082. echo "$ac_t""no" 1>&6
  3083. fi
  3084. test -n "$YACC" && break
  3085. done
  3086. test -n "$YACC" || YACC="yacc"
  3087. if test "$YACC" = "yacc"; then
  3088. # Extract the first word of "yacc", so it can be a program name with args.
  3089. set dummy yacc; ac_word=$2
  3090. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3091. echo "configure:3693: checking for $ac_word" >&5
  3092. case "$YACCPATH" in
  3093. /*)
  3094. ac_cv_path_YACCPATH="$YACCPATH" # Let the user override the test with a path.
  3095. ;;
  3096. ?:/*)
  3097. ac_cv_path_YACCPATH="$YACCPATH" # Let the user override the test with a dos path.
  3098. ;;
  3099. *)
  3100. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  3101. ac_dummy="$PATH"
  3102. for ac_dir in $ac_dummy; do
  3103. test -z "$ac_dir" && ac_dir=.
  3104. if test -f $ac_dir/$ac_word; then
  3105. ac_cv_path_YACCPATH="$ac_dir/$ac_word"
  3106. break
  3107. fi
  3108. done
  3109. IFS="$ac_save_ifs"
  3110. test -z "$ac_cv_path_YACCPATH" && ac_cv_path_YACCPATH="no"
  3111. ;;
  3112. esac
  3113. YACCPATH="$ac_cv_path_YACCPATH"
  3114. if test -n "$YACCPATH"; then
  3115. echo "$ac_t""$YACCPATH" 1>&6
  3116. else
  3117. echo "$ac_t""no" 1>&6
  3118. fi
  3119. if test "$YACCPATH" = "no"; then
  3120. { echo "configure: error: *** Unable to locate yacc." 1>&2; exit 1; }
  3121. fi
  3122. fi
  3123. # Extract the first word of "ranlib", so it can be a program name with args.
  3124. set dummy ranlib; ac_word=$2
  3125. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3126. echo "configure:3731: checking for $ac_word" >&5
  3127. if test -n "$RANLIB"; then
  3128. ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  3129. else
  3130. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  3131. ac_dummy="$PATH"
  3132. for ac_dir in $ac_dummy; do
  3133. test -z "$ac_dir" && ac_dir=.
  3134. if test -f $ac_dir/$ac_word; then
  3135. ac_cv_prog_RANLIB="ranlib"
  3136. break
  3137. fi
  3138. done
  3139. IFS="$ac_save_ifs"
  3140. test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  3141. fi
  3142. RANLIB="$ac_cv_prog_RANLIB"
  3143. if test -n "$RANLIB"; then
  3144. echo "$ac_t""$RANLIB" 1>&6
  3145. else
  3146. echo "$ac_t""no" 1>&6
  3147. fi
  3148. for ac_prog in ar
  3149. do
  3150. # Extract the first word of "$ac_prog", so it can be a program name with args.
  3151. set dummy $ac_prog; ac_word=$2
  3152. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3153. echo "configure:3760: checking for $ac_word" >&5
  3154. if test -n "$AR"; then
  3155. ac_cv_prog_AR="$AR" # Let the user override the test.
  3156. else
  3157. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  3158. ac_dummy="$PATH"
  3159. for ac_dir in $ac_dummy; do
  3160. test -z "$ac_dir" && ac_dir=.
  3161. if test -f $ac_dir/$ac_word; then
  3162. ac_cv_prog_AR="$ac_prog"
  3163. break
  3164. fi
  3165. done
  3166. IFS="$ac_save_ifs"
  3167. fi
  3168. AR="$ac_cv_prog_AR"
  3169. if test -n "$AR"; then
  3170. echo "$ac_t""$AR" 1>&6
  3171. else
  3172. echo "$ac_t""no" 1>&6
  3173. fi
  3174. test -n "$AR" && break
  3175. done
  3176. for ac_prog in env
  3177. do
  3178. # Extract the first word of "$ac_prog", so it can be a program name with args.
  3179. set dummy $ac_prog; ac_word=$2
  3180. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3181. echo "configure:3791: checking for $ac_word" >&5
  3182. if test -n "$ENV"; then
  3183. ac_cv_prog_ENV="$ENV" # Let the user override the test.
  3184. else
  3185. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  3186. ac_dummy="$PATH"
  3187. for ac_dir in $ac_dummy; do
  3188. test -z "$ac_dir" && ac_dir=.
  3189. if test -f $ac_dir/$ac_word; then
  3190. ac_cv_prog_ENV="$ac_prog"
  3191. break
  3192. fi
  3193. done
  3194. IFS="$ac_save_ifs"
  3195. fi
  3196. ENV="$ac_cv_prog_ENV"
  3197. if test -n "$ENV"; then
  3198. echo "$ac_t""$ENV" 1>&6
  3199. else
  3200. echo "$ac_t""no" 1>&6
  3201. fi
  3202. test -n "$ENV" && break
  3203. done
  3204. # Extract the first word of "perl", so it can be a program name with args.
  3205. set dummy perl; ac_word=$2
  3206. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3207. echo "configure:3820: checking for $ac_word" >&5
  3208. case "$PERL" in
  3209. /*)
  3210. ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
  3211. ;;
  3212. ?:/*)
  3213. ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
  3214. ;;
  3215. *)
  3216. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  3217. ac_dummy="$PATH"
  3218. for ac_dir in $ac_dummy; do
  3219. test -z "$ac_dir" && ac_dir=.
  3220. if test -f $ac_dir/$ac_word; then
  3221. ac_cv_path_PERL="$ac_dir/$ac_word"
  3222. break
  3223. fi
  3224. done
  3225. IFS="$ac_save_ifs"
  3226. test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no"
  3227. ;;
  3228. esac
  3229. PERL="$ac_cv_path_PERL"
  3230. if test -n "$PERL"; then
  3231. echo "$ac_t""$PERL" 1>&6
  3232. else
  3233. echo "$ac_t""no" 1>&6
  3234. fi
  3235. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  3236. echo "configure:3851: checking for ANSI C header files" >&5
  3237. cat > conftest.$ac_ext <<EOF
  3238. #line 3854 "configure"
  3239. #include "confdefs.h"
  3240. #include <stdlib.h>
  3241. #include <stdarg.h>
  3242. #include <string.h>
  3243. #include <float.h>
  3244. EOF
  3245. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3246. { (eval echo configure:3862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3247. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3248. if test -z "$ac_err"; then
  3249. rm -rf conftest*
  3250. ac_cv_header_stdc=yes
  3251. else
  3252. echo "$ac_err" >&5
  3253. echo "configure: failed program was:" >&5
  3254. cat conftest.$ac_ext >&5
  3255. rm -rf conftest*
  3256. ac_cv_header_stdc=no
  3257. fi
  3258. rm -f conftest*
  3259. if test $ac_cv_header_stdc = yes; then
  3260. # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  3261. cat > conftest.$ac_ext <<EOF
  3262. #line 3879 "configure"
  3263. #include "confdefs.h"
  3264. #include <string.h>
  3265. EOF
  3266. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3267. egrep "memchr" >/dev/null 2>&1; then
  3268. :
  3269. else
  3270. rm -rf conftest*
  3271. ac_cv_header_stdc=no
  3272. fi
  3273. rm -f conftest*
  3274. fi
  3275. if test $ac_cv_header_stdc = yes; then
  3276. # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  3277. cat > conftest.$ac_ext <<EOF
  3278. #line 3897 "configure"
  3279. #include "confdefs.h"
  3280. #include <stdlib.h>
  3281. EOF
  3282. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3283. egrep "free" >/dev/null 2>&1; then
  3284. :
  3285. else
  3286. rm -rf conftest*
  3287. ac_cv_header_stdc=no
  3288. fi
  3289. rm -f conftest*
  3290. fi
  3291. if test $ac_cv_header_stdc = yes; then
  3292. # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  3293. if test "$cross_compiling" = yes; then
  3294. :
  3295. else
  3296. cat > conftest.$ac_ext <<EOF
  3297. #line 3918 "configure"
  3298. #include "confdefs.h"
  3299. #include <ctype.h>
  3300. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  3301. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  3302. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  3303. int main () { int i; for (i = 0; i < 256; i++)
  3304. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  3305. exit (0); }
  3306. EOF
  3307. if { (eval echo configure:3929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  3308. then
  3309. :
  3310. else
  3311. echo "configure: failed program was:" >&5
  3312. cat conftest.$ac_ext >&5
  3313. rm -fr conftest*
  3314. ac_cv_header_stdc=no
  3315. fi
  3316. rm -fr conftest*
  3317. fi
  3318. fi
  3319. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  3320. if test $ac_cv_header_stdc = yes; then
  3321. cat >> confdefs.h <<\EOF
  3322. #define STDC_HEADERS 1
  3323. EOF
  3324. fi
  3325. #AC_CHECK_HEADERS(curses.h limits.h termio.h termios.h unistd.h values.h)
  3326. for ac_hdr in limits.h termio.h termios.h unistd.h values.h f2c.h g2c.h
  3327. do
  3328. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  3329. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3330. echo "configure:3956: checking for $ac_hdr" >&5
  3331. cat > conftest.$ac_ext <<EOF
  3332. #line 3959 "configure"
  3333. #include "confdefs.h"
  3334. #include <$ac_hdr>
  3335. EOF
  3336. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3337. { (eval echo configure:3964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3338. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3339. if test -z "$ac_err"; then
  3340. rm -rf conftest*
  3341. eval "ac_cv_header_$ac_safe=yes"
  3342. else
  3343. echo "$ac_err" >&5
  3344. echo "configure: failed program was:" >&5
  3345. cat conftest.$ac_ext >&5
  3346. rm -rf conftest*
  3347. eval "ac_cv_header_$ac_safe=no"
  3348. fi
  3349. rm -f conftest*
  3350. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3351. echo "$ac_t""yes" 1>&6
  3352. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  3353. cat >> confdefs.h <<EOF
  3354. #define $ac_tr_hdr 1
  3355. EOF
  3356. else
  3357. echo "$ac_t""no" 1>&6
  3358. fi
  3359. done
  3360. for ac_hdr in sys/ioctl.h sys/mtio.h sys/resource.h sys/time.h
  3361. do
  3362. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  3363. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3364. echo "configure:3993: checking for $ac_hdr" >&5
  3365. cat > conftest.$ac_ext <<EOF
  3366. #line 3996 "configure"
  3367. #include "confdefs.h"
  3368. #include <$ac_hdr>
  3369. EOF
  3370. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3371. { (eval echo configure:4001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3372. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3373. if test -z "$ac_err"; then
  3374. rm -rf conftest*
  3375. eval "ac_cv_header_$ac_safe=yes"
  3376. else
  3377. echo "$ac_err" >&5
  3378. echo "configure: failed program was:" >&5
  3379. cat conftest.$ac_ext >&5
  3380. rm -rf conftest*
  3381. eval "ac_cv_header_$ac_safe=no"
  3382. fi
  3383. rm -f conftest*
  3384. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3385. echo "$ac_t""yes" 1>&6
  3386. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  3387. cat >> confdefs.h <<EOF
  3388. #define $ac_tr_hdr 1
  3389. EOF
  3390. else
  3391. echo "$ac_t""no" 1>&6
  3392. fi
  3393. done
  3394. for ac_hdr in sys/timeb.h sys/types.h sys/utsname.h
  3395. do
  3396. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  3397. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3398. echo "configure:4030: checking for $ac_hdr" >&5
  3399. cat > conftest.$ac_ext <<EOF
  3400. #line 4033 "configure"
  3401. #include "confdefs.h"
  3402. #include <$ac_hdr>
  3403. EOF
  3404. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3405. { (eval echo configure:4038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3406. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3407. if test -z "$ac_err"; then
  3408. rm -rf conftest*
  3409. eval "ac_cv_header_$ac_safe=yes"
  3410. else
  3411. echo "$ac_err" >&5
  3412. echo "configure: failed program was:" >&5
  3413. cat conftest.$ac_ext >&5
  3414. rm -rf conftest*
  3415. eval "ac_cv_header_$ac_safe=no"
  3416. fi
  3417. rm -f conftest*
  3418. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3419. echo "$ac_t""yes" 1>&6
  3420. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  3421. cat >> confdefs.h <<EOF
  3422. #define $ac_tr_hdr 1
  3423. EOF
  3424. else
  3425. echo "$ac_t""no" 1>&6
  3426. fi
  3427. done
  3428. for ac_hdr in libintl.h iconv.h
  3429. do
  3430. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  3431. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3432. echo "configure:4067: checking for $ac_hdr" >&5
  3433. cat > conftest.$ac_ext <<EOF
  3434. #line 4070 "configure"
  3435. #include "confdefs.h"
  3436. #include <$ac_hdr>
  3437. EOF
  3438. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3439. { (eval echo configure:4075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3440. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3441. if test -z "$ac_err"; then
  3442. rm -rf conftest*
  3443. eval "ac_cv_header_$ac_safe=yes"
  3444. else
  3445. echo "$ac_err" >&5
  3446. echo "configure: failed program was:" >&5
  3447. cat conftest.$ac_ext >&5
  3448. rm -rf conftest*
  3449. eval "ac_cv_header_$ac_safe=no"
  3450. fi
  3451. rm -f conftest*
  3452. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3453. echo "$ac_t""yes" 1>&6
  3454. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  3455. cat >> confdefs.h <<EOF
  3456. #define $ac_tr_hdr 1
  3457. EOF
  3458. else
  3459. echo "$ac_t""no" 1>&6
  3460. fi
  3461. done
  3462. for ac_hdr in langinfo.h
  3463. do
  3464. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  3465. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3466. echo "configure:4104: checking for $ac_hdr" >&5
  3467. cat > conftest.$ac_ext <<EOF
  3468. #line 4107 "configure"
  3469. #include "confdefs.h"
  3470. #include <$ac_hdr>
  3471. EOF
  3472. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3473. { (eval echo configure:4112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3474. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3475. if test -z "$ac_err"; then
  3476. rm -rf conftest*
  3477. eval "ac_cv_header_$ac_safe=yes"
  3478. else
  3479. echo "$ac_err" >&5
  3480. echo "configure: failed program was:" >&5
  3481. cat conftest.$ac_ext >&5
  3482. rm -rf conftest*
  3483. eval "ac_cv_header_$ac_safe=no"
  3484. fi
  3485. rm -f conftest*
  3486. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3487. echo "$ac_t""yes" 1>&6
  3488. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  3489. cat >> confdefs.h <<EOF
  3490. #define $ac_tr_hdr 1
  3491. EOF
  3492. else
  3493. echo "$ac_t""no" 1>&6
  3494. fi
  3495. done
  3496. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  3497. echo "configure:4138: checking whether time.h and sys/time.h may both be included" >&5
  3498. cat > conftest.$ac_ext <<EOF
  3499. #line 4141 "configure"
  3500. #include "confdefs.h"
  3501. #include <sys/types.h>
  3502. #include <sys/time.h>
  3503. #include <time.h>
  3504. int main() {
  3505. struct tm *tp;
  3506. ; return 0; }
  3507. EOF
  3508. if { (eval echo configure:4150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3509. rm -rf conftest*
  3510. ac_cv_header_time=yes
  3511. else
  3512. echo "configure: failed program was:" >&5
  3513. cat conftest.$ac_ext >&5
  3514. rm -rf conftest*
  3515. ac_cv_header_time=no
  3516. fi
  3517. rm -f conftest*
  3518. echo "$ac_t""$ac_cv_header_time" 1>&6
  3519. if test $ac_cv_header_time = yes; then
  3520. cat >> confdefs.h <<\EOF
  3521. #define TIME_WITH_SYS_TIME 1
  3522. EOF
  3523. fi
  3524. echo $ac_n "checking for off_t""... $ac_c" 1>&6
  3525. echo "configure:4170: checking for off_t" >&5
  3526. cat > conftest.$ac_ext <<EOF
  3527. #line 4173 "configure"
  3528. #include "confdefs.h"
  3529. #include <sys/types.h>
  3530. #if STDC_HEADERS
  3531. #include <stdlib.h>
  3532. #include <stddef.h>
  3533. #endif
  3534. EOF
  3535. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3536. egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  3537. rm -rf conftest*
  3538. ac_cv_type_off_t=yes
  3539. else
  3540. rm -rf conftest*
  3541. ac_cv_type_off_t=no
  3542. fi
  3543. rm -f conftest*
  3544. echo "$ac_t""$ac_cv_type_off_t" 1>&6
  3545. if test $ac_cv_type_off_t = no; then
  3546. cat >> confdefs.h <<\EOF
  3547. #define off_t long
  3548. EOF
  3549. fi
  3550. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  3551. echo "configure:4200: checking for uid_t in sys/types.h" >&5
  3552. cat > conftest.$ac_ext <<EOF
  3553. #line 4203 "configure"
  3554. #include "confdefs.h"
  3555. #include <sys/types.h>
  3556. EOF
  3557. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3558. egrep "uid_t" >/dev/null 2>&1; then
  3559. rm -rf conftest*
  3560. ac_cv_type_uid_t=yes
  3561. else
  3562. rm -rf conftest*
  3563. ac_cv_type_uid_t=no
  3564. fi
  3565. rm -f conftest*
  3566. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  3567. if test $ac_cv_type_uid_t = no; then
  3568. cat >> confdefs.h <<\EOF
  3569. #define uid_t int
  3570. EOF
  3571. cat >> confdefs.h <<\EOF
  3572. #define gid_t int
  3573. EOF
  3574. fi
  3575. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  3576. echo "configure:4231: checking return type of signal handlers" >&5
  3577. cat > conftest.$ac_ext <<EOF
  3578. #line 4234 "configure"
  3579. #include "confdefs.h"
  3580. #include <sys/types.h>
  3581. #include <signal.h>
  3582. #ifdef signal
  3583. #undef signal
  3584. #endif
  3585. #ifdef __cplusplus
  3586. extern "C" void (*signal (int, void (*)(int)))(int);
  3587. #else
  3588. void (*signal ()) ();
  3589. #endif
  3590. int main() {
  3591. int i;
  3592. ; return 0; }
  3593. EOF
  3594. if { (eval echo configure:4251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3595. rm -rf conftest*
  3596. ac_cv_type_signal=void
  3597. else
  3598. echo "configure: failed program was:" >&5
  3599. cat conftest.$ac_ext >&5
  3600. rm -rf conftest*
  3601. ac_cv_type_signal=int
  3602. fi
  3603. rm -f conftest*
  3604. echo "$ac_t""$ac_cv_type_signal" 1>&6
  3605. cat >> confdefs.h <<EOF
  3606. #define RETSIGTYPE $ac_cv_type_signal
  3607. EOF
  3608. echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
  3609. echo "configure:4269: checking for Cygwin environment" >&5
  3610. cat > conftest.$ac_ext <<EOF
  3611. #line 4272 "configure"
  3612. #include "confdefs.h"
  3613. int main() {
  3614. #ifndef __CYGWIN__
  3615. #define __CYGWIN__ __CYGWIN32__
  3616. #endif
  3617. return __CYGWIN__;
  3618. ; return 0; }
  3619. EOF
  3620. if { (eval echo configure:4283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3621. rm -rf conftest*
  3622. ac_cv_cygwin=yes
  3623. else
  3624. echo "configure: failed program was:" >&5
  3625. cat conftest.$ac_ext >&5
  3626. rm -rf conftest*
  3627. ac_cv_cygwin=no
  3628. fi
  3629. rm -f conftest*
  3630. rm -f conftest*
  3631. echo "$ac_t""$ac_cv_cygwin" 1>&6
  3632. CYGWIN=
  3633. test "$ac_cv_cygwin" = yes && CYGWIN=yes
  3634. for ac_func in ftime gethostname gettimeofday lseek nice time uname
  3635. do
  3636. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3637. echo "configure:4301: checking for $ac_func" >&5
  3638. cat > conftest.$ac_ext <<EOF
  3639. #line 4304 "configure"
  3640. #include "confdefs.h"
  3641. /* System header to define __stub macros and hopefully few prototypes,
  3642. which can conflict with char $ac_func(); below. */
  3643. #include <assert.h>
  3644. /* Override any gcc2 internal prototype to avoid an error. */
  3645. /* We use char because int might match the return type of a gcc2
  3646. builtin and then its argument prototype would still apply. */
  3647. char $ac_func();
  3648. int main() {
  3649. /* The GNU C library defines this for functions which it implements
  3650. to always fail with ENOSYS. Some functions are actually named
  3651. something starting with __ and the normal name is an alias. */
  3652. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3653. choke me
  3654. #else
  3655. $ac_func();
  3656. #endif
  3657. ; return 0; }
  3658. EOF
  3659. if { (eval echo configure:4327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3660. rm -rf conftest*
  3661. eval "ac_cv_func_$ac_func=yes"
  3662. else
  3663. echo "configure: failed program was:" >&5
  3664. cat conftest.$ac_ext >&5
  3665. rm -rf conftest*
  3666. eval "ac_cv_func_$ac_func=no"
  3667. fi
  3668. rm -f conftest*
  3669. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3670. echo "$ac_t""yes" 1>&6
  3671. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3672. cat >> confdefs.h <<EOF
  3673. #define $ac_tr_func 1
  3674. EOF
  3675. else
  3676. echo "$ac_t""no" 1>&6
  3677. fi
  3678. done
  3679. for ac_func in seteuid setpriority setreuid setruid
  3680. do
  3681. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3682. echo "configure:4353: checking for $ac_func" >&5
  3683. cat > conftest.$ac_ext <<EOF
  3684. #line 4356 "configure"
  3685. #include "confdefs.h"
  3686. /* System header to define __stub macros and hopefully few prototypes,
  3687. which can conflict with char $ac_func(); below. */
  3688. #include <assert.h>
  3689. /* Override any gcc2 internal prototype to avoid an error. */
  3690. /* We use char because int might match the return type of a gcc2
  3691. builtin and then its argument prototype would still apply. */
  3692. char $ac_func();
  3693. int main() {
  3694. /* The GNU C library defines this for functions which it implements
  3695. to always fail with ENOSYS. Some functions are actually named
  3696. something starting with __ and the normal name is an alias. */
  3697. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3698. choke me
  3699. #else
  3700. $ac_func();
  3701. #endif
  3702. ; return 0; }
  3703. EOF
  3704. if { (eval echo configure:4379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3705. rm -rf conftest*
  3706. eval "ac_cv_func_$ac_func=yes"
  3707. else
  3708. echo "configure: failed program was:" >&5
  3709. cat conftest.$ac_ext >&5
  3710. rm -rf conftest*
  3711. eval "ac_cv_func_$ac_func=no"
  3712. fi
  3713. rm -f conftest*
  3714. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3715. echo "$ac_t""yes" 1>&6
  3716. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3717. cat >> confdefs.h <<EOF
  3718. #define $ac_tr_func 1
  3719. EOF
  3720. else
  3721. echo "$ac_t""no" 1>&6
  3722. fi
  3723. done
  3724. for ac_func in drand48
  3725. do
  3726. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3727. echo "configure:4405: checking for $ac_func" >&5
  3728. cat > conftest.$ac_ext <<EOF
  3729. #line 4408 "configure"
  3730. #include "confdefs.h"
  3731. /* System header to define __stub macros and hopefully few prototypes,
  3732. which can conflict with char $ac_func(); below. */
  3733. #include <assert.h>
  3734. /* Override any gcc2 internal prototype to avoid an error. */
  3735. /* We use char because int might match the return type of a gcc2
  3736. builtin and then its argument prototype would still apply. */
  3737. char $ac_func();
  3738. int main() {
  3739. /* The GNU C library defines this for functions which it implements
  3740. to always fail with ENOSYS. Some functions are actually named
  3741. something starting with __ and the normal name is an alias. */
  3742. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3743. choke me
  3744. #else
  3745. $ac_func();
  3746. #endif
  3747. ; return 0; }
  3748. EOF
  3749. if { (eval echo configure:4431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3750. rm -rf conftest*
  3751. eval "ac_cv_func_$ac_func=yes"
  3752. else
  3753. echo "configure: failed program was:" >&5
  3754. cat conftest.$ac_ext >&5
  3755. rm -rf conftest*
  3756. eval "ac_cv_func_$ac_func=no"
  3757. fi
  3758. rm -f conftest*
  3759. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3760. echo "$ac_t""yes" 1>&6
  3761. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3762. cat >> confdefs.h <<EOF
  3763. #define $ac_tr_func 1
  3764. EOF
  3765. else
  3766. echo "$ac_t""no" 1>&6
  3767. fi
  3768. done
  3769. for ac_func in putenv setenv
  3770. do
  3771. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3772. echo "configure:4457: checking for $ac_func" >&5
  3773. cat > conftest.$ac_ext <<EOF
  3774. #line 4460 "configure"
  3775. #include "confdefs.h"
  3776. /* System header to define __stub macros and hopefully few prototypes,
  3777. which can conflict with char $ac_func(); below. */
  3778. #include <assert.h>
  3779. /* Override any gcc2 internal prototype to avoid an error. */
  3780. /* We use char because int might match the return type of a gcc2
  3781. builtin and then its argument prototype would still apply. */
  3782. char $ac_func();
  3783. int main() {
  3784. /* The GNU C library defines this for functions which it implements
  3785. to always fail with ENOSYS. Some functions are actually named
  3786. something starting with __ and the normal name is an alias. */
  3787. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3788. choke me
  3789. #else
  3790. $ac_func();
  3791. #endif
  3792. ; return 0; }
  3793. EOF
  3794. if { (eval echo configure:4483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3795. rm -rf conftest*
  3796. eval "ac_cv_func_$ac_func=yes"
  3797. else
  3798. echo "configure: failed program was:" >&5
  3799. cat conftest.$ac_ext >&5
  3800. rm -rf conftest*
  3801. eval "ac_cv_func_$ac_func=no"
  3802. fi
  3803. rm -f conftest*
  3804. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3805. echo "$ac_t""yes" 1>&6
  3806. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3807. cat >> confdefs.h <<EOF
  3808. #define $ac_tr_func 1
  3809. EOF
  3810. else
  3811. echo "$ac_t""no" 1>&6
  3812. fi
  3813. done
  3814. for ac_func in nanosleep
  3815. do
  3816. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3817. echo "configure:4509: checking for $ac_func" >&5
  3818. cat > conftest.$ac_ext <<EOF
  3819. #line 4512 "configure"
  3820. #include "confdefs.h"
  3821. /* System header to define __stub macros and hopefully few prototypes,
  3822. which can conflict with char $ac_func(); below. */
  3823. #include <assert.h>
  3824. /* Override any gcc2 internal prototype to avoid an error. */
  3825. /* We use char because int might match the return type of a gcc2
  3826. builtin and then its argument prototype would still apply. */
  3827. char $ac_func();
  3828. int main() {
  3829. /* The GNU C library defines this for functions which it implements
  3830. to always fail with ENOSYS. Some functions are actually named
  3831. something starting with __ and the normal name is an alias. */
  3832. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3833. choke me
  3834. #else
  3835. $ac_func();
  3836. #endif
  3837. ; return 0; }
  3838. EOF
  3839. if { (eval echo configure:4535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3840. rm -rf conftest*
  3841. eval "ac_cv_func_$ac_func=yes"
  3842. else
  3843. echo "configure: failed program was:" >&5
  3844. cat conftest.$ac_ext >&5
  3845. rm -rf conftest*
  3846. eval "ac_cv_func_$ac_func=no"
  3847. fi
  3848. rm -f conftest*
  3849. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3850. echo "$ac_t""yes" 1>&6
  3851. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3852. cat >> confdefs.h <<EOF
  3853. #define $ac_tr_func 1
  3854. EOF
  3855. else
  3856. echo "$ac_t""no" 1>&6
  3857. fi
  3858. done
  3859. if test "$cross_compiling" != "yes" ; then
  3860. echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
  3861. echo "configure:4560: checking whether setpgrp takes no argument" >&5
  3862. if test "$cross_compiling" = yes; then
  3863. { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
  3864. else
  3865. cat > conftest.$ac_ext <<EOF
  3866. #line 4566 "configure"
  3867. #include "confdefs.h"
  3868. #ifdef HAVE_UNISTD_H
  3869. #include <unistd.h>
  3870. #endif
  3871. /*
  3872. * If this system has a BSD-style setpgrp, which takes arguments, exit
  3873. * successfully.
  3874. */
  3875. main()
  3876. {
  3877. if (setpgrp(1,1) == -1)
  3878. exit(0);
  3879. else
  3880. exit(1);
  3881. }
  3882. EOF
  3883. if { (eval echo configure:4586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  3884. then
  3885. ac_cv_func_setpgrp_void=no
  3886. else
  3887. echo "configure: failed program was:" >&5
  3888. cat conftest.$ac_ext >&5
  3889. rm -fr conftest*
  3890. ac_cv_func_setpgrp_void=yes
  3891. fi
  3892. rm -fr conftest*
  3893. fi
  3894. echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
  3895. if test $ac_cv_func_setpgrp_void = yes; then
  3896. cat >> confdefs.h <<\EOF
  3897. #define SETPGRP_VOID 1
  3898. EOF
  3899. fi
  3900. else
  3901. CROSS_COMPILING=1
  3902. fi
  3903. echo $ac_n "checking for long long int""... $ac_c" 1>&6
  3904. echo "configure:4614: checking for long long int" >&5
  3905. cat > conftest.$ac_ext <<EOF
  3906. #line 4616 "configure"
  3907. #include "confdefs.h"
  3908. int main() {
  3909. long long int x;
  3910. ; return 0; }
  3911. EOF
  3912. if { (eval echo configure:4623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3913. rm -rf conftest*
  3914. echo "$ac_t""yes" 1>&6
  3915. cat >> confdefs.h <<\EOF
  3916. #define HAVE_LONG_LONG_INT 1
  3917. EOF
  3918. else
  3919. echo "configure: failed program was:" >&5
  3920. cat conftest.$ac_ext >&5
  3921. rm -rf conftest*
  3922. echo "$ac_t""no" 1>&6
  3923. fi
  3924. rm -f conftest*
  3925. echo $ac_n "checking for W11""... $ac_c" 1>&6
  3926. echo "configure:4643: checking for W11" >&5
  3927. case "$enable_w11" in
  3928. yes|no) echo "$ac_t"""$enable_w11"" 1>&6 ;;
  3929. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  3930. esac
  3931. USE_X11=
  3932. USE_W11=
  3933. XLIB=
  3934. XTLIB=
  3935. if test "$enable_w11" = "yes" ; then
  3936. X_CFLAGS=-I${SRCDIR}/display/drivers/windows/libW11
  3937. X_LIBS='-L$(LIBDIR)'
  3938. USE_W11="1"
  3939. USE_X11="1"
  3940. XLIB=-lX11
  3941. CFLAGS="$CFLAGS -D__W98__"
  3942. else
  3943. # If we find X, set shell vars x_includes and x_libraries to the
  3944. # paths, otherwise set no_x=yes.
  3945. # Uses ac_ vars as temps to allow command line to override cache and checks.
  3946. # --without-x overrides everything else, but does not touch the cache.
  3947. echo $ac_n "checking for X""... $ac_c" 1>&6
  3948. echo "configure:4671: checking for X" >&5
  3949. # Check whether --with-x or --without-x was given.
  3950. if test "${with_x+set}" = set; then
  3951. withval="$with_x"
  3952. :
  3953. fi
  3954. # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
  3955. if test "x$with_x" = xno; then
  3956. # The user explicitly disabled X.
  3957. have_x=disabled
  3958. else
  3959. if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  3960. # Both variables are already set.
  3961. have_x=yes
  3962. else
  3963. # One or both of the vars are not set, and there is no cached value.
  3964. ac_x_includes=NO ac_x_libraries=NO
  3965. rm -fr conftestdir
  3966. if mkdir conftestdir; then
  3967. cd conftestdir
  3968. # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  3969. cat > Imakefile <<'EOF'
  3970. acfindx:
  3971. @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  3972. EOF
  3973. if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  3974. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  3975. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  3976. # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  3977. for ac_extension in a so sl; do
  3978. if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  3979. test -f $ac_im_libdir/libX11.$ac_extension; then
  3980. ac_im_usrlibdir=$ac_im_libdir; break
  3981. fi
  3982. done
  3983. # Screen out bogus values from the imake configuration. They are
  3984. # bogus both because they are the default anyway, and because
  3985. # using them would break gcc on systems where it needs fixed includes.
  3986. case "$ac_im_incroot" in
  3987. /usr/include) ;;
  3988. *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  3989. esac
  3990. case "$ac_im_usrlibdir" in
  3991. /usr/lib | /lib) ;;
  3992. *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  3993. esac
  3994. fi
  3995. cd ..
  3996. rm -fr conftestdir
  3997. fi
  3998. if test "$ac_x_includes" = NO; then
  3999. # Guess where to find include files, by looking for this one X11 .h file.
  4000. test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  4001. # First, try using that file with no special directory specified.
  4002. cat > conftest.$ac_ext <<EOF
  4003. #line 4731 "configure"
  4004. #include "confdefs.h"
  4005. #include <$x_direct_test_include>
  4006. EOF
  4007. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4008. { (eval echo configure:4736: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4009. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4010. if test -z "$ac_err"; then
  4011. rm -rf conftest*
  4012. # We can compile using X headers with no special include directory.
  4013. ac_x_includes=
  4014. else
  4015. echo "$ac_err" >&5
  4016. echo "configure: failed program was:" >&5
  4017. cat conftest.$ac_ext >&5
  4018. rm -rf conftest*
  4019. # Look for the header file in a standard set of common directories.
  4020. # Check X11 before X11Rn because it is often a symlink to the current release.
  4021. for ac_dir in \
  4022. /usr/X11/include \
  4023. /usr/X11R6/include \
  4024. /usr/X11R5/include \
  4025. /usr/X11R4/include \
  4026. \
  4027. /usr/include/X11 \
  4028. /usr/include/X11R6 \
  4029. /usr/include/X11R5 \
  4030. /usr/include/X11R4 \
  4031. \
  4032. /usr/local/X11/include \
  4033. /usr/local/X11R6/include \
  4034. /usr/local/X11R5/include \
  4035. /usr/local/X11R4/include \
  4036. \
  4037. /usr/local/include/X11 \
  4038. /usr/local/include/X11R6 \
  4039. /usr/local/include/X11R5 \
  4040. /usr/local/include/X11R4 \
  4041. \
  4042. /usr/X386/include \
  4043. /usr/x386/include \
  4044. /usr/XFree86/include/X11 \
  4045. \
  4046. /usr/include \
  4047. /usr/local/include \
  4048. /usr/unsupported/include \
  4049. /usr/athena/include \
  4050. /usr/local/x11r5/include \
  4051. /usr/lpp/Xamples/include \
  4052. \
  4053. /usr/openwin/include \
  4054. /usr/openwin/share/include \
  4055. ; \
  4056. do
  4057. if test -r "$ac_dir/$x_direct_test_include"; then
  4058. ac_x_includes=$ac_dir
  4059. break
  4060. fi
  4061. done
  4062. fi
  4063. rm -f conftest*
  4064. fi # $ac_x_includes = NO
  4065. if test "$ac_x_libraries" = NO; then
  4066. # Check for the libraries.
  4067. test -z "$x_direct_test_library" && x_direct_test_library=Xt
  4068. test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  4069. # See if we find them without any special options.
  4070. # Don't add to $LIBS permanently.
  4071. ac_save_LIBS="$LIBS"
  4072. LIBS="-l$x_direct_test_library $LIBS"
  4073. cat > conftest.$ac_ext <<EOF
  4074. #line 4805 "configure"
  4075. #include "confdefs.h"
  4076. int main() {
  4077. ${x_direct_test_function}()
  4078. ; return 0; }
  4079. EOF
  4080. if { (eval echo configure:4812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4081. rm -rf conftest*
  4082. LIBS="$ac_save_LIBS"
  4083. # We can link X programs with no special library path.
  4084. ac_x_libraries=
  4085. else
  4086. echo "configure: failed program was:" >&5
  4087. cat conftest.$ac_ext >&5
  4088. rm -rf conftest*
  4089. LIBS="$ac_save_LIBS"
  4090. # First see if replacing the include by lib works.
  4091. # Check X11 before X11Rn because it is often a symlink to the current release.
  4092. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  4093. /usr/X11/lib \
  4094. /usr/X11R6/lib \
  4095. /usr/X11R5/lib \
  4096. /usr/X11R4/lib \
  4097. \
  4098. /usr/lib/X11 \
  4099. /usr/lib/X11R6 \
  4100. /usr/lib/X11R5 \
  4101. /usr/lib/X11R4 \
  4102. \
  4103. /usr/local/X11/lib \
  4104. /usr/local/X11R6/lib \
  4105. /usr/local/X11R5/lib \
  4106. /usr/local/X11R4/lib \
  4107. \
  4108. /usr/local/lib/X11 \
  4109. /usr/local/lib/X11R6 \
  4110. /usr/local/lib/X11R5 \
  4111. /usr/local/lib/X11R4 \
  4112. \
  4113. /usr/X386/lib \
  4114. /usr/x386/lib \
  4115. /usr/XFree86/lib/X11 \
  4116. \
  4117. /usr/lib \
  4118. /usr/local/lib \
  4119. /usr/unsupported/lib \
  4120. /usr/athena/lib \
  4121. /usr/local/x11r5/lib \
  4122. /usr/lpp/Xamples/lib \
  4123. /lib/usr/lib/X11 \
  4124. \
  4125. /usr/openwin/lib \
  4126. /usr/openwin/share/lib \
  4127. ; \
  4128. do
  4129. for ac_extension in a so sl; do
  4130. if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  4131. ac_x_libraries=$ac_dir
  4132. break 2
  4133. fi
  4134. done
  4135. done
  4136. fi
  4137. rm -f conftest*
  4138. fi # $ac_x_libraries = NO
  4139. if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  4140. # Didn't find X anywhere. Cache the known absence of X.
  4141. ac_cv_have_x="have_x=no"
  4142. else
  4143. # Record where we found X for the cache.
  4144. ac_cv_have_x="have_x=yes \
  4145. ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  4146. fi
  4147. fi
  4148. eval "$ac_cv_have_x"
  4149. fi # $with_x != no
  4150. if test "$have_x" != yes; then
  4151. echo "$ac_t""$have_x" 1>&6
  4152. no_x=yes
  4153. else
  4154. # If each of the values was on the command line, it overrides each guess.
  4155. test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  4156. test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  4157. # Update the cache value to reflect the command line values.
  4158. ac_cv_have_x="have_x=yes \
  4159. ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  4160. echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  4161. fi
  4162. if test "$no_x" = yes; then
  4163. # Not all programs may use this symbol, but it does not hurt to define it.
  4164. cat >> confdefs.h <<\EOF
  4165. #define X_DISPLAY_MISSING 1
  4166. EOF
  4167. X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
  4168. else
  4169. if test -n "$x_includes"; then
  4170. X_CFLAGS="$X_CFLAGS -I$x_includes"
  4171. fi
  4172. # It would also be nice to do this for all -L options, not just this one.
  4173. if test -n "$x_libraries"; then
  4174. X_LIBS="$X_LIBS -L$x_libraries"
  4175. # For Solaris; some versions of Sun CC require a space after -R and
  4176. # others require no space. Words are not sufficient . . . .
  4177. case "`(uname -sr) 2>/dev/null`" in
  4178. "SunOS 5"*)
  4179. echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
  4180. echo "configure:4917: checking whether -R must be followed by a space" >&5
  4181. ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
  4182. cat > conftest.$ac_ext <<EOF
  4183. #line 4920 "configure"
  4184. #include "confdefs.h"
  4185. int main() {
  4186. ; return 0; }
  4187. EOF
  4188. if { (eval echo configure:4927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4189. rm -rf conftest*
  4190. ac_R_nospace=yes
  4191. else
  4192. echo "configure: failed program was:" >&5
  4193. cat conftest.$ac_ext >&5
  4194. rm -rf conftest*
  4195. ac_R_nospace=no
  4196. fi
  4197. rm -f conftest*
  4198. if test $ac_R_nospace = yes; then
  4199. echo "$ac_t""no" 1>&6
  4200. X_LIBS="$X_LIBS -R$x_libraries"
  4201. else
  4202. LIBS="$ac_xsave_LIBS -R $x_libraries"
  4203. cat > conftest.$ac_ext <<EOF
  4204. #line 4943 "configure"
  4205. #include "confdefs.h"
  4206. int main() {
  4207. ; return 0; }
  4208. EOF
  4209. if { (eval echo configure:4950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4210. rm -rf conftest*
  4211. ac_R_space=yes
  4212. else
  4213. echo "configure: failed program was:" >&5
  4214. cat conftest.$ac_ext >&5
  4215. rm -rf conftest*
  4216. ac_R_space=no
  4217. fi
  4218. rm -f conftest*
  4219. if test $ac_R_space = yes; then
  4220. echo "$ac_t""yes" 1>&6
  4221. X_LIBS="$X_LIBS -R $x_libraries"
  4222. else
  4223. echo "$ac_t""neither works" 1>&6
  4224. fi
  4225. fi
  4226. LIBS="$ac_xsave_LIBS"
  4227. esac
  4228. fi
  4229. # Check for system-dependent libraries X programs must link with.
  4230. # Do this before checking for the system-independent R6 libraries
  4231. # (-lICE), since we may need -lsocket or whatever for X linking.
  4232. if test "$ISC" = yes; then
  4233. X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  4234. else
  4235. # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
  4236. # libraries were built with DECnet support. And karl@cs.umb.edu says
  4237. # the Alpha needs dnet_stub (dnet does not exist).
  4238. echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
  4239. echo "configure:4982: checking for dnet_ntoa in -ldnet" >&5
  4240. ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  4241. ac_save_LIBS="$LIBS"
  4242. LIBS="-ldnet $LIBS"
  4243. cat > conftest.$ac_ext <<EOF
  4244. #line 4988 "configure"
  4245. #include "confdefs.h"
  4246. /* Override any gcc2 internal prototype to avoid an error. */
  4247. /* We use char because int might match the return type of a gcc2
  4248. builtin and then its argument prototype would still apply. */
  4249. char dnet_ntoa();
  4250. int main() {
  4251. dnet_ntoa()
  4252. ; return 0; }
  4253. EOF
  4254. if { (eval echo configure:4999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4255. rm -rf conftest*
  4256. eval "ac_cv_lib_$ac_lib_var=yes"
  4257. else
  4258. echo "configure: failed program was:" >&5
  4259. cat conftest.$ac_ext >&5
  4260. rm -rf conftest*
  4261. eval "ac_cv_lib_$ac_lib_var=no"
  4262. fi
  4263. rm -f conftest*
  4264. LIBS="$ac_save_LIBS"
  4265. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4266. echo "$ac_t""yes" 1>&6
  4267. X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  4268. else
  4269. echo "$ac_t""no" 1>&6
  4270. fi
  4271. if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  4272. echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
  4273. echo "configure:5020: checking for dnet_ntoa in -ldnet_stub" >&5
  4274. ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  4275. ac_save_LIBS="$LIBS"
  4276. LIBS="-ldnet_stub $LIBS"
  4277. cat > conftest.$ac_ext <<EOF
  4278. #line 5026 "configure"
  4279. #include "confdefs.h"
  4280. /* Override any gcc2 internal prototype to avoid an error. */
  4281. /* We use char because int might match the return type of a gcc2
  4282. builtin and then its argument prototype would still apply. */
  4283. char dnet_ntoa();
  4284. int main() {
  4285. dnet_ntoa()
  4286. ; return 0; }
  4287. EOF
  4288. if { (eval echo configure:5037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4289. rm -rf conftest*
  4290. eval "ac_cv_lib_$ac_lib_var=yes"
  4291. else
  4292. echo "configure: failed program was:" >&5
  4293. cat conftest.$ac_ext >&5
  4294. rm -rf conftest*
  4295. eval "ac_cv_lib_$ac_lib_var=no"
  4296. fi
  4297. rm -f conftest*
  4298. LIBS="$ac_save_LIBS"
  4299. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4300. echo "$ac_t""yes" 1>&6
  4301. X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  4302. else
  4303. echo "$ac_t""no" 1>&6
  4304. fi
  4305. fi
  4306. # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
  4307. # to get the SysV transport functions.
  4308. # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
  4309. # needs -lnsl.
  4310. # The nsl library prevents programs from opening the X display
  4311. # on Irix 5.2, according to dickey@clark.net.
  4312. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  4313. echo "configure:5065: checking for gethostbyname" >&5
  4314. cat > conftest.$ac_ext <<EOF
  4315. #line 5068 "configure"
  4316. #include "confdefs.h"
  4317. /* System header to define __stub macros and hopefully few prototypes,
  4318. which can conflict with char gethostbyname(); below. */
  4319. #include <assert.h>
  4320. /* Override any gcc2 internal prototype to avoid an error. */
  4321. /* We use char because int might match the return type of a gcc2
  4322. builtin and then its argument prototype would still apply. */
  4323. char gethostbyname();
  4324. int main() {
  4325. /* The GNU C library defines this for functions which it implements
  4326. to always fail with ENOSYS. Some functions are actually named
  4327. something starting with __ and the normal name is an alias. */
  4328. #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  4329. choke me
  4330. #else
  4331. gethostbyname();
  4332. #endif
  4333. ; return 0; }
  4334. EOF
  4335. if { (eval echo configure:5091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4336. rm -rf conftest*
  4337. eval "ac_cv_func_gethostbyname=yes"
  4338. else
  4339. echo "configure: failed program was:" >&5
  4340. cat conftest.$ac_ext >&5
  4341. rm -rf conftest*
  4342. eval "ac_cv_func_gethostbyname=no"
  4343. fi
  4344. rm -f conftest*
  4345. if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  4346. echo "$ac_t""yes" 1>&6
  4347. :
  4348. else
  4349. echo "$ac_t""no" 1>&6
  4350. fi
  4351. if test $ac_cv_func_gethostbyname = no; then
  4352. echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
  4353. echo "configure:5111: checking for gethostbyname in -lnsl" >&5
  4354. ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
  4355. ac_save_LIBS="$LIBS"
  4356. LIBS="-lnsl $LIBS"
  4357. cat > conftest.$ac_ext <<EOF
  4358. #line 5117 "configure"
  4359. #include "confdefs.h"
  4360. /* Override any gcc2 internal prototype to avoid an error. */
  4361. /* We use char because int might match the return type of a gcc2
  4362. builtin and then its argument prototype would still apply. */
  4363. char gethostbyname();
  4364. int main() {
  4365. gethostbyname()
  4366. ; return 0; }
  4367. EOF
  4368. if { (eval echo configure:5128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4369. rm -rf conftest*
  4370. eval "ac_cv_lib_$ac_lib_var=yes"
  4371. else
  4372. echo "configure: failed program was:" >&5
  4373. cat conftest.$ac_ext >&5
  4374. rm -rf conftest*
  4375. eval "ac_cv_lib_$ac_lib_var=no"
  4376. fi
  4377. rm -f conftest*
  4378. LIBS="$ac_save_LIBS"
  4379. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4380. echo "$ac_t""yes" 1>&6
  4381. X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  4382. else
  4383. echo "$ac_t""no" 1>&6
  4384. fi
  4385. fi
  4386. # lieder@skyler.mavd.honeywell.com says without -lsocket,
  4387. # socket/setsockopt and other routines are undefined under SCO ODT
  4388. # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
  4389. # on later versions), says simon@lia.di.epfl.ch: it contains
  4390. # gethostby* variants that don't use the nameserver (or something).
  4391. # -lsocket must be given before -lnsl if both are needed.
  4392. # We assume that if connect needs -lnsl, so does gethostbyname.
  4393. echo $ac_n "checking for connect""... $ac_c" 1>&6
  4394. echo "configure:5157: checking for connect" >&5
  4395. cat > conftest.$ac_ext <<EOF
  4396. #line 5160 "configure"
  4397. #include "confdefs.h"
  4398. /* System header to define __stub macros and hopefully few prototypes,
  4399. which can conflict with char connect(); below. */
  4400. #include <assert.h>
  4401. /* Override any gcc2 internal prototype to avoid an error. */
  4402. /* We use char because int might match the return type of a gcc2
  4403. builtin and then its argument prototype would still apply. */
  4404. char connect();
  4405. int main() {
  4406. /* The GNU C library defines this for functions which it implements
  4407. to always fail with ENOSYS. Some functions are actually named
  4408. something starting with __ and the normal name is an alias. */
  4409. #if defined (__stub_connect) || defined (__stub___connect)
  4410. choke me
  4411. #else
  4412. connect();
  4413. #endif
  4414. ; return 0; }
  4415. EOF
  4416. if { (eval echo configure:5183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4417. rm -rf conftest*
  4418. eval "ac_cv_func_connect=yes"
  4419. else
  4420. echo "configure: failed program was:" >&5
  4421. cat conftest.$ac_ext >&5
  4422. rm -rf conftest*
  4423. eval "ac_cv_func_connect=no"
  4424. fi
  4425. rm -f conftest*
  4426. if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  4427. echo "$ac_t""yes" 1>&6
  4428. :
  4429. else
  4430. echo "$ac_t""no" 1>&6
  4431. fi
  4432. if test $ac_cv_func_connect = no; then
  4433. echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
  4434. echo "configure:5203: checking for connect in -lsocket" >&5
  4435. ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
  4436. ac_save_LIBS="$LIBS"
  4437. LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
  4438. cat > conftest.$ac_ext <<EOF
  4439. #line 5209 "configure"
  4440. #include "confdefs.h"
  4441. /* Override any gcc2 internal prototype to avoid an error. */
  4442. /* We use char because int might match the return type of a gcc2
  4443. builtin and then its argument prototype would still apply. */
  4444. char connect();
  4445. int main() {
  4446. connect()
  4447. ; return 0; }
  4448. EOF
  4449. if { (eval echo configure:5220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4450. rm -rf conftest*
  4451. eval "ac_cv_lib_$ac_lib_var=yes"
  4452. else
  4453. echo "configure: failed program was:" >&5
  4454. cat conftest.$ac_ext >&5
  4455. rm -rf conftest*
  4456. eval "ac_cv_lib_$ac_lib_var=no"
  4457. fi
  4458. rm -f conftest*
  4459. LIBS="$ac_save_LIBS"
  4460. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4461. echo "$ac_t""yes" 1>&6
  4462. X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
  4463. else
  4464. echo "$ac_t""no" 1>&6
  4465. fi
  4466. fi
  4467. # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
  4468. echo $ac_n "checking for remove""... $ac_c" 1>&6
  4469. echo "configure:5243: checking for remove" >&5
  4470. cat > conftest.$ac_ext <<EOF
  4471. #line 5246 "configure"
  4472. #include "confdefs.h"
  4473. /* System header to define __stub macros and hopefully few prototypes,
  4474. which can conflict with char remove(); below. */
  4475. #include <assert.h>
  4476. /* Override any gcc2 internal prototype to avoid an error. */
  4477. /* We use char because int might match the return type of a gcc2
  4478. builtin and then its argument prototype would still apply. */
  4479. char remove();
  4480. int main() {
  4481. /* The GNU C library defines this for functions which it implements
  4482. to always fail with ENOSYS. Some functions are actually named
  4483. something starting with __ and the normal name is an alias. */
  4484. #if defined (__stub_remove) || defined (__stub___remove)
  4485. choke me
  4486. #else
  4487. remove();
  4488. #endif
  4489. ; return 0; }
  4490. EOF
  4491. if { (eval echo configure:5269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4492. rm -rf conftest*
  4493. eval "ac_cv_func_remove=yes"
  4494. else
  4495. echo "configure: failed program was:" >&5
  4496. cat conftest.$ac_ext >&5
  4497. rm -rf conftest*
  4498. eval "ac_cv_func_remove=no"
  4499. fi
  4500. rm -f conftest*
  4501. if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  4502. echo "$ac_t""yes" 1>&6
  4503. :
  4504. else
  4505. echo "$ac_t""no" 1>&6
  4506. fi
  4507. if test $ac_cv_func_remove = no; then
  4508. echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
  4509. echo "configure:5289: checking for remove in -lposix" >&5
  4510. ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
  4511. ac_save_LIBS="$LIBS"
  4512. LIBS="-lposix $LIBS"
  4513. cat > conftest.$ac_ext <<EOF
  4514. #line 5295 "configure"
  4515. #include "confdefs.h"
  4516. /* Override any gcc2 internal prototype to avoid an error. */
  4517. /* We use char because int might match the return type of a gcc2
  4518. builtin and then its argument prototype would still apply. */
  4519. char remove();
  4520. int main() {
  4521. remove()
  4522. ; return 0; }
  4523. EOF
  4524. if { (eval echo configure:5306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4525. rm -rf conftest*
  4526. eval "ac_cv_lib_$ac_lib_var=yes"
  4527. else
  4528. echo "configure: failed program was:" >&5
  4529. cat conftest.$ac_ext >&5
  4530. rm -rf conftest*
  4531. eval "ac_cv_lib_$ac_lib_var=no"
  4532. fi
  4533. rm -f conftest*
  4534. LIBS="$ac_save_LIBS"
  4535. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4536. echo "$ac_t""yes" 1>&6
  4537. X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
  4538. else
  4539. echo "$ac_t""no" 1>&6
  4540. fi
  4541. fi
  4542. # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
  4543. echo $ac_n "checking for shmat""... $ac_c" 1>&6
  4544. echo "configure:5329: checking for shmat" >&5
  4545. cat > conftest.$ac_ext <<EOF
  4546. #line 5332 "configure"
  4547. #include "confdefs.h"
  4548. /* System header to define __stub macros and hopefully few prototypes,
  4549. which can conflict with char shmat(); below. */
  4550. #include <assert.h>
  4551. /* Override any gcc2 internal prototype to avoid an error. */
  4552. /* We use char because int might match the return type of a gcc2
  4553. builtin and then its argument prototype would still apply. */
  4554. char shmat();
  4555. int main() {
  4556. /* The GNU C library defines this for functions which it implements
  4557. to always fail with ENOSYS. Some functions are actually named
  4558. something starting with __ and the normal name is an alias. */
  4559. #if defined (__stub_shmat) || defined (__stub___shmat)
  4560. choke me
  4561. #else
  4562. shmat();
  4563. #endif
  4564. ; return 0; }
  4565. EOF
  4566. if { (eval echo configure:5355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4567. rm -rf conftest*
  4568. eval "ac_cv_func_shmat=yes"
  4569. else
  4570. echo "configure: failed program was:" >&5
  4571. cat conftest.$ac_ext >&5
  4572. rm -rf conftest*
  4573. eval "ac_cv_func_shmat=no"
  4574. fi
  4575. rm -f conftest*
  4576. if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  4577. echo "$ac_t""yes" 1>&6
  4578. :
  4579. else
  4580. echo "$ac_t""no" 1>&6
  4581. fi
  4582. if test $ac_cv_func_shmat = no; then
  4583. echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
  4584. echo "configure:5375: checking for shmat in -lipc" >&5
  4585. ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
  4586. ac_save_LIBS="$LIBS"
  4587. LIBS="-lipc $LIBS"
  4588. cat > conftest.$ac_ext <<EOF
  4589. #line 5381 "configure"
  4590. #include "confdefs.h"
  4591. /* Override any gcc2 internal prototype to avoid an error. */
  4592. /* We use char because int might match the return type of a gcc2
  4593. builtin and then its argument prototype would still apply. */
  4594. char shmat();
  4595. int main() {
  4596. shmat()
  4597. ; return 0; }
  4598. EOF
  4599. if { (eval echo configure:5392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4600. rm -rf conftest*
  4601. eval "ac_cv_lib_$ac_lib_var=yes"
  4602. else
  4603. echo "configure: failed program was:" >&5
  4604. cat conftest.$ac_ext >&5
  4605. rm -rf conftest*
  4606. eval "ac_cv_lib_$ac_lib_var=no"
  4607. fi
  4608. rm -f conftest*
  4609. LIBS="$ac_save_LIBS"
  4610. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4611. echo "$ac_t""yes" 1>&6
  4612. X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
  4613. else
  4614. echo "$ac_t""no" 1>&6
  4615. fi
  4616. fi
  4617. fi
  4618. # Check for libraries that X11R6 Xt/Xaw programs need.
  4619. ac_save_LDFLAGS="$LDFLAGS"
  4620. test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  4621. # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  4622. # check for ICE first), but we must link in the order -lSM -lICE or
  4623. # we get undefined symbols. So assume we have SM if we have ICE.
  4624. # These have to be linked with before -lX11, unlike the other
  4625. # libraries we check for below, so use a different variable.
  4626. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  4627. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
  4628. echo "configure:5424: checking for IceConnectionNumber in -lICE" >&5
  4629. ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
  4630. ac_save_LIBS="$LIBS"
  4631. LIBS="-lICE $X_EXTRA_LIBS $LIBS"
  4632. cat > conftest.$ac_ext <<EOF
  4633. #line 5430 "configure"
  4634. #include "confdefs.h"
  4635. /* Override any gcc2 internal prototype to avoid an error. */
  4636. /* We use char because int might match the return type of a gcc2
  4637. builtin and then its argument prototype would still apply. */
  4638. char IceConnectionNumber();
  4639. int main() {
  4640. IceConnectionNumber()
  4641. ; return 0; }
  4642. EOF
  4643. if { (eval echo configure:5441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4644. rm -rf conftest*
  4645. eval "ac_cv_lib_$ac_lib_var=yes"
  4646. else
  4647. echo "configure: failed program was:" >&5
  4648. cat conftest.$ac_ext >&5
  4649. rm -rf conftest*
  4650. eval "ac_cv_lib_$ac_lib_var=no"
  4651. fi
  4652. rm -f conftest*
  4653. LIBS="$ac_save_LIBS"
  4654. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4655. echo "$ac_t""yes" 1>&6
  4656. X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  4657. else
  4658. echo "$ac_t""no" 1>&6
  4659. fi
  4660. LDFLAGS="$ac_save_LDFLAGS"
  4661. fi
  4662. if test "$no_x" != "yes"; then
  4663. USE_X11="1"
  4664. XLIB=-lX11
  4665. XTLIB=-lXt
  4666. fi
  4667. fi
  4668. # Note that some systems (FreeBSD for example) need an extra library for
  4669. # cuserid
  4670. ac_save_libs="$LIBS"
  4671. LIBS=""
  4672. echo $ac_n "checking for library containing cuserid""... $ac_c" 1>&6
  4673. echo "configure:5481: checking for library containing cuserid" >&5
  4674. ac_func_search_save_LIBS="$LIBS"
  4675. ac_cv_search_cuserid="no"
  4676. cat > conftest.$ac_ext <<EOF
  4677. #line 5486 "configure"
  4678. #include "confdefs.h"
  4679. /* Override any gcc2 internal prototype to avoid an error. */
  4680. /* We use char because int might match the return type of a gcc2
  4681. builtin and then its argument prototype would still apply. */
  4682. char cuserid();
  4683. int main() {
  4684. cuserid()
  4685. ; return 0; }
  4686. EOF
  4687. if { (eval echo configure:5497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4688. rm -rf conftest*
  4689. ac_cv_search_cuserid="none required"
  4690. else
  4691. echo "configure: failed program was:" >&5
  4692. cat conftest.$ac_ext >&5
  4693. fi
  4694. rm -f conftest*
  4695. test "$ac_cv_search_cuserid" = "no" && for i in compat; do
  4696. LIBS="-l$i $ac_func_search_save_LIBS"
  4697. cat > conftest.$ac_ext <<EOF
  4698. #line 5508 "configure"
  4699. #include "confdefs.h"
  4700. /* Override any gcc2 internal prototype to avoid an error. */
  4701. /* We use char because int might match the return type of a gcc2
  4702. builtin and then its argument prototype would still apply. */
  4703. char cuserid();
  4704. int main() {
  4705. cuserid()
  4706. ; return 0; }
  4707. EOF
  4708. if { (eval echo configure:5519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4709. rm -rf conftest*
  4710. ac_cv_search_cuserid="-l$i"
  4711. break
  4712. else
  4713. echo "configure: failed program was:" >&5
  4714. cat conftest.$ac_ext >&5
  4715. fi
  4716. rm -f conftest*
  4717. done
  4718. LIBS="$ac_func_search_save_LIBS"
  4719. echo "$ac_t""$ac_cv_search_cuserid" 1>&6
  4720. if test "$ac_cv_search_cuserid" != "no"; then
  4721. test "$ac_cv_search_cuserid" = "none required" || LIBS="$ac_cv_search_cuserid $LIBS"
  4722. else :
  4723. fi
  4724. DBMIEXTRALIB=$LIBS
  4725. LIBS=$ac_save_libs
  4726. # Note: -lxdr -liberty -lws2_32 is for MinGW
  4727. echo $ac_n "checking for xdrmem_create""... $ac_c" 1>&6
  4728. echo "configure:5545: checking for xdrmem_create" >&5
  4729. cat > conftest.$ac_ext <<EOF
  4730. #line 5548 "configure"
  4731. #include "confdefs.h"
  4732. /* System header to define __stub macros and hopefully few prototypes,
  4733. which can conflict with char xdrmem_create(); below. */
  4734. #include <assert.h>
  4735. /* Override any gcc2 internal prototype to avoid an error. */
  4736. /* We use char because int might match the return type of a gcc2
  4737. builtin and then its argument prototype would still apply. */
  4738. char xdrmem_create();
  4739. int main() {
  4740. /* The GNU C library defines this for functions which it implements
  4741. to always fail with ENOSYS. Some functions are actually named
  4742. something starting with __ and the normal name is an alias. */
  4743. #if defined (__stub_xdrmem_create) || defined (__stub___xdrmem_create)
  4744. choke me
  4745. #else
  4746. xdrmem_create();
  4747. #endif
  4748. ; return 0; }
  4749. EOF
  4750. if { (eval echo configure:5571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4751. rm -rf conftest*
  4752. eval "ac_cv_func_xdrmem_create=yes"
  4753. else
  4754. echo "configure: failed program was:" >&5
  4755. cat conftest.$ac_ext >&5
  4756. rm -rf conftest*
  4757. eval "ac_cv_func_xdrmem_create=no"
  4758. fi
  4759. rm -f conftest*
  4760. if eval "test \"`echo '$ac_cv_func_'xdrmem_create`\" = yes"; then
  4761. echo "$ac_t""yes" 1>&6
  4762. XDRLIB=
  4763. else
  4764. echo "$ac_t""no" 1>&6
  4765. echo $ac_n "checking for xdrmem_create in -lsun""... $ac_c" 1>&6
  4766. echo "configure:5589: checking for xdrmem_create in -lsun" >&5
  4767. ac_lib_var=`echo sun'_'xdrmem_create | sed 'y%./+-%__p_%'`
  4768. ac_save_LIBS="$LIBS"
  4769. LIBS="-lsun $LIBS"
  4770. cat > conftest.$ac_ext <<EOF
  4771. #line 5595 "configure"
  4772. #include "confdefs.h"
  4773. /* Override any gcc2 internal prototype to avoid an error. */
  4774. /* We use char because int might match the return type of a gcc2
  4775. builtin and then its argument prototype would still apply. */
  4776. char xdrmem_create();
  4777. int main() {
  4778. xdrmem_create()
  4779. ; return 0; }
  4780. EOF
  4781. if { (eval echo configure:5606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4782. rm -rf conftest*
  4783. eval "ac_cv_lib_$ac_lib_var=yes"
  4784. else
  4785. echo "configure: failed program was:" >&5
  4786. cat conftest.$ac_ext >&5
  4787. rm -rf conftest*
  4788. eval "ac_cv_lib_$ac_lib_var=no"
  4789. fi
  4790. rm -f conftest*
  4791. LIBS="$ac_save_LIBS"
  4792. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4793. echo "$ac_t""yes" 1>&6
  4794. XDRLIB=-lsun
  4795. else
  4796. echo "$ac_t""no" 1>&6
  4797. echo $ac_n "checking for xdrmem_create in -lnsl""... $ac_c" 1>&6
  4798. echo "configure:5625: checking for xdrmem_create in -lnsl" >&5
  4799. ac_lib_var=`echo nsl'_'xdrmem_create | sed 'y%./+-%__p_%'`
  4800. ac_save_LIBS="$LIBS"
  4801. LIBS="-lnsl $LIBS"
  4802. cat > conftest.$ac_ext <<EOF
  4803. #line 5631 "configure"
  4804. #include "confdefs.h"
  4805. /* Override any gcc2 internal prototype to avoid an error. */
  4806. /* We use char because int might match the return type of a gcc2
  4807. builtin and then its argument prototype would still apply. */
  4808. char xdrmem_create();
  4809. int main() {
  4810. xdrmem_create()
  4811. ; return 0; }
  4812. EOF
  4813. if { (eval echo configure:5642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4814. rm -rf conftest*
  4815. eval "ac_cv_lib_$ac_lib_var=yes"
  4816. else
  4817. echo "configure: failed program was:" >&5
  4818. cat conftest.$ac_ext >&5
  4819. rm -rf conftest*
  4820. eval "ac_cv_lib_$ac_lib_var=no"
  4821. fi
  4822. rm -f conftest*
  4823. LIBS="$ac_save_LIBS"
  4824. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4825. echo "$ac_t""yes" 1>&6
  4826. XDRLIB=-lnsl
  4827. else
  4828. echo "$ac_t""no" 1>&6
  4829. echo $ac_n "checking for xdrmem_create in -lrpclib""... $ac_c" 1>&6
  4830. echo "configure:5661: checking for xdrmem_create in -lrpclib" >&5
  4831. ac_lib_var=`echo rpclib'_'xdrmem_create | sed 'y%./+-%__p_%'`
  4832. ac_save_LIBS="$LIBS"
  4833. LIBS="-lrpclib $LIBS"
  4834. cat > conftest.$ac_ext <<EOF
  4835. #line 5667 "configure"
  4836. #include "confdefs.h"
  4837. /* Override any gcc2 internal prototype to avoid an error. */
  4838. /* We use char because int might match the return type of a gcc2
  4839. builtin and then its argument prototype would still apply. */
  4840. char xdrmem_create();
  4841. int main() {
  4842. xdrmem_create()
  4843. ; return 0; }
  4844. EOF
  4845. if { (eval echo configure:5678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4846. rm -rf conftest*
  4847. eval "ac_cv_lib_$ac_lib_var=yes"
  4848. else
  4849. echo "configure: failed program was:" >&5
  4850. cat conftest.$ac_ext >&5
  4851. rm -rf conftest*
  4852. eval "ac_cv_lib_$ac_lib_var=no"
  4853. fi
  4854. rm -f conftest*
  4855. LIBS="$ac_save_LIBS"
  4856. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4857. echo "$ac_t""yes" 1>&6
  4858. XDRLIB=-lrpclib
  4859. else
  4860. echo "$ac_t""no" 1>&6
  4861. echo $ac_n "checking for xdrmem_create in -lxdr""... $ac_c" 1>&6
  4862. echo "configure:5697: checking for xdrmem_create in -lxdr" >&5
  4863. ac_lib_var=`echo xdr'_'xdrmem_create | sed 'y%./+-%__p_%'`
  4864. ac_save_LIBS="$LIBS"
  4865. LIBS="-lxdr -liberty -lws2_32 $LIBS"
  4866. cat > conftest.$ac_ext <<EOF
  4867. #line 5703 "configure"
  4868. #include "confdefs.h"
  4869. /* Override any gcc2 internal prototype to avoid an error. */
  4870. /* We use char because int might match the return type of a gcc2
  4871. builtin and then its argument prototype would still apply. */
  4872. char xdrmem_create();
  4873. int main() {
  4874. xdrmem_create()
  4875. ; return 0; }
  4876. EOF
  4877. if { (eval echo configure:5714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4878. rm -rf conftest*
  4879. eval "ac_cv_lib_$ac_lib_var=yes"
  4880. else
  4881. echo "configure: failed program was:" >&5
  4882. cat conftest.$ac_ext >&5
  4883. rm -rf conftest*
  4884. eval "ac_cv_lib_$ac_lib_var=no"
  4885. fi
  4886. rm -f conftest*
  4887. LIBS="$ac_save_LIBS"
  4888. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4889. echo "$ac_t""yes" 1>&6
  4890. XDRLIB="-lxdr -liberty -lws2_32"
  4891. else
  4892. echo "$ac_t""no" 1>&6
  4893. { echo "configure: error: *** Unable to locate XDR functions." 1>&2; exit 1; }
  4894. fi
  4895. fi
  4896. fi
  4897. fi
  4898. fi
  4899. for ac_func in asprintf
  4900. do
  4901. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  4902. echo "configure:5748: checking for $ac_func" >&5
  4903. cat > conftest.$ac_ext <<EOF
  4904. #line 5751 "configure"
  4905. #include "confdefs.h"
  4906. /* System header to define __stub macros and hopefully few prototypes,
  4907. which can conflict with char $ac_func(); below. */
  4908. #include <assert.h>
  4909. /* Override any gcc2 internal prototype to avoid an error. */
  4910. /* We use char because int might match the return type of a gcc2
  4911. builtin and then its argument prototype would still apply. */
  4912. char $ac_func();
  4913. int main() {
  4914. /* The GNU C library defines this for functions which it implements
  4915. to always fail with ENOSYS. Some functions are actually named
  4916. something starting with __ and the normal name is an alias. */
  4917. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  4918. choke me
  4919. #else
  4920. $ac_func();
  4921. #endif
  4922. ; return 0; }
  4923. EOF
  4924. if { (eval echo configure:5774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4925. rm -rf conftest*
  4926. eval "ac_cv_func_$ac_func=yes"
  4927. else
  4928. echo "configure: failed program was:" >&5
  4929. cat conftest.$ac_ext >&5
  4930. rm -rf conftest*
  4931. eval "ac_cv_func_$ac_func=no"
  4932. fi
  4933. rm -f conftest*
  4934. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  4935. echo "$ac_t""yes" 1>&6
  4936. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  4937. cat >> confdefs.h <<EOF
  4938. #define $ac_tr_func 1
  4939. EOF
  4940. else
  4941. echo "$ac_t""no" 1>&6
  4942. fi
  4943. done
  4944. # Test if mathlib needs -lm flag or is included with libc
  4945. echo $ac_n "checking for atan""... $ac_c" 1>&6
  4946. echo "configure:5801: checking for atan" >&5
  4947. cat > conftest.$ac_ext <<EOF
  4948. #line 5804 "configure"
  4949. #include "confdefs.h"
  4950. /* System header to define __stub macros and hopefully few prototypes,
  4951. which can conflict with char atan(); below. */
  4952. #include <assert.h>
  4953. /* Override any gcc2 internal prototype to avoid an error. */
  4954. /* We use char because int might match the return type of a gcc2
  4955. builtin and then its argument prototype would still apply. */
  4956. char atan();
  4957. int main() {
  4958. /* The GNU C library defines this for functions which it implements
  4959. to always fail with ENOSYS. Some functions are actually named
  4960. something starting with __ and the normal name is an alias. */
  4961. #if defined (__stub_atan) || defined (__stub___atan)
  4962. choke me
  4963. #else
  4964. atan();
  4965. #endif
  4966. ; return 0; }
  4967. EOF
  4968. if { (eval echo configure:5827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4969. rm -rf conftest*
  4970. eval "ac_cv_func_atan=yes"
  4971. else
  4972. echo "configure: failed program was:" >&5
  4973. cat conftest.$ac_ext >&5
  4974. rm -rf conftest*
  4975. eval "ac_cv_func_atan=no"
  4976. fi
  4977. rm -f conftest*
  4978. if eval "test \"`echo '$ac_cv_func_'atan`\" = yes"; then
  4979. echo "$ac_t""yes" 1>&6
  4980. MATHLIB=
  4981. else
  4982. echo "$ac_t""no" 1>&6
  4983. echo $ac_n "checking for atan in -lm""... $ac_c" 1>&6
  4984. echo "configure:5845: checking for atan in -lm" >&5
  4985. ac_lib_var=`echo m'_'atan | sed 'y%./+-%__p_%'`
  4986. ac_save_LIBS="$LIBS"
  4987. LIBS="-lm $LIBS"
  4988. cat > conftest.$ac_ext <<EOF
  4989. #line 5851 "configure"
  4990. #include "confdefs.h"
  4991. /* Override any gcc2 internal prototype to avoid an error. */
  4992. /* We use char because int might match the return type of a gcc2
  4993. builtin and then its argument prototype would still apply. */
  4994. char atan();
  4995. int main() {
  4996. atan()
  4997. ; return 0; }
  4998. EOF
  4999. if { (eval echo configure:5862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5000. rm -rf conftest*
  5001. eval "ac_cv_lib_$ac_lib_var=yes"
  5002. else
  5003. echo "configure: failed program was:" >&5
  5004. cat conftest.$ac_ext >&5
  5005. rm -rf conftest*
  5006. eval "ac_cv_lib_$ac_lib_var=no"
  5007. fi
  5008. rm -f conftest*
  5009. LIBS="$ac_save_LIBS"
  5010. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5011. echo "$ac_t""yes" 1>&6
  5012. MATHLIB=-lm
  5013. else
  5014. echo "$ac_t""no" 1>&6
  5015. { echo "configure: error: *** Failed check for math library." 1>&2; exit 1; }
  5016. fi
  5017. fi
  5018. echo $ac_n "checking for dlsym""... $ac_c" 1>&6
  5019. echo "configure:5889: checking for dlsym" >&5
  5020. cat > conftest.$ac_ext <<EOF
  5021. #line 5892 "configure"
  5022. #include "confdefs.h"
  5023. /* System header to define __stub macros and hopefully few prototypes,
  5024. which can conflict with char dlsym(); below. */
  5025. #include <assert.h>
  5026. /* Override any gcc2 internal prototype to avoid an error. */
  5027. /* We use char because int might match the return type of a gcc2
  5028. builtin and then its argument prototype would still apply. */
  5029. char dlsym();
  5030. int main() {
  5031. /* The GNU C library defines this for functions which it implements
  5032. to always fail with ENOSYS. Some functions are actually named
  5033. something starting with __ and the normal name is an alias. */
  5034. #if defined (__stub_dlsym) || defined (__stub___dlsym)
  5035. choke me
  5036. #else
  5037. dlsym();
  5038. #endif
  5039. ; return 0; }
  5040. EOF
  5041. if { (eval echo configure:5915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5042. rm -rf conftest*
  5043. eval "ac_cv_func_dlsym=yes"
  5044. else
  5045. echo "configure: failed program was:" >&5
  5046. cat conftest.$ac_ext >&5
  5047. rm -rf conftest*
  5048. eval "ac_cv_func_dlsym=no"
  5049. fi
  5050. rm -f conftest*
  5051. if eval "test \"`echo '$ac_cv_func_'dlsym`\" = yes"; then
  5052. echo "$ac_t""yes" 1>&6
  5053. DLLIB=
  5054. else
  5055. echo "$ac_t""no" 1>&6
  5056. echo $ac_n "checking for dlsym in -ldl""... $ac_c" 1>&6
  5057. echo "configure:5933: checking for dlsym in -ldl" >&5
  5058. ac_lib_var=`echo dl'_'dlsym | sed 'y%./+-%__p_%'`
  5059. ac_save_LIBS="$LIBS"
  5060. LIBS="-ldl $LIBS"
  5061. cat > conftest.$ac_ext <<EOF
  5062. #line 5939 "configure"
  5063. #include "confdefs.h"
  5064. /* Override any gcc2 internal prototype to avoid an error. */
  5065. /* We use char because int might match the return type of a gcc2
  5066. builtin and then its argument prototype would still apply. */
  5067. char dlsym();
  5068. int main() {
  5069. dlsym()
  5070. ; return 0; }
  5071. EOF
  5072. if { (eval echo configure:5950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5073. rm -rf conftest*
  5074. eval "ac_cv_lib_$ac_lib_var=yes"
  5075. else
  5076. echo "configure: failed program was:" >&5
  5077. cat conftest.$ac_ext >&5
  5078. rm -rf conftest*
  5079. eval "ac_cv_lib_$ac_lib_var=no"
  5080. fi
  5081. rm -f conftest*
  5082. LIBS="$ac_save_LIBS"
  5083. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5084. echo "$ac_t""yes" 1>&6
  5085. DLLIB=-ldl
  5086. else
  5087. echo "$ac_t""no" 1>&6
  5088. DLLIB=
  5089. fi
  5090. fi
  5091. echo $ac_n "checking for iconv""... $ac_c" 1>&6
  5092. echo "configure:5977: checking for iconv" >&5
  5093. cat > conftest.$ac_ext <<EOF
  5094. #line 5980 "configure"
  5095. #include "confdefs.h"
  5096. /* System header to define __stub macros and hopefully few prototypes,
  5097. which can conflict with char iconv(); below. */
  5098. #include <assert.h>
  5099. /* Override any gcc2 internal prototype to avoid an error. */
  5100. /* We use char because int might match the return type of a gcc2
  5101. builtin and then its argument prototype would still apply. */
  5102. char iconv();
  5103. int main() {
  5104. /* The GNU C library defines this for functions which it implements
  5105. to always fail with ENOSYS. Some functions are actually named
  5106. something starting with __ and the normal name is an alias. */
  5107. #if defined (__stub_iconv) || defined (__stub___iconv)
  5108. choke me
  5109. #else
  5110. iconv();
  5111. #endif
  5112. ; return 0; }
  5113. EOF
  5114. if { (eval echo configure:6003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5115. rm -rf conftest*
  5116. eval "ac_cv_func_iconv=yes"
  5117. else
  5118. echo "configure: failed program was:" >&5
  5119. cat conftest.$ac_ext >&5
  5120. rm -rf conftest*
  5121. eval "ac_cv_func_iconv=no"
  5122. fi
  5123. rm -f conftest*
  5124. if eval "test \"`echo '$ac_cv_func_'iconv`\" = yes"; then
  5125. echo "$ac_t""yes" 1>&6
  5126. ICONVLIB=
  5127. else
  5128. echo "$ac_t""no" 1>&6
  5129. echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
  5130. echo "configure:6021: checking for iconv in -liconv" >&5
  5131. ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
  5132. ac_save_LIBS="$LIBS"
  5133. LIBS="-liconv $LIBS"
  5134. cat > conftest.$ac_ext <<EOF
  5135. #line 6027 "configure"
  5136. #include "confdefs.h"
  5137. /* Override any gcc2 internal prototype to avoid an error. */
  5138. /* We use char because int might match the return type of a gcc2
  5139. builtin and then its argument prototype would still apply. */
  5140. char iconv();
  5141. int main() {
  5142. iconv()
  5143. ; return 0; }
  5144. EOF
  5145. if { (eval echo configure:6038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5146. rm -rf conftest*
  5147. eval "ac_cv_lib_$ac_lib_var=yes"
  5148. else
  5149. echo "configure: failed program was:" >&5
  5150. cat conftest.$ac_ext >&5
  5151. rm -rf conftest*
  5152. eval "ac_cv_lib_$ac_lib_var=no"
  5153. fi
  5154. rm -f conftest*
  5155. LIBS="$ac_save_LIBS"
  5156. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5157. echo "$ac_t""yes" 1>&6
  5158. ICONVLIB=-liconv
  5159. else
  5160. echo "$ac_t""no" 1>&6
  5161. echo $ac_n "checking for iconv in -lgiconv""... $ac_c" 1>&6
  5162. echo "configure:6057: checking for iconv in -lgiconv" >&5
  5163. ac_lib_var=`echo giconv'_'iconv | sed 'y%./+-%__p_%'`
  5164. ac_save_LIBS="$LIBS"
  5165. LIBS="-lgiconv $LIBS"
  5166. cat > conftest.$ac_ext <<EOF
  5167. #line 6063 "configure"
  5168. #include "confdefs.h"
  5169. /* Override any gcc2 internal prototype to avoid an error. */
  5170. /* We use char because int might match the return type of a gcc2
  5171. builtin and then its argument prototype would still apply. */
  5172. char iconv();
  5173. int main() {
  5174. iconv()
  5175. ; return 0; }
  5176. EOF
  5177. if { (eval echo configure:6074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5178. rm -rf conftest*
  5179. eval "ac_cv_lib_$ac_lib_var=yes"
  5180. else
  5181. echo "configure: failed program was:" >&5
  5182. cat conftest.$ac_ext >&5
  5183. rm -rf conftest*
  5184. eval "ac_cv_lib_$ac_lib_var=no"
  5185. fi
  5186. rm -f conftest*
  5187. LIBS="$ac_save_LIBS"
  5188. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5189. echo "$ac_t""yes" 1>&6
  5190. ICONVLIB=-lgiconv
  5191. else
  5192. echo "$ac_t""no" 1>&6
  5193. echo $ac_n "checking for libiconv""... $ac_c" 1>&6
  5194. echo "configure:6093: checking for libiconv" >&5
  5195. cat > conftest.$ac_ext <<EOF
  5196. #line 6096 "configure"
  5197. #include "confdefs.h"
  5198. /* System header to define __stub macros and hopefully few prototypes,
  5199. which can conflict with char libiconv(); below. */
  5200. #include <assert.h>
  5201. /* Override any gcc2 internal prototype to avoid an error. */
  5202. /* We use char because int might match the return type of a gcc2
  5203. builtin and then its argument prototype would still apply. */
  5204. char libiconv();
  5205. int main() {
  5206. /* The GNU C library defines this for functions which it implements
  5207. to always fail with ENOSYS. Some functions are actually named
  5208. something starting with __ and the normal name is an alias. */
  5209. #if defined (__stub_libiconv) || defined (__stub___libiconv)
  5210. choke me
  5211. #else
  5212. libiconv();
  5213. #endif
  5214. ; return 0; }
  5215. EOF
  5216. if { (eval echo configure:6119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5217. rm -rf conftest*
  5218. eval "ac_cv_func_libiconv=yes"
  5219. else
  5220. echo "configure: failed program was:" >&5
  5221. cat conftest.$ac_ext >&5
  5222. rm -rf conftest*
  5223. eval "ac_cv_func_libiconv=no"
  5224. fi
  5225. rm -f conftest*
  5226. if eval "test \"`echo '$ac_cv_func_'libiconv`\" = yes"; then
  5227. echo "$ac_t""yes" 1>&6
  5228. ICONVLIB=
  5229. else
  5230. echo "$ac_t""no" 1>&6
  5231. echo $ac_n "checking for libiconv in -liconv""... $ac_c" 1>&6
  5232. echo "configure:6137: checking for libiconv in -liconv" >&5
  5233. ac_lib_var=`echo iconv'_'libiconv | sed 'y%./+-%__p_%'`
  5234. ac_save_LIBS="$LIBS"
  5235. LIBS="-liconv $LIBS"
  5236. cat > conftest.$ac_ext <<EOF
  5237. #line 6143 "configure"
  5238. #include "confdefs.h"
  5239. /* Override any gcc2 internal prototype to avoid an error. */
  5240. /* We use char because int might match the return type of a gcc2
  5241. builtin and then its argument prototype would still apply. */
  5242. char libiconv();
  5243. int main() {
  5244. libiconv()
  5245. ; return 0; }
  5246. EOF
  5247. if { (eval echo configure:6154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5248. rm -rf conftest*
  5249. eval "ac_cv_lib_$ac_lib_var=yes"
  5250. else
  5251. echo "configure: failed program was:" >&5
  5252. cat conftest.$ac_ext >&5
  5253. rm -rf conftest*
  5254. eval "ac_cv_lib_$ac_lib_var=no"
  5255. fi
  5256. rm -f conftest*
  5257. LIBS="$ac_save_LIBS"
  5258. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5259. echo "$ac_t""yes" 1>&6
  5260. ICONVLIB=-liconv
  5261. else
  5262. echo "$ac_t""no" 1>&6
  5263. echo $ac_n "checking for libiconv in -lgiconv""... $ac_c" 1>&6
  5264. echo "configure:6173: checking for libiconv in -lgiconv" >&5
  5265. ac_lib_var=`echo giconv'_'libiconv | sed 'y%./+-%__p_%'`
  5266. ac_save_LIBS="$LIBS"
  5267. LIBS="-lgiconv $LIBS"
  5268. cat > conftest.$ac_ext <<EOF
  5269. #line 6179 "configure"
  5270. #include "confdefs.h"
  5271. /* Override any gcc2 internal prototype to avoid an error. */
  5272. /* We use char because int might match the return type of a gcc2
  5273. builtin and then its argument prototype would still apply. */
  5274. char libiconv();
  5275. int main() {
  5276. libiconv()
  5277. ; return 0; }
  5278. EOF
  5279. if { (eval echo configure:6190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5280. rm -rf conftest*
  5281. eval "ac_cv_lib_$ac_lib_var=yes"
  5282. else
  5283. echo "configure: failed program was:" >&5
  5284. cat conftest.$ac_ext >&5
  5285. rm -rf conftest*
  5286. eval "ac_cv_lib_$ac_lib_var=no"
  5287. fi
  5288. rm -f conftest*
  5289. LIBS="$ac_save_LIBS"
  5290. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5291. echo "$ac_t""yes" 1>&6
  5292. ICONVLIB=-lgiconv
  5293. else
  5294. echo "$ac_t""no" 1>&6
  5295. echo "configure: warning: *** Unable to locate iconv() function." 1>&2
  5296. ICONVLIB=
  5297. fi
  5298. fi
  5299. fi
  5300. fi
  5301. fi
  5302. fi
  5303. have_socket=1
  5304. echo $ac_n "checking for socket""... $ac_c" 1>&6
  5305. echo "configure:6227: checking for socket" >&5
  5306. cat > conftest.$ac_ext <<EOF
  5307. #line 6230 "configure"
  5308. #include "confdefs.h"
  5309. /* System header to define __stub macros and hopefully few prototypes,
  5310. which can conflict with char socket(); below. */
  5311. #include <assert.h>
  5312. /* Override any gcc2 internal prototype to avoid an error. */
  5313. /* We use char because int might match the return type of a gcc2
  5314. builtin and then its argument prototype would still apply. */
  5315. char socket();
  5316. int main() {
  5317. /* The GNU C library defines this for functions which it implements
  5318. to always fail with ENOSYS. Some functions are actually named
  5319. something starting with __ and the normal name is an alias. */
  5320. #if defined (__stub_socket) || defined (__stub___socket)
  5321. choke me
  5322. #else
  5323. socket();
  5324. #endif
  5325. ; return 0; }
  5326. EOF
  5327. if { (eval echo configure:6253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5328. rm -rf conftest*
  5329. eval "ac_cv_func_socket=yes"
  5330. else
  5331. echo "configure: failed program was:" >&5
  5332. cat conftest.$ac_ext >&5
  5333. rm -rf conftest*
  5334. eval "ac_cv_func_socket=no"
  5335. fi
  5336. rm -f conftest*
  5337. if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
  5338. echo "$ac_t""yes" 1>&6
  5339. SOCKLIB=
  5340. else
  5341. echo "$ac_t""no" 1>&6
  5342. echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
  5343. echo "configure:6271: checking for socket in -lsocket" >&5
  5344. ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
  5345. ac_save_LIBS="$LIBS"
  5346. LIBS="-lsocket $LIBS"
  5347. cat > conftest.$ac_ext <<EOF
  5348. #line 6277 "configure"
  5349. #include "confdefs.h"
  5350. /* Override any gcc2 internal prototype to avoid an error. */
  5351. /* We use char because int might match the return type of a gcc2
  5352. builtin and then its argument prototype would still apply. */
  5353. char socket();
  5354. int main() {
  5355. socket()
  5356. ; return 0; }
  5357. EOF
  5358. if { (eval echo configure:6288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5359. rm -rf conftest*
  5360. eval "ac_cv_lib_$ac_lib_var=yes"
  5361. else
  5362. echo "configure: failed program was:" >&5
  5363. cat conftest.$ac_ext >&5
  5364. rm -rf conftest*
  5365. eval "ac_cv_lib_$ac_lib_var=no"
  5366. fi
  5367. rm -f conftest*
  5368. LIBS="$ac_save_LIBS"
  5369. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5370. echo "$ac_t""yes" 1>&6
  5371. SOCKLIB=-lsocket
  5372. else
  5373. echo "$ac_t""no" 1>&6
  5374. have_socket=0
  5375. echo "configure: warning: *** Unable to locate socket() function." 1>&2
  5376. fi
  5377. fi
  5378. if test "$have_socket" = 1 ; then
  5379. HAVE_SOCKET=1
  5380. cat >> confdefs.h <<\EOF
  5381. #define HAVE_SOCKET 1
  5382. EOF
  5383. else
  5384. HAVE_SOCKET=
  5385. fi
  5386. # Mandatory zlib dependency
  5387. ZLIBLIBPATH=
  5388. ZLIBINCPATH=
  5389. ZLIB=
  5390. # With zlib includes directory
  5391. echo $ac_n "checking for location of zlib includes""... $ac_c" 1>&6
  5392. echo "configure:6336: checking for location of zlib includes" >&5
  5393. case "$with_zlib_includes" in
  5394. y | ye | yes | n | no)
  5395. { echo "configure: error: *** You must supply a directory to --with-zlib-includes." 1>&2; exit 1; }
  5396. ;;
  5397. esac
  5398. echo "$ac_t""$with_zlib_includes" 1>&6
  5399. if test -n "$with_zlib_includes" ; then
  5400. for dir in $with_zlib_includes; do
  5401. if test -d "$dir"; then
  5402. ZLIBINCPATH="$ZLIBINCPATH -I$dir"
  5403. else
  5404. { echo "configure: error: *** zlib includes directory $dir does not exist." 1>&2; exit 1; }
  5405. fi
  5406. done
  5407. fi
  5408. ac_save_cppflags="$CPPFLAGS"
  5409. CPPFLAGS="$ZLIBINCPATH $CPPFLAGS"
  5410. for ac_hdr in zlib.h
  5411. do
  5412. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5413. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5414. echo "configure:6362: checking for $ac_hdr" >&5
  5415. cat > conftest.$ac_ext <<EOF
  5416. #line 6365 "configure"
  5417. #include "confdefs.h"
  5418. #include <$ac_hdr>
  5419. EOF
  5420. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5421. { (eval echo configure:6370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5422. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5423. if test -z "$ac_err"; then
  5424. rm -rf conftest*
  5425. eval "ac_cv_header_$ac_safe=yes"
  5426. else
  5427. echo "$ac_err" >&5
  5428. echo "configure: failed program was:" >&5
  5429. cat conftest.$ac_ext >&5
  5430. rm -rf conftest*
  5431. eval "ac_cv_header_$ac_safe=no"
  5432. fi
  5433. rm -f conftest*
  5434. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5435. echo "$ac_t""yes" 1>&6
  5436. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5437. cat >> confdefs.h <<EOF
  5438. #define $ac_tr_hdr 1
  5439. EOF
  5440. else
  5441. echo "$ac_t""no" 1>&6
  5442. { echo "configure: error: *** Unable to locate zlib includes." 1>&2; exit 1; }
  5443. fi
  5444. done
  5445. CPPFLAGS=$ac_save_cppflags
  5446. # With zlib library directory
  5447. echo $ac_n "checking for location of zlib library""... $ac_c" 1>&6
  5448. echo "configure:6404: checking for location of zlib library" >&5
  5449. case "$with_zlib_libs" in
  5450. y | ye | yes | n | no)
  5451. { echo "configure: error: *** You must supply a directory to --with-zlib-libs." 1>&2; exit 1; }
  5452. ;;
  5453. esac
  5454. echo "$ac_t""$with_zlib_libs" 1>&6
  5455. if test -n "$with_zlib_libs"; then
  5456. for dir in $with_zlib_libs; do
  5457. if test -d "$dir"; then
  5458. ZLIBLIBPATH="$ZLIBLIBPATH -L$dir"
  5459. else
  5460. { echo "configure: error: *** zlib library directory $dir does not exist." 1>&2; exit 1; }
  5461. fi
  5462. done
  5463. fi
  5464. ac_save_ldflags="$LDFLAGS"
  5465. LDFLAGS="$ZLIBLIBPATH $LDFLAGS"
  5466. echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
  5467. echo "configure:6429: checking for deflate in -lz" >&5
  5468. ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
  5469. ac_save_LIBS="$LIBS"
  5470. LIBS="-lz $LIBS"
  5471. cat > conftest.$ac_ext <<EOF
  5472. #line 6435 "configure"
  5473. #include "confdefs.h"
  5474. /* Override any gcc2 internal prototype to avoid an error. */
  5475. /* We use char because int might match the return type of a gcc2
  5476. builtin and then its argument prototype would still apply. */
  5477. char deflate();
  5478. int main() {
  5479. deflate()
  5480. ; return 0; }
  5481. EOF
  5482. if { (eval echo configure:6446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5483. rm -rf conftest*
  5484. eval "ac_cv_lib_$ac_lib_var=yes"
  5485. else
  5486. echo "configure: failed program was:" >&5
  5487. cat conftest.$ac_ext >&5
  5488. rm -rf conftest*
  5489. eval "ac_cv_lib_$ac_lib_var=no"
  5490. fi
  5491. rm -f conftest*
  5492. LIBS="$ac_save_LIBS"
  5493. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5494. echo "$ac_t""yes" 1>&6
  5495. ZLIB="$ZLIB -lz "
  5496. else
  5497. echo "$ac_t""no" 1>&6
  5498. LDFLAGS=${ac_save_ldflags}
  5499. { echo "configure: error: *** Unable to locate zlib library." 1>&2; exit 1; }
  5500. fi
  5501. LDFLAGS=${ac_save_ldflags}
  5502. #
  5503. # Done checking zlib
  5504. # Mandatory PROJ dependency
  5505. PROJINC=
  5506. PROJLIB=
  5507. PROJSHARE=
  5508. # With PROJ includes directory
  5509. echo $ac_n "checking for location of External PROJ.4 includes""... $ac_c" 1>&6
  5510. echo "configure:6494: checking for location of External PROJ.4 includes" >&5
  5511. case "$with_proj_includes" in
  5512. y | ye | yes | n | no)
  5513. { echo "configure: error: *** You must supply a directory to --with-proj-includes." 1>&2; exit 1; }
  5514. ;;
  5515. esac
  5516. echo "$ac_t""$with_proj_includes" 1>&6
  5517. if test -n "$with_proj_includes" ; then
  5518. for dir in $with_proj_includes; do
  5519. if test -d "$dir"; then
  5520. PROJINC="$PROJINC -I$dir"
  5521. else
  5522. { echo "configure: error: *** External PROJ.4 includes directory $dir does not exist." 1>&2; exit 1; }
  5523. fi
  5524. done
  5525. fi
  5526. ac_save_cppflags="$CPPFLAGS"
  5527. CPPFLAGS="$PROJINC $CPPFLAGS"
  5528. for ac_hdr in proj_api.h
  5529. do
  5530. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5531. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5532. echo "configure:6520: checking for $ac_hdr" >&5
  5533. cat > conftest.$ac_ext <<EOF
  5534. #line 6523 "configure"
  5535. #include "confdefs.h"
  5536. #include <$ac_hdr>
  5537. EOF
  5538. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5539. { (eval echo configure:6528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5540. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5541. if test -z "$ac_err"; then
  5542. rm -rf conftest*
  5543. eval "ac_cv_header_$ac_safe=yes"
  5544. else
  5545. echo "$ac_err" >&5
  5546. echo "configure: failed program was:" >&5
  5547. cat conftest.$ac_ext >&5
  5548. rm -rf conftest*
  5549. eval "ac_cv_header_$ac_safe=no"
  5550. fi
  5551. rm -f conftest*
  5552. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5553. echo "$ac_t""yes" 1>&6
  5554. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5555. cat >> confdefs.h <<EOF
  5556. #define $ac_tr_hdr 1
  5557. EOF
  5558. else
  5559. echo "$ac_t""no" 1>&6
  5560. { echo "configure: error: *** Unable to locate External PROJ.4 includes." 1>&2; exit 1; }
  5561. fi
  5562. done
  5563. CPPFLAGS=$ac_save_cppflags
  5564. # PROJ version check
  5565. if test "$cross_compiling" = yes; then
  5566. echo "configure: warning: *** Cannot check PROJ.4 version (cross-compiling)." 1>&2
  5567. else
  5568. echo $ac_n "checking External PROJ.4 version""... $ac_c" 1>&6
  5569. echo "configure:6565: checking External PROJ.4 version" >&5
  5570. ac_save_cppflags="$CPPFLAGS"
  5571. CPPFLAGS="$PROJINC $CPPFLAGS"
  5572. if test "$cross_compiling" = yes; then
  5573. proj_ver=0
  5574. echo "$ac_t""unknown (cross-compiling)" 1>&6
  5575. else
  5576. cat > conftest.$ac_ext <<EOF
  5577. #line 6573 "configure"
  5578. #include "confdefs.h"
  5579. #include <stdio.h>
  5580. #include <proj_api.h>
  5581. int main(void) {
  5582. FILE *fp = fopen("conftestdata","w");
  5583. fprintf(fp, "%d", PJ_VERSION);
  5584. return 0;
  5585. }
  5586. EOF
  5587. if { (eval echo configure:6585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  5588. then
  5589. proj_ver=`cat conftestdata`
  5590. echo "$ac_t""$proj_ver" 1>&6
  5591. else
  5592. echo "configure: failed program was:" >&5
  5593. cat conftest.$ac_ext >&5
  5594. rm -fr conftest*
  5595. { echo "configure: error: *** Could not determine External PROJ.4 version." 1>&2; exit 1; }
  5596. fi
  5597. rm -fr conftest*
  5598. fi
  5599. CPPFLAGS=$ac_save_cppflags
  5600. if test `expr "$proj_ver" \< 446` = 1 ; then
  5601. { echo "configure: error: *** PROJ.4.4.6 or later is required." 1>&2; exit 1; }
  5602. fi
  5603. fi
  5604. # With PROJ library directory
  5605. echo $ac_n "checking for location of External PROJ.4 library""... $ac_c" 1>&6
  5606. echo "configure:6610: checking for location of External PROJ.4 library" >&5
  5607. case "$with_proj_libs" in
  5608. y | ye | yes | n | no)
  5609. { echo "configure: error: *** You must supply a directory to --with-proj-libs." 1>&2; exit 1; }
  5610. ;;
  5611. esac
  5612. echo "$ac_t""$with_proj_libs" 1>&6
  5613. if test -n "$with_proj_libs"; then
  5614. for dir in $with_proj_libs; do
  5615. if test -d "$dir"; then
  5616. PROJLIB="$PROJLIB -L$dir"
  5617. else
  5618. { echo "configure: error: *** External PROJ.4 library directory $dir does not exist." 1>&2; exit 1; }
  5619. fi
  5620. done
  5621. fi
  5622. ac_save_ldflags="$LDFLAGS"
  5623. LDFLAGS="$PROJLIB $LDFLAGS"
  5624. echo $ac_n "checking for pj_get_def in -lproj""... $ac_c" 1>&6
  5625. echo "configure:6635: checking for pj_get_def in -lproj" >&5
  5626. ac_lib_var=`echo proj'_'pj_get_def | sed 'y%./+-%__p_%'`
  5627. ac_save_LIBS="$LIBS"
  5628. LIBS="-lproj $LIBS"
  5629. cat > conftest.$ac_ext <<EOF
  5630. #line 6641 "configure"
  5631. #include "confdefs.h"
  5632. /* Override any gcc2 internal prototype to avoid an error. */
  5633. /* We use char because int might match the return type of a gcc2
  5634. builtin and then its argument prototype would still apply. */
  5635. char pj_get_def();
  5636. int main() {
  5637. pj_get_def()
  5638. ; return 0; }
  5639. EOF
  5640. if { (eval echo configure:6652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5641. rm -rf conftest*
  5642. eval "ac_cv_lib_$ac_lib_var=yes"
  5643. else
  5644. echo "configure: failed program was:" >&5
  5645. cat conftest.$ac_ext >&5
  5646. rm -rf conftest*
  5647. eval "ac_cv_lib_$ac_lib_var=no"
  5648. fi
  5649. rm -f conftest*
  5650. LIBS="$ac_save_LIBS"
  5651. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5652. echo "$ac_t""yes" 1>&6
  5653. PROJLIB="$PROJLIB -lproj "
  5654. else
  5655. echo "$ac_t""no" 1>&6
  5656. LDFLAGS=${ac_save_ldflags}
  5657. { echo "configure: error: *** Unable to locate External PROJ.4 library." 1>&2; exit 1; }
  5658. fi
  5659. LDFLAGS=${ac_save_ldflags}
  5660. # With PROJ share directory
  5661. echo $ac_n "checking for location of External PROJ.4 data files""... $ac_c" 1>&6
  5662. echo "configure:6686: checking for location of External PROJ.4 data files" >&5
  5663. case "$with_proj_share" in
  5664. y | ye | yes | n | no)
  5665. { echo "configure: error: *** You must supply a directory to --with-proj-share." 1>&2; exit 1; }
  5666. ;;
  5667. esac
  5668. echo "$ac_t""$with_proj_share" 1>&6
  5669. if test -n "$with_proj_share" ; then
  5670. if test -d "$with_proj_share"; then
  5671. PROJSHARE="$with_proj_share"
  5672. else
  5673. { echo "configure: error: *** External PROJ.4 data directory $dir does not exist." 1>&2; exit 1; }
  5674. fi
  5675. fi
  5676. if test -z "$PROJSHARE" ; then
  5677. echo "configure: warning: *** External PROJ.4 directory not specified; default will be used" 1>&2
  5678. PROJSHARE=/usr/local/share/proj
  5679. fi
  5680. # LOC_CHECK_SHARE does not work when cross compiling
  5681. if test "$cross_compiling" = "yes" ; then
  5682. echo $ac_n "checking for epsg""... $ac_c" 1>&6
  5683. echo "configure:6710: checking for epsg" >&5
  5684. echo "$ac_t""unknown (cross-compiling)" 1>&6
  5685. else
  5686. ac_safe=`echo "$PROJSHARE/epsg" | sed 'y%./+-%__p_%'`
  5687. echo $ac_n "checking for $PROJSHARE/epsg""... $ac_c" 1>&6
  5688. echo "configure:6717: checking for $PROJSHARE/epsg" >&5
  5689. if test "$cross_compiling" = yes; then
  5690. { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
  5691. else
  5692. if test -r $PROJSHARE/epsg; then
  5693. eval "ac_cv_file_$ac_safe=yes"
  5694. else
  5695. eval "ac_cv_file_$ac_safe=no"
  5696. fi
  5697. fi
  5698. if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
  5699. echo "$ac_t""yes" 1>&6
  5700. :
  5701. else
  5702. echo "$ac_t""no" 1>&6
  5703. echo "configure: warning: *** Unable to locate PROJ data files." 1>&2
  5704. fi
  5705. fi
  5706. # nad2bin needs to be in path for installing datum gridshift files
  5707. # Extract the first word of "nad2bin", so it can be a program name with args.
  5708. set dummy nad2bin; ac_word=$2
  5709. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5710. echo "configure:6749: checking for $ac_word" >&5
  5711. case "$NAD2BIN" in
  5712. /*)
  5713. ac_cv_path_NAD2BIN="$NAD2BIN" # Let the user override the test with a path.
  5714. ;;
  5715. ?:/*)
  5716. ac_cv_path_NAD2BIN="$NAD2BIN" # Let the user override the test with a dos path.
  5717. ;;
  5718. *)
  5719. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5720. ac_dummy="$PATH"
  5721. for ac_dir in $ac_dummy; do
  5722. test -z "$ac_dir" && ac_dir=.
  5723. if test -f $ac_dir/$ac_word; then
  5724. ac_cv_path_NAD2BIN="$ac_dir/$ac_word"
  5725. break
  5726. fi
  5727. done
  5728. IFS="$ac_save_ifs"
  5729. test -z "$ac_cv_path_NAD2BIN" && ac_cv_path_NAD2BIN="no"
  5730. ;;
  5731. esac
  5732. NAD2BIN="$ac_cv_path_NAD2BIN"
  5733. if test -n "$NAD2BIN"; then
  5734. echo "$ac_t""$NAD2BIN" 1>&6
  5735. else
  5736. echo "$ac_t""no" 1>&6
  5737. fi
  5738. if test "$NAD2BIN" = "no"; then
  5739. { echo "configure: error: *** Unable to locate nad2bin (needs to be in PATH)." 1>&2; exit 1; }
  5740. fi
  5741. # Done checking PROJ
  5742. # Enable regex option
  5743. echo $ac_n "checking whether to use regex""... $ac_c" 1>&6
  5744. echo "configure:6789: checking whether to use regex" >&5
  5745. echo "$ac_t"""$with_regex"" 1>&6
  5746. case "$with_regex" in
  5747. "no") USE_REGEX= ;;
  5748. "yes") USE_REGEX="1" ;;
  5749. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  5750. esac
  5751. REGEXINCPATH=
  5752. REGEXLIBPATH=
  5753. REGEXLIB=
  5754. if test -n "$USE_REGEX"; then
  5755. # With regex includes directory
  5756. echo $ac_n "checking for location of regex includes""... $ac_c" 1>&6
  5757. echo "configure:6809: checking for location of regex includes" >&5
  5758. case "$with_regex_includes" in
  5759. y | ye | yes | n | no)
  5760. { echo "configure: error: *** You must supply a directory to --with-regex-includes." 1>&2; exit 1; }
  5761. ;;
  5762. esac
  5763. echo "$ac_t""$with_regex_includes" 1>&6
  5764. if test -n "$with_regex_includes" ; then
  5765. for dir in $with_regex_includes; do
  5766. if test -d "$dir"; then
  5767. REGEXINCPATH="$REGEXINCPATH -I$dir"
  5768. else
  5769. { echo "configure: error: *** regex includes directory $dir does not exist." 1>&2; exit 1; }
  5770. fi
  5771. done
  5772. fi
  5773. ac_save_cppflags="$CPPFLAGS"
  5774. CPPFLAGS="$REGEXINCPATH $CPPFLAGS"
  5775. for ac_hdr in regex.h
  5776. do
  5777. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5778. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5779. echo "configure:6835: checking for $ac_hdr" >&5
  5780. cat > conftest.$ac_ext <<EOF
  5781. #line 6838 "configure"
  5782. #include "confdefs.h"
  5783. #include <$ac_hdr>
  5784. EOF
  5785. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5786. { (eval echo configure:6843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5787. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5788. if test -z "$ac_err"; then
  5789. rm -rf conftest*
  5790. eval "ac_cv_header_$ac_safe=yes"
  5791. else
  5792. echo "$ac_err" >&5
  5793. echo "configure: failed program was:" >&5
  5794. cat conftest.$ac_ext >&5
  5795. rm -rf conftest*
  5796. eval "ac_cv_header_$ac_safe=no"
  5797. fi
  5798. rm -f conftest*
  5799. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5800. echo "$ac_t""yes" 1>&6
  5801. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5802. cat >> confdefs.h <<EOF
  5803. #define $ac_tr_hdr 1
  5804. EOF
  5805. else
  5806. echo "$ac_t""no" 1>&6
  5807. { echo "configure: error: *** Unable to locate regex includes." 1>&2; exit 1; }
  5808. fi
  5809. done
  5810. CPPFLAGS=$ac_save_cppflags
  5811. # With regex library directory
  5812. echo $ac_n "checking for location of regex library""... $ac_c" 1>&6
  5813. echo "configure:6877: checking for location of regex library" >&5
  5814. case "$with_regex_libs" in
  5815. y | ye | yes | n | no)
  5816. { echo "configure: error: *** You must supply a directory to --with-regex-libs." 1>&2; exit 1; }
  5817. ;;
  5818. esac
  5819. echo "$ac_t""$with_regex_libs" 1>&6
  5820. if test -n "$with_regex_libs"; then
  5821. for dir in $with_regex_libs; do
  5822. if test -d "$dir"; then
  5823. REGEXLIBPATH="$REGEXLIBPATH -L$dir"
  5824. else
  5825. { echo "configure: error: *** regex library directory $dir does not exist." 1>&2; exit 1; }
  5826. fi
  5827. done
  5828. fi
  5829. ac_save_libs="$LIBS"
  5830. ac_save_ldflags="$LDFLAGS"
  5831. LIBS=" $LIBS"
  5832. LDFLAGS=" $LDFLAGS"
  5833. echo $ac_n "checking for regcomp""... $ac_c" 1>&6
  5834. echo "configure:6902: checking for regcomp" >&5
  5835. cat > conftest.$ac_ext <<EOF
  5836. #line 6905 "configure"
  5837. #include "confdefs.h"
  5838. /* System header to define __stub macros and hopefully few prototypes,
  5839. which can conflict with char regcomp(); below. */
  5840. #include <assert.h>
  5841. /* Override any gcc2 internal prototype to avoid an error. */
  5842. /* We use char because int might match the return type of a gcc2
  5843. builtin and then its argument prototype would still apply. */
  5844. char regcomp();
  5845. int main() {
  5846. /* The GNU C library defines this for functions which it implements
  5847. to always fail with ENOSYS. Some functions are actually named
  5848. something starting with __ and the normal name is an alias. */
  5849. #if defined (__stub_regcomp) || defined (__stub___regcomp)
  5850. choke me
  5851. #else
  5852. regcomp();
  5853. #endif
  5854. ; return 0; }
  5855. EOF
  5856. if { (eval echo configure:6928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5857. rm -rf conftest*
  5858. eval "ac_cv_func_regcomp=yes"
  5859. else
  5860. echo "configure: failed program was:" >&5
  5861. cat conftest.$ac_ext >&5
  5862. rm -rf conftest*
  5863. eval "ac_cv_func_regcomp=no"
  5864. fi
  5865. rm -f conftest*
  5866. if eval "test \"`echo '$ac_cv_func_'regcomp`\" = yes"; then
  5867. echo "$ac_t""yes" 1>&6
  5868. REGEXLIB="$REGEXLIB "
  5869. else
  5870. echo "$ac_t""no" 1>&6
  5871. ac_save_ldflags="$LDFLAGS"
  5872. LDFLAGS="$REGEXLIBPATH $LDFLAGS"
  5873. echo $ac_n "checking for regcomp in -lregex""... $ac_c" 1>&6
  5874. echo "configure:6955: checking for regcomp in -lregex" >&5
  5875. ac_lib_var=`echo regex'_'regcomp | sed 'y%./+-%__p_%'`
  5876. ac_save_LIBS="$LIBS"
  5877. LIBS="-lregex $LIBS"
  5878. cat > conftest.$ac_ext <<EOF
  5879. #line 6961 "configure"
  5880. #include "confdefs.h"
  5881. /* Override any gcc2 internal prototype to avoid an error. */
  5882. /* We use char because int might match the return type of a gcc2
  5883. builtin and then its argument prototype would still apply. */
  5884. char regcomp();
  5885. int main() {
  5886. regcomp()
  5887. ; return 0; }
  5888. EOF
  5889. if { (eval echo configure:6972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5890. rm -rf conftest*
  5891. eval "ac_cv_lib_$ac_lib_var=yes"
  5892. else
  5893. echo "configure: failed program was:" >&5
  5894. cat conftest.$ac_ext >&5
  5895. rm -rf conftest*
  5896. eval "ac_cv_lib_$ac_lib_var=no"
  5897. fi
  5898. rm -f conftest*
  5899. LIBS="$ac_save_LIBS"
  5900. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5901. echo "$ac_t""yes" 1>&6
  5902. REGEXLIB="$REGEXLIB -lregex "
  5903. else
  5904. echo "$ac_t""no" 1>&6
  5905. LDFLAGS=${ac_save_ldflags}
  5906. { echo "configure: error: *** Unable to locate regex library." 1>&2; exit 1; }
  5907. fi
  5908. LDFLAGS=${ac_save_ldflags}
  5909. fi
  5910. LIBS=${ac_save_libs}
  5911. LDFLAGS=${ac_save_ldflags}
  5912. fi # $USE_REGEX
  5913. # Done checking regex
  5914. # Enable Readline option
  5915. echo $ac_n "checking whether to use Readline""... $ac_c" 1>&6
  5916. echo "configure:7022: checking whether to use Readline" >&5
  5917. echo "$ac_t"""$with_readline"" 1>&6
  5918. case "$with_readline" in
  5919. "no") USE_READLINE= ;;
  5920. "yes") USE_READLINE="1" ;;
  5921. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  5922. esac
  5923. READLINEINCPATH=
  5924. READLINELIBPATH=
  5925. READLINELIB=
  5926. HISTORYLIB=
  5927. if test -n "$USE_READLINE"; then
  5928. # With Readline includes directory
  5929. echo $ac_n "checking for location of Readline includes""... $ac_c" 1>&6
  5930. echo "configure:7043: checking for location of Readline includes" >&5
  5931. case "$with_readline_includes" in
  5932. y | ye | yes | n | no)
  5933. { echo "configure: error: *** You must supply a directory to --with-readline-includes." 1>&2; exit 1; }
  5934. ;;
  5935. esac
  5936. echo "$ac_t""$with_readline_includes" 1>&6
  5937. if test -n "$with_readline_includes" ; then
  5938. for dir in $with_readline_includes; do
  5939. if test -d "$dir"; then
  5940. READLINEINCPATH="$READLINEINCPATH -I$dir"
  5941. else
  5942. { echo "configure: error: *** Readline includes directory $dir does not exist." 1>&2; exit 1; }
  5943. fi
  5944. done
  5945. fi
  5946. ac_save_cppflags="$CPPFLAGS"
  5947. CPPFLAGS="$READLINEINCPATH $CPPFLAGS"
  5948. for ac_hdr in readline/readline.h
  5949. do
  5950. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5951. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5952. echo "configure:7069: checking for $ac_hdr" >&5
  5953. cat > conftest.$ac_ext <<EOF
  5954. #line 7072 "configure"
  5955. #include "confdefs.h"
  5956. #include <$ac_hdr>
  5957. EOF
  5958. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5959. { (eval echo configure:7077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5960. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5961. if test -z "$ac_err"; then
  5962. rm -rf conftest*
  5963. eval "ac_cv_header_$ac_safe=yes"
  5964. else
  5965. echo "$ac_err" >&5
  5966. echo "configure: failed program was:" >&5
  5967. cat conftest.$ac_ext >&5
  5968. rm -rf conftest*
  5969. eval "ac_cv_header_$ac_safe=no"
  5970. fi
  5971. rm -f conftest*
  5972. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5973. echo "$ac_t""yes" 1>&6
  5974. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5975. cat >> confdefs.h <<EOF
  5976. #define $ac_tr_hdr 1
  5977. EOF
  5978. else
  5979. echo "$ac_t""no" 1>&6
  5980. { echo "configure: error: *** Unable to locate Readline includes." 1>&2; exit 1; }
  5981. fi
  5982. done
  5983. CPPFLAGS=$ac_save_cppflags
  5984. ac_save_cppflags="$CPPFLAGS"
  5985. CPPFLAGS="$READLINEINCPATH $CPPFLAGS"
  5986. for ac_hdr in readline/history.h
  5987. do
  5988. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5989. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5990. echo "configure:7113: checking for $ac_hdr" >&5
  5991. cat > conftest.$ac_ext <<EOF
  5992. #line 7116 "configure"
  5993. #include "confdefs.h"
  5994. #include <$ac_hdr>
  5995. EOF
  5996. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5997. { (eval echo configure:7121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5998. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5999. if test -z "$ac_err"; then
  6000. rm -rf conftest*
  6001. eval "ac_cv_header_$ac_safe=yes"
  6002. else
  6003. echo "$ac_err" >&5
  6004. echo "configure: failed program was:" >&5
  6005. cat conftest.$ac_ext >&5
  6006. rm -rf conftest*
  6007. eval "ac_cv_header_$ac_safe=no"
  6008. fi
  6009. rm -f conftest*
  6010. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6011. echo "$ac_t""yes" 1>&6
  6012. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6013. cat >> confdefs.h <<EOF
  6014. #define $ac_tr_hdr 1
  6015. EOF
  6016. else
  6017. echo "$ac_t""no" 1>&6
  6018. { echo "configure: error: *** Unable to locate Readline includes." 1>&2; exit 1; }
  6019. fi
  6020. done
  6021. CPPFLAGS=$ac_save_cppflags
  6022. # With Readline library directory
  6023. echo $ac_n "checking for location of Readline library""... $ac_c" 1>&6
  6024. echo "configure:7155: checking for location of Readline library" >&5
  6025. case "$with_readline_libs" in
  6026. y | ye | yes | n | no)
  6027. { echo "configure: error: *** You must supply a directory to --with-readline-libs." 1>&2; exit 1; }
  6028. ;;
  6029. esac
  6030. echo "$ac_t""$with_readline_libs" 1>&6
  6031. if test -n "$with_readline_libs"; then
  6032. for dir in $with_readline_libs; do
  6033. if test -d "$dir"; then
  6034. READLINELIBPATH="$READLINELIBPATH -L$dir"
  6035. else
  6036. { echo "configure: error: *** Readline library directory $dir does not exist." 1>&2; exit 1; }
  6037. fi
  6038. done
  6039. fi
  6040. ac_save_ldflags="$LDFLAGS"
  6041. LDFLAGS="$READLINELIBPATH $LDFLAGS"
  6042. echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
  6043. echo "configure:7180: checking for readline in -lreadline" >&5
  6044. ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
  6045. ac_save_LIBS="$LIBS"
  6046. LIBS="-lreadline $LIBS"
  6047. cat > conftest.$ac_ext <<EOF
  6048. #line 7186 "configure"
  6049. #include "confdefs.h"
  6050. /* Override any gcc2 internal prototype to avoid an error. */
  6051. /* We use char because int might match the return type of a gcc2
  6052. builtin and then its argument prototype would still apply. */
  6053. char readline();
  6054. int main() {
  6055. readline()
  6056. ; return 0; }
  6057. EOF
  6058. if { (eval echo configure:7197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6059. rm -rf conftest*
  6060. eval "ac_cv_lib_$ac_lib_var=yes"
  6061. else
  6062. echo "configure: failed program was:" >&5
  6063. cat conftest.$ac_ext >&5
  6064. rm -rf conftest*
  6065. eval "ac_cv_lib_$ac_lib_var=no"
  6066. fi
  6067. rm -f conftest*
  6068. LIBS="$ac_save_LIBS"
  6069. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6070. echo "$ac_t""yes" 1>&6
  6071. READLINELIB="$READLINELIB -lreadline "
  6072. else
  6073. echo "$ac_t""no" 1>&6
  6074. LDFLAGS=${ac_save_ldflags}
  6075. { echo "configure: error: *** Unable to locate Readline library." 1>&2; exit 1; }
  6076. fi
  6077. LDFLAGS=${ac_save_ldflags}
  6078. ac_save_ldflags="$LDFLAGS"
  6079. LDFLAGS="$READLINELIBPATH $LDFLAGS"
  6080. echo $ac_n "checking for add_history in -lhistory""... $ac_c" 1>&6
  6081. echo "configure:7232: checking for add_history in -lhistory" >&5
  6082. ac_lib_var=`echo history'_'add_history | sed 'y%./+-%__p_%'`
  6083. ac_save_LIBS="$LIBS"
  6084. LIBS="-lhistory $LIBS"
  6085. cat > conftest.$ac_ext <<EOF
  6086. #line 7238 "configure"
  6087. #include "confdefs.h"
  6088. /* Override any gcc2 internal prototype to avoid an error. */
  6089. /* We use char because int might match the return type of a gcc2
  6090. builtin and then its argument prototype would still apply. */
  6091. char add_history();
  6092. int main() {
  6093. add_history()
  6094. ; return 0; }
  6095. EOF
  6096. if { (eval echo configure:7249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6097. rm -rf conftest*
  6098. eval "ac_cv_lib_$ac_lib_var=yes"
  6099. else
  6100. echo "configure: failed program was:" >&5
  6101. cat conftest.$ac_ext >&5
  6102. rm -rf conftest*
  6103. eval "ac_cv_lib_$ac_lib_var=no"
  6104. fi
  6105. rm -f conftest*
  6106. LIBS="$ac_save_LIBS"
  6107. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6108. echo "$ac_t""yes" 1>&6
  6109. HISTORYLIB="$HISTORYLIB -lhistory "
  6110. else
  6111. echo "$ac_t""no" 1>&6
  6112. LDFLAGS=${ac_save_ldflags}
  6113. { echo "configure: error: *** Unable to locate History library." 1>&2; exit 1; }
  6114. fi
  6115. LDFLAGS=${ac_save_ldflags}
  6116. fi # $USE_READLINE
  6117. # Done checking Readline
  6118. # Enable JPEG option
  6119. echo $ac_n "checking whether to use JPEG""... $ac_c" 1>&6
  6120. echo "configure:7292: checking whether to use JPEG" >&5
  6121. echo "$ac_t"""$with_jpeg"" 1>&6
  6122. case "$with_jpeg" in
  6123. "no") USE_JPEG= ;;
  6124. "yes") USE_JPEG="1" ;;
  6125. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6126. esac
  6127. JPEGINCPATH=
  6128. JPEGLIBPATH=
  6129. JPEGLIB=
  6130. if test -n "$USE_JPEG"; then
  6131. # With JPEG includes directory
  6132. echo $ac_n "checking for location of JPEG includes""... $ac_c" 1>&6
  6133. echo "configure:7312: checking for location of JPEG includes" >&5
  6134. case "$with_jpeg_includes" in
  6135. y | ye | yes | n | no)
  6136. { echo "configure: error: *** You must supply a directory to --with-jpeg-includes." 1>&2; exit 1; }
  6137. ;;
  6138. esac
  6139. echo "$ac_t""$with_jpeg_includes" 1>&6
  6140. if test -n "$with_jpeg_includes" ; then
  6141. for dir in $with_jpeg_includes; do
  6142. if test -d "$dir"; then
  6143. JPEGINCPATH="$JPEGINCPATH -I$dir"
  6144. else
  6145. { echo "configure: error: *** JPEG includes directory $dir does not exist." 1>&2; exit 1; }
  6146. fi
  6147. done
  6148. fi
  6149. ac_save_cppflags="$CPPFLAGS"
  6150. CPPFLAGS="$JPEGINCPATH $CPPFLAGS"
  6151. for ac_hdr in jpeglib.h
  6152. do
  6153. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6154. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6155. echo "configure:7338: checking for $ac_hdr" >&5
  6156. cat > conftest.$ac_ext <<EOF
  6157. #line 7341 "configure"
  6158. #include "confdefs.h"
  6159. #include <$ac_hdr>
  6160. EOF
  6161. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6162. { (eval echo configure:7346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6163. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6164. if test -z "$ac_err"; then
  6165. rm -rf conftest*
  6166. eval "ac_cv_header_$ac_safe=yes"
  6167. else
  6168. echo "$ac_err" >&5
  6169. echo "configure: failed program was:" >&5
  6170. cat conftest.$ac_ext >&5
  6171. rm -rf conftest*
  6172. eval "ac_cv_header_$ac_safe=no"
  6173. fi
  6174. rm -f conftest*
  6175. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6176. echo "$ac_t""yes" 1>&6
  6177. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6178. cat >> confdefs.h <<EOF
  6179. #define $ac_tr_hdr 1
  6180. EOF
  6181. else
  6182. echo "$ac_t""no" 1>&6
  6183. { echo "configure: error: *** Unable to locate JPEG includes." 1>&2; exit 1; }
  6184. fi
  6185. done
  6186. CPPFLAGS=$ac_save_cppflags
  6187. # With JPEG library directory
  6188. echo $ac_n "checking for location of JPEG library""... $ac_c" 1>&6
  6189. echo "configure:7380: checking for location of JPEG library" >&5
  6190. case "$with_jpeg_libs" in
  6191. y | ye | yes | n | no)
  6192. { echo "configure: error: *** You must supply a directory to --with-jpeg-libs." 1>&2; exit 1; }
  6193. ;;
  6194. esac
  6195. echo "$ac_t""$with_jpeg_libs" 1>&6
  6196. if test -n "$with_jpeg_libs"; then
  6197. for dir in $with_jpeg_libs; do
  6198. if test -d "$dir"; then
  6199. JPEGLIBPATH="$JPEGLIBPATH -L$dir"
  6200. else
  6201. { echo "configure: error: *** JPEG library directory $dir does not exist." 1>&2; exit 1; }
  6202. fi
  6203. done
  6204. fi
  6205. ac_save_ldflags="$LDFLAGS"
  6206. LDFLAGS="$JPEGLIBPATH $LDFLAGS"
  6207. echo $ac_n "checking for jpeg_start_compress in -ljpeg""... $ac_c" 1>&6
  6208. echo "configure:7407: checking for jpeg_start_compress in -ljpeg" >&5
  6209. ac_lib_var=`echo jpeg'_'jpeg_start_compress | sed 'y%./+-%__p_%'`
  6210. ac_save_LIBS="$LIBS"
  6211. LIBS="-ljpeg $LIBS"
  6212. cat > conftest.$ac_ext <<EOF
  6213. #line 7413 "configure"
  6214. #include "confdefs.h"
  6215. /* Override any gcc2 internal prototype to avoid an error. */
  6216. /* We use char because int might match the return type of a gcc2
  6217. builtin and then its argument prototype would still apply. */
  6218. char jpeg_start_compress();
  6219. int main() {
  6220. jpeg_start_compress()
  6221. ; return 0; }
  6222. EOF
  6223. if { (eval echo configure:7424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6224. rm -rf conftest*
  6225. eval "ac_cv_lib_$ac_lib_var=yes"
  6226. else
  6227. echo "configure: failed program was:" >&5
  6228. cat conftest.$ac_ext >&5
  6229. rm -rf conftest*
  6230. eval "ac_cv_lib_$ac_lib_var=no"
  6231. fi
  6232. rm -f conftest*
  6233. LIBS="$ac_save_LIBS"
  6234. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6235. echo "$ac_t""yes" 1>&6
  6236. JPEGLIB="$JPEGLIB -ljpeg "
  6237. else
  6238. echo "$ac_t""no" 1>&6
  6239. echo $ac_n "checking for jpeg_start_compress in -ljpeg""... $ac_c" 1>&6
  6240. echo "configure:7443: checking for jpeg_start_compress in -ljpeg" >&5
  6241. ac_lib_var=`echo jpeg'_'jpeg_start_compress | sed 'y%./+-%__p_%'`
  6242. ac_save_LIBS="$LIBS"
  6243. LIBS="-ljpeg $ZLIB $LIBS"
  6244. cat > conftest.$ac_ext <<EOF
  6245. #line 7449 "configure"
  6246. #include "confdefs.h"
  6247. /* Override any gcc2 internal prototype to avoid an error. */
  6248. /* We use char because int might match the return type of a gcc2
  6249. builtin and then its argument prototype would still apply. */
  6250. char jpeg_start_compress();
  6251. int main() {
  6252. jpeg_start_compress()
  6253. ; return 0; }
  6254. EOF
  6255. if { (eval echo configure:7460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6256. rm -rf conftest*
  6257. eval "ac_cv_lib_$ac_lib_var=yes"
  6258. else
  6259. echo "configure: failed program was:" >&5
  6260. cat conftest.$ac_ext >&5
  6261. rm -rf conftest*
  6262. eval "ac_cv_lib_$ac_lib_var=no"
  6263. fi
  6264. rm -f conftest*
  6265. LIBS="$ac_save_LIBS"
  6266. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6267. echo "$ac_t""yes" 1>&6
  6268. JPEGLIB="$JPEGLIB -ljpeg $ZLIB"
  6269. else
  6270. echo "$ac_t""no" 1>&6
  6271. LDFLAGS=${ac_save_ldflags}
  6272. { echo "configure: error: *** Unable to locate JPEG library." 1>&2; exit 1; }
  6273. fi
  6274. fi
  6275. LDFLAGS=${ac_save_ldflags}
  6276. fi # $USE_JPEG
  6277. # Done checking JPEG
  6278. # GDAL option
  6279. echo $ac_n "checking whether to use GDAL""... $ac_c" 1>&6
  6280. echo "configure:7509: checking whether to use GDAL" >&5
  6281. GDAL_LIBS=
  6282. GDAL_CFLAGS=
  6283. USE_GDAL=
  6284. USE_OGR=
  6285. if test "`basename xx/$with_gdal`" = "gdal-config" ; then
  6286. GDAL_CONFIG="$with_gdal"
  6287. fi
  6288. if test "$with_gdal" = "no" ; then
  6289. echo "$ac_t""no" 1>&6
  6290. else
  6291. echo "$ac_t""yes" 1>&6
  6292. # Extract the first word of "gdal-config", so it can be a program name with args.
  6293. set dummy gdal-config; ac_word=$2
  6294. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  6295. echo "configure:7527: checking for $ac_word" >&5
  6296. case "$GDAL_CONFIG" in
  6297. /*)
  6298. ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a path.
  6299. ;;
  6300. ?:/*)
  6301. ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a dos path.
  6302. ;;
  6303. *)
  6304. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  6305. ac_dummy="$PATH"
  6306. for ac_dir in $ac_dummy; do
  6307. test -z "$ac_dir" && ac_dir=.
  6308. if test -f $ac_dir/$ac_word; then
  6309. ac_cv_path_GDAL_CONFIG="$ac_dir/$ac_word"
  6310. break
  6311. fi
  6312. done
  6313. IFS="$ac_save_ifs"
  6314. test -z "$ac_cv_path_GDAL_CONFIG" && ac_cv_path_GDAL_CONFIG="no"
  6315. ;;
  6316. esac
  6317. GDAL_CONFIG="$ac_cv_path_GDAL_CONFIG"
  6318. if test -n "$GDAL_CONFIG"; then
  6319. echo "$ac_t""$GDAL_CONFIG" 1>&6
  6320. else
  6321. echo "$ac_t""no" 1>&6
  6322. fi
  6323. if test "$GDAL_CONFIG" = "no" ; then
  6324. { echo "configure: error: *** couldn't find gdal-config" 1>&2; exit 1; }
  6325. fi
  6326. if test "$GDAL_CONFIG" != "" ; then
  6327. GDAL_LIBS=`"$GDAL_CONFIG" --libs`
  6328. GDAL_DEP_LIBS=`"$GDAL_CONFIG" --dep-libs`
  6329. GDAL_CFLAGS=`"$GDAL_CONFIG" --cflags`
  6330. USE_GDAL=1
  6331. if test `"$GDAL_CONFIG" --ogr-enabled` = "yes" ; then
  6332. cat >> confdefs.h <<\EOF
  6333. #define HAVE_OGR 1
  6334. EOF
  6335. USE_OGR=1
  6336. fi
  6337. fi
  6338. GDAL=
  6339. ac_save_libs="$LIBS"
  6340. ac_save_cflags="$CFLAGS"
  6341. LIBS="$LIBS $GDAL_LIBS"
  6342. CFLAGS="$CFLAGS $GDAL_CFLAGS"
  6343. cat > conftest.$ac_ext <<EOF
  6344. #line 7582 "configure"
  6345. #include "confdefs.h"
  6346. #include <gdal.h>
  6347. int main() {
  6348. GDALOpen("foo", GA_ReadOnly);
  6349. ; return 0; }
  6350. EOF
  6351. if { (eval echo configure:7589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6352. :
  6353. else
  6354. echo "configure: failed program was:" >&5
  6355. cat conftest.$ac_ext >&5
  6356. rm -rf conftest*
  6357. LIBS="$LIBS $GDAL_DEP_LIBS"
  6358. cat > conftest.$ac_ext <<EOF
  6359. #line 7598 "configure"
  6360. #include "confdefs.h"
  6361. #include <gdal.h>
  6362. int main() {
  6363. GDALOpen("foo", GA_ReadOnly);
  6364. ; return 0; }
  6365. EOF
  6366. if { (eval echo configure:7605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6367. rm -rf conftest*
  6368. GDAL_LIBS="$GDAL_LIBS $GDAL_DEP_LIBS"
  6369. else
  6370. echo "configure: failed program was:" >&5
  6371. cat conftest.$ac_ext >&5
  6372. rm -rf conftest*
  6373. { echo "configure: error: *** Unable to locate GDAL library." 1>&2; exit 1; }
  6374. fi
  6375. rm -f conftest*
  6376. fi
  6377. rm -f conftest*
  6378. LIBS=${ac_save_libs}
  6379. CFLAGS=${ac_save_cflags}
  6380. cat >> confdefs.h <<\EOF
  6381. #define HAVE_GDAL 1
  6382. EOF
  6383. fi
  6384. # GEOS option
  6385. echo $ac_n "checking whether to use GEOS""... $ac_c" 1>&6
  6386. echo "configure:7637: checking whether to use GEOS" >&5
  6387. GEOS_LIBS=
  6388. GGEOS_CFLAGS=
  6389. USE_GEOS=
  6390. if test "`basename xx/$with_geos`" = "geos-config" ; then
  6391. GEOS_CONFIG="$with_geos"
  6392. fi
  6393. if test "$with_geos" = "no" ; then
  6394. echo "$ac_t""no" 1>&6
  6395. else
  6396. echo "$ac_t""yes" 1>&6
  6397. # Extract the first word of "geos-config", so it can be a program name with args.
  6398. set dummy geos-config; ac_word=$2
  6399. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  6400. echo "configure:7654: checking for $ac_word" >&5
  6401. case "$GEOS_CONFIG" in
  6402. /*)
  6403. ac_cv_path_GEOS_CONFIG="$GEOS_CONFIG" # Let the user override the test with a path.
  6404. ;;
  6405. ?:/*)
  6406. ac_cv_path_GEOS_CONFIG="$GEOS_CONFIG" # Let the user override the test with a dos path.
  6407. ;;
  6408. *)
  6409. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  6410. ac_dummy="$PATH"
  6411. for ac_dir in $ac_dummy; do
  6412. test -z "$ac_dir" && ac_dir=.
  6413. if test -f $ac_dir/$ac_word; then
  6414. ac_cv_path_GEOS_CONFIG="$ac_dir/$ac_word"
  6415. break
  6416. fi
  6417. done
  6418. IFS="$ac_save_ifs"
  6419. test -z "$ac_cv_path_GEOS_CONFIG" && ac_cv_path_GEOS_CONFIG="no"
  6420. ;;
  6421. esac
  6422. GEOS_CONFIG="$ac_cv_path_GEOS_CONFIG"
  6423. if test -n "$GEOS_CONFIG"; then
  6424. echo "$ac_t""$GEOS_CONFIG" 1>&6
  6425. else
  6426. echo "$ac_t""no" 1>&6
  6427. fi
  6428. if test "$GEOS_CONFIG" = "no" ; then
  6429. { echo "configure: error: *** couldn't find geos-config" 1>&2; exit 1; }
  6430. fi
  6431. if test "$GEOS_CONFIG" != "" ; then
  6432. GEOS_LIBS=`"$GEOS_CONFIG" --libs`
  6433. GEOS_CFLAGS=`"$GEOS_CONFIG" --cflags`
  6434. USE_GEOS=1
  6435. fi
  6436. ac_save_cppflags="$CPPFLAGS"
  6437. CPPFLAGS="$GEOS_CFLAGS $CPPFLAGS"
  6438. for ac_hdr in geos_c.h
  6439. do
  6440. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6441. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6442. echo "configure:7702: checking for $ac_hdr" >&5
  6443. cat > conftest.$ac_ext <<EOF
  6444. #line 7705 "configure"
  6445. #include "confdefs.h"
  6446. #include <$ac_hdr>
  6447. EOF
  6448. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6449. { (eval echo configure:7710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6450. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6451. if test -z "$ac_err"; then
  6452. rm -rf conftest*
  6453. eval "ac_cv_header_$ac_safe=yes"
  6454. else
  6455. echo "$ac_err" >&5
  6456. echo "configure: failed program was:" >&5
  6457. cat conftest.$ac_ext >&5
  6458. rm -rf conftest*
  6459. eval "ac_cv_header_$ac_safe=no"
  6460. fi
  6461. rm -f conftest*
  6462. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6463. echo "$ac_t""yes" 1>&6
  6464. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6465. cat >> confdefs.h <<EOF
  6466. #define $ac_tr_hdr 1
  6467. EOF
  6468. else
  6469. echo "$ac_t""no" 1>&6
  6470. { echo "configure: error: *** Unable to locate GEOS includes." 1>&2; exit 1; }
  6471. fi
  6472. done
  6473. CPPFLAGS=$ac_save_cppflags
  6474. cat >> confdefs.h <<\EOF
  6475. #define HAVE_GEOS 1
  6476. EOF
  6477. fi
  6478. # Enable TIFF option
  6479. echo $ac_n "checking whether to use TIFF""... $ac_c" 1>&6
  6480. echo "configure:7754: checking whether to use TIFF" >&5
  6481. echo "$ac_t"""$with_tiff"" 1>&6
  6482. case "$with_tiff" in
  6483. "no") USE_TIFF= ;;
  6484. "yes") USE_TIFF="1" ;;
  6485. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6486. esac
  6487. TIFF_INCLUDE_DIRS=
  6488. TIFF_LIBRARY_DIRS=
  6489. TIFFLIB=
  6490. if test -n "$USE_TIFF"; then
  6491. # With TIFF includes directory
  6492. echo $ac_n "checking for location of TIFF includes""... $ac_c" 1>&6
  6493. echo "configure:7774: checking for location of TIFF includes" >&5
  6494. case "$with_tiff_includes" in
  6495. y | ye | yes | n | no)
  6496. { echo "configure: error: *** You must supply a directory to --with-tiff-includes." 1>&2; exit 1; }
  6497. ;;
  6498. esac
  6499. echo "$ac_t""$with_tiff_includes" 1>&6
  6500. if test -n "$with_tiff_includes" ; then
  6501. for dir in $with_tiff_includes; do
  6502. if test -d "$dir"; then
  6503. TIFF_INCLUDE_DIRS="$TIFF_INCLUDE_DIRS -I$dir"
  6504. else
  6505. { echo "configure: error: *** TIFF includes directory $dir does not exist." 1>&2; exit 1; }
  6506. fi
  6507. done
  6508. fi
  6509. ac_save_cppflags="$CPPFLAGS"
  6510. CPPFLAGS="$TIFF_INCLUDE_DIRS $CPPFLAGS"
  6511. for ac_hdr in tiffio.h
  6512. do
  6513. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6514. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6515. echo "configure:7800: checking for $ac_hdr" >&5
  6516. cat > conftest.$ac_ext <<EOF
  6517. #line 7803 "configure"
  6518. #include "confdefs.h"
  6519. #include <$ac_hdr>
  6520. EOF
  6521. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6522. { (eval echo configure:7808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6523. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6524. if test -z "$ac_err"; then
  6525. rm -rf conftest*
  6526. eval "ac_cv_header_$ac_safe=yes"
  6527. else
  6528. echo "$ac_err" >&5
  6529. echo "configure: failed program was:" >&5
  6530. cat conftest.$ac_ext >&5
  6531. rm -rf conftest*
  6532. eval "ac_cv_header_$ac_safe=no"
  6533. fi
  6534. rm -f conftest*
  6535. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6536. echo "$ac_t""yes" 1>&6
  6537. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6538. cat >> confdefs.h <<EOF
  6539. #define $ac_tr_hdr 1
  6540. EOF
  6541. else
  6542. echo "$ac_t""no" 1>&6
  6543. { echo "configure: error: *** Unable to locate TIFF includes." 1>&2; exit 1; }
  6544. fi
  6545. done
  6546. CPPFLAGS=$ac_save_cppflags
  6547. # With TIFF library directory
  6548. echo $ac_n "checking for location of TIFF library""... $ac_c" 1>&6
  6549. echo "configure:7842: checking for location of TIFF library" >&5
  6550. case "$with_tiff_libs" in
  6551. y | ye | yes | n | no)
  6552. { echo "configure: error: *** You must supply a directory to --with-tiff-libs." 1>&2; exit 1; }
  6553. ;;
  6554. esac
  6555. echo "$ac_t""$with_tiff_libs" 1>&6
  6556. if test -n "$with_tiff_libs"; then
  6557. for dir in $with_tiff_libs; do
  6558. if test -d "$dir"; then
  6559. TIFF_LIBRARY_DIRS="$TIFF_LIBRARY_DIRS -L$dir"
  6560. else
  6561. { echo "configure: error: *** TIFF library directory $dir does not exist." 1>&2; exit 1; }
  6562. fi
  6563. done
  6564. fi
  6565. ac_save_ldflags="$LDFLAGS"
  6566. LDFLAGS="$TIFF_LIBRARY_DIRS $LDFLAGS"
  6567. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6568. echo "configure:7873: checking for TIFFOpen in -ltiff" >&5
  6569. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6570. ac_save_LIBS="$LIBS"
  6571. LIBS="-ltiff $LIBS"
  6572. cat > conftest.$ac_ext <<EOF
  6573. #line 7879 "configure"
  6574. #include "confdefs.h"
  6575. /* Override any gcc2 internal prototype to avoid an error. */
  6576. /* We use char because int might match the return type of a gcc2
  6577. builtin and then its argument prototype would still apply. */
  6578. char TIFFOpen();
  6579. int main() {
  6580. TIFFOpen()
  6581. ; return 0; }
  6582. EOF
  6583. if { (eval echo configure:7890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6584. rm -rf conftest*
  6585. eval "ac_cv_lib_$ac_lib_var=yes"
  6586. else
  6587. echo "configure: failed program was:" >&5
  6588. cat conftest.$ac_ext >&5
  6589. rm -rf conftest*
  6590. eval "ac_cv_lib_$ac_lib_var=no"
  6591. fi
  6592. rm -f conftest*
  6593. LIBS="$ac_save_LIBS"
  6594. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6595. echo "$ac_t""yes" 1>&6
  6596. TIFFLIB="$TIFFLIB -ltiff "
  6597. else
  6598. echo "$ac_t""no" 1>&6
  6599. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6600. echo "configure:7909: checking for TIFFOpen in -ltiff" >&5
  6601. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6602. ac_save_LIBS="$LIBS"
  6603. LIBS="-ltiff $MATHLIB $LIBS"
  6604. cat > conftest.$ac_ext <<EOF
  6605. #line 7915 "configure"
  6606. #include "confdefs.h"
  6607. /* Override any gcc2 internal prototype to avoid an error. */
  6608. /* We use char because int might match the return type of a gcc2
  6609. builtin and then its argument prototype would still apply. */
  6610. char TIFFOpen();
  6611. int main() {
  6612. TIFFOpen()
  6613. ; return 0; }
  6614. EOF
  6615. if { (eval echo configure:7926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6616. rm -rf conftest*
  6617. eval "ac_cv_lib_$ac_lib_var=yes"
  6618. else
  6619. echo "configure: failed program was:" >&5
  6620. cat conftest.$ac_ext >&5
  6621. rm -rf conftest*
  6622. eval "ac_cv_lib_$ac_lib_var=no"
  6623. fi
  6624. rm -f conftest*
  6625. LIBS="$ac_save_LIBS"
  6626. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6627. echo "$ac_t""yes" 1>&6
  6628. TIFFLIB="$TIFFLIB -ltiff $MATHLIB"
  6629. else
  6630. echo "$ac_t""no" 1>&6
  6631. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6632. echo "configure:7945: checking for TIFFOpen in -ltiff" >&5
  6633. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6634. ac_save_LIBS="$LIBS"
  6635. LIBS="-ltiff $ZLIB $LIBS"
  6636. cat > conftest.$ac_ext <<EOF
  6637. #line 7951 "configure"
  6638. #include "confdefs.h"
  6639. /* Override any gcc2 internal prototype to avoid an error. */
  6640. /* We use char because int might match the return type of a gcc2
  6641. builtin and then its argument prototype would still apply. */
  6642. char TIFFOpen();
  6643. int main() {
  6644. TIFFOpen()
  6645. ; return 0; }
  6646. EOF
  6647. if { (eval echo configure:7962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6648. rm -rf conftest*
  6649. eval "ac_cv_lib_$ac_lib_var=yes"
  6650. else
  6651. echo "configure: failed program was:" >&5
  6652. cat conftest.$ac_ext >&5
  6653. rm -rf conftest*
  6654. eval "ac_cv_lib_$ac_lib_var=no"
  6655. fi
  6656. rm -f conftest*
  6657. LIBS="$ac_save_LIBS"
  6658. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6659. echo "$ac_t""yes" 1>&6
  6660. TIFFLIB="$TIFFLIB -ltiff $ZLIB"
  6661. else
  6662. echo "$ac_t""no" 1>&6
  6663. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6664. echo "configure:7981: checking for TIFFOpen in -ltiff" >&5
  6665. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6666. ac_save_LIBS="$LIBS"
  6667. LIBS="-ltiff $ZLIB $MATHLIB $LIBS"
  6668. cat > conftest.$ac_ext <<EOF
  6669. #line 7987 "configure"
  6670. #include "confdefs.h"
  6671. /* Override any gcc2 internal prototype to avoid an error. */
  6672. /* We use char because int might match the return type of a gcc2
  6673. builtin and then its argument prototype would still apply. */
  6674. char TIFFOpen();
  6675. int main() {
  6676. TIFFOpen()
  6677. ; return 0; }
  6678. EOF
  6679. if { (eval echo configure:7998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6680. rm -rf conftest*
  6681. eval "ac_cv_lib_$ac_lib_var=yes"
  6682. else
  6683. echo "configure: failed program was:" >&5
  6684. cat conftest.$ac_ext >&5
  6685. rm -rf conftest*
  6686. eval "ac_cv_lib_$ac_lib_var=no"
  6687. fi
  6688. rm -f conftest*
  6689. LIBS="$ac_save_LIBS"
  6690. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6691. echo "$ac_t""yes" 1>&6
  6692. TIFFLIB="$TIFFLIB -ltiff $ZLIB $MATHLIB"
  6693. else
  6694. echo "$ac_t""no" 1>&6
  6695. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6696. echo "configure:8017: checking for TIFFOpen in -ltiff" >&5
  6697. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6698. ac_save_LIBS="$LIBS"
  6699. LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $LIBS"
  6700. cat > conftest.$ac_ext <<EOF
  6701. #line 8023 "configure"
  6702. #include "confdefs.h"
  6703. /* Override any gcc2 internal prototype to avoid an error. */
  6704. /* We use char because int might match the return type of a gcc2
  6705. builtin and then its argument prototype would still apply. */
  6706. char TIFFOpen();
  6707. int main() {
  6708. TIFFOpen()
  6709. ; return 0; }
  6710. EOF
  6711. if { (eval echo configure:8034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6712. rm -rf conftest*
  6713. eval "ac_cv_lib_$ac_lib_var=yes"
  6714. else
  6715. echo "configure: failed program was:" >&5
  6716. cat conftest.$ac_ext >&5
  6717. rm -rf conftest*
  6718. eval "ac_cv_lib_$ac_lib_var=no"
  6719. fi
  6720. rm -f conftest*
  6721. LIBS="$ac_save_LIBS"
  6722. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6723. echo "$ac_t""yes" 1>&6
  6724. TIFFLIB="$TIFFLIB -ltiff $JPEGLIBPATH $JPEGLIB"
  6725. else
  6726. echo "$ac_t""no" 1>&6
  6727. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6728. echo "configure:8053: checking for TIFFOpen in -ltiff" >&5
  6729. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6730. ac_save_LIBS="$LIBS"
  6731. LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $MATHLIB $LIBS"
  6732. cat > conftest.$ac_ext <<EOF
  6733. #line 8059 "configure"
  6734. #include "confdefs.h"
  6735. /* Override any gcc2 internal prototype to avoid an error. */
  6736. /* We use char because int might match the return type of a gcc2
  6737. builtin and then its argument prototype would still apply. */
  6738. char TIFFOpen();
  6739. int main() {
  6740. TIFFOpen()
  6741. ; return 0; }
  6742. EOF
  6743. if { (eval echo configure:8070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6744. rm -rf conftest*
  6745. eval "ac_cv_lib_$ac_lib_var=yes"
  6746. else
  6747. echo "configure: failed program was:" >&5
  6748. cat conftest.$ac_ext >&5
  6749. rm -rf conftest*
  6750. eval "ac_cv_lib_$ac_lib_var=no"
  6751. fi
  6752. rm -f conftest*
  6753. LIBS="$ac_save_LIBS"
  6754. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6755. echo "$ac_t""yes" 1>&6
  6756. TIFFLIB="$TIFFLIB -ltiff $JPEGLIBPATH $JPEGLIB $MATHLIB"
  6757. else
  6758. echo "$ac_t""no" 1>&6
  6759. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6760. echo "configure:8089: checking for TIFFOpen in -ltiff" >&5
  6761. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6762. ac_save_LIBS="$LIBS"
  6763. LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $ZLIB $LIBS"
  6764. cat > conftest.$ac_ext <<EOF
  6765. #line 8095 "configure"
  6766. #include "confdefs.h"
  6767. /* Override any gcc2 internal prototype to avoid an error. */
  6768. /* We use char because int might match the return type of a gcc2
  6769. builtin and then its argument prototype would still apply. */
  6770. char TIFFOpen();
  6771. int main() {
  6772. TIFFOpen()
  6773. ; return 0; }
  6774. EOF
  6775. if { (eval echo configure:8106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6776. rm -rf conftest*
  6777. eval "ac_cv_lib_$ac_lib_var=yes"
  6778. else
  6779. echo "configure: failed program was:" >&5
  6780. cat conftest.$ac_ext >&5
  6781. rm -rf conftest*
  6782. eval "ac_cv_lib_$ac_lib_var=no"
  6783. fi
  6784. rm -f conftest*
  6785. LIBS="$ac_save_LIBS"
  6786. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6787. echo "$ac_t""yes" 1>&6
  6788. TIFFLIB="$TIFFLIB -ltiff $JPEGLIBPATH $JPEGLIB $ZLIB"
  6789. else
  6790. echo "$ac_t""no" 1>&6
  6791. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6792. echo "configure:8125: checking for TIFFOpen in -ltiff" >&5
  6793. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6794. ac_save_LIBS="$LIBS"
  6795. LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $ZLIB $MATHLIB $LIBS"
  6796. cat > conftest.$ac_ext <<EOF
  6797. #line 8131 "configure"
  6798. #include "confdefs.h"
  6799. /* Override any gcc2 internal prototype to avoid an error. */
  6800. /* We use char because int might match the return type of a gcc2
  6801. builtin and then its argument prototype would still apply. */
  6802. char TIFFOpen();
  6803. int main() {
  6804. TIFFOpen()
  6805. ; return 0; }
  6806. EOF
  6807. if { (eval echo configure:8142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6808. rm -rf conftest*
  6809. eval "ac_cv_lib_$ac_lib_var=yes"
  6810. else
  6811. echo "configure: failed program was:" >&5
  6812. cat conftest.$ac_ext >&5
  6813. rm -rf conftest*
  6814. eval "ac_cv_lib_$ac_lib_var=no"
  6815. fi
  6816. rm -f conftest*
  6817. LIBS="$ac_save_LIBS"
  6818. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6819. echo "$ac_t""yes" 1>&6
  6820. TIFFLIB="$TIFFLIB -ltiff $JPEGLIBPATH $JPEGLIB $ZLIB $MATHLIB"
  6821. else
  6822. echo "$ac_t""no" 1>&6
  6823. LDFLAGS=${ac_save_ldflags}
  6824. { echo "configure: error: *** Unable to locate TIFF library." 1>&2; exit 1; }
  6825. fi
  6826. fi
  6827. fi
  6828. fi
  6829. fi
  6830. fi
  6831. fi
  6832. fi
  6833. LDFLAGS=${ac_save_ldflags}
  6834. fi # $USE_TIFF
  6835. # Done checking TIFF
  6836. # Enable PNG option
  6837. echo $ac_n "checking whether to use PNG""... $ac_c" 1>&6
  6838. echo "configure:8240: checking whether to use PNG" >&5
  6839. echo "$ac_t"""$with_png"" 1>&6
  6840. case "$with_png" in
  6841. "no") USE_PNG= ;;
  6842. "yes") USE_PNG="1" ;;
  6843. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6844. esac
  6845. PNGINC=
  6846. PNGLIB=
  6847. if test -n "$USE_PNG"; then
  6848. # With PNG includes directory
  6849. echo $ac_n "checking for location of PNG includes""... $ac_c" 1>&6
  6850. echo "configure:8259: checking for location of PNG includes" >&5
  6851. case "$with_png_includes" in
  6852. y | ye | yes | n | no)
  6853. { echo "configure: error: *** You must supply a directory to --with-png-includes." 1>&2; exit 1; }
  6854. ;;
  6855. esac
  6856. echo "$ac_t""$with_png_includes" 1>&6
  6857. if test -n "$with_png_includes" ; then
  6858. for dir in $with_png_includes; do
  6859. if test -d "$dir"; then
  6860. PNGINC="$PNGINC -I$dir"
  6861. else
  6862. { echo "configure: error: *** PNG includes directory $dir does not exist." 1>&2; exit 1; }
  6863. fi
  6864. done
  6865. fi
  6866. ac_save_cppflags="$CPPFLAGS"
  6867. CPPFLAGS="$PNGINC $CPPFLAGS"
  6868. for ac_hdr in png.h
  6869. do
  6870. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6871. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6872. echo "configure:8285: checking for $ac_hdr" >&5
  6873. cat > conftest.$ac_ext <<EOF
  6874. #line 8288 "configure"
  6875. #include "confdefs.h"
  6876. #include <$ac_hdr>
  6877. EOF
  6878. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6879. { (eval echo configure:8293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6880. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6881. if test -z "$ac_err"; then
  6882. rm -rf conftest*
  6883. eval "ac_cv_header_$ac_safe=yes"
  6884. else
  6885. echo "$ac_err" >&5
  6886. echo "configure: failed program was:" >&5
  6887. cat conftest.$ac_ext >&5
  6888. rm -rf conftest*
  6889. eval "ac_cv_header_$ac_safe=no"
  6890. fi
  6891. rm -f conftest*
  6892. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6893. echo "$ac_t""yes" 1>&6
  6894. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6895. cat >> confdefs.h <<EOF
  6896. #define $ac_tr_hdr 1
  6897. EOF
  6898. else
  6899. echo "$ac_t""no" 1>&6
  6900. { echo "configure: error: *** Unable to locate PNG includes." 1>&2; exit 1; }
  6901. fi
  6902. done
  6903. CPPFLAGS=$ac_save_cppflags
  6904. # With PNG library directory
  6905. echo $ac_n "checking for location of PNG library""... $ac_c" 1>&6
  6906. echo "configure:8327: checking for location of PNG library" >&5
  6907. case "$with_png_libs" in
  6908. y | ye | yes | n | no)
  6909. { echo "configure: error: *** You must supply a directory to --with-png-libs." 1>&2; exit 1; }
  6910. ;;
  6911. esac
  6912. echo "$ac_t""$with_png_libs" 1>&6
  6913. if test -n "$with_png_libs"; then
  6914. for dir in $with_png_libs; do
  6915. if test -d "$dir"; then
  6916. PNGLIB="$PNGLIB -L$dir"
  6917. else
  6918. { echo "configure: error: *** PNG library directory $dir does not exist." 1>&2; exit 1; }
  6919. fi
  6920. done
  6921. fi
  6922. ac_save_ldflags="$LDFLAGS"
  6923. LDFLAGS="$PNGLIB $LDFLAGS"
  6924. echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
  6925. echo "configure:8352: checking for png_read_image in -lpng" >&5
  6926. ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
  6927. ac_save_LIBS="$LIBS"
  6928. LIBS="-lpng $ZLIB $MATHLIB $LIBS"
  6929. cat > conftest.$ac_ext <<EOF
  6930. #line 8358 "configure"
  6931. #include "confdefs.h"
  6932. /* Override any gcc2 internal prototype to avoid an error. */
  6933. /* We use char because int might match the return type of a gcc2
  6934. builtin and then its argument prototype would still apply. */
  6935. char png_read_image();
  6936. int main() {
  6937. png_read_image()
  6938. ; return 0; }
  6939. EOF
  6940. if { (eval echo configure:8369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6941. rm -rf conftest*
  6942. eval "ac_cv_lib_$ac_lib_var=yes"
  6943. else
  6944. echo "configure: failed program was:" >&5
  6945. cat conftest.$ac_ext >&5
  6946. rm -rf conftest*
  6947. eval "ac_cv_lib_$ac_lib_var=no"
  6948. fi
  6949. rm -f conftest*
  6950. LIBS="$ac_save_LIBS"
  6951. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6952. echo "$ac_t""yes" 1>&6
  6953. PNGLIB="$PNGLIB -lpng $ZLIB $MATHLIB"
  6954. else
  6955. echo "$ac_t""no" 1>&6
  6956. LDFLAGS=${ac_save_ldflags}
  6957. { echo "configure: error: *** Unable to locate PNG library." 1>&2; exit 1; }
  6958. fi
  6959. LDFLAGS=${ac_save_ldflags}
  6960. fi # $USE_PNG
  6961. # Done checking PNG
  6962. # Enable TCLTK option
  6963. echo $ac_n "checking whether to use Tcl/Tk""... $ac_c" 1>&6
  6964. echo "configure:8411: checking whether to use Tcl/Tk" >&5
  6965. echo "$ac_t"""$with_tcltk"" 1>&6
  6966. case "$with_tcltk" in
  6967. "no") USE_TCLTK= ;;
  6968. "yes") USE_TCLTK="1" ;;
  6969. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6970. esac
  6971. TCLINCDIR=
  6972. TCLTKLIBPATH=
  6973. TCLTKLIBS=
  6974. if test -n "$USE_TCLTK"; then
  6975. # With Tcl/Tk includes directory
  6976. echo $ac_n "checking for location of Tcl/Tk includes""... $ac_c" 1>&6
  6977. echo "configure:8431: checking for location of Tcl/Tk includes" >&5
  6978. case "$with_tcltk_includes" in
  6979. y | ye | yes | n | no)
  6980. { echo "configure: error: *** You must supply a directory to --with-tcltk-includes." 1>&2; exit 1; }
  6981. ;;
  6982. esac
  6983. echo "$ac_t""$with_tcltk_includes" 1>&6
  6984. if test -n "$with_tcltk_includes" ; then
  6985. for dir in $with_tcltk_includes; do
  6986. if test -d "$dir"; then
  6987. TCLINCDIR="$TCLINCDIR -I$dir"
  6988. else
  6989. { echo "configure: error: *** Tcl/Tk includes directory $dir does not exist." 1>&2; exit 1; }
  6990. fi
  6991. done
  6992. fi
  6993. ac_save_cppflags="$CPPFLAGS"
  6994. CPPFLAGS="$TCLINCDIR $CPPFLAGS"
  6995. for ac_hdr in tcl.h
  6996. do
  6997. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6998. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6999. echo "configure:8457: checking for $ac_hdr" >&5
  7000. cat > conftest.$ac_ext <<EOF
  7001. #line 8460 "configure"
  7002. #include "confdefs.h"
  7003. #include <$ac_hdr>
  7004. EOF
  7005. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7006. { (eval echo configure:8465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7007. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7008. if test -z "$ac_err"; then
  7009. rm -rf conftest*
  7010. eval "ac_cv_header_$ac_safe=yes"
  7011. else
  7012. echo "$ac_err" >&5
  7013. echo "configure: failed program was:" >&5
  7014. cat conftest.$ac_ext >&5
  7015. rm -rf conftest*
  7016. eval "ac_cv_header_$ac_safe=no"
  7017. fi
  7018. rm -f conftest*
  7019. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7020. echo "$ac_t""yes" 1>&6
  7021. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7022. cat >> confdefs.h <<EOF
  7023. #define $ac_tr_hdr 1
  7024. EOF
  7025. else
  7026. echo "$ac_t""no" 1>&6
  7027. { echo "configure: error: *** Unable to locate Tcl includes." 1>&2; exit 1; }
  7028. fi
  7029. done
  7030. CPPFLAGS=$ac_save_cppflags
  7031. ac_save_cppflags="$CPPFLAGS"
  7032. CPPFLAGS="$TCLINCDIR $X_CFLAGS $CPPFLAGS"
  7033. for ac_hdr in tk.h
  7034. do
  7035. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7036. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7037. echo "configure:8502: checking for $ac_hdr" >&5
  7038. cat > conftest.$ac_ext <<EOF
  7039. #line 8505 "configure"
  7040. #include "confdefs.h"
  7041. #include <$ac_hdr>
  7042. EOF
  7043. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7044. { (eval echo configure:8510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7045. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7046. if test -z "$ac_err"; then
  7047. rm -rf conftest*
  7048. eval "ac_cv_header_$ac_safe=yes"
  7049. else
  7050. echo "$ac_err" >&5
  7051. echo "configure: failed program was:" >&5
  7052. cat conftest.$ac_ext >&5
  7053. rm -rf conftest*
  7054. eval "ac_cv_header_$ac_safe=no"
  7055. fi
  7056. rm -f conftest*
  7057. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7058. echo "$ac_t""yes" 1>&6
  7059. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7060. cat >> confdefs.h <<EOF
  7061. #define $ac_tr_hdr 1
  7062. EOF
  7063. else
  7064. echo "$ac_t""no" 1>&6
  7065. { echo "configure: error: *** Unable to locate Tk includes." 1>&2; exit 1; }
  7066. fi
  7067. done
  7068. CPPFLAGS=$ac_save_cppflags
  7069. # Tcl/Tk version checks
  7070. echo $ac_n "checking Tcl version""... $ac_c" 1>&6
  7071. echo "configure:8544: checking Tcl version" >&5
  7072. ac_save_cppflags="$CPPFLAGS"
  7073. CPPFLAGS="$TCLINCDIR $CPPFLAGS"
  7074. if test "$cross_compiling" = yes; then
  7075. tcl_ver=UNKNOWN
  7076. echo "$ac_t""unknown (cross-compiling)" 1>&6
  7077. else
  7078. cat > conftest.$ac_ext <<EOF
  7079. #line 8552 "configure"
  7080. #include "confdefs.h"
  7081. #include <stdio.h>
  7082. #include <tcl.h>
  7083. int main(void) {
  7084. FILE *fp = fopen("conftestdata","w");
  7085. fputs(TCL_VERSION, fp);
  7086. return 0;
  7087. }
  7088. EOF
  7089. if { (eval echo configure:8564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  7090. then
  7091. tcl_ver=`cat conftestdata`
  7092. echo "$ac_t""$tcl_ver" 1>&6
  7093. else
  7094. echo "configure: failed program was:" >&5
  7095. cat conftest.$ac_ext >&5
  7096. rm -fr conftest*
  7097. { echo "configure: error: *** Could not determine Tcl version." 1>&2; exit 1; }
  7098. fi
  7099. rm -fr conftest*
  7100. fi
  7101. CPPFLAGS=$ac_save_cppflags
  7102. echo $ac_n "checking Tk version""... $ac_c" 1>&6
  7103. echo "configure:8582: checking Tk version" >&5
  7104. ac_save_cppflags="$CPPFLAGS"
  7105. CPPFLAGS="$TCLINCDIR $X_CFLAGS $CPPFLAGS"
  7106. if test "$cross_compiling" = yes; then
  7107. tk_ver=UNKNOWN
  7108. echo "$ac_t""unknown (cross-compiling)" 1>&6
  7109. else
  7110. cat > conftest.$ac_ext <<EOF
  7111. #line 8590 "configure"
  7112. #include "confdefs.h"
  7113. #include <stdio.h>
  7114. #include <tk.h>
  7115. int main(void) {
  7116. FILE *fp = fopen("conftestdata","w");
  7117. fputs(TK_VERSION, fp);
  7118. return 0;
  7119. }
  7120. EOF
  7121. if { (eval echo configure:8602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  7122. then
  7123. tk_ver=`cat conftestdata`
  7124. echo "$ac_t""$tk_ver" 1>&6
  7125. else
  7126. echo "configure: failed program was:" >&5
  7127. cat conftest.$ac_ext >&5
  7128. rm -fr conftest*
  7129. { echo "configure: error: *** Could not determine Tk version." 1>&2; exit 1; }
  7130. fi
  7131. rm -fr conftest*
  7132. fi
  7133. CPPFLAGS=$ac_save_cppflags
  7134. if test "$tcl_ver" = "$tk_ver" ; then
  7135. tcltk_ver=$tcl_ver
  7136. else
  7137. { echo "configure: error: *** Tcl/Tk version mismatch." 1>&2; exit 1; }
  7138. fi
  7139. # FreeBSD and CygWin don't have a "dot" between major/minor version number
  7140. tcltk_ver2=`echo $tcltk_ver | sed 's/\.//g'`
  7141. # With Tcl/Tk library directory
  7142. echo $ac_n "checking for location of Tcl/Tk library""... $ac_c" 1>&6
  7143. echo "configure:8631: checking for location of Tcl/Tk library" >&5
  7144. case "$with_tcltk_libs" in
  7145. y | ye | yes | n | no)
  7146. { echo "configure: error: *** You must supply a directory to --with-tcltk-libs." 1>&2; exit 1; }
  7147. ;;
  7148. esac
  7149. echo "$ac_t""$with_tcltk_libs" 1>&6
  7150. if test -n "$with_tcltk_libs"; then
  7151. for dir in $with_tcltk_libs; do
  7152. if test -d "$dir"; then
  7153. TCLTKLIBPATH="$TCLTKLIBPATH -L$dir"
  7154. else
  7155. { echo "configure: error: *** Tcl/Tk library directory $dir does not exist." 1>&2; exit 1; }
  7156. fi
  7157. done
  7158. fi
  7159. TCLLIB=
  7160. TKLIB=
  7161. ac_save_ldflags="$LDFLAGS"
  7162. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  7163. echo $ac_n "checking for Tcl_Init in -ltcl""... $ac_c" 1>&6
  7164. echo "configure:8661: checking for Tcl_Init in -ltcl" >&5
  7165. ac_lib_var=`echo tcl'_'Tcl_Init | sed 'y%./+-%__p_%'`
  7166. ac_save_LIBS="$LIBS"
  7167. LIBS="-ltcl $MATHLIB $LIBS"
  7168. cat > conftest.$ac_ext <<EOF
  7169. #line 8667 "configure"
  7170. #include "confdefs.h"
  7171. /* Override any gcc2 internal prototype to avoid an error. */
  7172. /* We use char because int might match the return type of a gcc2
  7173. builtin and then its argument prototype would still apply. */
  7174. char Tcl_Init();
  7175. int main() {
  7176. Tcl_Init()
  7177. ; return 0; }
  7178. EOF
  7179. if { (eval echo configure:8678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7180. rm -rf conftest*
  7181. eval "ac_cv_lib_$ac_lib_var=yes"
  7182. else
  7183. echo "configure: failed program was:" >&5
  7184. cat conftest.$ac_ext >&5
  7185. rm -rf conftest*
  7186. eval "ac_cv_lib_$ac_lib_var=no"
  7187. fi
  7188. rm -f conftest*
  7189. LIBS="$ac_save_LIBS"
  7190. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7191. echo "$ac_t""yes" 1>&6
  7192. TCLLIB="$TCLLIB -ltcl $MATHLIB"
  7193. else
  7194. echo "$ac_t""no" 1>&6
  7195. echo $ac_n "checking for Tcl_Init in -ltcl""... $ac_c" 1>&6
  7196. echo "configure:8697: checking for Tcl_Init in -ltcl" >&5
  7197. ac_lib_var=`echo tcl'_'Tcl_Init | sed 'y%./+-%__p_%'`
  7198. ac_save_LIBS="$LIBS"
  7199. LIBS="-ltcl $MATHLIB $DLLIB $LIBS"
  7200. cat > conftest.$ac_ext <<EOF
  7201. #line 8703 "configure"
  7202. #include "confdefs.h"
  7203. /* Override any gcc2 internal prototype to avoid an error. */
  7204. /* We use char because int might match the return type of a gcc2
  7205. builtin and then its argument prototype would still apply. */
  7206. char Tcl_Init();
  7207. int main() {
  7208. Tcl_Init()
  7209. ; return 0; }
  7210. EOF
  7211. if { (eval echo configure:8714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7212. rm -rf conftest*
  7213. eval "ac_cv_lib_$ac_lib_var=yes"
  7214. else
  7215. echo "configure: failed program was:" >&5
  7216. cat conftest.$ac_ext >&5
  7217. rm -rf conftest*
  7218. eval "ac_cv_lib_$ac_lib_var=no"
  7219. fi
  7220. rm -f conftest*
  7221. LIBS="$ac_save_LIBS"
  7222. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7223. echo "$ac_t""yes" 1>&6
  7224. TCLLIB="$TCLLIB -ltcl $MATHLIB $DLLIB"
  7225. else
  7226. echo "$ac_t""no" 1>&6
  7227. LDFLAGS=${ac_save_ldflags}
  7228. ac_save_ldflags="$LDFLAGS"
  7229. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  7230. echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver""... $ac_c" 1>&6
  7231. echo "configure:8741: checking for Tcl_Init in -ltcl$tcltk_ver" >&5
  7232. ac_lib_var=`echo tcl$tcltk_ver'_'Tcl_Init | sed 'y%./+-%__p_%'`
  7233. ac_save_LIBS="$LIBS"
  7234. LIBS="-ltcl$tcltk_ver $MATHLIB $LIBS"
  7235. cat > conftest.$ac_ext <<EOF
  7236. #line 8747 "configure"
  7237. #include "confdefs.h"
  7238. /* Override any gcc2 internal prototype to avoid an error. */
  7239. /* We use char because int might match the return type of a gcc2
  7240. builtin and then its argument prototype would still apply. */
  7241. char Tcl_Init();
  7242. int main() {
  7243. Tcl_Init()
  7244. ; return 0; }
  7245. EOF
  7246. if { (eval echo configure:8758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7247. rm -rf conftest*
  7248. eval "ac_cv_lib_$ac_lib_var=yes"
  7249. else
  7250. echo "configure: failed program was:" >&5
  7251. cat conftest.$ac_ext >&5
  7252. rm -rf conftest*
  7253. eval "ac_cv_lib_$ac_lib_var=no"
  7254. fi
  7255. rm -f conftest*
  7256. LIBS="$ac_save_LIBS"
  7257. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7258. echo "$ac_t""yes" 1>&6
  7259. TCLLIB="$TCLLIB -ltcl$tcltk_ver $MATHLIB"
  7260. else
  7261. echo "$ac_t""no" 1>&6
  7262. echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver""... $ac_c" 1>&6
  7263. echo "configure:8777: checking for Tcl_Init in -ltcl$tcltk_ver" >&5
  7264. ac_lib_var=`echo tcl$tcltk_ver'_'Tcl_Init | sed 'y%./+-%__p_%'`
  7265. ac_save_LIBS="$LIBS"
  7266. LIBS="-ltcl$tcltk_ver $MATHLIB $DLLIB $LIBS"
  7267. cat > conftest.$ac_ext <<EOF
  7268. #line 8783 "configure"
  7269. #include "confdefs.h"
  7270. /* Override any gcc2 internal prototype to avoid an error. */
  7271. /* We use char because int might match the return type of a gcc2
  7272. builtin and then its argument prototype would still apply. */
  7273. char Tcl_Init();
  7274. int main() {
  7275. Tcl_Init()
  7276. ; return 0; }
  7277. EOF
  7278. if { (eval echo configure:8794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7279. rm -rf conftest*
  7280. eval "ac_cv_lib_$ac_lib_var=yes"
  7281. else
  7282. echo "configure: failed program was:" >&5
  7283. cat conftest.$ac_ext >&5
  7284. rm -rf conftest*
  7285. eval "ac_cv_lib_$ac_lib_var=no"
  7286. fi
  7287. rm -f conftest*
  7288. LIBS="$ac_save_LIBS"
  7289. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7290. echo "$ac_t""yes" 1>&6
  7291. TCLLIB="$TCLLIB -ltcl$tcltk_ver $MATHLIB $DLLIB"
  7292. else
  7293. echo "$ac_t""no" 1>&6
  7294. LDFLAGS=${ac_save_ldflags}
  7295. ac_save_ldflags="$LDFLAGS"
  7296. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  7297. echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver2""... $ac_c" 1>&6
  7298. echo "configure:8821: checking for Tcl_Init in -ltcl$tcltk_ver2" >&5
  7299. ac_lib_var=`echo tcl$tcltk_ver2'_'Tcl_Init | sed 'y%./+-%__p_%'`
  7300. ac_save_LIBS="$LIBS"
  7301. LIBS="-ltcl$tcltk_ver2 $MATHLIB $LIBS"
  7302. cat > conftest.$ac_ext <<EOF
  7303. #line 8827 "configure"
  7304. #include "confdefs.h"
  7305. /* Override any gcc2 internal prototype to avoid an error. */
  7306. /* We use char because int might match the return type of a gcc2
  7307. builtin and then its argument prototype would still apply. */
  7308. char Tcl_Init();
  7309. int main() {
  7310. Tcl_Init()
  7311. ; return 0; }
  7312. EOF
  7313. if { (eval echo configure:8838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7314. rm -rf conftest*
  7315. eval "ac_cv_lib_$ac_lib_var=yes"
  7316. else
  7317. echo "configure: failed program was:" >&5
  7318. cat conftest.$ac_ext >&5
  7319. rm -rf conftest*
  7320. eval "ac_cv_lib_$ac_lib_var=no"
  7321. fi
  7322. rm -f conftest*
  7323. LIBS="$ac_save_LIBS"
  7324. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7325. echo "$ac_t""yes" 1>&6
  7326. TCLLIB="$TCLLIB -ltcl$tcltk_ver2 $MATHLIB"
  7327. else
  7328. echo "$ac_t""no" 1>&6
  7329. echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver2""... $ac_c" 1>&6
  7330. echo "configure:8857: checking for Tcl_Init in -ltcl$tcltk_ver2" >&5
  7331. ac_lib_var=`echo tcl$tcltk_ver2'_'Tcl_Init | sed 'y%./+-%__p_%'`
  7332. ac_save_LIBS="$LIBS"
  7333. LIBS="-ltcl$tcltk_ver2 $MATHLIB $DLLIB $LIBS"
  7334. cat > conftest.$ac_ext <<EOF
  7335. #line 8863 "configure"
  7336. #include "confdefs.h"
  7337. /* Override any gcc2 internal prototype to avoid an error. */
  7338. /* We use char because int might match the return type of a gcc2
  7339. builtin and then its argument prototype would still apply. */
  7340. char Tcl_Init();
  7341. int main() {
  7342. Tcl_Init()
  7343. ; return 0; }
  7344. EOF
  7345. if { (eval echo configure:8874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7346. rm -rf conftest*
  7347. eval "ac_cv_lib_$ac_lib_var=yes"
  7348. else
  7349. echo "configure: failed program was:" >&5
  7350. cat conftest.$ac_ext >&5
  7351. rm -rf conftest*
  7352. eval "ac_cv_lib_$ac_lib_var=no"
  7353. fi
  7354. rm -f conftest*
  7355. LIBS="$ac_save_LIBS"
  7356. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7357. echo "$ac_t""yes" 1>&6
  7358. TCLLIB="$TCLLIB -ltcl$tcltk_ver2 $MATHLIB $DLLIB"
  7359. else
  7360. echo "$ac_t""no" 1>&6
  7361. LDFLAGS=${ac_save_ldflags}
  7362. { echo "configure: error: *** Unable to locate Tcl library." 1>&2; exit 1; }
  7363. fi
  7364. fi
  7365. LDFLAGS=${ac_save_ldflags}
  7366. fi
  7367. fi
  7368. LDFLAGS=${ac_save_ldflags}
  7369. fi
  7370. fi
  7371. LDFLAGS=${ac_save_ldflags}
  7372. ac_save_ldflags="$LDFLAGS"
  7373. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  7374. echo $ac_n "checking for Tk_MainWindow in -ltk""... $ac_c" 1>&6
  7375. echo "configure:8952: checking for Tk_MainWindow in -ltk" >&5
  7376. ac_lib_var=`echo tk'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  7377. ac_save_LIBS="$LIBS"
  7378. LIBS="-ltk $TCLLIB $MATHLIB $LIBS"
  7379. cat > conftest.$ac_ext <<EOF
  7380. #line 8958 "configure"
  7381. #include "confdefs.h"
  7382. /* Override any gcc2 internal prototype to avoid an error. */
  7383. /* We use char because int might match the return type of a gcc2
  7384. builtin and then its argument prototype would still apply. */
  7385. char Tk_MainWindow();
  7386. int main() {
  7387. Tk_MainWindow()
  7388. ; return 0; }
  7389. EOF
  7390. if { (eval echo configure:8969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7391. rm -rf conftest*
  7392. eval "ac_cv_lib_$ac_lib_var=yes"
  7393. else
  7394. echo "configure: failed program was:" >&5
  7395. cat conftest.$ac_ext >&5
  7396. rm -rf conftest*
  7397. eval "ac_cv_lib_$ac_lib_var=no"
  7398. fi
  7399. rm -f conftest*
  7400. LIBS="$ac_save_LIBS"
  7401. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7402. echo "$ac_t""yes" 1>&6
  7403. TKLIB="$TKLIB -ltk $MATHLIB"
  7404. else
  7405. echo "$ac_t""no" 1>&6
  7406. echo $ac_n "checking for Tk_MainWindow in -ltk""... $ac_c" 1>&6
  7407. echo "configure:8988: checking for Tk_MainWindow in -ltk" >&5
  7408. ac_lib_var=`echo tk'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  7409. ac_save_LIBS="$LIBS"
  7410. LIBS="-ltk $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
  7411. cat > conftest.$ac_ext <<EOF
  7412. #line 8994 "configure"
  7413. #include "confdefs.h"
  7414. /* Override any gcc2 internal prototype to avoid an error. */
  7415. /* We use char because int might match the return type of a gcc2
  7416. builtin and then its argument prototype would still apply. */
  7417. char Tk_MainWindow();
  7418. int main() {
  7419. Tk_MainWindow()
  7420. ; return 0; }
  7421. EOF
  7422. if { (eval echo configure:9005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7423. rm -rf conftest*
  7424. eval "ac_cv_lib_$ac_lib_var=yes"
  7425. else
  7426. echo "configure: failed program was:" >&5
  7427. cat conftest.$ac_ext >&5
  7428. rm -rf conftest*
  7429. eval "ac_cv_lib_$ac_lib_var=no"
  7430. fi
  7431. rm -f conftest*
  7432. LIBS="$ac_save_LIBS"
  7433. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7434. echo "$ac_t""yes" 1>&6
  7435. TKLIB="$TKLIB -ltk $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
  7436. else
  7437. echo "$ac_t""no" 1>&6
  7438. LDFLAGS=${ac_save_ldflags}
  7439. ac_save_ldflags="$LDFLAGS"
  7440. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  7441. echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver""... $ac_c" 1>&6
  7442. echo "configure:9032: checking for Tk_MainWindow in -ltk$tcltk_ver" >&5
  7443. ac_lib_var=`echo tk$tcltk_ver'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  7444. ac_save_LIBS="$LIBS"
  7445. LIBS="-ltk$tcltk_ver $TCLLIB $MATHLIB $LIBS"
  7446. cat > conftest.$ac_ext <<EOF
  7447. #line 9038 "configure"
  7448. #include "confdefs.h"
  7449. /* Override any gcc2 internal prototype to avoid an error. */
  7450. /* We use char because int might match the return type of a gcc2
  7451. builtin and then its argument prototype would still apply. */
  7452. char Tk_MainWindow();
  7453. int main() {
  7454. Tk_MainWindow()
  7455. ; return 0; }
  7456. EOF
  7457. if { (eval echo configure:9049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7458. rm -rf conftest*
  7459. eval "ac_cv_lib_$ac_lib_var=yes"
  7460. else
  7461. echo "configure: failed program was:" >&5
  7462. cat conftest.$ac_ext >&5
  7463. rm -rf conftest*
  7464. eval "ac_cv_lib_$ac_lib_var=no"
  7465. fi
  7466. rm -f conftest*
  7467. LIBS="$ac_save_LIBS"
  7468. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7469. echo "$ac_t""yes" 1>&6
  7470. TKLIB="$TKLIB -ltk$tcltk_ver $MATHLIB"
  7471. else
  7472. echo "$ac_t""no" 1>&6
  7473. echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver""... $ac_c" 1>&6
  7474. echo "configure:9068: checking for Tk_MainWindow in -ltk$tcltk_ver" >&5
  7475. ac_lib_var=`echo tk$tcltk_ver'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  7476. ac_save_LIBS="$LIBS"
  7477. LIBS="-ltk$tcltk_ver $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
  7478. cat > conftest.$ac_ext <<EOF
  7479. #line 9074 "configure"
  7480. #include "confdefs.h"
  7481. /* Override any gcc2 internal prototype to avoid an error. */
  7482. /* We use char because int might match the return type of a gcc2
  7483. builtin and then its argument prototype would still apply. */
  7484. char Tk_MainWindow();
  7485. int main() {
  7486. Tk_MainWindow()
  7487. ; return 0; }
  7488. EOF
  7489. if { (eval echo configure:9085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7490. rm -rf conftest*
  7491. eval "ac_cv_lib_$ac_lib_var=yes"
  7492. else
  7493. echo "configure: failed program was:" >&5
  7494. cat conftest.$ac_ext >&5
  7495. rm -rf conftest*
  7496. eval "ac_cv_lib_$ac_lib_var=no"
  7497. fi
  7498. rm -f conftest*
  7499. LIBS="$ac_save_LIBS"
  7500. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7501. echo "$ac_t""yes" 1>&6
  7502. TKLIB="$TKLIB -ltk$tcltk_ver $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
  7503. else
  7504. echo "$ac_t""no" 1>&6
  7505. LDFLAGS=${ac_save_ldflags}
  7506. ac_save_ldflags="$LDFLAGS"
  7507. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  7508. echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver2""... $ac_c" 1>&6
  7509. echo "configure:9112: checking for Tk_MainWindow in -ltk$tcltk_ver2" >&5
  7510. ac_lib_var=`echo tk$tcltk_ver2'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  7511. ac_save_LIBS="$LIBS"
  7512. LIBS="-ltk$tcltk_ver2 $TCLLIB $MATHLIB $LIBS"
  7513. cat > conftest.$ac_ext <<EOF
  7514. #line 9118 "configure"
  7515. #include "confdefs.h"
  7516. /* Override any gcc2 internal prototype to avoid an error. */
  7517. /* We use char because int might match the return type of a gcc2
  7518. builtin and then its argument prototype would still apply. */
  7519. char Tk_MainWindow();
  7520. int main() {
  7521. Tk_MainWindow()
  7522. ; return 0; }
  7523. EOF
  7524. if { (eval echo configure:9129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7525. rm -rf conftest*
  7526. eval "ac_cv_lib_$ac_lib_var=yes"
  7527. else
  7528. echo "configure: failed program was:" >&5
  7529. cat conftest.$ac_ext >&5
  7530. rm -rf conftest*
  7531. eval "ac_cv_lib_$ac_lib_var=no"
  7532. fi
  7533. rm -f conftest*
  7534. LIBS="$ac_save_LIBS"
  7535. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7536. echo "$ac_t""yes" 1>&6
  7537. TKLIB="$TKLIB -ltk$tcltk_ver2 $MATHLIB"
  7538. else
  7539. echo "$ac_t""no" 1>&6
  7540. echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver2""... $ac_c" 1>&6
  7541. echo "configure:9148: checking for Tk_MainWindow in -ltk$tcltk_ver2" >&5
  7542. ac_lib_var=`echo tk$tcltk_ver2'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  7543. ac_save_LIBS="$LIBS"
  7544. LIBS="-ltk$tcltk_ver2 $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
  7545. cat > conftest.$ac_ext <<EOF
  7546. #line 9154 "configure"
  7547. #include "confdefs.h"
  7548. /* Override any gcc2 internal prototype to avoid an error. */
  7549. /* We use char because int might match the return type of a gcc2
  7550. builtin and then its argument prototype would still apply. */
  7551. char Tk_MainWindow();
  7552. int main() {
  7553. Tk_MainWindow()
  7554. ; return 0; }
  7555. EOF
  7556. if { (eval echo configure:9165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7557. rm -rf conftest*
  7558. eval "ac_cv_lib_$ac_lib_var=yes"
  7559. else
  7560. echo "configure: failed program was:" >&5
  7561. cat conftest.$ac_ext >&5
  7562. rm -rf conftest*
  7563. eval "ac_cv_lib_$ac_lib_var=no"
  7564. fi
  7565. rm -f conftest*
  7566. LIBS="$ac_save_LIBS"
  7567. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7568. echo "$ac_t""yes" 1>&6
  7569. TKLIB="$TKLIB -ltk$tcltk_ver2 $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
  7570. else
  7571. echo "$ac_t""no" 1>&6
  7572. LDFLAGS=${ac_save_ldflags}
  7573. { echo "configure: error: *** Unable to locate Tk library." 1>&2; exit 1; }
  7574. fi
  7575. fi
  7576. LDFLAGS=${ac_save_ldflags}
  7577. fi
  7578. fi
  7579. LDFLAGS=${ac_save_ldflags}
  7580. fi
  7581. fi
  7582. LDFLAGS=${ac_save_ldflags}
  7583. TCLTKLIBS="$TKLIB $TCLLIB"
  7584. cat >> confdefs.h <<\EOF
  7585. #define HAVE_TCLTK 1
  7586. EOF
  7587. fi # $USE_TCLTK
  7588. TKINCDIR=$TCLINCDIR
  7589. # Done checking Tcl/Tk
  7590. # Enable PostgreSQL option
  7591. echo $ac_n "checking whether to use PostgreSQL""... $ac_c" 1>&6
  7592. echo "configure:9257: checking whether to use PostgreSQL" >&5
  7593. echo "$ac_t"""$with_postgres"" 1>&6
  7594. case "$with_postgres" in
  7595. "no") USE_POSTGRES= ;;
  7596. "yes") USE_POSTGRES="1" ;;
  7597. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  7598. esac
  7599. if test -n "$USE_POSTGRES"; then
  7600. cat >> confdefs.h <<\EOF
  7601. #define HAVE_POSTGRES 1
  7602. EOF
  7603. fi # $USE_POSTGRES
  7604. PQINCPATH=
  7605. PQLIBPATH=
  7606. PQLIB=
  7607. if test -n "$USE_POSTGRES"; then
  7608. # With PostgreSQL includes directory
  7609. echo $ac_n "checking for location of PostgreSQL includes""... $ac_c" 1>&6
  7610. echo "configure:9284: checking for location of PostgreSQL includes" >&5
  7611. case "$with_postgres_includes" in
  7612. y | ye | yes | n | no)
  7613. { echo "configure: error: *** You must supply a directory to --with-postgres-includes." 1>&2; exit 1; }
  7614. ;;
  7615. esac
  7616. echo "$ac_t""$with_postgres_includes" 1>&6
  7617. if test -n "$with_postgres_includes" ; then
  7618. for dir in $with_postgres_includes; do
  7619. if test -d "$dir"; then
  7620. PQINCPATH="$PQINCPATH -I$dir"
  7621. else
  7622. { echo "configure: error: *** PostgreSQL includes directory $dir does not exist." 1>&2; exit 1; }
  7623. fi
  7624. done
  7625. fi
  7626. ac_save_cppflags="$CPPFLAGS"
  7627. CPPFLAGS="$PQINCPATH $CPPFLAGS"
  7628. for ac_hdr in libpq-fe.h
  7629. do
  7630. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7631. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7632. echo "configure:9310: checking for $ac_hdr" >&5
  7633. cat > conftest.$ac_ext <<EOF
  7634. #line 9313 "configure"
  7635. #include "confdefs.h"
  7636. #include <$ac_hdr>
  7637. EOF
  7638. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7639. { (eval echo configure:9318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7640. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7641. if test -z "$ac_err"; then
  7642. rm -rf conftest*
  7643. eval "ac_cv_header_$ac_safe=yes"
  7644. else
  7645. echo "$ac_err" >&5
  7646. echo "configure: failed program was:" >&5
  7647. cat conftest.$ac_ext >&5
  7648. rm -rf conftest*
  7649. eval "ac_cv_header_$ac_safe=no"
  7650. fi
  7651. rm -f conftest*
  7652. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7653. echo "$ac_t""yes" 1>&6
  7654. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7655. cat >> confdefs.h <<EOF
  7656. #define $ac_tr_hdr 1
  7657. EOF
  7658. else
  7659. echo "$ac_t""no" 1>&6
  7660. { echo "configure: error: *** Unable to locate PostgreSQL includes." 1>&2; exit 1; }
  7661. fi
  7662. done
  7663. CPPFLAGS=$ac_save_cppflags
  7664. fi # $USE_POSTGRES
  7665. if test -n "$USE_POSTGRES"; then
  7666. # With PostgreSQL library directory
  7667. echo $ac_n "checking for location of PostgreSQL library""... $ac_c" 1>&6
  7668. echo "configure:9356: checking for location of PostgreSQL library" >&5
  7669. case "$with_postgres_libs" in
  7670. y | ye | yes | n | no)
  7671. { echo "configure: error: *** You must supply a directory to --with-postgres-libs." 1>&2; exit 1; }
  7672. ;;
  7673. esac
  7674. echo "$ac_t""$with_postgres_libs" 1>&6
  7675. if test -n "$with_postgres_libs"; then
  7676. for dir in $with_postgres_libs; do
  7677. if test -d "$dir"; then
  7678. PQLIBPATH="$PQLIBPATH -L$dir"
  7679. else
  7680. { echo "configure: error: *** PostgreSQL library directory $dir does not exist." 1>&2; exit 1; }
  7681. fi
  7682. done
  7683. fi
  7684. ac_save_ldflags="$LDFLAGS"
  7685. LDFLAGS="$PQLIBPATH $LDFLAGS"
  7686. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  7687. echo "configure:9385: checking for PQsetdbLogin in -lpq" >&5
  7688. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  7689. ac_save_LIBS="$LIBS"
  7690. LIBS="-lpq $LIBS"
  7691. cat > conftest.$ac_ext <<EOF
  7692. #line 9391 "configure"
  7693. #include "confdefs.h"
  7694. /* Override any gcc2 internal prototype to avoid an error. */
  7695. /* We use char because int might match the return type of a gcc2
  7696. builtin and then its argument prototype would still apply. */
  7697. char PQsetdbLogin();
  7698. int main() {
  7699. PQsetdbLogin()
  7700. ; return 0; }
  7701. EOF
  7702. if { (eval echo configure:9402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7703. rm -rf conftest*
  7704. eval "ac_cv_lib_$ac_lib_var=yes"
  7705. else
  7706. echo "configure: failed program was:" >&5
  7707. cat conftest.$ac_ext >&5
  7708. rm -rf conftest*
  7709. eval "ac_cv_lib_$ac_lib_var=no"
  7710. fi
  7711. rm -f conftest*
  7712. LIBS="$ac_save_LIBS"
  7713. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7714. echo "$ac_t""yes" 1>&6
  7715. PQLIB="$PQLIB -lpq "
  7716. else
  7717. echo "$ac_t""no" 1>&6
  7718. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  7719. echo "configure:9421: checking for PQsetdbLogin in -lpq" >&5
  7720. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  7721. ac_save_LIBS="$LIBS"
  7722. LIBS="-lpq -lssl -lcrypto $LIBS"
  7723. cat > conftest.$ac_ext <<EOF
  7724. #line 9427 "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 PQsetdbLogin();
  7730. int main() {
  7731. PQsetdbLogin()
  7732. ; return 0; }
  7733. EOF
  7734. if { (eval echo configure:9438: \"$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. PQLIB="$PQLIB -lpq -lssl -lcrypto"
  7748. else
  7749. echo "$ac_t""no" 1>&6
  7750. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  7751. echo "configure:9457: checking for PQsetdbLogin in -lpq" >&5
  7752. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  7753. ac_save_LIBS="$LIBS"
  7754. LIBS="-lpq -lcrypt $LIBS"
  7755. cat > conftest.$ac_ext <<EOF
  7756. #line 9463 "configure"
  7757. #include "confdefs.h"
  7758. /* Override any gcc2 internal prototype to avoid an error. */
  7759. /* We use char because int might match the return type of a gcc2
  7760. builtin and then its argument prototype would still apply. */
  7761. char PQsetdbLogin();
  7762. int main() {
  7763. PQsetdbLogin()
  7764. ; return 0; }
  7765. EOF
  7766. if { (eval echo configure:9474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7767. rm -rf conftest*
  7768. eval "ac_cv_lib_$ac_lib_var=yes"
  7769. else
  7770. echo "configure: failed program was:" >&5
  7771. cat conftest.$ac_ext >&5
  7772. rm -rf conftest*
  7773. eval "ac_cv_lib_$ac_lib_var=no"
  7774. fi
  7775. rm -f conftest*
  7776. LIBS="$ac_save_LIBS"
  7777. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7778. echo "$ac_t""yes" 1>&6
  7779. PQLIB="$PQLIB -lpq -lcrypt"
  7780. else
  7781. echo "$ac_t""no" 1>&6
  7782. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  7783. echo "configure:9493: checking for PQsetdbLogin in -lpq" >&5
  7784. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  7785. ac_save_LIBS="$LIBS"
  7786. LIBS="-lpq -lcrypt -lssl -lcrypto $LIBS"
  7787. cat > conftest.$ac_ext <<EOF
  7788. #line 9499 "configure"
  7789. #include "confdefs.h"
  7790. /* Override any gcc2 internal prototype to avoid an error. */
  7791. /* We use char because int might match the return type of a gcc2
  7792. builtin and then its argument prototype would still apply. */
  7793. char PQsetdbLogin();
  7794. int main() {
  7795. PQsetdbLogin()
  7796. ; return 0; }
  7797. EOF
  7798. if { (eval echo configure:9510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7799. rm -rf conftest*
  7800. eval "ac_cv_lib_$ac_lib_var=yes"
  7801. else
  7802. echo "configure: failed program was:" >&5
  7803. cat conftest.$ac_ext >&5
  7804. rm -rf conftest*
  7805. eval "ac_cv_lib_$ac_lib_var=no"
  7806. fi
  7807. rm -f conftest*
  7808. LIBS="$ac_save_LIBS"
  7809. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7810. echo "$ac_t""yes" 1>&6
  7811. PQLIB="$PQLIB -lpq -lcrypt -lssl -lcrypto"
  7812. else
  7813. echo "$ac_t""no" 1>&6
  7814. LDFLAGS=${ac_save_ldflags}
  7815. { echo "configure: error: *** Unable to locate PostgreSQL library." 1>&2; exit 1; }
  7816. fi
  7817. fi
  7818. fi
  7819. fi
  7820. LDFLAGS=${ac_save_ldflags}
  7821. ac_save_ldflags="$LDFLAGS"
  7822. LDFLAGS="$LDFLAGS $PQLIBPATH"
  7823. echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
  7824. echo "configure:9567: checking for PQcmdTuples in -lpq" >&5
  7825. ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
  7826. ac_save_LIBS="$LIBS"
  7827. LIBS="-lpq $LIBS"
  7828. cat > conftest.$ac_ext <<EOF
  7829. #line 9573 "configure"
  7830. #include "confdefs.h"
  7831. /* Override any gcc2 internal prototype to avoid an error. */
  7832. /* We use char because int might match the return type of a gcc2
  7833. builtin and then its argument prototype would still apply. */
  7834. char PQcmdTuples();
  7835. int main() {
  7836. PQcmdTuples()
  7837. ; return 0; }
  7838. EOF
  7839. if { (eval echo configure:9584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7840. rm -rf conftest*
  7841. eval "ac_cv_lib_$ac_lib_var=yes"
  7842. else
  7843. echo "configure: failed program was:" >&5
  7844. cat conftest.$ac_ext >&5
  7845. rm -rf conftest*
  7846. eval "ac_cv_lib_$ac_lib_var=no"
  7847. fi
  7848. rm -f conftest*
  7849. LIBS="$ac_save_LIBS"
  7850. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7851. echo "$ac_t""yes" 1>&6
  7852. cat >> confdefs.h <<\EOF
  7853. #define HAVE_PQCMDTUPLES 1
  7854. EOF
  7855. else
  7856. echo "$ac_t""no" 1>&6
  7857. echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
  7858. echo "configure:9606: checking for PQcmdTuples in -lpq" >&5
  7859. ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
  7860. ac_save_LIBS="$LIBS"
  7861. LIBS="-lpq -lcrypt $LIBS"
  7862. cat > conftest.$ac_ext <<EOF
  7863. #line 9612 "configure"
  7864. #include "confdefs.h"
  7865. /* Override any gcc2 internal prototype to avoid an error. */
  7866. /* We use char because int might match the return type of a gcc2
  7867. builtin and then its argument prototype would still apply. */
  7868. char PQcmdTuples();
  7869. int main() {
  7870. PQcmdTuples()
  7871. ; return 0; }
  7872. EOF
  7873. if { (eval echo configure:9623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7874. rm -rf conftest*
  7875. eval "ac_cv_lib_$ac_lib_var=yes"
  7876. else
  7877. echo "configure: failed program was:" >&5
  7878. cat conftest.$ac_ext >&5
  7879. rm -rf conftest*
  7880. eval "ac_cv_lib_$ac_lib_var=no"
  7881. fi
  7882. rm -f conftest*
  7883. LIBS="$ac_save_LIBS"
  7884. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7885. echo "$ac_t""yes" 1>&6
  7886. cat >> confdefs.h <<\EOF
  7887. #define HAVE_PQCMDTUPLES 1
  7888. EOF
  7889. else
  7890. echo "$ac_t""no" 1>&6
  7891. fi
  7892. fi
  7893. LDFLAGS=${ac_save_ldflags}
  7894. fi # $USE_POSTGRES
  7895. # Done checking PostgreSQL
  7896. # Enable MySQL option
  7897. echo $ac_n "checking whether to use MySQL""... $ac_c" 1>&6
  7898. echo "configure:9666: checking whether to use MySQL" >&5
  7899. echo "$ac_t"""$with_mysql"" 1>&6
  7900. case "$with_mysql" in
  7901. "no") USE_MYSQL= ;;
  7902. "yes") USE_MYSQL="1" ;;
  7903. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  7904. esac
  7905. MYSQLINCPATH=
  7906. MYSQLLIBPATH=
  7907. MYSQLLIB=
  7908. if test -n "$USE_MYSQL"; then
  7909. # With MySQL includes directory
  7910. echo $ac_n "checking for location of MySQL includes""... $ac_c" 1>&6
  7911. echo "configure:9686: checking for location of MySQL includes" >&5
  7912. case "$with_mysql_includes" in
  7913. y | ye | yes | n | no)
  7914. { echo "configure: error: *** You must supply a directory to --with-mysql-includes." 1>&2; exit 1; }
  7915. ;;
  7916. esac
  7917. echo "$ac_t""$with_mysql_includes" 1>&6
  7918. if test -n "$with_mysql_includes" ; then
  7919. for dir in $with_mysql_includes; do
  7920. if test -d "$dir"; then
  7921. MYSQLINCPATH="$MYSQLINCPATH -I$dir"
  7922. else
  7923. { echo "configure: error: *** MySQL includes directory $dir does not exist." 1>&2; exit 1; }
  7924. fi
  7925. done
  7926. fi
  7927. ac_save_cppflags="$CPPFLAGS"
  7928. CPPFLAGS="$MYSQLINCPATH $CPPFLAGS"
  7929. for ac_hdr in mysql.h
  7930. do
  7931. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7932. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7933. echo "configure:9712: checking for $ac_hdr" >&5
  7934. cat > conftest.$ac_ext <<EOF
  7935. #line 9715 "configure"
  7936. #include "confdefs.h"
  7937. #include <$ac_hdr>
  7938. EOF
  7939. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7940. { (eval echo configure:9720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7941. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7942. if test -z "$ac_err"; then
  7943. rm -rf conftest*
  7944. eval "ac_cv_header_$ac_safe=yes"
  7945. else
  7946. echo "$ac_err" >&5
  7947. echo "configure: failed program was:" >&5
  7948. cat conftest.$ac_ext >&5
  7949. rm -rf conftest*
  7950. eval "ac_cv_header_$ac_safe=no"
  7951. fi
  7952. rm -f conftest*
  7953. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7954. echo "$ac_t""yes" 1>&6
  7955. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7956. cat >> confdefs.h <<EOF
  7957. #define $ac_tr_hdr 1
  7958. EOF
  7959. else
  7960. echo "$ac_t""no" 1>&6
  7961. { echo "configure: error: *** Unable to locate MySQL includes." 1>&2; exit 1; }
  7962. fi
  7963. done
  7964. CPPFLAGS=$ac_save_cppflags
  7965. fi # $USE_MYSQL
  7966. if test -n "$USE_MYSQL"; then
  7967. # With MySQL library directory
  7968. echo $ac_n "checking for location of MySQL library""... $ac_c" 1>&6
  7969. echo "configure:9757: checking for location of MySQL library" >&5
  7970. case "$with_mysql_libs" in
  7971. y | ye | yes | n | no)
  7972. { echo "configure: error: *** You must supply a directory to --with-mysql-libs." 1>&2; exit 1; }
  7973. ;;
  7974. esac
  7975. echo "$ac_t""$with_mysql_libs" 1>&6
  7976. if test -n "$with_mysql_libs"; then
  7977. for dir in $with_mysql_libs; do
  7978. if test -d "$dir"; then
  7979. MYSQLLIBPATH="$MYSQLLIBPATH -L$dir"
  7980. else
  7981. { echo "configure: error: *** MySQL library directory $dir does not exist." 1>&2; exit 1; }
  7982. fi
  7983. done
  7984. fi
  7985. ac_save_ldflags="$LDFLAGS"
  7986. LDFLAGS="$MYSQLLIBPATH $LDFLAGS"
  7987. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7988. echo "configure:9788: checking for mysql_query in -lmysqlclient" >&5
  7989. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7990. ac_save_LIBS="$LIBS"
  7991. LIBS="-lmysqlclient $LIBS"
  7992. cat > conftest.$ac_ext <<EOF
  7993. #line 9794 "configure"
  7994. #include "confdefs.h"
  7995. /* Override any gcc2 internal prototype to avoid an error. */
  7996. /* We use char because int might match the return type of a gcc2
  7997. builtin and then its argument prototype would still apply. */
  7998. char mysql_query();
  7999. int main() {
  8000. mysql_query()
  8001. ; return 0; }
  8002. EOF
  8003. if { (eval echo configure:9805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8004. rm -rf conftest*
  8005. eval "ac_cv_lib_$ac_lib_var=yes"
  8006. else
  8007. echo "configure: failed program was:" >&5
  8008. cat conftest.$ac_ext >&5
  8009. rm -rf conftest*
  8010. eval "ac_cv_lib_$ac_lib_var=no"
  8011. fi
  8012. rm -f conftest*
  8013. LIBS="$ac_save_LIBS"
  8014. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8015. echo "$ac_t""yes" 1>&6
  8016. MYSQLLIB="$MYSQLLIB -lmysqlclient "
  8017. else
  8018. echo "$ac_t""no" 1>&6
  8019. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  8020. echo "configure:9824: checking for mysql_query in -lmysqlclient" >&5
  8021. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  8022. ac_save_LIBS="$LIBS"
  8023. LIBS="-lmysqlclient $MATHLIB $LIBS"
  8024. cat > conftest.$ac_ext <<EOF
  8025. #line 9830 "configure"
  8026. #include "confdefs.h"
  8027. /* Override any gcc2 internal prototype to avoid an error. */
  8028. /* We use char because int might match the return type of a gcc2
  8029. builtin and then its argument prototype would still apply. */
  8030. char mysql_query();
  8031. int main() {
  8032. mysql_query()
  8033. ; return 0; }
  8034. EOF
  8035. if { (eval echo configure:9841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8036. rm -rf conftest*
  8037. eval "ac_cv_lib_$ac_lib_var=yes"
  8038. else
  8039. echo "configure: failed program was:" >&5
  8040. cat conftest.$ac_ext >&5
  8041. rm -rf conftest*
  8042. eval "ac_cv_lib_$ac_lib_var=no"
  8043. fi
  8044. rm -f conftest*
  8045. LIBS="$ac_save_LIBS"
  8046. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8047. echo "$ac_t""yes" 1>&6
  8048. MYSQLLIB="$MYSQLLIB -lmysqlclient $MATHLIB"
  8049. else
  8050. echo "$ac_t""no" 1>&6
  8051. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  8052. echo "configure:9860: checking for mysql_query in -lmysqlclient" >&5
  8053. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  8054. ac_save_LIBS="$LIBS"
  8055. LIBS="-lmysqlclient $SOCKLIB $LIBS"
  8056. cat > conftest.$ac_ext <<EOF
  8057. #line 9866 "configure"
  8058. #include "confdefs.h"
  8059. /* Override any gcc2 internal prototype to avoid an error. */
  8060. /* We use char because int might match the return type of a gcc2
  8061. builtin and then its argument prototype would still apply. */
  8062. char mysql_query();
  8063. int main() {
  8064. mysql_query()
  8065. ; return 0; }
  8066. EOF
  8067. if { (eval echo configure:9877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8068. rm -rf conftest*
  8069. eval "ac_cv_lib_$ac_lib_var=yes"
  8070. else
  8071. echo "configure: failed program was:" >&5
  8072. cat conftest.$ac_ext >&5
  8073. rm -rf conftest*
  8074. eval "ac_cv_lib_$ac_lib_var=no"
  8075. fi
  8076. rm -f conftest*
  8077. LIBS="$ac_save_LIBS"
  8078. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8079. echo "$ac_t""yes" 1>&6
  8080. MYSQLLIB="$MYSQLLIB -lmysqlclient $SOCKLIB"
  8081. else
  8082. echo "$ac_t""no" 1>&6
  8083. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  8084. echo "configure:9896: checking for mysql_query in -lmysqlclient" >&5
  8085. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  8086. ac_save_LIBS="$LIBS"
  8087. LIBS="-lmysqlclient $SOCKLIB $MATHLIB $LIBS"
  8088. cat > conftest.$ac_ext <<EOF
  8089. #line 9902 "configure"
  8090. #include "confdefs.h"
  8091. /* Override any gcc2 internal prototype to avoid an error. */
  8092. /* We use char because int might match the return type of a gcc2
  8093. builtin and then its argument prototype would still apply. */
  8094. char mysql_query();
  8095. int main() {
  8096. mysql_query()
  8097. ; return 0; }
  8098. EOF
  8099. if { (eval echo configure:9913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8100. rm -rf conftest*
  8101. eval "ac_cv_lib_$ac_lib_var=yes"
  8102. else
  8103. echo "configure: failed program was:" >&5
  8104. cat conftest.$ac_ext >&5
  8105. rm -rf conftest*
  8106. eval "ac_cv_lib_$ac_lib_var=no"
  8107. fi
  8108. rm -f conftest*
  8109. LIBS="$ac_save_LIBS"
  8110. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8111. echo "$ac_t""yes" 1>&6
  8112. MYSQLLIB="$MYSQLLIB -lmysqlclient $SOCKLIB $MATHLIB"
  8113. else
  8114. echo "$ac_t""no" 1>&6
  8115. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  8116. echo "configure:9932: checking for mysql_query in -lmysqlclient" >&5
  8117. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  8118. ac_save_LIBS="$LIBS"
  8119. LIBS="-lmysqlclient $ZLIB $LIBS"
  8120. cat > conftest.$ac_ext <<EOF
  8121. #line 9938 "configure"
  8122. #include "confdefs.h"
  8123. /* Override any gcc2 internal prototype to avoid an error. */
  8124. /* We use char because int might match the return type of a gcc2
  8125. builtin and then its argument prototype would still apply. */
  8126. char mysql_query();
  8127. int main() {
  8128. mysql_query()
  8129. ; return 0; }
  8130. EOF
  8131. if { (eval echo configure:9949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8132. rm -rf conftest*
  8133. eval "ac_cv_lib_$ac_lib_var=yes"
  8134. else
  8135. echo "configure: failed program was:" >&5
  8136. cat conftest.$ac_ext >&5
  8137. rm -rf conftest*
  8138. eval "ac_cv_lib_$ac_lib_var=no"
  8139. fi
  8140. rm -f conftest*
  8141. LIBS="$ac_save_LIBS"
  8142. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8143. echo "$ac_t""yes" 1>&6
  8144. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB"
  8145. else
  8146. echo "$ac_t""no" 1>&6
  8147. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  8148. echo "configure:9968: checking for mysql_query in -lmysqlclient" >&5
  8149. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  8150. ac_save_LIBS="$LIBS"
  8151. LIBS="-lmysqlclient $ZLIB $MATHLIB $LIBS"
  8152. cat > conftest.$ac_ext <<EOF
  8153. #line 9974 "configure"
  8154. #include "confdefs.h"
  8155. /* Override any gcc2 internal prototype to avoid an error. */
  8156. /* We use char because int might match the return type of a gcc2
  8157. builtin and then its argument prototype would still apply. */
  8158. char mysql_query();
  8159. int main() {
  8160. mysql_query()
  8161. ; return 0; }
  8162. EOF
  8163. if { (eval echo configure:9985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8164. rm -rf conftest*
  8165. eval "ac_cv_lib_$ac_lib_var=yes"
  8166. else
  8167. echo "configure: failed program was:" >&5
  8168. cat conftest.$ac_ext >&5
  8169. rm -rf conftest*
  8170. eval "ac_cv_lib_$ac_lib_var=no"
  8171. fi
  8172. rm -f conftest*
  8173. LIBS="$ac_save_LIBS"
  8174. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8175. echo "$ac_t""yes" 1>&6
  8176. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $MATHLIB"
  8177. else
  8178. echo "$ac_t""no" 1>&6
  8179. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  8180. echo "configure:10004: checking for mysql_query in -lmysqlclient" >&5
  8181. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  8182. ac_save_LIBS="$LIBS"
  8183. LIBS="-lmysqlclient $ZLIB $SOCKLIB $LIBS"
  8184. cat > conftest.$ac_ext <<EOF
  8185. #line 10010 "configure"
  8186. #include "confdefs.h"
  8187. /* Override any gcc2 internal prototype to avoid an error. */
  8188. /* We use char because int might match the return type of a gcc2
  8189. builtin and then its argument prototype would still apply. */
  8190. char mysql_query();
  8191. int main() {
  8192. mysql_query()
  8193. ; return 0; }
  8194. EOF
  8195. if { (eval echo configure:10021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8196. rm -rf conftest*
  8197. eval "ac_cv_lib_$ac_lib_var=yes"
  8198. else
  8199. echo "configure: failed program was:" >&5
  8200. cat conftest.$ac_ext >&5
  8201. rm -rf conftest*
  8202. eval "ac_cv_lib_$ac_lib_var=no"
  8203. fi
  8204. rm -f conftest*
  8205. LIBS="$ac_save_LIBS"
  8206. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8207. echo "$ac_t""yes" 1>&6
  8208. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $SOCKLIB"
  8209. else
  8210. echo "$ac_t""no" 1>&6
  8211. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  8212. echo "configure:10040: checking for mysql_query in -lmysqlclient" >&5
  8213. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  8214. ac_save_LIBS="$LIBS"
  8215. LIBS="-lmysqlclient $ZLIB $SOCKLIB $MATHLIB $LIBS"
  8216. cat > conftest.$ac_ext <<EOF
  8217. #line 10046 "configure"
  8218. #include "confdefs.h"
  8219. /* Override any gcc2 internal prototype to avoid an error. */
  8220. /* We use char because int might match the return type of a gcc2
  8221. builtin and then its argument prototype would still apply. */
  8222. char mysql_query();
  8223. int main() {
  8224. mysql_query()
  8225. ; return 0; }
  8226. EOF
  8227. if { (eval echo configure:10057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8228. rm -rf conftest*
  8229. eval "ac_cv_lib_$ac_lib_var=yes"
  8230. else
  8231. echo "configure: failed program was:" >&5
  8232. cat conftest.$ac_ext >&5
  8233. rm -rf conftest*
  8234. eval "ac_cv_lib_$ac_lib_var=no"
  8235. fi
  8236. rm -f conftest*
  8237. LIBS="$ac_save_LIBS"
  8238. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8239. echo "$ac_t""yes" 1>&6
  8240. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $SOCKLIB $MATHLIB"
  8241. else
  8242. echo "$ac_t""no" 1>&6
  8243. LDFLAGS=${ac_save_ldflags}
  8244. { echo "configure: error: *** Unable to locate MySQL library." 1>&2; exit 1; }
  8245. fi
  8246. fi
  8247. fi
  8248. fi
  8249. fi
  8250. fi
  8251. fi
  8252. fi
  8253. LDFLAGS=${ac_save_ldflags}
  8254. # Check for libmysqld (for embeded version of the driver)
  8255. # Extract the first word of "mysql_config", so it can be a program name with args.
  8256. set dummy mysql_config; ac_word=$2
  8257. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  8258. echo "configure:10147: checking for $ac_word" >&5
  8259. case "$MYSQLD_CONFIG" in
  8260. /*)
  8261. ac_cv_path_MYSQLD_CONFIG="$MYSQLD_CONFIG" # Let the user override the test with a path.
  8262. ;;
  8263. ?:/*)
  8264. ac_cv_path_MYSQLD_CONFIG="$MYSQLD_CONFIG" # Let the user override the test with a dos path.
  8265. ;;
  8266. *)
  8267. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  8268. ac_dummy="$PATH"
  8269. for ac_dir in $ac_dummy; do
  8270. test -z "$ac_dir" && ac_dir=.
  8271. if test -f $ac_dir/$ac_word; then
  8272. ac_cv_path_MYSQLD_CONFIG="$ac_dir/$ac_word"
  8273. break
  8274. fi
  8275. done
  8276. IFS="$ac_save_ifs"
  8277. test -z "$ac_cv_path_MYSQLD_CONFIG" && ac_cv_path_MYSQLD_CONFIG="no"
  8278. ;;
  8279. esac
  8280. MYSQLD_CONFIG="$ac_cv_path_MYSQLD_CONFIG"
  8281. if test -n "$MYSQLD_CONFIG"; then
  8282. echo "$ac_t""$MYSQLD_CONFIG" 1>&6
  8283. else
  8284. echo "$ac_t""no" 1>&6
  8285. fi
  8286. if test "$MYSQLD_CONFIG" = "no" ; then
  8287. { echo "configure: error: *** couldn't find mysql_config" 1>&2; exit 1; }
  8288. fi
  8289. if test "$MYSQLD_CONFIG" != "" ; then
  8290. ac_ext=C
  8291. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  8292. ac_cpp='$CXXCPP $CPPFLAGS'
  8293. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  8294. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  8295. cross_compiling=$ac_cv_prog_cxx_cross
  8296. ac_save_libs="$LIBS"
  8297. MYSQLDLIB=`"$MYSQLD_CONFIG" --libmysqld-libs`
  8298. LIBS="$MYSQLDLIB $LIBS"
  8299. echo $ac_n "checking for mysql_server_init""... $ac_c" 1>&6
  8300. echo "configure:10196: checking for mysql_server_init" >&5
  8301. cat > conftest.$ac_ext <<EOF
  8302. #line 10199 "configure"
  8303. #include "confdefs.h"
  8304. /* System header to define __stub macros and hopefully few prototypes,
  8305. which can conflict with char mysql_server_init(); below. */
  8306. #include <assert.h>
  8307. /* Override any gcc2 internal prototype to avoid an error. */
  8308. #ifdef __cplusplus
  8309. extern "C"
  8310. #endif
  8311. /* We use char because int might match the return type of a gcc2
  8312. builtin and then its argument prototype would still apply. */
  8313. char mysql_server_init();
  8314. int main() {
  8315. /* The GNU C library defines this for functions which it implements
  8316. to always fail with ENOSYS. Some functions are actually named
  8317. something starting with __ and the normal name is an alias. */
  8318. #if defined (__stub_mysql_server_init) || defined (__stub___mysql_server_init)
  8319. choke me
  8320. #else
  8321. mysql_server_init();
  8322. #endif
  8323. ; return 0; }
  8324. EOF
  8325. if { (eval echo configure:10225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8326. rm -rf conftest*
  8327. eval "ac_cv_func_mysql_server_init=yes"
  8328. else
  8329. echo "configure: failed program was:" >&5
  8330. cat conftest.$ac_ext >&5
  8331. rm -rf conftest*
  8332. eval "ac_cv_func_mysql_server_init=no"
  8333. fi
  8334. rm -f conftest*
  8335. if eval "test \"`echo '$ac_cv_func_'mysql_server_init`\" = yes"; then
  8336. echo "$ac_t""yes" 1>&6
  8337. :
  8338. else
  8339. echo "$ac_t""no" 1>&6
  8340. MYSQLDLIB="";
  8341. echo "configure: warning: libmysqld not found" 1>&2
  8342. fi
  8343. LIBS=$ac_save_libs
  8344. ac_ext=c
  8345. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  8346. ac_cpp='$CPP $CPPFLAGS'
  8347. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  8348. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  8349. cross_compiling=$ac_cv_prog_cc_cross
  8350. ac_ext=c
  8351. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  8352. ac_cpp='$CPP $CPPFLAGS'
  8353. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  8354. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  8355. cross_compiling=$ac_cv_prog_cc_cross
  8356. fi
  8357. fi # $USE_MYSQL
  8358. # Done checking MySQL
  8359. # Enable SQLite option
  8360. echo $ac_n "checking whether to use SQLite""... $ac_c" 1>&6
  8361. echo "configure:10277: checking whether to use SQLite" >&5
  8362. echo "$ac_t"""$with_sqlite"" 1>&6
  8363. case "$with_sqlite" in
  8364. "no") USE_SQLITE= ;;
  8365. "yes") USE_SQLITE="1" ;;
  8366. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  8367. esac
  8368. SQLITEINCPATH=
  8369. SQLITELIBPATH=
  8370. SQLITELIB=
  8371. if test -n "$USE_SQLITE"; then
  8372. # With SQLite includes directory
  8373. echo $ac_n "checking for location of SQLite includes""... $ac_c" 1>&6
  8374. echo "configure:10297: checking for location of SQLite includes" >&5
  8375. case "$with_sqlite_includes" in
  8376. y | ye | yes | n | no)
  8377. { echo "configure: error: *** You must supply a directory to --with-sqlite-includes." 1>&2; exit 1; }
  8378. ;;
  8379. esac
  8380. echo "$ac_t""$with_sqlite_includes" 1>&6
  8381. if test -n "$with_sqlite_includes" ; then
  8382. for dir in $with_sqlite_includes; do
  8383. if test -d "$dir"; then
  8384. SQLITEINCPATH="$SQLITEINCPATH -I$dir"
  8385. else
  8386. { echo "configure: error: *** SQLite includes directory $dir does not exist." 1>&2; exit 1; }
  8387. fi
  8388. done
  8389. fi
  8390. ac_save_cppflags="$CPPFLAGS"
  8391. CPPFLAGS="$SQLITEINCPATH $CPPFLAGS"
  8392. for ac_hdr in sqlite3.h
  8393. do
  8394. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8395. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8396. echo "configure:10323: checking for $ac_hdr" >&5
  8397. cat > conftest.$ac_ext <<EOF
  8398. #line 10326 "configure"
  8399. #include "confdefs.h"
  8400. #include <$ac_hdr>
  8401. EOF
  8402. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8403. { (eval echo configure:10331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8404. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8405. if test -z "$ac_err"; then
  8406. rm -rf conftest*
  8407. eval "ac_cv_header_$ac_safe=yes"
  8408. else
  8409. echo "$ac_err" >&5
  8410. echo "configure: failed program was:" >&5
  8411. cat conftest.$ac_ext >&5
  8412. rm -rf conftest*
  8413. eval "ac_cv_header_$ac_safe=no"
  8414. fi
  8415. rm -f conftest*
  8416. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8417. echo "$ac_t""yes" 1>&6
  8418. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8419. cat >> confdefs.h <<EOF
  8420. #define $ac_tr_hdr 1
  8421. EOF
  8422. else
  8423. echo "$ac_t""no" 1>&6
  8424. { echo "configure: error: *** Unable to locate SQLite includes." 1>&2; exit 1; }
  8425. fi
  8426. done
  8427. CPPFLAGS=$ac_save_cppflags
  8428. cat >> confdefs.h <<\EOF
  8429. #define HAVE_SQLITE 1
  8430. EOF
  8431. fi # $USE_SQLITE
  8432. if test -n "$USE_SQLITE"; then
  8433. # With SQLite library directory
  8434. echo $ac_n "checking for location of SQLite library""... $ac_c" 1>&6
  8435. echo "configure:10374: checking for location of SQLite library" >&5
  8436. case "$with_sqlite_libs" in
  8437. y | ye | yes | n | no)
  8438. { echo "configure: error: *** You must supply a directory to --with-sqlite-libs." 1>&2; exit 1; }
  8439. ;;
  8440. esac
  8441. echo "$ac_t""$with_sqlite_libs" 1>&6
  8442. if test -n "$with_sqlite_libs"; then
  8443. for dir in $with_sqlite_libs; do
  8444. if test -d "$dir"; then
  8445. SQLITELIBPATH="$SQLITELIBPATH -L$dir"
  8446. else
  8447. { echo "configure: error: *** SQLite library directory $dir does not exist." 1>&2; exit 1; }
  8448. fi
  8449. done
  8450. fi
  8451. ac_save_ldflags="$LDFLAGS"
  8452. LDFLAGS="$SQLITELIBPATH $LDFLAGS"
  8453. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  8454. echo "configure:10401: checking for sqlite3_open in -lsqlite3" >&5
  8455. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  8456. ac_save_LIBS="$LIBS"
  8457. LIBS="-lsqlite3 $LIBS"
  8458. cat > conftest.$ac_ext <<EOF
  8459. #line 10407 "configure"
  8460. #include "confdefs.h"
  8461. /* Override any gcc2 internal prototype to avoid an error. */
  8462. /* We use char because int might match the return type of a gcc2
  8463. builtin and then its argument prototype would still apply. */
  8464. char sqlite3_open();
  8465. int main() {
  8466. sqlite3_open()
  8467. ; return 0; }
  8468. EOF
  8469. if { (eval echo configure:10418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8470. rm -rf conftest*
  8471. eval "ac_cv_lib_$ac_lib_var=yes"
  8472. else
  8473. echo "configure: failed program was:" >&5
  8474. cat conftest.$ac_ext >&5
  8475. rm -rf conftest*
  8476. eval "ac_cv_lib_$ac_lib_var=no"
  8477. fi
  8478. rm -f conftest*
  8479. LIBS="$ac_save_LIBS"
  8480. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8481. echo "$ac_t""yes" 1>&6
  8482. SQLITELIB="$SQLITELIB -lsqlite3 "
  8483. else
  8484. echo "$ac_t""no" 1>&6
  8485. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  8486. echo "configure:10437: checking for sqlite3_open in -lsqlite3" >&5
  8487. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  8488. ac_save_LIBS="$LIBS"
  8489. LIBS="-lsqlite3 $MATHLIB $LIBS"
  8490. cat > conftest.$ac_ext <<EOF
  8491. #line 10443 "configure"
  8492. #include "confdefs.h"
  8493. /* Override any gcc2 internal prototype to avoid an error. */
  8494. /* We use char because int might match the return type of a gcc2
  8495. builtin and then its argument prototype would still apply. */
  8496. char sqlite3_open();
  8497. int main() {
  8498. sqlite3_open()
  8499. ; return 0; }
  8500. EOF
  8501. if { (eval echo configure:10454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8502. rm -rf conftest*
  8503. eval "ac_cv_lib_$ac_lib_var=yes"
  8504. else
  8505. echo "configure: failed program was:" >&5
  8506. cat conftest.$ac_ext >&5
  8507. rm -rf conftest*
  8508. eval "ac_cv_lib_$ac_lib_var=no"
  8509. fi
  8510. rm -f conftest*
  8511. LIBS="$ac_save_LIBS"
  8512. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8513. echo "$ac_t""yes" 1>&6
  8514. SQLITELIB="$SQLITELIB -lsqlite3 $MATHLIB"
  8515. else
  8516. echo "$ac_t""no" 1>&6
  8517. LDFLAGS=${ac_save_ldflags}
  8518. { echo "configure: error: *** Unable to locate SQLite library." 1>&2; exit 1; }
  8519. fi
  8520. fi
  8521. LDFLAGS=${ac_save_ldflags}
  8522. fi # $USE_SQLITE
  8523. # Done checking SQLite
  8524. # Enable FFMPEG option
  8525. echo $ac_n "checking whether to use FFMPEG""... $ac_c" 1>&6
  8526. echo "configure:10507: checking whether to use FFMPEG" >&5
  8527. echo "$ac_t"""$with_ffmpeg"" 1>&6
  8528. case "$with_ffmpeg" in
  8529. "no") USE_FFMPEG= ;;
  8530. "yes") USE_FFMPEG="1" ;;
  8531. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  8532. esac
  8533. FFMPEGINCPATH=
  8534. FFMPEGLIBPATH=
  8535. FFMPEGLIB=
  8536. if test -n "$USE_FFMPEG"; then
  8537. # With FFMPEG includes directory
  8538. echo $ac_n "checking for location of FFMPEG includes""... $ac_c" 1>&6
  8539. echo "configure:10527: checking for location of FFMPEG includes" >&5
  8540. case "$with_ffmpeg_includes" in
  8541. y | ye | yes | n | no)
  8542. { echo "configure: error: *** You must supply a directory to --with-ffmpeg-includes." 1>&2; exit 1; }
  8543. ;;
  8544. esac
  8545. echo "$ac_t""$with_ffmpeg_includes" 1>&6
  8546. if test -n "$with_ffmpeg_includes" ; then
  8547. for dir in $with_ffmpeg_includes; do
  8548. if test -d "$dir"; then
  8549. FFMPEGINCPATH="$FFMPEGINCPATH -I$dir"
  8550. else
  8551. { echo "configure: error: *** FFMPEG includes directory $dir does not exist." 1>&2; exit 1; }
  8552. fi
  8553. done
  8554. fi
  8555. ac_save_cppflags="$CPPFLAGS"
  8556. CPPFLAGS="$FFMPEGINCPATH $CPPFLAGS"
  8557. for ac_hdr in avcodec.h
  8558. do
  8559. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8560. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8561. echo "configure:10553: checking for $ac_hdr" >&5
  8562. cat > conftest.$ac_ext <<EOF
  8563. #line 10556 "configure"
  8564. #include "confdefs.h"
  8565. #include <$ac_hdr>
  8566. EOF
  8567. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8568. { (eval echo configure:10561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8569. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8570. if test -z "$ac_err"; then
  8571. rm -rf conftest*
  8572. eval "ac_cv_header_$ac_safe=yes"
  8573. else
  8574. echo "$ac_err" >&5
  8575. echo "configure: failed program was:" >&5
  8576. cat conftest.$ac_ext >&5
  8577. rm -rf conftest*
  8578. eval "ac_cv_header_$ac_safe=no"
  8579. fi
  8580. rm -f conftest*
  8581. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8582. echo "$ac_t""yes" 1>&6
  8583. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8584. cat >> confdefs.h <<EOF
  8585. #define $ac_tr_hdr 1
  8586. EOF
  8587. else
  8588. echo "$ac_t""no" 1>&6
  8589. { echo "configure: error: *** Unable to locate FFMPEG includes." 1>&2; exit 1; }
  8590. fi
  8591. done
  8592. CPPFLAGS=$ac_save_cppflags
  8593. ac_save_cppflags="$CPPFLAGS"
  8594. CPPFLAGS="$FFMPEGINCPATH $CPPFLAGS"
  8595. for ac_hdr in avformat.h
  8596. do
  8597. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8598. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8599. echo "configure:10597: checking for $ac_hdr" >&5
  8600. cat > conftest.$ac_ext <<EOF
  8601. #line 10600 "configure"
  8602. #include "confdefs.h"
  8603. #include <$ac_hdr>
  8604. EOF
  8605. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8606. { (eval echo configure:10605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8607. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8608. if test -z "$ac_err"; then
  8609. rm -rf conftest*
  8610. eval "ac_cv_header_$ac_safe=yes"
  8611. else
  8612. echo "$ac_err" >&5
  8613. echo "configure: failed program was:" >&5
  8614. cat conftest.$ac_ext >&5
  8615. rm -rf conftest*
  8616. eval "ac_cv_header_$ac_safe=no"
  8617. fi
  8618. rm -f conftest*
  8619. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8620. echo "$ac_t""yes" 1>&6
  8621. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8622. cat >> confdefs.h <<EOF
  8623. #define $ac_tr_hdr 1
  8624. EOF
  8625. else
  8626. echo "$ac_t""no" 1>&6
  8627. { echo "configure: error: *** Unable to locate FFMPEG includes." 1>&2; exit 1; }
  8628. fi
  8629. done
  8630. CPPFLAGS=$ac_save_cppflags
  8631. ac_save_cppflags="$CPPFLAGS"
  8632. CPPFLAGS="$FFMPEGINCPATH $CPPFLAGS"
  8633. for ac_hdr in swscale.h
  8634. do
  8635. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8636. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8637. echo "configure:10641: checking for $ac_hdr" >&5
  8638. cat > conftest.$ac_ext <<EOF
  8639. #line 10644 "configure"
  8640. #include "confdefs.h"
  8641. #include <$ac_hdr>
  8642. EOF
  8643. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8644. { (eval echo configure:10649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8645. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8646. if test -z "$ac_err"; then
  8647. rm -rf conftest*
  8648. eval "ac_cv_header_$ac_safe=yes"
  8649. else
  8650. echo "$ac_err" >&5
  8651. echo "configure: failed program was:" >&5
  8652. cat conftest.$ac_ext >&5
  8653. rm -rf conftest*
  8654. eval "ac_cv_header_$ac_safe=no"
  8655. fi
  8656. rm -f conftest*
  8657. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8658. echo "$ac_t""yes" 1>&6
  8659. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8660. cat >> confdefs.h <<EOF
  8661. #define $ac_tr_hdr 1
  8662. EOF
  8663. else
  8664. echo "$ac_t""no" 1>&6
  8665. { echo "configure: error: *** Unable to locate FFMPEG includes." 1>&2; exit 1; }
  8666. fi
  8667. done
  8668. CPPFLAGS=$ac_save_cppflags
  8669. cat >> confdefs.h <<\EOF
  8670. #define HAVE_FFMPEG 1
  8671. EOF
  8672. fi # $USE_FFMPEG
  8673. if test -n "$USE_FFMPEG"; then
  8674. # With FFMPEG library directory
  8675. echo $ac_n "checking for location of FFMPEG library""... $ac_c" 1>&6
  8676. echo "configure:10692: checking for location of FFMPEG library" >&5
  8677. case "$with_ffmpeg_libs" in
  8678. y | ye | yes | n | no)
  8679. { echo "configure: error: *** You must supply a directory to --with-ffmpeg-libs." 1>&2; exit 1; }
  8680. ;;
  8681. esac
  8682. echo "$ac_t""$with_ffmpeg_libs" 1>&6
  8683. if test -n "$with_ffmpeg_libs"; then
  8684. for dir in $with_ffmpeg_libs; do
  8685. if test -d "$dir"; then
  8686. FFMPEGLIBPATH="$FFMPEGLIBPATH -L$dir"
  8687. else
  8688. { echo "configure: error: *** FFMPEG library directory $dir does not exist." 1>&2; exit 1; }
  8689. fi
  8690. done
  8691. fi
  8692. ac_save_ldflags="$LDFLAGS"
  8693. LDFLAGS="$FFMPEGLIBPATH $LDFLAGS"
  8694. echo $ac_n "checking for av_free in -lavutil""... $ac_c" 1>&6
  8695. echo "configure:10719: checking for av_free in -lavutil" >&5
  8696. ac_lib_var=`echo avutil'_'av_free | sed 'y%./+-%__p_%'`
  8697. ac_save_LIBS="$LIBS"
  8698. LIBS="-lavutil $LIBS"
  8699. cat > conftest.$ac_ext <<EOF
  8700. #line 10725 "configure"
  8701. #include "confdefs.h"
  8702. /* Override any gcc2 internal prototype to avoid an error. */
  8703. /* We use char because int might match the return type of a gcc2
  8704. builtin and then its argument prototype would still apply. */
  8705. char av_free();
  8706. int main() {
  8707. av_free()
  8708. ; return 0; }
  8709. EOF
  8710. if { (eval echo configure:10736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8711. rm -rf conftest*
  8712. eval "ac_cv_lib_$ac_lib_var=yes"
  8713. else
  8714. echo "configure: failed program was:" >&5
  8715. cat conftest.$ac_ext >&5
  8716. rm -rf conftest*
  8717. eval "ac_cv_lib_$ac_lib_var=no"
  8718. fi
  8719. rm -f conftest*
  8720. LIBS="$ac_save_LIBS"
  8721. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8722. echo "$ac_t""yes" 1>&6
  8723. FFMPEGLIB="$FFMPEGLIB -lavutil "
  8724. else
  8725. echo "$ac_t""no" 1>&6
  8726. echo $ac_n "checking for av_free in -lavutil""... $ac_c" 1>&6
  8727. echo "configure:10755: checking for av_free in -lavutil" >&5
  8728. ac_lib_var=`echo avutil'_'av_free | sed 'y%./+-%__p_%'`
  8729. ac_save_LIBS="$LIBS"
  8730. LIBS="-lavutil $MATHLIB $LIBS"
  8731. cat > conftest.$ac_ext <<EOF
  8732. #line 10761 "configure"
  8733. #include "confdefs.h"
  8734. /* Override any gcc2 internal prototype to avoid an error. */
  8735. /* We use char because int might match the return type of a gcc2
  8736. builtin and then its argument prototype would still apply. */
  8737. char av_free();
  8738. int main() {
  8739. av_free()
  8740. ; return 0; }
  8741. EOF
  8742. if { (eval echo configure:10772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8743. rm -rf conftest*
  8744. eval "ac_cv_lib_$ac_lib_var=yes"
  8745. else
  8746. echo "configure: failed program was:" >&5
  8747. cat conftest.$ac_ext >&5
  8748. rm -rf conftest*
  8749. eval "ac_cv_lib_$ac_lib_var=no"
  8750. fi
  8751. rm -f conftest*
  8752. LIBS="$ac_save_LIBS"
  8753. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8754. echo "$ac_t""yes" 1>&6
  8755. FFMPEGLIB="$FFMPEGLIB -lavutil $MATHLIB"
  8756. else
  8757. echo "$ac_t""no" 1>&6
  8758. LDFLAGS=${ac_save_ldflags}
  8759. { echo "configure: error: *** Unable to locate FFMPEG library." 1>&2; exit 1; }
  8760. fi
  8761. fi
  8762. LDFLAGS=${ac_save_ldflags}
  8763. ac_save_ldflags="$LDFLAGS"
  8764. LDFLAGS="$FFMPEGLIBPATH $LDFLAGS"
  8765. echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6
  8766. echo "configure:10817: checking for avcodec_init in -lavcodec" >&5
  8767. ac_lib_var=`echo avcodec'_'avcodec_init | sed 'y%./+-%__p_%'`
  8768. ac_save_LIBS="$LIBS"
  8769. LIBS="-lavcodec $FFMPEGLIB $LIBS"
  8770. cat > conftest.$ac_ext <<EOF
  8771. #line 10823 "configure"
  8772. #include "confdefs.h"
  8773. /* Override any gcc2 internal prototype to avoid an error. */
  8774. /* We use char because int might match the return type of a gcc2
  8775. builtin and then its argument prototype would still apply. */
  8776. char avcodec_init();
  8777. int main() {
  8778. avcodec_init()
  8779. ; return 0; }
  8780. EOF
  8781. if { (eval echo configure:10834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8782. rm -rf conftest*
  8783. eval "ac_cv_lib_$ac_lib_var=yes"
  8784. else
  8785. echo "configure: failed program was:" >&5
  8786. cat conftest.$ac_ext >&5
  8787. rm -rf conftest*
  8788. eval "ac_cv_lib_$ac_lib_var=no"
  8789. fi
  8790. rm -f conftest*
  8791. LIBS="$ac_save_LIBS"
  8792. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8793. echo "$ac_t""yes" 1>&6
  8794. FFMPEGLIB="$FFMPEGLIB -lavcodec "
  8795. else
  8796. echo "$ac_t""no" 1>&6
  8797. echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6
  8798. echo "configure:10853: checking for avcodec_init in -lavcodec" >&5
  8799. ac_lib_var=`echo avcodec'_'avcodec_init | sed 'y%./+-%__p_%'`
  8800. ac_save_LIBS="$LIBS"
  8801. LIBS="-lavcodec $FFMPEGLIB $MATHLIB $LIBS"
  8802. cat > conftest.$ac_ext <<EOF
  8803. #line 10859 "configure"
  8804. #include "confdefs.h"
  8805. /* Override any gcc2 internal prototype to avoid an error. */
  8806. /* We use char because int might match the return type of a gcc2
  8807. builtin and then its argument prototype would still apply. */
  8808. char avcodec_init();
  8809. int main() {
  8810. avcodec_init()
  8811. ; return 0; }
  8812. EOF
  8813. if { (eval echo configure:10870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8814. rm -rf conftest*
  8815. eval "ac_cv_lib_$ac_lib_var=yes"
  8816. else
  8817. echo "configure: failed program was:" >&5
  8818. cat conftest.$ac_ext >&5
  8819. rm -rf conftest*
  8820. eval "ac_cv_lib_$ac_lib_var=no"
  8821. fi
  8822. rm -f conftest*
  8823. LIBS="$ac_save_LIBS"
  8824. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8825. echo "$ac_t""yes" 1>&6
  8826. FFMPEGLIB="$FFMPEGLIB -lavcodec $MATHLIB"
  8827. else
  8828. echo "$ac_t""no" 1>&6
  8829. LDFLAGS=${ac_save_ldflags}
  8830. { echo "configure: error: *** Unable to locate FFMPEG library." 1>&2; exit 1; }
  8831. fi
  8832. fi
  8833. LDFLAGS=${ac_save_ldflags}
  8834. ac_save_ldflags="$LDFLAGS"
  8835. LDFLAGS="$FFMPEGLIBPATH $LDFLAGS"
  8836. echo $ac_n "checking for av_set_parameters in -lavformat""... $ac_c" 1>&6
  8837. echo "configure:10915: checking for av_set_parameters in -lavformat" >&5
  8838. ac_lib_var=`echo avformat'_'av_set_parameters | sed 'y%./+-%__p_%'`
  8839. ac_save_LIBS="$LIBS"
  8840. LIBS="-lavformat $FFMPEGLIB $LIBS"
  8841. cat > conftest.$ac_ext <<EOF
  8842. #line 10921 "configure"
  8843. #include "confdefs.h"
  8844. /* Override any gcc2 internal prototype to avoid an error. */
  8845. /* We use char because int might match the return type of a gcc2
  8846. builtin and then its argument prototype would still apply. */
  8847. char av_set_parameters();
  8848. int main() {
  8849. av_set_parameters()
  8850. ; return 0; }
  8851. EOF
  8852. if { (eval echo configure:10932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8853. rm -rf conftest*
  8854. eval "ac_cv_lib_$ac_lib_var=yes"
  8855. else
  8856. echo "configure: failed program was:" >&5
  8857. cat conftest.$ac_ext >&5
  8858. rm -rf conftest*
  8859. eval "ac_cv_lib_$ac_lib_var=no"
  8860. fi
  8861. rm -f conftest*
  8862. LIBS="$ac_save_LIBS"
  8863. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8864. echo "$ac_t""yes" 1>&6
  8865. FFMPEGLIB="$FFMPEGLIB -lavformat "
  8866. else
  8867. echo "$ac_t""no" 1>&6
  8868. echo $ac_n "checking for av_set_parameters in -lavformat""... $ac_c" 1>&6
  8869. echo "configure:10951: checking for av_set_parameters in -lavformat" >&5
  8870. ac_lib_var=`echo avformat'_'av_set_parameters | sed 'y%./+-%__p_%'`
  8871. ac_save_LIBS="$LIBS"
  8872. LIBS="-lavformat $FFMPEGLIB $MATHLIB $LIBS"
  8873. cat > conftest.$ac_ext <<EOF
  8874. #line 10957 "configure"
  8875. #include "confdefs.h"
  8876. /* Override any gcc2 internal prototype to avoid an error. */
  8877. /* We use char because int might match the return type of a gcc2
  8878. builtin and then its argument prototype would still apply. */
  8879. char av_set_parameters();
  8880. int main() {
  8881. av_set_parameters()
  8882. ; return 0; }
  8883. EOF
  8884. if { (eval echo configure:10968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8885. rm -rf conftest*
  8886. eval "ac_cv_lib_$ac_lib_var=yes"
  8887. else
  8888. echo "configure: failed program was:" >&5
  8889. cat conftest.$ac_ext >&5
  8890. rm -rf conftest*
  8891. eval "ac_cv_lib_$ac_lib_var=no"
  8892. fi
  8893. rm -f conftest*
  8894. LIBS="$ac_save_LIBS"
  8895. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8896. echo "$ac_t""yes" 1>&6
  8897. FFMPEGLIB="$FFMPEGLIB -lavformat $MATHLIB"
  8898. else
  8899. echo "$ac_t""no" 1>&6
  8900. LDFLAGS=${ac_save_ldflags}
  8901. { echo "configure: error: *** Unable to locate FFMPEG library." 1>&2; exit 1; }
  8902. fi
  8903. fi
  8904. LDFLAGS=${ac_save_ldflags}
  8905. fi # $USE_FFMPEG
  8906. # Done checking FFMPEG
  8907. # Enable OpenGL option
  8908. OPENGLINC=
  8909. OPENGLLIB=
  8910. OPENGLULIB=
  8911. USE_OPENGL=
  8912. OPENGL_X11=
  8913. OPENGL_AQUA=
  8914. OPENGL_WINDOWS=
  8915. echo $ac_n "checking whether to use OpenGL""... $ac_c" 1>&6
  8916. echo "configure:11028: checking whether to use OpenGL" >&5
  8917. echo "$ac_t"""$with_opengl"" 1>&6
  8918. case "$with_opengl" in
  8919. n|no)
  8920. OPENGL_TYPE=none
  8921. ;;
  8922. y|yes|x|x11|glx)
  8923. OPENGL_TYPE=X11
  8924. USE_OPENGL=1
  8925. OPENGL_X11=1
  8926. ;;
  8927. aqua|mac|osx|macosx|agl)
  8928. OPENGL_TYPE=Aqua
  8929. USE_OPENGL=1
  8930. OPENGL_AQUA=1
  8931. ;;
  8932. win|windows|mswin|wgl)
  8933. OPENGL_TYPE=Windows
  8934. USE_OPENGL=1
  8935. OPENGL_WINDOWS=1
  8936. ;;
  8937. *)
  8938. { echo "configure: error: *** Valid arguments for --with-opengl= are yes,no,x11,aqua,windows." 1>&2; exit 1; }
  8939. ;;
  8940. esac
  8941. if test -n "$USE_OPENGL" ; then
  8942. if test "$OPENGL_X11" = 1 ; then
  8943. # With OpenGL includes directory
  8944. echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
  8945. echo "configure:11062: checking for location of OpenGL includes" >&5
  8946. case "$with_opengl_includes" in
  8947. y | ye | yes | n | no)
  8948. { echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
  8949. ;;
  8950. esac
  8951. echo "$ac_t""$with_opengl_includes" 1>&6
  8952. if test -n "$with_opengl_includes" ; then
  8953. for dir in $with_opengl_includes; do
  8954. if test -d "$dir"; then
  8955. OPENGLINC="$OPENGLINC -I$dir"
  8956. else
  8957. { echo "configure: error: *** OpenGL includes directory $dir does not exist." 1>&2; exit 1; }
  8958. fi
  8959. done
  8960. fi
  8961. ac_save_cppflags="$CPPFLAGS"
  8962. CPPFLAGS="$OPENGLINC $X_CFLAGS $CPPFLAGS"
  8963. for ac_hdr in GL/gl.h GL/glu.h
  8964. do
  8965. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8966. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8967. echo "configure:11088: checking for $ac_hdr" >&5
  8968. cat > conftest.$ac_ext <<EOF
  8969. #line 11091 "configure"
  8970. #include "confdefs.h"
  8971. #include <$ac_hdr>
  8972. EOF
  8973. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8974. { (eval echo configure:11096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8975. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8976. if test -z "$ac_err"; then
  8977. rm -rf conftest*
  8978. eval "ac_cv_header_$ac_safe=yes"
  8979. else
  8980. echo "$ac_err" >&5
  8981. echo "configure: failed program was:" >&5
  8982. cat conftest.$ac_ext >&5
  8983. rm -rf conftest*
  8984. eval "ac_cv_header_$ac_safe=no"
  8985. fi
  8986. rm -f conftest*
  8987. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8988. echo "$ac_t""yes" 1>&6
  8989. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8990. cat >> confdefs.h <<EOF
  8991. #define $ac_tr_hdr 1
  8992. EOF
  8993. else
  8994. echo "$ac_t""no" 1>&6
  8995. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  8996. fi
  8997. done
  8998. CPPFLAGS=$ac_save_cppflags
  8999. # With OpenGL library directory
  9000. echo $ac_n "checking for location of OpenGL library""... $ac_c" 1>&6
  9001. echo "configure:11130: checking for location of OpenGL library" >&5
  9002. case "$with_opengl_libs" in
  9003. y | ye | yes | n | no)
  9004. { echo "configure: error: *** You must supply a directory to --with-opengl-libs." 1>&2; exit 1; }
  9005. ;;
  9006. esac
  9007. echo "$ac_t""$with_opengl_libs" 1>&6
  9008. if test -n "$with_opengl_libs"; then
  9009. for dir in $with_opengl_libs; do
  9010. if test -d "$dir"; then
  9011. OPENGL_LIB_PATH="$OPENGL_LIB_PATH -L$dir"
  9012. else
  9013. { echo "configure: error: *** OpenGL library directory $dir does not exist." 1>&2; exit 1; }
  9014. fi
  9015. done
  9016. fi
  9017. ac_save_ldflags="$LDFLAGS"
  9018. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  9019. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  9020. echo "configure:11159: checking for glBegin in -lGL" >&5
  9021. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  9022. ac_save_LIBS="$LIBS"
  9023. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
  9024. cat > conftest.$ac_ext <<EOF
  9025. #line 11165 "configure"
  9026. #include "confdefs.h"
  9027. /* Override any gcc2 internal prototype to avoid an error. */
  9028. /* We use char because int might match the return type of a gcc2
  9029. builtin and then its argument prototype would still apply. */
  9030. char glBegin();
  9031. int main() {
  9032. glBegin()
  9033. ; return 0; }
  9034. EOF
  9035. if { (eval echo configure:11176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9036. rm -rf conftest*
  9037. eval "ac_cv_lib_$ac_lib_var=yes"
  9038. else
  9039. echo "configure: failed program was:" >&5
  9040. cat conftest.$ac_ext >&5
  9041. rm -rf conftest*
  9042. eval "ac_cv_lib_$ac_lib_var=no"
  9043. fi
  9044. rm -f conftest*
  9045. LIBS="$ac_save_LIBS"
  9046. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9047. echo "$ac_t""yes" 1>&6
  9048. OPENGLLIB="$OPENGLLIB -lGL "
  9049. else
  9050. echo "$ac_t""no" 1>&6
  9051. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  9052. echo "configure:11195: checking for glBegin in -lGL" >&5
  9053. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  9054. ac_save_LIBS="$LIBS"
  9055. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lXext $LIBS"
  9056. cat > conftest.$ac_ext <<EOF
  9057. #line 11201 "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 glBegin();
  9063. int main() {
  9064. glBegin()
  9065. ; return 0; }
  9066. EOF
  9067. if { (eval echo configure:11212: \"$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. OPENGLLIB="$OPENGLLIB -lGL -lXext"
  9081. else
  9082. echo "$ac_t""no" 1>&6
  9083. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  9084. echo "configure:11231: checking for glBegin in -lGL" >&5
  9085. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  9086. ac_save_LIBS="$LIBS"
  9087. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lpthread $LIBS"
  9088. cat > conftest.$ac_ext <<EOF
  9089. #line 11237 "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 glBegin();
  9095. int main() {
  9096. glBegin()
  9097. ; return 0; }
  9098. EOF
  9099. if { (eval echo configure:11248: \"$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. OPENGLLIB="$OPENGLLIB -lGL -lpthread"
  9113. else
  9114. echo "$ac_t""no" 1>&6
  9115. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  9116. echo "configure:11267: checking for glBegin in -lGL" >&5
  9117. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  9118. ac_save_LIBS="$LIBS"
  9119. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lpthread -lXext $LIBS"
  9120. cat > conftest.$ac_ext <<EOF
  9121. #line 11273 "configure"
  9122. #include "confdefs.h"
  9123. /* Override any gcc2 internal prototype to avoid an error. */
  9124. /* We use char because int might match the return type of a gcc2
  9125. builtin and then its argument prototype would still apply. */
  9126. char glBegin();
  9127. int main() {
  9128. glBegin()
  9129. ; return 0; }
  9130. EOF
  9131. if { (eval echo configure:11284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9132. rm -rf conftest*
  9133. eval "ac_cv_lib_$ac_lib_var=yes"
  9134. else
  9135. echo "configure: failed program was:" >&5
  9136. cat conftest.$ac_ext >&5
  9137. rm -rf conftest*
  9138. eval "ac_cv_lib_$ac_lib_var=no"
  9139. fi
  9140. rm -f conftest*
  9141. LIBS="$ac_save_LIBS"
  9142. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9143. echo "$ac_t""yes" 1>&6
  9144. OPENGLLIB="$OPENGLLIB -lGL -lpthread -lXext"
  9145. else
  9146. echo "$ac_t""no" 1>&6
  9147. LDFLAGS=${ac_save_ldflags}
  9148. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  9149. fi
  9150. fi
  9151. fi
  9152. fi
  9153. LDFLAGS=${ac_save_ldflags}
  9154. ac_save_ldflags="$LDFLAGS"
  9155. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  9156. echo $ac_n "checking for gluBeginCurve in -lGLU""... $ac_c" 1>&6
  9157. echo "configure:11346: checking for gluBeginCurve in -lGLU" >&5
  9158. ac_lib_var=`echo GLU'_'gluBeginCurve | sed 'y%./+-%__p_%'`
  9159. ac_save_LIBS="$LIBS"
  9160. LIBS="-lGLU $OPENGLLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
  9161. cat > conftest.$ac_ext <<EOF
  9162. #line 11352 "configure"
  9163. #include "confdefs.h"
  9164. /* Override any gcc2 internal prototype to avoid an error. */
  9165. /* We use char because int might match the return type of a gcc2
  9166. builtin and then its argument prototype would still apply. */
  9167. char gluBeginCurve();
  9168. int main() {
  9169. gluBeginCurve()
  9170. ; return 0; }
  9171. EOF
  9172. if { (eval echo configure:11363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9173. rm -rf conftest*
  9174. eval "ac_cv_lib_$ac_lib_var=yes"
  9175. else
  9176. echo "configure: failed program was:" >&5
  9177. cat conftest.$ac_ext >&5
  9178. rm -rf conftest*
  9179. eval "ac_cv_lib_$ac_lib_var=no"
  9180. fi
  9181. rm -f conftest*
  9182. LIBS="$ac_save_LIBS"
  9183. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9184. echo "$ac_t""yes" 1>&6
  9185. OPENGLULIB="$OPENGLULIB -lGLU "
  9186. else
  9187. echo "$ac_t""no" 1>&6
  9188. echo $ac_n "checking for gluBeginCurve in -lGLU""... $ac_c" 1>&6
  9189. echo "configure:11382: checking for gluBeginCurve in -lGLU" >&5
  9190. ac_lib_var=`echo GLU'_'gluBeginCurve | sed 'y%./+-%__p_%'`
  9191. ac_save_LIBS="$LIBS"
  9192. LIBS="-lGLU $OPENGLLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lstdc++ $LIBS"
  9193. cat > conftest.$ac_ext <<EOF
  9194. #line 11388 "configure"
  9195. #include "confdefs.h"
  9196. /* Override any gcc2 internal prototype to avoid an error. */
  9197. /* We use char because int might match the return type of a gcc2
  9198. builtin and then its argument prototype would still apply. */
  9199. char gluBeginCurve();
  9200. int main() {
  9201. gluBeginCurve()
  9202. ; return 0; }
  9203. EOF
  9204. if { (eval echo configure:11399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9205. rm -rf conftest*
  9206. eval "ac_cv_lib_$ac_lib_var=yes"
  9207. else
  9208. echo "configure: failed program was:" >&5
  9209. cat conftest.$ac_ext >&5
  9210. rm -rf conftest*
  9211. eval "ac_cv_lib_$ac_lib_var=no"
  9212. fi
  9213. rm -f conftest*
  9214. LIBS="$ac_save_LIBS"
  9215. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9216. echo "$ac_t""yes" 1>&6
  9217. OPENGLULIB="$OPENGLULIB -lGLU -lstdc++"
  9218. else
  9219. echo "$ac_t""no" 1>&6
  9220. LDFLAGS=${ac_save_ldflags}
  9221. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  9222. fi
  9223. fi
  9224. LDFLAGS=${ac_save_ldflags}
  9225. OPENGLLIB="$OPENGL_LIB_PATH $OPENGLLIB"
  9226. OPENGLULIB="$OPENGL_LIB_PATH $OPENGLULIB"
  9227. ac_save_libs="$LIBS"
  9228. ac_save_ldflags="$LDFLAGS"
  9229. LIBS=" $OPENGLLIB $LIBS"
  9230. LDFLAGS=" $LDFLAGS"
  9231. echo $ac_n "checking for glXCreatePbuffer""... $ac_c" 1>&6
  9232. echo "configure:11446: checking for glXCreatePbuffer" >&5
  9233. cat > conftest.$ac_ext <<EOF
  9234. #line 11449 "configure"
  9235. #include "confdefs.h"
  9236. /* System header to define __stub macros and hopefully few prototypes,
  9237. which can conflict with char glXCreatePbuffer(); below. */
  9238. #include <assert.h>
  9239. /* Override any gcc2 internal prototype to avoid an error. */
  9240. /* We use char because int might match the return type of a gcc2
  9241. builtin and then its argument prototype would still apply. */
  9242. char glXCreatePbuffer();
  9243. int main() {
  9244. /* The GNU C library defines this for functions which it implements
  9245. to always fail with ENOSYS. Some functions are actually named
  9246. something starting with __ and the normal name is an alias. */
  9247. #if defined (__stub_glXCreatePbuffer) || defined (__stub___glXCreatePbuffer)
  9248. choke me
  9249. #else
  9250. glXCreatePbuffer();
  9251. #endif
  9252. ; return 0; }
  9253. EOF
  9254. if { (eval echo configure:11472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9255. rm -rf conftest*
  9256. eval "ac_cv_func_glXCreatePbuffer=yes"
  9257. else
  9258. echo "configure: failed program was:" >&5
  9259. cat conftest.$ac_ext >&5
  9260. rm -rf conftest*
  9261. eval "ac_cv_func_glXCreatePbuffer=no"
  9262. fi
  9263. rm -f conftest*
  9264. if eval "test \"`echo '$ac_cv_func_'glXCreatePbuffer`\" = yes"; then
  9265. echo "$ac_t""yes" 1>&6
  9266. cat >> confdefs.h <<\EOF
  9267. #define HAVE_PBUFFERS 1
  9268. EOF
  9269. else
  9270. echo "$ac_t""no" 1>&6
  9271. { echo "configure: error: *** Unable to locate ." 1>&2; exit 1; }
  9272. fi
  9273. LIBS=${ac_save_libs}
  9274. LDFLAGS=${ac_save_ldflags}
  9275. ac_save_libs="$LIBS"
  9276. ac_save_ldflags="$LDFLAGS"
  9277. LIBS=" $OPENGLLIB $LIBS"
  9278. LDFLAGS=" $LDFLAGS"
  9279. echo $ac_n "checking for glXCreateGLXPixmap""... $ac_c" 1>&6
  9280. echo "configure:11509: checking for glXCreateGLXPixmap" >&5
  9281. cat > conftest.$ac_ext <<EOF
  9282. #line 11512 "configure"
  9283. #include "confdefs.h"
  9284. /* System header to define __stub macros and hopefully few prototypes,
  9285. which can conflict with char glXCreateGLXPixmap(); below. */
  9286. #include <assert.h>
  9287. /* Override any gcc2 internal prototype to avoid an error. */
  9288. /* We use char because int might match the return type of a gcc2
  9289. builtin and then its argument prototype would still apply. */
  9290. char glXCreateGLXPixmap();
  9291. int main() {
  9292. /* The GNU C library defines this for functions which it implements
  9293. to always fail with ENOSYS. Some functions are actually named
  9294. something starting with __ and the normal name is an alias. */
  9295. #if defined (__stub_glXCreateGLXPixmap) || defined (__stub___glXCreateGLXPixmap)
  9296. choke me
  9297. #else
  9298. glXCreateGLXPixmap();
  9299. #endif
  9300. ; return 0; }
  9301. EOF
  9302. if { (eval echo configure:11535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9303. rm -rf conftest*
  9304. eval "ac_cv_func_glXCreateGLXPixmap=yes"
  9305. else
  9306. echo "configure: failed program was:" >&5
  9307. cat conftest.$ac_ext >&5
  9308. rm -rf conftest*
  9309. eval "ac_cv_func_glXCreateGLXPixmap=no"
  9310. fi
  9311. rm -f conftest*
  9312. if eval "test \"`echo '$ac_cv_func_'glXCreateGLXPixmap`\" = yes"; then
  9313. echo "$ac_t""yes" 1>&6
  9314. cat >> confdefs.h <<\EOF
  9315. #define HAVE_PIXMAPS 1
  9316. EOF
  9317. else
  9318. echo "$ac_t""no" 1>&6
  9319. { echo "configure: error: *** Unable to locate ." 1>&2; exit 1; }
  9320. fi
  9321. LIBS=${ac_save_libs}
  9322. LDFLAGS=${ac_save_ldflags}
  9323. cat >> confdefs.h <<\EOF
  9324. #define OPENGL_X11 1
  9325. EOF
  9326. fi # $OPENGL_X11
  9327. if test "$OPENGL_AQUA" = 1 ; then
  9328. echo $ac_n "checking for location of OpenGL framework""... $ac_c" 1>&6
  9329. echo "configure:11578: checking for location of OpenGL framework" >&5
  9330. case "$with_opengl_framework" in
  9331. y | ye | yes | n | no)
  9332. { echo "configure: error: *** You must supply a directory to --with-opengl-framework." 1>&2; exit 1; }
  9333. ;;
  9334. esac
  9335. echo "$ac_t""$with_opengl_framework" 1>&6
  9336. if test -n "$with_opengl_framework"; then
  9337. if test -d $with_opengl_framework; then
  9338. OPENGLPATH="$OPENGLPATH -F$with_opengl_framework"
  9339. else
  9340. { echo "configure: error: *** OpenGL framework directory $dir does not exist." 1>&2; exit 1; }
  9341. fi
  9342. fi
  9343. ac_save_cppflags="$CPPFLAGS"
  9344. CPPFLAGS="$OPENGLPATH $CPPFLAGS"
  9345. for ac_hdr in OpenGL/gl.h OpenGL/glu.h
  9346. do
  9347. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9348. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9349. echo "configure:11602: checking for $ac_hdr" >&5
  9350. cat > conftest.$ac_ext <<EOF
  9351. #line 11605 "configure"
  9352. #include "confdefs.h"
  9353. #include <$ac_hdr>
  9354. EOF
  9355. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9356. { (eval echo configure:11610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9357. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9358. if test -z "$ac_err"; then
  9359. rm -rf conftest*
  9360. eval "ac_cv_header_$ac_safe=yes"
  9361. else
  9362. echo "$ac_err" >&5
  9363. echo "configure: failed program was:" >&5
  9364. cat conftest.$ac_ext >&5
  9365. rm -rf conftest*
  9366. eval "ac_cv_header_$ac_safe=no"
  9367. fi
  9368. rm -f conftest*
  9369. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9370. echo "$ac_t""yes" 1>&6
  9371. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9372. cat >> confdefs.h <<EOF
  9373. #define $ac_tr_hdr 1
  9374. EOF
  9375. else
  9376. echo "$ac_t""no" 1>&6
  9377. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  9378. fi
  9379. done
  9380. CPPFLAGS=$ac_save_cppflags
  9381. ac_save_libs="$LIBS"
  9382. ac_save_ldflags="$LDFLAGS"
  9383. LIBS="-framework OpenGL -framework AGL -framework ApplicationServices $LIBS"
  9384. LDFLAGS="$OPENGLPATH $LDFLAGS"
  9385. echo $ac_n "checking for glBegin""... $ac_c" 1>&6
  9386. echo "configure:11646: checking for glBegin" >&5
  9387. cat > conftest.$ac_ext <<EOF
  9388. #line 11649 "configure"
  9389. #include "confdefs.h"
  9390. /* System header to define __stub macros and hopefully few prototypes,
  9391. which can conflict with char glBegin(); below. */
  9392. #include <assert.h>
  9393. /* Override any gcc2 internal prototype to avoid an error. */
  9394. /* We use char because int might match the return type of a gcc2
  9395. builtin and then its argument prototype would still apply. */
  9396. char glBegin();
  9397. int main() {
  9398. /* The GNU C library defines this for functions which it implements
  9399. to always fail with ENOSYS. Some functions are actually named
  9400. something starting with __ and the normal name is an alias. */
  9401. #if defined (__stub_glBegin) || defined (__stub___glBegin)
  9402. choke me
  9403. #else
  9404. glBegin();
  9405. #endif
  9406. ; return 0; }
  9407. EOF
  9408. if { (eval echo configure:11672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9409. rm -rf conftest*
  9410. eval "ac_cv_func_glBegin=yes"
  9411. else
  9412. echo "configure: failed program was:" >&5
  9413. cat conftest.$ac_ext >&5
  9414. rm -rf conftest*
  9415. eval "ac_cv_func_glBegin=no"
  9416. fi
  9417. rm -f conftest*
  9418. if eval "test \"`echo '$ac_cv_func_'glBegin`\" = yes"; then
  9419. echo "$ac_t""yes" 1>&6
  9420. OPENGLLIB="$OPENGLLIB -framework OpenGL -framework AGL -framework ApplicationServices"
  9421. else
  9422. echo "$ac_t""no" 1>&6
  9423. { echo "configure: error: *** Unable to locate glBegin." 1>&2; exit 1; }
  9424. fi
  9425. LIBS=${ac_save_libs}
  9426. LDFLAGS=${ac_save_ldflags}
  9427. ac_save_libs="$LIBS"
  9428. ac_save_ldflags="$LDFLAGS"
  9429. LIBS=" $OPENGLLIB $LIBS"
  9430. LDFLAGS="$OPENGLPATH $LDFLAGS"
  9431. echo $ac_n "checking for gluBeginCurve""... $ac_c" 1>&6
  9432. echo "configure:11709: checking for gluBeginCurve" >&5
  9433. cat > conftest.$ac_ext <<EOF
  9434. #line 11712 "configure"
  9435. #include "confdefs.h"
  9436. /* System header to define __stub macros and hopefully few prototypes,
  9437. which can conflict with char gluBeginCurve(); below. */
  9438. #include <assert.h>
  9439. /* Override any gcc2 internal prototype to avoid an error. */
  9440. /* We use char because int might match the return type of a gcc2
  9441. builtin and then its argument prototype would still apply. */
  9442. char gluBeginCurve();
  9443. int main() {
  9444. /* The GNU C library defines this for functions which it implements
  9445. to always fail with ENOSYS. Some functions are actually named
  9446. something starting with __ and the normal name is an alias. */
  9447. #if defined (__stub_gluBeginCurve) || defined (__stub___gluBeginCurve)
  9448. choke me
  9449. #else
  9450. gluBeginCurve();
  9451. #endif
  9452. ; return 0; }
  9453. EOF
  9454. if { (eval echo configure:11735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9455. rm -rf conftest*
  9456. eval "ac_cv_func_gluBeginCurve=yes"
  9457. else
  9458. echo "configure: failed program was:" >&5
  9459. cat conftest.$ac_ext >&5
  9460. rm -rf conftest*
  9461. eval "ac_cv_func_gluBeginCurve=no"
  9462. fi
  9463. rm -f conftest*
  9464. if eval "test \"`echo '$ac_cv_func_'gluBeginCurve`\" = yes"; then
  9465. echo "$ac_t""yes" 1>&6
  9466. OPENGLLIB="$OPENGLLIB "
  9467. else
  9468. echo "$ac_t""no" 1>&6
  9469. { echo "configure: error: *** Unable to locate gluBeginCurve." 1>&2; exit 1; }
  9470. fi
  9471. LIBS=${ac_save_libs}
  9472. LDFLAGS=${ac_save_ldflags}
  9473. OPENGLINC="$OPENGLPATH"
  9474. OPENGLLIBPATH="$OPENGLPATH"
  9475. cat >> confdefs.h <<\EOF
  9476. #define OPENGL_AQUA 1
  9477. EOF
  9478. fi # $OPENGL_AQUA
  9479. if test "$OPENGL_WINDOWS" = 1 ; then
  9480. # With OpenGL includes directory
  9481. echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
  9482. echo "configure:11783: checking for location of OpenGL includes" >&5
  9483. case "$with_opengl_includes" in
  9484. y | ye | yes | n | no)
  9485. { echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
  9486. ;;
  9487. esac
  9488. echo "$ac_t""$with_opengl_includes" 1>&6
  9489. if test -n "$with_opengl_includes" ; then
  9490. for dir in $with_opengl_includes; do
  9491. if test -d "$dir"; then
  9492. OPENGLINC="$OPENGLINC -I$dir"
  9493. else
  9494. { echo "configure: error: *** OpenGL includes directory $dir does not exist." 1>&2; exit 1; }
  9495. fi
  9496. done
  9497. fi
  9498. ac_save_cppflags="$CPPFLAGS"
  9499. CPPFLAGS="$OPENGLINC $CPPFLAGS"
  9500. for ac_hdr in GL/gl.h GL/glu.h
  9501. do
  9502. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9503. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9504. echo "configure:11809: checking for $ac_hdr" >&5
  9505. cat > conftest.$ac_ext <<EOF
  9506. #line 11812 "configure"
  9507. #include "confdefs.h"
  9508. #include <$ac_hdr>
  9509. EOF
  9510. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9511. { (eval echo configure:11817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9512. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9513. if test -z "$ac_err"; then
  9514. rm -rf conftest*
  9515. eval "ac_cv_header_$ac_safe=yes"
  9516. else
  9517. echo "$ac_err" >&5
  9518. echo "configure: failed program was:" >&5
  9519. cat conftest.$ac_ext >&5
  9520. rm -rf conftest*
  9521. eval "ac_cv_header_$ac_safe=no"
  9522. fi
  9523. rm -f conftest*
  9524. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9525. echo "$ac_t""yes" 1>&6
  9526. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9527. cat >> confdefs.h <<EOF
  9528. #define $ac_tr_hdr 1
  9529. EOF
  9530. else
  9531. echo "$ac_t""no" 1>&6
  9532. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  9533. fi
  9534. done
  9535. CPPFLAGS=$ac_save_cppflags
  9536. # With OpenGL library directory
  9537. echo $ac_n "checking for location of OpenGL library""... $ac_c" 1>&6
  9538. echo "configure:11851: checking for location of OpenGL library" >&5
  9539. case "$with_opengl_libs" in
  9540. y | ye | yes | n | no)
  9541. { echo "configure: error: *** You must supply a directory to --with-opengl-libs." 1>&2; exit 1; }
  9542. ;;
  9543. esac
  9544. echo "$ac_t""$with_opengl_libs" 1>&6
  9545. if test -n "$with_opengl_libs"; then
  9546. for dir in $with_opengl_libs; do
  9547. if test -d "$dir"; then
  9548. OPENGL_LIB_PATH="$OPENGL_LIB_PATH -L$dir"
  9549. else
  9550. { echo "configure: error: *** OpenGL library directory $dir does not exist." 1>&2; exit 1; }
  9551. fi
  9552. done
  9553. fi
  9554. ac_save_cflags="$CFLAGS"
  9555. CFLAGS="$CFLAGS $OPENGLINC"
  9556. ac_save_ldflags="$LDFLAGS"
  9557. ac_save_libs="$LIBS"
  9558. echo $ac_n "checking for OpenGL library""... $ac_c" 1>&6
  9559. echo "configure:11876: checking for OpenGL library" >&5
  9560. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  9561. LIBS="-lopengl32 "
  9562. cat > conftest.$ac_ext <<EOF
  9563. #line 11880 "configure"
  9564. #include "confdefs.h"
  9565. #include <GL/gl.h>
  9566. int main() {
  9567. glEnd();
  9568. ; return 0; }
  9569. EOF
  9570. if { (eval echo configure:11887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9571. rm -rf conftest*
  9572. echo "$ac_t""found" 1>&6
  9573. OPENGLLIB="$OPENGLLIB -lopengl32 "
  9574. else
  9575. echo "configure: failed program was:" >&5
  9576. cat conftest.$ac_ext >&5
  9577. rm -rf conftest*
  9578. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  9579. fi
  9580. rm -f conftest*
  9581. LIBS=${ac_save_libs}
  9582. LDFLAGS=${ac_save_ldflags}
  9583. ac_save_ldflags="$LDFLAGS"
  9584. ac_save_libs="$LIBS"
  9585. echo $ac_n "checking for GLU library""... $ac_c" 1>&6
  9586. echo "configure:11911: checking for GLU library" >&5
  9587. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  9588. LIBS="-lglu32 $OPENGLLIB "
  9589. cat > conftest.$ac_ext <<EOF
  9590. #line 11915 "configure"
  9591. #include "confdefs.h"
  9592. #include <GL/glu.h>
  9593. int main() {
  9594. gluNewQuadric();
  9595. ; return 0; }
  9596. EOF
  9597. if { (eval echo configure:11922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9598. rm -rf conftest*
  9599. echo "$ac_t""found" 1>&6
  9600. OPENGLULIB="$OPENGLULIB -lglu32 "
  9601. else
  9602. echo "configure: failed program was:" >&5
  9603. cat conftest.$ac_ext >&5
  9604. rm -rf conftest*
  9605. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  9606. fi
  9607. rm -f conftest*
  9608. LIBS=${ac_save_libs}
  9609. LDFLAGS=${ac_save_ldflags}
  9610. CFLAGS=${ac_save_cflags}
  9611. OPENGLLIB="$OPENGL_LIB_PATH $OPENGLLIB"
  9612. OPENGLULIB="$OPENGL_LIB_PATH $OPENGLULIB"
  9613. cat >> confdefs.h <<\EOF
  9614. #define OPENGL_WINDOWS 1
  9615. EOF
  9616. fi # $OPENGL_WINDOWS
  9617. fi # $USE_OPENGL
  9618. # Done checking OpenGL
  9619. # Enable ODBC option
  9620. echo $ac_n "checking whether to use ODBC""... $ac_c" 1>&6
  9621. echo "configure:11971: checking whether to use ODBC" >&5
  9622. echo "$ac_t"""$with_odbc"" 1>&6
  9623. case "$with_odbc" in
  9624. "no") USE_ODBC= ;;
  9625. "yes") USE_ODBC="1" ;;
  9626. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9627. esac
  9628. ODBCINC=
  9629. ODBCLIB=
  9630. if test -n "$USE_ODBC"; then
  9631. # With ODBC includes directory
  9632. echo $ac_n "checking for location of ODBC includes""... $ac_c" 1>&6
  9633. echo "configure:11990: checking for location of ODBC includes" >&5
  9634. case "$with_odbc_includes" in
  9635. y | ye | yes | n | no)
  9636. { echo "configure: error: *** You must supply a directory to --with-odbc-includes." 1>&2; exit 1; }
  9637. ;;
  9638. esac
  9639. echo "$ac_t""$with_odbc_includes" 1>&6
  9640. if test -n "$with_odbc_includes" ; then
  9641. for dir in $with_odbc_includes; do
  9642. if test -d "$dir"; then
  9643. ODBCINC="$ODBCINC -I$dir"
  9644. else
  9645. { echo "configure: error: *** ODBC includes directory $dir does not exist." 1>&2; exit 1; }
  9646. fi
  9647. done
  9648. fi
  9649. ac_save_cppflags="$CPPFLAGS"
  9650. CPPFLAGS="$ODBCINC $CPPFLAGS"
  9651. for ac_hdr in sql.h
  9652. do
  9653. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9654. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9655. echo "configure:12016: checking for $ac_hdr" >&5
  9656. cat > conftest.$ac_ext <<EOF
  9657. #line 12019 "configure"
  9658. #include "confdefs.h"
  9659. #include <$ac_hdr>
  9660. EOF
  9661. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9662. { (eval echo configure:12024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9663. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9664. if test -z "$ac_err"; then
  9665. rm -rf conftest*
  9666. eval "ac_cv_header_$ac_safe=yes"
  9667. else
  9668. echo "$ac_err" >&5
  9669. echo "configure: failed program was:" >&5
  9670. cat conftest.$ac_ext >&5
  9671. rm -rf conftest*
  9672. eval "ac_cv_header_$ac_safe=no"
  9673. fi
  9674. rm -f conftest*
  9675. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9676. echo "$ac_t""yes" 1>&6
  9677. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9678. cat >> confdefs.h <<EOF
  9679. #define $ac_tr_hdr 1
  9680. EOF
  9681. else
  9682. echo "$ac_t""no" 1>&6
  9683. { echo "configure: error: *** Unable to locate ODBC includes." 1>&2; exit 1; }
  9684. fi
  9685. done
  9686. CPPFLAGS=$ac_save_cppflags
  9687. # With ODBC library directory
  9688. echo $ac_n "checking for location of ODBC library""... $ac_c" 1>&6
  9689. echo "configure:12058: checking for location of ODBC library" >&5
  9690. case "$with_odbc_libs" in
  9691. y | ye | yes | n | no)
  9692. { echo "configure: error: *** You must supply a directory to --with-odbc-libs." 1>&2; exit 1; }
  9693. ;;
  9694. esac
  9695. echo "$ac_t""$with_odbc_libs" 1>&6
  9696. if test -n "$with_odbc_libs"; then
  9697. for dir in $with_odbc_libs; do
  9698. if test -d "$dir"; then
  9699. ODBCLIB="$ODBCLIB -L$dir"
  9700. else
  9701. { echo "configure: error: *** ODBC library directory $dir does not exist." 1>&2; exit 1; }
  9702. fi
  9703. done
  9704. fi
  9705. ac_save_ldflags="$LDFLAGS"
  9706. LDFLAGS="$ODBCLIB $LDFLAGS"
  9707. echo $ac_n "checking for SQLConnect in -lodbc""... $ac_c" 1>&6
  9708. echo "configure:12083: checking for SQLConnect in -lodbc" >&5
  9709. ac_lib_var=`echo odbc'_'SQLConnect | sed 'y%./+-%__p_%'`
  9710. ac_save_LIBS="$LIBS"
  9711. LIBS="-lodbc $ICONVLIB $LIBS"
  9712. cat > conftest.$ac_ext <<EOF
  9713. #line 12089 "configure"
  9714. #include "confdefs.h"
  9715. /* Override any gcc2 internal prototype to avoid an error. */
  9716. /* We use char because int might match the return type of a gcc2
  9717. builtin and then its argument prototype would still apply. */
  9718. char SQLConnect();
  9719. int main() {
  9720. SQLConnect()
  9721. ; return 0; }
  9722. EOF
  9723. if { (eval echo configure:12100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9724. rm -rf conftest*
  9725. eval "ac_cv_lib_$ac_lib_var=yes"
  9726. else
  9727. echo "configure: failed program was:" >&5
  9728. cat conftest.$ac_ext >&5
  9729. rm -rf conftest*
  9730. eval "ac_cv_lib_$ac_lib_var=no"
  9731. fi
  9732. rm -f conftest*
  9733. LIBS="$ac_save_LIBS"
  9734. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9735. echo "$ac_t""yes" 1>&6
  9736. ODBCLIB="$ODBCLIB -lodbc "
  9737. else
  9738. echo "$ac_t""no" 1>&6
  9739. LDFLAGS=${ac_save_ldflags}
  9740. ac_save_ldflags="$LDFLAGS"
  9741. LDFLAGS="$ODBCLIB $LDFLAGS"
  9742. echo $ac_n "checking for SQLConnect in -liodbc""... $ac_c" 1>&6
  9743. echo "configure:12125: checking for SQLConnect in -liodbc" >&5
  9744. ac_lib_var=`echo iodbc'_'SQLConnect | sed 'y%./+-%__p_%'`
  9745. ac_save_LIBS="$LIBS"
  9746. LIBS="-liodbc $LIBS"
  9747. cat > conftest.$ac_ext <<EOF
  9748. #line 12131 "configure"
  9749. #include "confdefs.h"
  9750. /* Override any gcc2 internal prototype to avoid an error. */
  9751. /* We use char because int might match the return type of a gcc2
  9752. builtin and then its argument prototype would still apply. */
  9753. char SQLConnect();
  9754. int main() {
  9755. SQLConnect()
  9756. ; return 0; }
  9757. EOF
  9758. if { (eval echo configure:12142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9759. rm -rf conftest*
  9760. eval "ac_cv_lib_$ac_lib_var=yes"
  9761. else
  9762. echo "configure: failed program was:" >&5
  9763. cat conftest.$ac_ext >&5
  9764. rm -rf conftest*
  9765. eval "ac_cv_lib_$ac_lib_var=no"
  9766. fi
  9767. rm -f conftest*
  9768. LIBS="$ac_save_LIBS"
  9769. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9770. echo "$ac_t""yes" 1>&6
  9771. ODBCLIB="$ODBCLIB -liodbc "
  9772. else
  9773. echo "$ac_t""no" 1>&6
  9774. LDFLAGS=${ac_save_ldflags}
  9775. ac_save_cflags="$CFLAGS"
  9776. CFLAGS="$CFLAGS $ODBCINC"
  9777. ac_save_ldflags="$LDFLAGS"
  9778. ac_save_libs="$LIBS"
  9779. echo $ac_n "checking for ODBC library""... $ac_c" 1>&6
  9780. echo "configure:12167: checking for ODBC library" >&5
  9781. LDFLAGS="$ODBCLIB $LDFLAGS"
  9782. LIBS="-lodbc32 "
  9783. cat > conftest.$ac_ext <<EOF
  9784. #line 12171 "configure"
  9785. #include "confdefs.h"
  9786. #include <windows.h>
  9787. #include <sql.h>
  9788. int main() {
  9789. SQLAllocEnv((SQLHENV *)0);
  9790. ; return 0; }
  9791. EOF
  9792. if { (eval echo configure:12179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9793. rm -rf conftest*
  9794. echo "$ac_t""found" 1>&6
  9795. ODBCLIB="$ODBCLIB -lodbc32 "
  9796. else
  9797. echo "configure: failed program was:" >&5
  9798. cat conftest.$ac_ext >&5
  9799. rm -rf conftest*
  9800. { echo "configure: error: *** Unable to locate ODBC library." 1>&2; exit 1; }
  9801. fi
  9802. rm -f conftest*
  9803. LIBS=${ac_save_libs}
  9804. LDFLAGS=${ac_save_ldflags}
  9805. CFLAGS=${ac_save_cflags}
  9806. fi
  9807. LDFLAGS=${ac_save_ldflags}
  9808. fi
  9809. LDFLAGS=${ac_save_ldflags}
  9810. fi # $USE_ODBC
  9811. # Done checking ODBC
  9812. # Enable FFTW option
  9813. echo $ac_n "checking whether to use FFTW""... $ac_c" 1>&6
  9814. echo "configure:12228: checking whether to use FFTW" >&5
  9815. echo "$ac_t"""$with_fftw"" 1>&6
  9816. case "$with_fftw" in
  9817. "no") USE_FFTW= ;;
  9818. "yes") USE_FFTW="1" ;;
  9819. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9820. esac
  9821. FFTWINC=
  9822. FFTWLIB=
  9823. if test -n "$USE_FFTW"; then
  9824. # With FFTW includes directory
  9825. echo $ac_n "checking for location of FFTW includes""... $ac_c" 1>&6
  9826. echo "configure:12247: checking for location of FFTW includes" >&5
  9827. case "$with_fftw_includes" in
  9828. y | ye | yes | n | no)
  9829. { echo "configure: error: *** You must supply a directory to --with-fftw-includes." 1>&2; exit 1; }
  9830. ;;
  9831. esac
  9832. echo "$ac_t""$with_fftw_includes" 1>&6
  9833. if test -n "$with_fftw_includes" ; then
  9834. for dir in $with_fftw_includes; do
  9835. if test -d "$dir"; then
  9836. FFTWINC="$FFTWINC -I$dir"
  9837. else
  9838. { echo "configure: error: *** FFTW includes directory $dir does not exist." 1>&2; exit 1; }
  9839. fi
  9840. done
  9841. fi
  9842. ac_save_cppflags="$CPPFLAGS"
  9843. CPPFLAGS="$FFTWINC $CPPFLAGS"
  9844. for ac_hdr in fftw3.h
  9845. do
  9846. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9847. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9848. echo "configure:12273: checking for $ac_hdr" >&5
  9849. cat > conftest.$ac_ext <<EOF
  9850. #line 12276 "configure"
  9851. #include "confdefs.h"
  9852. #include <$ac_hdr>
  9853. EOF
  9854. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9855. { (eval echo configure:12281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9856. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9857. if test -z "$ac_err"; then
  9858. rm -rf conftest*
  9859. eval "ac_cv_header_$ac_safe=yes"
  9860. else
  9861. echo "$ac_err" >&5
  9862. echo "configure: failed program was:" >&5
  9863. cat conftest.$ac_ext >&5
  9864. rm -rf conftest*
  9865. eval "ac_cv_header_$ac_safe=no"
  9866. fi
  9867. rm -f conftest*
  9868. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9869. echo "$ac_t""yes" 1>&6
  9870. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9871. cat >> confdefs.h <<EOF
  9872. #define $ac_tr_hdr 1
  9873. EOF
  9874. else
  9875. echo "$ac_t""no" 1>&6
  9876. ac_save_cppflags="$CPPFLAGS"
  9877. CPPFLAGS=" $CPPFLAGS"
  9878. for ac_hdr in fftw.h
  9879. do
  9880. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9881. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9882. echo "configure:12309: checking for $ac_hdr" >&5
  9883. cat > conftest.$ac_ext <<EOF
  9884. #line 12312 "configure"
  9885. #include "confdefs.h"
  9886. #include <$ac_hdr>
  9887. EOF
  9888. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9889. { (eval echo configure:12317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9890. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9891. if test -z "$ac_err"; then
  9892. rm -rf conftest*
  9893. eval "ac_cv_header_$ac_safe=yes"
  9894. else
  9895. echo "$ac_err" >&5
  9896. echo "configure: failed program was:" >&5
  9897. cat conftest.$ac_ext >&5
  9898. rm -rf conftest*
  9899. eval "ac_cv_header_$ac_safe=no"
  9900. fi
  9901. rm -f conftest*
  9902. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9903. echo "$ac_t""yes" 1>&6
  9904. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9905. cat >> confdefs.h <<EOF
  9906. #define $ac_tr_hdr 1
  9907. EOF
  9908. else
  9909. echo "$ac_t""no" 1>&6
  9910. ac_save_cppflags="$CPPFLAGS"
  9911. CPPFLAGS=" $CPPFLAGS"
  9912. for ac_hdr in dfftw.h
  9913. do
  9914. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9915. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9916. echo "configure:12345: checking for $ac_hdr" >&5
  9917. cat > conftest.$ac_ext <<EOF
  9918. #line 12348 "configure"
  9919. #include "confdefs.h"
  9920. #include <$ac_hdr>
  9921. EOF
  9922. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9923. { (eval echo configure:12353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9924. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9925. if test -z "$ac_err"; then
  9926. rm -rf conftest*
  9927. eval "ac_cv_header_$ac_safe=yes"
  9928. else
  9929. echo "$ac_err" >&5
  9930. echo "configure: failed program was:" >&5
  9931. cat conftest.$ac_ext >&5
  9932. rm -rf conftest*
  9933. eval "ac_cv_header_$ac_safe=no"
  9934. fi
  9935. rm -f conftest*
  9936. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9937. echo "$ac_t""yes" 1>&6
  9938. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9939. cat >> confdefs.h <<EOF
  9940. #define $ac_tr_hdr 1
  9941. EOF
  9942. else
  9943. echo "$ac_t""no" 1>&6
  9944. { echo "configure: error: *** Unable to locate FFTW includes." 1>&2; exit 1; }
  9945. fi
  9946. done
  9947. CPPFLAGS=$ac_save_cppflags
  9948. fi
  9949. done
  9950. CPPFLAGS=$ac_save_cppflags
  9951. fi
  9952. done
  9953. CPPFLAGS=$ac_save_cppflags
  9954. # With FFTW library directory
  9955. echo $ac_n "checking for location of FFTW library""... $ac_c" 1>&6
  9956. echo "configure:12399: checking for location of FFTW library" >&5
  9957. case "$with_fftw_libs" in
  9958. y | ye | yes | n | no)
  9959. { echo "configure: error: *** You must supply a directory to --with-fftw-libs." 1>&2; exit 1; }
  9960. ;;
  9961. esac
  9962. echo "$ac_t""$with_fftw_libs" 1>&6
  9963. if test -n "$with_fftw_libs"; then
  9964. for dir in $with_fftw_libs; do
  9965. if test -d "$dir"; then
  9966. FFTWLIB="$FFTWLIB -L$dir"
  9967. else
  9968. { echo "configure: error: *** FFTW library directory $dir does not exist." 1>&2; exit 1; }
  9969. fi
  9970. done
  9971. fi
  9972. ac_save_ldflags="$LDFLAGS"
  9973. LDFLAGS="$FFTWLIB $LDFLAGS"
  9974. echo $ac_n "checking for fftw_execute in -lfftw3""... $ac_c" 1>&6
  9975. echo "configure:12424: checking for fftw_execute in -lfftw3" >&5
  9976. ac_lib_var=`echo fftw3'_'fftw_execute | sed 'y%./+-%__p_%'`
  9977. ac_save_LIBS="$LIBS"
  9978. LIBS="-lfftw3 $MATHLIB $LIBS"
  9979. cat > conftest.$ac_ext <<EOF
  9980. #line 12430 "configure"
  9981. #include "confdefs.h"
  9982. /* Override any gcc2 internal prototype to avoid an error. */
  9983. /* We use char because int might match the return type of a gcc2
  9984. builtin and then its argument prototype would still apply. */
  9985. char fftw_execute();
  9986. int main() {
  9987. fftw_execute()
  9988. ; return 0; }
  9989. EOF
  9990. if { (eval echo configure:12441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9991. rm -rf conftest*
  9992. eval "ac_cv_lib_$ac_lib_var=yes"
  9993. else
  9994. echo "configure: failed program was:" >&5
  9995. cat conftest.$ac_ext >&5
  9996. rm -rf conftest*
  9997. eval "ac_cv_lib_$ac_lib_var=no"
  9998. fi
  9999. rm -f conftest*
  10000. LIBS="$ac_save_LIBS"
  10001. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10002. echo "$ac_t""yes" 1>&6
  10003. FFTWLIB="$FFTWLIB -lfftw3 $MATHLIB"
  10004. else
  10005. echo "$ac_t""no" 1>&6
  10006. LDFLAGS=${ac_save_ldflags}
  10007. ac_save_ldflags="$LDFLAGS"
  10008. LDFLAGS="$FFTWLIB $LDFLAGS"
  10009. echo $ac_n "checking for fftwnd_one in -lfftw""... $ac_c" 1>&6
  10010. echo "configure:12466: checking for fftwnd_one in -lfftw" >&5
  10011. ac_lib_var=`echo fftw'_'fftwnd_one | sed 'y%./+-%__p_%'`
  10012. ac_save_LIBS="$LIBS"
  10013. LIBS="-lfftw $MATHLIB $LIBS"
  10014. cat > conftest.$ac_ext <<EOF
  10015. #line 12472 "configure"
  10016. #include "confdefs.h"
  10017. /* Override any gcc2 internal prototype to avoid an error. */
  10018. /* We use char because int might match the return type of a gcc2
  10019. builtin and then its argument prototype would still apply. */
  10020. char fftwnd_one();
  10021. int main() {
  10022. fftwnd_one()
  10023. ; return 0; }
  10024. EOF
  10025. if { (eval echo configure:12483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10026. rm -rf conftest*
  10027. eval "ac_cv_lib_$ac_lib_var=yes"
  10028. else
  10029. echo "configure: failed program was:" >&5
  10030. cat conftest.$ac_ext >&5
  10031. rm -rf conftest*
  10032. eval "ac_cv_lib_$ac_lib_var=no"
  10033. fi
  10034. rm -f conftest*
  10035. LIBS="$ac_save_LIBS"
  10036. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10037. echo "$ac_t""yes" 1>&6
  10038. FFTWLIB="$FFTWLIB -lfftw $MATHLIB"
  10039. else
  10040. echo "$ac_t""no" 1>&6
  10041. LDFLAGS=${ac_save_ldflags}
  10042. ac_save_ldflags="$LDFLAGS"
  10043. LDFLAGS="$FFTWLIB $LDFLAGS"
  10044. echo $ac_n "checking for fftwnd_one in -ldfftw""... $ac_c" 1>&6
  10045. echo "configure:12508: checking for fftwnd_one in -ldfftw" >&5
  10046. ac_lib_var=`echo dfftw'_'fftwnd_one | sed 'y%./+-%__p_%'`
  10047. ac_save_LIBS="$LIBS"
  10048. LIBS="-ldfftw $MATHLIB $LIBS"
  10049. cat > conftest.$ac_ext <<EOF
  10050. #line 12514 "configure"
  10051. #include "confdefs.h"
  10052. /* Override any gcc2 internal prototype to avoid an error. */
  10053. /* We use char because int might match the return type of a gcc2
  10054. builtin and then its argument prototype would still apply. */
  10055. char fftwnd_one();
  10056. int main() {
  10057. fftwnd_one()
  10058. ; return 0; }
  10059. EOF
  10060. if { (eval echo configure:12525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10061. rm -rf conftest*
  10062. eval "ac_cv_lib_$ac_lib_var=yes"
  10063. else
  10064. echo "configure: failed program was:" >&5
  10065. cat conftest.$ac_ext >&5
  10066. rm -rf conftest*
  10067. eval "ac_cv_lib_$ac_lib_var=no"
  10068. fi
  10069. rm -f conftest*
  10070. LIBS="$ac_save_LIBS"
  10071. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10072. echo "$ac_t""yes" 1>&6
  10073. FFTWLIB="$FFTWLIB -ldfftw $MATHLIB"
  10074. else
  10075. echo "$ac_t""no" 1>&6
  10076. LDFLAGS=${ac_save_ldflags}
  10077. { echo "configure: error: *** Unable to locate FFTW library." 1>&2; exit 1; }
  10078. fi
  10079. LDFLAGS=${ac_save_ldflags}
  10080. fi
  10081. LDFLAGS=${ac_save_ldflags}
  10082. fi
  10083. LDFLAGS=${ac_save_ldflags}
  10084. fi # $USE_FFTW
  10085. # Done checking FFTW
  10086. # Enable BLAS option
  10087. echo $ac_n "checking whether to use BLAS""... $ac_c" 1>&6
  10088. echo "configure:12582: checking whether to use BLAS" >&5
  10089. echo "$ac_t"""$with_blas"" 1>&6
  10090. case "$with_blas" in
  10091. "no") USE_BLAS= ;;
  10092. "yes") USE_BLAS="1" ;;
  10093. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10094. esac
  10095. BLASLIB=
  10096. BLASINC=
  10097. if test -n "$USE_BLAS"; then
  10098. # With BLAS includes directory
  10099. # BLAS doesn't have includes (FORTRAN library)
  10100. # With BLAS library directory
  10101. echo $ac_n "checking for location of BLAS includes""... $ac_c" 1>&6
  10102. echo "configure:12603: checking for location of BLAS includes" >&5
  10103. case "$with_blas_includes" in
  10104. y | ye | yes | n | no)
  10105. { echo "configure: error: *** You must supply a directory to --with-blas-includes." 1>&2; exit 1; }
  10106. ;;
  10107. esac
  10108. echo "$ac_t""$with_blas_includes" 1>&6
  10109. if test -n "$with_blas_includes" ; then
  10110. for dir in $with_blas_includes; do
  10111. if test -d "$dir"; then
  10112. BLASINC="$BLASINC -I$dir"
  10113. else
  10114. { echo "configure: error: *** BLAS includes directory $dir does not exist." 1>&2; exit 1; }
  10115. fi
  10116. done
  10117. fi
  10118. echo $ac_n "checking for location of BLAS library""... $ac_c" 1>&6
  10119. echo "configure:12623: checking for location of BLAS library" >&5
  10120. case "$with_blas_libs" in
  10121. y | ye | yes | n | no)
  10122. { echo "configure: error: *** You must supply a directory to --with-blas-libs." 1>&2; exit 1; }
  10123. ;;
  10124. esac
  10125. echo "$ac_t""$with_blas_libs" 1>&6
  10126. if test -n "$with_blas_libs"; then
  10127. for dir in $with_blas_libs; do
  10128. if test -d "$dir"; then
  10129. BLASLIB="$BLASLIB -L$dir"
  10130. else
  10131. { echo "configure: error: *** BLAS library directory $dir does not exist." 1>&2; exit 1; }
  10132. fi
  10133. done
  10134. fi
  10135. # See if cblas.h exists (CBLAS,ATLAS,others)
  10136. save_CPPFLAGS="$CPPFLAGS"
  10137. CPPFLAGS="$BLASINC $CPPFLAGS"
  10138. for ac_hdr in cblas.h
  10139. do
  10140. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10141. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10142. echo "configure:12649: checking for $ac_hdr" >&5
  10143. cat > conftest.$ac_ext <<EOF
  10144. #line 12652 "configure"
  10145. #include "confdefs.h"
  10146. #include <$ac_hdr>
  10147. EOF
  10148. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10149. { (eval echo configure:12657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10150. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10151. if test -z "$ac_err"; then
  10152. rm -rf conftest*
  10153. eval "ac_cv_header_$ac_safe=yes"
  10154. else
  10155. echo "$ac_err" >&5
  10156. echo "configure: failed program was:" >&5
  10157. cat conftest.$ac_ext >&5
  10158. rm -rf conftest*
  10159. eval "ac_cv_header_$ac_safe=no"
  10160. fi
  10161. rm -f conftest*
  10162. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10163. echo "$ac_t""yes" 1>&6
  10164. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10165. cat >> confdefs.h <<EOF
  10166. #define $ac_tr_hdr 1
  10167. EOF
  10168. else
  10169. echo "$ac_t""no" 1>&6
  10170. fi
  10171. done
  10172. CPPFLAGS=$save_CPPFLAGS
  10173. ac_save_ldflags="$LDFLAGS"
  10174. LDFLAGS="$BLASLIB $LDFLAGS"
  10175. echo $ac_n "checking for dnrm2_ in -lblas""... $ac_c" 1>&6
  10176. echo "configure:12692: checking for dnrm2_ in -lblas" >&5
  10177. ac_lib_var=`echo blas'_'dnrm2_ | sed 'y%./+-%__p_%'`
  10178. ac_save_LIBS="$LIBS"
  10179. LIBS="-lblas $MATHLIB $LIBS"
  10180. cat > conftest.$ac_ext <<EOF
  10181. #line 12698 "configure"
  10182. #include "confdefs.h"
  10183. /* Override any gcc2 internal prototype to avoid an error. */
  10184. /* We use char because int might match the return type of a gcc2
  10185. builtin and then its argument prototype would still apply. */
  10186. char dnrm2_();
  10187. int main() {
  10188. dnrm2_()
  10189. ; return 0; }
  10190. EOF
  10191. if { (eval echo configure:12709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10192. rm -rf conftest*
  10193. eval "ac_cv_lib_$ac_lib_var=yes"
  10194. else
  10195. echo "configure: failed program was:" >&5
  10196. cat conftest.$ac_ext >&5
  10197. rm -rf conftest*
  10198. eval "ac_cv_lib_$ac_lib_var=no"
  10199. fi
  10200. rm -f conftest*
  10201. LIBS="$ac_save_LIBS"
  10202. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10203. echo "$ac_t""yes" 1>&6
  10204. BLASLIB="$BLASLIB -lblas "
  10205. else
  10206. echo "$ac_t""no" 1>&6
  10207. echo $ac_n "checking for dnrm2_ in -lblas""... $ac_c" 1>&6
  10208. echo "configure:12728: checking for dnrm2_ in -lblas" >&5
  10209. ac_lib_var=`echo blas'_'dnrm2_ | sed 'y%./+-%__p_%'`
  10210. ac_save_LIBS="$LIBS"
  10211. LIBS="-lblas $MATHLIB -lg2c $LIBS"
  10212. cat > conftest.$ac_ext <<EOF
  10213. #line 12734 "configure"
  10214. #include "confdefs.h"
  10215. /* Override any gcc2 internal prototype to avoid an error. */
  10216. /* We use char because int might match the return type of a gcc2
  10217. builtin and then its argument prototype would still apply. */
  10218. char dnrm2_();
  10219. int main() {
  10220. dnrm2_()
  10221. ; return 0; }
  10222. EOF
  10223. if { (eval echo configure:12745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10224. rm -rf conftest*
  10225. eval "ac_cv_lib_$ac_lib_var=yes"
  10226. else
  10227. echo "configure: failed program was:" >&5
  10228. cat conftest.$ac_ext >&5
  10229. rm -rf conftest*
  10230. eval "ac_cv_lib_$ac_lib_var=no"
  10231. fi
  10232. rm -f conftest*
  10233. LIBS="$ac_save_LIBS"
  10234. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10235. echo "$ac_t""yes" 1>&6
  10236. BLASLIB="$BLASLIB -lblas -lg2c"
  10237. else
  10238. echo "$ac_t""no" 1>&6
  10239. LDFLAGS=${ac_save_ldflags}
  10240. { echo "configure: error: *** Unable to locate BLAS library." 1>&2; exit 1; }
  10241. fi
  10242. fi
  10243. LDFLAGS=${ac_save_ldflags}
  10244. blas_ok=no
  10245. # Check for ATLAS
  10246. save_LDFLAGS="$LDFLAGS"
  10247. LDFLAGS="$BLASLIB $LDFLAGS"
  10248. echo $ac_n "checking for ATL_xerbla in -latlas""... $ac_c" 1>&6
  10249. echo "configure:12789: checking for ATL_xerbla in -latlas" >&5
  10250. ac_lib_var=`echo atlas'_'ATL_xerbla | sed 'y%./+-%__p_%'`
  10251. ac_save_LIBS="$LIBS"
  10252. LIBS="-latlas $LIBS"
  10253. cat > conftest.$ac_ext <<EOF
  10254. #line 12795 "configure"
  10255. #include "confdefs.h"
  10256. /* Override any gcc2 internal prototype to avoid an error. */
  10257. /* We use char because int might match the return type of a gcc2
  10258. builtin and then its argument prototype would still apply. */
  10259. char ATL_xerbla();
  10260. int main() {
  10261. ATL_xerbla()
  10262. ; return 0; }
  10263. EOF
  10264. if { (eval echo configure:12806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10265. rm -rf conftest*
  10266. eval "ac_cv_lib_$ac_lib_var=yes"
  10267. else
  10268. echo "configure: failed program was:" >&5
  10269. cat conftest.$ac_ext >&5
  10270. rm -rf conftest*
  10271. eval "ac_cv_lib_$ac_lib_var=no"
  10272. fi
  10273. rm -f conftest*
  10274. LIBS="$ac_save_LIBS"
  10275. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10276. echo "$ac_t""yes" 1>&6
  10277. echo $ac_n "checking for sgemm_ in -lf77blas""... $ac_c" 1>&6
  10278. echo "configure:12821: checking for sgemm_ in -lf77blas" >&5
  10279. ac_lib_var=`echo f77blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  10280. ac_save_LIBS="$LIBS"
  10281. LIBS="-lf77blas -latlas $LIBS"
  10282. cat > conftest.$ac_ext <<EOF
  10283. #line 12827 "configure"
  10284. #include "confdefs.h"
  10285. /* Override any gcc2 internal prototype to avoid an error. */
  10286. /* We use char because int might match the return type of a gcc2
  10287. builtin and then its argument prototype would still apply. */
  10288. char sgemm_();
  10289. int main() {
  10290. sgemm_()
  10291. ; return 0; }
  10292. EOF
  10293. if { (eval echo configure:12838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10294. rm -rf conftest*
  10295. eval "ac_cv_lib_$ac_lib_var=yes"
  10296. else
  10297. echo "configure: failed program was:" >&5
  10298. cat conftest.$ac_ext >&5
  10299. rm -rf conftest*
  10300. eval "ac_cv_lib_$ac_lib_var=no"
  10301. fi
  10302. rm -f conftest*
  10303. LIBS="$ac_save_LIBS"
  10304. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10305. echo "$ac_t""yes" 1>&6
  10306. echo $ac_n "checking for cblas_dgemm in -lcblas""... $ac_c" 1>&6
  10307. echo "configure:12853: checking for cblas_dgemm in -lcblas" >&5
  10308. ac_lib_var=`echo cblas'_'cblas_dgemm | sed 'y%./+-%__p_%'`
  10309. ac_save_LIBS="$LIBS"
  10310. LIBS="-lcblas -lf77blas -latlas $LIBS"
  10311. cat > conftest.$ac_ext <<EOF
  10312. #line 12859 "configure"
  10313. #include "confdefs.h"
  10314. /* Override any gcc2 internal prototype to avoid an error. */
  10315. /* We use char because int might match the return type of a gcc2
  10316. builtin and then its argument prototype would still apply. */
  10317. char cblas_dgemm();
  10318. int main() {
  10319. cblas_dgemm()
  10320. ; return 0; }
  10321. EOF
  10322. if { (eval echo configure:12870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10323. rm -rf conftest*
  10324. eval "ac_cv_lib_$ac_lib_var=yes"
  10325. else
  10326. echo "configure: failed program was:" >&5
  10327. cat conftest.$ac_ext >&5
  10328. rm -rf conftest*
  10329. eval "ac_cv_lib_$ac_lib_var=no"
  10330. fi
  10331. rm -f conftest*
  10332. LIBS="$ac_save_LIBS"
  10333. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10334. echo "$ac_t""yes" 1>&6
  10335. blas_ok=yes; BLASLIB="-lcblas -lf77blas -latlas"
  10336. else
  10337. echo "$ac_t""no" 1>&6
  10338. fi
  10339. else
  10340. echo "$ac_t""no" 1>&6
  10341. fi
  10342. else
  10343. echo "$ac_t""no" 1>&6
  10344. fi
  10345. LDFLAGS="$save_LDFLAGS"
  10346. # Do we have ATLAS?
  10347. if test $blas_ok = yes; then
  10348. cat >> confdefs.h <<\EOF
  10349. #define HAVE_LIBATLAS 1
  10350. EOF
  10351. fi
  10352. # BLAS in Apple vecLib framework? (Mac OS-X)
  10353. if test -n "$MACOSX_APP"; then
  10354. if test $blas_ok = no; then
  10355. vlib_flags="-framework vecLib"
  10356. save_LIBS="$LIBS"
  10357. LIBS="$vlib_flags $LIBS"
  10358. echo $ac_n "checking for sgemm in $vlib_flags""... $ac_c" 1>&6
  10359. echo "configure:12915: checking for sgemm in $vlib_flags" >&5
  10360. cat > conftest.$ac_ext <<EOF
  10361. #line 12917 "configure"
  10362. #include "confdefs.h"
  10363. int main() {
  10364. sgemm
  10365. ; return 0; }
  10366. EOF
  10367. if { (eval echo configure:12924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10368. rm -rf conftest*
  10369. blas_ok=yes; BLASLIB="$vlib_flags"
  10370. else
  10371. echo "configure: failed program was:" >&5
  10372. cat conftest.$ac_ext >&5
  10373. rm -rf conftest*
  10374. BLASLIB=""
  10375. fi
  10376. rm -f conftest*
  10377. echo "$ac_t""$blas_ok" 1>&6
  10378. LIBS="$save_LIBS"
  10379. fi
  10380. fi # $MACOSX_APP
  10381. # BLAS in PhiPACK libraries? (requires generic BLAS, too)
  10382. if test $blas_ok = no; then
  10383. echo $ac_n "checking for sgemm_ in -lblas""... $ac_c" 1>&6
  10384. echo "configure:12942: checking for sgemm_ in -lblas" >&5
  10385. ac_lib_var=`echo blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  10386. ac_save_LIBS="$LIBS"
  10387. LIBS="-lblas $LIBS"
  10388. cat > conftest.$ac_ext <<EOF
  10389. #line 12948 "configure"
  10390. #include "confdefs.h"
  10391. /* Override any gcc2 internal prototype to avoid an error. */
  10392. /* We use char because int might match the return type of a gcc2
  10393. builtin and then its argument prototype would still apply. */
  10394. char sgemm_();
  10395. int main() {
  10396. sgemm_()
  10397. ; return 0; }
  10398. EOF
  10399. if { (eval echo configure:12959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10400. rm -rf conftest*
  10401. eval "ac_cv_lib_$ac_lib_var=yes"
  10402. else
  10403. echo "configure: failed program was:" >&5
  10404. cat conftest.$ac_ext >&5
  10405. rm -rf conftest*
  10406. eval "ac_cv_lib_$ac_lib_var=no"
  10407. fi
  10408. rm -f conftest*
  10409. LIBS="$ac_save_LIBS"
  10410. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10411. echo "$ac_t""yes" 1>&6
  10412. echo $ac_n "checking for dgemm_ in -ldgemm""... $ac_c" 1>&6
  10413. echo "configure:12974: checking for dgemm_ in -ldgemm" >&5
  10414. ac_lib_var=`echo dgemm'_'dgemm_ | sed 'y%./+-%__p_%'`
  10415. ac_save_LIBS="$LIBS"
  10416. LIBS="-ldgemm -lblas $LIBS"
  10417. cat > conftest.$ac_ext <<EOF
  10418. #line 12980 "configure"
  10419. #include "confdefs.h"
  10420. /* Override any gcc2 internal prototype to avoid an error. */
  10421. /* We use char because int might match the return type of a gcc2
  10422. builtin and then its argument prototype would still apply. */
  10423. char dgemm_();
  10424. int main() {
  10425. dgemm_()
  10426. ; return 0; }
  10427. EOF
  10428. if { (eval echo configure:12991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10429. rm -rf conftest*
  10430. eval "ac_cv_lib_$ac_lib_var=yes"
  10431. else
  10432. echo "configure: failed program was:" >&5
  10433. cat conftest.$ac_ext >&5
  10434. rm -rf conftest*
  10435. eval "ac_cv_lib_$ac_lib_var=no"
  10436. fi
  10437. rm -f conftest*
  10438. LIBS="$ac_save_LIBS"
  10439. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10440. echo "$ac_t""yes" 1>&6
  10441. echo $ac_n "checking for sgemm_ in -lsgemm""... $ac_c" 1>&6
  10442. echo "configure:13006: checking for sgemm_ in -lsgemm" >&5
  10443. ac_lib_var=`echo sgemm'_'sgemm_ | sed 'y%./+-%__p_%'`
  10444. ac_save_LIBS="$LIBS"
  10445. LIBS="-lsgemm -lblas $LIBS"
  10446. cat > conftest.$ac_ext <<EOF
  10447. #line 13012 "configure"
  10448. #include "confdefs.h"
  10449. /* Override any gcc2 internal prototype to avoid an error. */
  10450. /* We use char because int might match the return type of a gcc2
  10451. builtin and then its argument prototype would still apply. */
  10452. char sgemm_();
  10453. int main() {
  10454. sgemm_()
  10455. ; return 0; }
  10456. EOF
  10457. if { (eval echo configure:13023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10458. rm -rf conftest*
  10459. eval "ac_cv_lib_$ac_lib_var=yes"
  10460. else
  10461. echo "configure: failed program was:" >&5
  10462. cat conftest.$ac_ext >&5
  10463. rm -rf conftest*
  10464. eval "ac_cv_lib_$ac_lib_var=no"
  10465. fi
  10466. rm -f conftest*
  10467. LIBS="$ac_save_LIBS"
  10468. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10469. echo "$ac_t""yes" 1>&6
  10470. blas_ok=yes; BLASLIB="-lsgemm -ldgemm -lblas"
  10471. else
  10472. echo "$ac_t""no" 1>&6
  10473. fi
  10474. else
  10475. echo "$ac_t""no" 1>&6
  10476. fi
  10477. else
  10478. echo "$ac_t""no" 1>&6
  10479. fi
  10480. fi
  10481. # BLAS in Sun Performance library?
  10482. if test $blas_ok = no; then
  10483. if test "x$GCC" != xyes; then # only works with Sun CC
  10484. echo $ac_n "checking for acosp in -lsunmath""... $ac_c" 1>&6
  10485. echo "configure:13057: checking for acosp in -lsunmath" >&5
  10486. ac_lib_var=`echo sunmath'_'acosp | sed 'y%./+-%__p_%'`
  10487. ac_save_LIBS="$LIBS"
  10488. LIBS="-lsunmath $LIBS"
  10489. cat > conftest.$ac_ext <<EOF
  10490. #line 13063 "configure"
  10491. #include "confdefs.h"
  10492. /* Override any gcc2 internal prototype to avoid an error. */
  10493. /* We use char because int might match the return type of a gcc2
  10494. builtin and then its argument prototype would still apply. */
  10495. char acosp();
  10496. int main() {
  10497. acosp()
  10498. ; return 0; }
  10499. EOF
  10500. if { (eval echo configure:13074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10501. rm -rf conftest*
  10502. eval "ac_cv_lib_$ac_lib_var=yes"
  10503. else
  10504. echo "configure: failed program was:" >&5
  10505. cat conftest.$ac_ext >&5
  10506. rm -rf conftest*
  10507. eval "ac_cv_lib_$ac_lib_var=no"
  10508. fi
  10509. rm -f conftest*
  10510. LIBS="$ac_save_LIBS"
  10511. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10512. echo "$ac_t""yes" 1>&6
  10513. echo $ac_n "checking for sgemm_ in -lsunperf""... $ac_c" 1>&6
  10514. echo "configure:13089: checking for sgemm_ in -lsunperf" >&5
  10515. ac_lib_var=`echo sunperf'_'sgemm_ | sed 'y%./+-%__p_%'`
  10516. ac_save_LIBS="$LIBS"
  10517. LIBS="-lsunperf -lsunmath $LIBS"
  10518. cat > conftest.$ac_ext <<EOF
  10519. #line 13095 "configure"
  10520. #include "confdefs.h"
  10521. /* Override any gcc2 internal prototype to avoid an error. */
  10522. /* We use char because int might match the return type of a gcc2
  10523. builtin and then its argument prototype would still apply. */
  10524. char sgemm_();
  10525. int main() {
  10526. sgemm_()
  10527. ; return 0; }
  10528. EOF
  10529. if { (eval echo configure:13106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10530. rm -rf conftest*
  10531. eval "ac_cv_lib_$ac_lib_var=yes"
  10532. else
  10533. echo "configure: failed program was:" >&5
  10534. cat conftest.$ac_ext >&5
  10535. rm -rf conftest*
  10536. eval "ac_cv_lib_$ac_lib_var=no"
  10537. fi
  10538. rm -f conftest*
  10539. LIBS="$ac_save_LIBS"
  10540. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10541. echo "$ac_t""yes" 1>&6
  10542. blas_ok=yes; BLASLIB="-xlic_lib=sunperf -lsunmath"
  10543. else
  10544. echo "$ac_t""no" 1>&6
  10545. fi
  10546. else
  10547. echo "$ac_t""no" 1>&6
  10548. fi
  10549. fi
  10550. fi
  10551. # Generic BLAS library
  10552. if test $blas_ok = no; then
  10553. echo $ac_n "checking for sgemm_ in -lblas""... $ac_c" 1>&6
  10554. echo "configure:13136: checking for sgemm_ in -lblas" >&5
  10555. ac_lib_var=`echo blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  10556. ac_save_LIBS="$LIBS"
  10557. LIBS="-lblas $LIBS"
  10558. cat > conftest.$ac_ext <<EOF
  10559. #line 13142 "configure"
  10560. #include "confdefs.h"
  10561. /* Override any gcc2 internal prototype to avoid an error. */
  10562. /* We use char because int might match the return type of a gcc2
  10563. builtin and then its argument prototype would still apply. */
  10564. char sgemm_();
  10565. int main() {
  10566. sgemm_()
  10567. ; return 0; }
  10568. EOF
  10569. if { (eval echo configure:13153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10570. rm -rf conftest*
  10571. eval "ac_cv_lib_$ac_lib_var=yes"
  10572. else
  10573. echo "configure: failed program was:" >&5
  10574. cat conftest.$ac_ext >&5
  10575. rm -rf conftest*
  10576. eval "ac_cv_lib_$ac_lib_var=no"
  10577. fi
  10578. rm -f conftest*
  10579. LIBS="$ac_save_LIBS"
  10580. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10581. echo "$ac_t""yes" 1>&6
  10582. blas_ok=yes; BLASLIB="-lblas"
  10583. else
  10584. echo "$ac_t""no" 1>&6
  10585. fi
  10586. fi
  10587. if test $blas_ok = yes; then
  10588. cat >> confdefs.h <<\EOF
  10589. #define HAVE_LIBBLAS 1
  10590. EOF
  10591. fi
  10592. fi # $USE_BLAS
  10593. # Done checking BLAS
  10594. # Enable LAPACK option
  10595. echo $ac_n "checking whether to use LAPACK""... $ac_c" 1>&6
  10596. echo "configure:13192: checking whether to use LAPACK" >&5
  10597. echo "$ac_t"""$with_lapack"" 1>&6
  10598. case "$with_lapack" in
  10599. "no") USE_LAPACK= ;;
  10600. "yes") USE_LAPACK="1" ;;
  10601. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10602. esac
  10603. LAPACKLIB=
  10604. LAPACKINC=
  10605. # LAPACK is useless without BLAS
  10606. if test -n "$USE_BLAS"; then
  10607. if test -n "$USE_LAPACK"; then
  10608. # With LAPACK includes directory
  10609. # LAPACK doesn't have includes (FORTRAN library)
  10610. # With LAPACK library directory
  10611. lapack_ok=no
  10612. echo $ac_n "checking for location of LAPACK includes""... $ac_c" 1>&6
  10613. echo "configure:13217: checking for location of LAPACK includes" >&5
  10614. case "$with_lapack_includes" in
  10615. y | ye | yes | n | no)
  10616. { echo "configure: error: *** You must supply a directory to --with-lapack-includes." 1>&2; exit 1; }
  10617. ;;
  10618. esac
  10619. echo "$ac_t""$with_lapack_includes" 1>&6
  10620. if test -n "$with_lapack_includes" ; then
  10621. for dir in $with_lapack_includes; do
  10622. if test -d "$dir"; then
  10623. LAPACKINC="$LAPACKINC -I$dir"
  10624. else
  10625. { echo "configure: error: *** LAPACK includes directory $dir does not exist." 1>&2; exit 1; }
  10626. fi
  10627. done
  10628. fi
  10629. echo $ac_n "checking for location of LAPACK library""... $ac_c" 1>&6
  10630. echo "configure:13237: checking for location of LAPACK library" >&5
  10631. case "$with_lapack_libs" in
  10632. y | ye | yes | n | no)
  10633. { echo "configure: error: *** You must supply a directory to --with-lapack-libs." 1>&2; exit 1; }
  10634. ;;
  10635. esac
  10636. echo "$ac_t""$with_lapack_libs" 1>&6
  10637. if test -n "$with_lapack_libs"; then
  10638. for dir in $with_lapack_libs; do
  10639. if test -d "$dir"; then
  10640. LAPACKLIB="$LAPACKLIB -L$dir"
  10641. else
  10642. { echo "configure: error: *** LAPACK library directory $dir does not exist." 1>&2; exit 1; }
  10643. fi
  10644. done
  10645. fi
  10646. # See if clapack.h exists (ATLAS)
  10647. save_CPPFLAGS="$CPPFLAGS"
  10648. CPPFLAGS="$LAPACKINC $CPPFLAGS"
  10649. for ac_hdr in clapack.h
  10650. do
  10651. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10652. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10653. echo "configure:13263: checking for $ac_hdr" >&5
  10654. cat > conftest.$ac_ext <<EOF
  10655. #line 13266 "configure"
  10656. #include "confdefs.h"
  10657. #include <$ac_hdr>
  10658. EOF
  10659. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10660. { (eval echo configure:13271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10661. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10662. if test -z "$ac_err"; then
  10663. rm -rf conftest*
  10664. eval "ac_cv_header_$ac_safe=yes"
  10665. else
  10666. echo "$ac_err" >&5
  10667. echo "configure: failed program was:" >&5
  10668. cat conftest.$ac_ext >&5
  10669. rm -rf conftest*
  10670. eval "ac_cv_header_$ac_safe=no"
  10671. fi
  10672. rm -f conftest*
  10673. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10674. echo "$ac_t""yes" 1>&6
  10675. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10676. cat >> confdefs.h <<EOF
  10677. #define $ac_tr_hdr 1
  10678. EOF
  10679. else
  10680. echo "$ac_t""no" 1>&6
  10681. fi
  10682. done
  10683. CPPFLAGS=$save_CPPFLAGS
  10684. # LAPACK linked to by default?
  10685. if test lapack_ok=no; then
  10686. save_LIBS="$LIBS"; LIBS="$LIBS $BLASLIB $MATHLIB $FLIBS"
  10687. save_LDFLAGS="$LDFLAGS"; LDFLAGS="$LAPACKLIB $LDFLAGS"
  10688. echo $ac_n "checking for dsegv_""... $ac_c" 1>&6
  10689. echo "configure:13303: checking for dsegv_" >&5
  10690. cat > conftest.$ac_ext <<EOF
  10691. #line 13306 "configure"
  10692. #include "confdefs.h"
  10693. /* System header to define __stub macros and hopefully few prototypes,
  10694. which can conflict with char dsegv_(); below. */
  10695. #include <assert.h>
  10696. /* Override any gcc2 internal prototype to avoid an error. */
  10697. /* We use char because int might match the return type of a gcc2
  10698. builtin and then its argument prototype would still apply. */
  10699. char dsegv_();
  10700. int main() {
  10701. /* The GNU C library defines this for functions which it implements
  10702. to always fail with ENOSYS. Some functions are actually named
  10703. something starting with __ and the normal name is an alias. */
  10704. #if defined (__stub_dsegv_) || defined (__stub___dsegv_)
  10705. choke me
  10706. #else
  10707. dsegv_();
  10708. #endif
  10709. ; return 0; }
  10710. EOF
  10711. if { (eval echo configure:13329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10712. rm -rf conftest*
  10713. eval "ac_cv_func_dsegv_=yes"
  10714. else
  10715. echo "configure: failed program was:" >&5
  10716. cat conftest.$ac_ext >&5
  10717. rm -rf conftest*
  10718. eval "ac_cv_func_dsegv_=no"
  10719. fi
  10720. rm -f conftest*
  10721. if eval "test \"`echo '$ac_cv_func_'dsegv_`\" = yes"; then
  10722. echo "$ac_t""yes" 1>&6
  10723. lapack_ok=yes
  10724. else
  10725. echo "$ac_t""no" 1>&6
  10726. fi
  10727. LIBS="$save_LIBS"
  10728. LDFLAGS="$save_LDFLAGS"
  10729. fi
  10730. # Generic LAPACK library?
  10731. if test $lapack_ok = no; then
  10732. save_libs="$LIBS"; LIBS="$BLASLIB $MATHLIB $LIBS"
  10733. save_LDFLAGS="$LDFLAGS"; LDFLAGS="$LAPACKLIB $LDFLAGS"
  10734. echo $ac_n "checking for desgv_ in -llapack""... $ac_c" 1>&6
  10735. echo "configure:13356: checking for desgv_ in -llapack" >&5
  10736. ac_lib_var=`echo lapack'_'desgv_ | sed 'y%./+-%__p_%'`
  10737. ac_save_LIBS="$LIBS"
  10738. LIBS="-llapack $FLIBS $LIBS"
  10739. cat > conftest.$ac_ext <<EOF
  10740. #line 13362 "configure"
  10741. #include "confdefs.h"
  10742. /* Override any gcc2 internal prototype to avoid an error. */
  10743. /* We use char because int might match the return type of a gcc2
  10744. builtin and then its argument prototype would still apply. */
  10745. char desgv_();
  10746. int main() {
  10747. desgv_()
  10748. ; return 0; }
  10749. EOF
  10750. if { (eval echo configure:13373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10751. rm -rf conftest*
  10752. eval "ac_cv_lib_$ac_lib_var=yes"
  10753. else
  10754. echo "configure: failed program was:" >&5
  10755. cat conftest.$ac_ext >&5
  10756. rm -rf conftest*
  10757. eval "ac_cv_lib_$ac_lib_var=no"
  10758. fi
  10759. rm -f conftest*
  10760. LIBS="$ac_save_LIBS"
  10761. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10762. echo "$ac_t""yes" 1>&6
  10763. lapack_ok=yes; LAPACKLIB="-llapack"
  10764. else
  10765. echo "$ac_t""no" 1>&6
  10766. fi
  10767. LIBS="$save_LIBS"
  10768. LDFLAGS="$save_LDFLAGS"
  10769. fi
  10770. if test $lapack_ok = no; then
  10771. ac_save_ldflags="$LDFLAGS"
  10772. LDFLAGS="$LAPACKLIB $LDFLAGS"
  10773. echo $ac_n "checking for dgesv_ in -llapack""... $ac_c" 1>&6
  10774. echo "configure:13405: checking for dgesv_ in -llapack" >&5
  10775. ac_lib_var=`echo lapack'_'dgesv_ | sed 'y%./+-%__p_%'`
  10776. ac_save_LIBS="$LIBS"
  10777. LIBS="-llapack $BLASLIB $MATHLIB $LIBS"
  10778. cat > conftest.$ac_ext <<EOF
  10779. #line 13411 "configure"
  10780. #include "confdefs.h"
  10781. /* Override any gcc2 internal prototype to avoid an error. */
  10782. /* We use char because int might match the return type of a gcc2
  10783. builtin and then its argument prototype would still apply. */
  10784. char dgesv_();
  10785. int main() {
  10786. dgesv_()
  10787. ; return 0; }
  10788. EOF
  10789. if { (eval echo configure:13422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10790. rm -rf conftest*
  10791. eval "ac_cv_lib_$ac_lib_var=yes"
  10792. else
  10793. echo "configure: failed program was:" >&5
  10794. cat conftest.$ac_ext >&5
  10795. rm -rf conftest*
  10796. eval "ac_cv_lib_$ac_lib_var=no"
  10797. fi
  10798. rm -f conftest*
  10799. LIBS="$ac_save_LIBS"
  10800. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10801. echo "$ac_t""yes" 1>&6
  10802. LAPACKLIB="$LAPACKLIB -llapack "
  10803. else
  10804. echo "$ac_t""no" 1>&6
  10805. echo $ac_n "checking for dgesv_ in -llapack""... $ac_c" 1>&6
  10806. echo "configure:13441: checking for dgesv_ in -llapack" >&5
  10807. ac_lib_var=`echo lapack'_'dgesv_ | sed 'y%./+-%__p_%'`
  10808. ac_save_LIBS="$LIBS"
  10809. LIBS="-llapack $BLASLIB $MATHLIB -lg2c $LIBS"
  10810. cat > conftest.$ac_ext <<EOF
  10811. #line 13447 "configure"
  10812. #include "confdefs.h"
  10813. /* Override any gcc2 internal prototype to avoid an error. */
  10814. /* We use char because int might match the return type of a gcc2
  10815. builtin and then its argument prototype would still apply. */
  10816. char dgesv_();
  10817. int main() {
  10818. dgesv_()
  10819. ; return 0; }
  10820. EOF
  10821. if { (eval echo configure:13458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10822. rm -rf conftest*
  10823. eval "ac_cv_lib_$ac_lib_var=yes"
  10824. else
  10825. echo "configure: failed program was:" >&5
  10826. cat conftest.$ac_ext >&5
  10827. rm -rf conftest*
  10828. eval "ac_cv_lib_$ac_lib_var=no"
  10829. fi
  10830. rm -f conftest*
  10831. LIBS="$ac_save_LIBS"
  10832. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10833. echo "$ac_t""yes" 1>&6
  10834. LAPACKLIB="$LAPACKLIB -llapack -lg2c"
  10835. else
  10836. echo "$ac_t""no" 1>&6
  10837. LDFLAGS=${ac_save_ldflags}
  10838. { echo "configure: error: *** Unable to locate LAPACK library." 1>&2; exit 1; }
  10839. fi
  10840. fi
  10841. LDFLAGS=${ac_save_ldflags}
  10842. fi
  10843. cat >> confdefs.h <<\EOF
  10844. #define HAVE_LIBLAPACK 1
  10845. EOF
  10846. fi # $USE_LAPACK
  10847. fi # $USE_BLAS
  10848. # Done checking LAPACK
  10849. # Enable Cairo display driver option
  10850. echo $ac_n "checking whether to use Cairo""... $ac_c" 1>&6
  10851. echo "configure:13514: checking whether to use Cairo" >&5
  10852. echo "$ac_t"""$with_cairo"" 1>&6
  10853. case "$with_cairo" in
  10854. "no") USE_CAIRO= ;;
  10855. "yes") USE_CAIRO="1" ;;
  10856. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10857. esac
  10858. CAIROINC=
  10859. CAIROLIB=
  10860. if test -n "$USE_CAIRO"; then
  10861. cairo="cairo cairo-ft"
  10862. if test -n "$USE_X11"; then
  10863. cairo="$cairo cairo-xlib-xrender"
  10864. fi
  10865. # With Cairo includes directory
  10866. CAIROINC=`pkg-config --cflags $cairo`
  10867. echo $ac_n "checking for location of cairo includes""... $ac_c" 1>&6
  10868. echo "configure:13540: checking for location of cairo includes" >&5
  10869. case "$with_cairo_includes" in
  10870. y | ye | yes | n | no)
  10871. { echo "configure: error: *** You must supply a directory to --with-cairo-includes." 1>&2; exit 1; }
  10872. ;;
  10873. esac
  10874. echo "$ac_t""$with_cairo_includes" 1>&6
  10875. if test -n "$with_cairo_includes" ; then
  10876. for dir in $with_cairo_includes; do
  10877. if test -d "$dir"; then
  10878. CAIROINC="$CAIROINC -I$dir"
  10879. else
  10880. { echo "configure: error: *** cairo includes directory $dir does not exist." 1>&2; exit 1; }
  10881. fi
  10882. done
  10883. fi
  10884. ac_save_cppflags="$CPPFLAGS"
  10885. CPPFLAGS="$CAIROINC $CPPFLAGS"
  10886. for ac_hdr in cairo.h
  10887. do
  10888. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10889. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10890. echo "configure:13566: checking for $ac_hdr" >&5
  10891. cat > conftest.$ac_ext <<EOF
  10892. #line 13569 "configure"
  10893. #include "confdefs.h"
  10894. #include <$ac_hdr>
  10895. EOF
  10896. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10897. { (eval echo configure:13574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10898. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10899. if test -z "$ac_err"; then
  10900. rm -rf conftest*
  10901. eval "ac_cv_header_$ac_safe=yes"
  10902. else
  10903. echo "$ac_err" >&5
  10904. echo "configure: failed program was:" >&5
  10905. cat conftest.$ac_ext >&5
  10906. rm -rf conftest*
  10907. eval "ac_cv_header_$ac_safe=no"
  10908. fi
  10909. rm -f conftest*
  10910. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10911. echo "$ac_t""yes" 1>&6
  10912. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10913. cat >> confdefs.h <<EOF
  10914. #define $ac_tr_hdr 1
  10915. EOF
  10916. else
  10917. echo "$ac_t""no" 1>&6
  10918. { echo "configure: error: *** Unable to locate Cairo includes." 1>&2; exit 1; }
  10919. fi
  10920. done
  10921. CPPFLAGS=$ac_save_cppflags
  10922. # With Cairo library directory
  10923. CAIROLIB=`pkg-config --libs $cairo`
  10924. echo $ac_n "checking for location of cairo library""... $ac_c" 1>&6
  10925. echo "configure:13610: checking for location of cairo library" >&5
  10926. case "$with_cairo_libs" in
  10927. y | ye | yes | n | no)
  10928. { echo "configure: error: *** You must supply a directory to --with-cairo-libs." 1>&2; exit 1; }
  10929. ;;
  10930. esac
  10931. echo "$ac_t""$with_cairo_libs" 1>&6
  10932. if test -n "$with_cairo_libs"; then
  10933. for dir in $with_cairo_libs; do
  10934. if test -d "$dir"; then
  10935. CAIROLIB="$CAIROLIB -L$dir"
  10936. else
  10937. { echo "configure: error: *** cairo library directory $dir does not exist." 1>&2; exit 1; }
  10938. fi
  10939. done
  10940. fi
  10941. echo $ac_n "checking for cairo linking flags""... $ac_c" 1>&6
  10942. echo "configure:13630: checking for cairo linking flags" >&5
  10943. case "$with_cairo_ldflags" in
  10944. y | ye | yes | n | no)
  10945. { echo "configure: error: *** You must supply a directory to --with-cairo-ldflags." 1>&2; exit 1; }
  10946. ;;
  10947. esac
  10948. echo "$ac_t""$with_cairo_ldflags" 1>&6
  10949. CAIROLIB="$CAIROLIB $with_cairo_ldflags"
  10950. ac_save_libs="$LIBS"
  10951. ac_save_ldflags="$LDFLAGS"
  10952. LIBS=" $CAIROLIB $LIBS"
  10953. LDFLAGS=" $LDFLAGS"
  10954. echo $ac_n "checking for cairo_create""... $ac_c" 1>&6
  10955. echo "configure:13646: checking for cairo_create" >&5
  10956. cat > conftest.$ac_ext <<EOF
  10957. #line 13649 "configure"
  10958. #include "confdefs.h"
  10959. /* System header to define __stub macros and hopefully few prototypes,
  10960. which can conflict with char cairo_create(); below. */
  10961. #include <assert.h>
  10962. /* Override any gcc2 internal prototype to avoid an error. */
  10963. /* We use char because int might match the return type of a gcc2
  10964. builtin and then its argument prototype would still apply. */
  10965. char cairo_create();
  10966. int main() {
  10967. /* The GNU C library defines this for functions which it implements
  10968. to always fail with ENOSYS. Some functions are actually named
  10969. something starting with __ and the normal name is an alias. */
  10970. #if defined (__stub_cairo_create) || defined (__stub___cairo_create)
  10971. choke me
  10972. #else
  10973. cairo_create();
  10974. #endif
  10975. ; return 0; }
  10976. EOF
  10977. if { (eval echo configure:13672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10978. rm -rf conftest*
  10979. eval "ac_cv_func_cairo_create=yes"
  10980. else
  10981. echo "configure: failed program was:" >&5
  10982. cat conftest.$ac_ext >&5
  10983. rm -rf conftest*
  10984. eval "ac_cv_func_cairo_create=no"
  10985. fi
  10986. rm -f conftest*
  10987. if eval "test \"`echo '$ac_cv_func_'cairo_create`\" = yes"; then
  10988. echo "$ac_t""yes" 1>&6
  10989. :
  10990. else
  10991. echo "$ac_t""no" 1>&6
  10992. { echo "configure: error: *** Unable to locate ." 1>&2; exit 1; }
  10993. fi
  10994. LIBS=${ac_save_libs}
  10995. LDFLAGS=${ac_save_ldflags}
  10996. ac_save_libs="$LIBS"
  10997. ac_save_ldflags="$LDFLAGS"
  10998. LIBS=" $CAIROLIB $LIBS"
  10999. LDFLAGS=" $LDFLAGS"
  11000. echo $ac_n "checking for cairo_xlib_surface_create_with_xrender_format""... $ac_c" 1>&6
  11001. echo "configure:13706: checking for cairo_xlib_surface_create_with_xrender_format" >&5
  11002. cat > conftest.$ac_ext <<EOF
  11003. #line 13709 "configure"
  11004. #include "confdefs.h"
  11005. /* System header to define __stub macros and hopefully few prototypes,
  11006. which can conflict with char cairo_xlib_surface_create_with_xrender_format(); below. */
  11007. #include <assert.h>
  11008. /* Override any gcc2 internal prototype to avoid an error. */
  11009. /* We use char because int might match the return type of a gcc2
  11010. builtin and then its argument prototype would still apply. */
  11011. char cairo_xlib_surface_create_with_xrender_format();
  11012. int main() {
  11013. /* The GNU C library defines this for functions which it implements
  11014. to always fail with ENOSYS. Some functions are actually named
  11015. something starting with __ and the normal name is an alias. */
  11016. #if defined (__stub_cairo_xlib_surface_create_with_xrender_format) || defined (__stub___cairo_xlib_surface_create_with_xrender_format)
  11017. choke me
  11018. #else
  11019. cairo_xlib_surface_create_with_xrender_format();
  11020. #endif
  11021. ; return 0; }
  11022. EOF
  11023. if { (eval echo configure:13732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11024. rm -rf conftest*
  11025. eval "ac_cv_func_cairo_xlib_surface_create_with_xrender_format=yes"
  11026. else
  11027. echo "configure: failed program was:" >&5
  11028. cat conftest.$ac_ext >&5
  11029. rm -rf conftest*
  11030. eval "ac_cv_func_cairo_xlib_surface_create_with_xrender_format=no"
  11031. fi
  11032. rm -f conftest*
  11033. if eval "test \"`echo '$ac_cv_func_'cairo_xlib_surface_create_with_xrender_format`\" = yes"; then
  11034. echo "$ac_t""yes" 1>&6
  11035. CAIRO_HAS_XRENDER=1
  11036. else
  11037. echo "$ac_t""no" 1>&6
  11038. CAIRO_HAS_XRENDER=
  11039. fi
  11040. LIBS=${ac_save_libs}
  11041. LDFLAGS=${ac_save_ldflags}
  11042. ac_save_libs="$LIBS"
  11043. ac_save_ldflags="$LDFLAGS"
  11044. LIBS=" $CAIROLIB $LIBS"
  11045. LDFLAGS=" $LDFLAGS"
  11046. echo $ac_n "checking for cairo_xlib_surface_get_xrender_format""... $ac_c" 1>&6
  11047. echo "configure:13765: checking for cairo_xlib_surface_get_xrender_format" >&5
  11048. cat > conftest.$ac_ext <<EOF
  11049. #line 13768 "configure"
  11050. #include "confdefs.h"
  11051. /* System header to define __stub macros and hopefully few prototypes,
  11052. which can conflict with char cairo_xlib_surface_get_xrender_format(); below. */
  11053. #include <assert.h>
  11054. /* Override any gcc2 internal prototype to avoid an error. */
  11055. /* We use char because int might match the return type of a gcc2
  11056. builtin and then its argument prototype would still apply. */
  11057. char cairo_xlib_surface_get_xrender_format();
  11058. int main() {
  11059. /* The GNU C library defines this for functions which it implements
  11060. to always fail with ENOSYS. Some functions are actually named
  11061. something starting with __ and the normal name is an alias. */
  11062. #if defined (__stub_cairo_xlib_surface_get_xrender_format) || defined (__stub___cairo_xlib_surface_get_xrender_format)
  11063. choke me
  11064. #else
  11065. cairo_xlib_surface_get_xrender_format();
  11066. #endif
  11067. ; return 0; }
  11068. EOF
  11069. if { (eval echo configure:13791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11070. rm -rf conftest*
  11071. eval "ac_cv_func_cairo_xlib_surface_get_xrender_format=yes"
  11072. else
  11073. echo "configure: failed program was:" >&5
  11074. cat conftest.$ac_ext >&5
  11075. rm -rf conftest*
  11076. eval "ac_cv_func_cairo_xlib_surface_get_xrender_format=no"
  11077. fi
  11078. rm -f conftest*
  11079. if eval "test \"`echo '$ac_cv_func_'cairo_xlib_surface_get_xrender_format`\" = yes"; then
  11080. echo "$ac_t""yes" 1>&6
  11081. CAIRO_HAS_XRENDER_SURFACE=1
  11082. else
  11083. echo "$ac_t""no" 1>&6
  11084. CAIRO_HAS_XRENDER_SURFACE=
  11085. fi
  11086. LIBS=${ac_save_libs}
  11087. LDFLAGS=${ac_save_ldflags}
  11088. CAIROLIB="$CAIROLIB $CAIROLDFLAGS"
  11089. fi # $USE_CAIRO
  11090. # Done checking Cairo
  11091. # Enable FreeType option
  11092. echo $ac_n "checking whether to use FreeType""... $ac_c" 1>&6
  11093. echo "configure:13833: checking whether to use FreeType" >&5
  11094. echo "$ac_t"""$with_freetype"" 1>&6
  11095. case "$with_freetype" in
  11096. "no") USE_FREETYPE= ;;
  11097. "yes") USE_FREETYPE="1" ;;
  11098. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  11099. esac
  11100. FTINC=
  11101. FTLIB=
  11102. if test -n "$USE_FREETYPE"; then
  11103. # With FreeType includes directory
  11104. echo $ac_n "checking for location of FreeType includes""... $ac_c" 1>&6
  11105. echo "configure:13852: checking for location of FreeType includes" >&5
  11106. case "$with_freetype_includes" in
  11107. y | ye | yes | n | no)
  11108. { echo "configure: error: *** You must supply a directory to --with-freetype-includes." 1>&2; exit 1; }
  11109. ;;
  11110. esac
  11111. echo "$ac_t""$with_freetype_includes" 1>&6
  11112. if test -n "$with_freetype_includes" ; then
  11113. for dir in $with_freetype_includes; do
  11114. if test -d "$dir"; then
  11115. FTINC="$FTINC -I$dir"
  11116. else
  11117. { echo "configure: error: *** FreeType includes directory $dir does not exist." 1>&2; exit 1; }
  11118. fi
  11119. done
  11120. fi
  11121. ac_save_cppflags="$CPPFLAGS"
  11122. CPPFLAGS="$FTINC $CPPFLAGS"
  11123. for ac_hdr in ft2build.h
  11124. do
  11125. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  11126. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  11127. echo "configure:13878: checking for $ac_hdr" >&5
  11128. cat > conftest.$ac_ext <<EOF
  11129. #line 13881 "configure"
  11130. #include "confdefs.h"
  11131. #include <$ac_hdr>
  11132. EOF
  11133. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  11134. { (eval echo configure:13886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  11135. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  11136. if test -z "$ac_err"; then
  11137. rm -rf conftest*
  11138. eval "ac_cv_header_$ac_safe=yes"
  11139. else
  11140. echo "$ac_err" >&5
  11141. echo "configure: failed program was:" >&5
  11142. cat conftest.$ac_ext >&5
  11143. rm -rf conftest*
  11144. eval "ac_cv_header_$ac_safe=no"
  11145. fi
  11146. rm -f conftest*
  11147. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  11148. echo "$ac_t""yes" 1>&6
  11149. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  11150. cat >> confdefs.h <<EOF
  11151. #define $ac_tr_hdr 1
  11152. EOF
  11153. else
  11154. echo "$ac_t""no" 1>&6
  11155. { echo "configure: error: *** Unable to locate FreeType includes." 1>&2; exit 1; }
  11156. fi
  11157. done
  11158. CPPFLAGS=$ac_save_cppflags
  11159. # With FreeType library directory
  11160. echo $ac_n "checking for location of FreeType library""... $ac_c" 1>&6
  11161. echo "configure:13920: checking for location of FreeType library" >&5
  11162. case "$with_freetype_libs" in
  11163. y | ye | yes | n | no)
  11164. { echo "configure: error: *** You must supply a directory to --with-freetype-libs." 1>&2; exit 1; }
  11165. ;;
  11166. esac
  11167. echo "$ac_t""$with_freetype_libs" 1>&6
  11168. if test -n "$with_freetype_libs"; then
  11169. for dir in $with_freetype_libs; do
  11170. if test -d "$dir"; then
  11171. FTLIB="$FTLIB -L$dir"
  11172. else
  11173. { echo "configure: error: *** FreeType library directory $dir does not exist." 1>&2; exit 1; }
  11174. fi
  11175. done
  11176. fi
  11177. ac_save_ldflags="$LDFLAGS"
  11178. LDFLAGS="$FTLIB $LDFLAGS"
  11179. echo $ac_n "checking for FT_Init_FreeType in -lfreetype""... $ac_c" 1>&6
  11180. echo "configure:13945: checking for FT_Init_FreeType in -lfreetype" >&5
  11181. ac_lib_var=`echo freetype'_'FT_Init_FreeType | sed 'y%./+-%__p_%'`
  11182. ac_save_LIBS="$LIBS"
  11183. LIBS="-lfreetype $LIBS"
  11184. cat > conftest.$ac_ext <<EOF
  11185. #line 13951 "configure"
  11186. #include "confdefs.h"
  11187. /* Override any gcc2 internal prototype to avoid an error. */
  11188. /* We use char because int might match the return type of a gcc2
  11189. builtin and then its argument prototype would still apply. */
  11190. char FT_Init_FreeType();
  11191. int main() {
  11192. FT_Init_FreeType()
  11193. ; return 0; }
  11194. EOF
  11195. if { (eval echo configure:13962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11196. rm -rf conftest*
  11197. eval "ac_cv_lib_$ac_lib_var=yes"
  11198. else
  11199. echo "configure: failed program was:" >&5
  11200. cat conftest.$ac_ext >&5
  11201. rm -rf conftest*
  11202. eval "ac_cv_lib_$ac_lib_var=no"
  11203. fi
  11204. rm -f conftest*
  11205. LIBS="$ac_save_LIBS"
  11206. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  11207. echo "$ac_t""yes" 1>&6
  11208. FTLIB="$FTLIB -lfreetype "
  11209. else
  11210. echo "$ac_t""no" 1>&6
  11211. LDFLAGS=${ac_save_ldflags}
  11212. { echo "configure: error: *** Unable to locate FreeType library." 1>&2; exit 1; }
  11213. fi
  11214. LDFLAGS=${ac_save_ldflags}
  11215. fi # $USE_FREETYPE
  11216. # Done checking FreeType
  11217. # Enable NLS option
  11218. echo $ac_n "checking whether to use NLS""... $ac_c" 1>&6
  11219. echo "configure:14003: checking whether to use NLS" >&5
  11220. echo "$ac_t"""$with_nls"" 1>&6
  11221. case "$with_nls" in
  11222. "no") USE_NLS= ;;
  11223. "yes") USE_NLS="1" ;;
  11224. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  11225. esac
  11226. INTLLIB=
  11227. HAVE_NLS=
  11228. if test -n "${USE_NLS}" ; then
  11229. cat >> confdefs.h <<\EOF
  11230. #define USE_NLS 1
  11231. EOF
  11232. echo $ac_n "checking for gettext""... $ac_c" 1>&6
  11233. echo "configure:14023: checking for gettext" >&5
  11234. cat > conftest.$ac_ext <<EOF
  11235. #line 14026 "configure"
  11236. #include "confdefs.h"
  11237. /* System header to define __stub macros and hopefully few prototypes,
  11238. which can conflict with char gettext(); below. */
  11239. #include <assert.h>
  11240. /* Override any gcc2 internal prototype to avoid an error. */
  11241. /* We use char because int might match the return type of a gcc2
  11242. builtin and then its argument prototype would still apply. */
  11243. char gettext();
  11244. int main() {
  11245. /* The GNU C library defines this for functions which it implements
  11246. to always fail with ENOSYS. Some functions are actually named
  11247. something starting with __ and the normal name is an alias. */
  11248. #if defined (__stub_gettext) || defined (__stub___gettext)
  11249. choke me
  11250. #else
  11251. gettext();
  11252. #endif
  11253. ; return 0; }
  11254. EOF
  11255. if { (eval echo configure:14049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11256. rm -rf conftest*
  11257. eval "ac_cv_func_gettext=yes"
  11258. else
  11259. echo "configure: failed program was:" >&5
  11260. cat conftest.$ac_ext >&5
  11261. rm -rf conftest*
  11262. eval "ac_cv_func_gettext=no"
  11263. fi
  11264. rm -f conftest*
  11265. if eval "test \"`echo '$ac_cv_func_'gettext`\" = yes"; then
  11266. echo "$ac_t""yes" 1>&6
  11267. INTLLIB=
  11268. else
  11269. echo "$ac_t""no" 1>&6
  11270. echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
  11271. echo "configure:14067: checking for gettext in -lintl" >&5
  11272. ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
  11273. ac_save_LIBS="$LIBS"
  11274. LIBS="-lintl $LIBS"
  11275. cat > conftest.$ac_ext <<EOF
  11276. #line 14073 "configure"
  11277. #include "confdefs.h"
  11278. /* Override any gcc2 internal prototype to avoid an error. */
  11279. /* We use char because int might match the return type of a gcc2
  11280. builtin and then its argument prototype would still apply. */
  11281. char gettext();
  11282. int main() {
  11283. gettext()
  11284. ; return 0; }
  11285. EOF
  11286. if { (eval echo configure:14084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11287. rm -rf conftest*
  11288. eval "ac_cv_lib_$ac_lib_var=yes"
  11289. else
  11290. echo "configure: failed program was:" >&5
  11291. cat conftest.$ac_ext >&5
  11292. rm -rf conftest*
  11293. eval "ac_cv_lib_$ac_lib_var=no"
  11294. fi
  11295. rm -f conftest*
  11296. LIBS="$ac_save_LIBS"
  11297. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  11298. echo "$ac_t""yes" 1>&6
  11299. INTLLIB=-lintl
  11300. else
  11301. echo "$ac_t""no" 1>&6
  11302. { echo "configure: error: *** Unable to locate gettext() function." 1>&2; exit 1; }
  11303. fi
  11304. fi
  11305. HAVE_NLS=1
  11306. fi
  11307. # Enable C++ option
  11308. echo $ac_n "checking whether to use C++""... $ac_c" 1>&6
  11309. echo "configure:14119: checking whether to use C++" >&5
  11310. echo "$ac_t"""$with_cxx"" 1>&6
  11311. case "$with_cxx" in
  11312. "no") USE_CXX= ;;
  11313. "yes") USE_CXX="1" ;;
  11314. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  11315. esac
  11316. if test -n "$USE_CXX"; then
  11317. for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
  11318. do
  11319. # Extract the first word of "$ac_prog", so it can be a program name with args.
  11320. set dummy $ac_prog; ac_word=$2
  11321. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  11322. echo "configure:14135: checking for $ac_word" >&5
  11323. if test -n "$CXX"; then
  11324. ac_cv_prog_CXX="$CXX" # Let the user override the test.
  11325. else
  11326. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  11327. ac_dummy="$PATH"
  11328. for ac_dir in $ac_dummy; do
  11329. test -z "$ac_dir" && ac_dir=.
  11330. if test -f $ac_dir/$ac_word; then
  11331. ac_cv_prog_CXX="$ac_prog"
  11332. break
  11333. fi
  11334. done
  11335. IFS="$ac_save_ifs"
  11336. fi
  11337. CXX="$ac_cv_prog_CXX"
  11338. if test -n "$CXX"; then
  11339. echo "$ac_t""$CXX" 1>&6
  11340. else
  11341. echo "$ac_t""no" 1>&6
  11342. fi
  11343. test -n "$CXX" && break
  11344. done
  11345. test -n "$CXX" || CXX="gcc"
  11346. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  11347. echo "configure:14164: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
  11348. ac_ext=C
  11349. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  11350. ac_cpp='$CXXCPP $CPPFLAGS'
  11351. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  11352. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  11353. cross_compiling=$ac_cv_prog_cxx_cross
  11354. cat > conftest.$ac_ext << EOF
  11355. #line 14175 "configure"
  11356. #include "confdefs.h"
  11357. int main(){return(0);}
  11358. EOF
  11359. if { (eval echo configure:14180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11360. ac_cv_prog_cxx_works=yes
  11361. # If we can't run a trivial program, we are probably using a cross compiler.
  11362. if (./conftest; exit) 2>/dev/null; then
  11363. ac_cv_prog_cxx_cross=no
  11364. else
  11365. ac_cv_prog_cxx_cross=yes
  11366. fi
  11367. else
  11368. echo "configure: failed program was:" >&5
  11369. cat conftest.$ac_ext >&5
  11370. ac_cv_prog_cxx_works=no
  11371. fi
  11372. rm -fr conftest*
  11373. ac_ext=c
  11374. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  11375. ac_cpp='$CPP $CPPFLAGS'
  11376. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  11377. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  11378. cross_compiling=$ac_cv_prog_cc_cross
  11379. echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
  11380. if test $ac_cv_prog_cxx_works = no; then
  11381. { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
  11382. fi
  11383. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  11384. echo "configure:14206: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
  11385. echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
  11386. cross_compiling=$ac_cv_prog_cxx_cross
  11387. echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
  11388. echo "configure:14211: checking whether we are using GNU C++" >&5
  11389. cat > conftest.C <<EOF
  11390. #ifdef __GNUC__
  11391. yes;
  11392. #endif
  11393. EOF
  11394. if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:14218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  11395. ac_cv_prog_gxx=yes
  11396. else
  11397. ac_cv_prog_gxx=no
  11398. fi
  11399. echo "$ac_t""$ac_cv_prog_gxx" 1>&6
  11400. if test $ac_cv_prog_gxx = yes; then
  11401. GXX=yes
  11402. else
  11403. GXX=
  11404. fi
  11405. ac_test_CXXFLAGS="${CXXFLAGS+set}"
  11406. ac_save_CXXFLAGS="$CXXFLAGS"
  11407. CXXFLAGS=
  11408. echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
  11409. echo "configure:14236: checking whether ${CXX-g++} accepts -g" >&5
  11410. echo 'void f(){}' > conftest.cc
  11411. if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  11412. ac_cv_prog_cxx_g=yes
  11413. else
  11414. ac_cv_prog_cxx_g=no
  11415. fi
  11416. rm -f conftest*
  11417. echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
  11418. if test "$ac_test_CXXFLAGS" = set; then
  11419. CXXFLAGS="$ac_save_CXXFLAGS"
  11420. elif test $ac_cv_prog_cxx_g = yes; then
  11421. if test "$GXX" = yes; then
  11422. CXXFLAGS="-g -O2"
  11423. else
  11424. CXXFLAGS="-g"
  11425. fi
  11426. else
  11427. if test "$GXX" = yes; then
  11428. CXXFLAGS="-O2"
  11429. else
  11430. CXXFLAGS=
  11431. fi
  11432. fi
  11433. else
  11434. CXX=
  11435. CXXFLAGS=
  11436. fi
  11437. # Done checking C++
  11438. # Enable openDWG option
  11439. echo $ac_n "checking whether to use openDWG""... $ac_c" 1>&6
  11440. echo "configure:14277: checking whether to use openDWG" >&5
  11441. echo "$ac_t"""$with_opendwg"" 1>&6
  11442. case "$with_opendwg" in
  11443. "no") USE_OPENDWG= ;;
  11444. "yes") USE_OPENDWG="1" ;;
  11445. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  11446. esac
  11447. OPENDWGINCPATH=
  11448. OPENDWGLIBPATH=
  11449. OPENDWGLIB=
  11450. if test -n "${USE_OPENDWG}"; then
  11451. # With OPENDWG includes directory
  11452. echo $ac_n "checking for location of openDGW includes""... $ac_c" 1>&6
  11453. echo "configure:14297: checking for location of openDGW includes" >&5
  11454. case "$with_opendwg_includes" in
  11455. y | ye | yes | n | no)
  11456. { echo "configure: error: *** You must supply a directory to --with-opendwg-includes." 1>&2; exit 1; }
  11457. ;;
  11458. esac
  11459. echo "$ac_t""$with_opendwg_includes" 1>&6
  11460. if test -n "$with_opendwg_includes" ; then
  11461. for dir in $with_opendwg_includes; do
  11462. if test -d "$dir"; then
  11463. OPENDWGINCPATH="$OPENDWGINCPATH -I$dir"
  11464. else
  11465. { echo "configure: error: *** openDGW includes directory $dir does not exist." 1>&2; exit 1; }
  11466. fi
  11467. done
  11468. fi
  11469. ac_save_cppflags="$CPPFLAGS"
  11470. CPPFLAGS="$OPENDWGINCPATH $CPPFLAGS"
  11471. for ac_hdr in ad2.h
  11472. do
  11473. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  11474. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  11475. echo "configure:14323: checking for $ac_hdr" >&5
  11476. cat > conftest.$ac_ext <<EOF
  11477. #line 14326 "configure"
  11478. #include "confdefs.h"
  11479. #include <$ac_hdr>
  11480. EOF
  11481. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  11482. { (eval echo configure:14331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  11483. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  11484. if test -z "$ac_err"; then
  11485. rm -rf conftest*
  11486. eval "ac_cv_header_$ac_safe=yes"
  11487. else
  11488. echo "$ac_err" >&5
  11489. echo "configure: failed program was:" >&5
  11490. cat conftest.$ac_ext >&5
  11491. rm -rf conftest*
  11492. eval "ac_cv_header_$ac_safe=no"
  11493. fi
  11494. rm -f conftest*
  11495. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  11496. echo "$ac_t""yes" 1>&6
  11497. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  11498. cat >> confdefs.h <<EOF
  11499. #define $ac_tr_hdr 1
  11500. EOF
  11501. else
  11502. echo "$ac_t""no" 1>&6
  11503. { echo "configure: error: *** Unable to locate openDWG includes." 1>&2; exit 1; }
  11504. fi
  11505. done
  11506. CPPFLAGS=$ac_save_cppflags
  11507. # With OPENDWG library directory
  11508. echo $ac_n "checking for location of openDWG library""... $ac_c" 1>&6
  11509. echo "configure:14365: checking for location of openDWG library" >&5
  11510. case "$with_opendwg_libs" in
  11511. y | ye | yes | n | no)
  11512. { echo "configure: error: *** You must supply a directory to --with-opendwg-libs." 1>&2; exit 1; }
  11513. ;;
  11514. esac
  11515. echo "$ac_t""$with_opendwg_libs" 1>&6
  11516. if test -n "$with_opendwg_libs"; then
  11517. for dir in $with_opendwg_libs; do
  11518. if test -d "$dir"; then
  11519. OPENDWGLIBPATH="$OPENDWGLIBPATH -L$dir"
  11520. else
  11521. { echo "configure: error: *** openDWG library directory $dir does not exist." 1>&2; exit 1; }
  11522. fi
  11523. done
  11524. fi
  11525. #search for ad2.a, ad3.a ... in openDWG toolkit directory:
  11526. #FIX ME how to program this test??
  11527. #LOC_CHECK_LIBS(ad?.a,adSeekLayer,openDWG,$OPENDWGLIBPATH,OPENDWGLIB,,)
  11528. #
  11529. #for now hack (but working):
  11530. TRUEOPENDWGLIBPATH=`echo $OPENDWGLIBPATH | cut -b3-`
  11531. adlib=`ls -1 $TRUEOPENDWGLIBPATH/ad?.a | tail -1`
  11532. OPENDWGLIB=$adlib
  11533. fi # $USE_OPENDWG
  11534. # Done checking OPENDWG
  11535. # Enable pthread option
  11536. echo $ac_n "checking whether to use POSIX threads""... $ac_c" 1>&6
  11537. echo "configure:14406: checking whether to use POSIX threads" >&5
  11538. echo "$ac_t"""$with_pthread"" 1>&6
  11539. case "$with_pthread" in
  11540. "no") USE_PTHREAD= ;;
  11541. "yes") USE_PTHREAD="1" ;;
  11542. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  11543. esac
  11544. PTHREADINCPATH=
  11545. PTHREADLIBPATH=
  11546. PTHREADLIB=
  11547. if test -n "$USE_PTHREAD"; then
  11548. # With pthread includes directory
  11549. echo $ac_n "checking for location of POSIX threads includes""... $ac_c" 1>&6
  11550. echo "configure:14426: checking for location of POSIX threads includes" >&5
  11551. case "$with_pthread_includes" in
  11552. y | ye | yes | n | no)
  11553. { echo "configure: error: *** You must supply a directory to --with-pthread-includes." 1>&2; exit 1; }
  11554. ;;
  11555. esac
  11556. echo "$ac_t""$with_pthread_includes" 1>&6
  11557. if test -n "$with_pthread_includes" ; then
  11558. for dir in $with_pthread_includes; do
  11559. if test -d "$dir"; then
  11560. PTHREADINCPATH="$PTHREADINCPATH -I$dir"
  11561. else
  11562. { echo "configure: error: *** POSIX threads includes directory $dir does not exist." 1>&2; exit 1; }
  11563. fi
  11564. done
  11565. fi
  11566. ac_save_cppflags="$CPPFLAGS"
  11567. CPPFLAGS="$PTHREADINCPATH $CPPFLAGS"
  11568. for ac_hdr in pthread.h
  11569. do
  11570. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  11571. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  11572. echo "configure:14452: checking for $ac_hdr" >&5
  11573. cat > conftest.$ac_ext <<EOF
  11574. #line 14455 "configure"
  11575. #include "confdefs.h"
  11576. #include <$ac_hdr>
  11577. EOF
  11578. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  11579. { (eval echo configure:14460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  11580. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  11581. if test -z "$ac_err"; then
  11582. rm -rf conftest*
  11583. eval "ac_cv_header_$ac_safe=yes"
  11584. else
  11585. echo "$ac_err" >&5
  11586. echo "configure: failed program was:" >&5
  11587. cat conftest.$ac_ext >&5
  11588. rm -rf conftest*
  11589. eval "ac_cv_header_$ac_safe=no"
  11590. fi
  11591. rm -f conftest*
  11592. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  11593. echo "$ac_t""yes" 1>&6
  11594. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  11595. cat >> confdefs.h <<EOF
  11596. #define $ac_tr_hdr 1
  11597. EOF
  11598. else
  11599. echo "$ac_t""no" 1>&6
  11600. { echo "configure: error: *** Unable to locate POSIX threads includes." 1>&2; exit 1; }
  11601. fi
  11602. done
  11603. CPPFLAGS=$ac_save_cppflags
  11604. # With pthread library directory
  11605. echo $ac_n "checking for location of POSIX threads library""... $ac_c" 1>&6
  11606. echo "configure:14494: checking for location of POSIX threads library" >&5
  11607. case "$with_pthread_libs" in
  11608. y | ye | yes | n | no)
  11609. { echo "configure: error: *** You must supply a directory to --with-pthread-libs." 1>&2; exit 1; }
  11610. ;;
  11611. esac
  11612. echo "$ac_t""$with_pthread_libs" 1>&6
  11613. if test -n "$with_pthread_libs"; then
  11614. for dir in $with_pthread_libs; do
  11615. if test -d "$dir"; then
  11616. PTHREADLIBPATH="$PTHREADLIBPATH -L$dir"
  11617. else
  11618. { echo "configure: error: *** POSIX threads library directory $dir does not exist." 1>&2; exit 1; }
  11619. fi
  11620. done
  11621. fi
  11622. ac_save_libs="$LIBS"
  11623. ac_save_ldflags="$LDFLAGS"
  11624. LIBS=" $LIBS"
  11625. LDFLAGS=" $LDFLAGS"
  11626. echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
  11627. echo "configure:14519: checking for pthread_create" >&5
  11628. cat > conftest.$ac_ext <<EOF
  11629. #line 14522 "configure"
  11630. #include "confdefs.h"
  11631. /* System header to define __stub macros and hopefully few prototypes,
  11632. which can conflict with char pthread_create(); below. */
  11633. #include <assert.h>
  11634. /* Override any gcc2 internal prototype to avoid an error. */
  11635. /* We use char because int might match the return type of a gcc2
  11636. builtin and then its argument prototype would still apply. */
  11637. char pthread_create();
  11638. int main() {
  11639. /* The GNU C library defines this for functions which it implements
  11640. to always fail with ENOSYS. Some functions are actually named
  11641. something starting with __ and the normal name is an alias. */
  11642. #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
  11643. choke me
  11644. #else
  11645. pthread_create();
  11646. #endif
  11647. ; return 0; }
  11648. EOF
  11649. if { (eval echo configure:14545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11650. rm -rf conftest*
  11651. eval "ac_cv_func_pthread_create=yes"
  11652. else
  11653. echo "configure: failed program was:" >&5
  11654. cat conftest.$ac_ext >&5
  11655. rm -rf conftest*
  11656. eval "ac_cv_func_pthread_create=no"
  11657. fi
  11658. rm -f conftest*
  11659. if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
  11660. echo "$ac_t""yes" 1>&6
  11661. PTHREADLIB="$PTHREADLIB "
  11662. else
  11663. echo "$ac_t""no" 1>&6
  11664. ac_save_ldflags="$LDFLAGS"
  11665. LDFLAGS="$PTHREADLIBPATH $LDFLAGS"
  11666. echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
  11667. echo "configure:14572: checking for pthread_create in -lpthread" >&5
  11668. ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
  11669. ac_save_LIBS="$LIBS"
  11670. LIBS="-lpthread $LIBS"
  11671. cat > conftest.$ac_ext <<EOF
  11672. #line 14578 "configure"
  11673. #include "confdefs.h"
  11674. /* Override any gcc2 internal prototype to avoid an error. */
  11675. /* We use char because int might match the return type of a gcc2
  11676. builtin and then its argument prototype would still apply. */
  11677. char pthread_create();
  11678. int main() {
  11679. pthread_create()
  11680. ; return 0; }
  11681. EOF
  11682. if { (eval echo configure:14589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11683. rm -rf conftest*
  11684. eval "ac_cv_lib_$ac_lib_var=yes"
  11685. else
  11686. echo "configure: failed program was:" >&5
  11687. cat conftest.$ac_ext >&5
  11688. rm -rf conftest*
  11689. eval "ac_cv_lib_$ac_lib_var=no"
  11690. fi
  11691. rm -f conftest*
  11692. LIBS="$ac_save_LIBS"
  11693. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  11694. echo "$ac_t""yes" 1>&6
  11695. PTHREADLIB="$PTHREADLIB -lpthread "
  11696. else
  11697. echo "$ac_t""no" 1>&6
  11698. LDFLAGS=${ac_save_ldflags}
  11699. { echo "configure: error: *** Unable to locate POSIX threads library." 1>&2; exit 1; }
  11700. fi
  11701. LDFLAGS=${ac_save_ldflags}
  11702. fi
  11703. LIBS=${ac_save_libs}
  11704. LDFLAGS=${ac_save_ldflags}
  11705. fi # $USE_PTHREAD
  11706. # Done checking pthread
  11707. # Enable LFS (from cdr-tools)
  11708. # Check whether --enable-largefile or --disable-largefile was given.
  11709. if test "${enable_largefile+set}" = set; then
  11710. enableval="$enable_largefile"
  11711. :
  11712. fi
  11713. if test "$enable_largefile" = yes; then
  11714. echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6
  11715. echo "configure:14645: checking for special C compiler options needed for large files" >&5
  11716. ac_cv_sys_largefile_CC=no
  11717. largefile_cc_opt=""
  11718. if test "$GCC" != yes; then
  11719. # IRIX 6.2 and later do not support large files by default,
  11720. # so use the C compiler's -n32 option if that helps.
  11721. cat > conftest.$ac_ext <<EOF
  11722. #line 14653 "configure"
  11723. #include "confdefs.h"
  11724. #include <sys/types.h>
  11725. /* Check that off_t can represent 2**63 - 1 correctly.
  11726. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11727. since some C++ compilers masquerading as C compilers
  11728. incorrectly reject 9223372036854775807. */
  11729. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11730. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11731. && LARGE_OFF_T % 2147483647 == 1)
  11732. ? 1 : -1];
  11733. int main() {
  11734. ; return 0; }
  11735. EOF
  11736. if { (eval echo configure:14669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11737. :
  11738. else
  11739. echo "configure: failed program was:" >&5
  11740. cat conftest.$ac_ext >&5
  11741. rm -rf conftest*
  11742. ac_save_CC="${CC-cc}"
  11743. CC="$CC -n32"
  11744. cat > conftest.$ac_ext <<EOF
  11745. #line 14678 "configure"
  11746. #include "confdefs.h"
  11747. #include <sys/types.h>
  11748. /* Check that off_t can represent 2**63 - 1 correctly.
  11749. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11750. since some C++ compilers masquerading as C compilers
  11751. incorrectly reject 9223372036854775807. */
  11752. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11753. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11754. && LARGE_OFF_T % 2147483647 == 1)
  11755. ? 1 : -1];
  11756. int main() {
  11757. ; return 0; }
  11758. EOF
  11759. if { (eval echo configure:14694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11760. rm -rf conftest*
  11761. ac_cv_sys_largefile_CC=' -n32'
  11762. else
  11763. echo "configure: failed program was:" >&5
  11764. cat conftest.$ac_ext >&5
  11765. fi
  11766. rm -f conftest*
  11767. CC="$ac_save_CC"
  11768. fi
  11769. rm -f conftest*
  11770. fi
  11771. echo "$ac_t""$ac_cv_sys_largefile_CC" 1>&6
  11772. if test "$ac_cv_sys_largefile_CC" != no; then
  11773. CC="$CC$ac_cv_sys_largefile_CC"
  11774. largefile_cc_opt="$ac_cv_sys_largefile_CC"
  11775. fi
  11776. echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6
  11777. echo "configure:14714: checking for _FILE_OFFSET_BITS value needed for large files" >&5
  11778. ac_cv_sys_file_offset_bits=no
  11779. cat > conftest.$ac_ext <<EOF
  11780. #line 14718 "configure"
  11781. #include "confdefs.h"
  11782. #include <sys/types.h>
  11783. /* Check that off_t can represent 2**63 - 1 correctly.
  11784. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11785. since some C++ compilers masquerading as C compilers
  11786. incorrectly reject 9223372036854775807. */
  11787. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11788. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11789. && LARGE_OFF_T % 2147483647 == 1)
  11790. ? 1 : -1];
  11791. int main() {
  11792. ; return 0; }
  11793. EOF
  11794. if { (eval echo configure:14734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11795. :
  11796. else
  11797. echo "configure: failed program was:" >&5
  11798. cat conftest.$ac_ext >&5
  11799. rm -rf conftest*
  11800. cat > conftest.$ac_ext <<EOF
  11801. #line 14741 "configure"
  11802. #include "confdefs.h"
  11803. #define _FILE_OFFSET_BITS 64
  11804. #include <sys/types.h>
  11805. /* Check that off_t can represent 2**63 - 1 correctly.
  11806. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11807. since some C++ compilers masquerading as C compilers
  11808. incorrectly reject 9223372036854775807. */
  11809. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11810. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11811. && LARGE_OFF_T % 2147483647 == 1)
  11812. ? 1 : -1];
  11813. int main() {
  11814. ; return 0; }
  11815. EOF
  11816. if { (eval echo configure:14759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11817. rm -rf conftest*
  11818. ac_cv_sys_file_offset_bits=64
  11819. else
  11820. echo "configure: failed program was:" >&5
  11821. cat conftest.$ac_ext >&5
  11822. fi
  11823. rm -f conftest*
  11824. fi
  11825. rm -f conftest*
  11826. echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
  11827. if test "$ac_cv_sys_file_offset_bits" != no; then
  11828. cat >> confdefs.h <<EOF
  11829. #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
  11830. EOF
  11831. fi
  11832. echo $ac_n "checking for _LARGE_FILES value needed for large files""... $ac_c" 1>&6
  11833. echo "configure:14778: checking for _LARGE_FILES value needed for large files" >&5
  11834. ac_cv_sys_large_files=no
  11835. cat > conftest.$ac_ext <<EOF
  11836. #line 14782 "configure"
  11837. #include "confdefs.h"
  11838. #include <sys/types.h>
  11839. /* Check that off_t can represent 2**63 - 1 correctly.
  11840. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11841. since some C++ compilers masquerading as C compilers
  11842. incorrectly reject 9223372036854775807. */
  11843. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11844. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11845. && LARGE_OFF_T % 2147483647 == 1)
  11846. ? 1 : -1];
  11847. int main() {
  11848. ; return 0; }
  11849. EOF
  11850. if { (eval echo configure:14798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11851. :
  11852. else
  11853. echo "configure: failed program was:" >&5
  11854. cat conftest.$ac_ext >&5
  11855. rm -rf conftest*
  11856. cat > conftest.$ac_ext <<EOF
  11857. #line 14805 "configure"
  11858. #include "confdefs.h"
  11859. #define _LARGE_FILES 1
  11860. #include <sys/types.h>
  11861. /* Check that off_t can represent 2**63 - 1 correctly.
  11862. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11863. since some C++ compilers masquerading as C compilers
  11864. incorrectly reject 9223372036854775807. */
  11865. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11866. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11867. && LARGE_OFF_T % 2147483647 == 1)
  11868. ? 1 : -1];
  11869. int main() {
  11870. ; return 0; }
  11871. EOF
  11872. if { (eval echo configure:14823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11873. rm -rf conftest*
  11874. ac_cv_sys_large_files=1
  11875. else
  11876. echo "configure: failed program was:" >&5
  11877. cat conftest.$ac_ext >&5
  11878. fi
  11879. rm -f conftest*
  11880. fi
  11881. rm -f conftest*
  11882. echo "$ac_t""$ac_cv_sys_large_files" 1>&6
  11883. if test "$ac_cv_sys_large_files" != no; then
  11884. cat >> confdefs.h <<EOF
  11885. #define _LARGE_FILES $ac_cv_sys_large_files
  11886. EOF
  11887. fi
  11888. echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
  11889. echo "configure:14842: checking for _LARGEFILE_SOURCE value needed for large files" >&5
  11890. ac_cv_sys_largefile_source=no
  11891. cat > conftest.$ac_ext <<EOF
  11892. #line 14846 "configure"
  11893. #include "confdefs.h"
  11894. #include <stdio.h>
  11895. int main() {
  11896. return !fseeko;
  11897. ; return 0; }
  11898. EOF
  11899. if { (eval echo configure:14853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11900. :
  11901. else
  11902. echo "configure: failed program was:" >&5
  11903. cat conftest.$ac_ext >&5
  11904. rm -rf conftest*
  11905. cat > conftest.$ac_ext <<EOF
  11906. #line 14860 "configure"
  11907. #include "confdefs.h"
  11908. #define _LARGEFILE_SOURCE 1
  11909. #include <stdio.h>
  11910. int main() {
  11911. return !fseeko;
  11912. ; return 0; }
  11913. EOF
  11914. if { (eval echo configure:14869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11915. rm -rf conftest*
  11916. ac_cv_sys_largefile_source=1
  11917. else
  11918. echo "configure: failed program was:" >&5
  11919. cat conftest.$ac_ext >&5
  11920. fi
  11921. rm -f conftest*
  11922. fi
  11923. rm -f conftest*
  11924. echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
  11925. if test "$ac_cv_sys_largefile_source" != no; then
  11926. cat >> confdefs.h <<EOF
  11927. #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
  11928. EOF
  11929. fi
  11930. fi
  11931. echo $ac_n "checking if system supports Large Files at all""... $ac_c" 1>&6
  11932. echo "configure:14890: checking if system supports Large Files at all" >&5
  11933. cat > conftest.$ac_ext <<EOF
  11934. #line 14893 "configure"
  11935. #include "confdefs.h"
  11936. #include <stdio.h>
  11937. #include <sys/types.h>
  11938. int main() {
  11939. /*
  11940. * Check that off_t can represent 2**63 - 1 correctly.
  11941. * We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11942. * since some C++ compilers masquerading as C compilers
  11943. * incorrectly reject 9223372036854775807.
  11944. *
  11945. * For MinGW, off64_t should be used and __MSVCRT_VERSION__ >= 0x0601
  11946. * (msvcrt.dll version 6.10 or higher) is needed for _fstat64 and _stat64.
  11947. */
  11948. #ifdef __MINGW32__
  11949. # define LARGE_OFF_T (((off64_t) 1 << 62) - 1 + ((off64_t) 1 << 62))
  11950. #else
  11951. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11952. #endif
  11953. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11954. && LARGE_OFF_T % 2147483647 == 1)
  11955. ? 1 : -1];
  11956. #ifdef __MINGW32__
  11957. return !fseeko64;
  11958. return !ftello64;
  11959. #else
  11960. return !fseeko;
  11961. return !ftello;
  11962. #endif
  11963. ; return 0; }
  11964. EOF
  11965. if { (eval echo configure:14925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11966. rm -rf conftest*
  11967. ac_cv_largefiles=yes
  11968. else
  11969. echo "configure: failed program was:" >&5
  11970. cat conftest.$ac_ext >&5
  11971. rm -rf conftest*
  11972. ac_cv_largefiles=no
  11973. fi
  11974. rm -f conftest*
  11975. echo "$ac_t""$ac_cv_largefiles" 1>&6
  11976. if test $ac_cv_largefiles = yes; then
  11977. cat >> confdefs.h <<\EOF
  11978. #define HAVE_LARGEFILES 1
  11979. EOF
  11980. fi
  11981. USE_LARGEFILES=
  11982. if test $ac_cv_largefiles = yes; then
  11983. USE_LARGEFILES=1
  11984. fi
  11985. # Done large file support
  11986. # Python check
  11987. echo $ac_n "checking whether to use Python""... $ac_c" 1>&6
  11988. echo "configure:14954: checking whether to use Python" >&5
  11989. PYTHONINC=
  11990. PYTHONCFLAGS=
  11991. PYTHONLDFLAGS=
  11992. SWIG=
  11993. USE_PYTHON=
  11994. if test "$with_python" = "no" ; then
  11995. echo "$ac_t""no" 1>&6
  11996. else
  11997. echo "$ac_t""yes" 1>&6
  11998. USE_PYTHON="1"
  11999. if test "$with_python" != "yes" ; then
  12000. PY_CONFIG="$with_python"
  12001. fi
  12002. # Extract the first word of "python-config", so it can be a program name with args.
  12003. set dummy python-config; ac_word=$2
  12004. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  12005. echo "configure:14974: checking for $ac_word" >&5
  12006. case "$PY_CONFIG" in
  12007. /*)
  12008. ac_cv_path_PY_CONFIG="$PY_CONFIG" # Let the user override the test with a path.
  12009. ;;
  12010. ?:/*)
  12011. ac_cv_path_PY_CONFIG="$PY_CONFIG" # Let the user override the test with a dos path.
  12012. ;;
  12013. *)
  12014. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  12015. ac_dummy="$PATH"
  12016. for ac_dir in $ac_dummy; do
  12017. test -z "$ac_dir" && ac_dir=.
  12018. if test -f $ac_dir/$ac_word; then
  12019. ac_cv_path_PY_CONFIG="$ac_dir/$ac_word"
  12020. break
  12021. fi
  12022. done
  12023. IFS="$ac_save_ifs"
  12024. test -z "$ac_cv_path_PY_CONFIG" && ac_cv_path_PY_CONFIG="no"
  12025. ;;
  12026. esac
  12027. PY_CONFIG="$ac_cv_path_PY_CONFIG"
  12028. if test -n "$PY_CONFIG"; then
  12029. echo "$ac_t""$PY_CONFIG" 1>&6
  12030. else
  12031. echo "$ac_t""no" 1>&6
  12032. fi
  12033. if test "$PY_CONFIG" != "no" ; then
  12034. # With Python includes directory
  12035. PYTHONINC=`"$PY_CONFIG" --includes`
  12036. ac_save_cppflags="$CPPFLAGS"
  12037. CPPFLAGS="$PYTHONINC $CPPFLAGS"
  12038. for ac_hdr in Python.h
  12039. do
  12040. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  12041. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  12042. echo "configure:15016: checking for $ac_hdr" >&5
  12043. cat > conftest.$ac_ext <<EOF
  12044. #line 15019 "configure"
  12045. #include "confdefs.h"
  12046. #include <$ac_hdr>
  12047. EOF
  12048. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  12049. { (eval echo configure:15024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  12050. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  12051. if test -z "$ac_err"; then
  12052. rm -rf conftest*
  12053. eval "ac_cv_header_$ac_safe=yes"
  12054. else
  12055. echo "$ac_err" >&5
  12056. echo "configure: failed program was:" >&5
  12057. cat conftest.$ac_ext >&5
  12058. rm -rf conftest*
  12059. eval "ac_cv_header_$ac_safe=no"
  12060. fi
  12061. rm -f conftest*
  12062. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  12063. echo "$ac_t""yes" 1>&6
  12064. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  12065. cat >> confdefs.h <<EOF
  12066. #define $ac_tr_hdr 1
  12067. EOF
  12068. else
  12069. echo "$ac_t""no" 1>&6
  12070. { echo "configure: error: *** Unable to locate Python includes." 1>&2; exit 1; }
  12071. fi
  12072. done
  12073. CPPFLAGS=$ac_save_cppflags
  12074. PYTHONCFLAGS=`"$PY_CONFIG" --cflags`
  12075. # With Python library directory
  12076. PYTHONLDFLAGS=`"$PY_CONFIG" --ldflags`
  12077. fi
  12078. # look for the swig program
  12079. # Extract the first word of "swig", so it can be a program name with args.
  12080. set dummy swig; ac_word=$2
  12081. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  12082. echo "configure:15065: checking for $ac_word" >&5
  12083. case "$SWIG" in
  12084. /*)
  12085. ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
  12086. ;;
  12087. ?:/*)
  12088. ac_cv_path_SWIG="$SWIG" # Let the user override the test with a dos path.
  12089. ;;
  12090. *)
  12091. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  12092. ac_dummy="$PATH"
  12093. for ac_dir in $ac_dummy; do
  12094. test -z "$ac_dir" && ac_dir=.
  12095. if test -f $ac_dir/$ac_word; then
  12096. ac_cv_path_SWIG="$ac_dir/$ac_word"
  12097. break
  12098. fi
  12099. done
  12100. IFS="$ac_save_ifs"
  12101. test -z "$ac_cv_path_SWIG" && ac_cv_path_SWIG="no"
  12102. ;;
  12103. esac
  12104. SWIG="$ac_cv_path_SWIG"
  12105. if test -n "$SWIG"; then
  12106. echo "$ac_t""$SWIG" 1>&6
  12107. else
  12108. echo "$ac_t""no" 1>&6
  12109. fi
  12110. if test "$SWIG" = "no" ; then
  12111. { echo "configure: error: *** couldn't find swig" 1>&2; exit 1; }
  12112. fi
  12113. fi # Done checking Python
  12114. # Enable wxWidgets support (for wxGUI)
  12115. echo $ac_n "checking whether to use wxWidgets""... $ac_c" 1>&6
  12116. echo "configure:15111: checking whether to use wxWidgets" >&5
  12117. WXVERSION=
  12118. WXWIDGETSCXXFLAGS=
  12119. WXWIDGETSCPPFLAGS=
  12120. WXWIDGETSLIB=
  12121. USE_WXWIDGETS=
  12122. if test "$with_wxwidgets" = "no" ; then
  12123. echo "$ac_t""no" 1>&6
  12124. else
  12125. echo "$ac_t""yes" 1>&6
  12126. USE_WXWIDGETS="1"
  12127. if test "$with_wxwidgets" != "yes" ; then
  12128. WX_CONFIG="$with_wxwidgets"
  12129. fi
  12130. # Extract the first word of "wx-config", so it can be a program name with args.
  12131. set dummy wx-config; ac_word=$2
  12132. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  12133. echo "configure:15131: checking for $ac_word" >&5
  12134. case "$WX_CONFIG" in
  12135. /*)
  12136. ac_cv_path_WX_CONFIG="$WX_CONFIG" # Let the user override the test with a path.
  12137. ;;
  12138. ?:/*)
  12139. ac_cv_path_WX_CONFIG="$WX_CONFIG" # Let the user override the test with a dos path.
  12140. ;;
  12141. *)
  12142. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  12143. ac_dummy="$PATH"
  12144. for ac_dir in $ac_dummy; do
  12145. test -z "$ac_dir" && ac_dir=.
  12146. if test -f $ac_dir/$ac_word; then
  12147. ac_cv_path_WX_CONFIG="$ac_dir/$ac_word"
  12148. break
  12149. fi
  12150. done
  12151. IFS="$ac_save_ifs"
  12152. test -z "$ac_cv_path_WX_CONFIG" && ac_cv_path_WX_CONFIG="no"
  12153. ;;
  12154. esac
  12155. WX_CONFIG="$ac_cv_path_WX_CONFIG"
  12156. if test -n "$WX_CONFIG"; then
  12157. echo "$ac_t""$WX_CONFIG" 1>&6
  12158. else
  12159. echo "$ac_t""no" 1>&6
  12160. fi
  12161. if test "$WX_CONFIG" = "no" ; then
  12162. { echo "configure: error: *** couldn't find wx-config
  12163. wxWidgets must be installed on your system.
  12164. Please check that wx-config is in path, the directory
  12165. where wxWidgets libraries are installed (returned by
  12166. 'wx-config --libs' or 'wx-config --static --libs' command)
  12167. is in LD_LIBRARY_PATH or equivalent variable and
  12168. wxWidgets version is 2.8.1 or above." 1>&2; exit 1; }
  12169. fi
  12170. # Check wxWidgets version
  12171. REQWX="2.8.1"
  12172. echo $ac_n "checking wxWidgets version""... $ac_c" 1>&6
  12173. echo "configure:15179: checking wxWidgets version" >&5
  12174. if WXVERSION=`"$WX_CONFIG" --version`; then
  12175. echo "$ac_t""$WXVERSION" 1>&6
  12176. else
  12177. echo "$ac_t""not found" 1>&6
  12178. { echo "configure: error: wxWidgets is required." 1>&2; exit 1; }
  12179. fi
  12180. if test `expr "$WXVERSION" \< "$REQWX"` = 1 ; then
  12181. { echo "configure: error: *** wxWidgets "$REQWX" or later is required." 1>&2; exit 1; }
  12182. fi
  12183. # With wxWidgets includes directory
  12184. WXWIDGETSCXXFLAGS=`"$WX_CONFIG" --cxxflags`
  12185. WXWIDGETSCPPFLAGS=`"$WX_CONFIG" --cppflags`
  12186. ac_save_cppflags="$CPPFLAGS"
  12187. CPPFLAGS="$WXWIDGETSCPPFLAGS $CPPFLAGS"
  12188. for ac_hdr in wx/wxprec.h
  12189. do
  12190. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  12191. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  12192. echo "configure:15202: checking for $ac_hdr" >&5
  12193. cat > conftest.$ac_ext <<EOF
  12194. #line 15205 "configure"
  12195. #include "confdefs.h"
  12196. #include <$ac_hdr>
  12197. EOF
  12198. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  12199. { (eval echo configure:15210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  12200. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  12201. if test -z "$ac_err"; then
  12202. rm -rf conftest*
  12203. eval "ac_cv_header_$ac_safe=yes"
  12204. else
  12205. echo "$ac_err" >&5
  12206. echo "configure: failed program was:" >&5
  12207. cat conftest.$ac_ext >&5
  12208. rm -rf conftest*
  12209. eval "ac_cv_header_$ac_safe=no"
  12210. fi
  12211. rm -f conftest*
  12212. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  12213. echo "$ac_t""yes" 1>&6
  12214. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  12215. cat >> confdefs.h <<EOF
  12216. #define $ac_tr_hdr 1
  12217. EOF
  12218. else
  12219. echo "$ac_t""no" 1>&6
  12220. { echo "configure: error: *** Unable to locate wxWidgets includes." 1>&2; exit 1; }
  12221. fi
  12222. done
  12223. CPPFLAGS=$ac_save_cppflags
  12224. # With wxWidgets library directory
  12225. WXWIDGETSLIB=`"$WX_CONFIG" --libs`
  12226. fi # $USE_WXWIDGETS
  12227. # Done checking wxWidgets
  12228. USE_TERMIO=
  12229. STRIPFLAG=
  12230. GRASS_HOME=${DSTDIR}
  12231. trap '' 1 2 15
  12232. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  12233. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  12234. # Let make expand exec_prefix.
  12235. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  12236. # Any assignment to VPATH causes Sun make to only execute
  12237. # the first set of double-colon rules, so remove it if not needed.
  12238. # If there is a colon in the path, we need to keep it.
  12239. if test "x$srcdir" = x.; then
  12240. ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
  12241. fi
  12242. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  12243. DEFS=-DHAVE_CONFIG_H
  12244. # Without the "./", some shells look in PATH for config.status.
  12245. : ${CONFIG_STATUS=./config.status}
  12246. echo creating $CONFIG_STATUS
  12247. rm -f $CONFIG_STATUS
  12248. cat > $CONFIG_STATUS <<EOF
  12249. #! /bin/sh
  12250. # Generated automatically by configure.
  12251. # Run this file to recreate the current configuration.
  12252. # This directory was configured as follows,
  12253. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  12254. #
  12255. # $0 $ac_configure_args
  12256. #
  12257. # Compiler output produced by configure, useful for debugging
  12258. # configure, is in ./config.log if it exists.
  12259. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  12260. for ac_option
  12261. do
  12262. case "\$ac_option" in
  12263. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  12264. echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  12265. exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  12266. -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  12267. echo "$CONFIG_STATUS generated by autoconf version 2.13"
  12268. exit 0 ;;
  12269. -help | --help | --hel | --he | --h)
  12270. echo "\$ac_cs_usage"; exit 0 ;;
  12271. *) echo "\$ac_cs_usage"; exit 1 ;;
  12272. esac
  12273. done
  12274. ac_given_srcdir=$srcdir
  12275. ac_given_INSTALL="$INSTALL"
  12276. 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
  12277. EOF
  12278. cat >> $CONFIG_STATUS <<EOF
  12279. # Protect against being on the right side of a sed subst in config.status.
  12280. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  12281. s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  12282. $ac_vpsub
  12283. $extrasub
  12284. s%@SHELL@%$SHELL%g
  12285. s%@CFLAGS@%$CFLAGS%g
  12286. s%@CPPFLAGS@%$CPPFLAGS%g
  12287. s%@CXXFLAGS@%$CXXFLAGS%g
  12288. s%@FFLAGS@%$FFLAGS%g
  12289. s%@DEFS@%$DEFS%g
  12290. s%@LDFLAGS@%$LDFLAGS%g
  12291. s%@LIBS@%$LIBS%g
  12292. s%@exec_prefix@%$exec_prefix%g
  12293. s%@prefix@%$prefix%g
  12294. s%@program_transform_name@%$program_transform_name%g
  12295. s%@bindir@%$bindir%g
  12296. s%@sbindir@%$sbindir%g
  12297. s%@libexecdir@%$libexecdir%g
  12298. s%@datadir@%$datadir%g
  12299. s%@sysconfdir@%$sysconfdir%g
  12300. s%@sharedstatedir@%$sharedstatedir%g
  12301. s%@localstatedir@%$localstatedir%g
  12302. s%@libdir@%$libdir%g
  12303. s%@includedir@%$includedir%g
  12304. s%@oldincludedir@%$oldincludedir%g
  12305. s%@infodir@%$infodir%g
  12306. s%@mandir@%$mandir%g
  12307. s%@host@%$host%g
  12308. s%@host_alias@%$host_alias%g
  12309. s%@host_cpu@%$host_cpu%g
  12310. s%@host_vendor@%$host_vendor%g
  12311. s%@host_os@%$host_os%g
  12312. s%@CC@%$CC%g
  12313. s%@EXEEXT@%$EXEEXT%g
  12314. s%@MINGW32@%$MINGW32%g
  12315. s%@BINDIR@%$BINDIR%g
  12316. s%@pwd@%$pwd%g
  12317. s%@SRCDIR@%$SRCDIR%g
  12318. s%@DSTDIR@%$DSTDIR%g
  12319. s%@ARCH@%$ARCH%g
  12320. s%@GISBASE@%$GISBASE%g
  12321. s%@GRASS_BIN@%$GRASS_BIN%g
  12322. s%@GRASS_VERSION_FILE@%$GRASS_VERSION_FILE%g
  12323. s%@GRASS_VERSION_MAJOR@%$GRASS_VERSION_MAJOR%g
  12324. s%@GRASS_VERSION_MINOR@%$GRASS_VERSION_MINOR%g
  12325. s%@GRASS_VERSION_RELEASE@%$GRASS_VERSION_RELEASE%g
  12326. s%@GRASS_VERSION_NUMBER@%$GRASS_VERSION_NUMBER%g
  12327. s%@GRASS_VERSION_DATE@%$GRASS_VERSION_DATE%g
  12328. s%@NAME_VER@%$NAME_VER%g
  12329. s%@LIB_VER@%$LIB_VER%g
  12330. s%@MACOSX_APP@%$MACOSX_APP%g
  12331. s%@INSTDIR@%$INSTDIR%g
  12332. s%@GRASS_LIB_PREFIX@%$GRASS_LIB_PREFIX%g
  12333. s%@GRASS_LIB_SUFFIX@%$GRASS_LIB_SUFFIX%g
  12334. s%@GRASS_LIBRARY_TYPE@%$GRASS_LIBRARY_TYPE%g
  12335. s%@RANLIB@%$RANLIB%g
  12336. s%@AR@%$AR%g
  12337. s%@CPP@%$CPP%g
  12338. s%@PLAT_OBJS@%$PLAT_OBJS%g
  12339. s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
  12340. s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
  12341. s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
  12342. s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
  12343. s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
  12344. s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
  12345. s%@CC_SEARCH_FLAGS@%$CC_SEARCH_FLAGS%g
  12346. s%@LD_SEARCH_FLAGS@%$LD_SEARCH_FLAGS%g
  12347. s%@LD_LIBRARY_PATH_VAR@%$LD_LIBRARY_PATH_VAR%g
  12348. s%@STLIB_LD@%$STLIB_LD%g
  12349. s%@SHLIB_LD@%$SHLIB_LD%g
  12350. s%@GRASS_SHLIB_LD_EXTRAS@%$GRASS_SHLIB_LD_EXTRAS%g
  12351. s%@SHLIB_LD_FLAGS@%$SHLIB_LD_FLAGS%g
  12352. s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
  12353. s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
  12354. s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
  12355. s%@MAKE_LIB@%$MAKE_LIB%g
  12356. s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
  12357. s%@INSTALL_LIB@%$INSTALL_LIB%g
  12358. s%@INSTALL_STUB_LIB@%$INSTALL_STUB_LIB%g
  12359. s%@INCLUDE_DIRS@%$INCLUDE_DIRS%g
  12360. s%@LIBRARY_DIRS@%$LIBRARY_DIRS%g
  12361. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  12362. s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
  12363. s%@INSTALL_DATA@%$INSTALL_DATA%g
  12364. s%@LEX@%$LEX%g
  12365. s%@LEXLIB@%$LEXLIB%g
  12366. s%@LEXPATH@%$LEXPATH%g
  12367. s%@YACC@%$YACC%g
  12368. s%@YACCPATH@%$YACCPATH%g
  12369. s%@ENV@%$ENV%g
  12370. s%@PERL@%$PERL%g
  12371. s%@CROSS_COMPILING@%$CROSS_COMPILING%g
  12372. s%@X_CFLAGS@%$X_CFLAGS%g
  12373. s%@X_LIBS@%$X_LIBS%g
  12374. s%@X_PRE_LIBS@%$X_PRE_LIBS%g
  12375. s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
  12376. s%@XLIB@%$XLIB%g
  12377. s%@XTLIB@%$XTLIB%g
  12378. s%@USE_X11@%$USE_X11%g
  12379. s%@DBMIEXTRALIB@%$DBMIEXTRALIB%g
  12380. s%@XDRLIB@%$XDRLIB%g
  12381. s%@HAVE_ASPRINTF@%$HAVE_ASPRINTF%g
  12382. s%@MATHLIB@%$MATHLIB%g
  12383. s%@DLLIB@%$DLLIB%g
  12384. s%@ICONVLIB@%$ICONVLIB%g
  12385. s%@SOCKLIB@%$SOCKLIB%g
  12386. s%@HAVE_SOCKET@%$HAVE_SOCKET%g
  12387. s%@ZLIBINCPATH@%$ZLIBINCPATH%g
  12388. s%@ZLIBLIBPATH@%$ZLIBLIBPATH%g
  12389. s%@ZLIB@%$ZLIB%g
  12390. s%@PROJINC@%$PROJINC%g
  12391. s%@PROJLIB@%$PROJLIB%g
  12392. s%@PROJSHARE@%$PROJSHARE%g
  12393. s%@NAD2BIN@%$NAD2BIN%g
  12394. s%@REGEXINCPATH@%$REGEXINCPATH%g
  12395. s%@REGEXLIBPATH@%$REGEXLIBPATH%g
  12396. s%@REGEXLIB@%$REGEXLIB%g
  12397. s%@USE_REGEX@%$USE_REGEX%g
  12398. s%@READLINEINCPATH@%$READLINEINCPATH%g
  12399. s%@READLINELIBPATH@%$READLINELIBPATH%g
  12400. s%@READLINELIB@%$READLINELIB%g
  12401. s%@HISTORYLIB@%$HISTORYLIB%g
  12402. s%@JPEGINCPATH@%$JPEGINCPATH%g
  12403. s%@JPEGLIBPATH@%$JPEGLIBPATH%g
  12404. s%@JPEGLIB@%$JPEGLIB%g
  12405. s%@GDAL_CONFIG@%$GDAL_CONFIG%g
  12406. s%@GDAL_LIBS@%$GDAL_LIBS%g
  12407. s%@GDAL_CFLAGS@%$GDAL_CFLAGS%g
  12408. s%@USE_GDAL@%$USE_GDAL%g
  12409. s%@USE_OGR@%$USE_OGR%g
  12410. s%@GEOS_CONFIG@%$GEOS_CONFIG%g
  12411. s%@GEOS_LIBS@%$GEOS_LIBS%g
  12412. s%@GEOS_CFLAGS@%$GEOS_CFLAGS%g
  12413. s%@USE_GEOS@%$USE_GEOS%g
  12414. s%@TIFF_INCLUDE_DIRS@%$TIFF_INCLUDE_DIRS%g
  12415. s%@TIFF_LIBRARY_DIRS@%$TIFF_LIBRARY_DIRS%g
  12416. s%@TIFFLIB@%$TIFFLIB%g
  12417. s%@PNGINC@%$PNGINC%g
  12418. s%@PNGLIB@%$PNGLIB%g
  12419. s%@USE_PNG@%$USE_PNG%g
  12420. s%@TCLINCDIR@%$TCLINCDIR%g
  12421. s%@TKINCDIR@%$TKINCDIR%g
  12422. s%@TCLTKLIBPATH@%$TCLTKLIBPATH%g
  12423. s%@TCLTKLIBS@%$TCLTKLIBS%g
  12424. s%@USE_POSTGRES@%$USE_POSTGRES%g
  12425. s%@PQINCPATH@%$PQINCPATH%g
  12426. s%@PQLIBPATH@%$PQLIBPATH%g
  12427. s%@PQLIB@%$PQLIB%g
  12428. s%@MYSQLD_CONFIG@%$MYSQLD_CONFIG%g
  12429. s%@USE_MYSQL@%$USE_MYSQL%g
  12430. s%@MYSQLINCPATH@%$MYSQLINCPATH%g
  12431. s%@MYSQLLIBPATH@%$MYSQLLIBPATH%g
  12432. s%@MYSQLLIB@%$MYSQLLIB%g
  12433. s%@MYSQLDLIB@%$MYSQLDLIB%g
  12434. s%@USE_SQLITE@%$USE_SQLITE%g
  12435. s%@SQLITEINCPATH@%$SQLITEINCPATH%g
  12436. s%@SQLITELIBPATH@%$SQLITELIBPATH%g
  12437. s%@SQLITELIB@%$SQLITELIB%g
  12438. s%@USE_FFMPEG@%$USE_FFMPEG%g
  12439. s%@FFMPEGINCPATH@%$FFMPEGINCPATH%g
  12440. s%@FFMPEGLIBPATH@%$FFMPEGLIBPATH%g
  12441. s%@FFMPEGLIB@%$FFMPEGLIB%g
  12442. s%@USE_OPENGL@%$USE_OPENGL%g
  12443. s%@OPENGL_X11@%$OPENGL_X11%g
  12444. s%@OPENGL_AQUA@%$OPENGL_AQUA%g
  12445. s%@OPENGL_WINDOWS@%$OPENGL_WINDOWS%g
  12446. s%@OPENGLINC@%$OPENGLINC%g
  12447. s%@OPENGLLIB@%$OPENGLLIB%g
  12448. s%@OPENGLULIB@%$OPENGLULIB%g
  12449. s%@ODBCINC@%$ODBCINC%g
  12450. s%@ODBCLIB@%$ODBCLIB%g
  12451. s%@FFTWINC@%$FFTWINC%g
  12452. s%@FFTWLIB@%$FFTWLIB%g
  12453. s%@BLASLIB@%$BLASLIB%g
  12454. s%@BLASINC@%$BLASINC%g
  12455. s%@LAPACKLIB@%$LAPACKLIB%g
  12456. s%@LAPACKINC@%$LAPACKINC%g
  12457. s%@CAIRO_HAS_XRENDER@%$CAIRO_HAS_XRENDER%g
  12458. s%@CAIRO_HAS_XRENDER_SURFACE@%$CAIRO_HAS_XRENDER_SURFACE%g
  12459. s%@CAIROINC@%$CAIROINC%g
  12460. s%@CAIROLIB@%$CAIROLIB%g
  12461. s%@USE_CAIRO@%$USE_CAIRO%g
  12462. s%@FTINC@%$FTINC%g
  12463. s%@FTLIB@%$FTLIB%g
  12464. s%@INTLLIB@%$INTLLIB%g
  12465. s%@HAVE_NLS@%$HAVE_NLS%g
  12466. s%@CXX@%$CXX%g
  12467. s%@OPENDWGINCPATH@%$OPENDWGINCPATH%g
  12468. s%@OPENDWGLIBPATH@%$OPENDWGLIBPATH%g
  12469. s%@OPENDWGLIB@%$OPENDWGLIB%g
  12470. s%@USE_OPENDWG@%$USE_OPENDWG%g
  12471. s%@PTHREADINCPATH@%$PTHREADINCPATH%g
  12472. s%@PTHREADLIBPATH@%$PTHREADLIBPATH%g
  12473. s%@PTHREADLIB@%$PTHREADLIB%g
  12474. s%@USE_PTHREAD@%$USE_PTHREAD%g
  12475. s%@USE_LARGEFILES@%$USE_LARGEFILES%g
  12476. s%@PY_CONFIG@%$PY_CONFIG%g
  12477. s%@SWIG@%$SWIG%g
  12478. s%@PYTHONINC@%$PYTHONINC%g
  12479. s%@PYTHONCFLAGS@%$PYTHONCFLAGS%g
  12480. s%@PYTHONLDFLAGS@%$PYTHONLDFLAGS%g
  12481. s%@USE_PYTHON@%$USE_PYTHON%g
  12482. s%@WX_CONFIG@%$WX_CONFIG%g
  12483. s%@WXVERSION@%$WXVERSION%g
  12484. s%@WXWIDGETSCXXFLAGS@%$WXWIDGETSCXXFLAGS%g
  12485. s%@WXWIDGETSCPPFLAGS@%$WXWIDGETSCPPFLAGS%g
  12486. s%@WXWIDGETSLIB@%$WXWIDGETSLIB%g
  12487. s%@USE_WXWIDGETS@%$USE_WXWIDGETS%g
  12488. s%@USE_TERMIO@%$USE_TERMIO%g
  12489. s%@STRIPFLAG@%$STRIPFLAG%g
  12490. s%@GRASS_HOME@%$GRASS_HOME%g
  12491. CEOF
  12492. EOF
  12493. cat >> $CONFIG_STATUS <<\EOF
  12494. # Split the substitutions into bite-sized pieces for seds with
  12495. # small command number limits, like on Digital OSF/1 and HP-UX.
  12496. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  12497. ac_file=1 # Number of current file.
  12498. ac_beg=1 # First line for current file.
  12499. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  12500. ac_more_lines=:
  12501. ac_sed_cmds=""
  12502. while $ac_more_lines; do
  12503. if test $ac_beg -gt 1; then
  12504. sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  12505. else
  12506. sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  12507. fi
  12508. if test ! -s conftest.s$ac_file; then
  12509. ac_more_lines=false
  12510. rm -f conftest.s$ac_file
  12511. else
  12512. if test -z "$ac_sed_cmds"; then
  12513. ac_sed_cmds="sed -f conftest.s$ac_file"
  12514. else
  12515. ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  12516. fi
  12517. ac_file=`expr $ac_file + 1`
  12518. ac_beg=$ac_end
  12519. ac_end=`expr $ac_end + $ac_max_sed_cmds`
  12520. fi
  12521. done
  12522. if test -z "$ac_sed_cmds"; then
  12523. ac_sed_cmds=cat
  12524. fi
  12525. EOF
  12526. cat >> $CONFIG_STATUS <<EOF
  12527. CONFIG_FILES=\${CONFIG_FILES-"include/Make/Platform.make include/version.h swig/perl/Makefile.PL swig/perl2/make.pl grass.pc"}
  12528. EOF
  12529. cat >> $CONFIG_STATUS <<\EOF
  12530. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  12531. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  12532. case "$ac_file" in
  12533. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  12534. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  12535. *) ac_file_in="${ac_file}.in" ;;
  12536. esac
  12537. # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  12538. # Remove last slash and all that follows it. Not all systems have dirname.
  12539. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  12540. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  12541. # The file is in a subdirectory.
  12542. test ! -d "$ac_dir" && mkdir "$ac_dir"
  12543. ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  12544. # A "../" for each directory in $ac_dir_suffix.
  12545. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  12546. else
  12547. ac_dir_suffix= ac_dots=
  12548. fi
  12549. case "$ac_given_srcdir" in
  12550. .) srcdir=.
  12551. if test -z "$ac_dots"; then top_srcdir=.
  12552. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  12553. /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  12554. *) # Relative path.
  12555. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  12556. top_srcdir="$ac_dots$ac_given_srcdir" ;;
  12557. esac
  12558. case "$ac_given_INSTALL" in
  12559. [/$]*) INSTALL="$ac_given_INSTALL" ;;
  12560. *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  12561. esac
  12562. echo creating "$ac_file"
  12563. rm -f "$ac_file"
  12564. configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  12565. case "$ac_file" in
  12566. *Makefile*) ac_comsub="1i\\
  12567. # $configure_input" ;;
  12568. *) ac_comsub= ;;
  12569. esac
  12570. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  12571. sed -e "$ac_comsub
  12572. s%@configure_input@%$configure_input%g
  12573. s%@srcdir@%$srcdir%g
  12574. s%@top_srcdir@%$top_srcdir%g
  12575. s%@INSTALL@%$INSTALL%g
  12576. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  12577. fi; done
  12578. rm -f conftest.s*
  12579. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  12580. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  12581. #
  12582. # ac_d sets the value in "#define NAME VALUE" lines.
  12583. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
  12584. ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
  12585. ac_dC='\3'
  12586. ac_dD='%g'
  12587. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  12588. ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  12589. ac_uB='\([ ]\)%\1#\2define\3'
  12590. ac_uC=' '
  12591. ac_uD='\4%g'
  12592. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  12593. ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  12594. ac_eB='$%\1#\2define\3'
  12595. ac_eC=' '
  12596. ac_eD='%g'
  12597. if test "${CONFIG_HEADERS+set}" != set; then
  12598. EOF
  12599. cat >> $CONFIG_STATUS <<EOF
  12600. CONFIG_HEADERS="include/config.h"
  12601. EOF
  12602. cat >> $CONFIG_STATUS <<\EOF
  12603. fi
  12604. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  12605. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  12606. case "$ac_file" in
  12607. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  12608. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  12609. *) ac_file_in="${ac_file}.in" ;;
  12610. esac
  12611. echo creating $ac_file
  12612. rm -f conftest.frag conftest.in conftest.out
  12613. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  12614. cat $ac_file_inputs > conftest.in
  12615. EOF
  12616. # Transform confdefs.h into a sed script conftest.vals that substitutes
  12617. # the proper values into config.h.in to produce config.h. And first:
  12618. # Protect against being on the right side of a sed subst in config.status.
  12619. # Protect against being in an unquoted here document in config.status.
  12620. rm -f conftest.vals
  12621. cat > conftest.hdr <<\EOF
  12622. s/[\\&%]/\\&/g
  12623. s%[\\$`]%\\&%g
  12624. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  12625. s%ac_d%ac_u%gp
  12626. s%ac_u%ac_e%gp
  12627. EOF
  12628. sed -n -f conftest.hdr confdefs.h > conftest.vals
  12629. rm -f conftest.hdr
  12630. # This sed command replaces #undef with comments. This is necessary, for
  12631. # example, in the case of _POSIX_SOURCE, which is predefined and required
  12632. # on some systems where configure will not decide to define it.
  12633. cat >> conftest.vals <<\EOF
  12634. s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  12635. EOF
  12636. # Break up conftest.vals because some shells have a limit on
  12637. # the size of here documents, and old seds have small limits too.
  12638. rm -f conftest.tail
  12639. while :
  12640. do
  12641. ac_lines=`grep -c . conftest.vals`
  12642. # grep -c gives empty output for an empty file on some AIX systems.
  12643. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  12644. # Write a limited-size here document to conftest.frag.
  12645. echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  12646. sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  12647. echo 'CEOF
  12648. sed -f conftest.frag conftest.in > conftest.out
  12649. rm -f conftest.in
  12650. mv conftest.out conftest.in
  12651. ' >> $CONFIG_STATUS
  12652. sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  12653. rm -f conftest.vals
  12654. mv conftest.tail conftest.vals
  12655. done
  12656. rm -f conftest.vals
  12657. cat >> $CONFIG_STATUS <<\EOF
  12658. rm -f conftest.frag conftest.h
  12659. echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
  12660. cat conftest.in >> conftest.h
  12661. rm -f conftest.in
  12662. if cmp -s $ac_file conftest.h 2>/dev/null; then
  12663. echo "$ac_file is unchanged"
  12664. rm -f conftest.h
  12665. else
  12666. # Remove last slash and all that follows it. Not all systems have dirname.
  12667. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  12668. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  12669. # The file is in a subdirectory.
  12670. test ! -d "$ac_dir" && mkdir "$ac_dir"
  12671. fi
  12672. rm -f $ac_file
  12673. mv conftest.h $ac_file
  12674. fi
  12675. fi; done
  12676. EOF
  12677. cat >> $CONFIG_STATUS <<EOF
  12678. EOF
  12679. cat >> $CONFIG_STATUS <<\EOF
  12680. exit 0
  12681. EOF
  12682. chmod +x $CONFIG_STATUS
  12683. rm -fr confdefs* $ac_clean_files
  12684. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  12685. echo "Copying config.status to config.status.${ARCH}"
  12686. cp -f config.status config.status.${ARCH}
  12687. # Display configuration status
  12688. USE_TOGL=
  12689. if test -n "${USE_TCLTK}" -a -n "${USE_OPENGL}" ; then
  12690. USE_TOGL="1"
  12691. fi
  12692. echo ""
  12693. echo "GRASS is now configured for: ${host}"
  12694. echo ""
  12695. echo " Source directory: ${SRCDIR}"
  12696. echo " Build directory: ${DSTDIR}"
  12697. echo " Installation directory: ${INSTDIR}"
  12698. echo " Startup script in directory: ${bindir}"
  12699. echo " C compiler: ${CC} ${CFLAGS}"
  12700. echo " C++ compiler: ${CXX} ${CXXFLAGS}"
  12701. #LOC_MSG([ FORTRAN compiler: ${F77} ${FFLAGS}])
  12702. echo " Building shared libraries: ${shared_ok}"
  12703. echo " 64bit support: ${do64bit}"
  12704. echo " OpenGL platform: ${OPENGL_TYPE}"
  12705. echo ""
  12706. echo " MacOSX application: `if test -n "${MACOSX_APP}" ; then echo yes ; else echo no ; fi`"
  12707. echo ""
  12708. echo " NVIZ: `if test -n "${USE_TOGL}" ; then echo yes ; else echo no ; fi`"
  12709. echo ""
  12710. echo " BLAS support: `if test -n "${USE_BLAS}" ; then echo yes ; else echo no ; fi`"
  12711. echo " C++ support: `if test -n "${USE_CXX}" ; then echo yes ; else echo no ; fi`"
  12712. echo " Cairo support: `if test -n "${USE_CAIRO}" ; then echo yes ; else echo no ; fi`"
  12713. echo " DWG support: `if test -n "${USE_OPENDWG}" ; then echo yes ; else echo no ; fi`"
  12714. echo " FFMPEG support: `if test -n "${USE_FFMPEG}" ; then echo yes ; else echo no ; fi`"
  12715. echo " FFTW support: `if test -n "${USE_FFTW}" ; then echo yes ; else echo no ; fi`"
  12716. echo " FreeType support: `if test -n "${USE_FREETYPE}" ; then echo yes ; else echo no ; fi`"
  12717. echo " GDAL support: `if test -n "${USE_GDAL}" ; then echo yes ; else echo no ; fi`"
  12718. echo " GEOS support: `if test -n "${USE_GEOS}" ; then echo yes ; else echo no ; fi`"
  12719. echo " JPEG support: `if test -n "${USE_JPEG}" ; then echo yes ; else echo no ; fi`"
  12720. echo " LAPACK support: `if test -n "${USE_LAPACK}" ; then echo yes ; else echo no ; fi`"
  12721. echo " Large File support (LFS): `if test -n "${USE_LARGEFILES}" ; then echo yes ; else echo no ; fi`"
  12722. echo " MySQL support: `if test -n "${USE_MYSQL}" ; then echo yes ; else echo no ; fi`"
  12723. echo " NLS support: `if test -n "${USE_NLS}" ; then echo yes ; else echo no ; fi`"
  12724. echo " ODBC support: `if test -n "${USE_ODBC}" ; then echo yes ; else echo no ; fi`"
  12725. echo " OGR support: `if test -n "${USE_OGR}" ; then echo yes ; else echo no ; fi`"
  12726. echo " OpenGL support: `if test -n "${USE_OPENGL}" ; then echo yes ; else echo no ; fi`"
  12727. echo " PNG support: `if test -n "${USE_PNG}" ; then echo yes ; else echo no ; fi`"
  12728. echo " PostgreSQL support: `if test -n "${USE_POSTGRES}" ; then echo yes ; else echo no ; fi`"
  12729. echo " Python support: `if test -n "${USE_PYTHON}" ; then echo yes ; else echo no ; fi`"
  12730. echo " Readline support: `if test -n "${USE_READLINE}" ; then echo yes ; else echo no ; fi`"
  12731. echo " SQLite support: `if test -n "${USE_SQLITE}" ; then echo yes ; else echo no ; fi`"
  12732. echo " Tcl/Tk support: `if test -n "${USE_TCLTK}" ; then echo yes ; else echo no ; fi`"
  12733. echo " wxWidgets support: `if test -n "${USE_WXWIDGETS}" ; then echo yes ; else echo no ; fi`"
  12734. echo " TIFF support: `if test -n "${USE_TIFF}" ; then echo yes ; else echo no ; fi`"
  12735. echo " X11 support: `if test -n "${USE_X11}" ; then echo yes ; else echo no ; fi`"
  12736. echo " Regex support: `if test -n "${USE_REGEX}" ; then echo yes ; else echo no ; fi`"
  12737. echo " POSIX thread support: `if test -n "${USE_PTHREAD}" ; then echo yes ; else echo no ; fi`"
  12738. echo ""