configure 378 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753
  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-w11 use W11 library for Windows X11 emulation"
  19. ac_help="$ac_help
  20. --with-cxx support C++ functionality (default: yes)"
  21. ac_help="$ac_help
  22. --with-macosx-archs[=arch list]
  23. compile multiple architectures on MacOSX, ie.
  24. universal. Valid architectures are i386, ppc,
  25. x86_64 and ppc64. (default: no [native])"
  26. ac_help="$ac_help
  27. --with-macosx-sdk[=path/sdk]
  28. compile with a system SDK on MacOSX. (default: no)"
  29. ac_help="$ac_help
  30. --with-tiff support TIFF functionality (default: yes)"
  31. ac_help="$ac_help
  32. --with-png support PNG 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: yes)"
  39. ac_help="$ac_help
  40. --with-opengl support OpenGL functionality (default: yes)"
  41. ac_help="$ac_help
  42. --with-odbc support ODBC functionality (default: no)"
  43. ac_help="$ac_help
  44. --with-fftw support FFTW functionality (default: yes)"
  45. ac_help="$ac_help
  46. --with-blas support BLAS functionality (default: no)"
  47. ac_help="$ac_help
  48. --with-lapack support LAPACK functionality (default: no)"
  49. ac_help="$ac_help
  50. --with-cairo support Cairo functionality (default: yes)"
  51. ac_help="$ac_help
  52. --with-freetype support FreeType functionality (default: yes)"
  53. ac_help="$ac_help
  54. --with-nls support NLS functionality (default: no)"
  55. ac_help="$ac_help
  56. --with-readline support Readline functionality (default: no)"
  57. ac_help="$ac_help
  58. --with-opendwg support openDWG functionality (default: no)"
  59. ac_help="$ac_help
  60. --with-regex support regex functionality (default: yes)"
  61. ac_help="$ac_help
  62. --with-pthread support POSIX threads functionality (default: no)"
  63. ac_help="$ac_help
  64. --with-openmp support OpenMP functionality (default: no)"
  65. ac_help="$ac_help
  66. --with-opencl support OpenCL functionality (default: no)"
  67. ac_help="$ac_help
  68. --with-bzlib support BZIP2 functionality (default: no)"
  69. ac_help="$ac_help
  70. --with-zstd support Zstandard functionality (default: no)"
  71. ac_help="$ac_help
  72. --with-gdal[=path/gdal-config]
  73. enable GDAL/OGR support (gdal-config with path,
  74. e.g. '--with-gdal=/usr/local/bin/gdal-config')"
  75. ac_help="$ac_help
  76. --with-liblas[=path/liblas-config]
  77. enable libLAS support (liblas-config with path,
  78. e.g. '--with-liblas=/usr/local/bin/liblas-config',
  79. default: no)"
  80. ac_help="$ac_help
  81. --with-pdal[=path/pdal-config]
  82. enable PDAL support (pdal-config with path,
  83. e.g. '--with-pdal=/usr/local/bin/pdal-config',
  84. default: no)"
  85. ac_help="$ac_help
  86. --with-wxwidgets[=path/wx-config]
  87. enable wxWidgets support (wx-config with path,
  88. e.g. '--with-wxwidgets=/usr/local/bin/wx-config',
  89. default: no)"
  90. ac_help="$ac_help
  91. --with-netcdf[=path/nc-config]
  92. enable NetCDF support (nc-config with path,
  93. e.g. '--with-nc=/usr/local/bin/nc-config',
  94. default: no)"
  95. ac_help="$ac_help
  96. --with-geos[=path/geos-config]
  97. enable GEOS support (geos-config with path,
  98. e.g. '--with-geos=/usr/local/bin/geos-config',
  99. default: no)"
  100. ac_help="$ac_help
  101. --with-includes=DIRS site include files are in DIRS"
  102. ac_help="$ac_help
  103. --with-libs=DIRS site library files are in DIRS"
  104. ac_help="$ac_help
  105. --with-zlib-includes=DIRS
  106. zlib include files are in DIRS"
  107. ac_help="$ac_help
  108. --with-zlib-libs=DIRS zlib library files are in DIRS"
  109. ac_help="$ac_help
  110. --with-bzlib-includes=DIRS
  111. BZIP2 include files are in DIRS"
  112. ac_help="$ac_help
  113. --with-bzlib-libs=DIRS BZIP2 library files are in DIRS"
  114. ac_help="$ac_help
  115. --with-zstd-includes=DIRS
  116. ZSTD include files are in DIRS"
  117. ac_help="$ac_help
  118. --with-zstd-libs=DIRS ZSTD library files are in DIRS"
  119. ac_help="$ac_help
  120. --with-readline-includes=DIRS
  121. Readline include files are in DIRS"
  122. ac_help="$ac_help
  123. --with-readline-libs=DIRS
  124. Readline library files are in DIRS"
  125. ac_help="$ac_help
  126. --with-tiff-includes=DIRS
  127. TIFF include files are in DIRS"
  128. ac_help="$ac_help
  129. --with-tiff-libs=DIRS TIFF library files are in DIRS"
  130. ac_help="$ac_help
  131. --with-png-includes=DIRS
  132. PNG include files are in DIRS"
  133. ac_help="$ac_help
  134. --with-png-libs=DIRS PNG library files are in DIRS"
  135. ac_help="$ac_help
  136. --with-postgres-includes=DIRS
  137. PostgreSQL include files are in DIRS"
  138. ac_help="$ac_help
  139. --with-postgres-libs=DIRS
  140. PostgreSQL library files are in DIRS"
  141. ac_help="$ac_help
  142. --with-mysql-includes=DIRS
  143. MySQL include files are in DIRS"
  144. ac_help="$ac_help
  145. --with-mysql-libs=DIRS MySQL library files are in DIRS"
  146. ac_help="$ac_help
  147. --with-sqlite-includes=DIRS
  148. SQLite include files are in DIRS"
  149. ac_help="$ac_help
  150. --with-sqlite-libs=DIRS SQLite library files are in DIRS"
  151. ac_help="$ac_help
  152. --with-opengl-includes=DIRS
  153. OpenGL include files are in DIRS"
  154. ac_help="$ac_help
  155. --with-opengl-libs=DIRS OpenGL library files are in DIRS"
  156. ac_help="$ac_help
  157. --with-opengl-framework=DIR
  158. OpenGL framework is in DIR"
  159. ac_help="$ac_help
  160. --with-odbc-includes=DIRS
  161. ODBC include files are in DIRS"
  162. ac_help="$ac_help
  163. --with-odbc-libs=DIRS ODBC library files are in DIRS"
  164. ac_help="$ac_help
  165. --with-fftw-includes=DIRS
  166. FFTW include files are in DIRS"
  167. ac_help="$ac_help
  168. --with-fftw-libs=DIRS FFTW library files are in DIRS"
  169. ac_help="$ac_help
  170. --with-blas-includes=DIRS
  171. BLAS include files are in DIRS"
  172. ac_help="$ac_help
  173. --with-blas-libs=DIRS BLAS library files are in DIRS"
  174. ac_help="$ac_help
  175. --with-lapack-includes=DIRS
  176. LAPACK include files are in DIRS"
  177. ac_help="$ac_help
  178. --with-lapack-libs=DIRS LAPACK library files are in DIRS"
  179. ac_help="$ac_help
  180. --with-cairo-includes=DIRS
  181. cairo include files are in DIRS"
  182. ac_help="$ac_help
  183. --with-cairo-libs=DIRS cairo library files are in DIRS"
  184. ac_help="$ac_help
  185. --with-cairo-ldflags=FLAGS
  186. cairo needs FLAGS when linking"
  187. ac_help="$ac_help
  188. --with-freetype-includes=DIRS
  189. FreeType include files are in DIRS"
  190. ac_help="$ac_help
  191. --with-freetype-libs=DIRS
  192. FreeType library files are in DIRS"
  193. ac_help="$ac_help
  194. --with-proj-includes=DIRS
  195. External PROJ.4 include files are in DIRS"
  196. ac_help="$ac_help
  197. --with-proj-libs=DIRS External PROJ.4 library files are in DIRS"
  198. ac_help="$ac_help
  199. --with-proj-share=DIR External PROJ.4 data files are in DIR"
  200. ac_help="$ac_help
  201. --with-opendwg-includes=DIRS
  202. openDWG include files are in DIRS"
  203. ac_help="$ac_help
  204. --with-opendwg-libs=DIRS
  205. openDWG library files are in DIRS"
  206. ac_help="$ac_help
  207. --with-regex-includes=DIRS
  208. regex include files are in DIRS"
  209. ac_help="$ac_help
  210. --with-regex-libs=DIRS regex library files are in DIRS"
  211. ac_help="$ac_help
  212. --with-pthread-includes=DIRS
  213. POSIX threads include files are in DIRS"
  214. ac_help="$ac_help
  215. --with-pthread-libs=DIRS
  216. POSIX threads library files are in DIRS"
  217. ac_help="$ac_help
  218. --with-openmp-includes=DIRS
  219. OpenMP include files are in DIRS"
  220. ac_help="$ac_help
  221. --with-openmp-libs=DIRS OpenMP library files are in DIRS"
  222. ac_help="$ac_help
  223. --with-opencl-includes=DIRS
  224. OpenCL include files are in DIRS"
  225. ac_help="$ac_help
  226. --with-opencl-libs=DIRS OpenCL library files are in DIRS"
  227. ac_help="$ac_help
  228. --with-x use the X Window System"
  229. ac_help="$ac_help
  230. --disable-largefile omit support for large files (LFS)"
  231. # Initialize some variables set by options.
  232. # The variables have the same names as the options, with
  233. # dashes changed to underlines.
  234. build=NONE
  235. cache_file=./config.cache
  236. exec_prefix=NONE
  237. host=NONE
  238. no_create=
  239. nonopt=NONE
  240. no_recursion=
  241. prefix=NONE
  242. program_prefix=NONE
  243. program_suffix=NONE
  244. program_transform_name=s,x,x,
  245. silent=
  246. site=
  247. srcdir=
  248. target=NONE
  249. verbose=
  250. x_includes=NONE
  251. x_libraries=NONE
  252. bindir='${exec_prefix}/bin'
  253. sbindir='${exec_prefix}/sbin'
  254. libexecdir='${exec_prefix}/libexec'
  255. datadir='${prefix}/share'
  256. sysconfdir='${prefix}/etc'
  257. sharedstatedir='${prefix}/com'
  258. localstatedir='${prefix}/var'
  259. libdir='${exec_prefix}/lib'
  260. includedir='${prefix}/include'
  261. oldincludedir='/usr/include'
  262. infodir='${prefix}/info'
  263. mandir='${prefix}/man'
  264. # Initialize some other variables.
  265. subdirs=
  266. MFLAGS= MAKEFLAGS=
  267. SHELL=${CONFIG_SHELL-/bin/sh}
  268. # Maximum number of lines to put in a shell here document.
  269. ac_max_here_lines=12
  270. ac_prev=
  271. for ac_option
  272. do
  273. # If the previous option needs an argument, assign it.
  274. if test -n "$ac_prev"; then
  275. eval "$ac_prev=\$ac_option"
  276. ac_prev=
  277. continue
  278. fi
  279. case "$ac_option" in
  280. -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  281. *) ac_optarg= ;;
  282. esac
  283. # Accept the important Cygnus configure options, so we can diagnose typos.
  284. case "$ac_option" in
  285. -bindir | --bindir | --bindi | --bind | --bin | --bi)
  286. ac_prev=bindir ;;
  287. -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  288. bindir="$ac_optarg" ;;
  289. -build | --build | --buil | --bui | --bu)
  290. ac_prev=build ;;
  291. -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  292. build="$ac_optarg" ;;
  293. -cache-file | --cache-file | --cache-fil | --cache-fi \
  294. | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  295. ac_prev=cache_file ;;
  296. -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  297. | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  298. cache_file="$ac_optarg" ;;
  299. -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  300. ac_prev=datadir ;;
  301. -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  302. | --da=*)
  303. datadir="$ac_optarg" ;;
  304. -disable-* | --disable-*)
  305. ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  306. # Reject names that are not valid shell variable names.
  307. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  308. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  309. fi
  310. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  311. eval "enable_${ac_feature}=no" ;;
  312. -enable-* | --enable-*)
  313. ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  314. # Reject names that are not valid shell variable names.
  315. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  316. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  317. fi
  318. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  319. case "$ac_option" in
  320. *=*) ;;
  321. *) ac_optarg=yes ;;
  322. esac
  323. eval "enable_${ac_feature}='$ac_optarg'" ;;
  324. -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  325. | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  326. | --exec | --exe | --ex)
  327. ac_prev=exec_prefix ;;
  328. -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  329. | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  330. | --exec=* | --exe=* | --ex=*)
  331. exec_prefix="$ac_optarg" ;;
  332. -gas | --gas | --ga | --g)
  333. # Obsolete; use --with-gas.
  334. with_gas=yes ;;
  335. -help | --help | --hel | --he)
  336. # Omit some internal or obsolete options to make the list less imposing.
  337. # This message is too long to be a string in the A/UX 3.1 sh.
  338. cat << EOF
  339. Usage: configure [options] [host]
  340. Options: [defaults in brackets after descriptions]
  341. Configuration:
  342. --cache-file=FILE cache test results in FILE
  343. --help print this message
  344. --no-create do not create output files
  345. --quiet, --silent do not print \`checking...' messages
  346. --version print the version of autoconf that created configure
  347. Directory and file names:
  348. --prefix=PREFIX install architecture-independent files in PREFIX
  349. [$ac_default_prefix]
  350. --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
  351. [same as prefix]
  352. --bindir=DIR user executables in DIR [EPREFIX/bin]
  353. --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
  354. --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
  355. --datadir=DIR read-only architecture-independent data in DIR
  356. [PREFIX/share]
  357. --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
  358. --sharedstatedir=DIR modifiable architecture-independent data in DIR
  359. [PREFIX/com]
  360. --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
  361. --libdir=DIR object code libraries in DIR [EPREFIX/lib]
  362. --includedir=DIR C header files in DIR [PREFIX/include]
  363. --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
  364. --infodir=DIR info documentation in DIR [PREFIX/info]
  365. --mandir=DIR man documentation in DIR [PREFIX/man]
  366. --srcdir=DIR find the sources in DIR [configure dir or ..]
  367. --program-prefix=PREFIX prepend PREFIX to installed program names
  368. --program-suffix=SUFFIX append SUFFIX to installed program names
  369. --program-transform-name=PROGRAM
  370. run sed PROGRAM on installed program names
  371. EOF
  372. cat << EOF
  373. Host type:
  374. --build=BUILD configure for building on BUILD [BUILD=HOST]
  375. --host=HOST configure for HOST [guessed]
  376. --target=TARGET configure for TARGET [TARGET=HOST]
  377. Features and packages:
  378. --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
  379. --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
  380. --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
  381. --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
  382. --x-includes=DIR X include files are in DIR
  383. --x-libraries=DIR X library files are in DIR
  384. EOF
  385. if test -n "$ac_help"; then
  386. echo "--enable and --with options recognized:$ac_help"
  387. fi
  388. exit 0 ;;
  389. -host | --host | --hos | --ho)
  390. ac_prev=host ;;
  391. -host=* | --host=* | --hos=* | --ho=*)
  392. host="$ac_optarg" ;;
  393. -includedir | --includedir | --includedi | --included | --include \
  394. | --includ | --inclu | --incl | --inc)
  395. ac_prev=includedir ;;
  396. -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  397. | --includ=* | --inclu=* | --incl=* | --inc=*)
  398. includedir="$ac_optarg" ;;
  399. -infodir | --infodir | --infodi | --infod | --info | --inf)
  400. ac_prev=infodir ;;
  401. -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  402. infodir="$ac_optarg" ;;
  403. -libdir | --libdir | --libdi | --libd)
  404. ac_prev=libdir ;;
  405. -libdir=* | --libdir=* | --libdi=* | --libd=*)
  406. libdir="$ac_optarg" ;;
  407. -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  408. | --libexe | --libex | --libe)
  409. ac_prev=libexecdir ;;
  410. -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  411. | --libexe=* | --libex=* | --libe=*)
  412. libexecdir="$ac_optarg" ;;
  413. -localstatedir | --localstatedir | --localstatedi | --localstated \
  414. | --localstate | --localstat | --localsta | --localst \
  415. | --locals | --local | --loca | --loc | --lo)
  416. ac_prev=localstatedir ;;
  417. -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  418. | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  419. | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  420. localstatedir="$ac_optarg" ;;
  421. -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  422. ac_prev=mandir ;;
  423. -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  424. mandir="$ac_optarg" ;;
  425. -nfp | --nfp | --nf)
  426. # Obsolete; use --without-fp.
  427. with_fp=no ;;
  428. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  429. | --no-cr | --no-c)
  430. no_create=yes ;;
  431. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  432. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  433. no_recursion=yes ;;
  434. -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  435. | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  436. | --oldin | --oldi | --old | --ol | --o)
  437. ac_prev=oldincludedir ;;
  438. -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  439. | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  440. | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  441. oldincludedir="$ac_optarg" ;;
  442. -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  443. ac_prev=prefix ;;
  444. -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  445. prefix="$ac_optarg" ;;
  446. -program-prefix | --program-prefix | --program-prefi | --program-pref \
  447. | --program-pre | --program-pr | --program-p)
  448. ac_prev=program_prefix ;;
  449. -program-prefix=* | --program-prefix=* | --program-prefi=* \
  450. | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  451. program_prefix="$ac_optarg" ;;
  452. -program-suffix | --program-suffix | --program-suffi | --program-suff \
  453. | --program-suf | --program-su | --program-s)
  454. ac_prev=program_suffix ;;
  455. -program-suffix=* | --program-suffix=* | --program-suffi=* \
  456. | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  457. program_suffix="$ac_optarg" ;;
  458. -program-transform-name | --program-transform-name \
  459. | --program-transform-nam | --program-transform-na \
  460. | --program-transform-n | --program-transform- \
  461. | --program-transform | --program-transfor \
  462. | --program-transfo | --program-transf \
  463. | --program-trans | --program-tran \
  464. | --progr-tra | --program-tr | --program-t)
  465. ac_prev=program_transform_name ;;
  466. -program-transform-name=* | --program-transform-name=* \
  467. | --program-transform-nam=* | --program-transform-na=* \
  468. | --program-transform-n=* | --program-transform-=* \
  469. | --program-transform=* | --program-transfor=* \
  470. | --program-transfo=* | --program-transf=* \
  471. | --program-trans=* | --program-tran=* \
  472. | --progr-tra=* | --program-tr=* | --program-t=*)
  473. program_transform_name="$ac_optarg" ;;
  474. -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  475. | -silent | --silent | --silen | --sile | --sil)
  476. silent=yes ;;
  477. -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  478. ac_prev=sbindir ;;
  479. -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  480. | --sbi=* | --sb=*)
  481. sbindir="$ac_optarg" ;;
  482. -sharedstatedir | --sharedstatedir | --sharedstatedi \
  483. | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  484. | --sharedst | --shareds | --shared | --share | --shar \
  485. | --sha | --sh)
  486. ac_prev=sharedstatedir ;;
  487. -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  488. | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  489. | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  490. | --sha=* | --sh=*)
  491. sharedstatedir="$ac_optarg" ;;
  492. -site | --site | --sit)
  493. ac_prev=site ;;
  494. -site=* | --site=* | --sit=*)
  495. site="$ac_optarg" ;;
  496. -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  497. ac_prev=srcdir ;;
  498. -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  499. srcdir="$ac_optarg" ;;
  500. -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  501. | --syscon | --sysco | --sysc | --sys | --sy)
  502. ac_prev=sysconfdir ;;
  503. -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  504. | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  505. sysconfdir="$ac_optarg" ;;
  506. -target | --target | --targe | --targ | --tar | --ta | --t)
  507. ac_prev=target ;;
  508. -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  509. target="$ac_optarg" ;;
  510. -v | -verbose | --verbose | --verbos | --verbo | --verb)
  511. verbose=yes ;;
  512. -version | --version | --versio | --versi | --vers)
  513. echo "configure generated by autoconf version 2.13"
  514. exit 0 ;;
  515. -with-* | --with-*)
  516. ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  517. # Reject names that are not valid shell variable names.
  518. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  519. { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  520. fi
  521. ac_package=`echo $ac_package| sed 's/-/_/g'`
  522. case "$ac_option" in
  523. *=*) ;;
  524. *) ac_optarg=yes ;;
  525. esac
  526. eval "with_${ac_package}='$ac_optarg'" ;;
  527. -without-* | --without-*)
  528. ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  529. # Reject names that are not valid shell variable names.
  530. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  531. { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  532. fi
  533. ac_package=`echo $ac_package| sed 's/-/_/g'`
  534. eval "with_${ac_package}=no" ;;
  535. --x)
  536. # Obsolete; use --with-x.
  537. with_x=yes ;;
  538. -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  539. | --x-incl | --x-inc | --x-in | --x-i)
  540. ac_prev=x_includes ;;
  541. -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  542. | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  543. x_includes="$ac_optarg" ;;
  544. -x-libraries | --x-libraries | --x-librarie | --x-librari \
  545. | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  546. ac_prev=x_libraries ;;
  547. -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  548. | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  549. x_libraries="$ac_optarg" ;;
  550. -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  551. ;;
  552. *)
  553. if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  554. echo "configure: warning: $ac_option: invalid host type" 1>&2
  555. fi
  556. if test "x$nonopt" != xNONE; then
  557. { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  558. fi
  559. nonopt="$ac_option"
  560. ;;
  561. esac
  562. done
  563. if test -n "$ac_prev"; then
  564. { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  565. fi
  566. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  567. # File descriptor usage:
  568. # 0 standard input
  569. # 1 file creation
  570. # 2 errors and warnings
  571. # 3 some systems may open it to /dev/tty
  572. # 4 used on the Kubota Titan
  573. # 6 checking for... messages and results
  574. # 5 compiler messages saved in config.log
  575. if test "$silent" = yes; then
  576. exec 6>/dev/null
  577. else
  578. exec 6>&1
  579. fi
  580. exec 5>./config.log
  581. echo "\
  582. This file contains any messages produced by compilers while
  583. running configure, to aid debugging if configure makes a mistake.
  584. " 1>&5
  585. # Strip out --no-create and --no-recursion so they do not pile up.
  586. # Also quote any args containing shell metacharacters.
  587. ac_configure_args=
  588. for ac_arg
  589. do
  590. case "$ac_arg" in
  591. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  592. | --no-cr | --no-c) ;;
  593. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  594. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  595. *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  596. ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  597. *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  598. esac
  599. done
  600. # NLS nuisances.
  601. # Only set these to C if already set. These must not be set unconditionally
  602. # because not all systems understand e.g. LANG=C (notably SCO).
  603. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  604. # Non-C LC_CTYPE values break the ctype check.
  605. if test "${LANG+set}" = set; then LANG=C; export LANG; fi
  606. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  607. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  608. if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
  609. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  610. rm -rf conftest* confdefs.h
  611. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  612. echo > confdefs.h
  613. # A filename unique to this package, relative to the directory that
  614. # configure is in, which we can look for to find out if srcdir is correct.
  615. ac_unique_file=configure.in
  616. # Find the source files, if location was not specified.
  617. if test -z "$srcdir"; then
  618. ac_srcdir_defaulted=yes
  619. # Try the directory containing this script, then its parent.
  620. ac_prog=$0
  621. ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  622. test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  623. srcdir=$ac_confdir
  624. if test ! -r $srcdir/$ac_unique_file; then
  625. srcdir=..
  626. fi
  627. else
  628. ac_srcdir_defaulted=no
  629. fi
  630. if test ! -r $srcdir/$ac_unique_file; then
  631. if test "$ac_srcdir_defaulted" = yes; then
  632. { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  633. else
  634. { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  635. fi
  636. fi
  637. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  638. # Prefer explicitly selected file to automatically selected ones.
  639. if test -z "$CONFIG_SITE"; then
  640. if test "x$prefix" != xNONE; then
  641. CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  642. else
  643. CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  644. fi
  645. fi
  646. for ac_site_file in $CONFIG_SITE; do
  647. if test -r "$ac_site_file"; then
  648. echo "loading site script $ac_site_file"
  649. . "$ac_site_file"
  650. fi
  651. done
  652. ac_ext=c
  653. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  654. ac_cpp='$CPP $CPPFLAGS'
  655. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  656. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  657. cross_compiling=$ac_cv_prog_cc_cross
  658. ac_exeext=
  659. ac_objext=o
  660. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  661. # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  662. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  663. ac_n= ac_c='
  664. ' ac_t=' '
  665. else
  666. ac_n=-n ac_c= ac_t=
  667. fi
  668. else
  669. ac_n= ac_c='\c' ac_t=
  670. fi
  671. ac_aux_dir=
  672. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  673. if test -f $ac_dir/install-sh; then
  674. ac_aux_dir=$ac_dir
  675. ac_install_sh="$ac_aux_dir/install-sh -c"
  676. break
  677. elif test -f $ac_dir/install.sh; then
  678. ac_aux_dir=$ac_dir
  679. ac_install_sh="$ac_aux_dir/install.sh -c"
  680. break
  681. fi
  682. done
  683. if test -z "$ac_aux_dir"; then
  684. { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  685. fi
  686. ac_config_guess=$ac_aux_dir/config.guess
  687. ac_config_sub=$ac_aux_dir/config.sub
  688. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  689. # Make sure we can run config.sub.
  690. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
  691. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  692. fi
  693. echo $ac_n "checking host system type""... $ac_c" 1>&6
  694. echo "configure:766: checking host system type" >&5
  695. host_alias=$host
  696. case "$host_alias" in
  697. NONE)
  698. case $nonopt in
  699. NONE)
  700. if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
  701. else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  702. fi ;;
  703. *) host_alias=$nonopt ;;
  704. esac ;;
  705. esac
  706. host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
  707. host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  708. host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  709. host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  710. echo "$ac_t""$host" 1>&6
  711. # Extract the first word of "gcc", so it can be a program name with args.
  712. set dummy gcc; ac_word=$2
  713. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  714. echo "configure:789: checking for $ac_word" >&5
  715. if test -n "$CC"; then
  716. ac_cv_prog_CC="$CC" # Let the user override the test.
  717. else
  718. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  719. ac_dummy="$PATH"
  720. for ac_dir in $ac_dummy; do
  721. test -z "$ac_dir" && ac_dir=.
  722. if test -f $ac_dir/$ac_word; then
  723. ac_cv_prog_CC="gcc"
  724. break
  725. fi
  726. done
  727. IFS="$ac_save_ifs"
  728. fi
  729. CC="$ac_cv_prog_CC"
  730. if test -n "$CC"; then
  731. echo "$ac_t""$CC" 1>&6
  732. else
  733. echo "$ac_t""no" 1>&6
  734. fi
  735. if test -z "$CC"; then
  736. # Extract the first word of "cc", so it can be a program name with args.
  737. set dummy cc; ac_word=$2
  738. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  739. echo "configure:816: checking for $ac_word" >&5
  740. if test -n "$CC"; then
  741. ac_cv_prog_CC="$CC" # Let the user override the test.
  742. else
  743. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  744. ac_prog_rejected=no
  745. ac_dummy="$PATH"
  746. for ac_dir in $ac_dummy; do
  747. test -z "$ac_dir" && ac_dir=.
  748. if test -f $ac_dir/$ac_word; then
  749. if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  750. ac_prog_rejected=yes
  751. continue
  752. fi
  753. ac_cv_prog_CC="cc"
  754. break
  755. fi
  756. done
  757. IFS="$ac_save_ifs"
  758. if test $ac_prog_rejected = yes; then
  759. # We found a bogon in the path, so make sure we never use it.
  760. set dummy $ac_cv_prog_CC
  761. shift
  762. if test $# -gt 0; then
  763. # We chose a different compiler from the bogus one.
  764. # However, it has the same basename, so the bogon will be chosen
  765. # first if we set CC to just the basename; use the full file name.
  766. shift
  767. set dummy "$ac_dir/$ac_word" "$@"
  768. shift
  769. ac_cv_prog_CC="$@"
  770. fi
  771. fi
  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. if test -z "$CC"; then
  780. case "`uname -s`" in
  781. *win32* | *WIN32*)
  782. # Extract the first word of "cl", so it can be a program name with args.
  783. set dummy cl; ac_word=$2
  784. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  785. echo "configure:864: checking for $ac_word" >&5
  786. if test -n "$CC"; then
  787. ac_cv_prog_CC="$CC" # Let the user override the test.
  788. else
  789. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  790. ac_dummy="$PATH"
  791. for ac_dir in $ac_dummy; do
  792. test -z "$ac_dir" && ac_dir=.
  793. if test -f $ac_dir/$ac_word; then
  794. ac_cv_prog_CC="cl"
  795. break
  796. fi
  797. done
  798. IFS="$ac_save_ifs"
  799. fi
  800. CC="$ac_cv_prog_CC"
  801. if test -n "$CC"; then
  802. echo "$ac_t""$CC" 1>&6
  803. else
  804. echo "$ac_t""no" 1>&6
  805. fi
  806. ;;
  807. esac
  808. fi
  809. test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  810. fi
  811. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  812. echo "configure:893: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  813. ac_ext=c
  814. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  815. ac_cpp='$CPP $CPPFLAGS'
  816. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  817. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  818. cross_compiling=$ac_cv_prog_cc_cross
  819. cat > conftest.$ac_ext << EOF
  820. #line 904 "configure"
  821. #include "confdefs.h"
  822. main(){return(0);}
  823. EOF
  824. if { (eval echo configure:909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  825. ac_cv_prog_cc_works=yes
  826. # If we can't run a trivial program, we are probably using a cross compiler.
  827. if (./conftest; exit) 2>/dev/null; then
  828. ac_cv_prog_cc_cross=no
  829. else
  830. ac_cv_prog_cc_cross=yes
  831. fi
  832. else
  833. echo "configure: failed program was:" >&5
  834. cat conftest.$ac_ext >&5
  835. ac_cv_prog_cc_works=no
  836. fi
  837. rm -fr conftest*
  838. ac_ext=c
  839. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  840. ac_cpp='$CPP $CPPFLAGS'
  841. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  842. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  843. cross_compiling=$ac_cv_prog_cc_cross
  844. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  845. if test $ac_cv_prog_cc_works = no; then
  846. { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  847. fi
  848. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  849. echo "configure:935: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  850. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  851. cross_compiling=$ac_cv_prog_cc_cross
  852. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  853. echo "configure:940: checking whether we are using GNU C" >&5
  854. cat > conftest.c <<EOF
  855. #ifdef __GNUC__
  856. yes;
  857. #endif
  858. EOF
  859. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  860. ac_cv_prog_gcc=yes
  861. else
  862. ac_cv_prog_gcc=no
  863. fi
  864. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  865. if test $ac_cv_prog_gcc = yes; then
  866. GCC=yes
  867. else
  868. GCC=
  869. fi
  870. ac_test_CFLAGS="${CFLAGS+set}"
  871. ac_save_CFLAGS="$CFLAGS"
  872. CFLAGS=
  873. echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  874. echo "configure:965: checking whether ${CC-cc} accepts -g" >&5
  875. echo 'void f(){}' > conftest.c
  876. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  877. ac_cv_prog_cc_g=yes
  878. else
  879. ac_cv_prog_cc_g=no
  880. fi
  881. rm -f conftest*
  882. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  883. if test "$ac_test_CFLAGS" = set; then
  884. CFLAGS="$ac_save_CFLAGS"
  885. elif test $ac_cv_prog_cc_g = yes; then
  886. if test "$GCC" = yes; then
  887. CFLAGS="-g -O2"
  888. else
  889. CFLAGS="-g"
  890. fi
  891. else
  892. if test "$GCC" = yes; then
  893. CFLAGS="-O2"
  894. else
  895. CFLAGS=
  896. fi
  897. fi
  898. echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
  899. echo "configure:994: checking for Cygwin environment" >&5
  900. cat > conftest.$ac_ext <<EOF
  901. #line 997 "configure"
  902. #include "confdefs.h"
  903. int main() {
  904. #ifndef __CYGWIN__
  905. #define __CYGWIN__ __CYGWIN32__
  906. #endif
  907. return __CYGWIN__;
  908. ; return 0; }
  909. EOF
  910. if { (eval echo configure:1008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  911. rm -rf conftest*
  912. ac_cv_cygwin=yes
  913. else
  914. echo "configure: failed program was:" >&5
  915. cat conftest.$ac_ext >&5
  916. rm -rf conftest*
  917. ac_cv_cygwin=no
  918. fi
  919. rm -f conftest*
  920. rm -f conftest*
  921. echo "$ac_t""$ac_cv_cygwin" 1>&6
  922. CYGWIN=
  923. test "$ac_cv_cygwin" = yes && CYGWIN=yes
  924. echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
  925. echo "configure:1024: checking for mingw32 environment" >&5
  926. cat > conftest.$ac_ext <<EOF
  927. #line 1027 "configure"
  928. #include "confdefs.h"
  929. int main() {
  930. return __MINGW32__;
  931. ; return 0; }
  932. EOF
  933. if { (eval echo configure:1034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  934. rm -rf conftest*
  935. ac_cv_mingw32=yes
  936. else
  937. echo "configure: failed program was:" >&5
  938. cat conftest.$ac_ext >&5
  939. rm -rf conftest*
  940. ac_cv_mingw32=no
  941. fi
  942. rm -f conftest*
  943. rm -f conftest*
  944. echo "$ac_t""$ac_cv_mingw32" 1>&6
  945. MINGW32=
  946. test "$ac_cv_mingw32" = yes && MINGW32=yes
  947. echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
  948. echo "configure:1052: checking for executable suffix" >&5
  949. if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
  950. ac_cv_exeext=.exe
  951. else
  952. ac_cv_exeext=no
  953. fi
  954. EXEEXT=""
  955. test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
  956. echo "$ac_t""${ac_cv_exeext}" 1>&6
  957. ac_exeext=$EXEEXT
  958. # Check for full floating-point support, including Infinity and NaN
  959. IEEEFLAG=
  960. echo $ac_n "checking for full floating-point support""... $ac_c" 1>&6
  961. echo "configure:1071: checking for full floating-point support" >&5
  962. if test "$cross_compiling" = yes; then
  963. echo "$ac_t""unknown (cross-compiling)" 1>&6
  964. echo $ac_n "checking whether "cc -mieee" works""... $ac_c" 1>&6
  965. echo "configure:1076: checking whether "cc -mieee" works" >&5
  966. ac_save_cflags=${CFLAGS}
  967. CFLAGS="$CFLAGS -mieee"
  968. cat > conftest.$ac_ext <<EOF
  969. #line 1080 "configure"
  970. #include "confdefs.h"
  971. int main() {
  972. ; return 0; }
  973. EOF
  974. if { (eval echo configure:1087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  975. rm -rf conftest*
  976. echo "$ac_t""yes" 1>&6
  977. IEEEFLAG="-mieee"
  978. else
  979. echo "configure: failed program was:" >&5
  980. cat conftest.$ac_ext >&5
  981. rm -rf conftest*
  982. echo "$ac_t""no" 1>&6
  983. fi
  984. rm -f conftest*
  985. CFLAGS=${ac_save_cflags}
  986. else
  987. cat > conftest.$ac_ext <<EOF
  988. #line 1103 "configure"
  989. #include "confdefs.h"
  990. #include <float.h>
  991. int main(void) {
  992. double one = 1.0;
  993. double zero = 0.0;
  994. if (one/zero > DBL_MAX) /* infinity */
  995. if (zero/zero != zero/zero) /* NaN */
  996. return 0;
  997. return 1;
  998. }
  999. EOF
  1000. if { (eval echo configure:1117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1001. then
  1002. echo "$ac_t""yes" 1>&6
  1003. else
  1004. echo "configure: failed program was:" >&5
  1005. cat conftest.$ac_ext >&5
  1006. rm -fr conftest*
  1007. echo "$ac_t""no" 1>&6
  1008. ac_save_cflags=${CFLAGS}
  1009. CFLAGS=-mieee
  1010. echo $ac_n "checking for full floating-point support with -mieee""... $ac_c" 1>&6
  1011. echo "configure:1130: checking for full floating-point support with -mieee" >&5
  1012. if test "$cross_compiling" = yes; then
  1013. echo "$ac_t""unknown (cross-compiling)" 1>&6
  1014. { echo "configure: error: *** INTERNAL CONFIGURE ERROR" 1>&2; exit 1; }
  1015. else
  1016. cat > conftest.$ac_ext <<EOF
  1017. #line 1137 "configure"
  1018. #include "confdefs.h"
  1019. #include <float.h>
  1020. int main(void) {
  1021. double one = 1.0;
  1022. double zero = 0.0;
  1023. if (one/zero > DBL_MAX) /* infinity */
  1024. if (zero/zero != zero/zero) /* NaN */
  1025. return 0;
  1026. return 1;
  1027. }
  1028. EOF
  1029. if { (eval echo configure:1151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1030. then
  1031. echo "$ac_t""yes" 1>&6
  1032. IEEEFLAG="-mieee"
  1033. else
  1034. echo "configure: failed program was:" >&5
  1035. cat conftest.$ac_ext >&5
  1036. rm -fr conftest*
  1037. echo "$ac_t""no" 1>&6
  1038. echo "configure: warning: *** Incomplete floating-point support." 1>&2
  1039. fi
  1040. rm -fr conftest*
  1041. fi
  1042. CFLAGS=${ac_save_cflags}
  1043. fi
  1044. rm -fr conftest*
  1045. fi
  1046. CFLAGS="$CFLAGS $IEEEFLAG"
  1047. # Set BINDIR
  1048. if test -n "${bindir}"; then
  1049. BINDIR="${bindir}"
  1050. else
  1051. BINDIR=/usr/local/bin
  1052. fi
  1053. # Set SRCDIR and DSTDIR
  1054. # Extract the first word of "pwd", so it can be a program name with args.
  1055. set dummy pwd; ac_word=$2
  1056. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1057. echo "configure:1188: checking for $ac_word" >&5
  1058. case "$pwd" in
  1059. /*)
  1060. ac_cv_path_pwd="$pwd" # Let the user override the test with a path.
  1061. ;;
  1062. ?:/*)
  1063. ac_cv_path_pwd="$pwd" # Let the user override the test with a dos path.
  1064. ;;
  1065. *)
  1066. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1067. ac_dummy="$PATH"
  1068. for ac_dir in $ac_dummy; do
  1069. test -z "$ac_dir" && ac_dir=.
  1070. if test -f $ac_dir/$ac_word; then
  1071. ac_cv_path_pwd="$ac_dir/$ac_word"
  1072. break
  1073. fi
  1074. done
  1075. IFS="$ac_save_ifs"
  1076. test -z "$ac_cv_path_pwd" && ac_cv_path_pwd="pwd"
  1077. ;;
  1078. esac
  1079. pwd="$ac_cv_path_pwd"
  1080. if test -n "$pwd"; then
  1081. echo "$ac_t""$pwd" 1>&6
  1082. else
  1083. echo "$ac_t""no" 1>&6
  1084. fi
  1085. if test "$MINGW32" = yes ; then
  1086. winpwd="pwd -W"
  1087. else
  1088. winpwd="$pwd"
  1089. fi
  1090. echo $ac_n "checking for source directory""... $ac_c" 1>&6
  1091. echo "configure:1226: checking for source directory" >&5
  1092. if test -z "$srcdir" ; then
  1093. SRCDIR=`$pwd`
  1094. else
  1095. SRCDIR=`(cd "$srcdir" ; $pwd)`
  1096. fi
  1097. echo "$ac_t"""$SRCDIR"" 1>&6
  1098. echo $ac_n "checking for build directory""... $ac_c" 1>&6
  1099. echo "configure:1237: checking for build directory" >&5
  1100. DSTDIR=`$pwd`
  1101. WINDSTDIR=`$winpwd`
  1102. echo "$ac_t"""$DSTDIR"" 1>&6
  1103. # Set ARCH
  1104. ARCH=
  1105. if test -z "${host}"; then
  1106. ARCH="unknown"
  1107. else
  1108. ARCH="${host}"
  1109. fi
  1110. # Use absolute path for aux directory so that install-sh works
  1111. ac_aux_dir=
  1112. for ac_dir in "$SRCDIR" $srcdir/"$SRCDIR"; do
  1113. if test -f $ac_dir/install-sh; then
  1114. ac_aux_dir=$ac_dir
  1115. ac_install_sh="$ac_aux_dir/install-sh -c"
  1116. break
  1117. elif test -f $ac_dir/install.sh; then
  1118. ac_aux_dir=$ac_dir
  1119. ac_install_sh="$ac_aux_dir/install.sh -c"
  1120. break
  1121. fi
  1122. done
  1123. if test -z "$ac_aux_dir"; then
  1124. { echo "configure: error: can not find install-sh or install.sh in "$SRCDIR" $srcdir/"$SRCDIR"" 1>&2; exit 1; }
  1125. fi
  1126. ac_config_guess=$ac_aux_dir/config.guess
  1127. ac_config_sub=$ac_aux_dir/config.sub
  1128. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  1129. # Set GISBASE and GRASS_BIN
  1130. GISBASE="${WINDSTDIR}/dist.${ARCH}"
  1131. GRASS_BIN="${DSTDIR}/bin.${ARCH}"
  1132. # Set GRASS_VERSION_*
  1133. GRASS_VERSION_FILE=include/VERSION
  1134. GRASS_VERSION_MAJOR=`sed -n 1p "${GRASS_VERSION_FILE}"`
  1135. GRASS_VERSION_MINOR=`sed -n 2p "${GRASS_VERSION_FILE}"`
  1136. GRASS_VERSION_RELEASE=`sed -n 3p "${GRASS_VERSION_FILE}"`
  1137. GRASS_VERSION_DATE=`sed -n 4p "${GRASS_VERSION_FILE}"`
  1138. GRASS_VERSION_NUMBER=`echo ${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}`
  1139. NAME_VER=`echo ${GRASS_VERSION_NUMBER} | sed 's/\..*//'`
  1140. LIB_VER=`echo ${GRASS_VERSION_NUMBER} | sed 's/^\([0-9.]*\).*$/\1/'`
  1141. GRASS_VERSION_SVN="exported"
  1142. # Extract the first word of "svnversion", so it can be a program name with args.
  1143. set dummy svnversion; ac_word=$2
  1144. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1145. echo "configure:1305: checking for $ac_word" >&5
  1146. case "$SVN_VERSION" in
  1147. /*)
  1148. ac_cv_path_SVN_VERSION="$SVN_VERSION" # Let the user override the test with a path.
  1149. ;;
  1150. ?:/*)
  1151. ac_cv_path_SVN_VERSION="$SVN_VERSION" # Let the user override the test with a dos path.
  1152. ;;
  1153. *)
  1154. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1155. ac_dummy="$PATH"
  1156. for ac_dir in $ac_dummy; do
  1157. test -z "$ac_dir" && ac_dir=.
  1158. if test -f $ac_dir/$ac_word; then
  1159. ac_cv_path_SVN_VERSION="$ac_dir/$ac_word"
  1160. break
  1161. fi
  1162. done
  1163. IFS="$ac_save_ifs"
  1164. test -z "$ac_cv_path_SVN_VERSION" && ac_cv_path_SVN_VERSION="no"
  1165. ;;
  1166. esac
  1167. SVN_VERSION="$ac_cv_path_SVN_VERSION"
  1168. if test -n "$SVN_VERSION"; then
  1169. echo "$ac_t""$SVN_VERSION" 1>&6
  1170. else
  1171. echo "$ac_t""no" 1>&6
  1172. fi
  1173. if test "$SVN_VERSION" != "no" ; then
  1174. GRASS_VERSION_SVN=`$SVN_VERSION -c | cut -f2 -d:`
  1175. if test "$GRASS_VERSION_SVN" = "exported" -o "$GRASS_VERSION_SVN" = "Unversioned directory" ; then
  1176. GRASS_VERSION_SVN="exported"
  1177. else
  1178. GRASS_VERSION_SVN="r$GRASS_VERSION_SVN"
  1179. fi
  1180. fi
  1181. # Check for MacOSX App
  1182. # Check whether --enable-macosx-app or --disable-macosx-app was given.
  1183. if test "${enable_macosx_app+set}" = set; then
  1184. enableval="$enable_macosx_app"
  1185. :
  1186. else
  1187. enable_macosx_app=no
  1188. fi
  1189. echo $ac_n "checking for MacOSX App""... $ac_c" 1>&6
  1190. echo "configure:1366: checking for MacOSX App" >&5
  1191. case "$enable_macosx_app" in
  1192. yes) MACOSX_APP=1 ;;
  1193. no) MACOSX_APP= ;;
  1194. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  1195. esac
  1196. echo "$ac_t"""$enable_macosx_app"" 1>&6
  1197. # Check for MacOSX archs
  1198. echo $ac_n "checking for MacOSX architectures""... $ac_c" 1>&6
  1199. echo "configure:1378: checking for MacOSX architectures" >&5
  1200. MACOSX_ARCHS=
  1201. if test -z "$with_macosx_archs" ; then
  1202. echo "$ac_t""no" 1>&6
  1203. else
  1204. for a in $with_macosx_archs
  1205. do
  1206. # check if valid arch?
  1207. case "$a" in
  1208. i386|ppc|x86_64|ppc64)
  1209. MACOSX_ARCHS="$MACOSX_ARCHS -arch $a"
  1210. ;;
  1211. esac
  1212. done
  1213. echo "$ac_t""$MACOSX_ARCHS" 1>&6
  1214. LDFLAGS="$LDFLAGS $MACOSX_ARCHS"
  1215. CFLAGS="$CFLAGS $MACOSX_ARCHS"
  1216. CXXFLAGS="$CXXFLAGS $MACOSX_ARCHS"
  1217. fi
  1218. # Done checking MacOSX archs
  1219. # Check for MacOSX SDK
  1220. echo $ac_n "checking for MacOSX SDK""... $ac_c" 1>&6
  1221. echo "configure:1407: checking for MacOSX SDK" >&5
  1222. MACOSX_SDK=
  1223. if test -z "$with_macosx_sdk" ; then
  1224. echo "$ac_t""no" 1>&6
  1225. else
  1226. ac_safe=`echo "$with_macosx_sdk/SDKSettings.plist" | sed 'y%./+-%__p_%'`
  1227. echo $ac_n "checking for $with_macosx_sdk/SDKSettings.plist""... $ac_c" 1>&6
  1228. echo "configure:1417: checking for $with_macosx_sdk/SDKSettings.plist" >&5
  1229. if test "$cross_compiling" = yes; then
  1230. { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
  1231. else
  1232. if test -r $with_macosx_sdk/SDKSettings.plist; then
  1233. eval "ac_cv_file_$ac_safe=yes"
  1234. else
  1235. eval "ac_cv_file_$ac_safe=no"
  1236. fi
  1237. fi
  1238. if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
  1239. echo "$ac_t""yes" 1>&6
  1240. MACOSX_SDK="-isysroot $with_macosx_sdk"
  1241. else
  1242. echo "$ac_t""no" 1>&6
  1243. { echo "configure: error: *** specified SDK does not exist or is not a SDK" 1>&2; exit 1; }
  1244. fi
  1245. LDFLAGS="$LDFLAGS $MACOSX_SDK"
  1246. CFLAGS="$CFLAGS $MACOSX_SDK"
  1247. CXXFLAGS="$CXXFLAGS $MACOSX_SDK"
  1248. fi
  1249. # Done checking MacOSX SDK
  1250. # Set INST_DIR
  1251. if test -n "$MACOSX_APP" ; then
  1252. INSTDIR='${prefix}'"/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.app/Contents/MacOS"
  1253. else
  1254. INSTDIR='${prefix}'"/grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}"
  1255. fi
  1256. # Get flags for building shared libraries
  1257. echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
  1258. echo "configure:1461: checking how to build libraries" >&5
  1259. # Check whether --enable-shared or --disable-shared was given.
  1260. if test "${enable_shared+set}" = set; then
  1261. enableval="$enable_shared"
  1262. shared_ok=$enableval
  1263. else
  1264. shared_ok=yes
  1265. fi
  1266. if test "${enable_shared+set}" = set; then
  1267. enableval="$enable_shared"
  1268. shared_ok=$enableval
  1269. else
  1270. shared_ok=yes
  1271. fi
  1272. if test "$shared_ok" = "yes" ; then
  1273. echo "$ac_t""shared" 1>&6
  1274. SHARED_BUILD=1
  1275. GRASS_LIBRARY_TYPE='shlib'
  1276. else
  1277. echo "$ac_t""static" 1>&6
  1278. SHARED_BUILD=0
  1279. cat >> confdefs.h <<\EOF
  1280. #define STATIC_BUILD 1
  1281. EOF
  1282. GRASS_LIBRARY_TYPE='stlib'
  1283. fi
  1284. ac_save_ldflags="$LDFLAGS"
  1285. SHLIB_CFLAGS=""
  1286. SHLIB_LD_FLAGS=""
  1287. SHLIB_SUFFIX=""
  1288. SHLIB_LD=""
  1289. STLIB_LD='${AR} cr'
  1290. STLIB_SUFFIX='.a'
  1291. GRASS_TRIM_DOTS='`echo ${LIB_VER} | tr -d .`'
  1292. GRASS_LIB_VERSIONS_OK=ok
  1293. LDFLAGS=""
  1294. LD_SEARCH_FLAGS=""
  1295. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1296. case $host in
  1297. *-linux-* | *-gnu* | *-kfreebsd*-gnu)
  1298. SHLIB_CFLAGS="-fPIC"
  1299. SHLIB_LD_FLAGS="-Wl,-soname,\$(notdir \$@)"
  1300. SHLIB_SUFFIX=".so"
  1301. SHLIB_LD="${CC} -shared"
  1302. LDFLAGS="-Wl,--export-dynamic"
  1303. LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
  1304. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1305. ;;
  1306. *-pc-cygwin)
  1307. SHLIB_SUFFIX=".dll"
  1308. SHLIB_LD="${CC} -shared"
  1309. LDFLAGS="-Wl,--export-dynamic"
  1310. LD_LIBRARY_PATH_VAR="PATH"
  1311. ;;
  1312. *-pc-mingw32 | *-w64-mingw32 | *-pc-msys)
  1313. SHLIB_SUFFIX=".dll"
  1314. SHLIB_LD="${CC} -shared"
  1315. LDFLAGS="-Wl,--export-dynamic,--enable-runtime-pseudo-reloc"
  1316. LD_LIBRARY_PATH_VAR="PATH"
  1317. ;;
  1318. *-apple-darwin*)
  1319. SHLIB_CFLAGS="-fno-common"
  1320. SHLIB_SUFFIX=".dylib"
  1321. 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}"
  1322. LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
  1323. ;;
  1324. *-sun-solaris*)
  1325. # Note: If _REENTRANT isn't defined, then Solaris
  1326. # won't define thread-safe library routines.
  1327. cat >> confdefs.h <<\EOF
  1328. #define _REENTRANT 1
  1329. EOF
  1330. cat >> confdefs.h <<\EOF
  1331. #define _POSIX_PTHREAD_SEMANTICS 1
  1332. EOF
  1333. # Note: need the LIBS below, otherwise Tk won't find Tcl's
  1334. # symbols when dynamically loaded into tclsh.
  1335. if test "$GCC" = "yes" ; then
  1336. SHLIB_CFLAGS="-fPIC"
  1337. SHLIB_LD="$CC -shared"
  1338. LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  1339. else
  1340. SHLIB_CFLAGS="-KPIC"
  1341. SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  1342. LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  1343. fi
  1344. SHLIB_SUFFIX=".so"
  1345. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1346. ;;
  1347. *-solaris2*)
  1348. # Note: Solaris is as of 2010 Oracle Solaris, not Sun Solaris
  1349. # Oracle Solaris derives from Solaris 2
  1350. # derives from SunOS 5
  1351. # derives from UNIX System V Release 4
  1352. # Note: If _REENTRANT isn't defined, then Solaris
  1353. # won't define thread-safe library routines.
  1354. cat >> confdefs.h <<\EOF
  1355. #define _REENTRANT 1
  1356. EOF
  1357. cat >> confdefs.h <<\EOF
  1358. #define _POSIX_PTHREAD_SEMANTICS 1
  1359. EOF
  1360. # Note: need the LIBS below, otherwise Tk won't find Tcl's
  1361. # symbols when dynamically loaded into tclsh.
  1362. if test "$GCC" = "yes" ; then
  1363. SHLIB_CFLAGS="-fPIC"
  1364. SHLIB_LD="$CC -shared"
  1365. LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  1366. else
  1367. SHLIB_CFLAGS="-KPIC"
  1368. SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  1369. LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  1370. fi
  1371. SHLIB_SUFFIX=".so"
  1372. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1373. ;;
  1374. *-freebsd*)
  1375. # NOTE: only FreeBSD 4+ is supported
  1376. # FreeBSD 3.* and greater have ELF.
  1377. SHLIB_CFLAGS="-fPIC"
  1378. #SHLIB_LD="ld -Bshareable -x"
  1379. SHLIB_LD="${CC} -shared"
  1380. SHLIB_SUFFIX=".so"
  1381. LDFLAGS="-export-dynamic"
  1382. #LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  1383. LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
  1384. # TODO: add optional pthread support with any combination of:
  1385. # CFLAGS="$CFLAGS -pthread"
  1386. # LDFLAGS="$LDFLAGS -lpthread"
  1387. # AC_DEFINE(_REENTRANT)
  1388. # AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
  1389. ;;
  1390. *-netbsd*)
  1391. # NetBSD has ELF.
  1392. SHLIB_CFLAGS="-fPIC"
  1393. SHLIB_LD="${CC} -shared"
  1394. SHLIB_LD_LIBS="${LIBS}"
  1395. LDFLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -export-dynamic'
  1396. SHLIB_LD_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -export-dynamic'
  1397. LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -L${LIB_RUNTIME_DIR}'
  1398. # some older NetBSD versions do not handle version numbers with dots.
  1399. #STLIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
  1400. #SHLIB_SUFFIX='${GRASS_TRIM_DOTS}.so'
  1401. #GRASS_LIB_VERSIONS_OK=nodots
  1402. # NetBSD 6 does handle version numbers with dots.
  1403. STLIB_SUFFIX=".a"
  1404. SHLIB_SUFFIX=".so"
  1405. # TODO: add optional pthread support with any combination of:
  1406. # CFLAGS="$CFLAGS -pthread"
  1407. # LDFLAGS="$LDFLAGS -lpthread"
  1408. # AC_DEFINE(_REENTRANT)
  1409. # AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
  1410. ;;
  1411. *aix*)
  1412. # NOTE: do we need to support aix < 6 ?
  1413. LIBS="$LIBS -lc"
  1414. SHLIB_CFLAGS=""
  1415. LDFLAGS=""
  1416. if test "$GCC" = "yes" ; then
  1417. SHLIB_CFLAGS="-fPIC"
  1418. SHLIB_LD="$CC -shared"
  1419. LD_SEARCH_FLAGS='-Wl,-bsvr4,-R,${LIB_RUNTIME_DIR}'
  1420. else
  1421. # assume xlc
  1422. SHLIB_CFLAGS="-qmkshrobj"
  1423. SHLIB_LD="$CC -shared"
  1424. LD_SEARCH_FLAGS='-Wl,-bsvr4,-R,${LIB_RUNTIME_DIR}'
  1425. fi
  1426. SHLIB_SUFFIX=".so"
  1427. LD_LIBRARY_PATH_VAR="LIBPATH"
  1428. GRASS_NEEDS_EXP_FILE=1
  1429. GRASS_EXPORT_FILE_SUFFIX='${LIB_VER}.exp'
  1430. ;;
  1431. *)
  1432. { echo "configure: error: ***Unknown platform: $host***" 1>&2; exit 1; }
  1433. ;;
  1434. esac
  1435. LDFLAGS="${ac_save_ldflags} $LDFLAGS"
  1436. # Enable options
  1437. # Check whether --enable-w11 or --disable-w11 was given.
  1438. if test "${enable_w11+set}" = set; then
  1439. enableval="$enable_w11"
  1440. :
  1441. else
  1442. enable_w11=no
  1443. fi
  1444. # With options
  1445. # Check whether --with-cxx or --without-cxx was given.
  1446. if test "${with_cxx+set}" = set; then
  1447. withval="$with_cxx"
  1448. :
  1449. else
  1450. with_cxx=yes
  1451. fi
  1452. #LOC_ARG_WITH(g77, GNU Fortran 77, no)
  1453. # Check whether --with-macosx-archs or --without-macosx-archs was given.
  1454. if test "${with_macosx_archs+set}" = set; then
  1455. withval="$with_macosx_archs"
  1456. :
  1457. else
  1458. with_macosx_archs="no"
  1459. fi
  1460. # Check whether --with-macosx-sdk or --without-macosx-sdk was given.
  1461. if test "${with_macosx_sdk+set}" = set; then
  1462. withval="$with_macosx_sdk"
  1463. :
  1464. else
  1465. with_macosx_sdk="no"
  1466. fi
  1467. # Check whether --with-tiff or --without-tiff was given.
  1468. if test "${with_tiff+set}" = set; then
  1469. withval="$with_tiff"
  1470. :
  1471. else
  1472. with_tiff=yes
  1473. fi
  1474. # Check whether --with-png or --without-png was given.
  1475. if test "${with_png+set}" = set; then
  1476. withval="$with_png"
  1477. :
  1478. else
  1479. with_png=yes
  1480. fi
  1481. # Check whether --with-postgres or --without-postgres was given.
  1482. if test "${with_postgres+set}" = set; then
  1483. withval="$with_postgres"
  1484. :
  1485. else
  1486. with_postgres=no
  1487. fi
  1488. # Check whether --with-mysql or --without-mysql was given.
  1489. if test "${with_mysql+set}" = set; then
  1490. withval="$with_mysql"
  1491. :
  1492. else
  1493. with_mysql=no
  1494. fi
  1495. # Check whether --with-sqlite or --without-sqlite was given.
  1496. if test "${with_sqlite+set}" = set; then
  1497. withval="$with_sqlite"
  1498. :
  1499. else
  1500. with_sqlite=yes
  1501. fi
  1502. # Check whether --with-opengl or --without-opengl was given.
  1503. if test "${with_opengl+set}" = set; then
  1504. withval="$with_opengl"
  1505. :
  1506. else
  1507. with_opengl=yes
  1508. fi
  1509. # Check whether --with-odbc or --without-odbc was given.
  1510. if test "${with_odbc+set}" = set; then
  1511. withval="$with_odbc"
  1512. :
  1513. else
  1514. with_odbc=no
  1515. fi
  1516. # Check whether --with-fftw or --without-fftw was given.
  1517. if test "${with_fftw+set}" = set; then
  1518. withval="$with_fftw"
  1519. :
  1520. else
  1521. with_fftw=yes
  1522. fi
  1523. # Check whether --with-blas or --without-blas was given.
  1524. if test "${with_blas+set}" = set; then
  1525. withval="$with_blas"
  1526. :
  1527. else
  1528. with_blas=no
  1529. fi
  1530. # Check whether --with-lapack or --without-lapack was given.
  1531. if test "${with_lapack+set}" = set; then
  1532. withval="$with_lapack"
  1533. :
  1534. else
  1535. with_lapack=no
  1536. fi
  1537. # Check whether --with-cairo or --without-cairo was given.
  1538. if test "${with_cairo+set}" = set; then
  1539. withval="$with_cairo"
  1540. :
  1541. else
  1542. with_cairo=yes
  1543. fi
  1544. # Check whether --with-freetype or --without-freetype was given.
  1545. if test "${with_freetype+set}" = set; then
  1546. withval="$with_freetype"
  1547. :
  1548. else
  1549. with_freetype=yes
  1550. fi
  1551. # Check whether --with-nls or --without-nls was given.
  1552. if test "${with_nls+set}" = set; then
  1553. withval="$with_nls"
  1554. :
  1555. else
  1556. with_nls=no
  1557. fi
  1558. # Check whether --with-readline or --without-readline was given.
  1559. if test "${with_readline+set}" = set; then
  1560. withval="$with_readline"
  1561. :
  1562. else
  1563. with_readline=no
  1564. fi
  1565. # Check whether --with-opendwg or --without-opendwg was given.
  1566. if test "${with_opendwg+set}" = set; then
  1567. withval="$with_opendwg"
  1568. :
  1569. else
  1570. with_opendwg=no
  1571. fi
  1572. # Check whether --with-regex or --without-regex was given.
  1573. if test "${with_regex+set}" = set; then
  1574. withval="$with_regex"
  1575. :
  1576. else
  1577. with_regex=yes
  1578. fi
  1579. # Check whether --with-pthread or --without-pthread was given.
  1580. if test "${with_pthread+set}" = set; then
  1581. withval="$with_pthread"
  1582. :
  1583. else
  1584. with_pthread=no
  1585. fi
  1586. # Check whether --with-openmp or --without-openmp was given.
  1587. if test "${with_openmp+set}" = set; then
  1588. withval="$with_openmp"
  1589. :
  1590. else
  1591. with_openmp=no
  1592. fi
  1593. # Check whether --with-opencl or --without-opencl was given.
  1594. if test "${with_opencl+set}" = set; then
  1595. withval="$with_opencl"
  1596. :
  1597. else
  1598. with_opencl=no
  1599. fi
  1600. # Check whether --with-bzlib or --without-bzlib was given.
  1601. if test "${with_bzlib+set}" = set; then
  1602. withval="$with_bzlib"
  1603. :
  1604. else
  1605. with_bzlib=no
  1606. fi
  1607. # Check whether --with-zstd or --without-zstd was given.
  1608. if test "${with_zstd+set}" = set; then
  1609. withval="$with_zstd"
  1610. :
  1611. else
  1612. with_zstd=no
  1613. fi
  1614. # Check whether --with-gdal or --without-gdal was given.
  1615. if test "${with_gdal+set}" = set; then
  1616. withval="$with_gdal"
  1617. :
  1618. fi
  1619. # Check whether --with-liblas or --without-liblas was given.
  1620. if test "${with_liblas+set}" = set; then
  1621. withval="$with_liblas"
  1622. :
  1623. else
  1624. with_liblas="no"
  1625. fi
  1626. # Check whether --with-pdal or --without-pdal was given.
  1627. if test "${with_pdal+set}" = set; then
  1628. withval="$with_pdal"
  1629. :
  1630. else
  1631. with_pdal="no"
  1632. fi
  1633. # Check whether --with-wxwidgets or --without-wxwidgets was given.
  1634. if test "${with_wxwidgets+set}" = set; then
  1635. withval="$with_wxwidgets"
  1636. :
  1637. else
  1638. with_wxwidgets="no"
  1639. fi
  1640. # Check whether --with-netcdf or --without-netcdf was given.
  1641. if test "${with_netcdf+set}" = set; then
  1642. withval="$with_netcdf"
  1643. :
  1644. else
  1645. with_netcdf="no"
  1646. fi
  1647. # With includes and libs options
  1648. # Check whether --with-geos or --without-geos was given.
  1649. if test "${with_geos+set}" = set; then
  1650. withval="$with_geos"
  1651. :
  1652. else
  1653. with_geos="no"
  1654. fi
  1655. # Check whether --with-includes or --without-includes was given.
  1656. if test "${with_includes+set}" = set; then
  1657. withval="$with_includes"
  1658. :
  1659. fi
  1660. # Check whether --with-libs or --without-libs was given.
  1661. if test "${with_libs+set}" = set; then
  1662. withval="$with_libs"
  1663. :
  1664. fi
  1665. # Check whether --with-zlib-includes or --without-zlib-includes was given.
  1666. if test "${with_zlib_includes+set}" = set; then
  1667. withval="$with_zlib_includes"
  1668. :
  1669. fi
  1670. # Check whether --with-zlib-libs or --without-zlib-libs was given.
  1671. if test "${with_zlib_libs+set}" = set; then
  1672. withval="$with_zlib_libs"
  1673. :
  1674. fi
  1675. # Check whether --with-bzlib-includes or --without-bzlib-includes was given.
  1676. if test "${with_bzlib_includes+set}" = set; then
  1677. withval="$with_bzlib_includes"
  1678. :
  1679. fi
  1680. # Check whether --with-bzlib-libs or --without-bzlib-libs was given.
  1681. if test "${with_bzlib_libs+set}" = set; then
  1682. withval="$with_bzlib_libs"
  1683. :
  1684. fi
  1685. # Check whether --with-zstd-includes or --without-zstd-includes was given.
  1686. if test "${with_zstd_includes+set}" = set; then
  1687. withval="$with_zstd_includes"
  1688. :
  1689. fi
  1690. # Check whether --with-zstd-libs or --without-zstd-libs was given.
  1691. if test "${with_zstd_libs+set}" = set; then
  1692. withval="$with_zstd_libs"
  1693. :
  1694. fi
  1695. # Check whether --with-readline-includes or --without-readline-includes was given.
  1696. if test "${with_readline_includes+set}" = set; then
  1697. withval="$with_readline_includes"
  1698. :
  1699. fi
  1700. # Check whether --with-readline-libs or --without-readline-libs was given.
  1701. if test "${with_readline_libs+set}" = set; then
  1702. withval="$with_readline_libs"
  1703. :
  1704. fi
  1705. # Check whether --with-tiff-includes or --without-tiff-includes was given.
  1706. if test "${with_tiff_includes+set}" = set; then
  1707. withval="$with_tiff_includes"
  1708. :
  1709. fi
  1710. # Check whether --with-tiff-libs or --without-tiff-libs was given.
  1711. if test "${with_tiff_libs+set}" = set; then
  1712. withval="$with_tiff_libs"
  1713. :
  1714. fi
  1715. # Check whether --with-png-includes or --without-png-includes was given.
  1716. if test "${with_png_includes+set}" = set; then
  1717. withval="$with_png_includes"
  1718. :
  1719. fi
  1720. # Check whether --with-png-libs or --without-png-libs was given.
  1721. if test "${with_png_libs+set}" = set; then
  1722. withval="$with_png_libs"
  1723. :
  1724. fi
  1725. # Check whether --with-postgres-includes or --without-postgres-includes was given.
  1726. if test "${with_postgres_includes+set}" = set; then
  1727. withval="$with_postgres_includes"
  1728. :
  1729. fi
  1730. # Check whether --with-postgres-libs or --without-postgres-libs was given.
  1731. if test "${with_postgres_libs+set}" = set; then
  1732. withval="$with_postgres_libs"
  1733. :
  1734. fi
  1735. # Check whether --with-mysql-includes or --without-mysql-includes was given.
  1736. if test "${with_mysql_includes+set}" = set; then
  1737. withval="$with_mysql_includes"
  1738. :
  1739. fi
  1740. # Check whether --with-mysql-libs or --without-mysql-libs was given.
  1741. if test "${with_mysql_libs+set}" = set; then
  1742. withval="$with_mysql_libs"
  1743. :
  1744. fi
  1745. # Check whether --with-sqlite-includes or --without-sqlite-includes was given.
  1746. if test "${with_sqlite_includes+set}" = set; then
  1747. withval="$with_sqlite_includes"
  1748. :
  1749. fi
  1750. # Check whether --with-sqlite-libs or --without-sqlite-libs was given.
  1751. if test "${with_sqlite_libs+set}" = set; then
  1752. withval="$with_sqlite_libs"
  1753. :
  1754. fi
  1755. # Check whether --with-opengl-includes or --without-opengl-includes was given.
  1756. if test "${with_opengl_includes+set}" = set; then
  1757. withval="$with_opengl_includes"
  1758. :
  1759. fi
  1760. # Check whether --with-opengl-libs or --without-opengl-libs was given.
  1761. if test "${with_opengl_libs+set}" = set; then
  1762. withval="$with_opengl_libs"
  1763. :
  1764. fi
  1765. # Check whether --with-opengl-framework or --without-opengl-framework was given.
  1766. if test "${with_opengl_framework+set}" = set; then
  1767. withval="$with_opengl_framework"
  1768. :
  1769. fi
  1770. # Check whether --with-odbc-includes or --without-odbc-includes was given.
  1771. if test "${with_odbc_includes+set}" = set; then
  1772. withval="$with_odbc_includes"
  1773. :
  1774. fi
  1775. # Check whether --with-odbc-libs or --without-odbc-libs was given.
  1776. if test "${with_odbc_libs+set}" = set; then
  1777. withval="$with_odbc_libs"
  1778. :
  1779. fi
  1780. # Check whether --with-fftw-includes or --without-fftw-includes was given.
  1781. if test "${with_fftw_includes+set}" = set; then
  1782. withval="$with_fftw_includes"
  1783. :
  1784. fi
  1785. # Check whether --with-fftw-libs or --without-fftw-libs was given.
  1786. if test "${with_fftw_libs+set}" = set; then
  1787. withval="$with_fftw_libs"
  1788. :
  1789. fi
  1790. # Check whether --with-blas-includes or --without-blas-includes was given.
  1791. if test "${with_blas_includes+set}" = set; then
  1792. withval="$with_blas_includes"
  1793. :
  1794. fi
  1795. # Check whether --with-blas-libs or --without-blas-libs was given.
  1796. if test "${with_blas_libs+set}" = set; then
  1797. withval="$with_blas_libs"
  1798. :
  1799. fi
  1800. # Check whether --with-lapack-includes or --without-lapack-includes was given.
  1801. if test "${with_lapack_includes+set}" = set; then
  1802. withval="$with_lapack_includes"
  1803. :
  1804. fi
  1805. # Check whether --with-lapack-libs or --without-lapack-libs was given.
  1806. if test "${with_lapack_libs+set}" = set; then
  1807. withval="$with_lapack_libs"
  1808. :
  1809. fi
  1810. # Check whether --with-cairo-includes or --without-cairo-includes was given.
  1811. if test "${with_cairo_includes+set}" = set; then
  1812. withval="$with_cairo_includes"
  1813. :
  1814. fi
  1815. # Check whether --with-cairo-libs or --without-cairo-libs was given.
  1816. if test "${with_cairo_libs+set}" = set; then
  1817. withval="$with_cairo_libs"
  1818. :
  1819. fi
  1820. # Check whether --with-cairo-ldflags or --without-cairo-ldflags was given.
  1821. if test "${with_cairo_ldflags+set}" = set; then
  1822. withval="$with_cairo_ldflags"
  1823. :
  1824. fi
  1825. # Check whether --with-freetype-includes or --without-freetype-includes was given.
  1826. if test "${with_freetype_includes+set}" = set; then
  1827. withval="$with_freetype_includes"
  1828. :
  1829. fi
  1830. # Check whether --with-freetype-libs or --without-freetype-libs was given.
  1831. if test "${with_freetype_libs+set}" = set; then
  1832. withval="$with_freetype_libs"
  1833. :
  1834. fi
  1835. # Check whether --with-proj-includes or --without-proj-includes was given.
  1836. if test "${with_proj_includes+set}" = set; then
  1837. withval="$with_proj_includes"
  1838. :
  1839. fi
  1840. # Check whether --with-proj-libs or --without-proj-libs was given.
  1841. if test "${with_proj_libs+set}" = set; then
  1842. withval="$with_proj_libs"
  1843. :
  1844. fi
  1845. # Check whether --with-proj-share or --without-proj-share was given.
  1846. if test "${with_proj_share+set}" = set; then
  1847. withval="$with_proj_share"
  1848. :
  1849. fi
  1850. # Check whether --with-opendwg-includes or --without-opendwg-includes was given.
  1851. if test "${with_opendwg_includes+set}" = set; then
  1852. withval="$with_opendwg_includes"
  1853. :
  1854. fi
  1855. # Check whether --with-opendwg-libs or --without-opendwg-libs was given.
  1856. if test "${with_opendwg_libs+set}" = set; then
  1857. withval="$with_opendwg_libs"
  1858. :
  1859. fi
  1860. # Check whether --with-regex-includes or --without-regex-includes was given.
  1861. if test "${with_regex_includes+set}" = set; then
  1862. withval="$with_regex_includes"
  1863. :
  1864. fi
  1865. # Check whether --with-regex-libs or --without-regex-libs was given.
  1866. if test "${with_regex_libs+set}" = set; then
  1867. withval="$with_regex_libs"
  1868. :
  1869. fi
  1870. # Check whether --with-pthread-includes or --without-pthread-includes was given.
  1871. if test "${with_pthread_includes+set}" = set; then
  1872. withval="$with_pthread_includes"
  1873. :
  1874. fi
  1875. # Check whether --with-pthread-libs or --without-pthread-libs was given.
  1876. if test "${with_pthread_libs+set}" = set; then
  1877. withval="$with_pthread_libs"
  1878. :
  1879. fi
  1880. # Check whether --with-openmp-includes or --without-openmp-includes was given.
  1881. if test "${with_openmp_includes+set}" = set; then
  1882. withval="$with_openmp_includes"
  1883. :
  1884. fi
  1885. # Check whether --with-openmp-libs or --without-openmp-libs was given.
  1886. if test "${with_openmp_libs+set}" = set; then
  1887. withval="$with_openmp_libs"
  1888. :
  1889. fi
  1890. # Check whether --with-opencl-includes or --without-opencl-includes was given.
  1891. if test "${with_opencl_includes+set}" = set; then
  1892. withval="$with_opencl_includes"
  1893. :
  1894. fi
  1895. # Check whether --with-opencl-libs or --without-opencl-libs was given.
  1896. if test "${with_opencl_libs+set}" = set; then
  1897. withval="$with_opencl_libs"
  1898. :
  1899. fi
  1900. #LOC_ARG_WITH_FRAMEWORK(opencl, OpenCL)
  1901. # Put this early on so CPPFLAGS and LDFLAGS have any additional dirs
  1902. # With includes option
  1903. # Handle Fortran compiler choice
  1904. #LOC_CHECK_USE(g77, GNU Fortran 77, USE_G77)
  1905. # Done checking fortran
  1906. echo $ac_n "checking for additional include dirs""... $ac_c" 1>&6
  1907. echo "configure:2394: checking for additional include dirs" >&5
  1908. case "$with_includes" in
  1909. y | ye | yes | n | no)
  1910. { echo "configure: error: *** You must supply a directory to list --with-includes." 1>&2; exit 1; }
  1911. ;;
  1912. esac
  1913. echo "$ac_t""$with_includes" 1>&6
  1914. if test -n "$with_includes"; then
  1915. for dir in $with_includes; do
  1916. if test -d "$dir"; then
  1917. INCLUDE_DIRS="$INCLUDE_DIRS -I$dir"
  1918. else
  1919. { echo "configure: error: *** Include directory $dir does not exist." 1>&2; exit 1; }
  1920. fi
  1921. done
  1922. CPPFLAGS="$CPPFLAGS $INCLUDE_DIRS"
  1923. fi
  1924. # With libs option
  1925. echo $ac_n "checking for additional library dirs""... $ac_c" 1>&6
  1926. echo "configure:2417: checking for additional library dirs" >&5
  1927. case "$with_libs" in
  1928. y | ye | yes | n | no)
  1929. { echo "configure: error: *** You must supply a directory list to --with-libs." 1>&2; exit 1; }
  1930. ;;
  1931. esac
  1932. echo "$ac_t""$with_libs" 1>&6
  1933. if test -n "$with_libs"; then
  1934. for dir in $with_libs; do
  1935. if test -d "$dir"; then
  1936. LIBRARY_DIRS="$LIBRARY_DIRS -L$dir"
  1937. else
  1938. { echo "configure: error: *** Library directory $dir does not exist." 1>&2; exit 1; }
  1939. fi
  1940. done
  1941. LDFLAGS="$LDFLAGS $LIBRARY_DIRS"
  1942. fi
  1943. # Programs and standard headers, libraries, functions
  1944. # Find a good install program. We prefer a C program (faster),
  1945. # so one script is as good as another. But avoid the broken or
  1946. # incompatible versions:
  1947. # SysV /etc/install, /usr/sbin/install
  1948. # SunOS /usr/etc/install
  1949. # IRIX /sbin/install
  1950. # AIX /bin/install
  1951. # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  1952. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  1953. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  1954. # ./install, which can be erroneously created by make from ./install.sh.
  1955. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  1956. echo "configure:2451: checking for a BSD compatible install" >&5
  1957. if test -z "$INSTALL"; then
  1958. IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
  1959. for ac_dir in $PATH; do
  1960. # Account for people who put trailing slashes in PATH elements.
  1961. case "$ac_dir/" in
  1962. /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  1963. *)
  1964. # OSF1 and SCO ODT 3.0 have their own names for install.
  1965. # Don't use installbsd from OSF since it installs stuff as root
  1966. # by default.
  1967. for ac_prog in ginstall scoinst install; do
  1968. if test -f $ac_dir/$ac_prog; then
  1969. if test $ac_prog = install &&
  1970. grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  1971. # AIX install. It has an incompatible calling convention.
  1972. :
  1973. else
  1974. ac_cv_path_install="$ac_dir/$ac_prog -c"
  1975. break 2
  1976. fi
  1977. fi
  1978. done
  1979. ;;
  1980. esac
  1981. done
  1982. IFS="$ac_save_IFS"
  1983. if test "${ac_cv_path_install+set}" = set; then
  1984. INSTALL="$ac_cv_path_install"
  1985. else
  1986. # As a last resort, use the slow shell script. We don't cache a
  1987. # path for INSTALL within a source directory, because that will
  1988. # break other packages using the cache if that directory is
  1989. # removed, or if the path is relative.
  1990. INSTALL="$ac_install_sh"
  1991. fi
  1992. fi
  1993. echo "$ac_t""$INSTALL" 1>&6
  1994. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  1995. # It thinks the first close brace ends the variable substitution.
  1996. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  1997. test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  1998. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  1999. # Extract the first word of "flex", so it can be a program name with args.
  2000. set dummy flex; ac_word=$2
  2001. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2002. echo "configure:2504: checking for $ac_word" >&5
  2003. if test -n "$LEX"; then
  2004. ac_cv_prog_LEX="$LEX" # Let the user override the test.
  2005. else
  2006. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2007. ac_dummy="$PATH"
  2008. for ac_dir in $ac_dummy; do
  2009. test -z "$ac_dir" && ac_dir=.
  2010. if test -f $ac_dir/$ac_word; then
  2011. ac_cv_prog_LEX="flex"
  2012. break
  2013. fi
  2014. done
  2015. IFS="$ac_save_ifs"
  2016. test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
  2017. fi
  2018. LEX="$ac_cv_prog_LEX"
  2019. if test -n "$LEX"; then
  2020. echo "$ac_t""$LEX" 1>&6
  2021. else
  2022. echo "$ac_t""no" 1>&6
  2023. fi
  2024. if test -z "$LEXLIB"
  2025. then
  2026. case "$LEX" in
  2027. flex*) ac_lib=fl ;;
  2028. *) ac_lib=l ;;
  2029. esac
  2030. echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
  2031. echo "configure:2535: checking for yywrap in -l$ac_lib" >&5
  2032. ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
  2033. ac_save_LIBS="$LIBS"
  2034. LIBS="-l$ac_lib $LIBS"
  2035. cat > conftest.$ac_ext <<EOF
  2036. #line 2541 "configure"
  2037. #include "confdefs.h"
  2038. /* Override any gcc2 internal prototype to avoid an error. */
  2039. /* We use char because int might match the return type of a gcc2
  2040. builtin and then its argument prototype would still apply. */
  2041. char yywrap();
  2042. int main() {
  2043. yywrap()
  2044. ; return 0; }
  2045. EOF
  2046. if { (eval echo configure:2552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2047. rm -rf conftest*
  2048. eval "ac_cv_lib_$ac_lib_var=yes"
  2049. else
  2050. echo "configure: failed program was:" >&5
  2051. cat conftest.$ac_ext >&5
  2052. rm -rf conftest*
  2053. eval "ac_cv_lib_$ac_lib_var=no"
  2054. fi
  2055. rm -f conftest*
  2056. LIBS="$ac_save_LIBS"
  2057. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2058. echo "$ac_t""yes" 1>&6
  2059. LEXLIB="-l$ac_lib"
  2060. else
  2061. echo "$ac_t""no" 1>&6
  2062. fi
  2063. fi
  2064. if test "$LEX" = "lex"; then
  2065. # Extract the first word of "lex", so it can be a program name with args.
  2066. set dummy lex; ac_word=$2
  2067. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2068. echo "configure:2577: checking for $ac_word" >&5
  2069. case "$LEXPATH" in
  2070. /*)
  2071. ac_cv_path_LEXPATH="$LEXPATH" # Let the user override the test with a path.
  2072. ;;
  2073. ?:/*)
  2074. ac_cv_path_LEXPATH="$LEXPATH" # Let the user override the test with a dos path.
  2075. ;;
  2076. *)
  2077. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2078. ac_dummy="$PATH"
  2079. for ac_dir in $ac_dummy; do
  2080. test -z "$ac_dir" && ac_dir=.
  2081. if test -f $ac_dir/$ac_word; then
  2082. ac_cv_path_LEXPATH="$ac_dir/$ac_word"
  2083. break
  2084. fi
  2085. done
  2086. IFS="$ac_save_ifs"
  2087. test -z "$ac_cv_path_LEXPATH" && ac_cv_path_LEXPATH="no"
  2088. ;;
  2089. esac
  2090. LEXPATH="$ac_cv_path_LEXPATH"
  2091. if test -n "$LEXPATH"; then
  2092. echo "$ac_t""$LEXPATH" 1>&6
  2093. else
  2094. echo "$ac_t""no" 1>&6
  2095. fi
  2096. if test "$LEXPATH" = "no"; then
  2097. { echo "configure: error: *** Unable to locate lex." 1>&2; exit 1; }
  2098. fi
  2099. fi
  2100. for ac_prog in 'bison -y' byacc
  2101. do
  2102. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2103. set dummy $ac_prog; ac_word=$2
  2104. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2105. echo "configure:2617: checking for $ac_word" >&5
  2106. if test -n "$YACC"; then
  2107. ac_cv_prog_YACC="$YACC" # Let the user override the test.
  2108. else
  2109. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2110. ac_dummy="$PATH"
  2111. for ac_dir in $ac_dummy; do
  2112. test -z "$ac_dir" && ac_dir=.
  2113. if test -f $ac_dir/$ac_word; then
  2114. ac_cv_prog_YACC="$ac_prog"
  2115. break
  2116. fi
  2117. done
  2118. IFS="$ac_save_ifs"
  2119. fi
  2120. YACC="$ac_cv_prog_YACC"
  2121. if test -n "$YACC"; then
  2122. echo "$ac_t""$YACC" 1>&6
  2123. else
  2124. echo "$ac_t""no" 1>&6
  2125. fi
  2126. test -n "$YACC" && break
  2127. done
  2128. test -n "$YACC" || YACC="yacc"
  2129. if test "$YACC" = "yacc"; then
  2130. # Extract the first word of "yacc", so it can be a program name with args.
  2131. set dummy yacc; ac_word=$2
  2132. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2133. echo "configure:2648: checking for $ac_word" >&5
  2134. case "$YACCPATH" in
  2135. /*)
  2136. ac_cv_path_YACCPATH="$YACCPATH" # Let the user override the test with a path.
  2137. ;;
  2138. ?:/*)
  2139. ac_cv_path_YACCPATH="$YACCPATH" # Let the user override the test with a dos path.
  2140. ;;
  2141. *)
  2142. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2143. ac_dummy="$PATH"
  2144. for ac_dir in $ac_dummy; do
  2145. test -z "$ac_dir" && ac_dir=.
  2146. if test -f $ac_dir/$ac_word; then
  2147. ac_cv_path_YACCPATH="$ac_dir/$ac_word"
  2148. break
  2149. fi
  2150. done
  2151. IFS="$ac_save_ifs"
  2152. test -z "$ac_cv_path_YACCPATH" && ac_cv_path_YACCPATH="no"
  2153. ;;
  2154. esac
  2155. YACCPATH="$ac_cv_path_YACCPATH"
  2156. if test -n "$YACCPATH"; then
  2157. echo "$ac_t""$YACCPATH" 1>&6
  2158. else
  2159. echo "$ac_t""no" 1>&6
  2160. fi
  2161. if test "$YACCPATH" = "no"; then
  2162. { echo "configure: error: *** Unable to locate yacc." 1>&2; exit 1; }
  2163. fi
  2164. fi
  2165. # Extract the first word of "ranlib", so it can be a program name with args.
  2166. set dummy ranlib; ac_word=$2
  2167. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2168. echo "configure:2686: checking for $ac_word" >&5
  2169. if test -n "$RANLIB"; then
  2170. ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  2171. else
  2172. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2173. ac_dummy="$PATH"
  2174. for ac_dir in $ac_dummy; do
  2175. test -z "$ac_dir" && ac_dir=.
  2176. if test -f $ac_dir/$ac_word; then
  2177. ac_cv_prog_RANLIB="ranlib"
  2178. break
  2179. fi
  2180. done
  2181. IFS="$ac_save_ifs"
  2182. test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  2183. fi
  2184. RANLIB="$ac_cv_prog_RANLIB"
  2185. if test -n "$RANLIB"; then
  2186. echo "$ac_t""$RANLIB" 1>&6
  2187. else
  2188. echo "$ac_t""no" 1>&6
  2189. fi
  2190. for ac_prog in ar
  2191. do
  2192. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2193. set dummy $ac_prog; ac_word=$2
  2194. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2195. echo "configure:2715: checking for $ac_word" >&5
  2196. if test -n "$AR"; then
  2197. ac_cv_prog_AR="$AR" # Let the user override the test.
  2198. else
  2199. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2200. ac_dummy="$PATH"
  2201. for ac_dir in $ac_dummy; do
  2202. test -z "$ac_dir" && ac_dir=.
  2203. if test -f $ac_dir/$ac_word; then
  2204. ac_cv_prog_AR="$ac_prog"
  2205. break
  2206. fi
  2207. done
  2208. IFS="$ac_save_ifs"
  2209. fi
  2210. AR="$ac_cv_prog_AR"
  2211. if test -n "$AR"; then
  2212. echo "$ac_t""$AR" 1>&6
  2213. else
  2214. echo "$ac_t""no" 1>&6
  2215. fi
  2216. test -n "$AR" && break
  2217. done
  2218. for ac_prog in env
  2219. do
  2220. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2221. set dummy $ac_prog; ac_word=$2
  2222. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2223. echo "configure:2746: checking for $ac_word" >&5
  2224. if test -n "$ENV"; then
  2225. ac_cv_prog_ENV="$ENV" # Let the user override the test.
  2226. else
  2227. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2228. ac_dummy="$PATH"
  2229. for ac_dir in $ac_dummy; do
  2230. test -z "$ac_dir" && ac_dir=.
  2231. if test -f $ac_dir/$ac_word; then
  2232. ac_cv_prog_ENV="$ac_prog"
  2233. break
  2234. fi
  2235. done
  2236. IFS="$ac_save_ifs"
  2237. fi
  2238. ENV="$ac_cv_prog_ENV"
  2239. if test -n "$ENV"; then
  2240. echo "$ac_t""$ENV" 1>&6
  2241. else
  2242. echo "$ac_t""no" 1>&6
  2243. fi
  2244. test -n "$ENV" && break
  2245. done
  2246. # Extract the first word of "perl", so it can be a program name with args.
  2247. set dummy perl; ac_word=$2
  2248. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2249. echo "configure:2775: checking for $ac_word" >&5
  2250. case "$PERL" in
  2251. /*)
  2252. ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
  2253. ;;
  2254. ?:/*)
  2255. ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
  2256. ;;
  2257. *)
  2258. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2259. ac_dummy="$PATH"
  2260. for ac_dir in $ac_dummy; do
  2261. test -z "$ac_dir" && ac_dir=.
  2262. if test -f $ac_dir/$ac_word; then
  2263. ac_cv_path_PERL="$ac_dir/$ac_word"
  2264. break
  2265. fi
  2266. done
  2267. IFS="$ac_save_ifs"
  2268. test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no"
  2269. ;;
  2270. esac
  2271. PERL="$ac_cv_path_PERL"
  2272. if test -n "$PERL"; then
  2273. echo "$ac_t""$PERL" 1>&6
  2274. else
  2275. echo "$ac_t""no" 1>&6
  2276. fi
  2277. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  2278. echo "configure:2806: checking how to run the C preprocessor" >&5
  2279. # On Suns, sometimes $CPP names a directory.
  2280. if test -n "$CPP" && test -d "$CPP"; then
  2281. CPP=
  2282. fi
  2283. if test -z "$CPP"; then
  2284. # This must be in double quotes, not single quotes, because CPP may get
  2285. # substituted into the Makefile and "${CC-cc}" will confuse make.
  2286. CPP="${CC-cc} -E"
  2287. # On the NeXT, cc -E runs the code through the compiler's parser,
  2288. # not just through cpp.
  2289. cat > conftest.$ac_ext <<EOF
  2290. #line 2819 "configure"
  2291. #include "confdefs.h"
  2292. #include <assert.h>
  2293. Syntax Error
  2294. EOF
  2295. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2296. { (eval echo configure:2825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2297. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2298. if test -z "$ac_err"; then
  2299. :
  2300. else
  2301. echo "$ac_err" >&5
  2302. echo "configure: failed program was:" >&5
  2303. cat conftest.$ac_ext >&5
  2304. rm -rf conftest*
  2305. CPP="${CC-cc} -E -traditional-cpp"
  2306. cat > conftest.$ac_ext <<EOF
  2307. #line 2836 "configure"
  2308. #include "confdefs.h"
  2309. #include <assert.h>
  2310. Syntax Error
  2311. EOF
  2312. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2313. { (eval echo configure:2842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2314. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2315. if test -z "$ac_err"; then
  2316. :
  2317. else
  2318. echo "$ac_err" >&5
  2319. echo "configure: failed program was:" >&5
  2320. cat conftest.$ac_ext >&5
  2321. rm -rf conftest*
  2322. CPP="${CC-cc} -nologo -E"
  2323. cat > conftest.$ac_ext <<EOF
  2324. #line 2853 "configure"
  2325. #include "confdefs.h"
  2326. #include <assert.h>
  2327. Syntax Error
  2328. EOF
  2329. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2330. { (eval echo configure:2859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2331. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2332. if test -z "$ac_err"; then
  2333. :
  2334. else
  2335. echo "$ac_err" >&5
  2336. echo "configure: failed program was:" >&5
  2337. cat conftest.$ac_ext >&5
  2338. rm -rf conftest*
  2339. CPP=/lib/cpp
  2340. fi
  2341. rm -f conftest*
  2342. fi
  2343. rm -f conftest*
  2344. fi
  2345. rm -f conftest*
  2346. ac_cv_prog_CPP="$CPP"
  2347. CPP="$ac_cv_prog_CPP"
  2348. else
  2349. ac_cv_prog_CPP="$CPP"
  2350. fi
  2351. echo "$ac_t""$CPP" 1>&6
  2352. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  2353. echo "configure:2883: checking for ANSI C header files" >&5
  2354. cat > conftest.$ac_ext <<EOF
  2355. #line 2886 "configure"
  2356. #include "confdefs.h"
  2357. #include <stdlib.h>
  2358. #include <stdarg.h>
  2359. #include <string.h>
  2360. #include <float.h>
  2361. EOF
  2362. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2363. { (eval echo configure:2894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2364. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2365. if test -z "$ac_err"; then
  2366. rm -rf conftest*
  2367. ac_cv_header_stdc=yes
  2368. else
  2369. echo "$ac_err" >&5
  2370. echo "configure: failed program was:" >&5
  2371. cat conftest.$ac_ext >&5
  2372. rm -rf conftest*
  2373. ac_cv_header_stdc=no
  2374. fi
  2375. rm -f conftest*
  2376. if test $ac_cv_header_stdc = yes; then
  2377. # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  2378. cat > conftest.$ac_ext <<EOF
  2379. #line 2911 "configure"
  2380. #include "confdefs.h"
  2381. #include <string.h>
  2382. EOF
  2383. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2384. egrep "memchr" >/dev/null 2>&1; then
  2385. :
  2386. else
  2387. rm -rf conftest*
  2388. ac_cv_header_stdc=no
  2389. fi
  2390. rm -f conftest*
  2391. fi
  2392. if test $ac_cv_header_stdc = yes; then
  2393. # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  2394. cat > conftest.$ac_ext <<EOF
  2395. #line 2929 "configure"
  2396. #include "confdefs.h"
  2397. #include <stdlib.h>
  2398. EOF
  2399. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2400. egrep "free" >/dev/null 2>&1; then
  2401. :
  2402. else
  2403. rm -rf conftest*
  2404. ac_cv_header_stdc=no
  2405. fi
  2406. rm -f conftest*
  2407. fi
  2408. if test $ac_cv_header_stdc = yes; then
  2409. # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  2410. if test "$cross_compiling" = yes; then
  2411. :
  2412. else
  2413. cat > conftest.$ac_ext <<EOF
  2414. #line 2950 "configure"
  2415. #include "confdefs.h"
  2416. #include <ctype.h>
  2417. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  2418. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  2419. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  2420. int main () { int i; for (i = 0; i < 256; i++)
  2421. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  2422. exit (0); }
  2423. EOF
  2424. if { (eval echo configure:2961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2425. then
  2426. :
  2427. else
  2428. echo "configure: failed program was:" >&5
  2429. cat conftest.$ac_ext >&5
  2430. rm -fr conftest*
  2431. ac_cv_header_stdc=no
  2432. fi
  2433. rm -fr conftest*
  2434. fi
  2435. fi
  2436. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  2437. if test $ac_cv_header_stdc = yes; then
  2438. cat >> confdefs.h <<\EOF
  2439. #define STDC_HEADERS 1
  2440. EOF
  2441. fi
  2442. #AC_CHECK_HEADERS(curses.h limits.h termio.h termios.h unistd.h values.h)
  2443. for ac_hdr in limits.h termio.h termios.h unistd.h values.h f2c.h g2c.h
  2444. do
  2445. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2446. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2447. echo "configure:2988: checking for $ac_hdr" >&5
  2448. cat > conftest.$ac_ext <<EOF
  2449. #line 2991 "configure"
  2450. #include "confdefs.h"
  2451. #include <$ac_hdr>
  2452. EOF
  2453. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2454. { (eval echo configure:2996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2455. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2456. if test -z "$ac_err"; then
  2457. rm -rf conftest*
  2458. eval "ac_cv_header_$ac_safe=yes"
  2459. else
  2460. echo "$ac_err" >&5
  2461. echo "configure: failed program was:" >&5
  2462. cat conftest.$ac_ext >&5
  2463. rm -rf conftest*
  2464. eval "ac_cv_header_$ac_safe=no"
  2465. fi
  2466. rm -f conftest*
  2467. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2468. echo "$ac_t""yes" 1>&6
  2469. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2470. cat >> confdefs.h <<EOF
  2471. #define $ac_tr_hdr 1
  2472. EOF
  2473. else
  2474. echo "$ac_t""no" 1>&6
  2475. fi
  2476. done
  2477. for ac_hdr in sys/ioctl.h sys/mtio.h sys/resource.h sys/time.h
  2478. do
  2479. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2480. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2481. echo "configure:3025: checking for $ac_hdr" >&5
  2482. cat > conftest.$ac_ext <<EOF
  2483. #line 3028 "configure"
  2484. #include "confdefs.h"
  2485. #include <$ac_hdr>
  2486. EOF
  2487. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2488. { (eval echo configure:3033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2489. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2490. if test -z "$ac_err"; then
  2491. rm -rf conftest*
  2492. eval "ac_cv_header_$ac_safe=yes"
  2493. else
  2494. echo "$ac_err" >&5
  2495. echo "configure: failed program was:" >&5
  2496. cat conftest.$ac_ext >&5
  2497. rm -rf conftest*
  2498. eval "ac_cv_header_$ac_safe=no"
  2499. fi
  2500. rm -f conftest*
  2501. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2502. echo "$ac_t""yes" 1>&6
  2503. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2504. cat >> confdefs.h <<EOF
  2505. #define $ac_tr_hdr 1
  2506. EOF
  2507. else
  2508. echo "$ac_t""no" 1>&6
  2509. fi
  2510. done
  2511. for ac_hdr in sys/timeb.h sys/types.h sys/utsname.h
  2512. do
  2513. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2514. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2515. echo "configure:3062: checking for $ac_hdr" >&5
  2516. cat > conftest.$ac_ext <<EOF
  2517. #line 3065 "configure"
  2518. #include "confdefs.h"
  2519. #include <$ac_hdr>
  2520. EOF
  2521. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2522. { (eval echo configure:3070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2523. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2524. if test -z "$ac_err"; then
  2525. rm -rf conftest*
  2526. eval "ac_cv_header_$ac_safe=yes"
  2527. else
  2528. echo "$ac_err" >&5
  2529. echo "configure: failed program was:" >&5
  2530. cat conftest.$ac_ext >&5
  2531. rm -rf conftest*
  2532. eval "ac_cv_header_$ac_safe=no"
  2533. fi
  2534. rm -f conftest*
  2535. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2536. echo "$ac_t""yes" 1>&6
  2537. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2538. cat >> confdefs.h <<EOF
  2539. #define $ac_tr_hdr 1
  2540. EOF
  2541. else
  2542. echo "$ac_t""no" 1>&6
  2543. fi
  2544. done
  2545. for ac_hdr in libintl.h iconv.h
  2546. do
  2547. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2548. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2549. echo "configure:3099: checking for $ac_hdr" >&5
  2550. cat > conftest.$ac_ext <<EOF
  2551. #line 3102 "configure"
  2552. #include "confdefs.h"
  2553. #include <$ac_hdr>
  2554. EOF
  2555. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2556. { (eval echo configure:3107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2557. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2558. if test -z "$ac_err"; then
  2559. rm -rf conftest*
  2560. eval "ac_cv_header_$ac_safe=yes"
  2561. else
  2562. echo "$ac_err" >&5
  2563. echo "configure: failed program was:" >&5
  2564. cat conftest.$ac_ext >&5
  2565. rm -rf conftest*
  2566. eval "ac_cv_header_$ac_safe=no"
  2567. fi
  2568. rm -f conftest*
  2569. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2570. echo "$ac_t""yes" 1>&6
  2571. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2572. cat >> confdefs.h <<EOF
  2573. #define $ac_tr_hdr 1
  2574. EOF
  2575. else
  2576. echo "$ac_t""no" 1>&6
  2577. fi
  2578. done
  2579. for ac_hdr in langinfo.h
  2580. do
  2581. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2582. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2583. echo "configure:3136: checking for $ac_hdr" >&5
  2584. cat > conftest.$ac_ext <<EOF
  2585. #line 3139 "configure"
  2586. #include "confdefs.h"
  2587. #include <$ac_hdr>
  2588. EOF
  2589. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2590. { (eval echo configure:3144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2591. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2592. if test -z "$ac_err"; then
  2593. rm -rf conftest*
  2594. eval "ac_cv_header_$ac_safe=yes"
  2595. else
  2596. echo "$ac_err" >&5
  2597. echo "configure: failed program was:" >&5
  2598. cat conftest.$ac_ext >&5
  2599. rm -rf conftest*
  2600. eval "ac_cv_header_$ac_safe=no"
  2601. fi
  2602. rm -f conftest*
  2603. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2604. echo "$ac_t""yes" 1>&6
  2605. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2606. cat >> confdefs.h <<EOF
  2607. #define $ac_tr_hdr 1
  2608. EOF
  2609. else
  2610. echo "$ac_t""no" 1>&6
  2611. fi
  2612. done
  2613. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  2614. echo "configure:3170: checking whether time.h and sys/time.h may both be included" >&5
  2615. cat > conftest.$ac_ext <<EOF
  2616. #line 3173 "configure"
  2617. #include "confdefs.h"
  2618. #include <sys/types.h>
  2619. #include <sys/time.h>
  2620. #include <time.h>
  2621. int main() {
  2622. struct tm *tp;
  2623. ; return 0; }
  2624. EOF
  2625. if { (eval echo configure:3182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2626. rm -rf conftest*
  2627. ac_cv_header_time=yes
  2628. else
  2629. echo "configure: failed program was:" >&5
  2630. cat conftest.$ac_ext >&5
  2631. rm -rf conftest*
  2632. ac_cv_header_time=no
  2633. fi
  2634. rm -f conftest*
  2635. echo "$ac_t""$ac_cv_header_time" 1>&6
  2636. if test $ac_cv_header_time = yes; then
  2637. cat >> confdefs.h <<\EOF
  2638. #define TIME_WITH_SYS_TIME 1
  2639. EOF
  2640. fi
  2641. echo $ac_n "checking for off_t""... $ac_c" 1>&6
  2642. echo "configure:3202: checking for off_t" >&5
  2643. cat > conftest.$ac_ext <<EOF
  2644. #line 3205 "configure"
  2645. #include "confdefs.h"
  2646. #include <sys/types.h>
  2647. #if STDC_HEADERS
  2648. #include <stdlib.h>
  2649. #include <stddef.h>
  2650. #endif
  2651. EOF
  2652. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2653. egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  2654. rm -rf conftest*
  2655. ac_cv_type_off_t=yes
  2656. else
  2657. rm -rf conftest*
  2658. ac_cv_type_off_t=no
  2659. fi
  2660. rm -f conftest*
  2661. echo "$ac_t""$ac_cv_type_off_t" 1>&6
  2662. if test $ac_cv_type_off_t = no; then
  2663. cat >> confdefs.h <<\EOF
  2664. #define off_t long
  2665. EOF
  2666. fi
  2667. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  2668. echo "configure:3232: checking for uid_t in sys/types.h" >&5
  2669. cat > conftest.$ac_ext <<EOF
  2670. #line 3235 "configure"
  2671. #include "confdefs.h"
  2672. #include <sys/types.h>
  2673. EOF
  2674. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2675. egrep "uid_t" >/dev/null 2>&1; then
  2676. rm -rf conftest*
  2677. ac_cv_type_uid_t=yes
  2678. else
  2679. rm -rf conftest*
  2680. ac_cv_type_uid_t=no
  2681. fi
  2682. rm -f conftest*
  2683. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  2684. if test $ac_cv_type_uid_t = no; then
  2685. cat >> confdefs.h <<\EOF
  2686. #define uid_t int
  2687. EOF
  2688. cat >> confdefs.h <<\EOF
  2689. #define gid_t int
  2690. EOF
  2691. fi
  2692. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  2693. echo "configure:3263: checking return type of signal handlers" >&5
  2694. cat > conftest.$ac_ext <<EOF
  2695. #line 3266 "configure"
  2696. #include "confdefs.h"
  2697. #include <sys/types.h>
  2698. #include <signal.h>
  2699. #ifdef signal
  2700. #undef signal
  2701. #endif
  2702. #ifdef __cplusplus
  2703. extern "C" void (*signal (int, void (*)(int)))(int);
  2704. #else
  2705. void (*signal ()) ();
  2706. #endif
  2707. int main() {
  2708. int i;
  2709. ; return 0; }
  2710. EOF
  2711. if { (eval echo configure:3283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2712. rm -rf conftest*
  2713. ac_cv_type_signal=void
  2714. else
  2715. echo "configure: failed program was:" >&5
  2716. cat conftest.$ac_ext >&5
  2717. rm -rf conftest*
  2718. ac_cv_type_signal=int
  2719. fi
  2720. rm -f conftest*
  2721. echo "$ac_t""$ac_cv_type_signal" 1>&6
  2722. cat >> confdefs.h <<EOF
  2723. #define RETSIGTYPE $ac_cv_type_signal
  2724. EOF
  2725. echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
  2726. echo "configure:3301: checking for Cygwin environment" >&5
  2727. cat > conftest.$ac_ext <<EOF
  2728. #line 3304 "configure"
  2729. #include "confdefs.h"
  2730. int main() {
  2731. #ifndef __CYGWIN__
  2732. #define __CYGWIN__ __CYGWIN32__
  2733. #endif
  2734. return __CYGWIN__;
  2735. ; return 0; }
  2736. EOF
  2737. if { (eval echo configure:3315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2738. rm -rf conftest*
  2739. ac_cv_cygwin=yes
  2740. else
  2741. echo "configure: failed program was:" >&5
  2742. cat conftest.$ac_ext >&5
  2743. rm -rf conftest*
  2744. ac_cv_cygwin=no
  2745. fi
  2746. rm -f conftest*
  2747. rm -f conftest*
  2748. echo "$ac_t""$ac_cv_cygwin" 1>&6
  2749. CYGWIN=
  2750. test "$ac_cv_cygwin" = yes && CYGWIN=yes
  2751. for ac_func in ftime gethostname gettimeofday lseek nice time uname
  2752. do
  2753. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2754. echo "configure:3333: checking for $ac_func" >&5
  2755. cat > conftest.$ac_ext <<EOF
  2756. #line 3336 "configure"
  2757. #include "confdefs.h"
  2758. /* System header to define __stub macros and hopefully few prototypes,
  2759. which can conflict with char $ac_func(); below. */
  2760. #include <assert.h>
  2761. /* Override any gcc2 internal prototype to avoid an error. */
  2762. /* We use char because int might match the return type of a gcc2
  2763. builtin and then its argument prototype would still apply. */
  2764. char $ac_func();
  2765. int main() {
  2766. /* The GNU C library defines this for functions which it implements
  2767. to always fail with ENOSYS. Some functions are actually named
  2768. something starting with __ and the normal name is an alias. */
  2769. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2770. choke me
  2771. #else
  2772. $ac_func();
  2773. #endif
  2774. ; return 0; }
  2775. EOF
  2776. if { (eval echo configure:3359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2777. rm -rf conftest*
  2778. eval "ac_cv_func_$ac_func=yes"
  2779. else
  2780. echo "configure: failed program was:" >&5
  2781. cat conftest.$ac_ext >&5
  2782. rm -rf conftest*
  2783. eval "ac_cv_func_$ac_func=no"
  2784. fi
  2785. rm -f conftest*
  2786. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2787. echo "$ac_t""yes" 1>&6
  2788. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2789. cat >> confdefs.h <<EOF
  2790. #define $ac_tr_func 1
  2791. EOF
  2792. else
  2793. echo "$ac_t""no" 1>&6
  2794. fi
  2795. done
  2796. for ac_func in seteuid setpriority setreuid setruid
  2797. do
  2798. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2799. echo "configure:3385: checking for $ac_func" >&5
  2800. cat > conftest.$ac_ext <<EOF
  2801. #line 3388 "configure"
  2802. #include "confdefs.h"
  2803. /* System header to define __stub macros and hopefully few prototypes,
  2804. which can conflict with char $ac_func(); below. */
  2805. #include <assert.h>
  2806. /* Override any gcc2 internal prototype to avoid an error. */
  2807. /* We use char because int might match the return type of a gcc2
  2808. builtin and then its argument prototype would still apply. */
  2809. char $ac_func();
  2810. int main() {
  2811. /* The GNU C library defines this for functions which it implements
  2812. to always fail with ENOSYS. Some functions are actually named
  2813. something starting with __ and the normal name is an alias. */
  2814. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2815. choke me
  2816. #else
  2817. $ac_func();
  2818. #endif
  2819. ; return 0; }
  2820. EOF
  2821. if { (eval echo configure:3411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2822. rm -rf conftest*
  2823. eval "ac_cv_func_$ac_func=yes"
  2824. else
  2825. echo "configure: failed program was:" >&5
  2826. cat conftest.$ac_ext >&5
  2827. rm -rf conftest*
  2828. eval "ac_cv_func_$ac_func=no"
  2829. fi
  2830. rm -f conftest*
  2831. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2832. echo "$ac_t""yes" 1>&6
  2833. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2834. cat >> confdefs.h <<EOF
  2835. #define $ac_tr_func 1
  2836. EOF
  2837. else
  2838. echo "$ac_t""no" 1>&6
  2839. fi
  2840. done
  2841. for ac_func in drand48
  2842. do
  2843. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2844. echo "configure:3437: checking for $ac_func" >&5
  2845. cat > conftest.$ac_ext <<EOF
  2846. #line 3440 "configure"
  2847. #include "confdefs.h"
  2848. /* System header to define __stub macros and hopefully few prototypes,
  2849. which can conflict with char $ac_func(); below. */
  2850. #include <assert.h>
  2851. /* Override any gcc2 internal prototype to avoid an error. */
  2852. /* We use char because int might match the return type of a gcc2
  2853. builtin and then its argument prototype would still apply. */
  2854. char $ac_func();
  2855. int main() {
  2856. /* The GNU C library defines this for functions which it implements
  2857. to always fail with ENOSYS. Some functions are actually named
  2858. something starting with __ and the normal name is an alias. */
  2859. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2860. choke me
  2861. #else
  2862. $ac_func();
  2863. #endif
  2864. ; return 0; }
  2865. EOF
  2866. if { (eval echo configure:3463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2867. rm -rf conftest*
  2868. eval "ac_cv_func_$ac_func=yes"
  2869. else
  2870. echo "configure: failed program was:" >&5
  2871. cat conftest.$ac_ext >&5
  2872. rm -rf conftest*
  2873. eval "ac_cv_func_$ac_func=no"
  2874. fi
  2875. rm -f conftest*
  2876. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2877. echo "$ac_t""yes" 1>&6
  2878. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2879. cat >> confdefs.h <<EOF
  2880. #define $ac_tr_func 1
  2881. EOF
  2882. else
  2883. echo "$ac_t""no" 1>&6
  2884. fi
  2885. done
  2886. for ac_func in putenv setenv
  2887. do
  2888. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2889. echo "configure:3489: checking for $ac_func" >&5
  2890. cat > conftest.$ac_ext <<EOF
  2891. #line 3492 "configure"
  2892. #include "confdefs.h"
  2893. /* System header to define __stub macros and hopefully few prototypes,
  2894. which can conflict with char $ac_func(); below. */
  2895. #include <assert.h>
  2896. /* Override any gcc2 internal prototype to avoid an error. */
  2897. /* We use char because int might match the return type of a gcc2
  2898. builtin and then its argument prototype would still apply. */
  2899. char $ac_func();
  2900. int main() {
  2901. /* The GNU C library defines this for functions which it implements
  2902. to always fail with ENOSYS. Some functions are actually named
  2903. something starting with __ and the normal name is an alias. */
  2904. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2905. choke me
  2906. #else
  2907. $ac_func();
  2908. #endif
  2909. ; return 0; }
  2910. EOF
  2911. if { (eval echo configure:3515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2912. rm -rf conftest*
  2913. eval "ac_cv_func_$ac_func=yes"
  2914. else
  2915. echo "configure: failed program was:" >&5
  2916. cat conftest.$ac_ext >&5
  2917. rm -rf conftest*
  2918. eval "ac_cv_func_$ac_func=no"
  2919. fi
  2920. rm -f conftest*
  2921. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2922. echo "$ac_t""yes" 1>&6
  2923. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2924. cat >> confdefs.h <<EOF
  2925. #define $ac_tr_func 1
  2926. EOF
  2927. else
  2928. echo "$ac_t""no" 1>&6
  2929. fi
  2930. done
  2931. for ac_func in nanosleep
  2932. do
  2933. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2934. echo "configure:3541: checking for $ac_func" >&5
  2935. cat > conftest.$ac_ext <<EOF
  2936. #line 3544 "configure"
  2937. #include "confdefs.h"
  2938. /* System header to define __stub macros and hopefully few prototypes,
  2939. which can conflict with char $ac_func(); below. */
  2940. #include <assert.h>
  2941. /* Override any gcc2 internal prototype to avoid an error. */
  2942. /* We use char because int might match the return type of a gcc2
  2943. builtin and then its argument prototype would still apply. */
  2944. char $ac_func();
  2945. int main() {
  2946. /* The GNU C library defines this for functions which it implements
  2947. to always fail with ENOSYS. Some functions are actually named
  2948. something starting with __ and the normal name is an alias. */
  2949. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2950. choke me
  2951. #else
  2952. $ac_func();
  2953. #endif
  2954. ; return 0; }
  2955. EOF
  2956. if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2957. rm -rf conftest*
  2958. eval "ac_cv_func_$ac_func=yes"
  2959. else
  2960. echo "configure: failed program was:" >&5
  2961. cat conftest.$ac_ext >&5
  2962. rm -rf conftest*
  2963. eval "ac_cv_func_$ac_func=no"
  2964. fi
  2965. rm -f conftest*
  2966. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2967. echo "$ac_t""yes" 1>&6
  2968. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2969. cat >> confdefs.h <<EOF
  2970. #define $ac_tr_func 1
  2971. EOF
  2972. else
  2973. echo "$ac_t""no" 1>&6
  2974. fi
  2975. done
  2976. if test "$cross_compiling" != "yes" ; then
  2977. echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
  2978. echo "configure:3592: checking whether setpgrp takes no argument" >&5
  2979. if test "$cross_compiling" = yes; then
  2980. { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
  2981. else
  2982. cat > conftest.$ac_ext <<EOF
  2983. #line 3598 "configure"
  2984. #include "confdefs.h"
  2985. #ifdef HAVE_UNISTD_H
  2986. #include <unistd.h>
  2987. #endif
  2988. /*
  2989. * If this system has a BSD-style setpgrp, which takes arguments, exit
  2990. * successfully.
  2991. */
  2992. main()
  2993. {
  2994. if (setpgrp(1,1) == -1)
  2995. exit(0);
  2996. else
  2997. exit(1);
  2998. }
  2999. EOF
  3000. if { (eval echo configure:3618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  3001. then
  3002. ac_cv_func_setpgrp_void=no
  3003. else
  3004. echo "configure: failed program was:" >&5
  3005. cat conftest.$ac_ext >&5
  3006. rm -fr conftest*
  3007. ac_cv_func_setpgrp_void=yes
  3008. fi
  3009. rm -fr conftest*
  3010. fi
  3011. echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
  3012. if test $ac_cv_func_setpgrp_void = yes; then
  3013. cat >> confdefs.h <<\EOF
  3014. #define SETPGRP_VOID 1
  3015. EOF
  3016. fi
  3017. else
  3018. CROSS_COMPILING=1
  3019. fi
  3020. echo $ac_n "checking for long long int""... $ac_c" 1>&6
  3021. echo "configure:3646: checking for long long int" >&5
  3022. cat > conftest.$ac_ext <<EOF
  3023. #line 3648 "configure"
  3024. #include "confdefs.h"
  3025. int main() {
  3026. long long int x;
  3027. ; return 0; }
  3028. EOF
  3029. if { (eval echo configure:3655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3030. rm -rf conftest*
  3031. echo "$ac_t""yes" 1>&6
  3032. cat >> confdefs.h <<\EOF
  3033. #define HAVE_LONG_LONG_INT 1
  3034. EOF
  3035. else
  3036. echo "configure: failed program was:" >&5
  3037. cat conftest.$ac_ext >&5
  3038. rm -rf conftest*
  3039. echo "$ac_t""no" 1>&6
  3040. fi
  3041. rm -f conftest*
  3042. echo $ac_n "checking for int64_t""... $ac_c" 1>&6
  3043. echo "configure:3675: checking for int64_t" >&5
  3044. cat > conftest.$ac_ext <<EOF
  3045. #line 3677 "configure"
  3046. #include "confdefs.h"
  3047. #include <sys/types.h>
  3048. int main() {
  3049. int64_t x;
  3050. ; return 0; }
  3051. EOF
  3052. if { (eval echo configure:3684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3053. rm -rf conftest*
  3054. echo "$ac_t""yes" 1>&6
  3055. cat >> confdefs.h <<\EOF
  3056. #define HAVE_INT64_T 1
  3057. EOF
  3058. else
  3059. echo "configure: failed program was:" >&5
  3060. cat conftest.$ac_ext >&5
  3061. rm -rf conftest*
  3062. echo "$ac_t""no" 1>&6
  3063. fi
  3064. rm -f conftest*
  3065. echo $ac_n "checking for W11""... $ac_c" 1>&6
  3066. echo "configure:3704: checking for W11" >&5
  3067. case "$enable_w11" in
  3068. yes|no) echo "$ac_t"""$enable_w11"" 1>&6 ;;
  3069. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  3070. esac
  3071. USE_X11=
  3072. USE_W11=
  3073. XLIB=
  3074. XTLIB=
  3075. if test "$enable_w11" = "yes" ; then
  3076. X_CFLAGS=-I${SRCDIR}/display/drivers/windows/libW11
  3077. X_LIBS='-L$(LIBDIR)'
  3078. USE_W11="1"
  3079. USE_X11="1"
  3080. XLIB=-lX11
  3081. CFLAGS="$CFLAGS -D__W98__"
  3082. else
  3083. # If we find X, set shell vars x_includes and x_libraries to the
  3084. # paths, otherwise set no_x=yes.
  3085. # Uses ac_ vars as temps to allow command line to override cache and checks.
  3086. # --without-x overrides everything else, but does not touch the cache.
  3087. echo $ac_n "checking for X""... $ac_c" 1>&6
  3088. echo "configure:3732: checking for X" >&5
  3089. # Check whether --with-x or --without-x was given.
  3090. if test "${with_x+set}" = set; then
  3091. withval="$with_x"
  3092. :
  3093. fi
  3094. # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
  3095. if test "x$with_x" = xno; then
  3096. # The user explicitly disabled X.
  3097. have_x=disabled
  3098. else
  3099. if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  3100. # Both variables are already set.
  3101. have_x=yes
  3102. else
  3103. # One or both of the vars are not set, and there is no cached value.
  3104. ac_x_includes=NO ac_x_libraries=NO
  3105. rm -fr conftestdir
  3106. if mkdir conftestdir; then
  3107. cd conftestdir
  3108. # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  3109. cat > Imakefile <<'EOF'
  3110. acfindx:
  3111. @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  3112. EOF
  3113. if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  3114. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  3115. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  3116. # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  3117. for ac_extension in a so sl; do
  3118. if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  3119. test -f $ac_im_libdir/libX11.$ac_extension; then
  3120. ac_im_usrlibdir=$ac_im_libdir; break
  3121. fi
  3122. done
  3123. # Screen out bogus values from the imake configuration. They are
  3124. # bogus both because they are the default anyway, and because
  3125. # using them would break gcc on systems where it needs fixed includes.
  3126. case "$ac_im_incroot" in
  3127. /usr/include) ;;
  3128. *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  3129. esac
  3130. case "$ac_im_usrlibdir" in
  3131. /usr/lib | /lib) ;;
  3132. *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  3133. esac
  3134. fi
  3135. cd ..
  3136. rm -fr conftestdir
  3137. fi
  3138. if test "$ac_x_includes" = NO; then
  3139. # Guess where to find include files, by looking for this one X11 .h file.
  3140. test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  3141. # First, try using that file with no special directory specified.
  3142. cat > conftest.$ac_ext <<EOF
  3143. #line 3792 "configure"
  3144. #include "confdefs.h"
  3145. #include <$x_direct_test_include>
  3146. EOF
  3147. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3148. { (eval echo configure:3797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3149. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3150. if test -z "$ac_err"; then
  3151. rm -rf conftest*
  3152. # We can compile using X headers with no special include directory.
  3153. ac_x_includes=
  3154. else
  3155. echo "$ac_err" >&5
  3156. echo "configure: failed program was:" >&5
  3157. cat conftest.$ac_ext >&5
  3158. rm -rf conftest*
  3159. # Look for the header file in a standard set of common directories.
  3160. # Check X11 before X11Rn because it is often a symlink to the current release.
  3161. for ac_dir in \
  3162. /usr/X11/include \
  3163. /usr/X11R6/include \
  3164. /usr/X11R5/include \
  3165. /usr/X11R4/include \
  3166. \
  3167. /usr/include/X11 \
  3168. /usr/include/X11R6 \
  3169. /usr/include/X11R5 \
  3170. /usr/include/X11R4 \
  3171. \
  3172. /usr/local/X11/include \
  3173. /usr/local/X11R6/include \
  3174. /usr/local/X11R5/include \
  3175. /usr/local/X11R4/include \
  3176. \
  3177. /usr/local/include/X11 \
  3178. /usr/local/include/X11R6 \
  3179. /usr/local/include/X11R5 \
  3180. /usr/local/include/X11R4 \
  3181. \
  3182. /usr/X386/include \
  3183. /usr/x386/include \
  3184. /usr/XFree86/include/X11 \
  3185. \
  3186. /usr/include \
  3187. /usr/local/include \
  3188. /usr/unsupported/include \
  3189. /usr/athena/include \
  3190. /usr/local/x11r5/include \
  3191. /usr/lpp/Xamples/include \
  3192. \
  3193. /usr/openwin/include \
  3194. /usr/openwin/share/include \
  3195. ; \
  3196. do
  3197. if test -r "$ac_dir/$x_direct_test_include"; then
  3198. ac_x_includes=$ac_dir
  3199. break
  3200. fi
  3201. done
  3202. fi
  3203. rm -f conftest*
  3204. fi # $ac_x_includes = NO
  3205. if test "$ac_x_libraries" = NO; then
  3206. # Check for the libraries.
  3207. test -z "$x_direct_test_library" && x_direct_test_library=Xt
  3208. test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  3209. # See if we find them without any special options.
  3210. # Don't add to $LIBS permanently.
  3211. ac_save_LIBS="$LIBS"
  3212. LIBS="-l$x_direct_test_library $LIBS"
  3213. cat > conftest.$ac_ext <<EOF
  3214. #line 3866 "configure"
  3215. #include "confdefs.h"
  3216. int main() {
  3217. ${x_direct_test_function}()
  3218. ; return 0; }
  3219. EOF
  3220. if { (eval echo configure:3873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3221. rm -rf conftest*
  3222. LIBS="$ac_save_LIBS"
  3223. # We can link X programs with no special library path.
  3224. ac_x_libraries=
  3225. else
  3226. echo "configure: failed program was:" >&5
  3227. cat conftest.$ac_ext >&5
  3228. rm -rf conftest*
  3229. LIBS="$ac_save_LIBS"
  3230. # First see if replacing the include by lib works.
  3231. # Check X11 before X11Rn because it is often a symlink to the current release.
  3232. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  3233. /usr/X11/lib \
  3234. /usr/X11R6/lib \
  3235. /usr/X11R5/lib \
  3236. /usr/X11R4/lib \
  3237. \
  3238. /usr/lib/X11 \
  3239. /usr/lib/X11R6 \
  3240. /usr/lib/X11R5 \
  3241. /usr/lib/X11R4 \
  3242. \
  3243. /usr/local/X11/lib \
  3244. /usr/local/X11R6/lib \
  3245. /usr/local/X11R5/lib \
  3246. /usr/local/X11R4/lib \
  3247. \
  3248. /usr/local/lib/X11 \
  3249. /usr/local/lib/X11R6 \
  3250. /usr/local/lib/X11R5 \
  3251. /usr/local/lib/X11R4 \
  3252. \
  3253. /usr/X386/lib \
  3254. /usr/x386/lib \
  3255. /usr/XFree86/lib/X11 \
  3256. \
  3257. /usr/lib \
  3258. /usr/local/lib \
  3259. /usr/unsupported/lib \
  3260. /usr/athena/lib \
  3261. /usr/local/x11r5/lib \
  3262. /usr/lpp/Xamples/lib \
  3263. /lib/usr/lib/X11 \
  3264. \
  3265. /usr/openwin/lib \
  3266. /usr/openwin/share/lib \
  3267. ; \
  3268. do
  3269. for ac_extension in a so sl; do
  3270. if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  3271. ac_x_libraries=$ac_dir
  3272. break 2
  3273. fi
  3274. done
  3275. done
  3276. fi
  3277. rm -f conftest*
  3278. fi # $ac_x_libraries = NO
  3279. if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  3280. # Didn't find X anywhere. Cache the known absence of X.
  3281. ac_cv_have_x="have_x=no"
  3282. else
  3283. # Record where we found X for the cache.
  3284. ac_cv_have_x="have_x=yes \
  3285. ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  3286. fi
  3287. fi
  3288. eval "$ac_cv_have_x"
  3289. fi # $with_x != no
  3290. if test "$have_x" != yes; then
  3291. echo "$ac_t""$have_x" 1>&6
  3292. no_x=yes
  3293. else
  3294. # If each of the values was on the command line, it overrides each guess.
  3295. test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  3296. test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  3297. # Update the cache value to reflect the command line values.
  3298. ac_cv_have_x="have_x=yes \
  3299. ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  3300. echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  3301. fi
  3302. if test "$no_x" = yes; then
  3303. # Not all programs may use this symbol, but it does not hurt to define it.
  3304. cat >> confdefs.h <<\EOF
  3305. #define X_DISPLAY_MISSING 1
  3306. EOF
  3307. X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
  3308. else
  3309. if test -n "$x_includes"; then
  3310. X_CFLAGS="$X_CFLAGS -I$x_includes"
  3311. fi
  3312. # It would also be nice to do this for all -L options, not just this one.
  3313. if test -n "$x_libraries"; then
  3314. X_LIBS="$X_LIBS -L$x_libraries"
  3315. # For Solaris; some versions of Sun CC require a space after -R and
  3316. # others require no space. Words are not sufficient . . . .
  3317. case "`(uname -sr) 2>/dev/null`" in
  3318. "SunOS 5"*)
  3319. echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
  3320. echo "configure:3978: checking whether -R must be followed by a space" >&5
  3321. ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
  3322. cat > conftest.$ac_ext <<EOF
  3323. #line 3981 "configure"
  3324. #include "confdefs.h"
  3325. int main() {
  3326. ; return 0; }
  3327. EOF
  3328. if { (eval echo configure:3988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3329. rm -rf conftest*
  3330. ac_R_nospace=yes
  3331. else
  3332. echo "configure: failed program was:" >&5
  3333. cat conftest.$ac_ext >&5
  3334. rm -rf conftest*
  3335. ac_R_nospace=no
  3336. fi
  3337. rm -f conftest*
  3338. if test $ac_R_nospace = yes; then
  3339. echo "$ac_t""no" 1>&6
  3340. X_LIBS="$X_LIBS -R$x_libraries"
  3341. else
  3342. LIBS="$ac_xsave_LIBS -R $x_libraries"
  3343. cat > conftest.$ac_ext <<EOF
  3344. #line 4004 "configure"
  3345. #include "confdefs.h"
  3346. int main() {
  3347. ; return 0; }
  3348. EOF
  3349. if { (eval echo configure:4011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3350. rm -rf conftest*
  3351. ac_R_space=yes
  3352. else
  3353. echo "configure: failed program was:" >&5
  3354. cat conftest.$ac_ext >&5
  3355. rm -rf conftest*
  3356. ac_R_space=no
  3357. fi
  3358. rm -f conftest*
  3359. if test $ac_R_space = yes; then
  3360. echo "$ac_t""yes" 1>&6
  3361. X_LIBS="$X_LIBS -R $x_libraries"
  3362. else
  3363. echo "$ac_t""neither works" 1>&6
  3364. fi
  3365. fi
  3366. LIBS="$ac_xsave_LIBS"
  3367. esac
  3368. fi
  3369. # Check for system-dependent libraries X programs must link with.
  3370. # Do this before checking for the system-independent R6 libraries
  3371. # (-lICE), since we may need -lsocket or whatever for X linking.
  3372. if test "$ISC" = yes; then
  3373. X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  3374. else
  3375. # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
  3376. # libraries were built with DECnet support. And karl@cs.umb.edu says
  3377. # the Alpha needs dnet_stub (dnet does not exist).
  3378. echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
  3379. echo "configure:4043: checking for dnet_ntoa in -ldnet" >&5
  3380. ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  3381. ac_save_LIBS="$LIBS"
  3382. LIBS="-ldnet $LIBS"
  3383. cat > conftest.$ac_ext <<EOF
  3384. #line 4049 "configure"
  3385. #include "confdefs.h"
  3386. /* Override any gcc2 internal prototype to avoid an error. */
  3387. /* We use char because int might match the return type of a gcc2
  3388. builtin and then its argument prototype would still apply. */
  3389. char dnet_ntoa();
  3390. int main() {
  3391. dnet_ntoa()
  3392. ; return 0; }
  3393. EOF
  3394. if { (eval echo configure:4060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3395. rm -rf conftest*
  3396. eval "ac_cv_lib_$ac_lib_var=yes"
  3397. else
  3398. echo "configure: failed program was:" >&5
  3399. cat conftest.$ac_ext >&5
  3400. rm -rf conftest*
  3401. eval "ac_cv_lib_$ac_lib_var=no"
  3402. fi
  3403. rm -f conftest*
  3404. LIBS="$ac_save_LIBS"
  3405. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3406. echo "$ac_t""yes" 1>&6
  3407. X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  3408. else
  3409. echo "$ac_t""no" 1>&6
  3410. fi
  3411. if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  3412. echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
  3413. echo "configure:4081: checking for dnet_ntoa in -ldnet_stub" >&5
  3414. ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  3415. ac_save_LIBS="$LIBS"
  3416. LIBS="-ldnet_stub $LIBS"
  3417. cat > conftest.$ac_ext <<EOF
  3418. #line 4087 "configure"
  3419. #include "confdefs.h"
  3420. /* Override any gcc2 internal prototype to avoid an error. */
  3421. /* We use char because int might match the return type of a gcc2
  3422. builtin and then its argument prototype would still apply. */
  3423. char dnet_ntoa();
  3424. int main() {
  3425. dnet_ntoa()
  3426. ; return 0; }
  3427. EOF
  3428. if { (eval echo configure:4098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3429. rm -rf conftest*
  3430. eval "ac_cv_lib_$ac_lib_var=yes"
  3431. else
  3432. echo "configure: failed program was:" >&5
  3433. cat conftest.$ac_ext >&5
  3434. rm -rf conftest*
  3435. eval "ac_cv_lib_$ac_lib_var=no"
  3436. fi
  3437. rm -f conftest*
  3438. LIBS="$ac_save_LIBS"
  3439. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3440. echo "$ac_t""yes" 1>&6
  3441. X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  3442. else
  3443. echo "$ac_t""no" 1>&6
  3444. fi
  3445. fi
  3446. # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
  3447. # to get the SysV transport functions.
  3448. # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
  3449. # needs -lnsl.
  3450. # The nsl library prevents programs from opening the X display
  3451. # on Irix 5.2, according to dickey@clark.net.
  3452. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  3453. echo "configure:4126: checking for gethostbyname" >&5
  3454. cat > conftest.$ac_ext <<EOF
  3455. #line 4129 "configure"
  3456. #include "confdefs.h"
  3457. /* System header to define __stub macros and hopefully few prototypes,
  3458. which can conflict with char gethostbyname(); below. */
  3459. #include <assert.h>
  3460. /* Override any gcc2 internal prototype to avoid an error. */
  3461. /* We use char because int might match the return type of a gcc2
  3462. builtin and then its argument prototype would still apply. */
  3463. char gethostbyname();
  3464. int main() {
  3465. /* The GNU C library defines this for functions which it implements
  3466. to always fail with ENOSYS. Some functions are actually named
  3467. something starting with __ and the normal name is an alias. */
  3468. #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  3469. choke me
  3470. #else
  3471. gethostbyname();
  3472. #endif
  3473. ; return 0; }
  3474. EOF
  3475. if { (eval echo configure:4152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3476. rm -rf conftest*
  3477. eval "ac_cv_func_gethostbyname=yes"
  3478. else
  3479. echo "configure: failed program was:" >&5
  3480. cat conftest.$ac_ext >&5
  3481. rm -rf conftest*
  3482. eval "ac_cv_func_gethostbyname=no"
  3483. fi
  3484. rm -f conftest*
  3485. if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  3486. echo "$ac_t""yes" 1>&6
  3487. :
  3488. else
  3489. echo "$ac_t""no" 1>&6
  3490. fi
  3491. if test $ac_cv_func_gethostbyname = no; then
  3492. echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
  3493. echo "configure:4172: checking for gethostbyname in -lnsl" >&5
  3494. ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
  3495. ac_save_LIBS="$LIBS"
  3496. LIBS="-lnsl $LIBS"
  3497. cat > conftest.$ac_ext <<EOF
  3498. #line 4178 "configure"
  3499. #include "confdefs.h"
  3500. /* Override any gcc2 internal prototype to avoid an error. */
  3501. /* We use char because int might match the return type of a gcc2
  3502. builtin and then its argument prototype would still apply. */
  3503. char gethostbyname();
  3504. int main() {
  3505. gethostbyname()
  3506. ; return 0; }
  3507. EOF
  3508. if { (eval echo configure:4189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3509. rm -rf conftest*
  3510. eval "ac_cv_lib_$ac_lib_var=yes"
  3511. else
  3512. echo "configure: failed program was:" >&5
  3513. cat conftest.$ac_ext >&5
  3514. rm -rf conftest*
  3515. eval "ac_cv_lib_$ac_lib_var=no"
  3516. fi
  3517. rm -f conftest*
  3518. LIBS="$ac_save_LIBS"
  3519. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3520. echo "$ac_t""yes" 1>&6
  3521. X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  3522. else
  3523. echo "$ac_t""no" 1>&6
  3524. fi
  3525. fi
  3526. # lieder@skyler.mavd.honeywell.com says without -lsocket,
  3527. # socket/setsockopt and other routines are undefined under SCO ODT
  3528. # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
  3529. # on later versions), says simon@lia.di.epfl.ch: it contains
  3530. # gethostby* variants that don't use the nameserver (or something).
  3531. # -lsocket must be given before -lnsl if both are needed.
  3532. # We assume that if connect needs -lnsl, so does gethostbyname.
  3533. echo $ac_n "checking for connect""... $ac_c" 1>&6
  3534. echo "configure:4218: checking for connect" >&5
  3535. cat > conftest.$ac_ext <<EOF
  3536. #line 4221 "configure"
  3537. #include "confdefs.h"
  3538. /* System header to define __stub macros and hopefully few prototypes,
  3539. which can conflict with char connect(); below. */
  3540. #include <assert.h>
  3541. /* Override any gcc2 internal prototype to avoid an error. */
  3542. /* We use char because int might match the return type of a gcc2
  3543. builtin and then its argument prototype would still apply. */
  3544. char connect();
  3545. int main() {
  3546. /* The GNU C library defines this for functions which it implements
  3547. to always fail with ENOSYS. Some functions are actually named
  3548. something starting with __ and the normal name is an alias. */
  3549. #if defined (__stub_connect) || defined (__stub___connect)
  3550. choke me
  3551. #else
  3552. connect();
  3553. #endif
  3554. ; return 0; }
  3555. EOF
  3556. if { (eval echo configure:4244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3557. rm -rf conftest*
  3558. eval "ac_cv_func_connect=yes"
  3559. else
  3560. echo "configure: failed program was:" >&5
  3561. cat conftest.$ac_ext >&5
  3562. rm -rf conftest*
  3563. eval "ac_cv_func_connect=no"
  3564. fi
  3565. rm -f conftest*
  3566. if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  3567. echo "$ac_t""yes" 1>&6
  3568. :
  3569. else
  3570. echo "$ac_t""no" 1>&6
  3571. fi
  3572. if test $ac_cv_func_connect = no; then
  3573. echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
  3574. echo "configure:4264: checking for connect in -lsocket" >&5
  3575. ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
  3576. ac_save_LIBS="$LIBS"
  3577. LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
  3578. cat > conftest.$ac_ext <<EOF
  3579. #line 4270 "configure"
  3580. #include "confdefs.h"
  3581. /* Override any gcc2 internal prototype to avoid an error. */
  3582. /* We use char because int might match the return type of a gcc2
  3583. builtin and then its argument prototype would still apply. */
  3584. char connect();
  3585. int main() {
  3586. connect()
  3587. ; return 0; }
  3588. EOF
  3589. if { (eval echo configure:4281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3590. rm -rf conftest*
  3591. eval "ac_cv_lib_$ac_lib_var=yes"
  3592. else
  3593. echo "configure: failed program was:" >&5
  3594. cat conftest.$ac_ext >&5
  3595. rm -rf conftest*
  3596. eval "ac_cv_lib_$ac_lib_var=no"
  3597. fi
  3598. rm -f conftest*
  3599. LIBS="$ac_save_LIBS"
  3600. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3601. echo "$ac_t""yes" 1>&6
  3602. X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
  3603. else
  3604. echo "$ac_t""no" 1>&6
  3605. fi
  3606. fi
  3607. # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
  3608. echo $ac_n "checking for remove""... $ac_c" 1>&6
  3609. echo "configure:4304: checking for remove" >&5
  3610. cat > conftest.$ac_ext <<EOF
  3611. #line 4307 "configure"
  3612. #include "confdefs.h"
  3613. /* System header to define __stub macros and hopefully few prototypes,
  3614. which can conflict with char remove(); below. */
  3615. #include <assert.h>
  3616. /* Override any gcc2 internal prototype to avoid an error. */
  3617. /* We use char because int might match the return type of a gcc2
  3618. builtin and then its argument prototype would still apply. */
  3619. char remove();
  3620. int main() {
  3621. /* The GNU C library defines this for functions which it implements
  3622. to always fail with ENOSYS. Some functions are actually named
  3623. something starting with __ and the normal name is an alias. */
  3624. #if defined (__stub_remove) || defined (__stub___remove)
  3625. choke me
  3626. #else
  3627. remove();
  3628. #endif
  3629. ; return 0; }
  3630. EOF
  3631. if { (eval echo configure:4330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3632. rm -rf conftest*
  3633. eval "ac_cv_func_remove=yes"
  3634. else
  3635. echo "configure: failed program was:" >&5
  3636. cat conftest.$ac_ext >&5
  3637. rm -rf conftest*
  3638. eval "ac_cv_func_remove=no"
  3639. fi
  3640. rm -f conftest*
  3641. if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  3642. echo "$ac_t""yes" 1>&6
  3643. :
  3644. else
  3645. echo "$ac_t""no" 1>&6
  3646. fi
  3647. if test $ac_cv_func_remove = no; then
  3648. echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
  3649. echo "configure:4350: checking for remove in -lposix" >&5
  3650. ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
  3651. ac_save_LIBS="$LIBS"
  3652. LIBS="-lposix $LIBS"
  3653. cat > conftest.$ac_ext <<EOF
  3654. #line 4356 "configure"
  3655. #include "confdefs.h"
  3656. /* Override any gcc2 internal prototype to avoid an error. */
  3657. /* We use char because int might match the return type of a gcc2
  3658. builtin and then its argument prototype would still apply. */
  3659. char remove();
  3660. int main() {
  3661. remove()
  3662. ; return 0; }
  3663. EOF
  3664. if { (eval echo configure:4367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3665. rm -rf conftest*
  3666. eval "ac_cv_lib_$ac_lib_var=yes"
  3667. else
  3668. echo "configure: failed program was:" >&5
  3669. cat conftest.$ac_ext >&5
  3670. rm -rf conftest*
  3671. eval "ac_cv_lib_$ac_lib_var=no"
  3672. fi
  3673. rm -f conftest*
  3674. LIBS="$ac_save_LIBS"
  3675. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3676. echo "$ac_t""yes" 1>&6
  3677. X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
  3678. else
  3679. echo "$ac_t""no" 1>&6
  3680. fi
  3681. fi
  3682. # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
  3683. echo $ac_n "checking for shmat""... $ac_c" 1>&6
  3684. echo "configure:4390: checking for shmat" >&5
  3685. cat > conftest.$ac_ext <<EOF
  3686. #line 4393 "configure"
  3687. #include "confdefs.h"
  3688. /* System header to define __stub macros and hopefully few prototypes,
  3689. which can conflict with char shmat(); below. */
  3690. #include <assert.h>
  3691. /* Override any gcc2 internal prototype to avoid an error. */
  3692. /* We use char because int might match the return type of a gcc2
  3693. builtin and then its argument prototype would still apply. */
  3694. char shmat();
  3695. int main() {
  3696. /* The GNU C library defines this for functions which it implements
  3697. to always fail with ENOSYS. Some functions are actually named
  3698. something starting with __ and the normal name is an alias. */
  3699. #if defined (__stub_shmat) || defined (__stub___shmat)
  3700. choke me
  3701. #else
  3702. shmat();
  3703. #endif
  3704. ; return 0; }
  3705. EOF
  3706. if { (eval echo configure:4416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3707. rm -rf conftest*
  3708. eval "ac_cv_func_shmat=yes"
  3709. else
  3710. echo "configure: failed program was:" >&5
  3711. cat conftest.$ac_ext >&5
  3712. rm -rf conftest*
  3713. eval "ac_cv_func_shmat=no"
  3714. fi
  3715. rm -f conftest*
  3716. if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  3717. echo "$ac_t""yes" 1>&6
  3718. :
  3719. else
  3720. echo "$ac_t""no" 1>&6
  3721. fi
  3722. if test $ac_cv_func_shmat = no; then
  3723. echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
  3724. echo "configure:4436: checking for shmat in -lipc" >&5
  3725. ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
  3726. ac_save_LIBS="$LIBS"
  3727. LIBS="-lipc $LIBS"
  3728. cat > conftest.$ac_ext <<EOF
  3729. #line 4442 "configure"
  3730. #include "confdefs.h"
  3731. /* Override any gcc2 internal prototype to avoid an error. */
  3732. /* We use char because int might match the return type of a gcc2
  3733. builtin and then its argument prototype would still apply. */
  3734. char shmat();
  3735. int main() {
  3736. shmat()
  3737. ; return 0; }
  3738. EOF
  3739. if { (eval echo configure:4453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3740. rm -rf conftest*
  3741. eval "ac_cv_lib_$ac_lib_var=yes"
  3742. else
  3743. echo "configure: failed program was:" >&5
  3744. cat conftest.$ac_ext >&5
  3745. rm -rf conftest*
  3746. eval "ac_cv_lib_$ac_lib_var=no"
  3747. fi
  3748. rm -f conftest*
  3749. LIBS="$ac_save_LIBS"
  3750. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3751. echo "$ac_t""yes" 1>&6
  3752. X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
  3753. else
  3754. echo "$ac_t""no" 1>&6
  3755. fi
  3756. fi
  3757. fi
  3758. # Check for libraries that X11R6 Xt/Xaw programs need.
  3759. ac_save_LDFLAGS="$LDFLAGS"
  3760. test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  3761. # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  3762. # check for ICE first), but we must link in the order -lSM -lICE or
  3763. # we get undefined symbols. So assume we have SM if we have ICE.
  3764. # These have to be linked with before -lX11, unlike the other
  3765. # libraries we check for below, so use a different variable.
  3766. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  3767. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
  3768. echo "configure:4485: checking for IceConnectionNumber in -lICE" >&5
  3769. ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
  3770. ac_save_LIBS="$LIBS"
  3771. LIBS="-lICE $X_EXTRA_LIBS $LIBS"
  3772. cat > conftest.$ac_ext <<EOF
  3773. #line 4491 "configure"
  3774. #include "confdefs.h"
  3775. /* Override any gcc2 internal prototype to avoid an error. */
  3776. /* We use char because int might match the return type of a gcc2
  3777. builtin and then its argument prototype would still apply. */
  3778. char IceConnectionNumber();
  3779. int main() {
  3780. IceConnectionNumber()
  3781. ; return 0; }
  3782. EOF
  3783. if { (eval echo configure:4502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3784. rm -rf conftest*
  3785. eval "ac_cv_lib_$ac_lib_var=yes"
  3786. else
  3787. echo "configure: failed program was:" >&5
  3788. cat conftest.$ac_ext >&5
  3789. rm -rf conftest*
  3790. eval "ac_cv_lib_$ac_lib_var=no"
  3791. fi
  3792. rm -f conftest*
  3793. LIBS="$ac_save_LIBS"
  3794. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3795. echo "$ac_t""yes" 1>&6
  3796. X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  3797. else
  3798. echo "$ac_t""no" 1>&6
  3799. fi
  3800. LDFLAGS="$ac_save_LDFLAGS"
  3801. fi
  3802. if test "$no_x" != "yes"; then
  3803. USE_X11="1"
  3804. XLIB=-lX11
  3805. XTLIB=-lXt
  3806. fi
  3807. fi
  3808. # Note that some systems (FreeBSD for example) need an extra library for
  3809. # cuserid
  3810. ac_save_libs="$LIBS"
  3811. LIBS=""
  3812. echo $ac_n "checking for library containing cuserid""... $ac_c" 1>&6
  3813. echo "configure:4542: checking for library containing cuserid" >&5
  3814. ac_func_search_save_LIBS="$LIBS"
  3815. ac_cv_search_cuserid="no"
  3816. cat > conftest.$ac_ext <<EOF
  3817. #line 4547 "configure"
  3818. #include "confdefs.h"
  3819. /* Override any gcc2 internal prototype to avoid an error. */
  3820. /* We use char because int might match the return type of a gcc2
  3821. builtin and then its argument prototype would still apply. */
  3822. char cuserid();
  3823. int main() {
  3824. cuserid()
  3825. ; return 0; }
  3826. EOF
  3827. if { (eval echo configure:4558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3828. rm -rf conftest*
  3829. ac_cv_search_cuserid="none required"
  3830. else
  3831. echo "configure: failed program was:" >&5
  3832. cat conftest.$ac_ext >&5
  3833. fi
  3834. rm -f conftest*
  3835. test "$ac_cv_search_cuserid" = "no" && for i in compat; do
  3836. LIBS="-l$i $ac_func_search_save_LIBS"
  3837. cat > conftest.$ac_ext <<EOF
  3838. #line 4569 "configure"
  3839. #include "confdefs.h"
  3840. /* Override any gcc2 internal prototype to avoid an error. */
  3841. /* We use char because int might match the return type of a gcc2
  3842. builtin and then its argument prototype would still apply. */
  3843. char cuserid();
  3844. int main() {
  3845. cuserid()
  3846. ; return 0; }
  3847. EOF
  3848. if { (eval echo configure:4580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3849. rm -rf conftest*
  3850. ac_cv_search_cuserid="-l$i"
  3851. break
  3852. else
  3853. echo "configure: failed program was:" >&5
  3854. cat conftest.$ac_ext >&5
  3855. fi
  3856. rm -f conftest*
  3857. done
  3858. LIBS="$ac_func_search_save_LIBS"
  3859. echo "$ac_t""$ac_cv_search_cuserid" 1>&6
  3860. if test "$ac_cv_search_cuserid" != "no"; then
  3861. test "$ac_cv_search_cuserid" = "none required" || LIBS="$ac_cv_search_cuserid $LIBS"
  3862. else :
  3863. fi
  3864. DBMIEXTRALIB="$LIBS"
  3865. LIBS="$ac_save_libs"
  3866. for ac_func in asprintf
  3867. do
  3868. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3869. echo "configure:4606: checking for $ac_func" >&5
  3870. cat > conftest.$ac_ext <<EOF
  3871. #line 4609 "configure"
  3872. #include "confdefs.h"
  3873. /* System header to define __stub macros and hopefully few prototypes,
  3874. which can conflict with char $ac_func(); below. */
  3875. #include <assert.h>
  3876. /* Override any gcc2 internal prototype to avoid an error. */
  3877. /* We use char because int might match the return type of a gcc2
  3878. builtin and then its argument prototype would still apply. */
  3879. char $ac_func();
  3880. int main() {
  3881. /* The GNU C library defines this for functions which it implements
  3882. to always fail with ENOSYS. Some functions are actually named
  3883. something starting with __ and the normal name is an alias. */
  3884. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3885. choke me
  3886. #else
  3887. $ac_func();
  3888. #endif
  3889. ; return 0; }
  3890. EOF
  3891. if { (eval echo configure:4632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3892. rm -rf conftest*
  3893. eval "ac_cv_func_$ac_func=yes"
  3894. else
  3895. echo "configure: failed program was:" >&5
  3896. cat conftest.$ac_ext >&5
  3897. rm -rf conftest*
  3898. eval "ac_cv_func_$ac_func=no"
  3899. fi
  3900. rm -f conftest*
  3901. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3902. echo "$ac_t""yes" 1>&6
  3903. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3904. cat >> confdefs.h <<EOF
  3905. #define $ac_tr_func 1
  3906. EOF
  3907. else
  3908. echo "$ac_t""no" 1>&6
  3909. fi
  3910. done
  3911. # Test if mathlib needs -lm flag or is included with libc
  3912. echo $ac_n "checking for atan""... $ac_c" 1>&6
  3913. echo "configure:4659: checking for atan" >&5
  3914. cat > conftest.$ac_ext <<EOF
  3915. #line 4662 "configure"
  3916. #include "confdefs.h"
  3917. /* System header to define __stub macros and hopefully few prototypes,
  3918. which can conflict with char atan(); below. */
  3919. #include <assert.h>
  3920. /* Override any gcc2 internal prototype to avoid an error. */
  3921. /* We use char because int might match the return type of a gcc2
  3922. builtin and then its argument prototype would still apply. */
  3923. char atan();
  3924. int main() {
  3925. /* The GNU C library defines this for functions which it implements
  3926. to always fail with ENOSYS. Some functions are actually named
  3927. something starting with __ and the normal name is an alias. */
  3928. #if defined (__stub_atan) || defined (__stub___atan)
  3929. choke me
  3930. #else
  3931. atan();
  3932. #endif
  3933. ; return 0; }
  3934. EOF
  3935. if { (eval echo configure:4685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3936. rm -rf conftest*
  3937. eval "ac_cv_func_atan=yes"
  3938. else
  3939. echo "configure: failed program was:" >&5
  3940. cat conftest.$ac_ext >&5
  3941. rm -rf conftest*
  3942. eval "ac_cv_func_atan=no"
  3943. fi
  3944. rm -f conftest*
  3945. if eval "test \"`echo '$ac_cv_func_'atan`\" = yes"; then
  3946. echo "$ac_t""yes" 1>&6
  3947. MATHLIB=
  3948. else
  3949. echo "$ac_t""no" 1>&6
  3950. echo $ac_n "checking for atan in -lm""... $ac_c" 1>&6
  3951. echo "configure:4703: checking for atan in -lm" >&5
  3952. ac_lib_var=`echo m'_'atan | sed 'y%./+-%__p_%'`
  3953. ac_save_LIBS="$LIBS"
  3954. LIBS="-lm $LIBS"
  3955. cat > conftest.$ac_ext <<EOF
  3956. #line 4709 "configure"
  3957. #include "confdefs.h"
  3958. /* Override any gcc2 internal prototype to avoid an error. */
  3959. /* We use char because int might match the return type of a gcc2
  3960. builtin and then its argument prototype would still apply. */
  3961. char atan();
  3962. int main() {
  3963. atan()
  3964. ; return 0; }
  3965. EOF
  3966. if { (eval echo configure:4720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3967. rm -rf conftest*
  3968. eval "ac_cv_lib_$ac_lib_var=yes"
  3969. else
  3970. echo "configure: failed program was:" >&5
  3971. cat conftest.$ac_ext >&5
  3972. rm -rf conftest*
  3973. eval "ac_cv_lib_$ac_lib_var=no"
  3974. fi
  3975. rm -f conftest*
  3976. LIBS="$ac_save_LIBS"
  3977. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3978. echo "$ac_t""yes" 1>&6
  3979. MATHLIB=-lm
  3980. else
  3981. echo "$ac_t""no" 1>&6
  3982. { echo "configure: error: *** Failed check for math library." 1>&2; exit 1; }
  3983. fi
  3984. fi
  3985. echo $ac_n "checking for dlsym""... $ac_c" 1>&6
  3986. echo "configure:4747: checking for dlsym" >&5
  3987. cat > conftest.$ac_ext <<EOF
  3988. #line 4750 "configure"
  3989. #include "confdefs.h"
  3990. /* System header to define __stub macros and hopefully few prototypes,
  3991. which can conflict with char dlsym(); below. */
  3992. #include <assert.h>
  3993. /* Override any gcc2 internal prototype to avoid an error. */
  3994. /* We use char because int might match the return type of a gcc2
  3995. builtin and then its argument prototype would still apply. */
  3996. char dlsym();
  3997. int main() {
  3998. /* The GNU C library defines this for functions which it implements
  3999. to always fail with ENOSYS. Some functions are actually named
  4000. something starting with __ and the normal name is an alias. */
  4001. #if defined (__stub_dlsym) || defined (__stub___dlsym)
  4002. choke me
  4003. #else
  4004. dlsym();
  4005. #endif
  4006. ; return 0; }
  4007. EOF
  4008. if { (eval echo configure:4773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4009. rm -rf conftest*
  4010. eval "ac_cv_func_dlsym=yes"
  4011. else
  4012. echo "configure: failed program was:" >&5
  4013. cat conftest.$ac_ext >&5
  4014. rm -rf conftest*
  4015. eval "ac_cv_func_dlsym=no"
  4016. fi
  4017. rm -f conftest*
  4018. if eval "test \"`echo '$ac_cv_func_'dlsym`\" = yes"; then
  4019. echo "$ac_t""yes" 1>&6
  4020. DLLIB=
  4021. else
  4022. echo "$ac_t""no" 1>&6
  4023. echo $ac_n "checking for dlsym in -ldl""... $ac_c" 1>&6
  4024. echo "configure:4791: checking for dlsym in -ldl" >&5
  4025. ac_lib_var=`echo dl'_'dlsym | sed 'y%./+-%__p_%'`
  4026. ac_save_LIBS="$LIBS"
  4027. LIBS="-ldl $LIBS"
  4028. cat > conftest.$ac_ext <<EOF
  4029. #line 4797 "configure"
  4030. #include "confdefs.h"
  4031. /* Override any gcc2 internal prototype to avoid an error. */
  4032. /* We use char because int might match the return type of a gcc2
  4033. builtin and then its argument prototype would still apply. */
  4034. char dlsym();
  4035. int main() {
  4036. dlsym()
  4037. ; return 0; }
  4038. EOF
  4039. if { (eval echo configure:4808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4040. rm -rf conftest*
  4041. eval "ac_cv_lib_$ac_lib_var=yes"
  4042. else
  4043. echo "configure: failed program was:" >&5
  4044. cat conftest.$ac_ext >&5
  4045. rm -rf conftest*
  4046. eval "ac_cv_lib_$ac_lib_var=no"
  4047. fi
  4048. rm -f conftest*
  4049. LIBS="$ac_save_LIBS"
  4050. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4051. echo "$ac_t""yes" 1>&6
  4052. DLLIB=-ldl
  4053. else
  4054. echo "$ac_t""no" 1>&6
  4055. DLLIB=
  4056. fi
  4057. fi
  4058. echo $ac_n "checking for iconv""... $ac_c" 1>&6
  4059. echo "configure:4835: checking for iconv" >&5
  4060. cat > conftest.$ac_ext <<EOF
  4061. #line 4838 "configure"
  4062. #include "confdefs.h"
  4063. /* System header to define __stub macros and hopefully few prototypes,
  4064. which can conflict with char iconv(); below. */
  4065. #include <assert.h>
  4066. /* Override any gcc2 internal prototype to avoid an error. */
  4067. /* We use char because int might match the return type of a gcc2
  4068. builtin and then its argument prototype would still apply. */
  4069. char iconv();
  4070. int main() {
  4071. /* The GNU C library defines this for functions which it implements
  4072. to always fail with ENOSYS. Some functions are actually named
  4073. something starting with __ and the normal name is an alias. */
  4074. #if defined (__stub_iconv) || defined (__stub___iconv)
  4075. choke me
  4076. #else
  4077. iconv();
  4078. #endif
  4079. ; return 0; }
  4080. EOF
  4081. if { (eval echo configure:4861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4082. rm -rf conftest*
  4083. eval "ac_cv_func_iconv=yes"
  4084. else
  4085. echo "configure: failed program was:" >&5
  4086. cat conftest.$ac_ext >&5
  4087. rm -rf conftest*
  4088. eval "ac_cv_func_iconv=no"
  4089. fi
  4090. rm -f conftest*
  4091. if eval "test \"`echo '$ac_cv_func_'iconv`\" = yes"; then
  4092. echo "$ac_t""yes" 1>&6
  4093. ICONVLIB=
  4094. else
  4095. echo "$ac_t""no" 1>&6
  4096. echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
  4097. echo "configure:4879: checking for iconv in -liconv" >&5
  4098. ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
  4099. ac_save_LIBS="$LIBS"
  4100. LIBS="-liconv $LIBS"
  4101. cat > conftest.$ac_ext <<EOF
  4102. #line 4885 "configure"
  4103. #include "confdefs.h"
  4104. /* Override any gcc2 internal prototype to avoid an error. */
  4105. /* We use char because int might match the return type of a gcc2
  4106. builtin and then its argument prototype would still apply. */
  4107. char iconv();
  4108. int main() {
  4109. iconv()
  4110. ; return 0; }
  4111. EOF
  4112. if { (eval echo configure:4896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4113. rm -rf conftest*
  4114. eval "ac_cv_lib_$ac_lib_var=yes"
  4115. else
  4116. echo "configure: failed program was:" >&5
  4117. cat conftest.$ac_ext >&5
  4118. rm -rf conftest*
  4119. eval "ac_cv_lib_$ac_lib_var=no"
  4120. fi
  4121. rm -f conftest*
  4122. LIBS="$ac_save_LIBS"
  4123. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4124. echo "$ac_t""yes" 1>&6
  4125. ICONVLIB=-liconv
  4126. else
  4127. echo "$ac_t""no" 1>&6
  4128. echo $ac_n "checking for iconv in -lgiconv""... $ac_c" 1>&6
  4129. echo "configure:4915: checking for iconv in -lgiconv" >&5
  4130. ac_lib_var=`echo giconv'_'iconv | sed 'y%./+-%__p_%'`
  4131. ac_save_LIBS="$LIBS"
  4132. LIBS="-lgiconv $LIBS"
  4133. cat > conftest.$ac_ext <<EOF
  4134. #line 4921 "configure"
  4135. #include "confdefs.h"
  4136. /* Override any gcc2 internal prototype to avoid an error. */
  4137. /* We use char because int might match the return type of a gcc2
  4138. builtin and then its argument prototype would still apply. */
  4139. char iconv();
  4140. int main() {
  4141. iconv()
  4142. ; return 0; }
  4143. EOF
  4144. if { (eval echo configure:4932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4145. rm -rf conftest*
  4146. eval "ac_cv_lib_$ac_lib_var=yes"
  4147. else
  4148. echo "configure: failed program was:" >&5
  4149. cat conftest.$ac_ext >&5
  4150. rm -rf conftest*
  4151. eval "ac_cv_lib_$ac_lib_var=no"
  4152. fi
  4153. rm -f conftest*
  4154. LIBS="$ac_save_LIBS"
  4155. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4156. echo "$ac_t""yes" 1>&6
  4157. ICONVLIB=-lgiconv
  4158. else
  4159. echo "$ac_t""no" 1>&6
  4160. echo $ac_n "checking for libiconv""... $ac_c" 1>&6
  4161. echo "configure:4951: checking for libiconv" >&5
  4162. cat > conftest.$ac_ext <<EOF
  4163. #line 4954 "configure"
  4164. #include "confdefs.h"
  4165. /* System header to define __stub macros and hopefully few prototypes,
  4166. which can conflict with char libiconv(); below. */
  4167. #include <assert.h>
  4168. /* Override any gcc2 internal prototype to avoid an error. */
  4169. /* We use char because int might match the return type of a gcc2
  4170. builtin and then its argument prototype would still apply. */
  4171. char libiconv();
  4172. int main() {
  4173. /* The GNU C library defines this for functions which it implements
  4174. to always fail with ENOSYS. Some functions are actually named
  4175. something starting with __ and the normal name is an alias. */
  4176. #if defined (__stub_libiconv) || defined (__stub___libiconv)
  4177. choke me
  4178. #else
  4179. libiconv();
  4180. #endif
  4181. ; return 0; }
  4182. EOF
  4183. if { (eval echo configure:4977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4184. rm -rf conftest*
  4185. eval "ac_cv_func_libiconv=yes"
  4186. else
  4187. echo "configure: failed program was:" >&5
  4188. cat conftest.$ac_ext >&5
  4189. rm -rf conftest*
  4190. eval "ac_cv_func_libiconv=no"
  4191. fi
  4192. rm -f conftest*
  4193. if eval "test \"`echo '$ac_cv_func_'libiconv`\" = yes"; then
  4194. echo "$ac_t""yes" 1>&6
  4195. ICONVLIB=
  4196. else
  4197. echo "$ac_t""no" 1>&6
  4198. echo $ac_n "checking for libiconv in -liconv""... $ac_c" 1>&6
  4199. echo "configure:4995: checking for libiconv in -liconv" >&5
  4200. ac_lib_var=`echo iconv'_'libiconv | sed 'y%./+-%__p_%'`
  4201. ac_save_LIBS="$LIBS"
  4202. LIBS="-liconv $LIBS"
  4203. cat > conftest.$ac_ext <<EOF
  4204. #line 5001 "configure"
  4205. #include "confdefs.h"
  4206. /* Override any gcc2 internal prototype to avoid an error. */
  4207. /* We use char because int might match the return type of a gcc2
  4208. builtin and then its argument prototype would still apply. */
  4209. char libiconv();
  4210. int main() {
  4211. libiconv()
  4212. ; return 0; }
  4213. EOF
  4214. if { (eval echo configure:5012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4215. rm -rf conftest*
  4216. eval "ac_cv_lib_$ac_lib_var=yes"
  4217. else
  4218. echo "configure: failed program was:" >&5
  4219. cat conftest.$ac_ext >&5
  4220. rm -rf conftest*
  4221. eval "ac_cv_lib_$ac_lib_var=no"
  4222. fi
  4223. rm -f conftest*
  4224. LIBS="$ac_save_LIBS"
  4225. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4226. echo "$ac_t""yes" 1>&6
  4227. ICONVLIB=-liconv
  4228. else
  4229. echo "$ac_t""no" 1>&6
  4230. echo $ac_n "checking for libiconv in -lgiconv""... $ac_c" 1>&6
  4231. echo "configure:5031: checking for libiconv in -lgiconv" >&5
  4232. ac_lib_var=`echo giconv'_'libiconv | sed 'y%./+-%__p_%'`
  4233. ac_save_LIBS="$LIBS"
  4234. LIBS="-lgiconv $LIBS"
  4235. cat > conftest.$ac_ext <<EOF
  4236. #line 5037 "configure"
  4237. #include "confdefs.h"
  4238. /* Override any gcc2 internal prototype to avoid an error. */
  4239. /* We use char because int might match the return type of a gcc2
  4240. builtin and then its argument prototype would still apply. */
  4241. char libiconv();
  4242. int main() {
  4243. libiconv()
  4244. ; return 0; }
  4245. EOF
  4246. if { (eval echo configure:5048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4247. rm -rf conftest*
  4248. eval "ac_cv_lib_$ac_lib_var=yes"
  4249. else
  4250. echo "configure: failed program was:" >&5
  4251. cat conftest.$ac_ext >&5
  4252. rm -rf conftest*
  4253. eval "ac_cv_lib_$ac_lib_var=no"
  4254. fi
  4255. rm -f conftest*
  4256. LIBS="$ac_save_LIBS"
  4257. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4258. echo "$ac_t""yes" 1>&6
  4259. ICONVLIB=-lgiconv
  4260. else
  4261. echo "$ac_t""no" 1>&6
  4262. echo "configure: warning: *** Unable to locate iconv() function." 1>&2
  4263. ICONVLIB=
  4264. fi
  4265. fi
  4266. fi
  4267. fi
  4268. fi
  4269. fi
  4270. have_socket=1
  4271. echo $ac_n "checking for socket""... $ac_c" 1>&6
  4272. echo "configure:5085: checking for socket" >&5
  4273. cat > conftest.$ac_ext <<EOF
  4274. #line 5088 "configure"
  4275. #include "confdefs.h"
  4276. /* System header to define __stub macros and hopefully few prototypes,
  4277. which can conflict with char socket(); below. */
  4278. #include <assert.h>
  4279. /* Override any gcc2 internal prototype to avoid an error. */
  4280. /* We use char because int might match the return type of a gcc2
  4281. builtin and then its argument prototype would still apply. */
  4282. char socket();
  4283. int main() {
  4284. /* The GNU C library defines this for functions which it implements
  4285. to always fail with ENOSYS. Some functions are actually named
  4286. something starting with __ and the normal name is an alias. */
  4287. #if defined (__stub_socket) || defined (__stub___socket)
  4288. choke me
  4289. #else
  4290. socket();
  4291. #endif
  4292. ; return 0; }
  4293. EOF
  4294. if { (eval echo configure:5111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4295. rm -rf conftest*
  4296. eval "ac_cv_func_socket=yes"
  4297. else
  4298. echo "configure: failed program was:" >&5
  4299. cat conftest.$ac_ext >&5
  4300. rm -rf conftest*
  4301. eval "ac_cv_func_socket=no"
  4302. fi
  4303. rm -f conftest*
  4304. if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
  4305. echo "$ac_t""yes" 1>&6
  4306. SOCKLIB=
  4307. else
  4308. echo "$ac_t""no" 1>&6
  4309. echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
  4310. echo "configure:5129: checking for socket in -lsocket" >&5
  4311. ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
  4312. ac_save_LIBS="$LIBS"
  4313. LIBS="-lsocket $LIBS"
  4314. cat > conftest.$ac_ext <<EOF
  4315. #line 5135 "configure"
  4316. #include "confdefs.h"
  4317. /* Override any gcc2 internal prototype to avoid an error. */
  4318. /* We use char because int might match the return type of a gcc2
  4319. builtin and then its argument prototype would still apply. */
  4320. char socket();
  4321. int main() {
  4322. socket()
  4323. ; return 0; }
  4324. EOF
  4325. if { (eval echo configure:5146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4326. rm -rf conftest*
  4327. eval "ac_cv_lib_$ac_lib_var=yes"
  4328. else
  4329. echo "configure: failed program was:" >&5
  4330. cat conftest.$ac_ext >&5
  4331. rm -rf conftest*
  4332. eval "ac_cv_lib_$ac_lib_var=no"
  4333. fi
  4334. rm -f conftest*
  4335. LIBS="$ac_save_LIBS"
  4336. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4337. echo "$ac_t""yes" 1>&6
  4338. SOCKLIB=-lsocket
  4339. else
  4340. echo "$ac_t""no" 1>&6
  4341. have_socket=0
  4342. echo "configure: warning: *** Unable to locate socket() function." 1>&2
  4343. fi
  4344. fi
  4345. if test "$have_socket" = 1 ; then
  4346. HAVE_SOCKET=1
  4347. cat >> confdefs.h <<\EOF
  4348. #define HAVE_SOCKET 1
  4349. EOF
  4350. else
  4351. HAVE_SOCKET=
  4352. fi
  4353. # Mandatory zlib dependency
  4354. ZLIBLIBPATH=
  4355. ZLIBINCPATH=
  4356. ZLIB=
  4357. # With zlib includes directory
  4358. echo $ac_n "checking for location of zlib includes""... $ac_c" 1>&6
  4359. echo "configure:5194: checking for location of zlib includes" >&5
  4360. case "$with_zlib_includes" in
  4361. y | ye | yes | n | no)
  4362. { echo "configure: error: *** You must supply a directory to --with-zlib-includes." 1>&2; exit 1; }
  4363. ;;
  4364. esac
  4365. echo "$ac_t""$with_zlib_includes" 1>&6
  4366. if test -n "$with_zlib_includes" ; then
  4367. for dir in $with_zlib_includes; do
  4368. if test -d "$dir"; then
  4369. ZLIBINCPATH="$ZLIBINCPATH -I$dir"
  4370. else
  4371. { echo "configure: error: *** zlib includes directory $dir does not exist." 1>&2; exit 1; }
  4372. fi
  4373. done
  4374. fi
  4375. ac_save_cppflags="$CPPFLAGS"
  4376. CPPFLAGS="$ZLIBINCPATH $CPPFLAGS"
  4377. for ac_hdr in zlib.h
  4378. do
  4379. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4380. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4381. echo "configure:5220: checking for $ac_hdr" >&5
  4382. cat > conftest.$ac_ext <<EOF
  4383. #line 5223 "configure"
  4384. #include "confdefs.h"
  4385. #include <$ac_hdr>
  4386. EOF
  4387. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4388. { (eval echo configure:5228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4389. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4390. if test -z "$ac_err"; then
  4391. rm -rf conftest*
  4392. eval "ac_cv_header_$ac_safe=yes"
  4393. else
  4394. echo "$ac_err" >&5
  4395. echo "configure: failed program was:" >&5
  4396. cat conftest.$ac_ext >&5
  4397. rm -rf conftest*
  4398. eval "ac_cv_header_$ac_safe=no"
  4399. fi
  4400. rm -f conftest*
  4401. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4402. echo "$ac_t""yes" 1>&6
  4403. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4404. cat >> confdefs.h <<EOF
  4405. #define $ac_tr_hdr 1
  4406. EOF
  4407. else
  4408. echo "$ac_t""no" 1>&6
  4409. { echo "configure: error: *** Unable to locate zlib includes." 1>&2; exit 1; }
  4410. fi
  4411. done
  4412. CPPFLAGS=$ac_save_cppflags
  4413. # With zlib library directory
  4414. echo $ac_n "checking for location of zlib library""... $ac_c" 1>&6
  4415. echo "configure:5262: checking for location of zlib library" >&5
  4416. case "$with_zlib_libs" in
  4417. y | ye | yes | n | no)
  4418. { echo "configure: error: *** You must supply a directory to --with-zlib-libs." 1>&2; exit 1; }
  4419. ;;
  4420. esac
  4421. echo "$ac_t""$with_zlib_libs" 1>&6
  4422. if test -n "$with_zlib_libs"; then
  4423. for dir in $with_zlib_libs; do
  4424. if test -d "$dir"; then
  4425. ZLIBLIBPATH="$ZLIBLIBPATH -L$dir"
  4426. else
  4427. { echo "configure: error: *** zlib library directory $dir does not exist." 1>&2; exit 1; }
  4428. fi
  4429. done
  4430. fi
  4431. ac_save_ldflags="$LDFLAGS"
  4432. LDFLAGS="$ZLIBLIBPATH $LDFLAGS"
  4433. echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
  4434. echo "configure:5287: checking for deflate in -lz" >&5
  4435. ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
  4436. ac_save_LIBS="$LIBS"
  4437. LIBS="-lz $LIBS"
  4438. cat > conftest.$ac_ext <<EOF
  4439. #line 5293 "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 deflate();
  4445. int main() {
  4446. deflate()
  4447. ; return 0; }
  4448. EOF
  4449. if { (eval echo configure:5304: \"$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. ZLIB="$ZLIB -lz "
  4463. else
  4464. echo "$ac_t""no" 1>&6
  4465. LDFLAGS=${ac_save_ldflags}
  4466. { echo "configure: error: *** Unable to locate zlib library." 1>&2; exit 1; }
  4467. fi
  4468. LDFLAGS=${ac_save_ldflags}
  4469. #
  4470. # Done checking zlib
  4471. # bzip2 support
  4472. BZIP2LIBPATH=
  4473. BZIP2INCPATH=
  4474. BZIP2LIB=
  4475. echo $ac_n "checking whether to use bzlib""... $ac_c" 1>&6
  4476. echo "configure:5350: checking whether to use bzlib" >&5
  4477. echo "$ac_t"""$with_bzlib"" 1>&6
  4478. case "$with_bzlib" in
  4479. "no") USE_BZIP2= ;;
  4480. "yes") USE_BZIP2="1" ;;
  4481. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  4482. esac
  4483. if test -n "$USE_BZIP2"; then
  4484. # With bzip2 includes directory
  4485. echo $ac_n "checking for location of bzlib includes""... $ac_c" 1>&6
  4486. echo "configure:5366: checking for location of bzlib includes" >&5
  4487. case "$with_bzlib_includes" in
  4488. y | ye | yes | n | no)
  4489. { echo "configure: error: *** You must supply a directory to --with-bzlib-includes." 1>&2; exit 1; }
  4490. ;;
  4491. esac
  4492. echo "$ac_t""$with_bzlib_includes" 1>&6
  4493. if test -n "$with_bzlib_includes" ; then
  4494. for dir in $with_bzlib_includes; do
  4495. if test -d "$dir"; then
  4496. BZIP2INCPATH="$BZIP2INCPATH -I$dir"
  4497. else
  4498. { echo "configure: error: *** bzlib includes directory $dir does not exist." 1>&2; exit 1; }
  4499. fi
  4500. done
  4501. fi
  4502. ac_save_cppflags="$CPPFLAGS"
  4503. CPPFLAGS="$BZIP2INCPATH $CPPFLAGS"
  4504. for ac_hdr in bzlib.h
  4505. do
  4506. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4507. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4508. echo "configure:5392: checking for $ac_hdr" >&5
  4509. cat > conftest.$ac_ext <<EOF
  4510. #line 5395 "configure"
  4511. #include "confdefs.h"
  4512. #include <$ac_hdr>
  4513. EOF
  4514. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4515. { (eval echo configure:5400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4516. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4517. if test -z "$ac_err"; then
  4518. rm -rf conftest*
  4519. eval "ac_cv_header_$ac_safe=yes"
  4520. else
  4521. echo "$ac_err" >&5
  4522. echo "configure: failed program was:" >&5
  4523. cat conftest.$ac_ext >&5
  4524. rm -rf conftest*
  4525. eval "ac_cv_header_$ac_safe=no"
  4526. fi
  4527. rm -f conftest*
  4528. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4529. echo "$ac_t""yes" 1>&6
  4530. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4531. cat >> confdefs.h <<EOF
  4532. #define $ac_tr_hdr 1
  4533. EOF
  4534. else
  4535. echo "$ac_t""no" 1>&6
  4536. { echo "configure: error: *** Unable to locate bzlib includes." 1>&2; exit 1; }
  4537. fi
  4538. done
  4539. CPPFLAGS=$ac_save_cppflags
  4540. # With bzip2 library directory
  4541. echo $ac_n "checking for location of bzlib library""... $ac_c" 1>&6
  4542. echo "configure:5434: checking for location of bzlib library" >&5
  4543. case "$with_bzlib_libs" in
  4544. y | ye | yes | n | no)
  4545. { echo "configure: error: *** You must supply a directory to --with-bzlib-libs." 1>&2; exit 1; }
  4546. ;;
  4547. esac
  4548. echo "$ac_t""$with_bzlib_libs" 1>&6
  4549. if test -n "$with_bzlib_libs"; then
  4550. for dir in $with_bzlib_libs; do
  4551. if test -d "$dir"; then
  4552. BZIP2LIBPATH="$BZIP2LIBPATH -L$dir"
  4553. else
  4554. { echo "configure: error: *** bzlib library directory $dir does not exist." 1>&2; exit 1; }
  4555. fi
  4556. done
  4557. fi
  4558. ac_save_ldflags="$LDFLAGS"
  4559. LDFLAGS="$BZIP2LIBPATH $LDFLAGS"
  4560. echo $ac_n "checking for BZ2_bzBuffToBuffCompress in -lbz2""... $ac_c" 1>&6
  4561. echo "configure:5459: checking for BZ2_bzBuffToBuffCompress in -lbz2" >&5
  4562. ac_lib_var=`echo bz2'_'BZ2_bzBuffToBuffCompress | sed 'y%./+-%__p_%'`
  4563. ac_save_LIBS="$LIBS"
  4564. LIBS="-lbz2 $LIBS"
  4565. cat > conftest.$ac_ext <<EOF
  4566. #line 5465 "configure"
  4567. #include "confdefs.h"
  4568. /* Override any gcc2 internal prototype to avoid an error. */
  4569. /* We use char because int might match the return type of a gcc2
  4570. builtin and then its argument prototype would still apply. */
  4571. char BZ2_bzBuffToBuffCompress();
  4572. int main() {
  4573. BZ2_bzBuffToBuffCompress()
  4574. ; return 0; }
  4575. EOF
  4576. if { (eval echo configure:5476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4577. rm -rf conftest*
  4578. eval "ac_cv_lib_$ac_lib_var=yes"
  4579. else
  4580. echo "configure: failed program was:" >&5
  4581. cat conftest.$ac_ext >&5
  4582. rm -rf conftest*
  4583. eval "ac_cv_lib_$ac_lib_var=no"
  4584. fi
  4585. rm -f conftest*
  4586. LIBS="$ac_save_LIBS"
  4587. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4588. echo "$ac_t""yes" 1>&6
  4589. BZIP2LIB="$BZIP2LIB -lbz2 "
  4590. else
  4591. echo "$ac_t""no" 1>&6
  4592. LDFLAGS=${ac_save_ldflags}
  4593. { echo "configure: error: *** Unable to locate bzlib library." 1>&2; exit 1; }
  4594. fi
  4595. LDFLAGS=${ac_save_ldflags}
  4596. #
  4597. fi # $USE_BZIP2
  4598. # Done checking bzip2
  4599. # zstd support
  4600. ZSTDLIBPATH=
  4601. ZSTDINCPATH=
  4602. ZSTDLIB=
  4603. echo $ac_n "checking whether to use zstd""... $ac_c" 1>&6
  4604. echo "configure:5524: checking whether to use zstd" >&5
  4605. echo "$ac_t"""$with_zstd"" 1>&6
  4606. case "$with_zstd" in
  4607. "no") USE_ZSTD= ;;
  4608. "yes") USE_ZSTD="1" ;;
  4609. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  4610. esac
  4611. if test -n "$USE_ZSTD"; then
  4612. # With zstd includes directory
  4613. echo $ac_n "checking for location of zstd includes""... $ac_c" 1>&6
  4614. echo "configure:5540: checking for location of zstd includes" >&5
  4615. case "$with_zstd_includes" in
  4616. y | ye | yes | n | no)
  4617. { echo "configure: error: *** You must supply a directory to --with-zstd-includes." 1>&2; exit 1; }
  4618. ;;
  4619. esac
  4620. echo "$ac_t""$with_zstd_includes" 1>&6
  4621. if test -n "$with_zstd_includes" ; then
  4622. for dir in $with_zstd_includes; do
  4623. if test -d "$dir"; then
  4624. ZSTDINCPATH="$ZSTDINCPATH -I$dir"
  4625. else
  4626. { echo "configure: error: *** zstd includes directory $dir does not exist." 1>&2; exit 1; }
  4627. fi
  4628. done
  4629. fi
  4630. ac_save_cppflags="$CPPFLAGS"
  4631. CPPFLAGS="$ZSTDINCPATH $CPPFLAGS"
  4632. for ac_hdr in zstd.h
  4633. do
  4634. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4635. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4636. echo "configure:5565: checking for $ac_hdr" >&5
  4637. cat > conftest.$ac_ext <<EOF
  4638. #line 5568 "configure"
  4639. #include "confdefs.h"
  4640. #include <$ac_hdr>
  4641. EOF
  4642. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4643. { (eval echo configure:5573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4644. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4645. if test -z "$ac_err"; then
  4646. rm -rf conftest*
  4647. eval "ac_cv_header_$ac_safe=yes"
  4648. else
  4649. echo "$ac_err" >&5
  4650. echo "configure: failed program was:" >&5
  4651. cat conftest.$ac_ext >&5
  4652. rm -rf conftest*
  4653. eval "ac_cv_header_$ac_safe=no"
  4654. fi
  4655. rm -f conftest*
  4656. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4657. echo "$ac_t""yes" 1>&6
  4658. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4659. cat >> confdefs.h <<EOF
  4660. #define $ac_tr_hdr 1
  4661. EOF
  4662. else
  4663. echo "$ac_t""no" 1>&6
  4664. { echo "configure: error: *** Unable to locate zstd includes." 1>&2; exit 1; }
  4665. fi
  4666. done
  4667. CPPFLAGS=$ac_save_cppflags
  4668. # With zstd library directory
  4669. echo $ac_n "checking for location of zstd library""... $ac_c" 1>&6
  4670. echo "configure:5607: checking for location of zstd library" >&5
  4671. case "$with_zstd_libs" in
  4672. y | ye | yes | n | no)
  4673. { echo "configure: error: *** You must supply a directory to --with-zstd-libs." 1>&2; exit 1; }
  4674. ;;
  4675. esac
  4676. echo "$ac_t""$with_zstd_libs" 1>&6
  4677. if test -n "$with_zstd_libs"; then
  4678. for dir in $with_zstd_libs; do
  4679. if test -d "$dir"; then
  4680. ZSTDLIBPATH="$ZSTDLIBPATH -L$dir"
  4681. else
  4682. { echo "configure: error: *** zstd library directory $dir does not exist." 1>&2; exit 1; }
  4683. fi
  4684. done
  4685. fi
  4686. ac_save_ldflags="$LDFLAGS"
  4687. LDFLAGS="$ZSTDLIBPATH $LDFLAGS"
  4688. echo $ac_n "checking for ZSTD_compress in -lzstd""... $ac_c" 1>&6
  4689. echo "configure:5632: checking for ZSTD_compress in -lzstd" >&5
  4690. ac_lib_var=`echo zstd'_'ZSTD_compress | sed 'y%./+-%__p_%'`
  4691. ac_save_LIBS="$LIBS"
  4692. LIBS="-lzstd $LIBS"
  4693. cat > conftest.$ac_ext <<EOF
  4694. #line 5638 "configure"
  4695. #include "confdefs.h"
  4696. /* Override any gcc2 internal prototype to avoid an error. */
  4697. /* We use char because int might match the return type of a gcc2
  4698. builtin and then its argument prototype would still apply. */
  4699. char ZSTD_compress();
  4700. int main() {
  4701. ZSTD_compress()
  4702. ; return 0; }
  4703. EOF
  4704. if { (eval echo configure:5649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4705. rm -rf conftest*
  4706. eval "ac_cv_lib_$ac_lib_var=yes"
  4707. else
  4708. echo "configure: failed program was:" >&5
  4709. cat conftest.$ac_ext >&5
  4710. rm -rf conftest*
  4711. eval "ac_cv_lib_$ac_lib_var=no"
  4712. fi
  4713. rm -f conftest*
  4714. LIBS="$ac_save_LIBS"
  4715. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4716. echo "$ac_t""yes" 1>&6
  4717. ZSTDLIB="$ZSTDLIB -lzstd "
  4718. else
  4719. echo "$ac_t""no" 1>&6
  4720. LDFLAGS=${ac_save_ldflags}
  4721. { echo "configure: error: *** Unable to locate zstd library." 1>&2; exit 1; }
  4722. fi
  4723. LDFLAGS=${ac_save_ldflags}
  4724. #
  4725. fi # $USE_ZSTD
  4726. # Done checking zstd
  4727. # Mandatory PROJ dependency
  4728. PROJINC=
  4729. PROJLIB=
  4730. PROJSHARE=
  4731. PROJ4API=0
  4732. # With PROJ includes directory
  4733. echo $ac_n "checking for location of External PROJ includes""... $ac_c" 1>&6
  4734. echo "configure:5700: checking for location of External PROJ includes" >&5
  4735. case "$with_proj_includes" in
  4736. y | ye | yes | n | no)
  4737. { echo "configure: error: *** You must supply a directory to --with-proj-includes." 1>&2; exit 1; }
  4738. ;;
  4739. esac
  4740. echo "$ac_t""$with_proj_includes" 1>&6
  4741. if test -n "$with_proj_includes" ; then
  4742. for dir in $with_proj_includes; do
  4743. if test -d "$dir"; then
  4744. PROJINC="$PROJINC -I$dir"
  4745. else
  4746. { echo "configure: error: *** External PROJ includes directory $dir does not exist." 1>&2; exit 1; }
  4747. fi
  4748. done
  4749. fi
  4750. # PROJ version check: if proj.h exists, it must be proj 5+
  4751. ac_save_cppflags="$CPPFLAGS"
  4752. CPPFLAGS="$PROJINC $CPPFLAGS"
  4753. for ac_hdr in proj.h
  4754. do
  4755. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4756. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4757. echo "configure:5727: checking for $ac_hdr" >&5
  4758. cat > conftest.$ac_ext <<EOF
  4759. #line 5730 "configure"
  4760. #include "confdefs.h"
  4761. #include <$ac_hdr>
  4762. EOF
  4763. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4764. { (eval echo configure:5735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4765. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4766. if test -z "$ac_err"; then
  4767. rm -rf conftest*
  4768. eval "ac_cv_header_$ac_safe=yes"
  4769. else
  4770. echo "$ac_err" >&5
  4771. echo "configure: failed program was:" >&5
  4772. cat conftest.$ac_ext >&5
  4773. rm -rf conftest*
  4774. eval "ac_cv_header_$ac_safe=no"
  4775. fi
  4776. rm -f conftest*
  4777. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4778. echo "$ac_t""yes" 1>&6
  4779. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4780. cat >> confdefs.h <<EOF
  4781. #define $ac_tr_hdr 1
  4782. EOF
  4783. else
  4784. echo "$ac_t""no" 1>&6
  4785. PROJ4API=1
  4786. fi
  4787. done
  4788. CPPFLAGS=$ac_save_cppflags
  4789. if test $PROJ4API = 0 ; then
  4790. echo $ac_n "checking External PROJ major version""... $ac_c" 1>&6
  4791. echo "configure:5767: checking External PROJ major version" >&5
  4792. ac_save_cppflags="$CPPFLAGS"
  4793. CPPFLAGS="$PROJINC $CPPFLAGS"
  4794. if test "$cross_compiling" = yes; then
  4795. proj_ver_major=0
  4796. echo "$ac_t""unknown (cross-compiling)" 1>&6
  4797. else
  4798. cat > conftest.$ac_ext <<EOF
  4799. #line 5775 "configure"
  4800. #include "confdefs.h"
  4801. #include <stdio.h>
  4802. #include <proj.h>
  4803. int main(void) {
  4804. FILE *fp = fopen("conftestdata","w");
  4805. fprintf(fp, "%d", PROJ_VERSION_MAJOR);
  4806. return 0;
  4807. }
  4808. EOF
  4809. if { (eval echo configure:5787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  4810. then
  4811. proj_ver_major=`cat conftestdata`
  4812. echo "$ac_t""$proj_ver_major" 1>&6
  4813. else
  4814. echo "configure: failed program was:" >&5
  4815. cat conftest.$ac_ext >&5
  4816. rm -fr conftest*
  4817. { echo "configure: error: *** Could not determine External PROJ major version." 1>&2; exit 1; }
  4818. fi
  4819. rm -fr conftest*
  4820. fi
  4821. CPPFLAGS=$ac_save_cppflags
  4822. echo $ac_n "checking External PROJ minor version""... $ac_c" 1>&6
  4823. echo "configure:5804: checking External PROJ minor version" >&5
  4824. ac_save_cppflags="$CPPFLAGS"
  4825. CPPFLAGS="$PROJINC $CPPFLAGS"
  4826. if test "$cross_compiling" = yes; then
  4827. proj_ver_minor=0
  4828. echo "$ac_t""unknown (cross-compiling)" 1>&6
  4829. else
  4830. cat > conftest.$ac_ext <<EOF
  4831. #line 5812 "configure"
  4832. #include "confdefs.h"
  4833. #include <stdio.h>
  4834. #include <proj.h>
  4835. int main(void) {
  4836. FILE *fp = fopen("conftestdata","w");
  4837. fprintf(fp, "%d", PROJ_VERSION_MINOR);
  4838. return 0;
  4839. }
  4840. EOF
  4841. if { (eval echo configure:5824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  4842. then
  4843. proj_ver_minor=`cat conftestdata`
  4844. echo "$ac_t""$proj_ver_minor" 1>&6
  4845. else
  4846. echo "configure: failed program was:" >&5
  4847. cat conftest.$ac_ext >&5
  4848. rm -fr conftest*
  4849. { echo "configure: error: *** Could not determine External PROJ minor version." 1>&2; exit 1; }
  4850. fi
  4851. rm -fr conftest*
  4852. fi
  4853. CPPFLAGS=$ac_save_cppflags
  4854. echo $ac_n "checking External PROJ patch version""... $ac_c" 1>&6
  4855. echo "configure:5841: checking External PROJ patch version" >&5
  4856. ac_save_cppflags="$CPPFLAGS"
  4857. CPPFLAGS="$PROJINC $CPPFLAGS"
  4858. if test "$cross_compiling" = yes; then
  4859. proj_ver_patch=0
  4860. echo "$ac_t""unknown (cross-compiling)" 1>&6
  4861. else
  4862. cat > conftest.$ac_ext <<EOF
  4863. #line 5849 "configure"
  4864. #include "confdefs.h"
  4865. #include <stdio.h>
  4866. #include <proj.h>
  4867. int main(void) {
  4868. FILE *fp = fopen("conftestdata","w");
  4869. fprintf(fp, "%d", PROJ_VERSION_PATCH);
  4870. return 0;
  4871. }
  4872. EOF
  4873. if { (eval echo configure:5861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  4874. then
  4875. proj_ver_patch=`cat conftestdata`
  4876. echo "$ac_t""$proj_ver_patch" 1>&6
  4877. else
  4878. echo "configure: failed program was:" >&5
  4879. cat conftest.$ac_ext >&5
  4880. rm -fr conftest*
  4881. { echo "configure: error: *** Could not determine External PROJ patch version." 1>&2; exit 1; }
  4882. fi
  4883. rm -fr conftest*
  4884. fi
  4885. CPPFLAGS=$ac_save_cppflags
  4886. echo "$ac_t""found PROJ version "${proj_ver_major}.${proj_ver_minor}.${proj_ver_patch}"" 1>&6
  4887. # minimum required PROJ 5+ version to use the new PROJ API: 5.1.0
  4888. if test ${proj_ver_major} = 5 && test `expr ${proj_ver_minor} \< 1` = 1 ; then
  4889. echo "configure: warning: At least PROJ version "5.1.0" is required for the new API " 1>&2
  4890. PROJ4API=1
  4891. fi
  4892. fi
  4893. if test $PROJ4API = 0 ; then
  4894. echo "$ac_t""using new PROJ version 5+ API" 1>&6
  4895. # With PROJ library directory
  4896. echo $ac_n "checking for location of External PROJ library""... $ac_c" 1>&6
  4897. echo "configure:5891: checking for location of External PROJ library" >&5
  4898. case "$with_proj_libs" in
  4899. y | ye | yes | n | no)
  4900. { echo "configure: error: *** You must supply a directory to --with-proj-libs." 1>&2; exit 1; }
  4901. ;;
  4902. esac
  4903. echo "$ac_t""$with_proj_libs" 1>&6
  4904. if test -n "$with_proj_libs"; then
  4905. for dir in $with_proj_libs; do
  4906. if test -d "$dir"; then
  4907. PROJLIB="$PROJLIB -L$dir"
  4908. else
  4909. { echo "configure: error: *** External PROJ library directory $dir does not exist." 1>&2; exit 1; }
  4910. fi
  4911. done
  4912. fi
  4913. ac_save_ldflags="$LDFLAGS"
  4914. LDFLAGS="$PROJLIB $LDFLAGS"
  4915. echo $ac_n "checking for proj_pj_info in -lproj""... $ac_c" 1>&6
  4916. echo "configure:5915: checking for proj_pj_info in -lproj" >&5
  4917. ac_lib_var=`echo proj'_'proj_pj_info | sed 'y%./+-%__p_%'`
  4918. ac_save_LIBS="$LIBS"
  4919. LIBS="-lproj $LIBS"
  4920. cat > conftest.$ac_ext <<EOF
  4921. #line 5921 "configure"
  4922. #include "confdefs.h"
  4923. /* Override any gcc2 internal prototype to avoid an error. */
  4924. /* We use char because int might match the return type of a gcc2
  4925. builtin and then its argument prototype would still apply. */
  4926. char proj_pj_info();
  4927. int main() {
  4928. proj_pj_info()
  4929. ; return 0; }
  4930. EOF
  4931. if { (eval echo configure:5932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4932. rm -rf conftest*
  4933. eval "ac_cv_lib_$ac_lib_var=yes"
  4934. else
  4935. echo "configure: failed program was:" >&5
  4936. cat conftest.$ac_ext >&5
  4937. rm -rf conftest*
  4938. eval "ac_cv_lib_$ac_lib_var=no"
  4939. fi
  4940. rm -f conftest*
  4941. LIBS="$ac_save_LIBS"
  4942. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4943. echo "$ac_t""yes" 1>&6
  4944. PROJLIB="$PROJLIB -lproj "
  4945. else
  4946. echo "$ac_t""no" 1>&6
  4947. LDFLAGS=${ac_save_ldflags}
  4948. { echo "configure: error: *** Unable to locate External PROJ library." 1>&2; exit 1; }
  4949. fi
  4950. LDFLAGS=${ac_save_ldflags}
  4951. else
  4952. echo "$ac_t""using old PROJ version 4 API" 1>&6
  4953. cat >> confdefs.h <<\EOF
  4954. #define USE_PROJ4API 1
  4955. EOF
  4956. ac_save_cppflags="$CPPFLAGS"
  4957. CPPFLAGS="$PROJINC $CPPFLAGS"
  4958. for ac_hdr in proj_api.h
  4959. do
  4960. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4961. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4962. echo "configure:5975: checking for $ac_hdr" >&5
  4963. cat > conftest.$ac_ext <<EOF
  4964. #line 5978 "configure"
  4965. #include "confdefs.h"
  4966. #include <$ac_hdr>
  4967. EOF
  4968. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4969. { (eval echo configure:5983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4970. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4971. if test -z "$ac_err"; then
  4972. rm -rf conftest*
  4973. eval "ac_cv_header_$ac_safe=yes"
  4974. else
  4975. echo "$ac_err" >&5
  4976. echo "configure: failed program was:" >&5
  4977. cat conftest.$ac_ext >&5
  4978. rm -rf conftest*
  4979. eval "ac_cv_header_$ac_safe=no"
  4980. fi
  4981. rm -f conftest*
  4982. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4983. echo "$ac_t""yes" 1>&6
  4984. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4985. cat >> confdefs.h <<EOF
  4986. #define $ac_tr_hdr 1
  4987. EOF
  4988. else
  4989. echo "$ac_t""no" 1>&6
  4990. { echo "configure: error: *** Unable to locate External PROJ includes." 1>&2; exit 1; }
  4991. fi
  4992. done
  4993. CPPFLAGS=$ac_save_cppflags
  4994. # PROJ version check for v4.x
  4995. if test "$cross_compiling" = yes; then
  4996. echo "configure: warning: *** Cannot check PROJ.4 version (cross-compiling)." 1>&2
  4997. else
  4998. echo $ac_n "checking External PROJ.4 version""... $ac_c" 1>&6
  4999. echo "configure:6019: checking External PROJ.4 version" >&5
  5000. ac_save_cppflags="$CPPFLAGS"
  5001. CPPFLAGS="$PROJINC $CPPFLAGS"
  5002. if test "$cross_compiling" = yes; then
  5003. proj_ver=0
  5004. echo "$ac_t""unknown (cross-compiling)" 1>&6
  5005. else
  5006. cat > conftest.$ac_ext <<EOF
  5007. #line 6027 "configure"
  5008. #include "confdefs.h"
  5009. #include <stdio.h>
  5010. #include <proj_api.h>
  5011. int main(void) {
  5012. FILE *fp = fopen("conftestdata","w");
  5013. fprintf(fp, "%d", PJ_VERSION);
  5014. return 0;
  5015. }
  5016. EOF
  5017. if { (eval echo configure:6039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  5018. then
  5019. proj_ver=`cat conftestdata`
  5020. echo "$ac_t""$proj_ver" 1>&6
  5021. else
  5022. echo "configure: failed program was:" >&5
  5023. cat conftest.$ac_ext >&5
  5024. rm -fr conftest*
  5025. { echo "configure: error: *** Could not determine External PROJ.4 version." 1>&2; exit 1; }
  5026. fi
  5027. rm -fr conftest*
  5028. fi
  5029. CPPFLAGS=$ac_save_cppflags
  5030. if test `expr ${proj_ver} \< 446` = 1 ; then
  5031. { echo "configure: error: *** PROJ.4.4.6 or later is required." 1>&2; exit 1; }
  5032. fi
  5033. fi
  5034. # With PROJ library directory
  5035. echo $ac_n "checking for location of External PROJ.4 library""... $ac_c" 1>&6
  5036. echo "configure:6064: checking for location of External PROJ.4 library" >&5
  5037. case "$with_proj_libs" in
  5038. y | ye | yes | n | no)
  5039. { echo "configure: error: *** You must supply a directory to --with-proj-libs." 1>&2; exit 1; }
  5040. ;;
  5041. esac
  5042. echo "$ac_t""$with_proj_libs" 1>&6
  5043. if test -n "$with_proj_libs"; then
  5044. for dir in $with_proj_libs; do
  5045. if test -d "$dir"; then
  5046. PROJLIB="$PROJLIB -L$dir"
  5047. else
  5048. { echo "configure: error: *** External PROJ.4 library directory $dir does not exist." 1>&2; exit 1; }
  5049. fi
  5050. done
  5051. fi
  5052. ac_save_ldflags="$LDFLAGS"
  5053. LDFLAGS="$PROJLIB $LDFLAGS"
  5054. echo $ac_n "checking for pj_get_def in -lproj""... $ac_c" 1>&6
  5055. echo "configure:6088: checking for pj_get_def in -lproj" >&5
  5056. ac_lib_var=`echo proj'_'pj_get_def | sed 'y%./+-%__p_%'`
  5057. ac_save_LIBS="$LIBS"
  5058. LIBS="-lproj $LIBS"
  5059. cat > conftest.$ac_ext <<EOF
  5060. #line 6094 "configure"
  5061. #include "confdefs.h"
  5062. /* Override any gcc2 internal prototype to avoid an error. */
  5063. /* We use char because int might match the return type of a gcc2
  5064. builtin and then its argument prototype would still apply. */
  5065. char pj_get_def();
  5066. int main() {
  5067. pj_get_def()
  5068. ; return 0; }
  5069. EOF
  5070. if { (eval echo configure:6105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5071. rm -rf conftest*
  5072. eval "ac_cv_lib_$ac_lib_var=yes"
  5073. else
  5074. echo "configure: failed program was:" >&5
  5075. cat conftest.$ac_ext >&5
  5076. rm -rf conftest*
  5077. eval "ac_cv_lib_$ac_lib_var=no"
  5078. fi
  5079. rm -f conftest*
  5080. LIBS="$ac_save_LIBS"
  5081. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5082. echo "$ac_t""yes" 1>&6
  5083. PROJLIB="$PROJLIB -lproj "
  5084. else
  5085. echo "$ac_t""no" 1>&6
  5086. LDFLAGS=${ac_save_ldflags}
  5087. { echo "configure: error: *** Unable to locate External PROJ.4 library." 1>&2; exit 1; }
  5088. fi
  5089. LDFLAGS=${ac_save_ldflags}
  5090. fi
  5091. # With PROJ share directory
  5092. echo $ac_n "checking for location of External PROJ data files""... $ac_c" 1>&6
  5093. echo "configure:6140: checking for location of External PROJ data files" >&5
  5094. case "$with_proj_share" in
  5095. y | ye | yes | n | no)
  5096. { echo "configure: error: *** You must supply a directory to --with-proj-share." 1>&2; exit 1; }
  5097. ;;
  5098. esac
  5099. echo "$ac_t""$with_proj_share" 1>&6
  5100. if test -n "$with_proj_share" ; then
  5101. if test -d "$with_proj_share"; then
  5102. PROJSHARE="$with_proj_share"
  5103. else
  5104. { echo "configure: error: *** External PROJ data directory $dir does not exist." 1>&2; exit 1; }
  5105. fi
  5106. fi
  5107. if test -z "$PROJSHARE" ; then
  5108. echo "configure: warning: *** External PROJ directory not specified; default will be used" 1>&2
  5109. PROJSHARE=/usr/share/proj
  5110. fi
  5111. # LOC_CHECK_SHARE does not work when cross compiling
  5112. if test "$cross_compiling" = "yes" ; then
  5113. echo $ac_n "checking for epsg""... $ac_c" 1>&6
  5114. echo "configure:6164: checking for epsg" >&5
  5115. echo "$ac_t""unknown (cross-compiling)" 1>&6
  5116. else
  5117. ac_safe=`echo "$PROJSHARE/epsg" | sed 'y%./+-%__p_%'`
  5118. echo $ac_n "checking for $PROJSHARE/epsg""... $ac_c" 1>&6
  5119. echo "configure:6171: checking for $PROJSHARE/epsg" >&5
  5120. if test "$cross_compiling" = yes; then
  5121. { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
  5122. else
  5123. if test -r $PROJSHARE/epsg; then
  5124. eval "ac_cv_file_$ac_safe=yes"
  5125. else
  5126. eval "ac_cv_file_$ac_safe=no"
  5127. fi
  5128. fi
  5129. if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
  5130. echo "$ac_t""yes" 1>&6
  5131. :
  5132. else
  5133. echo "$ac_t""no" 1>&6
  5134. echo "configure: warning: *** Unable to locate PROJ data files." 1>&2
  5135. fi
  5136. fi
  5137. # nad2bin needs to be in path for installing datum gridshift files
  5138. # Extract the first word of "nad2bin", so it can be a program name with args.
  5139. set dummy nad2bin; ac_word=$2
  5140. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5141. echo "configure:6203: checking for $ac_word" >&5
  5142. case "$NAD2BIN" in
  5143. /*)
  5144. ac_cv_path_NAD2BIN="$NAD2BIN" # Let the user override the test with a path.
  5145. ;;
  5146. ?:/*)
  5147. ac_cv_path_NAD2BIN="$NAD2BIN" # Let the user override the test with a dos path.
  5148. ;;
  5149. *)
  5150. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5151. ac_dummy="$PATH"
  5152. for ac_dir in $ac_dummy; do
  5153. test -z "$ac_dir" && ac_dir=.
  5154. if test -f $ac_dir/$ac_word; then
  5155. ac_cv_path_NAD2BIN="$ac_dir/$ac_word"
  5156. break
  5157. fi
  5158. done
  5159. IFS="$ac_save_ifs"
  5160. test -z "$ac_cv_path_NAD2BIN" && ac_cv_path_NAD2BIN="no"
  5161. ;;
  5162. esac
  5163. NAD2BIN="$ac_cv_path_NAD2BIN"
  5164. if test -n "$NAD2BIN"; then
  5165. echo "$ac_t""$NAD2BIN" 1>&6
  5166. else
  5167. echo "$ac_t""no" 1>&6
  5168. fi
  5169. if test "$NAD2BIN" = "no"; then
  5170. { echo "configure: error: *** Unable to locate nad2bin (needs to be in PATH)." 1>&2; exit 1; }
  5171. fi
  5172. # Done checking PROJ
  5173. # Enable regex option
  5174. echo $ac_n "checking whether to use regex""... $ac_c" 1>&6
  5175. echo "configure:6243: checking whether to use regex" >&5
  5176. echo "$ac_t"""$with_regex"" 1>&6
  5177. case "$with_regex" in
  5178. "no") USE_REGEX= ;;
  5179. "yes") USE_REGEX="1" ;;
  5180. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  5181. esac
  5182. REGEXINCPATH=
  5183. REGEXLIBPATH=
  5184. REGEXLIB=
  5185. if test -n "$USE_REGEX"; then
  5186. # With regex includes directory
  5187. echo $ac_n "checking for location of regex includes""... $ac_c" 1>&6
  5188. echo "configure:6263: checking for location of regex includes" >&5
  5189. case "$with_regex_includes" in
  5190. y | ye | yes | n | no)
  5191. { echo "configure: error: *** You must supply a directory to --with-regex-includes." 1>&2; exit 1; }
  5192. ;;
  5193. esac
  5194. echo "$ac_t""$with_regex_includes" 1>&6
  5195. if test -n "$with_regex_includes" ; then
  5196. for dir in $with_regex_includes; do
  5197. if test -d "$dir"; then
  5198. REGEXINCPATH="$REGEXINCPATH -I$dir"
  5199. else
  5200. { echo "configure: error: *** regex includes directory $dir does not exist." 1>&2; exit 1; }
  5201. fi
  5202. done
  5203. fi
  5204. ac_save_cppflags="$CPPFLAGS"
  5205. CPPFLAGS="$REGEXINCPATH $CPPFLAGS"
  5206. for ac_hdr in regex.h
  5207. do
  5208. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5209. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5210. echo "configure:6289: checking for $ac_hdr" >&5
  5211. cat > conftest.$ac_ext <<EOF
  5212. #line 6292 "configure"
  5213. #include "confdefs.h"
  5214. #include <$ac_hdr>
  5215. EOF
  5216. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5217. { (eval echo configure:6297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5218. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5219. if test -z "$ac_err"; then
  5220. rm -rf conftest*
  5221. eval "ac_cv_header_$ac_safe=yes"
  5222. else
  5223. echo "$ac_err" >&5
  5224. echo "configure: failed program was:" >&5
  5225. cat conftest.$ac_ext >&5
  5226. rm -rf conftest*
  5227. eval "ac_cv_header_$ac_safe=no"
  5228. fi
  5229. rm -f conftest*
  5230. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5231. echo "$ac_t""yes" 1>&6
  5232. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5233. cat >> confdefs.h <<EOF
  5234. #define $ac_tr_hdr 1
  5235. EOF
  5236. else
  5237. echo "$ac_t""no" 1>&6
  5238. { echo "configure: error: *** Unable to locate regex includes." 1>&2; exit 1; }
  5239. fi
  5240. done
  5241. CPPFLAGS=$ac_save_cppflags
  5242. # With regex library directory
  5243. echo $ac_n "checking for location of regex library""... $ac_c" 1>&6
  5244. echo "configure:6331: checking for location of regex library" >&5
  5245. case "$with_regex_libs" in
  5246. y | ye | yes | n | no)
  5247. { echo "configure: error: *** You must supply a directory to --with-regex-libs." 1>&2; exit 1; }
  5248. ;;
  5249. esac
  5250. echo "$ac_t""$with_regex_libs" 1>&6
  5251. if test -n "$with_regex_libs"; then
  5252. for dir in $with_regex_libs; do
  5253. if test -d "$dir"; then
  5254. REGEXLIBPATH="$REGEXLIBPATH -L$dir"
  5255. else
  5256. { echo "configure: error: *** regex library directory $dir does not exist." 1>&2; exit 1; }
  5257. fi
  5258. done
  5259. fi
  5260. ac_save_libs="$LIBS"
  5261. ac_save_ldflags="$LDFLAGS"
  5262. LIBS=" $LIBS"
  5263. LDFLAGS=" $LDFLAGS"
  5264. echo $ac_n "checking for regcomp""... $ac_c" 1>&6
  5265. echo "configure:6356: checking for regcomp" >&5
  5266. cat > conftest.$ac_ext <<EOF
  5267. #line 6359 "configure"
  5268. #include "confdefs.h"
  5269. /* System header to define __stub macros and hopefully few prototypes,
  5270. which can conflict with char regcomp(); below. */
  5271. #include <assert.h>
  5272. /* Override any gcc2 internal prototype to avoid an error. */
  5273. /* We use char because int might match the return type of a gcc2
  5274. builtin and then its argument prototype would still apply. */
  5275. char regcomp();
  5276. int main() {
  5277. /* The GNU C library defines this for functions which it implements
  5278. to always fail with ENOSYS. Some functions are actually named
  5279. something starting with __ and the normal name is an alias. */
  5280. #if defined (__stub_regcomp) || defined (__stub___regcomp)
  5281. choke me
  5282. #else
  5283. regcomp();
  5284. #endif
  5285. ; return 0; }
  5286. EOF
  5287. if { (eval echo configure:6382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5288. rm -rf conftest*
  5289. eval "ac_cv_func_regcomp=yes"
  5290. else
  5291. echo "configure: failed program was:" >&5
  5292. cat conftest.$ac_ext >&5
  5293. rm -rf conftest*
  5294. eval "ac_cv_func_regcomp=no"
  5295. fi
  5296. rm -f conftest*
  5297. if eval "test \"`echo '$ac_cv_func_'regcomp`\" = yes"; then
  5298. echo "$ac_t""yes" 1>&6
  5299. REGEXLIB="$REGEXLIB "
  5300. else
  5301. echo "$ac_t""no" 1>&6
  5302. ac_save_ldflags="$LDFLAGS"
  5303. LDFLAGS="$REGEXLIBPATH $LDFLAGS"
  5304. echo $ac_n "checking for regcomp in -lregex""... $ac_c" 1>&6
  5305. echo "configure:6409: checking for regcomp in -lregex" >&5
  5306. ac_lib_var=`echo regex'_'regcomp | sed 'y%./+-%__p_%'`
  5307. ac_save_LIBS="$LIBS"
  5308. LIBS="-lregex $LIBS"
  5309. cat > conftest.$ac_ext <<EOF
  5310. #line 6415 "configure"
  5311. #include "confdefs.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 regcomp();
  5316. int main() {
  5317. regcomp()
  5318. ; return 0; }
  5319. EOF
  5320. if { (eval echo configure:6426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5321. rm -rf conftest*
  5322. eval "ac_cv_lib_$ac_lib_var=yes"
  5323. else
  5324. echo "configure: failed program was:" >&5
  5325. cat conftest.$ac_ext >&5
  5326. rm -rf conftest*
  5327. eval "ac_cv_lib_$ac_lib_var=no"
  5328. fi
  5329. rm -f conftest*
  5330. LIBS="$ac_save_LIBS"
  5331. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5332. echo "$ac_t""yes" 1>&6
  5333. REGEXLIB="$REGEXLIB -lregex "
  5334. else
  5335. echo "$ac_t""no" 1>&6
  5336. LDFLAGS=${ac_save_ldflags}
  5337. { echo "configure: error: *** Unable to locate regex library." 1>&2; exit 1; }
  5338. fi
  5339. LDFLAGS=${ac_save_ldflags}
  5340. fi
  5341. LIBS=${ac_save_libs}
  5342. LDFLAGS=${ac_save_ldflags}
  5343. fi # $USE_REGEX
  5344. # Done checking regex
  5345. # Enable Readline option
  5346. echo $ac_n "checking whether to use Readline""... $ac_c" 1>&6
  5347. echo "configure:6476: checking whether to use Readline" >&5
  5348. echo "$ac_t"""$with_readline"" 1>&6
  5349. case "$with_readline" in
  5350. "no") USE_READLINE= ;;
  5351. "yes") USE_READLINE="1" ;;
  5352. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  5353. esac
  5354. READLINEINCPATH=
  5355. READLINELIBPATH=
  5356. READLINELIB=
  5357. HISTORYLIB=
  5358. if test -n "$USE_READLINE"; then
  5359. # With Readline includes directory
  5360. echo $ac_n "checking for location of Readline includes""... $ac_c" 1>&6
  5361. echo "configure:6497: checking for location of Readline includes" >&5
  5362. case "$with_readline_includes" in
  5363. y | ye | yes | n | no)
  5364. { echo "configure: error: *** You must supply a directory to --with-readline-includes." 1>&2; exit 1; }
  5365. ;;
  5366. esac
  5367. echo "$ac_t""$with_readline_includes" 1>&6
  5368. if test -n "$with_readline_includes" ; then
  5369. for dir in $with_readline_includes; do
  5370. if test -d "$dir"; then
  5371. READLINEINCPATH="$READLINEINCPATH -I$dir"
  5372. else
  5373. { echo "configure: error: *** Readline includes directory $dir does not exist." 1>&2; exit 1; }
  5374. fi
  5375. done
  5376. fi
  5377. ac_save_cppflags="$CPPFLAGS"
  5378. CPPFLAGS="$READLINEINCPATH $CPPFLAGS"
  5379. for ac_hdr in readline/readline.h
  5380. do
  5381. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5382. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5383. echo "configure:6523: checking for $ac_hdr" >&5
  5384. cat > conftest.$ac_ext <<EOF
  5385. #line 6526 "configure"
  5386. #include "confdefs.h"
  5387. #include <$ac_hdr>
  5388. EOF
  5389. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5390. { (eval echo configure:6531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5391. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5392. if test -z "$ac_err"; then
  5393. rm -rf conftest*
  5394. eval "ac_cv_header_$ac_safe=yes"
  5395. else
  5396. echo "$ac_err" >&5
  5397. echo "configure: failed program was:" >&5
  5398. cat conftest.$ac_ext >&5
  5399. rm -rf conftest*
  5400. eval "ac_cv_header_$ac_safe=no"
  5401. fi
  5402. rm -f conftest*
  5403. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5404. echo "$ac_t""yes" 1>&6
  5405. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5406. cat >> confdefs.h <<EOF
  5407. #define $ac_tr_hdr 1
  5408. EOF
  5409. else
  5410. echo "$ac_t""no" 1>&6
  5411. { echo "configure: error: *** Unable to locate Readline includes." 1>&2; exit 1; }
  5412. fi
  5413. done
  5414. CPPFLAGS=$ac_save_cppflags
  5415. ac_save_cppflags="$CPPFLAGS"
  5416. CPPFLAGS="$READLINEINCPATH $CPPFLAGS"
  5417. for ac_hdr in readline/history.h
  5418. do
  5419. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5420. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5421. echo "configure:6567: checking for $ac_hdr" >&5
  5422. cat > conftest.$ac_ext <<EOF
  5423. #line 6570 "configure"
  5424. #include "confdefs.h"
  5425. #include <$ac_hdr>
  5426. EOF
  5427. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5428. { (eval echo configure:6575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5429. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5430. if test -z "$ac_err"; then
  5431. rm -rf conftest*
  5432. eval "ac_cv_header_$ac_safe=yes"
  5433. else
  5434. echo "$ac_err" >&5
  5435. echo "configure: failed program was:" >&5
  5436. cat conftest.$ac_ext >&5
  5437. rm -rf conftest*
  5438. eval "ac_cv_header_$ac_safe=no"
  5439. fi
  5440. rm -f conftest*
  5441. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5442. echo "$ac_t""yes" 1>&6
  5443. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5444. cat >> confdefs.h <<EOF
  5445. #define $ac_tr_hdr 1
  5446. EOF
  5447. else
  5448. echo "$ac_t""no" 1>&6
  5449. { echo "configure: error: *** Unable to locate Readline includes." 1>&2; exit 1; }
  5450. fi
  5451. done
  5452. CPPFLAGS=$ac_save_cppflags
  5453. # With Readline library directory
  5454. echo $ac_n "checking for location of Readline library""... $ac_c" 1>&6
  5455. echo "configure:6609: checking for location of Readline library" >&5
  5456. case "$with_readline_libs" in
  5457. y | ye | yes | n | no)
  5458. { echo "configure: error: *** You must supply a directory to --with-readline-libs." 1>&2; exit 1; }
  5459. ;;
  5460. esac
  5461. echo "$ac_t""$with_readline_libs" 1>&6
  5462. if test -n "$with_readline_libs"; then
  5463. for dir in $with_readline_libs; do
  5464. if test -d "$dir"; then
  5465. READLINELIBPATH="$READLINELIBPATH -L$dir"
  5466. else
  5467. { echo "configure: error: *** Readline library directory $dir does not exist." 1>&2; exit 1; }
  5468. fi
  5469. done
  5470. fi
  5471. ac_save_ldflags="$LDFLAGS"
  5472. LDFLAGS="$READLINELIBPATH $LDFLAGS"
  5473. echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
  5474. echo "configure:6634: checking for readline in -lreadline" >&5
  5475. ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
  5476. ac_save_LIBS="$LIBS"
  5477. LIBS="-lreadline $LIBS"
  5478. cat > conftest.$ac_ext <<EOF
  5479. #line 6640 "configure"
  5480. #include "confdefs.h"
  5481. /* Override any gcc2 internal prototype to avoid an error. */
  5482. /* We use char because int might match the return type of a gcc2
  5483. builtin and then its argument prototype would still apply. */
  5484. char readline();
  5485. int main() {
  5486. readline()
  5487. ; return 0; }
  5488. EOF
  5489. if { (eval echo configure:6651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5490. rm -rf conftest*
  5491. eval "ac_cv_lib_$ac_lib_var=yes"
  5492. else
  5493. echo "configure: failed program was:" >&5
  5494. cat conftest.$ac_ext >&5
  5495. rm -rf conftest*
  5496. eval "ac_cv_lib_$ac_lib_var=no"
  5497. fi
  5498. rm -f conftest*
  5499. LIBS="$ac_save_LIBS"
  5500. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5501. echo "$ac_t""yes" 1>&6
  5502. READLINELIB="$READLINELIB -lreadline "
  5503. else
  5504. echo "$ac_t""no" 1>&6
  5505. LDFLAGS=${ac_save_ldflags}
  5506. { echo "configure: error: *** Unable to locate Readline library." 1>&2; exit 1; }
  5507. fi
  5508. LDFLAGS=${ac_save_ldflags}
  5509. ac_save_ldflags="$LDFLAGS"
  5510. LDFLAGS="$READLINELIBPATH $LDFLAGS"
  5511. echo $ac_n "checking for add_history in -lhistory""... $ac_c" 1>&6
  5512. echo "configure:6686: checking for add_history in -lhistory" >&5
  5513. ac_lib_var=`echo history'_'add_history | sed 'y%./+-%__p_%'`
  5514. ac_save_LIBS="$LIBS"
  5515. LIBS="-lhistory $LIBS"
  5516. cat > conftest.$ac_ext <<EOF
  5517. #line 6692 "configure"
  5518. #include "confdefs.h"
  5519. /* Override any gcc2 internal prototype to avoid an error. */
  5520. /* We use char because int might match the return type of a gcc2
  5521. builtin and then its argument prototype would still apply. */
  5522. char add_history();
  5523. int main() {
  5524. add_history()
  5525. ; return 0; }
  5526. EOF
  5527. if { (eval echo configure:6703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5528. rm -rf conftest*
  5529. eval "ac_cv_lib_$ac_lib_var=yes"
  5530. else
  5531. echo "configure: failed program was:" >&5
  5532. cat conftest.$ac_ext >&5
  5533. rm -rf conftest*
  5534. eval "ac_cv_lib_$ac_lib_var=no"
  5535. fi
  5536. rm -f conftest*
  5537. LIBS="$ac_save_LIBS"
  5538. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5539. echo "$ac_t""yes" 1>&6
  5540. HISTORYLIB="$HISTORYLIB -lhistory "
  5541. else
  5542. echo "$ac_t""no" 1>&6
  5543. LDFLAGS=${ac_save_ldflags}
  5544. { echo "configure: error: *** Unable to locate History library." 1>&2; exit 1; }
  5545. fi
  5546. LDFLAGS=${ac_save_ldflags}
  5547. fi # $USE_READLINE
  5548. # Done checking Readline
  5549. # GDAL option
  5550. echo $ac_n "checking whether to use GDAL""... $ac_c" 1>&6
  5551. echo "configure:6745: checking whether to use GDAL" >&5
  5552. GDAL_LIBS=
  5553. GDAL_CFLAGS=
  5554. USE_GDAL=
  5555. USE_OGR=
  5556. if test "`basename xx/$with_gdal`" = "gdal-config" ; then
  5557. GDAL_CONFIG="$with_gdal"
  5558. fi
  5559. if test "$with_gdal" = "no" ; then
  5560. echo "$ac_t""no" 1>&6
  5561. else
  5562. echo "$ac_t""yes" 1>&6
  5563. # Extract the first word of "gdal-config", so it can be a program name with args.
  5564. set dummy gdal-config; ac_word=$2
  5565. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5566. echo "configure:6763: checking for $ac_word" >&5
  5567. case "$GDAL_CONFIG" in
  5568. /*)
  5569. ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a path.
  5570. ;;
  5571. ?:/*)
  5572. ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a dos path.
  5573. ;;
  5574. *)
  5575. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5576. ac_dummy="$PATH"
  5577. for ac_dir in $ac_dummy; do
  5578. test -z "$ac_dir" && ac_dir=.
  5579. if test -f $ac_dir/$ac_word; then
  5580. ac_cv_path_GDAL_CONFIG="$ac_dir/$ac_word"
  5581. break
  5582. fi
  5583. done
  5584. IFS="$ac_save_ifs"
  5585. test -z "$ac_cv_path_GDAL_CONFIG" && ac_cv_path_GDAL_CONFIG="no"
  5586. ;;
  5587. esac
  5588. GDAL_CONFIG="$ac_cv_path_GDAL_CONFIG"
  5589. if test -n "$GDAL_CONFIG"; then
  5590. echo "$ac_t""$GDAL_CONFIG" 1>&6
  5591. else
  5592. echo "$ac_t""no" 1>&6
  5593. fi
  5594. if test "$GDAL_CONFIG" = "no" ; then
  5595. { echo "configure: error: *** couldn't find gdal-config" 1>&2; exit 1; }
  5596. fi
  5597. if test "$GDAL_CONFIG" != "" ; then
  5598. GDAL_LIBS=`"$GDAL_CONFIG" --libs`
  5599. GDAL_DEP_LIBS=`"$GDAL_CONFIG" --dep-libs`
  5600. GDAL_CFLAGS=`"$GDAL_CONFIG" --cflags`
  5601. USE_GDAL=1
  5602. if test `"$GDAL_CONFIG" --ogr-enabled` = "yes" ; then
  5603. cat >> confdefs.h <<\EOF
  5604. #define HAVE_OGR 1
  5605. EOF
  5606. USE_OGR=1
  5607. fi
  5608. fi
  5609. GDAL=
  5610. ac_save_libs="$LIBS"
  5611. ac_save_cflags="$CFLAGS"
  5612. LIBS="$LIBS $GDAL_LIBS"
  5613. CFLAGS="$CFLAGS $GDAL_CFLAGS"
  5614. cat > conftest.$ac_ext <<EOF
  5615. #line 6818 "configure"
  5616. #include "confdefs.h"
  5617. #include <gdal.h>
  5618. int main() {
  5619. GDALOpen("foo", GA_ReadOnly);
  5620. ; return 0; }
  5621. EOF
  5622. if { (eval echo configure:6825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5623. :
  5624. else
  5625. echo "configure: failed program was:" >&5
  5626. cat conftest.$ac_ext >&5
  5627. rm -rf conftest*
  5628. LIBS="$LIBS $GDAL_DEP_LIBS"
  5629. cat > conftest.$ac_ext <<EOF
  5630. #line 6834 "configure"
  5631. #include "confdefs.h"
  5632. #include <gdal.h>
  5633. int main() {
  5634. GDALOpen("foo", GA_ReadOnly);
  5635. ; return 0; }
  5636. EOF
  5637. if { (eval echo configure:6841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5638. rm -rf conftest*
  5639. GDAL_LIBS="$GDAL_LIBS $GDAL_DEP_LIBS"
  5640. else
  5641. echo "configure: failed program was:" >&5
  5642. cat conftest.$ac_ext >&5
  5643. rm -rf conftest*
  5644. { echo "configure: error: *** Unable to locate GDAL library." 1>&2; exit 1; }
  5645. fi
  5646. rm -f conftest*
  5647. fi
  5648. rm -f conftest*
  5649. LIBS=${ac_save_libs}
  5650. CFLAGS=${ac_save_cflags}
  5651. cat >> confdefs.h <<\EOF
  5652. #define HAVE_GDAL 1
  5653. EOF
  5654. fi
  5655. # libLAS option
  5656. echo $ac_n "checking whether to use libLAS""... $ac_c" 1>&6
  5657. echo "configure:6873: checking whether to use libLAS" >&5
  5658. LIBLAS_LIBS=
  5659. LIBLAS_CFLAGS=
  5660. USE_LIBLAS=
  5661. if test "`basename xx/$with_liblas`" = "liblas-config" ; then
  5662. LIBLAS_CONFIG="$with_liblas"
  5663. fi
  5664. if test "$with_liblas" = "no" ; then
  5665. echo "$ac_t""no" 1>&6
  5666. else
  5667. echo "$ac_t""yes" 1>&6
  5668. # Extract the first word of "liblas-config", so it can be a program name with args.
  5669. set dummy liblas-config; ac_word=$2
  5670. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5671. echo "configure:6890: checking for $ac_word" >&5
  5672. case "$LIBLAS_CONFIG" in
  5673. /*)
  5674. ac_cv_path_LIBLAS_CONFIG="$LIBLAS_CONFIG" # Let the user override the test with a path.
  5675. ;;
  5676. ?:/*)
  5677. ac_cv_path_LIBLAS_CONFIG="$LIBLAS_CONFIG" # Let the user override the test with a dos path.
  5678. ;;
  5679. *)
  5680. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5681. ac_dummy="$PATH"
  5682. for ac_dir in $ac_dummy; do
  5683. test -z "$ac_dir" && ac_dir=.
  5684. if test -f $ac_dir/$ac_word; then
  5685. ac_cv_path_LIBLAS_CONFIG="$ac_dir/$ac_word"
  5686. break
  5687. fi
  5688. done
  5689. IFS="$ac_save_ifs"
  5690. test -z "$ac_cv_path_LIBLAS_CONFIG" && ac_cv_path_LIBLAS_CONFIG="no"
  5691. ;;
  5692. esac
  5693. LIBLAS_CONFIG="$ac_cv_path_LIBLAS_CONFIG"
  5694. if test -n "$LIBLAS_CONFIG"; then
  5695. echo "$ac_t""$LIBLAS_CONFIG" 1>&6
  5696. else
  5697. echo "$ac_t""no" 1>&6
  5698. fi
  5699. if test "$LIBLAS_CONFIG" = "no" ; then
  5700. { echo "configure: error: *** couldn't find liblas-config" 1>&2; exit 1; }
  5701. fi
  5702. if test "$LIBLAS_CONFIG" != "" ; then
  5703. LIBLAS_LIBS=`"$LIBLAS_CONFIG" --libs`
  5704. LIBLAS_CFLAGS=`"$LIBLAS_CONFIG" --cflags`
  5705. LIBLAS_INC=`"$LIBLAS_CONFIG" --includes`
  5706. USE_LIBLAS=1
  5707. fi
  5708. LIBLAS=
  5709. ac_save_libs="$LIBS"
  5710. ac_save_cflags="$CFLAGS"
  5711. ac_save_cppflags="$CPPFLAGS"
  5712. LIBS="$LIBS $LIBLAS_LIBS"
  5713. CFLAGS="$CFLAGS $LIBLAS_CFLAGS"
  5714. CPPFLAGS="$CPPFLAGS $LIBLAS_INC"
  5715. for ac_hdr in liblas/capi/liblas.h
  5716. do
  5717. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5718. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5719. echo "configure:6943: checking for $ac_hdr" >&5
  5720. cat > conftest.$ac_ext <<EOF
  5721. #line 6946 "configure"
  5722. #include "confdefs.h"
  5723. #include <$ac_hdr>
  5724. EOF
  5725. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5726. { (eval echo configure:6951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5727. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5728. if test -z "$ac_err"; then
  5729. rm -rf conftest*
  5730. eval "ac_cv_header_$ac_safe=yes"
  5731. else
  5732. echo "$ac_err" >&5
  5733. echo "configure: failed program was:" >&5
  5734. cat conftest.$ac_ext >&5
  5735. rm -rf conftest*
  5736. eval "ac_cv_header_$ac_safe=no"
  5737. fi
  5738. rm -f conftest*
  5739. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5740. echo "$ac_t""yes" 1>&6
  5741. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5742. cat >> confdefs.h <<EOF
  5743. #define $ac_tr_hdr 1
  5744. EOF
  5745. else
  5746. echo "$ac_t""no" 1>&6
  5747. fi
  5748. done
  5749. cat > conftest.$ac_ext <<EOF
  5750. #line 6977 "configure"
  5751. #include "confdefs.h"
  5752. #include <liblas/capi/liblas.h>
  5753. int main() {
  5754. LASReader_Create("foo");
  5755. ; return 0; }
  5756. EOF
  5757. if { (eval echo configure:6984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5758. :
  5759. else
  5760. echo "configure: failed program was:" >&5
  5761. cat conftest.$ac_ext >&5
  5762. rm -rf conftest*
  5763. cat > conftest.$ac_ext <<EOF
  5764. #line 6992 "configure"
  5765. #include "confdefs.h"
  5766. #include <liblas/capi/liblas.h>
  5767. int main() {
  5768. LASReader_Create("foo");
  5769. ; return 0; }
  5770. EOF
  5771. if { (eval echo configure:6999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5772. rm -rf conftest*
  5773. LAS_LIBS="$LAS_LIBS"
  5774. else
  5775. echo "configure: failed program was:" >&5
  5776. cat conftest.$ac_ext >&5
  5777. rm -rf conftest*
  5778. { echo "configure: error: *** Unable to locate libLAS library." 1>&2; exit 1; }
  5779. fi
  5780. rm -f conftest*
  5781. fi
  5782. rm -f conftest*
  5783. LIBS=${ac_save_libs}
  5784. CFLAGS=${ac_save_cflags}
  5785. CPPFLAGS=${ac_save_cppflags}
  5786. cat >> confdefs.h <<\EOF
  5787. #define HAVE_LIBLAS 1
  5788. EOF
  5789. fi
  5790. # PDAL option
  5791. echo $ac_n "checking whether to use PDAL""... $ac_c" 1>&6
  5792. echo "configure:7032: checking whether to use PDAL" >&5
  5793. # new and currently used way to switch language to C++
  5794. # AC_LANG_PUSH(C++)
  5795. ac_ext=C
  5796. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  5797. ac_cpp='$CXXCPP $CPPFLAGS'
  5798. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  5799. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  5800. cross_compiling=$ac_cv_prog_cxx_cross
  5801. PDAL_LIBS=
  5802. PDAL_CPPFLAGS=
  5803. USE_PDAL=
  5804. if test "`basename xx/$with_pdal`" = "pdal-config" ; then
  5805. PDAL_CONFIG="$with_pdal"
  5806. fi
  5807. if test "$with_pdal" = "no" ; then
  5808. echo "$ac_t""no" 1>&6
  5809. else
  5810. echo "$ac_t""yes" 1>&6
  5811. # Extract the first word of "pdal-config", so it can be a program name with args.
  5812. set dummy pdal-config; ac_word=$2
  5813. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5814. echo "configure:7060: checking for $ac_word" >&5
  5815. case "$PDAL_CONFIG" in
  5816. /*)
  5817. ac_cv_path_PDAL_CONFIG="$PDAL_CONFIG" # Let the user override the test with a path.
  5818. ;;
  5819. ?:/*)
  5820. ac_cv_path_PDAL_CONFIG="$PDAL_CONFIG" # Let the user override the test with a dos path.
  5821. ;;
  5822. *)
  5823. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5824. ac_dummy="$PATH"
  5825. for ac_dir in $ac_dummy; do
  5826. test -z "$ac_dir" && ac_dir=.
  5827. if test -f $ac_dir/$ac_word; then
  5828. ac_cv_path_PDAL_CONFIG="$ac_dir/$ac_word"
  5829. break
  5830. fi
  5831. done
  5832. IFS="$ac_save_ifs"
  5833. test -z "$ac_cv_path_PDAL_CONFIG" && ac_cv_path_PDAL_CONFIG="no"
  5834. ;;
  5835. esac
  5836. PDAL_CONFIG="$ac_cv_path_PDAL_CONFIG"
  5837. if test -n "$PDAL_CONFIG"; then
  5838. echo "$ac_t""$PDAL_CONFIG" 1>&6
  5839. else
  5840. echo "$ac_t""no" 1>&6
  5841. fi
  5842. if test "$PDAL_CONFIG" = "no" ; then
  5843. { echo "configure: error: *** could not find pdal-config" 1>&2; exit 1; }
  5844. fi
  5845. if test "$PDAL_CONFIG" != "" ; then
  5846. PDAL_LIBS=`"$PDAL_CONFIG" --libs`
  5847. PDAL_CPPFLAGS=`"$PDAL_CONFIG" --cxxflags`
  5848. PDAL_INC=`"$PDAL_CONFIG" --includes`
  5849. USE_PDAL=1
  5850. fi
  5851. PDAL=
  5852. ac_save_libs="$LIBS"
  5853. ac_save_cflags="$CFLAGS"
  5854. ac_save_cppflags="$CPPFLAGS"
  5855. LIBS="$LIBS $PDAL_LIBS"
  5856. CFLAGS="$CFLAGS $PDAL_CFLAGS"
  5857. CPPFLAGS="$CPPFLAGS $PDAL_CPPFLAGS $PDAL_INC"
  5858. cat > conftest.$ac_ext <<EOF
  5859. #line 7110 "configure"
  5860. #include "confdefs.h"
  5861. #include <pdal/PointTable.hpp>
  5862. int main() {
  5863. pdal::PointTable table;
  5864. ; return 0; }
  5865. EOF
  5866. if { (eval echo configure:7117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5867. :
  5868. else
  5869. echo "configure: failed program was:" >&5
  5870. cat conftest.$ac_ext >&5
  5871. rm -rf conftest*
  5872. cat > conftest.$ac_ext <<EOF
  5873. #line 7125 "configure"
  5874. #include "confdefs.h"
  5875. #include <pdal/PointTable.hpp>
  5876. int main() {
  5877. pdal::PointTable table;
  5878. ; return 0; }
  5879. EOF
  5880. if { (eval echo configure:7132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5881. rm -rf conftest*
  5882. PDAL_LIBS="$PDAL_LIBS"
  5883. else
  5884. echo "configure: failed program was:" >&5
  5885. cat conftest.$ac_ext >&5
  5886. rm -rf conftest*
  5887. { echo "configure: error: *** Unable to locate PDAL library." 1>&2; exit 1; }
  5888. fi
  5889. rm -f conftest*
  5890. fi
  5891. rm -f conftest*
  5892. LIBS=${ac_save_libs}
  5893. CFLAGS=${ac_save_cflags}
  5894. CPPFLAGS=${ac_save_cppflags}
  5895. cat >> confdefs.h <<\EOF
  5896. #define HAVE_PDAL 1
  5897. EOF
  5898. fi
  5899. # new and currently used way to switch language back to C
  5900. # AC_LANG_POP(C++)
  5901. ac_ext=c
  5902. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  5903. ac_cpp='$CPP $CPPFLAGS'
  5904. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  5905. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  5906. cross_compiling=$ac_cv_prog_cc_cross
  5907. ac_ext=c
  5908. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  5909. ac_cpp='$CPP $CPPFLAGS'
  5910. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  5911. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  5912. cross_compiling=$ac_cv_prog_cc_cross
  5913. # NetCDF option
  5914. echo $ac_n "checking whether to use NetCDF""... $ac_c" 1>&6
  5915. echo "configure:7182: checking whether to use NetCDF" >&5
  5916. NETCDF_LIBS=
  5917. NETCDF_CFLAGS=
  5918. USE_NETCDF=
  5919. if test "`basename xx/$with_netcdf`" = "nc-config" ; then
  5920. NETCDF_CONFIG="$with_netcdf"
  5921. fi
  5922. if test "$with_netcdf" = "no" ; then
  5923. echo "$ac_t""no" 1>&6
  5924. else
  5925. echo "$ac_t""yes" 1>&6
  5926. # Extract the first word of "nc-config", so it can be a program name with args.
  5927. set dummy nc-config; ac_word=$2
  5928. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5929. echo "configure:7199: checking for $ac_word" >&5
  5930. case "$NETCDF_CONFIG" in
  5931. /*)
  5932. ac_cv_path_NETCDF_CONFIG="$NETCDF_CONFIG" # Let the user override the test with a path.
  5933. ;;
  5934. ?:/*)
  5935. ac_cv_path_NETCDF_CONFIG="$NETCDF_CONFIG" # Let the user override the test with a dos path.
  5936. ;;
  5937. *)
  5938. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5939. ac_dummy="$PATH"
  5940. for ac_dir in $ac_dummy; do
  5941. test -z "$ac_dir" && ac_dir=.
  5942. if test -f $ac_dir/$ac_word; then
  5943. ac_cv_path_NETCDF_CONFIG="$ac_dir/$ac_word"
  5944. break
  5945. fi
  5946. done
  5947. IFS="$ac_save_ifs"
  5948. test -z "$ac_cv_path_NETCDF_CONFIG" && ac_cv_path_NETCDF_CONFIG="no"
  5949. ;;
  5950. esac
  5951. NETCDF_CONFIG="$ac_cv_path_NETCDF_CONFIG"
  5952. if test -n "$NETCDF_CONFIG"; then
  5953. echo "$ac_t""$NETCDF_CONFIG" 1>&6
  5954. else
  5955. echo "$ac_t""no" 1>&6
  5956. fi
  5957. if test "$NETCDF_CONFIG" = "no" ; then
  5958. { echo "configure: error: *** couldn't find nc-config" 1>&2; exit 1; }
  5959. fi
  5960. if test "$NETCDF_CONFIG" != "" ; then
  5961. NETCDF_LIBS=`"$NETCDF_CONFIG" --libs`
  5962. NETCDF_CFLAGS=`"$NETCDF_CONFIG" --cflags`
  5963. USE_NETCDF=1
  5964. fi
  5965. NETCDF=
  5966. ac_save_libs="$LIBS"
  5967. ac_save_cflags="$CFLAGS"
  5968. LIBS="$LIBS $NETCDF_LIBS"
  5969. CFLAGS="$CFLAGS $NETCDF_CFLAGS"
  5970. cat > conftest.$ac_ext <<EOF
  5971. #line 7246 "configure"
  5972. #include "confdefs.h"
  5973. #include <netcdf.h>
  5974. int main() {
  5975. nc_create("foo", NC_CLOBBER, NULL);
  5976. ; return 0; }
  5977. EOF
  5978. if { (eval echo configure:7253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5979. :
  5980. else
  5981. echo "configure: failed program was:" >&5
  5982. cat conftest.$ac_ext >&5
  5983. rm -rf conftest*
  5984. cat > conftest.$ac_ext <<EOF
  5985. #line 7261 "configure"
  5986. #include "confdefs.h"
  5987. #include <netcdf.h>
  5988. int main() {
  5989. nc_create("foo", NC_CLOBBER, NULL);
  5990. ; return 0; }
  5991. EOF
  5992. if { (eval echo configure:7268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5993. rm -rf conftest*
  5994. NETCDF_LIBS="$NETCDF_LIBS"
  5995. else
  5996. echo "configure: failed program was:" >&5
  5997. cat conftest.$ac_ext >&5
  5998. rm -rf conftest*
  5999. { echo "configure: error: *** Unable to locate NetCDF library." 1>&2; exit 1; }
  6000. fi
  6001. rm -f conftest*
  6002. fi
  6003. rm -f conftest*
  6004. LIBS=${ac_save_libs}
  6005. CFLAGS=${ac_save_cflags}
  6006. cat >> confdefs.h <<\EOF
  6007. #define HAVE_NETCDF 1
  6008. EOF
  6009. fi
  6010. # GEOS option
  6011. echo $ac_n "checking whether to use GEOS""... $ac_c" 1>&6
  6012. echo "configure:7299: checking whether to use GEOS" >&5
  6013. GEOS_LIBS=
  6014. GEOS_CFLAGS=
  6015. USE_GEOS=
  6016. # FIXME: "quote" $with_geos ?
  6017. if test "`basename xx/$with_geos`" = "geos-config" ; then
  6018. GEOS_CONFIG="$with_geos"
  6019. fi
  6020. if test "$with_geos" = "no" ; then
  6021. echo "$ac_t""no" 1>&6
  6022. else
  6023. echo "$ac_t""yes" 1>&6
  6024. # Extract the first word of "geos-config", so it can be a program name with args.
  6025. set dummy geos-config; ac_word=$2
  6026. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  6027. echo "configure:7317: checking for $ac_word" >&5
  6028. case "$GEOS_CONFIG" in
  6029. /*)
  6030. ac_cv_path_GEOS_CONFIG="$GEOS_CONFIG" # Let the user override the test with a path.
  6031. ;;
  6032. ?:/*)
  6033. ac_cv_path_GEOS_CONFIG="$GEOS_CONFIG" # Let the user override the test with a dos path.
  6034. ;;
  6035. *)
  6036. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  6037. ac_dummy="$PATH"
  6038. for ac_dir in $ac_dummy; do
  6039. test -z "$ac_dir" && ac_dir=.
  6040. if test -f $ac_dir/$ac_word; then
  6041. ac_cv_path_GEOS_CONFIG="$ac_dir/$ac_word"
  6042. break
  6043. fi
  6044. done
  6045. IFS="$ac_save_ifs"
  6046. test -z "$ac_cv_path_GEOS_CONFIG" && ac_cv_path_GEOS_CONFIG="no"
  6047. ;;
  6048. esac
  6049. GEOS_CONFIG="$ac_cv_path_GEOS_CONFIG"
  6050. if test -n "$GEOS_CONFIG"; then
  6051. echo "$ac_t""$GEOS_CONFIG" 1>&6
  6052. else
  6053. echo "$ac_t""no" 1>&6
  6054. fi
  6055. if test "$GEOS_CONFIG" = "no" ; then
  6056. { echo "configure: error: *** couldn't find geos-config" 1>&2; exit 1; }
  6057. fi
  6058. if test "$GEOS_CONFIG" != "" ; then
  6059. GEOS_LIBS=`"$GEOS_CONFIG" --clibs`
  6060. GEOS_CFLAGS=`"$GEOS_CONFIG" --cflags`
  6061. USE_GEOS=1
  6062. fi
  6063. ac_save_cppflags="$CPPFLAGS"
  6064. CPPFLAGS="$GEOS_CFLAGS $CPPFLAGS"
  6065. for ac_hdr in geos_c.h
  6066. do
  6067. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6068. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6069. echo "configure:7365: checking for $ac_hdr" >&5
  6070. cat > conftest.$ac_ext <<EOF
  6071. #line 7368 "configure"
  6072. #include "confdefs.h"
  6073. #include <$ac_hdr>
  6074. EOF
  6075. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6076. { (eval echo configure:7373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6077. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6078. if test -z "$ac_err"; then
  6079. rm -rf conftest*
  6080. eval "ac_cv_header_$ac_safe=yes"
  6081. else
  6082. echo "$ac_err" >&5
  6083. echo "configure: failed program was:" >&5
  6084. cat conftest.$ac_ext >&5
  6085. rm -rf conftest*
  6086. eval "ac_cv_header_$ac_safe=no"
  6087. fi
  6088. rm -f conftest*
  6089. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6090. echo "$ac_t""yes" 1>&6
  6091. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6092. cat >> confdefs.h <<EOF
  6093. #define $ac_tr_hdr 1
  6094. EOF
  6095. else
  6096. echo "$ac_t""no" 1>&6
  6097. { echo "configure: error: *** Unable to locate GEOS includes." 1>&2; exit 1; }
  6098. fi
  6099. done
  6100. CPPFLAGS=$ac_save_cppflags
  6101. ### geos 3.3.6 installs geos_c.lib, see http://osgeo-org.1560.n6.nabble.com/osgeo4w-329-update-geos-to-3-3-6-td5024605.html
  6102. # if test "$MINGW32" = yes ; then
  6103. # LOC_CHECK_LIBS(geos_c_i,initGEOS,GEOS,$GEOS_LIBS,GEOS_LIBS)
  6104. # else
  6105. ac_save_ldflags="$LDFLAGS"
  6106. LDFLAGS="$GEOS_LIBS $LDFLAGS"
  6107. echo $ac_n "checking for initGEOS in -lgeos_c""... $ac_c" 1>&6
  6108. echo "configure:7412: checking for initGEOS in -lgeos_c" >&5
  6109. ac_lib_var=`echo geos_c'_'initGEOS | sed 'y%./+-%__p_%'`
  6110. ac_save_LIBS="$LIBS"
  6111. LIBS="-lgeos_c $LIBS"
  6112. cat > conftest.$ac_ext <<EOF
  6113. #line 7418 "configure"
  6114. #include "confdefs.h"
  6115. /* Override any gcc2 internal prototype to avoid an error. */
  6116. /* We use char because int might match the return type of a gcc2
  6117. builtin and then its argument prototype would still apply. */
  6118. char initGEOS();
  6119. int main() {
  6120. initGEOS()
  6121. ; return 0; }
  6122. EOF
  6123. if { (eval echo configure:7429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6124. rm -rf conftest*
  6125. eval "ac_cv_lib_$ac_lib_var=yes"
  6126. else
  6127. echo "configure: failed program was:" >&5
  6128. cat conftest.$ac_ext >&5
  6129. rm -rf conftest*
  6130. eval "ac_cv_lib_$ac_lib_var=no"
  6131. fi
  6132. rm -f conftest*
  6133. LIBS="$ac_save_LIBS"
  6134. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6135. echo "$ac_t""yes" 1>&6
  6136. GEOS_LIBS="$GEOS_LIBS -lgeos_c "
  6137. else
  6138. echo "$ac_t""no" 1>&6
  6139. LDFLAGS=${ac_save_ldflags}
  6140. { echo "configure: error: *** Unable to locate GEOS library." 1>&2; exit 1; }
  6141. fi
  6142. LDFLAGS=${ac_save_ldflags}
  6143. # fi
  6144. cat >> confdefs.h <<\EOF
  6145. #define HAVE_GEOS 1
  6146. EOF
  6147. fi
  6148. # Enable TIFF option
  6149. echo $ac_n "checking whether to use TIFF""... $ac_c" 1>&6
  6150. echo "configure:7473: checking whether to use TIFF" >&5
  6151. echo "$ac_t"""$with_tiff"" 1>&6
  6152. case "$with_tiff" in
  6153. "no") USE_TIFF= ;;
  6154. "yes") USE_TIFF="1" ;;
  6155. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6156. esac
  6157. TIFF_INCLUDE_DIRS=
  6158. TIFF_LIBRARY_DIRS=
  6159. TIFFLIB=
  6160. if test -n "$USE_TIFF"; then
  6161. # With TIFF includes directory
  6162. echo $ac_n "checking for location of TIFF includes""... $ac_c" 1>&6
  6163. echo "configure:7493: checking for location of TIFF includes" >&5
  6164. case "$with_tiff_includes" in
  6165. y | ye | yes | n | no)
  6166. { echo "configure: error: *** You must supply a directory to --with-tiff-includes." 1>&2; exit 1; }
  6167. ;;
  6168. esac
  6169. echo "$ac_t""$with_tiff_includes" 1>&6
  6170. if test -n "$with_tiff_includes" ; then
  6171. for dir in $with_tiff_includes; do
  6172. if test -d "$dir"; then
  6173. TIFF_INCLUDE_DIRS="$TIFF_INCLUDE_DIRS -I$dir"
  6174. else
  6175. { echo "configure: error: *** TIFF includes directory $dir does not exist." 1>&2; exit 1; }
  6176. fi
  6177. done
  6178. fi
  6179. ac_save_cppflags="$CPPFLAGS"
  6180. CPPFLAGS="$TIFF_INCLUDE_DIRS $CPPFLAGS"
  6181. for ac_hdr in tiffio.h
  6182. do
  6183. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6184. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6185. echo "configure:7519: checking for $ac_hdr" >&5
  6186. cat > conftest.$ac_ext <<EOF
  6187. #line 7522 "configure"
  6188. #include "confdefs.h"
  6189. #include <$ac_hdr>
  6190. EOF
  6191. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6192. { (eval echo configure:7527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6193. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6194. if test -z "$ac_err"; then
  6195. rm -rf conftest*
  6196. eval "ac_cv_header_$ac_safe=yes"
  6197. else
  6198. echo "$ac_err" >&5
  6199. echo "configure: failed program was:" >&5
  6200. cat conftest.$ac_ext >&5
  6201. rm -rf conftest*
  6202. eval "ac_cv_header_$ac_safe=no"
  6203. fi
  6204. rm -f conftest*
  6205. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6206. echo "$ac_t""yes" 1>&6
  6207. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6208. cat >> confdefs.h <<EOF
  6209. #define $ac_tr_hdr 1
  6210. EOF
  6211. else
  6212. echo "$ac_t""no" 1>&6
  6213. { echo "configure: error: *** Unable to locate TIFF includes." 1>&2; exit 1; }
  6214. fi
  6215. done
  6216. CPPFLAGS=$ac_save_cppflags
  6217. # With TIFF library directory
  6218. echo $ac_n "checking for location of TIFF library""... $ac_c" 1>&6
  6219. echo "configure:7561: checking for location of TIFF library" >&5
  6220. case "$with_tiff_libs" in
  6221. y | ye | yes | n | no)
  6222. { echo "configure: error: *** You must supply a directory to --with-tiff-libs." 1>&2; exit 1; }
  6223. ;;
  6224. esac
  6225. echo "$ac_t""$with_tiff_libs" 1>&6
  6226. if test -n "$with_tiff_libs"; then
  6227. for dir in $with_tiff_libs; do
  6228. if test -d "$dir"; then
  6229. TIFF_LIBRARY_DIRS="$TIFF_LIBRARY_DIRS -L$dir"
  6230. else
  6231. { echo "configure: error: *** TIFF library directory $dir does not exist." 1>&2; exit 1; }
  6232. fi
  6233. done
  6234. fi
  6235. ac_save_ldflags="$LDFLAGS"
  6236. LDFLAGS="$TIFF_LIBRARY_DIRS $LDFLAGS"
  6237. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6238. echo "configure:7592: checking for TIFFOpen in -ltiff" >&5
  6239. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6240. ac_save_LIBS="$LIBS"
  6241. LIBS="-ltiff $LIBS"
  6242. cat > conftest.$ac_ext <<EOF
  6243. #line 7598 "configure"
  6244. #include "confdefs.h"
  6245. /* Override any gcc2 internal prototype to avoid an error. */
  6246. /* We use char because int might match the return type of a gcc2
  6247. builtin and then its argument prototype would still apply. */
  6248. char TIFFOpen();
  6249. int main() {
  6250. TIFFOpen()
  6251. ; return 0; }
  6252. EOF
  6253. if { (eval echo configure:7609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6254. rm -rf conftest*
  6255. eval "ac_cv_lib_$ac_lib_var=yes"
  6256. else
  6257. echo "configure: failed program was:" >&5
  6258. cat conftest.$ac_ext >&5
  6259. rm -rf conftest*
  6260. eval "ac_cv_lib_$ac_lib_var=no"
  6261. fi
  6262. rm -f conftest*
  6263. LIBS="$ac_save_LIBS"
  6264. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6265. echo "$ac_t""yes" 1>&6
  6266. TIFFLIB="$TIFFLIB -ltiff "
  6267. else
  6268. echo "$ac_t""no" 1>&6
  6269. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6270. echo "configure:7628: checking for TIFFOpen in -ltiff" >&5
  6271. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6272. ac_save_LIBS="$LIBS"
  6273. LIBS="-ltiff $MATHLIB $LIBS"
  6274. cat > conftest.$ac_ext <<EOF
  6275. #line 7634 "configure"
  6276. #include "confdefs.h"
  6277. /* Override any gcc2 internal prototype to avoid an error. */
  6278. /* We use char because int might match the return type of a gcc2
  6279. builtin and then its argument prototype would still apply. */
  6280. char TIFFOpen();
  6281. int main() {
  6282. TIFFOpen()
  6283. ; return 0; }
  6284. EOF
  6285. if { (eval echo configure:7645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6286. rm -rf conftest*
  6287. eval "ac_cv_lib_$ac_lib_var=yes"
  6288. else
  6289. echo "configure: failed program was:" >&5
  6290. cat conftest.$ac_ext >&5
  6291. rm -rf conftest*
  6292. eval "ac_cv_lib_$ac_lib_var=no"
  6293. fi
  6294. rm -f conftest*
  6295. LIBS="$ac_save_LIBS"
  6296. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6297. echo "$ac_t""yes" 1>&6
  6298. TIFFLIB="$TIFFLIB -ltiff $MATHLIB"
  6299. else
  6300. echo "$ac_t""no" 1>&6
  6301. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6302. echo "configure:7664: checking for TIFFOpen in -ltiff" >&5
  6303. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6304. ac_save_LIBS="$LIBS"
  6305. LIBS="-ltiff $ZLIB $LIBS"
  6306. cat > conftest.$ac_ext <<EOF
  6307. #line 7670 "configure"
  6308. #include "confdefs.h"
  6309. /* Override any gcc2 internal prototype to avoid an error. */
  6310. /* We use char because int might match the return type of a gcc2
  6311. builtin and then its argument prototype would still apply. */
  6312. char TIFFOpen();
  6313. int main() {
  6314. TIFFOpen()
  6315. ; return 0; }
  6316. EOF
  6317. if { (eval echo configure:7681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6318. rm -rf conftest*
  6319. eval "ac_cv_lib_$ac_lib_var=yes"
  6320. else
  6321. echo "configure: failed program was:" >&5
  6322. cat conftest.$ac_ext >&5
  6323. rm -rf conftest*
  6324. eval "ac_cv_lib_$ac_lib_var=no"
  6325. fi
  6326. rm -f conftest*
  6327. LIBS="$ac_save_LIBS"
  6328. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6329. echo "$ac_t""yes" 1>&6
  6330. TIFFLIB="$TIFFLIB -ltiff $ZLIB"
  6331. else
  6332. echo "$ac_t""no" 1>&6
  6333. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6334. echo "configure:7700: checking for TIFFOpen in -ltiff" >&5
  6335. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6336. ac_save_LIBS="$LIBS"
  6337. LIBS="-ltiff $ZLIB $MATHLIB $LIBS"
  6338. cat > conftest.$ac_ext <<EOF
  6339. #line 7706 "configure"
  6340. #include "confdefs.h"
  6341. /* Override any gcc2 internal prototype to avoid an error. */
  6342. /* We use char because int might match the return type of a gcc2
  6343. builtin and then its argument prototype would still apply. */
  6344. char TIFFOpen();
  6345. int main() {
  6346. TIFFOpen()
  6347. ; return 0; }
  6348. EOF
  6349. if { (eval echo configure:7717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6350. rm -rf conftest*
  6351. eval "ac_cv_lib_$ac_lib_var=yes"
  6352. else
  6353. echo "configure: failed program was:" >&5
  6354. cat conftest.$ac_ext >&5
  6355. rm -rf conftest*
  6356. eval "ac_cv_lib_$ac_lib_var=no"
  6357. fi
  6358. rm -f conftest*
  6359. LIBS="$ac_save_LIBS"
  6360. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6361. echo "$ac_t""yes" 1>&6
  6362. TIFFLIB="$TIFFLIB -ltiff $ZLIB $MATHLIB"
  6363. else
  6364. echo "$ac_t""no" 1>&6
  6365. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6366. echo "configure:7736: checking for TIFFOpen in -ltiff" >&5
  6367. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6368. ac_save_LIBS="$LIBS"
  6369. LIBS="-ltiff -ljpeg $LIBS"
  6370. cat > conftest.$ac_ext <<EOF
  6371. #line 7742 "configure"
  6372. #include "confdefs.h"
  6373. /* Override any gcc2 internal prototype to avoid an error. */
  6374. /* We use char because int might match the return type of a gcc2
  6375. builtin and then its argument prototype would still apply. */
  6376. char TIFFOpen();
  6377. int main() {
  6378. TIFFOpen()
  6379. ; return 0; }
  6380. EOF
  6381. if { (eval echo configure:7753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6382. rm -rf conftest*
  6383. eval "ac_cv_lib_$ac_lib_var=yes"
  6384. else
  6385. echo "configure: failed program was:" >&5
  6386. cat conftest.$ac_ext >&5
  6387. rm -rf conftest*
  6388. eval "ac_cv_lib_$ac_lib_var=no"
  6389. fi
  6390. rm -f conftest*
  6391. LIBS="$ac_save_LIBS"
  6392. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6393. echo "$ac_t""yes" 1>&6
  6394. TIFFLIB="$TIFFLIB -ltiff -ljpeg"
  6395. else
  6396. echo "$ac_t""no" 1>&6
  6397. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6398. echo "configure:7772: checking for TIFFOpen in -ltiff" >&5
  6399. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6400. ac_save_LIBS="$LIBS"
  6401. LIBS="-ltiff -ljpeg $MATHLIB $LIBS"
  6402. cat > conftest.$ac_ext <<EOF
  6403. #line 7778 "configure"
  6404. #include "confdefs.h"
  6405. /* Override any gcc2 internal prototype to avoid an error. */
  6406. /* We use char because int might match the return type of a gcc2
  6407. builtin and then its argument prototype would still apply. */
  6408. char TIFFOpen();
  6409. int main() {
  6410. TIFFOpen()
  6411. ; return 0; }
  6412. EOF
  6413. if { (eval echo configure:7789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6414. rm -rf conftest*
  6415. eval "ac_cv_lib_$ac_lib_var=yes"
  6416. else
  6417. echo "configure: failed program was:" >&5
  6418. cat conftest.$ac_ext >&5
  6419. rm -rf conftest*
  6420. eval "ac_cv_lib_$ac_lib_var=no"
  6421. fi
  6422. rm -f conftest*
  6423. LIBS="$ac_save_LIBS"
  6424. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6425. echo "$ac_t""yes" 1>&6
  6426. TIFFLIB="$TIFFLIB -ltiff -ljpeg $MATHLIB"
  6427. else
  6428. echo "$ac_t""no" 1>&6
  6429. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6430. echo "configure:7808: checking for TIFFOpen in -ltiff" >&5
  6431. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6432. ac_save_LIBS="$LIBS"
  6433. LIBS="-ltiff -ljpeg $ZLIB $LIBS"
  6434. cat > conftest.$ac_ext <<EOF
  6435. #line 7814 "configure"
  6436. #include "confdefs.h"
  6437. /* Override any gcc2 internal prototype to avoid an error. */
  6438. /* We use char because int might match the return type of a gcc2
  6439. builtin and then its argument prototype would still apply. */
  6440. char TIFFOpen();
  6441. int main() {
  6442. TIFFOpen()
  6443. ; return 0; }
  6444. EOF
  6445. if { (eval echo configure:7825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6446. rm -rf conftest*
  6447. eval "ac_cv_lib_$ac_lib_var=yes"
  6448. else
  6449. echo "configure: failed program was:" >&5
  6450. cat conftest.$ac_ext >&5
  6451. rm -rf conftest*
  6452. eval "ac_cv_lib_$ac_lib_var=no"
  6453. fi
  6454. rm -f conftest*
  6455. LIBS="$ac_save_LIBS"
  6456. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6457. echo "$ac_t""yes" 1>&6
  6458. TIFFLIB="$TIFFLIB -ltiff -ljpeg $ZLIB"
  6459. else
  6460. echo "$ac_t""no" 1>&6
  6461. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  6462. echo "configure:7844: checking for TIFFOpen in -ltiff" >&5
  6463. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  6464. ac_save_LIBS="$LIBS"
  6465. LIBS="-ltiff -ljpeg $ZLIB $MATHLIB $LIBS"
  6466. cat > conftest.$ac_ext <<EOF
  6467. #line 7850 "configure"
  6468. #include "confdefs.h"
  6469. /* Override any gcc2 internal prototype to avoid an error. */
  6470. /* We use char because int might match the return type of a gcc2
  6471. builtin and then its argument prototype would still apply. */
  6472. char TIFFOpen();
  6473. int main() {
  6474. TIFFOpen()
  6475. ; return 0; }
  6476. EOF
  6477. if { (eval echo configure:7861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6478. rm -rf conftest*
  6479. eval "ac_cv_lib_$ac_lib_var=yes"
  6480. else
  6481. echo "configure: failed program was:" >&5
  6482. cat conftest.$ac_ext >&5
  6483. rm -rf conftest*
  6484. eval "ac_cv_lib_$ac_lib_var=no"
  6485. fi
  6486. rm -f conftest*
  6487. LIBS="$ac_save_LIBS"
  6488. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6489. echo "$ac_t""yes" 1>&6
  6490. TIFFLIB="$TIFFLIB -ltiff -ljpeg $ZLIB $MATHLIB"
  6491. else
  6492. echo "$ac_t""no" 1>&6
  6493. LDFLAGS=${ac_save_ldflags}
  6494. { echo "configure: error: *** Unable to locate TIFF library." 1>&2; exit 1; }
  6495. fi
  6496. fi
  6497. fi
  6498. fi
  6499. fi
  6500. fi
  6501. fi
  6502. fi
  6503. LDFLAGS=${ac_save_ldflags}
  6504. fi # $USE_TIFF
  6505. # Done checking TIFF
  6506. # Enable PNG option
  6507. echo $ac_n "checking whether to use PNG""... $ac_c" 1>&6
  6508. echo "configure:7959: checking whether to use PNG" >&5
  6509. echo "$ac_t"""$with_png"" 1>&6
  6510. case "$with_png" in
  6511. "no") USE_PNG= ;;
  6512. "yes") USE_PNG="1" ;;
  6513. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6514. esac
  6515. PNGINC=
  6516. PNGLIB=
  6517. if test -n "$USE_PNG"; then
  6518. # With PNG includes directory
  6519. echo $ac_n "checking for location of PNG includes""... $ac_c" 1>&6
  6520. echo "configure:7978: checking for location of PNG includes" >&5
  6521. case "$with_png_includes" in
  6522. y | ye | yes | n | no)
  6523. { echo "configure: error: *** You must supply a directory to --with-png-includes." 1>&2; exit 1; }
  6524. ;;
  6525. esac
  6526. echo "$ac_t""$with_png_includes" 1>&6
  6527. if test -n "$with_png_includes" ; then
  6528. for dir in $with_png_includes; do
  6529. if test -d "$dir"; then
  6530. PNGINC="$PNGINC -I$dir"
  6531. else
  6532. { echo "configure: error: *** PNG includes directory $dir does not exist." 1>&2; exit 1; }
  6533. fi
  6534. done
  6535. fi
  6536. ac_save_cppflags="$CPPFLAGS"
  6537. CPPFLAGS="$PNGINC $CPPFLAGS"
  6538. for ac_hdr in png.h
  6539. do
  6540. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6541. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6542. echo "configure:8004: checking for $ac_hdr" >&5
  6543. cat > conftest.$ac_ext <<EOF
  6544. #line 8007 "configure"
  6545. #include "confdefs.h"
  6546. #include <$ac_hdr>
  6547. EOF
  6548. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6549. { (eval echo configure:8012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6550. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6551. if test -z "$ac_err"; then
  6552. rm -rf conftest*
  6553. eval "ac_cv_header_$ac_safe=yes"
  6554. else
  6555. echo "$ac_err" >&5
  6556. echo "configure: failed program was:" >&5
  6557. cat conftest.$ac_ext >&5
  6558. rm -rf conftest*
  6559. eval "ac_cv_header_$ac_safe=no"
  6560. fi
  6561. rm -f conftest*
  6562. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6563. echo "$ac_t""yes" 1>&6
  6564. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6565. cat >> confdefs.h <<EOF
  6566. #define $ac_tr_hdr 1
  6567. EOF
  6568. else
  6569. echo "$ac_t""no" 1>&6
  6570. { echo "configure: error: *** Unable to locate PNG includes." 1>&2; exit 1; }
  6571. fi
  6572. done
  6573. CPPFLAGS=$ac_save_cppflags
  6574. # With PNG library directory
  6575. echo $ac_n "checking for location of PNG library""... $ac_c" 1>&6
  6576. echo "configure:8046: checking for location of PNG library" >&5
  6577. case "$with_png_libs" in
  6578. y | ye | yes | n | no)
  6579. { echo "configure: error: *** You must supply a directory to --with-png-libs." 1>&2; exit 1; }
  6580. ;;
  6581. esac
  6582. echo "$ac_t""$with_png_libs" 1>&6
  6583. if test -n "$with_png_libs"; then
  6584. for dir in $with_png_libs; do
  6585. if test -d "$dir"; then
  6586. PNGLIB="$PNGLIB -L$dir"
  6587. else
  6588. { echo "configure: error: *** PNG library directory $dir does not exist." 1>&2; exit 1; }
  6589. fi
  6590. done
  6591. fi
  6592. ac_save_ldflags="$LDFLAGS"
  6593. LDFLAGS="$PNGLIB $LDFLAGS"
  6594. echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
  6595. echo "configure:8071: checking for png_read_image in -lpng" >&5
  6596. ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
  6597. ac_save_LIBS="$LIBS"
  6598. LIBS="-lpng $ZLIB $MATHLIB $LIBS"
  6599. cat > conftest.$ac_ext <<EOF
  6600. #line 8077 "configure"
  6601. #include "confdefs.h"
  6602. /* Override any gcc2 internal prototype to avoid an error. */
  6603. /* We use char because int might match the return type of a gcc2
  6604. builtin and then its argument prototype would still apply. */
  6605. char png_read_image();
  6606. int main() {
  6607. png_read_image()
  6608. ; return 0; }
  6609. EOF
  6610. if { (eval echo configure:8088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6611. rm -rf conftest*
  6612. eval "ac_cv_lib_$ac_lib_var=yes"
  6613. else
  6614. echo "configure: failed program was:" >&5
  6615. cat conftest.$ac_ext >&5
  6616. rm -rf conftest*
  6617. eval "ac_cv_lib_$ac_lib_var=no"
  6618. fi
  6619. rm -f conftest*
  6620. LIBS="$ac_save_LIBS"
  6621. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6622. echo "$ac_t""yes" 1>&6
  6623. PNGLIB="$PNGLIB -lpng $ZLIB $MATHLIB"
  6624. else
  6625. echo "$ac_t""no" 1>&6
  6626. LDFLAGS=${ac_save_ldflags}
  6627. { echo "configure: error: *** Unable to locate PNG library." 1>&2; exit 1; }
  6628. fi
  6629. LDFLAGS=${ac_save_ldflags}
  6630. fi # $USE_PNG
  6631. # Done checking PNG
  6632. # Enable PostgreSQL option
  6633. echo $ac_n "checking whether to use PostgreSQL""... $ac_c" 1>&6
  6634. echo "configure:8130: checking whether to use PostgreSQL" >&5
  6635. echo "$ac_t"""$with_postgres"" 1>&6
  6636. case "$with_postgres" in
  6637. "no") USE_POSTGRES= ;;
  6638. "yes") USE_POSTGRES="1" ;;
  6639. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6640. esac
  6641. if test -n "$USE_POSTGRES"; then
  6642. cat >> confdefs.h <<\EOF
  6643. #define HAVE_POSTGRES 1
  6644. EOF
  6645. fi # $USE_POSTGRES
  6646. PQINCPATH=
  6647. PQLIBPATH=
  6648. PQLIB=
  6649. if test -n "$USE_POSTGRES"; then
  6650. # With PostgreSQL includes directory
  6651. echo $ac_n "checking for location of PostgreSQL includes""... $ac_c" 1>&6
  6652. echo "configure:8157: checking for location of PostgreSQL includes" >&5
  6653. case "$with_postgres_includes" in
  6654. y | ye | yes | n | no)
  6655. { echo "configure: error: *** You must supply a directory to --with-postgres-includes." 1>&2; exit 1; }
  6656. ;;
  6657. esac
  6658. echo "$ac_t""$with_postgres_includes" 1>&6
  6659. if test -n "$with_postgres_includes" ; then
  6660. for dir in $with_postgres_includes; do
  6661. if test -d "$dir"; then
  6662. PQINCPATH="$PQINCPATH -I$dir"
  6663. else
  6664. { echo "configure: error: *** PostgreSQL includes directory $dir does not exist." 1>&2; exit 1; }
  6665. fi
  6666. done
  6667. fi
  6668. ac_save_cppflags="$CPPFLAGS"
  6669. CPPFLAGS="$PQINCPATH $CPPFLAGS"
  6670. for ac_hdr in libpq-fe.h
  6671. do
  6672. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6673. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6674. echo "configure:8183: checking for $ac_hdr" >&5
  6675. cat > conftest.$ac_ext <<EOF
  6676. #line 8186 "configure"
  6677. #include "confdefs.h"
  6678. #include <$ac_hdr>
  6679. EOF
  6680. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6681. { (eval echo configure:8191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6682. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6683. if test -z "$ac_err"; then
  6684. rm -rf conftest*
  6685. eval "ac_cv_header_$ac_safe=yes"
  6686. else
  6687. echo "$ac_err" >&5
  6688. echo "configure: failed program was:" >&5
  6689. cat conftest.$ac_ext >&5
  6690. rm -rf conftest*
  6691. eval "ac_cv_header_$ac_safe=no"
  6692. fi
  6693. rm -f conftest*
  6694. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6695. echo "$ac_t""yes" 1>&6
  6696. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6697. cat >> confdefs.h <<EOF
  6698. #define $ac_tr_hdr 1
  6699. EOF
  6700. else
  6701. echo "$ac_t""no" 1>&6
  6702. { echo "configure: error: *** Unable to locate PostgreSQL includes." 1>&2; exit 1; }
  6703. fi
  6704. done
  6705. CPPFLAGS=$ac_save_cppflags
  6706. fi # $USE_POSTGRES
  6707. if test -n "$USE_POSTGRES"; then
  6708. # With PostgreSQL library directory
  6709. echo $ac_n "checking for location of PostgreSQL library""... $ac_c" 1>&6
  6710. echo "configure:8229: checking for location of PostgreSQL library" >&5
  6711. case "$with_postgres_libs" in
  6712. y | ye | yes | n | no)
  6713. { echo "configure: error: *** You must supply a directory to --with-postgres-libs." 1>&2; exit 1; }
  6714. ;;
  6715. esac
  6716. echo "$ac_t""$with_postgres_libs" 1>&6
  6717. if test -n "$with_postgres_libs"; then
  6718. for dir in $with_postgres_libs; do
  6719. if test -d "$dir"; then
  6720. PQLIBPATH="$PQLIBPATH -L$dir"
  6721. else
  6722. { echo "configure: error: *** PostgreSQL library directory $dir does not exist." 1>&2; exit 1; }
  6723. fi
  6724. done
  6725. fi
  6726. ac_save_ldflags="$LDFLAGS"
  6727. LDFLAGS="$PQLIBPATH $LDFLAGS"
  6728. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6729. echo "configure:8258: checking for PQsetdbLogin in -lpq" >&5
  6730. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6731. ac_save_LIBS="$LIBS"
  6732. LIBS="-lpq $LIBS"
  6733. cat > conftest.$ac_ext <<EOF
  6734. #line 8264 "configure"
  6735. #include "confdefs.h"
  6736. /* Override any gcc2 internal prototype to avoid an error. */
  6737. /* We use char because int might match the return type of a gcc2
  6738. builtin and then its argument prototype would still apply. */
  6739. char PQsetdbLogin();
  6740. int main() {
  6741. PQsetdbLogin()
  6742. ; return 0; }
  6743. EOF
  6744. if { (eval echo configure:8275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6745. rm -rf conftest*
  6746. eval "ac_cv_lib_$ac_lib_var=yes"
  6747. else
  6748. echo "configure: failed program was:" >&5
  6749. cat conftest.$ac_ext >&5
  6750. rm -rf conftest*
  6751. eval "ac_cv_lib_$ac_lib_var=no"
  6752. fi
  6753. rm -f conftest*
  6754. LIBS="$ac_save_LIBS"
  6755. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6756. echo "$ac_t""yes" 1>&6
  6757. PQLIB="$PQLIB -lpq "
  6758. else
  6759. echo "$ac_t""no" 1>&6
  6760. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6761. echo "configure:8294: checking for PQsetdbLogin in -lpq" >&5
  6762. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6763. ac_save_LIBS="$LIBS"
  6764. LIBS="-lpq -lssl -lcrypto $LIBS"
  6765. cat > conftest.$ac_ext <<EOF
  6766. #line 8300 "configure"
  6767. #include "confdefs.h"
  6768. /* Override any gcc2 internal prototype to avoid an error. */
  6769. /* We use char because int might match the return type of a gcc2
  6770. builtin and then its argument prototype would still apply. */
  6771. char PQsetdbLogin();
  6772. int main() {
  6773. PQsetdbLogin()
  6774. ; return 0; }
  6775. EOF
  6776. if { (eval echo configure:8311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6777. rm -rf conftest*
  6778. eval "ac_cv_lib_$ac_lib_var=yes"
  6779. else
  6780. echo "configure: failed program was:" >&5
  6781. cat conftest.$ac_ext >&5
  6782. rm -rf conftest*
  6783. eval "ac_cv_lib_$ac_lib_var=no"
  6784. fi
  6785. rm -f conftest*
  6786. LIBS="$ac_save_LIBS"
  6787. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6788. echo "$ac_t""yes" 1>&6
  6789. PQLIB="$PQLIB -lpq -lssl -lcrypto"
  6790. else
  6791. echo "$ac_t""no" 1>&6
  6792. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6793. echo "configure:8330: checking for PQsetdbLogin in -lpq" >&5
  6794. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6795. ac_save_LIBS="$LIBS"
  6796. LIBS="-lpq -lcrypt $LIBS"
  6797. cat > conftest.$ac_ext <<EOF
  6798. #line 8336 "configure"
  6799. #include "confdefs.h"
  6800. /* Override any gcc2 internal prototype to avoid an error. */
  6801. /* We use char because int might match the return type of a gcc2
  6802. builtin and then its argument prototype would still apply. */
  6803. char PQsetdbLogin();
  6804. int main() {
  6805. PQsetdbLogin()
  6806. ; return 0; }
  6807. EOF
  6808. if { (eval echo configure:8347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6809. rm -rf conftest*
  6810. eval "ac_cv_lib_$ac_lib_var=yes"
  6811. else
  6812. echo "configure: failed program was:" >&5
  6813. cat conftest.$ac_ext >&5
  6814. rm -rf conftest*
  6815. eval "ac_cv_lib_$ac_lib_var=no"
  6816. fi
  6817. rm -f conftest*
  6818. LIBS="$ac_save_LIBS"
  6819. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6820. echo "$ac_t""yes" 1>&6
  6821. PQLIB="$PQLIB -lpq -lcrypt"
  6822. else
  6823. echo "$ac_t""no" 1>&6
  6824. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6825. echo "configure:8366: checking for PQsetdbLogin in -lpq" >&5
  6826. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6827. ac_save_LIBS="$LIBS"
  6828. LIBS="-lpq -lcrypt -lssl -lcrypto $LIBS"
  6829. cat > conftest.$ac_ext <<EOF
  6830. #line 8372 "configure"
  6831. #include "confdefs.h"
  6832. /* Override any gcc2 internal prototype to avoid an error. */
  6833. /* We use char because int might match the return type of a gcc2
  6834. builtin and then its argument prototype would still apply. */
  6835. char PQsetdbLogin();
  6836. int main() {
  6837. PQsetdbLogin()
  6838. ; return 0; }
  6839. EOF
  6840. if { (eval echo configure:8383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6841. rm -rf conftest*
  6842. eval "ac_cv_lib_$ac_lib_var=yes"
  6843. else
  6844. echo "configure: failed program was:" >&5
  6845. cat conftest.$ac_ext >&5
  6846. rm -rf conftest*
  6847. eval "ac_cv_lib_$ac_lib_var=no"
  6848. fi
  6849. rm -f conftest*
  6850. LIBS="$ac_save_LIBS"
  6851. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6852. echo "$ac_t""yes" 1>&6
  6853. PQLIB="$PQLIB -lpq -lcrypt -lssl -lcrypto"
  6854. else
  6855. echo "$ac_t""no" 1>&6
  6856. LDFLAGS=${ac_save_ldflags}
  6857. { echo "configure: error: *** Unable to locate PostgreSQL library." 1>&2; exit 1; }
  6858. fi
  6859. fi
  6860. fi
  6861. fi
  6862. LDFLAGS=${ac_save_ldflags}
  6863. ac_save_ldflags="$LDFLAGS"
  6864. LDFLAGS="$LDFLAGS $PQLIBPATH"
  6865. echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
  6866. echo "configure:8440: checking for PQcmdTuples in -lpq" >&5
  6867. ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
  6868. ac_save_LIBS="$LIBS"
  6869. LIBS="-lpq $LIBS"
  6870. cat > conftest.$ac_ext <<EOF
  6871. #line 8446 "configure"
  6872. #include "confdefs.h"
  6873. /* Override any gcc2 internal prototype to avoid an error. */
  6874. /* We use char because int might match the return type of a gcc2
  6875. builtin and then its argument prototype would still apply. */
  6876. char PQcmdTuples();
  6877. int main() {
  6878. PQcmdTuples()
  6879. ; return 0; }
  6880. EOF
  6881. if { (eval echo configure:8457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6882. rm -rf conftest*
  6883. eval "ac_cv_lib_$ac_lib_var=yes"
  6884. else
  6885. echo "configure: failed program was:" >&5
  6886. cat conftest.$ac_ext >&5
  6887. rm -rf conftest*
  6888. eval "ac_cv_lib_$ac_lib_var=no"
  6889. fi
  6890. rm -f conftest*
  6891. LIBS="$ac_save_LIBS"
  6892. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6893. echo "$ac_t""yes" 1>&6
  6894. cat >> confdefs.h <<\EOF
  6895. #define HAVE_PQCMDTUPLES 1
  6896. EOF
  6897. else
  6898. echo "$ac_t""no" 1>&6
  6899. echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
  6900. echo "configure:8479: checking for PQcmdTuples in -lpq" >&5
  6901. ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
  6902. ac_save_LIBS="$LIBS"
  6903. LIBS="-lpq -lcrypt $LIBS"
  6904. cat > conftest.$ac_ext <<EOF
  6905. #line 8485 "configure"
  6906. #include "confdefs.h"
  6907. /* Override any gcc2 internal prototype to avoid an error. */
  6908. /* We use char because int might match the return type of a gcc2
  6909. builtin and then its argument prototype would still apply. */
  6910. char PQcmdTuples();
  6911. int main() {
  6912. PQcmdTuples()
  6913. ; return 0; }
  6914. EOF
  6915. if { (eval echo configure:8496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6916. rm -rf conftest*
  6917. eval "ac_cv_lib_$ac_lib_var=yes"
  6918. else
  6919. echo "configure: failed program was:" >&5
  6920. cat conftest.$ac_ext >&5
  6921. rm -rf conftest*
  6922. eval "ac_cv_lib_$ac_lib_var=no"
  6923. fi
  6924. rm -f conftest*
  6925. LIBS="$ac_save_LIBS"
  6926. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6927. echo "$ac_t""yes" 1>&6
  6928. cat >> confdefs.h <<\EOF
  6929. #define HAVE_PQCMDTUPLES 1
  6930. EOF
  6931. else
  6932. echo "$ac_t""no" 1>&6
  6933. fi
  6934. fi
  6935. LDFLAGS="${ac_save_ldflags}"
  6936. fi # $USE_POSTGRES
  6937. # Done checking PostgreSQL
  6938. # Enable MySQL option
  6939. echo $ac_n "checking whether to use MySQL""... $ac_c" 1>&6
  6940. echo "configure:8539: checking whether to use MySQL" >&5
  6941. echo "$ac_t"""$with_mysql"" 1>&6
  6942. case "$with_mysql" in
  6943. "no") USE_MYSQL= ;;
  6944. "yes") USE_MYSQL="1" ;;
  6945. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6946. esac
  6947. MYSQLINCPATH=
  6948. MYSQLLIBPATH=
  6949. MYSQLLIB=
  6950. if test -n "$USE_MYSQL"; then
  6951. # With MySQL includes directory
  6952. echo $ac_n "checking for location of MySQL includes""... $ac_c" 1>&6
  6953. echo "configure:8559: checking for location of MySQL includes" >&5
  6954. case "$with_mysql_includes" in
  6955. y | ye | yes | n | no)
  6956. { echo "configure: error: *** You must supply a directory to --with-mysql-includes." 1>&2; exit 1; }
  6957. ;;
  6958. esac
  6959. echo "$ac_t""$with_mysql_includes" 1>&6
  6960. if test -n "$with_mysql_includes" ; then
  6961. for dir in $with_mysql_includes; do
  6962. if test -d "$dir"; then
  6963. MYSQLINCPATH="$MYSQLINCPATH -I$dir"
  6964. else
  6965. { echo "configure: error: *** MySQL includes directory $dir does not exist." 1>&2; exit 1; }
  6966. fi
  6967. done
  6968. fi
  6969. ac_save_cppflags="$CPPFLAGS"
  6970. CPPFLAGS="$MYSQLINCPATH $CPPFLAGS"
  6971. for ac_hdr in mysql.h
  6972. do
  6973. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6974. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6975. echo "configure:8585: checking for $ac_hdr" >&5
  6976. cat > conftest.$ac_ext <<EOF
  6977. #line 8588 "configure"
  6978. #include "confdefs.h"
  6979. #include <$ac_hdr>
  6980. EOF
  6981. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6982. { (eval echo configure:8593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6983. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6984. if test -z "$ac_err"; then
  6985. rm -rf conftest*
  6986. eval "ac_cv_header_$ac_safe=yes"
  6987. else
  6988. echo "$ac_err" >&5
  6989. echo "configure: failed program was:" >&5
  6990. cat conftest.$ac_ext >&5
  6991. rm -rf conftest*
  6992. eval "ac_cv_header_$ac_safe=no"
  6993. fi
  6994. rm -f conftest*
  6995. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6996. echo "$ac_t""yes" 1>&6
  6997. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6998. cat >> confdefs.h <<EOF
  6999. #define $ac_tr_hdr 1
  7000. EOF
  7001. else
  7002. echo "$ac_t""no" 1>&6
  7003. { echo "configure: error: *** Unable to locate MySQL includes." 1>&2; exit 1; }
  7004. fi
  7005. done
  7006. CPPFLAGS=$ac_save_cppflags
  7007. fi # $USE_MYSQL
  7008. if test -n "$USE_MYSQL"; then
  7009. # With MySQL library directory
  7010. echo $ac_n "checking for location of MySQL library""... $ac_c" 1>&6
  7011. echo "configure:8630: checking for location of MySQL library" >&5
  7012. case "$with_mysql_libs" in
  7013. y | ye | yes | n | no)
  7014. { echo "configure: error: *** You must supply a directory to --with-mysql-libs." 1>&2; exit 1; }
  7015. ;;
  7016. esac
  7017. echo "$ac_t""$with_mysql_libs" 1>&6
  7018. if test -n "$with_mysql_libs"; then
  7019. for dir in $with_mysql_libs; do
  7020. if test -d "$dir"; then
  7021. MYSQLLIBPATH="$MYSQLLIBPATH -L$dir"
  7022. else
  7023. { echo "configure: error: *** MySQL library directory $dir does not exist." 1>&2; exit 1; }
  7024. fi
  7025. done
  7026. fi
  7027. ac_save_ldflags="$LDFLAGS"
  7028. LDFLAGS="$MYSQLLIBPATH $LDFLAGS"
  7029. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7030. echo "configure:8661: checking for mysql_query in -lmysqlclient" >&5
  7031. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7032. ac_save_LIBS="$LIBS"
  7033. LIBS="-lmysqlclient $LIBS"
  7034. cat > conftest.$ac_ext <<EOF
  7035. #line 8667 "configure"
  7036. #include "confdefs.h"
  7037. /* Override any gcc2 internal prototype to avoid an error. */
  7038. /* We use char because int might match the return type of a gcc2
  7039. builtin and then its argument prototype would still apply. */
  7040. char mysql_query();
  7041. int main() {
  7042. mysql_query()
  7043. ; return 0; }
  7044. EOF
  7045. if { (eval echo configure:8678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7046. rm -rf conftest*
  7047. eval "ac_cv_lib_$ac_lib_var=yes"
  7048. else
  7049. echo "configure: failed program was:" >&5
  7050. cat conftest.$ac_ext >&5
  7051. rm -rf conftest*
  7052. eval "ac_cv_lib_$ac_lib_var=no"
  7053. fi
  7054. rm -f conftest*
  7055. LIBS="$ac_save_LIBS"
  7056. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7057. echo "$ac_t""yes" 1>&6
  7058. MYSQLLIB="$MYSQLLIB -lmysqlclient "
  7059. else
  7060. echo "$ac_t""no" 1>&6
  7061. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7062. echo "configure:8697: checking for mysql_query in -lmysqlclient" >&5
  7063. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7064. ac_save_LIBS="$LIBS"
  7065. LIBS="-lmysqlclient $MATHLIB $LIBS"
  7066. cat > conftest.$ac_ext <<EOF
  7067. #line 8703 "configure"
  7068. #include "confdefs.h"
  7069. /* Override any gcc2 internal prototype to avoid an error. */
  7070. /* We use char because int might match the return type of a gcc2
  7071. builtin and then its argument prototype would still apply. */
  7072. char mysql_query();
  7073. int main() {
  7074. mysql_query()
  7075. ; return 0; }
  7076. EOF
  7077. if { (eval echo configure:8714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7078. rm -rf conftest*
  7079. eval "ac_cv_lib_$ac_lib_var=yes"
  7080. else
  7081. echo "configure: failed program was:" >&5
  7082. cat conftest.$ac_ext >&5
  7083. rm -rf conftest*
  7084. eval "ac_cv_lib_$ac_lib_var=no"
  7085. fi
  7086. rm -f conftest*
  7087. LIBS="$ac_save_LIBS"
  7088. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7089. echo "$ac_t""yes" 1>&6
  7090. MYSQLLIB="$MYSQLLIB -lmysqlclient $MATHLIB"
  7091. else
  7092. echo "$ac_t""no" 1>&6
  7093. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7094. echo "configure:8733: checking for mysql_query in -lmysqlclient" >&5
  7095. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7096. ac_save_LIBS="$LIBS"
  7097. LIBS="-lmysqlclient $SOCKLIB $LIBS"
  7098. cat > conftest.$ac_ext <<EOF
  7099. #line 8739 "configure"
  7100. #include "confdefs.h"
  7101. /* Override any gcc2 internal prototype to avoid an error. */
  7102. /* We use char because int might match the return type of a gcc2
  7103. builtin and then its argument prototype would still apply. */
  7104. char mysql_query();
  7105. int main() {
  7106. mysql_query()
  7107. ; return 0; }
  7108. EOF
  7109. if { (eval echo configure:8750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7110. rm -rf conftest*
  7111. eval "ac_cv_lib_$ac_lib_var=yes"
  7112. else
  7113. echo "configure: failed program was:" >&5
  7114. cat conftest.$ac_ext >&5
  7115. rm -rf conftest*
  7116. eval "ac_cv_lib_$ac_lib_var=no"
  7117. fi
  7118. rm -f conftest*
  7119. LIBS="$ac_save_LIBS"
  7120. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7121. echo "$ac_t""yes" 1>&6
  7122. MYSQLLIB="$MYSQLLIB -lmysqlclient $SOCKLIB"
  7123. else
  7124. echo "$ac_t""no" 1>&6
  7125. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7126. echo "configure:8769: checking for mysql_query in -lmysqlclient" >&5
  7127. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7128. ac_save_LIBS="$LIBS"
  7129. LIBS="-lmysqlclient $SOCKLIB $MATHLIB $LIBS"
  7130. cat > conftest.$ac_ext <<EOF
  7131. #line 8775 "configure"
  7132. #include "confdefs.h"
  7133. /* Override any gcc2 internal prototype to avoid an error. */
  7134. /* We use char because int might match the return type of a gcc2
  7135. builtin and then its argument prototype would still apply. */
  7136. char mysql_query();
  7137. int main() {
  7138. mysql_query()
  7139. ; return 0; }
  7140. EOF
  7141. if { (eval echo configure:8786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7142. rm -rf conftest*
  7143. eval "ac_cv_lib_$ac_lib_var=yes"
  7144. else
  7145. echo "configure: failed program was:" >&5
  7146. cat conftest.$ac_ext >&5
  7147. rm -rf conftest*
  7148. eval "ac_cv_lib_$ac_lib_var=no"
  7149. fi
  7150. rm -f conftest*
  7151. LIBS="$ac_save_LIBS"
  7152. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7153. echo "$ac_t""yes" 1>&6
  7154. MYSQLLIB="$MYSQLLIB -lmysqlclient $SOCKLIB $MATHLIB"
  7155. else
  7156. echo "$ac_t""no" 1>&6
  7157. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7158. echo "configure:8805: checking for mysql_query in -lmysqlclient" >&5
  7159. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7160. ac_save_LIBS="$LIBS"
  7161. LIBS="-lmysqlclient $ZLIB $LIBS"
  7162. cat > conftest.$ac_ext <<EOF
  7163. #line 8811 "configure"
  7164. #include "confdefs.h"
  7165. /* Override any gcc2 internal prototype to avoid an error. */
  7166. /* We use char because int might match the return type of a gcc2
  7167. builtin and then its argument prototype would still apply. */
  7168. char mysql_query();
  7169. int main() {
  7170. mysql_query()
  7171. ; return 0; }
  7172. EOF
  7173. if { (eval echo configure:8822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7174. rm -rf conftest*
  7175. eval "ac_cv_lib_$ac_lib_var=yes"
  7176. else
  7177. echo "configure: failed program was:" >&5
  7178. cat conftest.$ac_ext >&5
  7179. rm -rf conftest*
  7180. eval "ac_cv_lib_$ac_lib_var=no"
  7181. fi
  7182. rm -f conftest*
  7183. LIBS="$ac_save_LIBS"
  7184. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7185. echo "$ac_t""yes" 1>&6
  7186. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB"
  7187. else
  7188. echo "$ac_t""no" 1>&6
  7189. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7190. echo "configure:8841: checking for mysql_query in -lmysqlclient" >&5
  7191. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7192. ac_save_LIBS="$LIBS"
  7193. LIBS="-lmysqlclient $ZLIB $MATHLIB $LIBS"
  7194. cat > conftest.$ac_ext <<EOF
  7195. #line 8847 "configure"
  7196. #include "confdefs.h"
  7197. /* Override any gcc2 internal prototype to avoid an error. */
  7198. /* We use char because int might match the return type of a gcc2
  7199. builtin and then its argument prototype would still apply. */
  7200. char mysql_query();
  7201. int main() {
  7202. mysql_query()
  7203. ; return 0; }
  7204. EOF
  7205. if { (eval echo configure:8858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7206. rm -rf conftest*
  7207. eval "ac_cv_lib_$ac_lib_var=yes"
  7208. else
  7209. echo "configure: failed program was:" >&5
  7210. cat conftest.$ac_ext >&5
  7211. rm -rf conftest*
  7212. eval "ac_cv_lib_$ac_lib_var=no"
  7213. fi
  7214. rm -f conftest*
  7215. LIBS="$ac_save_LIBS"
  7216. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7217. echo "$ac_t""yes" 1>&6
  7218. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $MATHLIB"
  7219. else
  7220. echo "$ac_t""no" 1>&6
  7221. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7222. echo "configure:8877: checking for mysql_query in -lmysqlclient" >&5
  7223. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7224. ac_save_LIBS="$LIBS"
  7225. LIBS="-lmysqlclient $ZLIB $SOCKLIB $LIBS"
  7226. cat > conftest.$ac_ext <<EOF
  7227. #line 8883 "configure"
  7228. #include "confdefs.h"
  7229. /* Override any gcc2 internal prototype to avoid an error. */
  7230. /* We use char because int might match the return type of a gcc2
  7231. builtin and then its argument prototype would still apply. */
  7232. char mysql_query();
  7233. int main() {
  7234. mysql_query()
  7235. ; return 0; }
  7236. EOF
  7237. if { (eval echo configure:8894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7238. rm -rf conftest*
  7239. eval "ac_cv_lib_$ac_lib_var=yes"
  7240. else
  7241. echo "configure: failed program was:" >&5
  7242. cat conftest.$ac_ext >&5
  7243. rm -rf conftest*
  7244. eval "ac_cv_lib_$ac_lib_var=no"
  7245. fi
  7246. rm -f conftest*
  7247. LIBS="$ac_save_LIBS"
  7248. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7249. echo "$ac_t""yes" 1>&6
  7250. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $SOCKLIB"
  7251. else
  7252. echo "$ac_t""no" 1>&6
  7253. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  7254. echo "configure:8913: checking for mysql_query in -lmysqlclient" >&5
  7255. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  7256. ac_save_LIBS="$LIBS"
  7257. LIBS="-lmysqlclient $ZLIB $SOCKLIB $MATHLIB $LIBS"
  7258. cat > conftest.$ac_ext <<EOF
  7259. #line 8919 "configure"
  7260. #include "confdefs.h"
  7261. /* Override any gcc2 internal prototype to avoid an error. */
  7262. /* We use char because int might match the return type of a gcc2
  7263. builtin and then its argument prototype would still apply. */
  7264. char mysql_query();
  7265. int main() {
  7266. mysql_query()
  7267. ; return 0; }
  7268. EOF
  7269. if { (eval echo configure:8930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7270. rm -rf conftest*
  7271. eval "ac_cv_lib_$ac_lib_var=yes"
  7272. else
  7273. echo "configure: failed program was:" >&5
  7274. cat conftest.$ac_ext >&5
  7275. rm -rf conftest*
  7276. eval "ac_cv_lib_$ac_lib_var=no"
  7277. fi
  7278. rm -f conftest*
  7279. LIBS="$ac_save_LIBS"
  7280. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7281. echo "$ac_t""yes" 1>&6
  7282. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $SOCKLIB $MATHLIB"
  7283. else
  7284. echo "$ac_t""no" 1>&6
  7285. LDFLAGS=${ac_save_ldflags}
  7286. { echo "configure: error: *** Unable to locate MySQL library." 1>&2; exit 1; }
  7287. fi
  7288. fi
  7289. fi
  7290. fi
  7291. fi
  7292. fi
  7293. fi
  7294. fi
  7295. LDFLAGS=${ac_save_ldflags}
  7296. # Check for libmysqld (for embedded version of the driver)
  7297. # Extract the first word of "mysql_config", so it can be a program name with args.
  7298. set dummy mysql_config; ac_word=$2
  7299. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  7300. echo "configure:9020: checking for $ac_word" >&5
  7301. case "$MYSQLD_CONFIG" in
  7302. /*)
  7303. ac_cv_path_MYSQLD_CONFIG="$MYSQLD_CONFIG" # Let the user override the test with a path.
  7304. ;;
  7305. ?:/*)
  7306. ac_cv_path_MYSQLD_CONFIG="$MYSQLD_CONFIG" # Let the user override the test with a dos path.
  7307. ;;
  7308. *)
  7309. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  7310. ac_dummy="$PATH"
  7311. for ac_dir in $ac_dummy; do
  7312. test -z "$ac_dir" && ac_dir=.
  7313. if test -f $ac_dir/$ac_word; then
  7314. ac_cv_path_MYSQLD_CONFIG="$ac_dir/$ac_word"
  7315. break
  7316. fi
  7317. done
  7318. IFS="$ac_save_ifs"
  7319. test -z "$ac_cv_path_MYSQLD_CONFIG" && ac_cv_path_MYSQLD_CONFIG="no"
  7320. ;;
  7321. esac
  7322. MYSQLD_CONFIG="$ac_cv_path_MYSQLD_CONFIG"
  7323. if test -n "$MYSQLD_CONFIG"; then
  7324. echo "$ac_t""$MYSQLD_CONFIG" 1>&6
  7325. else
  7326. echo "$ac_t""no" 1>&6
  7327. fi
  7328. if test "$MYSQLD_CONFIG" = "no" ; then
  7329. { echo "configure: error: *** couldn't find mysql_config" 1>&2; exit 1; }
  7330. fi
  7331. if test "$MYSQLD_CONFIG" != "" ; then
  7332. ac_ext=C
  7333. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  7334. ac_cpp='$CXXCPP $CPPFLAGS'
  7335. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  7336. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  7337. cross_compiling=$ac_cv_prog_cxx_cross
  7338. ac_save_libs="$LIBS"
  7339. MYSQLDLIB=`"$MYSQLD_CONFIG" --libmysqld-libs`
  7340. LIBS="$MYSQLDLIB $LIBS"
  7341. echo $ac_n "checking for mysql_server_init""... $ac_c" 1>&6
  7342. echo "configure:9069: checking for mysql_server_init" >&5
  7343. cat > conftest.$ac_ext <<EOF
  7344. #line 9072 "configure"
  7345. #include "confdefs.h"
  7346. /* System header to define __stub macros and hopefully few prototypes,
  7347. which can conflict with char mysql_server_init(); below. */
  7348. #include <assert.h>
  7349. /* Override any gcc2 internal prototype to avoid an error. */
  7350. #ifdef __cplusplus
  7351. extern "C"
  7352. #endif
  7353. /* We use char because int might match the return type of a gcc2
  7354. builtin and then its argument prototype would still apply. */
  7355. char mysql_server_init();
  7356. int main() {
  7357. /* The GNU C library defines this for functions which it implements
  7358. to always fail with ENOSYS. Some functions are actually named
  7359. something starting with __ and the normal name is an alias. */
  7360. #if defined (__stub_mysql_server_init) || defined (__stub___mysql_server_init)
  7361. choke me
  7362. #else
  7363. mysql_server_init();
  7364. #endif
  7365. ; return 0; }
  7366. EOF
  7367. if { (eval echo configure:9098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7368. rm -rf conftest*
  7369. eval "ac_cv_func_mysql_server_init=yes"
  7370. else
  7371. echo "configure: failed program was:" >&5
  7372. cat conftest.$ac_ext >&5
  7373. rm -rf conftest*
  7374. eval "ac_cv_func_mysql_server_init=no"
  7375. fi
  7376. rm -f conftest*
  7377. if eval "test \"`echo '$ac_cv_func_'mysql_server_init`\" = yes"; then
  7378. echo "$ac_t""yes" 1>&6
  7379. :
  7380. else
  7381. echo "$ac_t""no" 1>&6
  7382. MYSQLDLIB="";
  7383. echo "configure: warning: libmysqld not found" 1>&2
  7384. fi
  7385. LIBS=$ac_save_libs
  7386. ac_ext=c
  7387. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  7388. ac_cpp='$CPP $CPPFLAGS'
  7389. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  7390. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  7391. cross_compiling=$ac_cv_prog_cc_cross
  7392. ac_ext=c
  7393. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  7394. ac_cpp='$CPP $CPPFLAGS'
  7395. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  7396. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  7397. cross_compiling=$ac_cv_prog_cc_cross
  7398. fi
  7399. fi # $USE_MYSQL
  7400. # Done checking MySQL
  7401. # Enable SQLite option
  7402. echo $ac_n "checking whether to use SQLite""... $ac_c" 1>&6
  7403. echo "configure:9150: checking whether to use SQLite" >&5
  7404. echo "$ac_t"""$with_sqlite"" 1>&6
  7405. case "$with_sqlite" in
  7406. "no") USE_SQLITE= ;;
  7407. "yes") USE_SQLITE="1" ;;
  7408. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  7409. esac
  7410. SQLITEINCPATH=
  7411. SQLITELIBPATH=
  7412. SQLITELIB=
  7413. if test -n "$USE_SQLITE"; then
  7414. # With SQLite includes directory
  7415. echo $ac_n "checking for location of SQLite includes""... $ac_c" 1>&6
  7416. echo "configure:9170: checking for location of SQLite includes" >&5
  7417. case "$with_sqlite_includes" in
  7418. y | ye | yes | n | no)
  7419. { echo "configure: error: *** You must supply a directory to --with-sqlite-includes." 1>&2; exit 1; }
  7420. ;;
  7421. esac
  7422. echo "$ac_t""$with_sqlite_includes" 1>&6
  7423. if test -n "$with_sqlite_includes" ; then
  7424. for dir in $with_sqlite_includes; do
  7425. if test -d "$dir"; then
  7426. SQLITEINCPATH="$SQLITEINCPATH -I$dir"
  7427. else
  7428. { echo "configure: error: *** SQLite includes directory $dir does not exist." 1>&2; exit 1; }
  7429. fi
  7430. done
  7431. fi
  7432. ac_save_cppflags="$CPPFLAGS"
  7433. CPPFLAGS="$SQLITEINCPATH $CPPFLAGS"
  7434. for ac_hdr in sqlite3.h
  7435. do
  7436. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7437. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7438. echo "configure:9196: checking for $ac_hdr" >&5
  7439. cat > conftest.$ac_ext <<EOF
  7440. #line 9199 "configure"
  7441. #include "confdefs.h"
  7442. #include <$ac_hdr>
  7443. EOF
  7444. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7445. { (eval echo configure:9204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7446. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7447. if test -z "$ac_err"; then
  7448. rm -rf conftest*
  7449. eval "ac_cv_header_$ac_safe=yes"
  7450. else
  7451. echo "$ac_err" >&5
  7452. echo "configure: failed program was:" >&5
  7453. cat conftest.$ac_ext >&5
  7454. rm -rf conftest*
  7455. eval "ac_cv_header_$ac_safe=no"
  7456. fi
  7457. rm -f conftest*
  7458. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7459. echo "$ac_t""yes" 1>&6
  7460. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7461. cat >> confdefs.h <<EOF
  7462. #define $ac_tr_hdr 1
  7463. EOF
  7464. else
  7465. echo "$ac_t""no" 1>&6
  7466. { echo "configure: error: *** Unable to locate SQLite includes." 1>&2; exit 1; }
  7467. fi
  7468. done
  7469. CPPFLAGS=$ac_save_cppflags
  7470. cat >> confdefs.h <<\EOF
  7471. #define HAVE_SQLITE 1
  7472. EOF
  7473. fi # $USE_SQLITE
  7474. if test -n "$USE_SQLITE"; then
  7475. # With SQLite library directory
  7476. echo $ac_n "checking for location of SQLite library""... $ac_c" 1>&6
  7477. echo "configure:9247: checking for location of SQLite library" >&5
  7478. case "$with_sqlite_libs" in
  7479. y | ye | yes | n | no)
  7480. { echo "configure: error: *** You must supply a directory to --with-sqlite-libs." 1>&2; exit 1; }
  7481. ;;
  7482. esac
  7483. echo "$ac_t""$with_sqlite_libs" 1>&6
  7484. if test -n "$with_sqlite_libs"; then
  7485. for dir in $with_sqlite_libs; do
  7486. if test -d "$dir"; then
  7487. SQLITELIBPATH="$SQLITELIBPATH -L$dir"
  7488. else
  7489. { echo "configure: error: *** SQLite library directory $dir does not exist." 1>&2; exit 1; }
  7490. fi
  7491. done
  7492. fi
  7493. ac_save_ldflags="$LDFLAGS"
  7494. LDFLAGS="$SQLITELIBPATH $LDFLAGS"
  7495. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7496. echo "configure:9276: checking for sqlite3_open in -lsqlite3" >&5
  7497. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7498. ac_save_LIBS="$LIBS"
  7499. LIBS="-lsqlite3 $LIBS"
  7500. cat > conftest.$ac_ext <<EOF
  7501. #line 9282 "configure"
  7502. #include "confdefs.h"
  7503. /* Override any gcc2 internal prototype to avoid an error. */
  7504. /* We use char because int might match the return type of a gcc2
  7505. builtin and then its argument prototype would still apply. */
  7506. char sqlite3_open();
  7507. int main() {
  7508. sqlite3_open()
  7509. ; return 0; }
  7510. EOF
  7511. if { (eval echo configure:9293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7512. rm -rf conftest*
  7513. eval "ac_cv_lib_$ac_lib_var=yes"
  7514. else
  7515. echo "configure: failed program was:" >&5
  7516. cat conftest.$ac_ext >&5
  7517. rm -rf conftest*
  7518. eval "ac_cv_lib_$ac_lib_var=no"
  7519. fi
  7520. rm -f conftest*
  7521. LIBS="$ac_save_LIBS"
  7522. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7523. echo "$ac_t""yes" 1>&6
  7524. SQLITELIB="$SQLITELIB -lsqlite3 "
  7525. else
  7526. echo "$ac_t""no" 1>&6
  7527. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7528. echo "configure:9312: checking for sqlite3_open in -lsqlite3" >&5
  7529. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7530. ac_save_LIBS="$LIBS"
  7531. LIBS="-lsqlite3 $DLLIB $LIBS"
  7532. cat > conftest.$ac_ext <<EOF
  7533. #line 9318 "configure"
  7534. #include "confdefs.h"
  7535. /* Override any gcc2 internal prototype to avoid an error. */
  7536. /* We use char because int might match the return type of a gcc2
  7537. builtin and then its argument prototype would still apply. */
  7538. char sqlite3_open();
  7539. int main() {
  7540. sqlite3_open()
  7541. ; return 0; }
  7542. EOF
  7543. if { (eval echo configure:9329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7544. rm -rf conftest*
  7545. eval "ac_cv_lib_$ac_lib_var=yes"
  7546. else
  7547. echo "configure: failed program was:" >&5
  7548. cat conftest.$ac_ext >&5
  7549. rm -rf conftest*
  7550. eval "ac_cv_lib_$ac_lib_var=no"
  7551. fi
  7552. rm -f conftest*
  7553. LIBS="$ac_save_LIBS"
  7554. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7555. echo "$ac_t""yes" 1>&6
  7556. SQLITELIB="$SQLITELIB -lsqlite3 $DLLIB"
  7557. else
  7558. echo "$ac_t""no" 1>&6
  7559. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7560. echo "configure:9348: checking for sqlite3_open in -lsqlite3" >&5
  7561. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7562. ac_save_LIBS="$LIBS"
  7563. LIBS="-lsqlite3 $MATHLIB $LIBS"
  7564. cat > conftest.$ac_ext <<EOF
  7565. #line 9354 "configure"
  7566. #include "confdefs.h"
  7567. /* Override any gcc2 internal prototype to avoid an error. */
  7568. /* We use char because int might match the return type of a gcc2
  7569. builtin and then its argument prototype would still apply. */
  7570. char sqlite3_open();
  7571. int main() {
  7572. sqlite3_open()
  7573. ; return 0; }
  7574. EOF
  7575. if { (eval echo configure:9365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7576. rm -rf conftest*
  7577. eval "ac_cv_lib_$ac_lib_var=yes"
  7578. else
  7579. echo "configure: failed program was:" >&5
  7580. cat conftest.$ac_ext >&5
  7581. rm -rf conftest*
  7582. eval "ac_cv_lib_$ac_lib_var=no"
  7583. fi
  7584. rm -f conftest*
  7585. LIBS="$ac_save_LIBS"
  7586. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7587. echo "$ac_t""yes" 1>&6
  7588. SQLITELIB="$SQLITELIB -lsqlite3 $MATHLIB"
  7589. else
  7590. echo "$ac_t""no" 1>&6
  7591. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7592. echo "configure:9384: checking for sqlite3_open in -lsqlite3" >&5
  7593. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7594. ac_save_LIBS="$LIBS"
  7595. LIBS="-lsqlite3 $MATHLIB $DLLIB $LIBS"
  7596. cat > conftest.$ac_ext <<EOF
  7597. #line 9390 "configure"
  7598. #include "confdefs.h"
  7599. /* Override any gcc2 internal prototype to avoid an error. */
  7600. /* We use char because int might match the return type of a gcc2
  7601. builtin and then its argument prototype would still apply. */
  7602. char sqlite3_open();
  7603. int main() {
  7604. sqlite3_open()
  7605. ; return 0; }
  7606. EOF
  7607. if { (eval echo configure:9401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7608. rm -rf conftest*
  7609. eval "ac_cv_lib_$ac_lib_var=yes"
  7610. else
  7611. echo "configure: failed program was:" >&5
  7612. cat conftest.$ac_ext >&5
  7613. rm -rf conftest*
  7614. eval "ac_cv_lib_$ac_lib_var=no"
  7615. fi
  7616. rm -f conftest*
  7617. LIBS="$ac_save_LIBS"
  7618. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7619. echo "$ac_t""yes" 1>&6
  7620. SQLITELIB="$SQLITELIB -lsqlite3 $MATHLIB $DLLIB"
  7621. else
  7622. echo "$ac_t""no" 1>&6
  7623. LDFLAGS=${ac_save_ldflags}
  7624. { echo "configure: error: *** Unable to locate SQLite library." 1>&2; exit 1; }
  7625. fi
  7626. fi
  7627. fi
  7628. fi
  7629. LDFLAGS=${ac_save_ldflags}
  7630. fi # $USE_SQLITE
  7631. # Done checking SQLite
  7632. # Enable OpenGL option
  7633. OPENGLINC=
  7634. OPENGLLIB=
  7635. OPENGLULIB=
  7636. USE_OPENGL=
  7637. OPENGL_X11=
  7638. OPENGL_AQUA=
  7639. OPENGL_WINDOWS=
  7640. echo $ac_n "checking whether to use OpenGL""... $ac_c" 1>&6
  7641. echo "configure:9476: checking whether to use OpenGL" >&5
  7642. echo "$ac_t"""$with_opengl"" 1>&6
  7643. case "$with_opengl" in
  7644. n|no)
  7645. OPENGL_TYPE=none
  7646. ;;
  7647. y|yes|x|x11|glx)
  7648. OPENGL_TYPE=X11
  7649. USE_OPENGL=1
  7650. OPENGL_X11=1
  7651. ;;
  7652. aqua|mac|osx|macosx|agl)
  7653. OPENGL_TYPE=Aqua
  7654. USE_OPENGL=1
  7655. OPENGL_AQUA=1
  7656. ;;
  7657. win|windows|mswin|wgl)
  7658. OPENGL_TYPE=Windows
  7659. USE_OPENGL=1
  7660. OPENGL_WINDOWS=1
  7661. ;;
  7662. *)
  7663. { echo "configure: error: *** Valid arguments for --with-opengl= are yes,no,x11,aqua,windows." 1>&2; exit 1; }
  7664. ;;
  7665. esac
  7666. if test -n "$USE_OPENGL" ; then
  7667. if test "$OPENGL_X11" = 1 ; then
  7668. # With OpenGL includes directory
  7669. echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
  7670. echo "configure:9510: checking for location of OpenGL includes" >&5
  7671. case "$with_opengl_includes" in
  7672. y | ye | yes | n | no)
  7673. { echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
  7674. ;;
  7675. esac
  7676. echo "$ac_t""$with_opengl_includes" 1>&6
  7677. if test -n "$with_opengl_includes" ; then
  7678. for dir in $with_opengl_includes; do
  7679. if test -d "$dir"; then
  7680. OPENGLINC="$OPENGLINC -I$dir"
  7681. else
  7682. { echo "configure: error: *** OpenGL includes directory $dir does not exist." 1>&2; exit 1; }
  7683. fi
  7684. done
  7685. fi
  7686. ac_save_cppflags="$CPPFLAGS"
  7687. CPPFLAGS="$OPENGLINC $X_CFLAGS $CPPFLAGS"
  7688. for ac_hdr in GL/gl.h GL/glu.h
  7689. do
  7690. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7691. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7692. echo "configure:9536: checking for $ac_hdr" >&5
  7693. cat > conftest.$ac_ext <<EOF
  7694. #line 9539 "configure"
  7695. #include "confdefs.h"
  7696. #include <$ac_hdr>
  7697. EOF
  7698. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7699. { (eval echo configure:9544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7700. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7701. if test -z "$ac_err"; then
  7702. rm -rf conftest*
  7703. eval "ac_cv_header_$ac_safe=yes"
  7704. else
  7705. echo "$ac_err" >&5
  7706. echo "configure: failed program was:" >&5
  7707. cat conftest.$ac_ext >&5
  7708. rm -rf conftest*
  7709. eval "ac_cv_header_$ac_safe=no"
  7710. fi
  7711. rm -f conftest*
  7712. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7713. echo "$ac_t""yes" 1>&6
  7714. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7715. cat >> confdefs.h <<EOF
  7716. #define $ac_tr_hdr 1
  7717. EOF
  7718. else
  7719. echo "$ac_t""no" 1>&6
  7720. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  7721. fi
  7722. done
  7723. CPPFLAGS=$ac_save_cppflags
  7724. # With OpenGL library directory
  7725. echo $ac_n "checking for location of OpenGL library""... $ac_c" 1>&6
  7726. echo "configure:9578: checking for location of OpenGL library" >&5
  7727. case "$with_opengl_libs" in
  7728. y | ye | yes | n | no)
  7729. { echo "configure: error: *** You must supply a directory to --with-opengl-libs." 1>&2; exit 1; }
  7730. ;;
  7731. esac
  7732. echo "$ac_t""$with_opengl_libs" 1>&6
  7733. if test -n "$with_opengl_libs"; then
  7734. for dir in $with_opengl_libs; do
  7735. if test -d "$dir"; then
  7736. OPENGL_LIB_PATH="$OPENGL_LIB_PATH -L$dir"
  7737. else
  7738. { echo "configure: error: *** OpenGL library directory $dir does not exist." 1>&2; exit 1; }
  7739. fi
  7740. done
  7741. fi
  7742. ac_save_ldflags="$LDFLAGS"
  7743. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  7744. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7745. echo "configure:9607: checking for glBegin in -lGL" >&5
  7746. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7747. ac_save_LIBS="$LIBS"
  7748. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
  7749. cat > conftest.$ac_ext <<EOF
  7750. #line 9613 "configure"
  7751. #include "confdefs.h"
  7752. /* Override any gcc2 internal prototype to avoid an error. */
  7753. /* We use char because int might match the return type of a gcc2
  7754. builtin and then its argument prototype would still apply. */
  7755. char glBegin();
  7756. int main() {
  7757. glBegin()
  7758. ; return 0; }
  7759. EOF
  7760. if { (eval echo configure:9624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7761. rm -rf conftest*
  7762. eval "ac_cv_lib_$ac_lib_var=yes"
  7763. else
  7764. echo "configure: failed program was:" >&5
  7765. cat conftest.$ac_ext >&5
  7766. rm -rf conftest*
  7767. eval "ac_cv_lib_$ac_lib_var=no"
  7768. fi
  7769. rm -f conftest*
  7770. LIBS="$ac_save_LIBS"
  7771. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7772. echo "$ac_t""yes" 1>&6
  7773. OPENGLLIB="$OPENGLLIB -lGL "
  7774. else
  7775. echo "$ac_t""no" 1>&6
  7776. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7777. echo "configure:9643: checking for glBegin in -lGL" >&5
  7778. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7779. ac_save_LIBS="$LIBS"
  7780. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lXext $LIBS"
  7781. cat > conftest.$ac_ext <<EOF
  7782. #line 9649 "configure"
  7783. #include "confdefs.h"
  7784. /* Override any gcc2 internal prototype to avoid an error. */
  7785. /* We use char because int might match the return type of a gcc2
  7786. builtin and then its argument prototype would still apply. */
  7787. char glBegin();
  7788. int main() {
  7789. glBegin()
  7790. ; return 0; }
  7791. EOF
  7792. if { (eval echo configure:9660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7793. rm -rf conftest*
  7794. eval "ac_cv_lib_$ac_lib_var=yes"
  7795. else
  7796. echo "configure: failed program was:" >&5
  7797. cat conftest.$ac_ext >&5
  7798. rm -rf conftest*
  7799. eval "ac_cv_lib_$ac_lib_var=no"
  7800. fi
  7801. rm -f conftest*
  7802. LIBS="$ac_save_LIBS"
  7803. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7804. echo "$ac_t""yes" 1>&6
  7805. OPENGLLIB="$OPENGLLIB -lGL -lXext"
  7806. else
  7807. echo "$ac_t""no" 1>&6
  7808. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7809. echo "configure:9679: checking for glBegin in -lGL" >&5
  7810. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7811. ac_save_LIBS="$LIBS"
  7812. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lpthread $LIBS"
  7813. cat > conftest.$ac_ext <<EOF
  7814. #line 9685 "configure"
  7815. #include "confdefs.h"
  7816. /* Override any gcc2 internal prototype to avoid an error. */
  7817. /* We use char because int might match the return type of a gcc2
  7818. builtin and then its argument prototype would still apply. */
  7819. char glBegin();
  7820. int main() {
  7821. glBegin()
  7822. ; return 0; }
  7823. EOF
  7824. if { (eval echo configure:9696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7825. rm -rf conftest*
  7826. eval "ac_cv_lib_$ac_lib_var=yes"
  7827. else
  7828. echo "configure: failed program was:" >&5
  7829. cat conftest.$ac_ext >&5
  7830. rm -rf conftest*
  7831. eval "ac_cv_lib_$ac_lib_var=no"
  7832. fi
  7833. rm -f conftest*
  7834. LIBS="$ac_save_LIBS"
  7835. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7836. echo "$ac_t""yes" 1>&6
  7837. OPENGLLIB="$OPENGLLIB -lGL -lpthread"
  7838. else
  7839. echo "$ac_t""no" 1>&6
  7840. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7841. echo "configure:9715: checking for glBegin in -lGL" >&5
  7842. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7843. ac_save_LIBS="$LIBS"
  7844. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lpthread -lXext $LIBS"
  7845. cat > conftest.$ac_ext <<EOF
  7846. #line 9721 "configure"
  7847. #include "confdefs.h"
  7848. /* Override any gcc2 internal prototype to avoid an error. */
  7849. /* We use char because int might match the return type of a gcc2
  7850. builtin and then its argument prototype would still apply. */
  7851. char glBegin();
  7852. int main() {
  7853. glBegin()
  7854. ; return 0; }
  7855. EOF
  7856. if { (eval echo configure:9732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7857. rm -rf conftest*
  7858. eval "ac_cv_lib_$ac_lib_var=yes"
  7859. else
  7860. echo "configure: failed program was:" >&5
  7861. cat conftest.$ac_ext >&5
  7862. rm -rf conftest*
  7863. eval "ac_cv_lib_$ac_lib_var=no"
  7864. fi
  7865. rm -f conftest*
  7866. LIBS="$ac_save_LIBS"
  7867. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7868. echo "$ac_t""yes" 1>&6
  7869. OPENGLLIB="$OPENGLLIB -lGL -lpthread -lXext"
  7870. else
  7871. echo "$ac_t""no" 1>&6
  7872. LDFLAGS=${ac_save_ldflags}
  7873. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  7874. fi
  7875. fi
  7876. fi
  7877. fi
  7878. LDFLAGS=${ac_save_ldflags}
  7879. ac_save_ldflags="$LDFLAGS"
  7880. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  7881. echo $ac_n "checking for gluBeginCurve in -lGLU""... $ac_c" 1>&6
  7882. echo "configure:9794: checking for gluBeginCurve in -lGLU" >&5
  7883. ac_lib_var=`echo GLU'_'gluBeginCurve | sed 'y%./+-%__p_%'`
  7884. ac_save_LIBS="$LIBS"
  7885. LIBS="-lGLU $OPENGLLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
  7886. cat > conftest.$ac_ext <<EOF
  7887. #line 9800 "configure"
  7888. #include "confdefs.h"
  7889. /* Override any gcc2 internal prototype to avoid an error. */
  7890. /* We use char because int might match the return type of a gcc2
  7891. builtin and then its argument prototype would still apply. */
  7892. char gluBeginCurve();
  7893. int main() {
  7894. gluBeginCurve()
  7895. ; return 0; }
  7896. EOF
  7897. if { (eval echo configure:9811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7898. rm -rf conftest*
  7899. eval "ac_cv_lib_$ac_lib_var=yes"
  7900. else
  7901. echo "configure: failed program was:" >&5
  7902. cat conftest.$ac_ext >&5
  7903. rm -rf conftest*
  7904. eval "ac_cv_lib_$ac_lib_var=no"
  7905. fi
  7906. rm -f conftest*
  7907. LIBS="$ac_save_LIBS"
  7908. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7909. echo "$ac_t""yes" 1>&6
  7910. OPENGLULIB="$OPENGLULIB -lGLU "
  7911. else
  7912. echo "$ac_t""no" 1>&6
  7913. echo $ac_n "checking for gluBeginCurve in -lGLU""... $ac_c" 1>&6
  7914. echo "configure:9830: checking for gluBeginCurve in -lGLU" >&5
  7915. ac_lib_var=`echo GLU'_'gluBeginCurve | sed 'y%./+-%__p_%'`
  7916. ac_save_LIBS="$LIBS"
  7917. LIBS="-lGLU $OPENGLLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lstdc++ $LIBS"
  7918. cat > conftest.$ac_ext <<EOF
  7919. #line 9836 "configure"
  7920. #include "confdefs.h"
  7921. /* Override any gcc2 internal prototype to avoid an error. */
  7922. /* We use char because int might match the return type of a gcc2
  7923. builtin and then its argument prototype would still apply. */
  7924. char gluBeginCurve();
  7925. int main() {
  7926. gluBeginCurve()
  7927. ; return 0; }
  7928. EOF
  7929. if { (eval echo configure:9847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7930. rm -rf conftest*
  7931. eval "ac_cv_lib_$ac_lib_var=yes"
  7932. else
  7933. echo "configure: failed program was:" >&5
  7934. cat conftest.$ac_ext >&5
  7935. rm -rf conftest*
  7936. eval "ac_cv_lib_$ac_lib_var=no"
  7937. fi
  7938. rm -f conftest*
  7939. LIBS="$ac_save_LIBS"
  7940. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7941. echo "$ac_t""yes" 1>&6
  7942. OPENGLULIB="$OPENGLULIB -lGLU -lstdc++"
  7943. else
  7944. echo "$ac_t""no" 1>&6
  7945. LDFLAGS=${ac_save_ldflags}
  7946. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  7947. fi
  7948. fi
  7949. LDFLAGS=${ac_save_ldflags}
  7950. OPENGLLIB="$OPENGL_LIB_PATH $OPENGLLIB"
  7951. OPENGLULIB="$OPENGL_LIB_PATH $OPENGLULIB"
  7952. ac_save_libs="$LIBS"
  7953. ac_save_ldflags="$LDFLAGS"
  7954. LIBS=" $OPENGLLIB $LIBS"
  7955. LDFLAGS=" $LDFLAGS"
  7956. echo $ac_n "checking for glXCreatePbuffer""... $ac_c" 1>&6
  7957. echo "configure:9894: checking for glXCreatePbuffer" >&5
  7958. cat > conftest.$ac_ext <<EOF
  7959. #line 9897 "configure"
  7960. #include "confdefs.h"
  7961. /* System header to define __stub macros and hopefully few prototypes,
  7962. which can conflict with char glXCreatePbuffer(); below. */
  7963. #include <assert.h>
  7964. /* Override any gcc2 internal prototype to avoid an error. */
  7965. /* We use char because int might match the return type of a gcc2
  7966. builtin and then its argument prototype would still apply. */
  7967. char glXCreatePbuffer();
  7968. int main() {
  7969. /* The GNU C library defines this for functions which it implements
  7970. to always fail with ENOSYS. Some functions are actually named
  7971. something starting with __ and the normal name is an alias. */
  7972. #if defined (__stub_glXCreatePbuffer) || defined (__stub___glXCreatePbuffer)
  7973. choke me
  7974. #else
  7975. glXCreatePbuffer();
  7976. #endif
  7977. ; return 0; }
  7978. EOF
  7979. if { (eval echo configure:9920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7980. rm -rf conftest*
  7981. eval "ac_cv_func_glXCreatePbuffer=yes"
  7982. else
  7983. echo "configure: failed program was:" >&5
  7984. cat conftest.$ac_ext >&5
  7985. rm -rf conftest*
  7986. eval "ac_cv_func_glXCreatePbuffer=no"
  7987. fi
  7988. rm -f conftest*
  7989. if eval "test \"`echo '$ac_cv_func_'glXCreatePbuffer`\" = yes"; then
  7990. echo "$ac_t""yes" 1>&6
  7991. cat >> confdefs.h <<\EOF
  7992. #define HAVE_PBUFFERS 1
  7993. EOF
  7994. else
  7995. echo "$ac_t""no" 1>&6
  7996. { echo "configure: error: *** Unable to locate glXCreatePbuffer." 1>&2; exit 1; }
  7997. fi
  7998. LIBS=${ac_save_libs}
  7999. LDFLAGS=${ac_save_ldflags}
  8000. ac_save_libs="$LIBS"
  8001. ac_save_ldflags="$LDFLAGS"
  8002. LIBS=" $OPENGLLIB $LIBS"
  8003. LDFLAGS=" $LDFLAGS"
  8004. echo $ac_n "checking for glXCreateGLXPixmap""... $ac_c" 1>&6
  8005. echo "configure:9957: checking for glXCreateGLXPixmap" >&5
  8006. cat > conftest.$ac_ext <<EOF
  8007. #line 9960 "configure"
  8008. #include "confdefs.h"
  8009. /* System header to define __stub macros and hopefully few prototypes,
  8010. which can conflict with char glXCreateGLXPixmap(); below. */
  8011. #include <assert.h>
  8012. /* Override any gcc2 internal prototype to avoid an error. */
  8013. /* We use char because int might match the return type of a gcc2
  8014. builtin and then its argument prototype would still apply. */
  8015. char glXCreateGLXPixmap();
  8016. int main() {
  8017. /* The GNU C library defines this for functions which it implements
  8018. to always fail with ENOSYS. Some functions are actually named
  8019. something starting with __ and the normal name is an alias. */
  8020. #if defined (__stub_glXCreateGLXPixmap) || defined (__stub___glXCreateGLXPixmap)
  8021. choke me
  8022. #else
  8023. glXCreateGLXPixmap();
  8024. #endif
  8025. ; return 0; }
  8026. EOF
  8027. if { (eval echo configure:9983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8028. rm -rf conftest*
  8029. eval "ac_cv_func_glXCreateGLXPixmap=yes"
  8030. else
  8031. echo "configure: failed program was:" >&5
  8032. cat conftest.$ac_ext >&5
  8033. rm -rf conftest*
  8034. eval "ac_cv_func_glXCreateGLXPixmap=no"
  8035. fi
  8036. rm -f conftest*
  8037. if eval "test \"`echo '$ac_cv_func_'glXCreateGLXPixmap`\" = yes"; then
  8038. echo "$ac_t""yes" 1>&6
  8039. cat >> confdefs.h <<\EOF
  8040. #define HAVE_PIXMAPS 1
  8041. EOF
  8042. else
  8043. echo "$ac_t""no" 1>&6
  8044. { echo "configure: error: *** Unable to locate glXCreateGLXPixmap." 1>&2; exit 1; }
  8045. fi
  8046. LIBS=${ac_save_libs}
  8047. LDFLAGS=${ac_save_ldflags}
  8048. cat >> confdefs.h <<\EOF
  8049. #define OPENGL_X11 1
  8050. EOF
  8051. fi # $OPENGL_X11
  8052. if test "$OPENGL_AQUA" = 1 ; then
  8053. echo $ac_n "checking for location of OpenGL framework""... $ac_c" 1>&6
  8054. echo "configure:10026: checking for location of OpenGL framework" >&5
  8055. case "$with_opengl_framework" in
  8056. y | ye | yes | n | no)
  8057. { echo "configure: error: *** You must supply a directory to --with-opengl-framework." 1>&2; exit 1; }
  8058. ;;
  8059. esac
  8060. echo "$ac_t""$with_opengl_framework" 1>&6
  8061. if test -n "$with_opengl_framework"; then
  8062. if test -d $with_opengl_framework; then
  8063. OPENGLPATH="$OPENGLPATH -F$with_opengl_framework"
  8064. else
  8065. { echo "configure: error: *** OpenGL framework directory $dir does not exist." 1>&2; exit 1; }
  8066. fi
  8067. fi
  8068. ac_save_cppflags="$CPPFLAGS"
  8069. CPPFLAGS="$OPENGLPATH $CPPFLAGS"
  8070. for ac_hdr in OpenGL/gl.h OpenGL/glu.h
  8071. do
  8072. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8073. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8074. echo "configure:10050: checking for $ac_hdr" >&5
  8075. cat > conftest.$ac_ext <<EOF
  8076. #line 10053 "configure"
  8077. #include "confdefs.h"
  8078. #include <$ac_hdr>
  8079. EOF
  8080. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8081. { (eval echo configure:10058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8082. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8083. if test -z "$ac_err"; then
  8084. rm -rf conftest*
  8085. eval "ac_cv_header_$ac_safe=yes"
  8086. else
  8087. echo "$ac_err" >&5
  8088. echo "configure: failed program was:" >&5
  8089. cat conftest.$ac_ext >&5
  8090. rm -rf conftest*
  8091. eval "ac_cv_header_$ac_safe=no"
  8092. fi
  8093. rm -f conftest*
  8094. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8095. echo "$ac_t""yes" 1>&6
  8096. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8097. cat >> confdefs.h <<EOF
  8098. #define $ac_tr_hdr 1
  8099. EOF
  8100. else
  8101. echo "$ac_t""no" 1>&6
  8102. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  8103. fi
  8104. done
  8105. CPPFLAGS=$ac_save_cppflags
  8106. ac_save_libs="$LIBS"
  8107. ac_save_ldflags="$LDFLAGS"
  8108. LIBS="-framework OpenGL -framework AGL -framework ApplicationServices $LIBS"
  8109. LDFLAGS="$OPENGLPATH $LDFLAGS"
  8110. echo $ac_n "checking for glBegin""... $ac_c" 1>&6
  8111. echo "configure:10094: checking for glBegin" >&5
  8112. cat > conftest.$ac_ext <<EOF
  8113. #line 10097 "configure"
  8114. #include "confdefs.h"
  8115. /* System header to define __stub macros and hopefully few prototypes,
  8116. which can conflict with char glBegin(); below. */
  8117. #include <assert.h>
  8118. /* Override any gcc2 internal prototype to avoid an error. */
  8119. /* We use char because int might match the return type of a gcc2
  8120. builtin and then its argument prototype would still apply. */
  8121. char glBegin();
  8122. int main() {
  8123. /* The GNU C library defines this for functions which it implements
  8124. to always fail with ENOSYS. Some functions are actually named
  8125. something starting with __ and the normal name is an alias. */
  8126. #if defined (__stub_glBegin) || defined (__stub___glBegin)
  8127. choke me
  8128. #else
  8129. glBegin();
  8130. #endif
  8131. ; return 0; }
  8132. EOF
  8133. if { (eval echo configure:10120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8134. rm -rf conftest*
  8135. eval "ac_cv_func_glBegin=yes"
  8136. else
  8137. echo "configure: failed program was:" >&5
  8138. cat conftest.$ac_ext >&5
  8139. rm -rf conftest*
  8140. eval "ac_cv_func_glBegin=no"
  8141. fi
  8142. rm -f conftest*
  8143. if eval "test \"`echo '$ac_cv_func_'glBegin`\" = yes"; then
  8144. echo "$ac_t""yes" 1>&6
  8145. OPENGLLIB="$OPENGLLIB -framework OpenGL -framework AGL -framework ApplicationServices"
  8146. else
  8147. echo "$ac_t""no" 1>&6
  8148. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  8149. fi
  8150. LIBS=${ac_save_libs}
  8151. LDFLAGS=${ac_save_ldflags}
  8152. ac_save_libs="$LIBS"
  8153. ac_save_ldflags="$LDFLAGS"
  8154. LIBS=" $OPENGLLIB $LIBS"
  8155. LDFLAGS="$OPENGLPATH $LDFLAGS"
  8156. echo $ac_n "checking for gluBeginCurve""... $ac_c" 1>&6
  8157. echo "configure:10157: checking for gluBeginCurve" >&5
  8158. cat > conftest.$ac_ext <<EOF
  8159. #line 10160 "configure"
  8160. #include "confdefs.h"
  8161. /* System header to define __stub macros and hopefully few prototypes,
  8162. which can conflict with char gluBeginCurve(); below. */
  8163. #include <assert.h>
  8164. /* Override any gcc2 internal prototype to avoid an error. */
  8165. /* We use char because int might match the return type of a gcc2
  8166. builtin and then its argument prototype would still apply. */
  8167. char gluBeginCurve();
  8168. int main() {
  8169. /* The GNU C library defines this for functions which it implements
  8170. to always fail with ENOSYS. Some functions are actually named
  8171. something starting with __ and the normal name is an alias. */
  8172. #if defined (__stub_gluBeginCurve) || defined (__stub___gluBeginCurve)
  8173. choke me
  8174. #else
  8175. gluBeginCurve();
  8176. #endif
  8177. ; return 0; }
  8178. EOF
  8179. if { (eval echo configure:10183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8180. rm -rf conftest*
  8181. eval "ac_cv_func_gluBeginCurve=yes"
  8182. else
  8183. echo "configure: failed program was:" >&5
  8184. cat conftest.$ac_ext >&5
  8185. rm -rf conftest*
  8186. eval "ac_cv_func_gluBeginCurve=no"
  8187. fi
  8188. rm -f conftest*
  8189. if eval "test \"`echo '$ac_cv_func_'gluBeginCurve`\" = yes"; then
  8190. echo "$ac_t""yes" 1>&6
  8191. OPENGLLIB="$OPENGLLIB "
  8192. else
  8193. echo "$ac_t""no" 1>&6
  8194. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  8195. fi
  8196. LIBS=${ac_save_libs}
  8197. LDFLAGS=${ac_save_ldflags}
  8198. OPENGLINC="$OPENGLPATH"
  8199. OPENGLLIBPATH="$OPENGLPATH"
  8200. cat >> confdefs.h <<\EOF
  8201. #define OPENGL_AQUA 1
  8202. EOF
  8203. fi # $OPENGL_AQUA
  8204. if test "$OPENGL_WINDOWS" = 1 ; then
  8205. # With OpenGL includes directory
  8206. echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
  8207. echo "configure:10231: checking for location of OpenGL includes" >&5
  8208. case "$with_opengl_includes" in
  8209. y | ye | yes | n | no)
  8210. { echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
  8211. ;;
  8212. esac
  8213. echo "$ac_t""$with_opengl_includes" 1>&6
  8214. if test -n "$with_opengl_includes" ; then
  8215. for dir in $with_opengl_includes; do
  8216. if test -d "$dir"; then
  8217. OPENGLINC="$OPENGLINC -I$dir"
  8218. else
  8219. { echo "configure: error: *** OpenGL includes directory $dir does not exist." 1>&2; exit 1; }
  8220. fi
  8221. done
  8222. fi
  8223. ac_save_cppflags="$CPPFLAGS"
  8224. CPPFLAGS="$OPENGLINC $CPPFLAGS"
  8225. for ac_hdr in GL/gl.h GL/glu.h
  8226. do
  8227. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8228. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8229. echo "configure:10257: checking for $ac_hdr" >&5
  8230. cat > conftest.$ac_ext <<EOF
  8231. #line 10260 "configure"
  8232. #include "confdefs.h"
  8233. #include <$ac_hdr>
  8234. EOF
  8235. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8236. { (eval echo configure:10265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8237. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8238. if test -z "$ac_err"; then
  8239. rm -rf conftest*
  8240. eval "ac_cv_header_$ac_safe=yes"
  8241. else
  8242. echo "$ac_err" >&5
  8243. echo "configure: failed program was:" >&5
  8244. cat conftest.$ac_ext >&5
  8245. rm -rf conftest*
  8246. eval "ac_cv_header_$ac_safe=no"
  8247. fi
  8248. rm -f conftest*
  8249. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8250. echo "$ac_t""yes" 1>&6
  8251. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8252. cat >> confdefs.h <<EOF
  8253. #define $ac_tr_hdr 1
  8254. EOF
  8255. else
  8256. echo "$ac_t""no" 1>&6
  8257. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  8258. fi
  8259. done
  8260. CPPFLAGS=$ac_save_cppflags
  8261. # With OpenGL library directory
  8262. echo $ac_n "checking for location of OpenGL library""... $ac_c" 1>&6
  8263. echo "configure:10299: checking for location of OpenGL library" >&5
  8264. case "$with_opengl_libs" in
  8265. y | ye | yes | n | no)
  8266. { echo "configure: error: *** You must supply a directory to --with-opengl-libs." 1>&2; exit 1; }
  8267. ;;
  8268. esac
  8269. echo "$ac_t""$with_opengl_libs" 1>&6
  8270. if test -n "$with_opengl_libs"; then
  8271. for dir in $with_opengl_libs; do
  8272. if test -d "$dir"; then
  8273. OPENGL_LIB_PATH="$OPENGL_LIB_PATH -L$dir"
  8274. else
  8275. { echo "configure: error: *** OpenGL library directory $dir does not exist." 1>&2; exit 1; }
  8276. fi
  8277. done
  8278. fi
  8279. ac_save_cflags="$CFLAGS"
  8280. CFLAGS="$CFLAGS $OPENGLINC"
  8281. ac_save_ldflags="$LDFLAGS"
  8282. ac_save_libs="$LIBS"
  8283. echo $ac_n "checking for OpenGL library""... $ac_c" 1>&6
  8284. echo "configure:10324: checking for OpenGL library" >&5
  8285. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  8286. LIBS="-lopengl32 "
  8287. cat > conftest.$ac_ext <<EOF
  8288. #line 10328 "configure"
  8289. #include "confdefs.h"
  8290. #include <GL/gl.h>
  8291. int main() {
  8292. glEnd();
  8293. ; return 0; }
  8294. EOF
  8295. if { (eval echo configure:10335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8296. rm -rf conftest*
  8297. echo "$ac_t""found" 1>&6
  8298. OPENGLLIB="$OPENGLLIB -lopengl32 "
  8299. else
  8300. echo "configure: failed program was:" >&5
  8301. cat conftest.$ac_ext >&5
  8302. rm -rf conftest*
  8303. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  8304. fi
  8305. rm -f conftest*
  8306. LIBS=${ac_save_libs}
  8307. LDFLAGS=${ac_save_ldflags}
  8308. ac_save_ldflags="$LDFLAGS"
  8309. ac_save_libs="$LIBS"
  8310. echo $ac_n "checking for GLU library""... $ac_c" 1>&6
  8311. echo "configure:10359: checking for GLU library" >&5
  8312. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  8313. LIBS="-lglu32 $OPENGLLIB "
  8314. cat > conftest.$ac_ext <<EOF
  8315. #line 10363 "configure"
  8316. #include "confdefs.h"
  8317. #include <GL/glu.h>
  8318. int main() {
  8319. gluNewQuadric();
  8320. ; return 0; }
  8321. EOF
  8322. if { (eval echo configure:10370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8323. rm -rf conftest*
  8324. echo "$ac_t""found" 1>&6
  8325. OPENGLULIB="$OPENGLULIB -lglu32 "
  8326. else
  8327. echo "configure: failed program was:" >&5
  8328. cat conftest.$ac_ext >&5
  8329. rm -rf conftest*
  8330. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  8331. fi
  8332. rm -f conftest*
  8333. LIBS=${ac_save_libs}
  8334. LDFLAGS=${ac_save_ldflags}
  8335. CFLAGS="${ac_save_cflags}"
  8336. OPENGLLIB="$OPENGL_LIB_PATH $OPENGLLIB"
  8337. OPENGLULIB="$OPENGL_LIB_PATH $OPENGLULIB"
  8338. cat >> confdefs.h <<\EOF
  8339. #define OPENGL_WINDOWS 1
  8340. EOF
  8341. fi # $OPENGL_WINDOWS
  8342. fi # $USE_OPENGL
  8343. # Done checking OpenGL
  8344. # Enable ODBC option
  8345. echo $ac_n "checking whether to use ODBC""... $ac_c" 1>&6
  8346. echo "configure:10419: checking whether to use ODBC" >&5
  8347. echo "$ac_t"""$with_odbc"" 1>&6
  8348. case "$with_odbc" in
  8349. "no") USE_ODBC= ;;
  8350. "yes") USE_ODBC="1" ;;
  8351. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  8352. esac
  8353. ODBCINC=
  8354. ODBCLIB=
  8355. if test -n "$USE_ODBC"; then
  8356. # With ODBC includes directory
  8357. echo $ac_n "checking for location of ODBC includes""... $ac_c" 1>&6
  8358. echo "configure:10438: checking for location of ODBC includes" >&5
  8359. case "$with_odbc_includes" in
  8360. y | ye | yes | n | no)
  8361. { echo "configure: error: *** You must supply a directory to --with-odbc-includes." 1>&2; exit 1; }
  8362. ;;
  8363. esac
  8364. echo "$ac_t""$with_odbc_includes" 1>&6
  8365. if test -n "$with_odbc_includes" ; then
  8366. for dir in $with_odbc_includes; do
  8367. if test -d "$dir"; then
  8368. ODBCINC="$ODBCINC -I$dir"
  8369. else
  8370. { echo "configure: error: *** ODBC includes directory $dir does not exist." 1>&2; exit 1; }
  8371. fi
  8372. done
  8373. fi
  8374. ac_save_cppflags="$CPPFLAGS"
  8375. CPPFLAGS="$ODBCINC $CPPFLAGS"
  8376. for ac_hdr in sql.h
  8377. do
  8378. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8379. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8380. echo "configure:10464: checking for $ac_hdr" >&5
  8381. cat > conftest.$ac_ext <<EOF
  8382. #line 10467 "configure"
  8383. #include "confdefs.h"
  8384. #include <$ac_hdr>
  8385. EOF
  8386. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8387. { (eval echo configure:10472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8388. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8389. if test -z "$ac_err"; then
  8390. rm -rf conftest*
  8391. eval "ac_cv_header_$ac_safe=yes"
  8392. else
  8393. echo "$ac_err" >&5
  8394. echo "configure: failed program was:" >&5
  8395. cat conftest.$ac_ext >&5
  8396. rm -rf conftest*
  8397. eval "ac_cv_header_$ac_safe=no"
  8398. fi
  8399. rm -f conftest*
  8400. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8401. echo "$ac_t""yes" 1>&6
  8402. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8403. cat >> confdefs.h <<EOF
  8404. #define $ac_tr_hdr 1
  8405. EOF
  8406. else
  8407. echo "$ac_t""no" 1>&6
  8408. { echo "configure: error: *** Unable to locate ODBC includes." 1>&2; exit 1; }
  8409. fi
  8410. done
  8411. CPPFLAGS=$ac_save_cppflags
  8412. # With ODBC library directory
  8413. echo $ac_n "checking for location of ODBC library""... $ac_c" 1>&6
  8414. echo "configure:10506: checking for location of ODBC library" >&5
  8415. case "$with_odbc_libs" in
  8416. y | ye | yes | n | no)
  8417. { echo "configure: error: *** You must supply a directory to --with-odbc-libs." 1>&2; exit 1; }
  8418. ;;
  8419. esac
  8420. echo "$ac_t""$with_odbc_libs" 1>&6
  8421. if test -n "$with_odbc_libs"; then
  8422. for dir in $with_odbc_libs; do
  8423. if test -d "$dir"; then
  8424. ODBCLIB="$ODBCLIB -L$dir"
  8425. else
  8426. { echo "configure: error: *** ODBC library directory $dir does not exist." 1>&2; exit 1; }
  8427. fi
  8428. done
  8429. fi
  8430. ac_save_ldflags="$LDFLAGS"
  8431. LDFLAGS="$ODBCLIB $LDFLAGS"
  8432. echo $ac_n "checking for SQLConnect in -lodbc""... $ac_c" 1>&6
  8433. echo "configure:10531: checking for SQLConnect in -lodbc" >&5
  8434. ac_lib_var=`echo odbc'_'SQLConnect | sed 'y%./+-%__p_%'`
  8435. ac_save_LIBS="$LIBS"
  8436. LIBS="-lodbc $ICONVLIB $LIBS"
  8437. cat > conftest.$ac_ext <<EOF
  8438. #line 10537 "configure"
  8439. #include "confdefs.h"
  8440. /* Override any gcc2 internal prototype to avoid an error. */
  8441. /* We use char because int might match the return type of a gcc2
  8442. builtin and then its argument prototype would still apply. */
  8443. char SQLConnect();
  8444. int main() {
  8445. SQLConnect()
  8446. ; return 0; }
  8447. EOF
  8448. if { (eval echo configure:10548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8449. rm -rf conftest*
  8450. eval "ac_cv_lib_$ac_lib_var=yes"
  8451. else
  8452. echo "configure: failed program was:" >&5
  8453. cat conftest.$ac_ext >&5
  8454. rm -rf conftest*
  8455. eval "ac_cv_lib_$ac_lib_var=no"
  8456. fi
  8457. rm -f conftest*
  8458. LIBS="$ac_save_LIBS"
  8459. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8460. echo "$ac_t""yes" 1>&6
  8461. ODBCLIB="$ODBCLIB -lodbc "
  8462. else
  8463. echo "$ac_t""no" 1>&6
  8464. LDFLAGS=${ac_save_ldflags}
  8465. ac_save_ldflags="$LDFLAGS"
  8466. LDFLAGS="$ODBCLIB $LDFLAGS"
  8467. echo $ac_n "checking for SQLConnect in -liodbc""... $ac_c" 1>&6
  8468. echo "configure:10573: checking for SQLConnect in -liodbc" >&5
  8469. ac_lib_var=`echo iodbc'_'SQLConnect | sed 'y%./+-%__p_%'`
  8470. ac_save_LIBS="$LIBS"
  8471. LIBS="-liodbc $LIBS"
  8472. cat > conftest.$ac_ext <<EOF
  8473. #line 10579 "configure"
  8474. #include "confdefs.h"
  8475. /* Override any gcc2 internal prototype to avoid an error. */
  8476. /* We use char because int might match the return type of a gcc2
  8477. builtin and then its argument prototype would still apply. */
  8478. char SQLConnect();
  8479. int main() {
  8480. SQLConnect()
  8481. ; return 0; }
  8482. EOF
  8483. if { (eval echo configure:10590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8484. rm -rf conftest*
  8485. eval "ac_cv_lib_$ac_lib_var=yes"
  8486. else
  8487. echo "configure: failed program was:" >&5
  8488. cat conftest.$ac_ext >&5
  8489. rm -rf conftest*
  8490. eval "ac_cv_lib_$ac_lib_var=no"
  8491. fi
  8492. rm -f conftest*
  8493. LIBS="$ac_save_LIBS"
  8494. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8495. echo "$ac_t""yes" 1>&6
  8496. ODBCLIB="$ODBCLIB -liodbc "
  8497. else
  8498. echo "$ac_t""no" 1>&6
  8499. LDFLAGS=${ac_save_ldflags}
  8500. ac_save_cflags="$CFLAGS"
  8501. CFLAGS="$CFLAGS $ODBCINC"
  8502. ac_save_ldflags="$LDFLAGS"
  8503. ac_save_libs="$LIBS"
  8504. echo $ac_n "checking for ODBC library""... $ac_c" 1>&6
  8505. echo "configure:10615: checking for ODBC library" >&5
  8506. LDFLAGS="$ODBCLIB $LDFLAGS"
  8507. LIBS="-lodbc32 "
  8508. cat > conftest.$ac_ext <<EOF
  8509. #line 10619 "configure"
  8510. #include "confdefs.h"
  8511. #include <windows.h>
  8512. #include <sql.h>
  8513. int main() {
  8514. SQLAllocEnv((SQLHENV *)0);
  8515. ; return 0; }
  8516. EOF
  8517. if { (eval echo configure:10627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8518. rm -rf conftest*
  8519. echo "$ac_t""found" 1>&6
  8520. ODBCLIB="$ODBCLIB -lodbc32 "
  8521. else
  8522. echo "configure: failed program was:" >&5
  8523. cat conftest.$ac_ext >&5
  8524. rm -rf conftest*
  8525. { echo "configure: error: *** Unable to locate ODBC library." 1>&2; exit 1; }
  8526. fi
  8527. rm -f conftest*
  8528. LIBS=${ac_save_libs}
  8529. LDFLAGS=${ac_save_ldflags}
  8530. CFLAGS="${ac_save_cflags}"
  8531. fi
  8532. LDFLAGS=${ac_save_ldflags}
  8533. fi
  8534. LDFLAGS=${ac_save_ldflags}
  8535. fi # $USE_ODBC
  8536. # Done checking ODBC
  8537. # Enable FFTW option
  8538. echo $ac_n "checking whether to use FFTW""... $ac_c" 1>&6
  8539. echo "configure:10676: checking whether to use FFTW" >&5
  8540. echo "$ac_t"""$with_fftw"" 1>&6
  8541. case "$with_fftw" in
  8542. "no") USE_FFTW= ;;
  8543. "yes") USE_FFTW="1" ;;
  8544. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  8545. esac
  8546. FFTWINC=
  8547. FFTWLIB=
  8548. if test -n "$USE_FFTW"; then
  8549. # With FFTW includes directory
  8550. echo $ac_n "checking for location of FFTW includes""... $ac_c" 1>&6
  8551. echo "configure:10695: checking for location of FFTW includes" >&5
  8552. case "$with_fftw_includes" in
  8553. y | ye | yes | n | no)
  8554. { echo "configure: error: *** You must supply a directory to --with-fftw-includes." 1>&2; exit 1; }
  8555. ;;
  8556. esac
  8557. echo "$ac_t""$with_fftw_includes" 1>&6
  8558. if test -n "$with_fftw_includes" ; then
  8559. for dir in $with_fftw_includes; do
  8560. if test -d "$dir"; then
  8561. FFTWINC="$FFTWINC -I$dir"
  8562. else
  8563. { echo "configure: error: *** FFTW includes directory $dir does not exist." 1>&2; exit 1; }
  8564. fi
  8565. done
  8566. fi
  8567. ac_save_cppflags="$CPPFLAGS"
  8568. CPPFLAGS="$FFTWINC $CPPFLAGS"
  8569. for ac_hdr in fftw3.h
  8570. do
  8571. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8572. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8573. echo "configure:10721: checking for $ac_hdr" >&5
  8574. cat > conftest.$ac_ext <<EOF
  8575. #line 10724 "configure"
  8576. #include "confdefs.h"
  8577. #include <$ac_hdr>
  8578. EOF
  8579. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8580. { (eval echo configure:10729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8581. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8582. if test -z "$ac_err"; then
  8583. rm -rf conftest*
  8584. eval "ac_cv_header_$ac_safe=yes"
  8585. else
  8586. echo "$ac_err" >&5
  8587. echo "configure: failed program was:" >&5
  8588. cat conftest.$ac_ext >&5
  8589. rm -rf conftest*
  8590. eval "ac_cv_header_$ac_safe=no"
  8591. fi
  8592. rm -f conftest*
  8593. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8594. echo "$ac_t""yes" 1>&6
  8595. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8596. cat >> confdefs.h <<EOF
  8597. #define $ac_tr_hdr 1
  8598. EOF
  8599. else
  8600. echo "$ac_t""no" 1>&6
  8601. ac_save_cppflags="$CPPFLAGS"
  8602. CPPFLAGS=" $CPPFLAGS"
  8603. for ac_hdr in fftw.h
  8604. do
  8605. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8606. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8607. echo "configure:10757: checking for $ac_hdr" >&5
  8608. cat > conftest.$ac_ext <<EOF
  8609. #line 10760 "configure"
  8610. #include "confdefs.h"
  8611. #include <$ac_hdr>
  8612. EOF
  8613. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8614. { (eval echo configure:10765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8615. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8616. if test -z "$ac_err"; then
  8617. rm -rf conftest*
  8618. eval "ac_cv_header_$ac_safe=yes"
  8619. else
  8620. echo "$ac_err" >&5
  8621. echo "configure: failed program was:" >&5
  8622. cat conftest.$ac_ext >&5
  8623. rm -rf conftest*
  8624. eval "ac_cv_header_$ac_safe=no"
  8625. fi
  8626. rm -f conftest*
  8627. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8628. echo "$ac_t""yes" 1>&6
  8629. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8630. cat >> confdefs.h <<EOF
  8631. #define $ac_tr_hdr 1
  8632. EOF
  8633. else
  8634. echo "$ac_t""no" 1>&6
  8635. ac_save_cppflags="$CPPFLAGS"
  8636. CPPFLAGS=" $CPPFLAGS"
  8637. for ac_hdr in dfftw.h
  8638. do
  8639. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8640. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8641. echo "configure:10793: checking for $ac_hdr" >&5
  8642. cat > conftest.$ac_ext <<EOF
  8643. #line 10796 "configure"
  8644. #include "confdefs.h"
  8645. #include <$ac_hdr>
  8646. EOF
  8647. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8648. { (eval echo configure:10801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8649. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8650. if test -z "$ac_err"; then
  8651. rm -rf conftest*
  8652. eval "ac_cv_header_$ac_safe=yes"
  8653. else
  8654. echo "$ac_err" >&5
  8655. echo "configure: failed program was:" >&5
  8656. cat conftest.$ac_ext >&5
  8657. rm -rf conftest*
  8658. eval "ac_cv_header_$ac_safe=no"
  8659. fi
  8660. rm -f conftest*
  8661. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8662. echo "$ac_t""yes" 1>&6
  8663. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8664. cat >> confdefs.h <<EOF
  8665. #define $ac_tr_hdr 1
  8666. EOF
  8667. else
  8668. echo "$ac_t""no" 1>&6
  8669. { echo "configure: error: *** Unable to locate FFTW includes." 1>&2; exit 1; }
  8670. fi
  8671. done
  8672. CPPFLAGS=$ac_save_cppflags
  8673. fi
  8674. done
  8675. CPPFLAGS=$ac_save_cppflags
  8676. fi
  8677. done
  8678. CPPFLAGS=$ac_save_cppflags
  8679. # With FFTW library directory
  8680. echo $ac_n "checking for location of FFTW library""... $ac_c" 1>&6
  8681. echo "configure:10847: checking for location of FFTW library" >&5
  8682. case "$with_fftw_libs" in
  8683. y | ye | yes | n | no)
  8684. { echo "configure: error: *** You must supply a directory to --with-fftw-libs." 1>&2; exit 1; }
  8685. ;;
  8686. esac
  8687. echo "$ac_t""$with_fftw_libs" 1>&6
  8688. if test -n "$with_fftw_libs"; then
  8689. for dir in $with_fftw_libs; do
  8690. if test -d "$dir"; then
  8691. FFTWLIB="$FFTWLIB -L$dir"
  8692. else
  8693. { echo "configure: error: *** FFTW library directory $dir does not exist." 1>&2; exit 1; }
  8694. fi
  8695. done
  8696. fi
  8697. ac_save_ldflags="$LDFLAGS"
  8698. LDFLAGS="$FFTWLIB $LDFLAGS"
  8699. echo $ac_n "checking for fftw_execute in -lfftw3""... $ac_c" 1>&6
  8700. echo "configure:10872: checking for fftw_execute in -lfftw3" >&5
  8701. ac_lib_var=`echo fftw3'_'fftw_execute | sed 'y%./+-%__p_%'`
  8702. ac_save_LIBS="$LIBS"
  8703. LIBS="-lfftw3 $MATHLIB $LIBS"
  8704. cat > conftest.$ac_ext <<EOF
  8705. #line 10878 "configure"
  8706. #include "confdefs.h"
  8707. /* Override any gcc2 internal prototype to avoid an error. */
  8708. /* We use char because int might match the return type of a gcc2
  8709. builtin and then its argument prototype would still apply. */
  8710. char fftw_execute();
  8711. int main() {
  8712. fftw_execute()
  8713. ; return 0; }
  8714. EOF
  8715. if { (eval echo configure:10889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8716. rm -rf conftest*
  8717. eval "ac_cv_lib_$ac_lib_var=yes"
  8718. else
  8719. echo "configure: failed program was:" >&5
  8720. cat conftest.$ac_ext >&5
  8721. rm -rf conftest*
  8722. eval "ac_cv_lib_$ac_lib_var=no"
  8723. fi
  8724. rm -f conftest*
  8725. LIBS="$ac_save_LIBS"
  8726. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8727. echo "$ac_t""yes" 1>&6
  8728. FFTWLIB="$FFTWLIB -lfftw3 $MATHLIB"
  8729. else
  8730. echo "$ac_t""no" 1>&6
  8731. LDFLAGS=${ac_save_ldflags}
  8732. ac_save_ldflags="$LDFLAGS"
  8733. LDFLAGS="$FFTWLIB $LDFLAGS"
  8734. echo $ac_n "checking for fftwnd_one in -lfftw""... $ac_c" 1>&6
  8735. echo "configure:10914: checking for fftwnd_one in -lfftw" >&5
  8736. ac_lib_var=`echo fftw'_'fftwnd_one | sed 'y%./+-%__p_%'`
  8737. ac_save_LIBS="$LIBS"
  8738. LIBS="-lfftw $MATHLIB $LIBS"
  8739. cat > conftest.$ac_ext <<EOF
  8740. #line 10920 "configure"
  8741. #include "confdefs.h"
  8742. /* Override any gcc2 internal prototype to avoid an error. */
  8743. /* We use char because int might match the return type of a gcc2
  8744. builtin and then its argument prototype would still apply. */
  8745. char fftwnd_one();
  8746. int main() {
  8747. fftwnd_one()
  8748. ; return 0; }
  8749. EOF
  8750. if { (eval echo configure:10931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8751. rm -rf conftest*
  8752. eval "ac_cv_lib_$ac_lib_var=yes"
  8753. else
  8754. echo "configure: failed program was:" >&5
  8755. cat conftest.$ac_ext >&5
  8756. rm -rf conftest*
  8757. eval "ac_cv_lib_$ac_lib_var=no"
  8758. fi
  8759. rm -f conftest*
  8760. LIBS="$ac_save_LIBS"
  8761. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8762. echo "$ac_t""yes" 1>&6
  8763. FFTWLIB="$FFTWLIB -lfftw $MATHLIB"
  8764. else
  8765. echo "$ac_t""no" 1>&6
  8766. LDFLAGS=${ac_save_ldflags}
  8767. ac_save_ldflags="$LDFLAGS"
  8768. LDFLAGS="$FFTWLIB $LDFLAGS"
  8769. echo $ac_n "checking for fftwnd_one in -ldfftw""... $ac_c" 1>&6
  8770. echo "configure:10956: checking for fftwnd_one in -ldfftw" >&5
  8771. ac_lib_var=`echo dfftw'_'fftwnd_one | sed 'y%./+-%__p_%'`
  8772. ac_save_LIBS="$LIBS"
  8773. LIBS="-ldfftw $MATHLIB $LIBS"
  8774. cat > conftest.$ac_ext <<EOF
  8775. #line 10962 "configure"
  8776. #include "confdefs.h"
  8777. /* Override any gcc2 internal prototype to avoid an error. */
  8778. /* We use char because int might match the return type of a gcc2
  8779. builtin and then its argument prototype would still apply. */
  8780. char fftwnd_one();
  8781. int main() {
  8782. fftwnd_one()
  8783. ; return 0; }
  8784. EOF
  8785. if { (eval echo configure:10973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8786. rm -rf conftest*
  8787. eval "ac_cv_lib_$ac_lib_var=yes"
  8788. else
  8789. echo "configure: failed program was:" >&5
  8790. cat conftest.$ac_ext >&5
  8791. rm -rf conftest*
  8792. eval "ac_cv_lib_$ac_lib_var=no"
  8793. fi
  8794. rm -f conftest*
  8795. LIBS="$ac_save_LIBS"
  8796. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8797. echo "$ac_t""yes" 1>&6
  8798. FFTWLIB="$FFTWLIB -ldfftw $MATHLIB"
  8799. else
  8800. echo "$ac_t""no" 1>&6
  8801. LDFLAGS=${ac_save_ldflags}
  8802. { echo "configure: error: *** Unable to locate FFTW library." 1>&2; exit 1; }
  8803. fi
  8804. LDFLAGS=${ac_save_ldflags}
  8805. fi
  8806. LDFLAGS=${ac_save_ldflags}
  8807. fi
  8808. LDFLAGS=${ac_save_ldflags}
  8809. fi # $USE_FFTW
  8810. # Done checking FFTW
  8811. # Enable BLAS option
  8812. echo $ac_n "checking whether to use BLAS""... $ac_c" 1>&6
  8813. echo "configure:11030: checking whether to use BLAS" >&5
  8814. echo "$ac_t"""$with_blas"" 1>&6
  8815. case "$with_blas" in
  8816. "no") USE_BLAS= ;;
  8817. "yes") USE_BLAS="1" ;;
  8818. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  8819. esac
  8820. BLASLIB=
  8821. BLASINC=
  8822. if test -n "$USE_BLAS"; then
  8823. # With BLAS includes directory
  8824. # BLAS doesn't have includes (FORTRAN library)
  8825. # With BLAS library directory
  8826. echo $ac_n "checking for location of BLAS includes""... $ac_c" 1>&6
  8827. echo "configure:11051: checking for location of BLAS includes" >&5
  8828. case "$with_blas_includes" in
  8829. y | ye | yes | n | no)
  8830. { echo "configure: error: *** You must supply a directory to --with-blas-includes." 1>&2; exit 1; }
  8831. ;;
  8832. esac
  8833. echo "$ac_t""$with_blas_includes" 1>&6
  8834. if test -n "$with_blas_includes" ; then
  8835. for dir in $with_blas_includes; do
  8836. if test -d "$dir"; then
  8837. BLASINC="$BLASINC -I$dir"
  8838. else
  8839. { echo "configure: error: *** BLAS includes directory $dir does not exist." 1>&2; exit 1; }
  8840. fi
  8841. done
  8842. fi
  8843. echo $ac_n "checking for location of BLAS library""... $ac_c" 1>&6
  8844. echo "configure:11071: checking for location of BLAS library" >&5
  8845. case "$with_blas_libs" in
  8846. y | ye | yes | n | no)
  8847. { echo "configure: error: *** You must supply a directory to --with-blas-libs." 1>&2; exit 1; }
  8848. ;;
  8849. esac
  8850. echo "$ac_t""$with_blas_libs" 1>&6
  8851. if test -n "$with_blas_libs"; then
  8852. for dir in $with_blas_libs; do
  8853. if test -d "$dir"; then
  8854. BLASLIB="$BLASLIB -L$dir"
  8855. else
  8856. { echo "configure: error: *** BLAS library directory $dir does not exist." 1>&2; exit 1; }
  8857. fi
  8858. done
  8859. fi
  8860. # See if cblas.h exists (CBLAS,ATLAS,others)
  8861. save_CPPFLAGS="$CPPFLAGS"
  8862. CPPFLAGS="$BLASINC $CPPFLAGS"
  8863. for ac_hdr in cblas.h
  8864. do
  8865. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8866. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8867. echo "configure:11097: checking for $ac_hdr" >&5
  8868. cat > conftest.$ac_ext <<EOF
  8869. #line 11100 "configure"
  8870. #include "confdefs.h"
  8871. #include <$ac_hdr>
  8872. EOF
  8873. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8874. { (eval echo configure:11105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8875. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8876. if test -z "$ac_err"; then
  8877. rm -rf conftest*
  8878. eval "ac_cv_header_$ac_safe=yes"
  8879. else
  8880. echo "$ac_err" >&5
  8881. echo "configure: failed program was:" >&5
  8882. cat conftest.$ac_ext >&5
  8883. rm -rf conftest*
  8884. eval "ac_cv_header_$ac_safe=no"
  8885. fi
  8886. rm -f conftest*
  8887. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8888. echo "$ac_t""yes" 1>&6
  8889. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8890. cat >> confdefs.h <<EOF
  8891. #define $ac_tr_hdr 1
  8892. EOF
  8893. else
  8894. echo "$ac_t""no" 1>&6
  8895. fi
  8896. done
  8897. CPPFLAGS="$save_CPPFLAGS"
  8898. ac_save_ldflags="$LDFLAGS"
  8899. LDFLAGS="$BLASLIB $LDFLAGS"
  8900. echo $ac_n "checking for dnrm2_ in -lblas""... $ac_c" 1>&6
  8901. echo "configure:11140: checking for dnrm2_ in -lblas" >&5
  8902. ac_lib_var=`echo blas'_'dnrm2_ | sed 'y%./+-%__p_%'`
  8903. ac_save_LIBS="$LIBS"
  8904. LIBS="-lblas $MATHLIB $LIBS"
  8905. cat > conftest.$ac_ext <<EOF
  8906. #line 11146 "configure"
  8907. #include "confdefs.h"
  8908. /* Override any gcc2 internal prototype to avoid an error. */
  8909. /* We use char because int might match the return type of a gcc2
  8910. builtin and then its argument prototype would still apply. */
  8911. char dnrm2_();
  8912. int main() {
  8913. dnrm2_()
  8914. ; return 0; }
  8915. EOF
  8916. if { (eval echo configure:11157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8917. rm -rf conftest*
  8918. eval "ac_cv_lib_$ac_lib_var=yes"
  8919. else
  8920. echo "configure: failed program was:" >&5
  8921. cat conftest.$ac_ext >&5
  8922. rm -rf conftest*
  8923. eval "ac_cv_lib_$ac_lib_var=no"
  8924. fi
  8925. rm -f conftest*
  8926. LIBS="$ac_save_LIBS"
  8927. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8928. echo "$ac_t""yes" 1>&6
  8929. BLASLIB="$BLASLIB -lblas "
  8930. else
  8931. echo "$ac_t""no" 1>&6
  8932. echo $ac_n "checking for dnrm2_ in -lblas""... $ac_c" 1>&6
  8933. echo "configure:11176: checking for dnrm2_ in -lblas" >&5
  8934. ac_lib_var=`echo blas'_'dnrm2_ | sed 'y%./+-%__p_%'`
  8935. ac_save_LIBS="$LIBS"
  8936. LIBS="-lblas $MATHLIB -lg2c $LIBS"
  8937. cat > conftest.$ac_ext <<EOF
  8938. #line 11182 "configure"
  8939. #include "confdefs.h"
  8940. /* Override any gcc2 internal prototype to avoid an error. */
  8941. /* We use char because int might match the return type of a gcc2
  8942. builtin and then its argument prototype would still apply. */
  8943. char dnrm2_();
  8944. int main() {
  8945. dnrm2_()
  8946. ; return 0; }
  8947. EOF
  8948. if { (eval echo configure:11193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8949. rm -rf conftest*
  8950. eval "ac_cv_lib_$ac_lib_var=yes"
  8951. else
  8952. echo "configure: failed program was:" >&5
  8953. cat conftest.$ac_ext >&5
  8954. rm -rf conftest*
  8955. eval "ac_cv_lib_$ac_lib_var=no"
  8956. fi
  8957. rm -f conftest*
  8958. LIBS="$ac_save_LIBS"
  8959. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8960. echo "$ac_t""yes" 1>&6
  8961. BLASLIB="$BLASLIB -lblas -lg2c"
  8962. else
  8963. echo "$ac_t""no" 1>&6
  8964. LDFLAGS=${ac_save_ldflags}
  8965. { echo "configure: error: *** Unable to locate BLAS library." 1>&2; exit 1; }
  8966. fi
  8967. fi
  8968. LDFLAGS=${ac_save_ldflags}
  8969. blas_ok=no
  8970. # Check for ATLAS
  8971. save_LDFLAGS="$LDFLAGS"
  8972. LDFLAGS="$BLASLIB $LDFLAGS"
  8973. echo $ac_n "checking for ATL_xerbla in -latlas""... $ac_c" 1>&6
  8974. echo "configure:11237: checking for ATL_xerbla in -latlas" >&5
  8975. ac_lib_var=`echo atlas'_'ATL_xerbla | sed 'y%./+-%__p_%'`
  8976. ac_save_LIBS="$LIBS"
  8977. LIBS="-latlas $LIBS"
  8978. cat > conftest.$ac_ext <<EOF
  8979. #line 11243 "configure"
  8980. #include "confdefs.h"
  8981. /* Override any gcc2 internal prototype to avoid an error. */
  8982. /* We use char because int might match the return type of a gcc2
  8983. builtin and then its argument prototype would still apply. */
  8984. char ATL_xerbla();
  8985. int main() {
  8986. ATL_xerbla()
  8987. ; return 0; }
  8988. EOF
  8989. if { (eval echo configure:11254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8990. rm -rf conftest*
  8991. eval "ac_cv_lib_$ac_lib_var=yes"
  8992. else
  8993. echo "configure: failed program was:" >&5
  8994. cat conftest.$ac_ext >&5
  8995. rm -rf conftest*
  8996. eval "ac_cv_lib_$ac_lib_var=no"
  8997. fi
  8998. rm -f conftest*
  8999. LIBS="$ac_save_LIBS"
  9000. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9001. echo "$ac_t""yes" 1>&6
  9002. echo $ac_n "checking for sgemm_ in -lf77blas""... $ac_c" 1>&6
  9003. echo "configure:11269: checking for sgemm_ in -lf77blas" >&5
  9004. ac_lib_var=`echo f77blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  9005. ac_save_LIBS="$LIBS"
  9006. LIBS="-lf77blas -latlas $LIBS"
  9007. cat > conftest.$ac_ext <<EOF
  9008. #line 11275 "configure"
  9009. #include "confdefs.h"
  9010. /* Override any gcc2 internal prototype to avoid an error. */
  9011. /* We use char because int might match the return type of a gcc2
  9012. builtin and then its argument prototype would still apply. */
  9013. char sgemm_();
  9014. int main() {
  9015. sgemm_()
  9016. ; return 0; }
  9017. EOF
  9018. if { (eval echo configure:11286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9019. rm -rf conftest*
  9020. eval "ac_cv_lib_$ac_lib_var=yes"
  9021. else
  9022. echo "configure: failed program was:" >&5
  9023. cat conftest.$ac_ext >&5
  9024. rm -rf conftest*
  9025. eval "ac_cv_lib_$ac_lib_var=no"
  9026. fi
  9027. rm -f conftest*
  9028. LIBS="$ac_save_LIBS"
  9029. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9030. echo "$ac_t""yes" 1>&6
  9031. echo $ac_n "checking for cblas_dgemm in -lcblas""... $ac_c" 1>&6
  9032. echo "configure:11301: checking for cblas_dgemm in -lcblas" >&5
  9033. ac_lib_var=`echo cblas'_'cblas_dgemm | sed 'y%./+-%__p_%'`
  9034. ac_save_LIBS="$LIBS"
  9035. LIBS="-lcblas -lf77blas -latlas $LIBS"
  9036. cat > conftest.$ac_ext <<EOF
  9037. #line 11307 "configure"
  9038. #include "confdefs.h"
  9039. /* Override any gcc2 internal prototype to avoid an error. */
  9040. /* We use char because int might match the return type of a gcc2
  9041. builtin and then its argument prototype would still apply. */
  9042. char cblas_dgemm();
  9043. int main() {
  9044. cblas_dgemm()
  9045. ; return 0; }
  9046. EOF
  9047. if { (eval echo configure:11318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9048. rm -rf conftest*
  9049. eval "ac_cv_lib_$ac_lib_var=yes"
  9050. else
  9051. echo "configure: failed program was:" >&5
  9052. cat conftest.$ac_ext >&5
  9053. rm -rf conftest*
  9054. eval "ac_cv_lib_$ac_lib_var=no"
  9055. fi
  9056. rm -f conftest*
  9057. LIBS="$ac_save_LIBS"
  9058. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9059. echo "$ac_t""yes" 1>&6
  9060. blas_ok=yes; BLASLIB="-lcblas -lf77blas -latlas"
  9061. else
  9062. echo "$ac_t""no" 1>&6
  9063. fi
  9064. else
  9065. echo "$ac_t""no" 1>&6
  9066. fi
  9067. else
  9068. echo "$ac_t""no" 1>&6
  9069. fi
  9070. LDFLAGS="$save_LDFLAGS"
  9071. # Do we have ATLAS?
  9072. if test $blas_ok = yes; then
  9073. cat >> confdefs.h <<\EOF
  9074. #define HAVE_LIBATLAS 1
  9075. EOF
  9076. fi
  9077. # BLAS in Apple vecLib framework? (Mac OS-X)
  9078. # not dependent on APP build
  9079. #if test -n "$MACOSX_APP"; then
  9080. if test $blas_ok = no; then
  9081. vlib_flags="-framework vecLib"
  9082. save_LIBS="$LIBS"
  9083. LIBS="$vlib_flags $LIBS"
  9084. echo $ac_n "checking for sgemm in $vlib_flags""... $ac_c" 1>&6
  9085. echo "configure:11364: checking for sgemm in $vlib_flags" >&5
  9086. cat > conftest.$ac_ext <<EOF
  9087. #line 11366 "configure"
  9088. #include "confdefs.h"
  9089. int main() {
  9090. sgemm
  9091. ; return 0; }
  9092. EOF
  9093. if { (eval echo configure:11373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9094. rm -rf conftest*
  9095. blas_ok=yes; BLASLIB="$vlib_flags"
  9096. else
  9097. echo "configure: failed program was:" >&5
  9098. cat conftest.$ac_ext >&5
  9099. rm -rf conftest*
  9100. BLASLIB=""
  9101. fi
  9102. rm -f conftest*
  9103. echo "$ac_t""$blas_ok" 1>&6
  9104. LIBS="$save_LIBS"
  9105. fi
  9106. #fi # $MACOSX_APP
  9107. # BLAS in PhiPACK libraries? (requires generic BLAS, too)
  9108. if test $blas_ok = no; then
  9109. echo $ac_n "checking for sgemm_ in -lblas""... $ac_c" 1>&6
  9110. echo "configure:11391: checking for sgemm_ in -lblas" >&5
  9111. ac_lib_var=`echo blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  9112. ac_save_LIBS="$LIBS"
  9113. LIBS="-lblas $LIBS"
  9114. cat > conftest.$ac_ext <<EOF
  9115. #line 11397 "configure"
  9116. #include "confdefs.h"
  9117. /* Override any gcc2 internal prototype to avoid an error. */
  9118. /* We use char because int might match the return type of a gcc2
  9119. builtin and then its argument prototype would still apply. */
  9120. char sgemm_();
  9121. int main() {
  9122. sgemm_()
  9123. ; return 0; }
  9124. EOF
  9125. if { (eval echo configure:11408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9126. rm -rf conftest*
  9127. eval "ac_cv_lib_$ac_lib_var=yes"
  9128. else
  9129. echo "configure: failed program was:" >&5
  9130. cat conftest.$ac_ext >&5
  9131. rm -rf conftest*
  9132. eval "ac_cv_lib_$ac_lib_var=no"
  9133. fi
  9134. rm -f conftest*
  9135. LIBS="$ac_save_LIBS"
  9136. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9137. echo "$ac_t""yes" 1>&6
  9138. echo $ac_n "checking for dgemm_ in -ldgemm""... $ac_c" 1>&6
  9139. echo "configure:11423: checking for dgemm_ in -ldgemm" >&5
  9140. ac_lib_var=`echo dgemm'_'dgemm_ | sed 'y%./+-%__p_%'`
  9141. ac_save_LIBS="$LIBS"
  9142. LIBS="-ldgemm -lblas $LIBS"
  9143. cat > conftest.$ac_ext <<EOF
  9144. #line 11429 "configure"
  9145. #include "confdefs.h"
  9146. /* Override any gcc2 internal prototype to avoid an error. */
  9147. /* We use char because int might match the return type of a gcc2
  9148. builtin and then its argument prototype would still apply. */
  9149. char dgemm_();
  9150. int main() {
  9151. dgemm_()
  9152. ; return 0; }
  9153. EOF
  9154. if { (eval echo configure:11440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9155. rm -rf conftest*
  9156. eval "ac_cv_lib_$ac_lib_var=yes"
  9157. else
  9158. echo "configure: failed program was:" >&5
  9159. cat conftest.$ac_ext >&5
  9160. rm -rf conftest*
  9161. eval "ac_cv_lib_$ac_lib_var=no"
  9162. fi
  9163. rm -f conftest*
  9164. LIBS="$ac_save_LIBS"
  9165. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9166. echo "$ac_t""yes" 1>&6
  9167. echo $ac_n "checking for sgemm_ in -lsgemm""... $ac_c" 1>&6
  9168. echo "configure:11455: checking for sgemm_ in -lsgemm" >&5
  9169. ac_lib_var=`echo sgemm'_'sgemm_ | sed 'y%./+-%__p_%'`
  9170. ac_save_LIBS="$LIBS"
  9171. LIBS="-lsgemm -lblas $LIBS"
  9172. cat > conftest.$ac_ext <<EOF
  9173. #line 11461 "configure"
  9174. #include "confdefs.h"
  9175. /* Override any gcc2 internal prototype to avoid an error. */
  9176. /* We use char because int might match the return type of a gcc2
  9177. builtin and then its argument prototype would still apply. */
  9178. char sgemm_();
  9179. int main() {
  9180. sgemm_()
  9181. ; return 0; }
  9182. EOF
  9183. if { (eval echo configure:11472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9184. rm -rf conftest*
  9185. eval "ac_cv_lib_$ac_lib_var=yes"
  9186. else
  9187. echo "configure: failed program was:" >&5
  9188. cat conftest.$ac_ext >&5
  9189. rm -rf conftest*
  9190. eval "ac_cv_lib_$ac_lib_var=no"
  9191. fi
  9192. rm -f conftest*
  9193. LIBS="$ac_save_LIBS"
  9194. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9195. echo "$ac_t""yes" 1>&6
  9196. blas_ok=yes; BLASLIB="-lsgemm -ldgemm -lblas"
  9197. else
  9198. echo "$ac_t""no" 1>&6
  9199. fi
  9200. else
  9201. echo "$ac_t""no" 1>&6
  9202. fi
  9203. else
  9204. echo "$ac_t""no" 1>&6
  9205. fi
  9206. fi
  9207. # BLAS in Sun Performance library?
  9208. if test $blas_ok = no; then
  9209. if test "x$GCC" != xyes; then # only works with Sun CC
  9210. echo $ac_n "checking for acosp in -lsunmath""... $ac_c" 1>&6
  9211. echo "configure:11506: checking for acosp in -lsunmath" >&5
  9212. ac_lib_var=`echo sunmath'_'acosp | sed 'y%./+-%__p_%'`
  9213. ac_save_LIBS="$LIBS"
  9214. LIBS="-lsunmath $LIBS"
  9215. cat > conftest.$ac_ext <<EOF
  9216. #line 11512 "configure"
  9217. #include "confdefs.h"
  9218. /* Override any gcc2 internal prototype to avoid an error. */
  9219. /* We use char because int might match the return type of a gcc2
  9220. builtin and then its argument prototype would still apply. */
  9221. char acosp();
  9222. int main() {
  9223. acosp()
  9224. ; return 0; }
  9225. EOF
  9226. if { (eval echo configure:11523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9227. rm -rf conftest*
  9228. eval "ac_cv_lib_$ac_lib_var=yes"
  9229. else
  9230. echo "configure: failed program was:" >&5
  9231. cat conftest.$ac_ext >&5
  9232. rm -rf conftest*
  9233. eval "ac_cv_lib_$ac_lib_var=no"
  9234. fi
  9235. rm -f conftest*
  9236. LIBS="$ac_save_LIBS"
  9237. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9238. echo "$ac_t""yes" 1>&6
  9239. echo $ac_n "checking for sgemm_ in -lsunperf""... $ac_c" 1>&6
  9240. echo "configure:11538: checking for sgemm_ in -lsunperf" >&5
  9241. ac_lib_var=`echo sunperf'_'sgemm_ | sed 'y%./+-%__p_%'`
  9242. ac_save_LIBS="$LIBS"
  9243. LIBS="-lsunperf -lsunmath $LIBS"
  9244. cat > conftest.$ac_ext <<EOF
  9245. #line 11544 "configure"
  9246. #include "confdefs.h"
  9247. /* Override any gcc2 internal prototype to avoid an error. */
  9248. /* We use char because int might match the return type of a gcc2
  9249. builtin and then its argument prototype would still apply. */
  9250. char sgemm_();
  9251. int main() {
  9252. sgemm_()
  9253. ; return 0; }
  9254. EOF
  9255. if { (eval echo configure:11555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9256. rm -rf conftest*
  9257. eval "ac_cv_lib_$ac_lib_var=yes"
  9258. else
  9259. echo "configure: failed program was:" >&5
  9260. cat conftest.$ac_ext >&5
  9261. rm -rf conftest*
  9262. eval "ac_cv_lib_$ac_lib_var=no"
  9263. fi
  9264. rm -f conftest*
  9265. LIBS="$ac_save_LIBS"
  9266. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9267. echo "$ac_t""yes" 1>&6
  9268. blas_ok=yes; BLASLIB="-xlic_lib=sunperf -lsunmath"
  9269. else
  9270. echo "$ac_t""no" 1>&6
  9271. fi
  9272. else
  9273. echo "$ac_t""no" 1>&6
  9274. fi
  9275. fi
  9276. fi
  9277. # Generic BLAS library
  9278. if test $blas_ok = no; then
  9279. echo $ac_n "checking for sgemm_ in -lblas""... $ac_c" 1>&6
  9280. echo "configure:11585: checking for sgemm_ in -lblas" >&5
  9281. ac_lib_var=`echo blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  9282. ac_save_LIBS="$LIBS"
  9283. LIBS="-lblas $LIBS"
  9284. cat > conftest.$ac_ext <<EOF
  9285. #line 11591 "configure"
  9286. #include "confdefs.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 sgemm_();
  9291. int main() {
  9292. sgemm_()
  9293. ; return 0; }
  9294. EOF
  9295. if { (eval echo configure:11602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9296. rm -rf conftest*
  9297. eval "ac_cv_lib_$ac_lib_var=yes"
  9298. else
  9299. echo "configure: failed program was:" >&5
  9300. cat conftest.$ac_ext >&5
  9301. rm -rf conftest*
  9302. eval "ac_cv_lib_$ac_lib_var=no"
  9303. fi
  9304. rm -f conftest*
  9305. LIBS="$ac_save_LIBS"
  9306. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9307. echo "$ac_t""yes" 1>&6
  9308. blas_ok=yes; BLASLIB="-lblas"
  9309. else
  9310. echo "$ac_t""no" 1>&6
  9311. fi
  9312. fi
  9313. if test $blas_ok = yes; then
  9314. cat >> confdefs.h <<\EOF
  9315. #define HAVE_LIBBLAS 1
  9316. EOF
  9317. fi
  9318. fi # $USE_BLAS
  9319. # Done checking BLAS
  9320. # Enable LAPACK option
  9321. echo $ac_n "checking whether to use LAPACK""... $ac_c" 1>&6
  9322. echo "configure:11641: checking whether to use LAPACK" >&5
  9323. echo "$ac_t"""$with_lapack"" 1>&6
  9324. case "$with_lapack" in
  9325. "no") USE_LAPACK= ;;
  9326. "yes") USE_LAPACK="1" ;;
  9327. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9328. esac
  9329. LAPACKLIB=
  9330. LAPACKINC=
  9331. # LAPACK is useless without BLAS
  9332. if test -n "$USE_BLAS"; then
  9333. if test -n "$USE_LAPACK"; then
  9334. # With LAPACK includes directory
  9335. # LAPACK doesn't have includes (FORTRAN library)
  9336. # With LAPACK library directory
  9337. lapack_ok=no
  9338. echo $ac_n "checking for location of LAPACK includes""... $ac_c" 1>&6
  9339. echo "configure:11666: checking for location of LAPACK includes" >&5
  9340. case "$with_lapack_includes" in
  9341. y | ye | yes | n | no)
  9342. { echo "configure: error: *** You must supply a directory to --with-lapack-includes." 1>&2; exit 1; }
  9343. ;;
  9344. esac
  9345. echo "$ac_t""$with_lapack_includes" 1>&6
  9346. if test -n "$with_lapack_includes" ; then
  9347. for dir in $with_lapack_includes; do
  9348. if test -d "$dir"; then
  9349. LAPACKINC="$LAPACKINC -I$dir"
  9350. else
  9351. { echo "configure: error: *** LAPACK includes directory $dir does not exist." 1>&2; exit 1; }
  9352. fi
  9353. done
  9354. fi
  9355. echo $ac_n "checking for location of LAPACK library""... $ac_c" 1>&6
  9356. echo "configure:11686: checking for location of LAPACK library" >&5
  9357. case "$with_lapack_libs" in
  9358. y | ye | yes | n | no)
  9359. { echo "configure: error: *** You must supply a directory to --with-lapack-libs." 1>&2; exit 1; }
  9360. ;;
  9361. esac
  9362. echo "$ac_t""$with_lapack_libs" 1>&6
  9363. if test -n "$with_lapack_libs"; then
  9364. for dir in $with_lapack_libs; do
  9365. if test -d "$dir"; then
  9366. LAPACKLIB="$LAPACKLIB -L$dir"
  9367. else
  9368. { echo "configure: error: *** LAPACK library directory $dir does not exist." 1>&2; exit 1; }
  9369. fi
  9370. done
  9371. fi
  9372. # See if clapack.h exists (ATLAS)
  9373. save_CPPFLAGS="$CPPFLAGS"
  9374. CPPFLAGS="$LAPACKINC $CPPFLAGS"
  9375. for ac_hdr in clapack.h
  9376. do
  9377. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9378. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9379. echo "configure:11712: checking for $ac_hdr" >&5
  9380. cat > conftest.$ac_ext <<EOF
  9381. #line 11715 "configure"
  9382. #include "confdefs.h"
  9383. #include <$ac_hdr>
  9384. EOF
  9385. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9386. { (eval echo configure:11720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9387. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9388. if test -z "$ac_err"; then
  9389. rm -rf conftest*
  9390. eval "ac_cv_header_$ac_safe=yes"
  9391. else
  9392. echo "$ac_err" >&5
  9393. echo "configure: failed program was:" >&5
  9394. cat conftest.$ac_ext >&5
  9395. rm -rf conftest*
  9396. eval "ac_cv_header_$ac_safe=no"
  9397. fi
  9398. rm -f conftest*
  9399. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9400. echo "$ac_t""yes" 1>&6
  9401. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9402. cat >> confdefs.h <<EOF
  9403. #define $ac_tr_hdr 1
  9404. EOF
  9405. else
  9406. echo "$ac_t""no" 1>&6
  9407. fi
  9408. done
  9409. CPPFLAGS="$save_CPPFLAGS"
  9410. # LAPACK linked to by default?
  9411. if test lapack_ok=no; then
  9412. save_LIBS="$LIBS"; LIBS="$LIBS $BLASLIB $MATHLIB $FLIBS"
  9413. save_LDFLAGS="$LDFLAGS"; LDFLAGS="$LAPACKLIB $LDFLAGS"
  9414. echo $ac_n "checking for dsegv_""... $ac_c" 1>&6
  9415. echo "configure:11752: checking for dsegv_" >&5
  9416. cat > conftest.$ac_ext <<EOF
  9417. #line 11755 "configure"
  9418. #include "confdefs.h"
  9419. /* System header to define __stub macros and hopefully few prototypes,
  9420. which can conflict with char dsegv_(); below. */
  9421. #include <assert.h>
  9422. /* Override any gcc2 internal prototype to avoid an error. */
  9423. /* We use char because int might match the return type of a gcc2
  9424. builtin and then its argument prototype would still apply. */
  9425. char dsegv_();
  9426. int main() {
  9427. /* The GNU C library defines this for functions which it implements
  9428. to always fail with ENOSYS. Some functions are actually named
  9429. something starting with __ and the normal name is an alias. */
  9430. #if defined (__stub_dsegv_) || defined (__stub___dsegv_)
  9431. choke me
  9432. #else
  9433. dsegv_();
  9434. #endif
  9435. ; return 0; }
  9436. EOF
  9437. if { (eval echo configure:11778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9438. rm -rf conftest*
  9439. eval "ac_cv_func_dsegv_=yes"
  9440. else
  9441. echo "configure: failed program was:" >&5
  9442. cat conftest.$ac_ext >&5
  9443. rm -rf conftest*
  9444. eval "ac_cv_func_dsegv_=no"
  9445. fi
  9446. rm -f conftest*
  9447. if eval "test \"`echo '$ac_cv_func_'dsegv_`\" = yes"; then
  9448. echo "$ac_t""yes" 1>&6
  9449. lapack_ok=yes
  9450. else
  9451. echo "$ac_t""no" 1>&6
  9452. fi
  9453. LIBS="$save_LIBS"
  9454. LDFLAGS="$save_LDFLAGS"
  9455. fi
  9456. # Generic LAPACK library?
  9457. if test $lapack_ok = no; then
  9458. save_libs="$LIBS"; LIBS="$BLASLIB $MATHLIB $LIBS"
  9459. save_LDFLAGS="$LDFLAGS"; LDFLAGS="$LAPACKLIB $LDFLAGS"
  9460. echo $ac_n "checking for desgv_ in -llapack""... $ac_c" 1>&6
  9461. echo "configure:11805: checking for desgv_ in -llapack" >&5
  9462. ac_lib_var=`echo lapack'_'desgv_ | sed 'y%./+-%__p_%'`
  9463. ac_save_LIBS="$LIBS"
  9464. LIBS="-llapack $FLIBS $LIBS"
  9465. cat > conftest.$ac_ext <<EOF
  9466. #line 11811 "configure"
  9467. #include "confdefs.h"
  9468. /* Override any gcc2 internal prototype to avoid an error. */
  9469. /* We use char because int might match the return type of a gcc2
  9470. builtin and then its argument prototype would still apply. */
  9471. char desgv_();
  9472. int main() {
  9473. desgv_()
  9474. ; return 0; }
  9475. EOF
  9476. if { (eval echo configure:11822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9477. rm -rf conftest*
  9478. eval "ac_cv_lib_$ac_lib_var=yes"
  9479. else
  9480. echo "configure: failed program was:" >&5
  9481. cat conftest.$ac_ext >&5
  9482. rm -rf conftest*
  9483. eval "ac_cv_lib_$ac_lib_var=no"
  9484. fi
  9485. rm -f conftest*
  9486. LIBS="$ac_save_LIBS"
  9487. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9488. echo "$ac_t""yes" 1>&6
  9489. lapack_ok=yes; LAPACKLIB="-llapack"
  9490. else
  9491. echo "$ac_t""no" 1>&6
  9492. fi
  9493. LIBS="$save_LIBS"
  9494. LDFLAGS="$save_LDFLAGS"
  9495. fi
  9496. if test $lapack_ok = no; then
  9497. ac_save_ldflags="$LDFLAGS"
  9498. LDFLAGS="$LAPACKLIB $LDFLAGS"
  9499. echo $ac_n "checking for dgesv_ in -llapack""... $ac_c" 1>&6
  9500. echo "configure:11854: checking for dgesv_ in -llapack" >&5
  9501. ac_lib_var=`echo lapack'_'dgesv_ | sed 'y%./+-%__p_%'`
  9502. ac_save_LIBS="$LIBS"
  9503. LIBS="-llapack $BLASLIB $MATHLIB $LIBS"
  9504. cat > conftest.$ac_ext <<EOF
  9505. #line 11860 "configure"
  9506. #include "confdefs.h"
  9507. /* Override any gcc2 internal prototype to avoid an error. */
  9508. /* We use char because int might match the return type of a gcc2
  9509. builtin and then its argument prototype would still apply. */
  9510. char dgesv_();
  9511. int main() {
  9512. dgesv_()
  9513. ; return 0; }
  9514. EOF
  9515. if { (eval echo configure:11871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9516. rm -rf conftest*
  9517. eval "ac_cv_lib_$ac_lib_var=yes"
  9518. else
  9519. echo "configure: failed program was:" >&5
  9520. cat conftest.$ac_ext >&5
  9521. rm -rf conftest*
  9522. eval "ac_cv_lib_$ac_lib_var=no"
  9523. fi
  9524. rm -f conftest*
  9525. LIBS="$ac_save_LIBS"
  9526. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9527. echo "$ac_t""yes" 1>&6
  9528. LAPACKLIB="$LAPACKLIB -llapack "
  9529. else
  9530. echo "$ac_t""no" 1>&6
  9531. echo $ac_n "checking for dgesv_ in -llapack""... $ac_c" 1>&6
  9532. echo "configure:11890: checking for dgesv_ in -llapack" >&5
  9533. ac_lib_var=`echo lapack'_'dgesv_ | sed 'y%./+-%__p_%'`
  9534. ac_save_LIBS="$LIBS"
  9535. LIBS="-llapack $BLASLIB $MATHLIB -lg2c $LIBS"
  9536. cat > conftest.$ac_ext <<EOF
  9537. #line 11896 "configure"
  9538. #include "confdefs.h"
  9539. /* Override any gcc2 internal prototype to avoid an error. */
  9540. /* We use char because int might match the return type of a gcc2
  9541. builtin and then its argument prototype would still apply. */
  9542. char dgesv_();
  9543. int main() {
  9544. dgesv_()
  9545. ; return 0; }
  9546. EOF
  9547. if { (eval echo configure:11907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9548. rm -rf conftest*
  9549. eval "ac_cv_lib_$ac_lib_var=yes"
  9550. else
  9551. echo "configure: failed program was:" >&5
  9552. cat conftest.$ac_ext >&5
  9553. rm -rf conftest*
  9554. eval "ac_cv_lib_$ac_lib_var=no"
  9555. fi
  9556. rm -f conftest*
  9557. LIBS="$ac_save_LIBS"
  9558. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9559. echo "$ac_t""yes" 1>&6
  9560. LAPACKLIB="$LAPACKLIB -llapack -lg2c"
  9561. else
  9562. echo "$ac_t""no" 1>&6
  9563. LDFLAGS=${ac_save_ldflags}
  9564. { echo "configure: error: *** Unable to locate LAPACK library." 1>&2; exit 1; }
  9565. fi
  9566. fi
  9567. LDFLAGS=${ac_save_ldflags}
  9568. fi
  9569. cat >> confdefs.h <<\EOF
  9570. #define HAVE_LIBLAPACK 1
  9571. EOF
  9572. fi # $USE_LAPACK
  9573. fi # $USE_BLAS
  9574. # Done checking LAPACK
  9575. # Enable Cairo display driver option
  9576. echo $ac_n "checking whether to use Cairo""... $ac_c" 1>&6
  9577. echo "configure:11963: checking whether to use Cairo" >&5
  9578. echo "$ac_t"""$with_cairo"" 1>&6
  9579. case "$with_cairo" in
  9580. "no") USE_CAIRO= ;;
  9581. "yes") USE_CAIRO="1" ;;
  9582. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9583. esac
  9584. CAIROINC=
  9585. CAIROLIB=
  9586. if test -n "$USE_CAIRO"; then
  9587. cairo="cairo"
  9588. pkgs="cairo-ft cairo-fc cairo-pdf cairo-ps cairo-svg fontconfig"
  9589. if test -n "$USE_X11"; then
  9590. pkgs="$pkgs cairo-xlib cairo-xlib-xrender"
  9591. fi
  9592. for pkg in $pkgs ; do
  9593. if pkg-config --exists $pkg ; then
  9594. cairo="$cairo $pkg"
  9595. fi
  9596. done
  9597. # With Cairo includes directory
  9598. #FIXME: somehow quote dirs with spaces in $cairo ?
  9599. CAIROINC=`pkg-config --cflags $cairo`
  9600. echo $ac_n "checking for location of cairo includes""... $ac_c" 1>&6
  9601. echo "configure:11995: checking for location of cairo includes" >&5
  9602. case "$with_cairo_includes" in
  9603. y | ye | yes | n | no)
  9604. { echo "configure: error: *** You must supply a directory to --with-cairo-includes." 1>&2; exit 1; }
  9605. ;;
  9606. esac
  9607. echo "$ac_t""$with_cairo_includes" 1>&6
  9608. if test -n "$with_cairo_includes" ; then
  9609. for dir in $with_cairo_includes; do
  9610. if test -d "$dir"; then
  9611. CAIROINC="$CAIROINC -I$dir"
  9612. else
  9613. { echo "configure: error: *** cairo includes directory $dir does not exist." 1>&2; exit 1; }
  9614. fi
  9615. done
  9616. fi
  9617. ac_save_cppflags="$CPPFLAGS"
  9618. CPPFLAGS="$CAIROINC $CPPFLAGS"
  9619. for ac_hdr in cairo.h
  9620. do
  9621. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9622. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9623. echo "configure:12021: checking for $ac_hdr" >&5
  9624. cat > conftest.$ac_ext <<EOF
  9625. #line 12024 "configure"
  9626. #include "confdefs.h"
  9627. #include <$ac_hdr>
  9628. EOF
  9629. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9630. { (eval echo configure:12029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9631. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9632. if test -z "$ac_err"; then
  9633. rm -rf conftest*
  9634. eval "ac_cv_header_$ac_safe=yes"
  9635. else
  9636. echo "$ac_err" >&5
  9637. echo "configure: failed program was:" >&5
  9638. cat conftest.$ac_ext >&5
  9639. rm -rf conftest*
  9640. eval "ac_cv_header_$ac_safe=no"
  9641. fi
  9642. rm -f conftest*
  9643. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9644. echo "$ac_t""yes" 1>&6
  9645. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9646. cat >> confdefs.h <<EOF
  9647. #define $ac_tr_hdr 1
  9648. EOF
  9649. else
  9650. echo "$ac_t""no" 1>&6
  9651. { echo "configure: error: *** Unable to locate Cairo includes." 1>&2; exit 1; }
  9652. fi
  9653. done
  9654. CPPFLAGS=$ac_save_cppflags
  9655. # With Cairo library directory
  9656. CAIROLIB=`pkg-config --libs $cairo`
  9657. echo $ac_n "checking for location of cairo library""... $ac_c" 1>&6
  9658. echo "configure:12065: checking for location of cairo library" >&5
  9659. case "$with_cairo_libs" in
  9660. y | ye | yes | n | no)
  9661. { echo "configure: error: *** You must supply a directory to --with-cairo-libs." 1>&2; exit 1; }
  9662. ;;
  9663. esac
  9664. echo "$ac_t""$with_cairo_libs" 1>&6
  9665. if test -n "$with_cairo_libs"; then
  9666. for dir in $with_cairo_libs; do
  9667. if test -d "$dir"; then
  9668. CAIROLIB="$CAIROLIB -L$dir"
  9669. else
  9670. { echo "configure: error: *** cairo library directory $dir does not exist." 1>&2; exit 1; }
  9671. fi
  9672. done
  9673. fi
  9674. echo $ac_n "checking for cairo linking flags""... $ac_c" 1>&6
  9675. echo "configure:12085: checking for cairo linking flags" >&5
  9676. case "$with_cairo_ldflags" in
  9677. y | ye | yes | n | no)
  9678. { echo "configure: error: *** You must supply a directory to --with-cairo-ldflags." 1>&2; exit 1; }
  9679. ;;
  9680. esac
  9681. echo "$ac_t""$with_cairo_ldflags" 1>&6
  9682. CAIROLIB="$CAIROLIB $with_cairo_ldflags"
  9683. ac_save_libs="$LIBS"
  9684. ac_save_ldflags="$LDFLAGS"
  9685. LIBS=" $CAIROLIB $LIBS"
  9686. LDFLAGS=" $LDFLAGS"
  9687. echo $ac_n "checking for cairo_create""... $ac_c" 1>&6
  9688. echo "configure:12101: checking for cairo_create" >&5
  9689. cat > conftest.$ac_ext <<EOF
  9690. #line 12104 "configure"
  9691. #include "confdefs.h"
  9692. /* System header to define __stub macros and hopefully few prototypes,
  9693. which can conflict with char cairo_create(); below. */
  9694. #include <assert.h>
  9695. /* Override any gcc2 internal prototype to avoid an error. */
  9696. /* We use char because int might match the return type of a gcc2
  9697. builtin and then its argument prototype would still apply. */
  9698. char cairo_create();
  9699. int main() {
  9700. /* The GNU C library defines this for functions which it implements
  9701. to always fail with ENOSYS. Some functions are actually named
  9702. something starting with __ and the normal name is an alias. */
  9703. #if defined (__stub_cairo_create) || defined (__stub___cairo_create)
  9704. choke me
  9705. #else
  9706. cairo_create();
  9707. #endif
  9708. ; return 0; }
  9709. EOF
  9710. if { (eval echo configure:12127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9711. rm -rf conftest*
  9712. eval "ac_cv_func_cairo_create=yes"
  9713. else
  9714. echo "configure: failed program was:" >&5
  9715. cat conftest.$ac_ext >&5
  9716. rm -rf conftest*
  9717. eval "ac_cv_func_cairo_create=no"
  9718. fi
  9719. rm -f conftest*
  9720. if eval "test \"`echo '$ac_cv_func_'cairo_create`\" = yes"; then
  9721. echo "$ac_t""yes" 1>&6
  9722. :
  9723. else
  9724. echo "$ac_t""no" 1>&6
  9725. { echo "configure: error: *** Unable to locate cairo_create." 1>&2; exit 1; }
  9726. fi
  9727. LIBS=${ac_save_libs}
  9728. LDFLAGS=${ac_save_ldflags}
  9729. ac_save_libs="$LIBS"
  9730. ac_save_ldflags="$LDFLAGS"
  9731. LIBS=" $CAIROLIB $LIBS"
  9732. LDFLAGS=" $LDFLAGS"
  9733. echo $ac_n "checking for cairo_xlib_surface_create_with_xrender_format""... $ac_c" 1>&6
  9734. echo "configure:12161: checking for cairo_xlib_surface_create_with_xrender_format" >&5
  9735. cat > conftest.$ac_ext <<EOF
  9736. #line 12164 "configure"
  9737. #include "confdefs.h"
  9738. /* System header to define __stub macros and hopefully few prototypes,
  9739. which can conflict with char cairo_xlib_surface_create_with_xrender_format(); below. */
  9740. #include <assert.h>
  9741. /* Override any gcc2 internal prototype to avoid an error. */
  9742. /* We use char because int might match the return type of a gcc2
  9743. builtin and then its argument prototype would still apply. */
  9744. char cairo_xlib_surface_create_with_xrender_format();
  9745. int main() {
  9746. /* The GNU C library defines this for functions which it implements
  9747. to always fail with ENOSYS. Some functions are actually named
  9748. something starting with __ and the normal name is an alias. */
  9749. #if defined (__stub_cairo_xlib_surface_create_with_xrender_format) || defined (__stub___cairo_xlib_surface_create_with_xrender_format)
  9750. choke me
  9751. #else
  9752. cairo_xlib_surface_create_with_xrender_format();
  9753. #endif
  9754. ; return 0; }
  9755. EOF
  9756. if { (eval echo configure:12187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9757. rm -rf conftest*
  9758. eval "ac_cv_func_cairo_xlib_surface_create_with_xrender_format=yes"
  9759. else
  9760. echo "configure: failed program was:" >&5
  9761. cat conftest.$ac_ext >&5
  9762. rm -rf conftest*
  9763. eval "ac_cv_func_cairo_xlib_surface_create_with_xrender_format=no"
  9764. fi
  9765. rm -f conftest*
  9766. if eval "test \"`echo '$ac_cv_func_'cairo_xlib_surface_create_with_xrender_format`\" = yes"; then
  9767. echo "$ac_t""yes" 1>&6
  9768. CAIRO_HAS_XRENDER=1
  9769. else
  9770. echo "$ac_t""no" 1>&6
  9771. CAIRO_HAS_XRENDER=
  9772. fi
  9773. LIBS=${ac_save_libs}
  9774. LDFLAGS=${ac_save_ldflags}
  9775. ac_save_libs="$LIBS"
  9776. ac_save_ldflags="$LDFLAGS"
  9777. LIBS=" $CAIROLIB $LIBS"
  9778. LDFLAGS=" $LDFLAGS"
  9779. echo $ac_n "checking for cairo_xlib_surface_get_xrender_format""... $ac_c" 1>&6
  9780. echo "configure:12220: checking for cairo_xlib_surface_get_xrender_format" >&5
  9781. cat > conftest.$ac_ext <<EOF
  9782. #line 12223 "configure"
  9783. #include "confdefs.h"
  9784. /* System header to define __stub macros and hopefully few prototypes,
  9785. which can conflict with char cairo_xlib_surface_get_xrender_format(); below. */
  9786. #include <assert.h>
  9787. /* Override any gcc2 internal prototype to avoid an error. */
  9788. /* We use char because int might match the return type of a gcc2
  9789. builtin and then its argument prototype would still apply. */
  9790. char cairo_xlib_surface_get_xrender_format();
  9791. int main() {
  9792. /* The GNU C library defines this for functions which it implements
  9793. to always fail with ENOSYS. Some functions are actually named
  9794. something starting with __ and the normal name is an alias. */
  9795. #if defined (__stub_cairo_xlib_surface_get_xrender_format) || defined (__stub___cairo_xlib_surface_get_xrender_format)
  9796. choke me
  9797. #else
  9798. cairo_xlib_surface_get_xrender_format();
  9799. #endif
  9800. ; return 0; }
  9801. EOF
  9802. if { (eval echo configure:12246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9803. rm -rf conftest*
  9804. eval "ac_cv_func_cairo_xlib_surface_get_xrender_format=yes"
  9805. else
  9806. echo "configure: failed program was:" >&5
  9807. cat conftest.$ac_ext >&5
  9808. rm -rf conftest*
  9809. eval "ac_cv_func_cairo_xlib_surface_get_xrender_format=no"
  9810. fi
  9811. rm -f conftest*
  9812. if eval "test \"`echo '$ac_cv_func_'cairo_xlib_surface_get_xrender_format`\" = yes"; then
  9813. echo "$ac_t""yes" 1>&6
  9814. CAIRO_HAS_XRENDER_SURFACE=1
  9815. else
  9816. echo "$ac_t""no" 1>&6
  9817. CAIRO_HAS_XRENDER_SURFACE=
  9818. fi
  9819. LIBS=${ac_save_libs}
  9820. LDFLAGS=${ac_save_ldflags}
  9821. CAIROLIB="$CAIROLIB $CAIROLDFLAGS"
  9822. fi # $USE_CAIRO
  9823. # Done checking Cairo
  9824. # Enable FreeType option
  9825. echo $ac_n "checking whether to use FreeType""... $ac_c" 1>&6
  9826. echo "configure:12288: checking whether to use FreeType" >&5
  9827. echo "$ac_t"""$with_freetype"" 1>&6
  9828. case "$with_freetype" in
  9829. "no") USE_FREETYPE= ;;
  9830. "yes") USE_FREETYPE="1" ;;
  9831. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9832. esac
  9833. FTINC=
  9834. FTLIB=
  9835. if test -n "$USE_FREETYPE"; then
  9836. # With FreeType includes directory
  9837. echo $ac_n "checking for location of FreeType includes""... $ac_c" 1>&6
  9838. echo "configure:12307: checking for location of FreeType includes" >&5
  9839. case "$with_freetype_includes" in
  9840. y | ye | yes | n | no)
  9841. { echo "configure: error: *** You must supply a directory to --with-freetype-includes." 1>&2; exit 1; }
  9842. ;;
  9843. esac
  9844. echo "$ac_t""$with_freetype_includes" 1>&6
  9845. if test -n "$with_freetype_includes" ; then
  9846. for dir in $with_freetype_includes; do
  9847. if test -d "$dir"; then
  9848. FTINC="$FTINC -I$dir"
  9849. else
  9850. { echo "configure: error: *** FreeType includes directory $dir does not exist." 1>&2; exit 1; }
  9851. fi
  9852. done
  9853. fi
  9854. ac_save_cppflags="$CPPFLAGS"
  9855. CPPFLAGS="$FTINC $CPPFLAGS"
  9856. for ac_hdr in ft2build.h
  9857. do
  9858. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9859. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9860. echo "configure:12333: checking for $ac_hdr" >&5
  9861. cat > conftest.$ac_ext <<EOF
  9862. #line 12336 "configure"
  9863. #include "confdefs.h"
  9864. #include <$ac_hdr>
  9865. EOF
  9866. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9867. { (eval echo configure:12341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9868. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9869. if test -z "$ac_err"; then
  9870. rm -rf conftest*
  9871. eval "ac_cv_header_$ac_safe=yes"
  9872. else
  9873. echo "$ac_err" >&5
  9874. echo "configure: failed program was:" >&5
  9875. cat conftest.$ac_ext >&5
  9876. rm -rf conftest*
  9877. eval "ac_cv_header_$ac_safe=no"
  9878. fi
  9879. rm -f conftest*
  9880. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9881. echo "$ac_t""yes" 1>&6
  9882. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9883. cat >> confdefs.h <<EOF
  9884. #define $ac_tr_hdr 1
  9885. EOF
  9886. else
  9887. echo "$ac_t""no" 1>&6
  9888. { echo "configure: error: *** Unable to locate FreeType includes." 1>&2; exit 1; }
  9889. fi
  9890. done
  9891. CPPFLAGS=$ac_save_cppflags
  9892. # With FreeType library directory
  9893. echo $ac_n "checking for location of FreeType library""... $ac_c" 1>&6
  9894. echo "configure:12375: checking for location of FreeType library" >&5
  9895. case "$with_freetype_libs" in
  9896. y | ye | yes | n | no)
  9897. { echo "configure: error: *** You must supply a directory to --with-freetype-libs." 1>&2; exit 1; }
  9898. ;;
  9899. esac
  9900. echo "$ac_t""$with_freetype_libs" 1>&6
  9901. if test -n "$with_freetype_libs"; then
  9902. for dir in $with_freetype_libs; do
  9903. if test -d "$dir"; then
  9904. FTLIB="$FTLIB -L$dir"
  9905. else
  9906. { echo "configure: error: *** FreeType library directory $dir does not exist." 1>&2; exit 1; }
  9907. fi
  9908. done
  9909. fi
  9910. ac_save_ldflags="$LDFLAGS"
  9911. LDFLAGS="$FTLIB $LDFLAGS"
  9912. echo $ac_n "checking for FT_Init_FreeType in -lfreetype""... $ac_c" 1>&6
  9913. echo "configure:12400: checking for FT_Init_FreeType in -lfreetype" >&5
  9914. ac_lib_var=`echo freetype'_'FT_Init_FreeType | sed 'y%./+-%__p_%'`
  9915. ac_save_LIBS="$LIBS"
  9916. LIBS="-lfreetype $LIBS"
  9917. cat > conftest.$ac_ext <<EOF
  9918. #line 12406 "configure"
  9919. #include "confdefs.h"
  9920. /* Override any gcc2 internal prototype to avoid an error. */
  9921. /* We use char because int might match the return type of a gcc2
  9922. builtin and then its argument prototype would still apply. */
  9923. char FT_Init_FreeType();
  9924. int main() {
  9925. FT_Init_FreeType()
  9926. ; return 0; }
  9927. EOF
  9928. if { (eval echo configure:12417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9929. rm -rf conftest*
  9930. eval "ac_cv_lib_$ac_lib_var=yes"
  9931. else
  9932. echo "configure: failed program was:" >&5
  9933. cat conftest.$ac_ext >&5
  9934. rm -rf conftest*
  9935. eval "ac_cv_lib_$ac_lib_var=no"
  9936. fi
  9937. rm -f conftest*
  9938. LIBS="$ac_save_LIBS"
  9939. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9940. echo "$ac_t""yes" 1>&6
  9941. FTLIB="$FTLIB -lfreetype "
  9942. else
  9943. echo "$ac_t""no" 1>&6
  9944. LDFLAGS=${ac_save_ldflags}
  9945. { echo "configure: error: *** Unable to locate FreeType library." 1>&2; exit 1; }
  9946. fi
  9947. LDFLAGS=${ac_save_ldflags}
  9948. fi # $USE_FREETYPE
  9949. # Done checking FreeType
  9950. # Enable NLS option
  9951. echo $ac_n "checking whether to use NLS""... $ac_c" 1>&6
  9952. echo "configure:12458: checking whether to use NLS" >&5
  9953. echo "$ac_t"""$with_nls"" 1>&6
  9954. case "$with_nls" in
  9955. "no") USE_NLS= ;;
  9956. "yes") USE_NLS="1" ;;
  9957. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9958. esac
  9959. INTLLIB=
  9960. HAVE_NLS=
  9961. if test -n "${USE_NLS}" ; then
  9962. cat >> confdefs.h <<\EOF
  9963. #define USE_NLS 1
  9964. EOF
  9965. echo $ac_n "checking for gettext""... $ac_c" 1>&6
  9966. echo "configure:12478: checking for gettext" >&5
  9967. cat > conftest.$ac_ext <<EOF
  9968. #line 12481 "configure"
  9969. #include "confdefs.h"
  9970. /* System header to define __stub macros and hopefully few prototypes,
  9971. which can conflict with char gettext(); below. */
  9972. #include <assert.h>
  9973. /* Override any gcc2 internal prototype to avoid an error. */
  9974. /* We use char because int might match the return type of a gcc2
  9975. builtin and then its argument prototype would still apply. */
  9976. char gettext();
  9977. int main() {
  9978. /* The GNU C library defines this for functions which it implements
  9979. to always fail with ENOSYS. Some functions are actually named
  9980. something starting with __ and the normal name is an alias. */
  9981. #if defined (__stub_gettext) || defined (__stub___gettext)
  9982. choke me
  9983. #else
  9984. gettext();
  9985. #endif
  9986. ; return 0; }
  9987. EOF
  9988. if { (eval echo configure:12504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9989. rm -rf conftest*
  9990. eval "ac_cv_func_gettext=yes"
  9991. else
  9992. echo "configure: failed program was:" >&5
  9993. cat conftest.$ac_ext >&5
  9994. rm -rf conftest*
  9995. eval "ac_cv_func_gettext=no"
  9996. fi
  9997. rm -f conftest*
  9998. if eval "test \"`echo '$ac_cv_func_'gettext`\" = yes"; then
  9999. echo "$ac_t""yes" 1>&6
  10000. INTLLIB=
  10001. else
  10002. echo "$ac_t""no" 1>&6
  10003. echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
  10004. echo "configure:12522: checking for gettext in -lintl" >&5
  10005. ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
  10006. ac_save_LIBS="$LIBS"
  10007. LIBS="-lintl $LIBS"
  10008. cat > conftest.$ac_ext <<EOF
  10009. #line 12528 "configure"
  10010. #include "confdefs.h"
  10011. /* Override any gcc2 internal prototype to avoid an error. */
  10012. /* We use char because int might match the return type of a gcc2
  10013. builtin and then its argument prototype would still apply. */
  10014. char gettext();
  10015. int main() {
  10016. gettext()
  10017. ; return 0; }
  10018. EOF
  10019. if { (eval echo configure:12539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10020. rm -rf conftest*
  10021. eval "ac_cv_lib_$ac_lib_var=yes"
  10022. else
  10023. echo "configure: failed program was:" >&5
  10024. cat conftest.$ac_ext >&5
  10025. rm -rf conftest*
  10026. eval "ac_cv_lib_$ac_lib_var=no"
  10027. fi
  10028. rm -f conftest*
  10029. LIBS="$ac_save_LIBS"
  10030. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10031. echo "$ac_t""yes" 1>&6
  10032. INTLLIB=-lintl
  10033. else
  10034. echo "$ac_t""no" 1>&6
  10035. { echo "configure: error: *** Unable to locate gettext() function." 1>&2; exit 1; }
  10036. fi
  10037. fi
  10038. HAVE_NLS=1
  10039. fi
  10040. # Enable C++ option
  10041. echo $ac_n "checking whether to use C++""... $ac_c" 1>&6
  10042. echo "configure:12574: checking whether to use C++" >&5
  10043. echo "$ac_t"""$with_cxx"" 1>&6
  10044. case "$with_cxx" in
  10045. "no") USE_CXX= ;;
  10046. "yes") USE_CXX="1" ;;
  10047. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10048. esac
  10049. if test -n "$USE_CXX"; then
  10050. for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
  10051. do
  10052. # Extract the first word of "$ac_prog", so it can be a program name with args.
  10053. set dummy $ac_prog; ac_word=$2
  10054. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  10055. echo "configure:12590: checking for $ac_word" >&5
  10056. if test -n "$CXX"; then
  10057. ac_cv_prog_CXX="$CXX" # Let the user override the test.
  10058. else
  10059. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  10060. ac_dummy="$PATH"
  10061. for ac_dir in $ac_dummy; do
  10062. test -z "$ac_dir" && ac_dir=.
  10063. if test -f $ac_dir/$ac_word; then
  10064. ac_cv_prog_CXX="$ac_prog"
  10065. break
  10066. fi
  10067. done
  10068. IFS="$ac_save_ifs"
  10069. fi
  10070. CXX="$ac_cv_prog_CXX"
  10071. if test -n "$CXX"; then
  10072. echo "$ac_t""$CXX" 1>&6
  10073. else
  10074. echo "$ac_t""no" 1>&6
  10075. fi
  10076. test -n "$CXX" && break
  10077. done
  10078. test -n "$CXX" || CXX="gcc"
  10079. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  10080. echo "configure:12619: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
  10081. ac_ext=C
  10082. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  10083. ac_cpp='$CXXCPP $CPPFLAGS'
  10084. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  10085. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  10086. cross_compiling=$ac_cv_prog_cxx_cross
  10087. cat > conftest.$ac_ext << EOF
  10088. #line 12630 "configure"
  10089. #include "confdefs.h"
  10090. int main(){return(0);}
  10091. EOF
  10092. if { (eval echo configure:12635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10093. ac_cv_prog_cxx_works=yes
  10094. # If we can't run a trivial program, we are probably using a cross compiler.
  10095. if (./conftest; exit) 2>/dev/null; then
  10096. ac_cv_prog_cxx_cross=no
  10097. else
  10098. ac_cv_prog_cxx_cross=yes
  10099. fi
  10100. else
  10101. echo "configure: failed program was:" >&5
  10102. cat conftest.$ac_ext >&5
  10103. ac_cv_prog_cxx_works=no
  10104. fi
  10105. rm -fr conftest*
  10106. ac_ext=c
  10107. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  10108. ac_cpp='$CPP $CPPFLAGS'
  10109. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  10110. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  10111. cross_compiling=$ac_cv_prog_cc_cross
  10112. echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
  10113. if test $ac_cv_prog_cxx_works = no; then
  10114. { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
  10115. fi
  10116. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  10117. echo "configure:12661: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
  10118. echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
  10119. cross_compiling=$ac_cv_prog_cxx_cross
  10120. echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
  10121. echo "configure:12666: checking whether we are using GNU C++" >&5
  10122. cat > conftest.C <<EOF
  10123. #ifdef __GNUC__
  10124. yes;
  10125. #endif
  10126. EOF
  10127. if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:12673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  10128. ac_cv_prog_gxx=yes
  10129. else
  10130. ac_cv_prog_gxx=no
  10131. fi
  10132. echo "$ac_t""$ac_cv_prog_gxx" 1>&6
  10133. if test $ac_cv_prog_gxx = yes; then
  10134. GXX=yes
  10135. else
  10136. GXX=
  10137. fi
  10138. ac_test_CXXFLAGS="${CXXFLAGS+set}"
  10139. ac_save_CXXFLAGS="$CXXFLAGS"
  10140. CXXFLAGS=
  10141. echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
  10142. echo "configure:12691: checking whether ${CXX-g++} accepts -g" >&5
  10143. echo 'void f(){}' > conftest.cc
  10144. if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  10145. ac_cv_prog_cxx_g=yes
  10146. else
  10147. ac_cv_prog_cxx_g=no
  10148. fi
  10149. rm -f conftest*
  10150. echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
  10151. if test "$ac_test_CXXFLAGS" = set; then
  10152. CXXFLAGS="$ac_save_CXXFLAGS"
  10153. elif test $ac_cv_prog_cxx_g = yes; then
  10154. if test "$GXX" = yes; then
  10155. CXXFLAGS="-g -O2"
  10156. else
  10157. CXXFLAGS="-g"
  10158. fi
  10159. else
  10160. if test "$GXX" = yes; then
  10161. CXXFLAGS="-O2"
  10162. else
  10163. CXXFLAGS=
  10164. fi
  10165. fi
  10166. for ac_declaration in \
  10167. ''\
  10168. '#include <stdlib.h>' \
  10169. 'extern "C" void std::exit (int) throw (); using std::exit;' \
  10170. 'extern "C" void std::exit (int); using std::exit;' \
  10171. 'extern "C" void exit (int) throw ();' \
  10172. 'extern "C" void exit (int);' \
  10173. 'void exit (int);'
  10174. do
  10175. cat > conftest.$ac_ext <<EOF
  10176. #line 12729 "configure"
  10177. #include "confdefs.h"
  10178. #include <stdlib.h>
  10179. $ac_declaration
  10180. int main() {
  10181. exit (42);
  10182. ; return 0; }
  10183. EOF
  10184. if { (eval echo configure:12737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10185. :
  10186. else
  10187. echo "configure: failed program was:" >&5
  10188. cat conftest.$ac_ext >&5
  10189. rm -rf conftest*
  10190. continue
  10191. fi
  10192. rm -f conftest*
  10193. cat > conftest.$ac_ext <<EOF
  10194. #line 12747 "configure"
  10195. #include "confdefs.h"
  10196. $ac_declaration
  10197. int main() {
  10198. exit (42);
  10199. ; return 0; }
  10200. EOF
  10201. if { (eval echo configure:12754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10202. rm -rf conftest*
  10203. break
  10204. else
  10205. echo "configure: failed program was:" >&5
  10206. cat conftest.$ac_ext >&5
  10207. fi
  10208. rm -f conftest*
  10209. done
  10210. if test -n "$ac_declaration"; then
  10211. echo '#ifdef __cplusplus' >>confdefs.h
  10212. echo $ac_declaration >>confdefs.h
  10213. echo '#endif' >>confdefs.h
  10214. fi
  10215. else
  10216. CXX=
  10217. CXXFLAGS=
  10218. fi
  10219. # Done checking C++
  10220. # Enable openDWG option
  10221. echo $ac_n "checking whether to use openDWG""... $ac_c" 1>&6
  10222. echo "configure:12783: checking whether to use openDWG" >&5
  10223. echo "$ac_t"""$with_opendwg"" 1>&6
  10224. case "$with_opendwg" in
  10225. "no") USE_OPENDWG= ;;
  10226. "yes") USE_OPENDWG="1" ;;
  10227. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10228. esac
  10229. OPENDWGINCPATH=
  10230. OPENDWGLIBPATH=
  10231. OPENDWGLIB=
  10232. if test -n "${USE_OPENDWG}"; then
  10233. # With OPENDWG includes directory
  10234. echo $ac_n "checking for location of openDGW includes""... $ac_c" 1>&6
  10235. echo "configure:12803: checking for location of openDGW includes" >&5
  10236. case "$with_opendwg_includes" in
  10237. y | ye | yes | n | no)
  10238. { echo "configure: error: *** You must supply a directory to --with-opendwg-includes." 1>&2; exit 1; }
  10239. ;;
  10240. esac
  10241. echo "$ac_t""$with_opendwg_includes" 1>&6
  10242. if test -n "$with_opendwg_includes" ; then
  10243. for dir in $with_opendwg_includes; do
  10244. if test -d "$dir"; then
  10245. OPENDWGINCPATH="$OPENDWGINCPATH -I$dir"
  10246. else
  10247. { echo "configure: error: *** openDGW includes directory $dir does not exist." 1>&2; exit 1; }
  10248. fi
  10249. done
  10250. fi
  10251. ac_save_cppflags="$CPPFLAGS"
  10252. CPPFLAGS="$OPENDWGINCPATH $CPPFLAGS"
  10253. for ac_hdr in ad2.h
  10254. do
  10255. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10256. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10257. echo "configure:12829: checking for $ac_hdr" >&5
  10258. cat > conftest.$ac_ext <<EOF
  10259. #line 12832 "configure"
  10260. #include "confdefs.h"
  10261. #include <$ac_hdr>
  10262. EOF
  10263. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10264. { (eval echo configure:12837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10265. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10266. if test -z "$ac_err"; then
  10267. rm -rf conftest*
  10268. eval "ac_cv_header_$ac_safe=yes"
  10269. else
  10270. echo "$ac_err" >&5
  10271. echo "configure: failed program was:" >&5
  10272. cat conftest.$ac_ext >&5
  10273. rm -rf conftest*
  10274. eval "ac_cv_header_$ac_safe=no"
  10275. fi
  10276. rm -f conftest*
  10277. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10278. echo "$ac_t""yes" 1>&6
  10279. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10280. cat >> confdefs.h <<EOF
  10281. #define $ac_tr_hdr 1
  10282. EOF
  10283. else
  10284. echo "$ac_t""no" 1>&6
  10285. { echo "configure: error: *** Unable to locate openDWG includes." 1>&2; exit 1; }
  10286. fi
  10287. done
  10288. CPPFLAGS=$ac_save_cppflags
  10289. # With OPENDWG library directory
  10290. echo $ac_n "checking for location of openDWG library""... $ac_c" 1>&6
  10291. echo "configure:12871: checking for location of openDWG library" >&5
  10292. case "$with_opendwg_libs" in
  10293. y | ye | yes | n | no)
  10294. { echo "configure: error: *** You must supply a directory to --with-opendwg-libs." 1>&2; exit 1; }
  10295. ;;
  10296. esac
  10297. echo "$ac_t""$with_opendwg_libs" 1>&6
  10298. if test -n "$with_opendwg_libs"; then
  10299. for dir in $with_opendwg_libs; do
  10300. if test -d "$dir"; then
  10301. OPENDWGLIBPATH="$OPENDWGLIBPATH -L$dir"
  10302. else
  10303. { echo "configure: error: *** openDWG library directory $dir does not exist." 1>&2; exit 1; }
  10304. fi
  10305. done
  10306. fi
  10307. #search for ad2.a, ad3.a ... in openDWG toolkit directory:
  10308. #FIX ME how to program this test??
  10309. #LOC_CHECK_LIBS(ad?.a,adSeekLayer,openDWG,$OPENDWGLIBPATH,OPENDWGLIB,,)
  10310. #
  10311. #for now hack (but working):
  10312. TRUEOPENDWGLIBPATH=`echo "$OPENDWGLIBPATH" | cut -b3-`
  10313. adlib=`ls -1 "$TRUEOPENDWGLIBPATH"/ad?.a | tail -1`
  10314. OPENDWGLIB="$adlib"
  10315. fi # $USE_OPENDWG
  10316. # Done checking OPENDWG
  10317. # Enable pthread option
  10318. echo $ac_n "checking whether to use POSIX threads""... $ac_c" 1>&6
  10319. echo "configure:12912: checking whether to use POSIX threads" >&5
  10320. echo "$ac_t"""$with_pthread"" 1>&6
  10321. case "$with_pthread" in
  10322. "no") USE_PTHREAD= ;;
  10323. "yes") USE_PTHREAD="1" ;;
  10324. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10325. esac
  10326. PTHREADINCPATH=
  10327. PTHREADLIBPATH=
  10328. PTHREADLIB=
  10329. if test -n "$USE_PTHREAD"; then
  10330. # With pthread includes directory
  10331. echo $ac_n "checking for location of POSIX threads includes""... $ac_c" 1>&6
  10332. echo "configure:12932: checking for location of POSIX threads includes" >&5
  10333. case "$with_pthread_includes" in
  10334. y | ye | yes | n | no)
  10335. { echo "configure: error: *** You must supply a directory to --with-pthread-includes." 1>&2; exit 1; }
  10336. ;;
  10337. esac
  10338. echo "$ac_t""$with_pthread_includes" 1>&6
  10339. if test -n "$with_pthread_includes" ; then
  10340. for dir in $with_pthread_includes; do
  10341. if test -d "$dir"; then
  10342. PTHREADINCPATH="$PTHREADINCPATH -I$dir"
  10343. else
  10344. { echo "configure: error: *** POSIX threads includes directory $dir does not exist." 1>&2; exit 1; }
  10345. fi
  10346. done
  10347. fi
  10348. ac_save_cppflags="$CPPFLAGS"
  10349. CPPFLAGS="$PTHREADINCPATH $CPPFLAGS"
  10350. for ac_hdr in pthread.h
  10351. do
  10352. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10353. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10354. echo "configure:12958: checking for $ac_hdr" >&5
  10355. cat > conftest.$ac_ext <<EOF
  10356. #line 12961 "configure"
  10357. #include "confdefs.h"
  10358. #include <$ac_hdr>
  10359. EOF
  10360. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10361. { (eval echo configure:12966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10362. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10363. if test -z "$ac_err"; then
  10364. rm -rf conftest*
  10365. eval "ac_cv_header_$ac_safe=yes"
  10366. else
  10367. echo "$ac_err" >&5
  10368. echo "configure: failed program was:" >&5
  10369. cat conftest.$ac_ext >&5
  10370. rm -rf conftest*
  10371. eval "ac_cv_header_$ac_safe=no"
  10372. fi
  10373. rm -f conftest*
  10374. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10375. echo "$ac_t""yes" 1>&6
  10376. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10377. cat >> confdefs.h <<EOF
  10378. #define $ac_tr_hdr 1
  10379. EOF
  10380. else
  10381. echo "$ac_t""no" 1>&6
  10382. { echo "configure: error: *** Unable to locate POSIX threads includes." 1>&2; exit 1; }
  10383. fi
  10384. done
  10385. CPPFLAGS=$ac_save_cppflags
  10386. # With pthread library directory
  10387. echo $ac_n "checking for location of POSIX threads library""... $ac_c" 1>&6
  10388. echo "configure:13000: checking for location of POSIX threads library" >&5
  10389. case "$with_pthread_libs" in
  10390. y | ye | yes | n | no)
  10391. { echo "configure: error: *** You must supply a directory to --with-pthread-libs." 1>&2; exit 1; }
  10392. ;;
  10393. esac
  10394. echo "$ac_t""$with_pthread_libs" 1>&6
  10395. if test -n "$with_pthread_libs"; then
  10396. for dir in $with_pthread_libs; do
  10397. if test -d "$dir"; then
  10398. PTHREADLIBPATH="$PTHREADLIBPATH -L$dir"
  10399. else
  10400. { echo "configure: error: *** POSIX threads library directory $dir does not exist." 1>&2; exit 1; }
  10401. fi
  10402. done
  10403. fi
  10404. ac_save_libs="$LIBS"
  10405. ac_save_ldflags="$LDFLAGS"
  10406. LIBS=" $LIBS"
  10407. LDFLAGS=" $LDFLAGS"
  10408. echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
  10409. echo "configure:13025: checking for pthread_create" >&5
  10410. cat > conftest.$ac_ext <<EOF
  10411. #line 13028 "configure"
  10412. #include "confdefs.h"
  10413. /* System header to define __stub macros and hopefully few prototypes,
  10414. which can conflict with char pthread_create(); below. */
  10415. #include <assert.h>
  10416. /* Override any gcc2 internal prototype to avoid an error. */
  10417. /* We use char because int might match the return type of a gcc2
  10418. builtin and then its argument prototype would still apply. */
  10419. char pthread_create();
  10420. int main() {
  10421. /* The GNU C library defines this for functions which it implements
  10422. to always fail with ENOSYS. Some functions are actually named
  10423. something starting with __ and the normal name is an alias. */
  10424. #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
  10425. choke me
  10426. #else
  10427. pthread_create();
  10428. #endif
  10429. ; return 0; }
  10430. EOF
  10431. if { (eval echo configure:13051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10432. rm -rf conftest*
  10433. eval "ac_cv_func_pthread_create=yes"
  10434. else
  10435. echo "configure: failed program was:" >&5
  10436. cat conftest.$ac_ext >&5
  10437. rm -rf conftest*
  10438. eval "ac_cv_func_pthread_create=no"
  10439. fi
  10440. rm -f conftest*
  10441. if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
  10442. echo "$ac_t""yes" 1>&6
  10443. PTHREADLIB="$PTHREADLIB "
  10444. else
  10445. echo "$ac_t""no" 1>&6
  10446. ac_save_ldflags="$LDFLAGS"
  10447. LDFLAGS="$PTHREADLIBPATH $LDFLAGS"
  10448. echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
  10449. echo "configure:13078: checking for pthread_create in -lpthread" >&5
  10450. ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
  10451. ac_save_LIBS="$LIBS"
  10452. LIBS="-lpthread $LIBS"
  10453. cat > conftest.$ac_ext <<EOF
  10454. #line 13084 "configure"
  10455. #include "confdefs.h"
  10456. /* Override any gcc2 internal prototype to avoid an error. */
  10457. /* We use char because int might match the return type of a gcc2
  10458. builtin and then its argument prototype would still apply. */
  10459. char pthread_create();
  10460. int main() {
  10461. pthread_create()
  10462. ; return 0; }
  10463. EOF
  10464. if { (eval echo configure:13095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10465. rm -rf conftest*
  10466. eval "ac_cv_lib_$ac_lib_var=yes"
  10467. else
  10468. echo "configure: failed program was:" >&5
  10469. cat conftest.$ac_ext >&5
  10470. rm -rf conftest*
  10471. eval "ac_cv_lib_$ac_lib_var=no"
  10472. fi
  10473. rm -f conftest*
  10474. LIBS="$ac_save_LIBS"
  10475. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10476. echo "$ac_t""yes" 1>&6
  10477. PTHREADLIB="$PTHREADLIB -lpthread "
  10478. else
  10479. echo "$ac_t""no" 1>&6
  10480. LDFLAGS=${ac_save_ldflags}
  10481. { echo "configure: error: *** Unable to locate POSIX threads library." 1>&2; exit 1; }
  10482. fi
  10483. LDFLAGS=${ac_save_ldflags}
  10484. fi
  10485. LIBS=${ac_save_libs}
  10486. LDFLAGS=${ac_save_ldflags}
  10487. fi # $USE_PTHREAD
  10488. # Done checking pthread
  10489. # Enable OpenMP option
  10490. echo $ac_n "checking whether to use OpenMP""... $ac_c" 1>&6
  10491. echo "configure:13145: checking whether to use OpenMP" >&5
  10492. echo "$ac_t"""$with_openmp"" 1>&6
  10493. case "$with_openmp" in
  10494. "no") USE_OPENMP= ;;
  10495. "yes") USE_OPENMP="1" ;;
  10496. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10497. esac
  10498. OMPINCPATH=
  10499. OMPLIBPATH=
  10500. OMPLIB=
  10501. OMPCFLAGS=
  10502. if test -n "$USE_OPENMP"; then
  10503. # With OpenMP includes directory
  10504. echo $ac_n "checking for location of OpenMP includes""... $ac_c" 1>&6
  10505. echo "configure:13166: checking for location of OpenMP includes" >&5
  10506. case "$with_openmp_includes" in
  10507. y | ye | yes | n | no)
  10508. { echo "configure: error: *** You must supply a directory to --with-openmp-includes." 1>&2; exit 1; }
  10509. ;;
  10510. esac
  10511. echo "$ac_t""$with_openmp_includes" 1>&6
  10512. if test -n "$with_openmp_includes" ; then
  10513. for dir in $with_openmp_includes; do
  10514. if test -d "$dir"; then
  10515. OMPINCPATH="$OMPINCPATH -I$dir"
  10516. else
  10517. { echo "configure: error: *** OpenMP includes directory $dir does not exist." 1>&2; exit 1; }
  10518. fi
  10519. done
  10520. fi
  10521. ac_save_cppflags="$CPPFLAGS"
  10522. CPPFLAGS="$OMPINCPATH $CPPFLAGS"
  10523. for ac_hdr in omp.h
  10524. do
  10525. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10526. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10527. echo "configure:13192: checking for $ac_hdr" >&5
  10528. cat > conftest.$ac_ext <<EOF
  10529. #line 13195 "configure"
  10530. #include "confdefs.h"
  10531. #include <$ac_hdr>
  10532. EOF
  10533. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10534. { (eval echo configure:13200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10535. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10536. if test -z "$ac_err"; then
  10537. rm -rf conftest*
  10538. eval "ac_cv_header_$ac_safe=yes"
  10539. else
  10540. echo "$ac_err" >&5
  10541. echo "configure: failed program was:" >&5
  10542. cat conftest.$ac_ext >&5
  10543. rm -rf conftest*
  10544. eval "ac_cv_header_$ac_safe=no"
  10545. fi
  10546. rm -f conftest*
  10547. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10548. echo "$ac_t""yes" 1>&6
  10549. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10550. cat >> confdefs.h <<EOF
  10551. #define $ac_tr_hdr 1
  10552. EOF
  10553. else
  10554. echo "$ac_t""no" 1>&6
  10555. { echo "configure: error: *** Unable to locate OpenMP includes." 1>&2; exit 1; }
  10556. fi
  10557. done
  10558. CPPFLAGS=$ac_save_cppflags
  10559. # With OpenMP library directory
  10560. # GCC et al.: -lgomp
  10561. # Solaris cc: -lmtsk
  10562. # AIX xlc: -lxlsmp
  10563. # SGI IRIX 6.5 MIPSpro C/C++: -lmp
  10564. echo $ac_n "checking for location of OpenMP library""... $ac_c" 1>&6
  10565. echo "configure:13238: checking for location of OpenMP library" >&5
  10566. case "$with_openmp_libs" in
  10567. y | ye | yes | n | no)
  10568. { echo "configure: error: *** You must supply a directory to --with-openmp-libs." 1>&2; exit 1; }
  10569. ;;
  10570. esac
  10571. echo "$ac_t""$with_openmp_libs" 1>&6
  10572. if test -n "$with_openmp_libs"; then
  10573. for dir in $with_openmp_libs; do
  10574. if test -d "$dir"; then
  10575. OMPLIBPATH="$OMPLIBPATH -L$dir"
  10576. else
  10577. { echo "configure: error: *** OpenMP library directory $dir does not exist." 1>&2; exit 1; }
  10578. fi
  10579. done
  10580. fi
  10581. ac_save_libs="$LIBS"
  10582. ac_save_ldflags="$LDFLAGS"
  10583. LIBS=" $LIBS"
  10584. LDFLAGS=" $LDFLAGS"
  10585. echo $ac_n "checking for GOMP_parallel_start""... $ac_c" 1>&6
  10586. echo "configure:13263: checking for GOMP_parallel_start" >&5
  10587. cat > conftest.$ac_ext <<EOF
  10588. #line 13266 "configure"
  10589. #include "confdefs.h"
  10590. /* System header to define __stub macros and hopefully few prototypes,
  10591. which can conflict with char GOMP_parallel_start(); below. */
  10592. #include <assert.h>
  10593. /* Override any gcc2 internal prototype to avoid an error. */
  10594. /* We use char because int might match the return type of a gcc2
  10595. builtin and then its argument prototype would still apply. */
  10596. char GOMP_parallel_start();
  10597. int main() {
  10598. /* The GNU C library defines this for functions which it implements
  10599. to always fail with ENOSYS. Some functions are actually named
  10600. something starting with __ and the normal name is an alias. */
  10601. #if defined (__stub_GOMP_parallel_start) || defined (__stub___GOMP_parallel_start)
  10602. choke me
  10603. #else
  10604. GOMP_parallel_start();
  10605. #endif
  10606. ; return 0; }
  10607. EOF
  10608. if { (eval echo configure:13289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10609. rm -rf conftest*
  10610. eval "ac_cv_func_GOMP_parallel_start=yes"
  10611. else
  10612. echo "configure: failed program was:" >&5
  10613. cat conftest.$ac_ext >&5
  10614. rm -rf conftest*
  10615. eval "ac_cv_func_GOMP_parallel_start=no"
  10616. fi
  10617. rm -f conftest*
  10618. if eval "test \"`echo '$ac_cv_func_'GOMP_parallel_start`\" = yes"; then
  10619. echo "$ac_t""yes" 1>&6
  10620. OMPLIB="$OMPLIB "
  10621. else
  10622. echo "$ac_t""no" 1>&6
  10623. ac_save_ldflags="$LDFLAGS"
  10624. LDFLAGS="$OMPLIBPATH $LDFLAGS"
  10625. echo $ac_n "checking for GOMP_parallel_start in -lgomp""... $ac_c" 1>&6
  10626. echo "configure:13316: checking for GOMP_parallel_start in -lgomp" >&5
  10627. ac_lib_var=`echo gomp'_'GOMP_parallel_start | sed 'y%./+-%__p_%'`
  10628. ac_save_LIBS="$LIBS"
  10629. LIBS="-lgomp $LIBS"
  10630. cat > conftest.$ac_ext <<EOF
  10631. #line 13322 "configure"
  10632. #include "confdefs.h"
  10633. /* Override any gcc2 internal prototype to avoid an error. */
  10634. /* We use char because int might match the return type of a gcc2
  10635. builtin and then its argument prototype would still apply. */
  10636. char GOMP_parallel_start();
  10637. int main() {
  10638. GOMP_parallel_start()
  10639. ; return 0; }
  10640. EOF
  10641. if { (eval echo configure:13333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10642. rm -rf conftest*
  10643. eval "ac_cv_lib_$ac_lib_var=yes"
  10644. else
  10645. echo "configure: failed program was:" >&5
  10646. cat conftest.$ac_ext >&5
  10647. rm -rf conftest*
  10648. eval "ac_cv_lib_$ac_lib_var=no"
  10649. fi
  10650. rm -f conftest*
  10651. LIBS="$ac_save_LIBS"
  10652. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10653. echo "$ac_t""yes" 1>&6
  10654. OMPLIB="$OMPLIB -lgomp "
  10655. else
  10656. echo "$ac_t""no" 1>&6
  10657. LDFLAGS=${ac_save_ldflags}
  10658. { echo "configure: error: *** Unable to locate OpenMP library." 1>&2; exit 1; }
  10659. fi
  10660. LDFLAGS=${ac_save_ldflags}
  10661. fi
  10662. LIBS=${ac_save_libs}
  10663. LDFLAGS=${ac_save_ldflags}
  10664. # compiler dependent
  10665. #if test ${CC} = "gcc" ; then
  10666. if test x$GCC = xyes ; then
  10667. # GNU C compiler (>= 4.2.1)
  10668. OMPCFLAGS=-fopenmp
  10669. elif test ${CC} = "icc" ; then
  10670. # Intel compiler
  10671. OMPCFLAGS=-openmp
  10672. elif test ${CC} = "opencc" ; then
  10673. # AMD's x86 Open64 compiler
  10674. OMPCFLAGS=-mp
  10675. elif test ${CC} = "pgcc" ; then
  10676. # Portland Group's compiler
  10677. OMPCFLAGS=-mp
  10678. # ... anybody else?
  10679. fi
  10680. # try to build a test program with "$CC $OMPCLFAGS" to confirm it works
  10681. #...how?
  10682. #echo "int main() {return 0;}" > test.c
  10683. #$CC $OMPCLFAGS test.c -o test
  10684. fi # $USE_OPENMP
  10685. # Done checking OpenMP
  10686. # Enable OpenCL option
  10687. echo $ac_n "checking whether to use OpenCL""... $ac_c" 1>&6
  10688. echo "configure:13406: checking whether to use OpenCL" >&5
  10689. echo "$ac_t"""$with_opencl"" 1>&6
  10690. case "$with_opencl" in
  10691. "no") USE_OPENCL= ;;
  10692. "yes") USE_OPENCL="1" ;;
  10693. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10694. esac
  10695. OCLINCPATH=
  10696. OCLLIBPATH=
  10697. OCLLIB=
  10698. if test -n "$USE_OPENCL"; then
  10699. # With OpenCL includes directory
  10700. echo $ac_n "checking for location of OpenCL includes""... $ac_c" 1>&6
  10701. echo "configure:13426: checking for location of OpenCL includes" >&5
  10702. case "$with_opencl_includes" in
  10703. y | ye | yes | n | no)
  10704. { echo "configure: error: *** You must supply a directory to --with-opencl-includes." 1>&2; exit 1; }
  10705. ;;
  10706. esac
  10707. echo "$ac_t""$with_opencl_includes" 1>&6
  10708. if test -n "$with_opencl_includes" ; then
  10709. for dir in $with_opencl_includes; do
  10710. if test -d "$dir"; then
  10711. OCLINCPATH="$OCLINCPATH -I$dir"
  10712. else
  10713. { echo "configure: error: *** OpenCL includes directory $dir does not exist." 1>&2; exit 1; }
  10714. fi
  10715. done
  10716. fi
  10717. if test -n "$MACOSX_APP" ; then
  10718. ac_save_cppflags="$CPPFLAGS"
  10719. CPPFLAGS="$OCLINCPATH $CPPFLAGS"
  10720. for ac_hdr in OpenCL/opencl.h
  10721. do
  10722. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10723. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10724. echo "configure:13453: checking for $ac_hdr" >&5
  10725. cat > conftest.$ac_ext <<EOF
  10726. #line 13456 "configure"
  10727. #include "confdefs.h"
  10728. #include <$ac_hdr>
  10729. EOF
  10730. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10731. { (eval echo configure:13461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10732. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10733. if test -z "$ac_err"; then
  10734. rm -rf conftest*
  10735. eval "ac_cv_header_$ac_safe=yes"
  10736. else
  10737. echo "$ac_err" >&5
  10738. echo "configure: failed program was:" >&5
  10739. cat conftest.$ac_ext >&5
  10740. rm -rf conftest*
  10741. eval "ac_cv_header_$ac_safe=no"
  10742. fi
  10743. rm -f conftest*
  10744. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10745. echo "$ac_t""yes" 1>&6
  10746. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10747. cat >> confdefs.h <<EOF
  10748. #define $ac_tr_hdr 1
  10749. EOF
  10750. else
  10751. echo "$ac_t""no" 1>&6
  10752. { echo "configure: error: *** Unable to locate OpenCL includes." 1>&2; exit 1; }
  10753. fi
  10754. done
  10755. CPPFLAGS=$ac_save_cppflags
  10756. # With OpenCL library directory
  10757. ### FIXME: ###
  10758. #LOC_CHECK_FRAMEWORK_PATH(opencl,OpenCL,OPENCLPATH)
  10759. # last term in following would become ',$OPENCLPATH)' if above is uncommented
  10760. ac_save_libs="$LIBS"
  10761. ac_save_ldflags="$LDFLAGS"
  10762. LIBS="-framework OpenCL $LIBS"
  10763. LDFLAGS=" $LDFLAGS"
  10764. echo $ac_n "checking for clGetPlatformInfo""... $ac_c" 1>&6
  10765. echo "configure:13501: checking for clGetPlatformInfo" >&5
  10766. cat > conftest.$ac_ext <<EOF
  10767. #line 13504 "configure"
  10768. #include "confdefs.h"
  10769. /* System header to define __stub macros and hopefully few prototypes,
  10770. which can conflict with char clGetPlatformInfo(); below. */
  10771. #include <assert.h>
  10772. /* Override any gcc2 internal prototype to avoid an error. */
  10773. /* We use char because int might match the return type of a gcc2
  10774. builtin and then its argument prototype would still apply. */
  10775. char clGetPlatformInfo();
  10776. int main() {
  10777. /* The GNU C library defines this for functions which it implements
  10778. to always fail with ENOSYS. Some functions are actually named
  10779. something starting with __ and the normal name is an alias. */
  10780. #if defined (__stub_clGetPlatformInfo) || defined (__stub___clGetPlatformInfo)
  10781. choke me
  10782. #else
  10783. clGetPlatformInfo();
  10784. #endif
  10785. ; return 0; }
  10786. EOF
  10787. if { (eval echo configure:13527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10788. rm -rf conftest*
  10789. eval "ac_cv_func_clGetPlatformInfo=yes"
  10790. else
  10791. echo "configure: failed program was:" >&5
  10792. cat conftest.$ac_ext >&5
  10793. rm -rf conftest*
  10794. eval "ac_cv_func_clGetPlatformInfo=no"
  10795. fi
  10796. rm -f conftest*
  10797. if eval "test \"`echo '$ac_cv_func_'clGetPlatformInfo`\" = yes"; then
  10798. echo "$ac_t""yes" 1>&6
  10799. OCLLIB="$OCLLIB -framework OpenCL"
  10800. else
  10801. echo "$ac_t""no" 1>&6
  10802. { echo "configure: error: *** Unable to locate OpenCL library." 1>&2; exit 1; }
  10803. fi
  10804. LIBS=${ac_save_libs}
  10805. LDFLAGS=${ac_save_ldflags}
  10806. else
  10807. ac_save_cppflags="$CPPFLAGS"
  10808. CPPFLAGS="$OCLINCPATH $CPPFLAGS"
  10809. for ac_hdr in CL/cl.h
  10810. do
  10811. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10812. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10813. echo "configure:13566: checking for $ac_hdr" >&5
  10814. cat > conftest.$ac_ext <<EOF
  10815. #line 13569 "configure"
  10816. #include "confdefs.h"
  10817. #include <$ac_hdr>
  10818. EOF
  10819. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10820. { (eval echo configure:13574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10821. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10822. if test -z "$ac_err"; then
  10823. rm -rf conftest*
  10824. eval "ac_cv_header_$ac_safe=yes"
  10825. else
  10826. echo "$ac_err" >&5
  10827. echo "configure: failed program was:" >&5
  10828. cat conftest.$ac_ext >&5
  10829. rm -rf conftest*
  10830. eval "ac_cv_header_$ac_safe=no"
  10831. fi
  10832. rm -f conftest*
  10833. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10834. echo "$ac_t""yes" 1>&6
  10835. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10836. cat >> confdefs.h <<EOF
  10837. #define $ac_tr_hdr 1
  10838. EOF
  10839. else
  10840. echo "$ac_t""no" 1>&6
  10841. { echo "configure: error: *** Unable to locate OpenCL includes." 1>&2; exit 1; }
  10842. fi
  10843. done
  10844. CPPFLAGS=$ac_save_cppflags
  10845. # With OpenCL library directory
  10846. echo $ac_n "checking for location of OpenCL library""... $ac_c" 1>&6
  10847. echo "configure:13607: checking for location of OpenCL library" >&5
  10848. case "$with_opencl_libs" in
  10849. y | ye | yes | n | no)
  10850. { echo "configure: error: *** You must supply a directory to --with-opencl-libs." 1>&2; exit 1; }
  10851. ;;
  10852. esac
  10853. echo "$ac_t""$with_opencl_libs" 1>&6
  10854. if test -n "$with_opencl_libs"; then
  10855. for dir in $with_opencl_libs; do
  10856. if test -d "$dir"; then
  10857. OCLLIBPATH="$OCLLIBPATH -L$dir"
  10858. else
  10859. { echo "configure: error: *** OpenCL library directory $dir does not exist." 1>&2; exit 1; }
  10860. fi
  10861. done
  10862. fi
  10863. ac_save_ldflags="$LDFLAGS"
  10864. LDFLAGS="$OCLLIBPATH $LDFLAGS"
  10865. echo $ac_n "checking for clGetPlatformInfo in -lOpenCL""... $ac_c" 1>&6
  10866. echo "configure:13631: checking for clGetPlatformInfo in -lOpenCL" >&5
  10867. ac_lib_var=`echo OpenCL'_'clGetPlatformInfo | sed 'y%./+-%__p_%'`
  10868. ac_save_LIBS="$LIBS"
  10869. LIBS="-lOpenCL $LIBS"
  10870. cat > conftest.$ac_ext <<EOF
  10871. #line 13637 "configure"
  10872. #include "confdefs.h"
  10873. /* Override any gcc2 internal prototype to avoid an error. */
  10874. /* We use char because int might match the return type of a gcc2
  10875. builtin and then its argument prototype would still apply. */
  10876. char clGetPlatformInfo();
  10877. int main() {
  10878. clGetPlatformInfo()
  10879. ; return 0; }
  10880. EOF
  10881. if { (eval echo configure:13648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10882. rm -rf conftest*
  10883. eval "ac_cv_lib_$ac_lib_var=yes"
  10884. else
  10885. echo "configure: failed program was:" >&5
  10886. cat conftest.$ac_ext >&5
  10887. rm -rf conftest*
  10888. eval "ac_cv_lib_$ac_lib_var=no"
  10889. fi
  10890. rm -f conftest*
  10891. LIBS="$ac_save_LIBS"
  10892. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10893. echo "$ac_t""yes" 1>&6
  10894. OCLLIB="$OCLLIB -lOpenCL "
  10895. else
  10896. echo "$ac_t""no" 1>&6
  10897. LDFLAGS=${ac_save_ldflags}
  10898. { echo "configure: error: *** Unable to locate OpenCL library." 1>&2; exit 1; }
  10899. fi
  10900. LDFLAGS=${ac_save_ldflags}
  10901. # expanded symbol check: yes? no?
  10902. #LOC_CHECK_FUNC(clGetPlatformInfo,OpenCL functions,OCLLIB,,,,,[
  10903. #LOC_CHECK_LIBS(OpenCL,clGetPlatformInfo,OpenCL,$OCLLIBPATH,OCLLIB,,,)
  10904. #])
  10905. fi
  10906. fi # $USE_OPENCL
  10907. # Done checking OpenCL
  10908. # Enable LFS (from cdr-tools, tar, and autoconf 2.68)
  10909. # Check whether --enable-largefile or --disable-largefile was given.
  10910. if test "${enable_largefile+set}" = set; then
  10911. enableval="$enable_largefile"
  10912. :
  10913. fi
  10914. LFS_CFLAGS=
  10915. if test "$enable_largefile" != no; then
  10916. ac_save_cflags=$CFLAGS
  10917. if test "`which getconf 2>&5`" ; then
  10918. LFS_CFLAGS=`getconf LFS_CFLAGS 2>&5`
  10919. CFLAGS="$LFS_CFLAGS $ac_save_cflags"
  10920. fi
  10921. echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6
  10922. echo "configure:13708: checking for special C compiler options needed for large files" >&5
  10923. ac_cv_sys_largefile_CC=no
  10924. largefile_cc_opt=""
  10925. if test "$GCC" != yes; then
  10926. # IRIX 6.2 and later do not support large files by default,
  10927. # so use the C compiler's -n32 option if that helps.
  10928. cat > conftest.$ac_ext <<EOF
  10929. #line 13716 "configure"
  10930. #include "confdefs.h"
  10931. #include <sys/types.h>
  10932. /* Check that off_t can represent 2**63 - 1 correctly.
  10933. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  10934. since some C++ compilers masquerading as C compilers
  10935. incorrectly reject 9223372036854775807. */
  10936. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  10937. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  10938. && LARGE_OFF_T % 2147483647 == 1)
  10939. ? 1 : -1];
  10940. int main() {
  10941. ; return 0; }
  10942. EOF
  10943. if { (eval echo configure:13732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10944. :
  10945. else
  10946. echo "configure: failed program was:" >&5
  10947. cat conftest.$ac_ext >&5
  10948. rm -rf conftest*
  10949. ac_save_CC="${CC-cc}"
  10950. CC="$CC -n32"
  10951. cat > conftest.$ac_ext <<EOF
  10952. #line 13741 "configure"
  10953. #include "confdefs.h"
  10954. #include <sys/types.h>
  10955. /* Check that off_t can represent 2**63 - 1 correctly.
  10956. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  10957. since some C++ compilers masquerading as C compilers
  10958. incorrectly reject 9223372036854775807. */
  10959. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  10960. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  10961. && LARGE_OFF_T % 2147483647 == 1)
  10962. ? 1 : -1];
  10963. int main() {
  10964. ; return 0; }
  10965. EOF
  10966. if { (eval echo configure:13757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10967. rm -rf conftest*
  10968. ac_cv_sys_largefile_CC=' -n32'
  10969. else
  10970. echo "configure: failed program was:" >&5
  10971. cat conftest.$ac_ext >&5
  10972. fi
  10973. rm -f conftest*
  10974. CC="$ac_save_CC"
  10975. fi
  10976. rm -f conftest*
  10977. fi
  10978. echo "$ac_t""$ac_cv_sys_largefile_CC" 1>&6
  10979. if test "$ac_cv_sys_largefile_CC" != no; then
  10980. CC="$CC$ac_cv_sys_largefile_CC"
  10981. largefile_cc_opt="$ac_cv_sys_largefile_CC"
  10982. if test "$LFS_CFLAGS" ; then
  10983. LFS_CFLAGS="$LFS_CFLAGS $ac_cv_sys_largefile_CC"
  10984. else
  10985. LFS_CFLAGS="$ac_cv_sys_largefile_CC"
  10986. CFLAGS="$LFS_CFLAGS $ac_save_cflags"
  10987. fi
  10988. fi
  10989. echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6
  10990. echo "configure:13784: checking for _FILE_OFFSET_BITS value needed for large files" >&5
  10991. ac_cv_sys_file_offset_bits=no
  10992. cat > conftest.$ac_ext <<EOF
  10993. #line 13788 "configure"
  10994. #include "confdefs.h"
  10995. #include <sys/types.h>
  10996. /* Check that off_t can represent 2**63 - 1 correctly.
  10997. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  10998. since some C++ compilers masquerading as C compilers
  10999. incorrectly reject 9223372036854775807. */
  11000. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11001. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11002. && LARGE_OFF_T % 2147483647 == 1)
  11003. ? 1 : -1];
  11004. int main() {
  11005. ; return 0; }
  11006. EOF
  11007. if { (eval echo configure:13804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11008. :
  11009. else
  11010. echo "configure: failed program was:" >&5
  11011. cat conftest.$ac_ext >&5
  11012. rm -rf conftest*
  11013. cat > conftest.$ac_ext <<EOF
  11014. #line 13811 "configure"
  11015. #include "confdefs.h"
  11016. #define _FILE_OFFSET_BITS 64
  11017. #include <sys/types.h>
  11018. /* Check that off_t can represent 2**63 - 1 correctly.
  11019. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11020. since some C++ compilers masquerading as C compilers
  11021. incorrectly reject 9223372036854775807. */
  11022. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11023. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11024. && LARGE_OFF_T % 2147483647 == 1)
  11025. ? 1 : -1];
  11026. int main() {
  11027. ; return 0; }
  11028. EOF
  11029. if { (eval echo configure:13829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11030. rm -rf conftest*
  11031. ac_cv_sys_file_offset_bits=64
  11032. else
  11033. echo "configure: failed program was:" >&5
  11034. cat conftest.$ac_ext >&5
  11035. fi
  11036. rm -f conftest*
  11037. fi
  11038. rm -f conftest*
  11039. echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
  11040. if test "$ac_cv_sys_file_offset_bits" != no; then
  11041. cat >> confdefs.h <<EOF
  11042. #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
  11043. EOF
  11044. if test "$LFS_CFLAGS" ; then
  11045. LFS_CFLAGS="$LFS_CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
  11046. else
  11047. LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
  11048. fi
  11049. fi
  11050. echo $ac_n "checking for _LARGE_FILES value needed for large files""... $ac_c" 1>&6
  11051. echo "configure:13855: checking for _LARGE_FILES value needed for large files" >&5
  11052. ac_cv_sys_large_files=no
  11053. cat > conftest.$ac_ext <<EOF
  11054. #line 13859 "configure"
  11055. #include "confdefs.h"
  11056. #include <sys/types.h>
  11057. /* Check that off_t can represent 2**63 - 1 correctly.
  11058. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11059. since some C++ compilers masquerading as C compilers
  11060. incorrectly reject 9223372036854775807. */
  11061. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11062. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11063. && LARGE_OFF_T % 2147483647 == 1)
  11064. ? 1 : -1];
  11065. int main() {
  11066. ; return 0; }
  11067. EOF
  11068. if { (eval echo configure:13875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11069. :
  11070. else
  11071. echo "configure: failed program was:" >&5
  11072. cat conftest.$ac_ext >&5
  11073. rm -rf conftest*
  11074. cat > conftest.$ac_ext <<EOF
  11075. #line 13882 "configure"
  11076. #include "confdefs.h"
  11077. #define _LARGE_FILES 1
  11078. #include <sys/types.h>
  11079. /* Check that off_t can represent 2**63 - 1 correctly.
  11080. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11081. since some C++ compilers masquerading as C compilers
  11082. incorrectly reject 9223372036854775807. */
  11083. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11084. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11085. && LARGE_OFF_T % 2147483647 == 1)
  11086. ? 1 : -1];
  11087. int main() {
  11088. ; return 0; }
  11089. EOF
  11090. if { (eval echo configure:13900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11091. rm -rf conftest*
  11092. ac_cv_sys_large_files=1
  11093. else
  11094. echo "configure: failed program was:" >&5
  11095. cat conftest.$ac_ext >&5
  11096. fi
  11097. rm -f conftest*
  11098. fi
  11099. rm -f conftest*
  11100. echo "$ac_t""$ac_cv_sys_large_files" 1>&6
  11101. if test "$ac_cv_sys_large_files" != no; then
  11102. cat >> confdefs.h <<EOF
  11103. #define _LARGE_FILES $ac_cv_sys_large_files
  11104. EOF
  11105. if test "$LFS_CFLAGS" ; then
  11106. LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files"
  11107. else
  11108. LFS_CFLAGS="-D_LARGE_FILES=$ac_cv_sys_large_files"
  11109. fi
  11110. fi
  11111. echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
  11112. echo "configure:13926: checking for _LARGEFILE_SOURCE value needed for large files" >&5
  11113. ac_cv_sys_largefile_source=no
  11114. cat > conftest.$ac_ext <<EOF
  11115. #line 13930 "configure"
  11116. #include "confdefs.h"
  11117. #include <stdio.h>
  11118. int main() {
  11119. return !fseeko;
  11120. ; return 0; }
  11121. EOF
  11122. if { (eval echo configure:13937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11123. :
  11124. else
  11125. echo "configure: failed program was:" >&5
  11126. cat conftest.$ac_ext >&5
  11127. rm -rf conftest*
  11128. cat > conftest.$ac_ext <<EOF
  11129. #line 13944 "configure"
  11130. #include "confdefs.h"
  11131. #define _LARGEFILE_SOURCE 1
  11132. #include <stdio.h>
  11133. int main() {
  11134. return !fseeko;
  11135. ; return 0; }
  11136. EOF
  11137. if { (eval echo configure:13953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11138. rm -rf conftest*
  11139. ac_cv_sys_largefile_source=1
  11140. else
  11141. echo "configure: failed program was:" >&5
  11142. cat conftest.$ac_ext >&5
  11143. fi
  11144. rm -f conftest*
  11145. fi
  11146. rm -f conftest*
  11147. echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
  11148. if test "$ac_cv_sys_largefile_source" != no; then
  11149. cat >> confdefs.h <<EOF
  11150. #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
  11151. EOF
  11152. if test "$LFS_CFLAGS" ; then
  11153. LFS_CFLAGS="$LFS_CFLAGS -D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
  11154. else
  11155. LFS_CFLAGS="-D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
  11156. fi
  11157. fi
  11158. CFLAGS=$ac_save_cflags
  11159. fi
  11160. ac_save_cflags=${CFLAGS}
  11161. CFLAGS="$LFS_CFLAGS ${ac_save_cflags}"
  11162. echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
  11163. echo "configure:13985: checking for _LARGEFILE_SOURCE value needed for large files" >&5
  11164. ac_cv_sys_largefile_source=no
  11165. cat > conftest.$ac_ext <<EOF
  11166. #line 13989 "configure"
  11167. #include "confdefs.h"
  11168. #include <stdio.h>
  11169. int main() {
  11170. return !fseeko;
  11171. ; return 0; }
  11172. EOF
  11173. if { (eval echo configure:13996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11174. :
  11175. else
  11176. echo "configure: failed program was:" >&5
  11177. cat conftest.$ac_ext >&5
  11178. rm -rf conftest*
  11179. cat > conftest.$ac_ext <<EOF
  11180. #line 14003 "configure"
  11181. #include "confdefs.h"
  11182. #define _LARGEFILE_SOURCE 1
  11183. #include <stdio.h>
  11184. int main() {
  11185. return !fseeko;
  11186. ; return 0; }
  11187. EOF
  11188. if { (eval echo configure:14012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11189. rm -rf conftest*
  11190. ac_cv_sys_largefile_source=1
  11191. else
  11192. echo "configure: failed program was:" >&5
  11193. cat conftest.$ac_ext >&5
  11194. fi
  11195. rm -f conftest*
  11196. fi
  11197. rm -f conftest*
  11198. echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
  11199. if test "$ac_cv_sys_largefile_source" != no; then
  11200. cat >> confdefs.h <<EOF
  11201. #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
  11202. EOF
  11203. if test "$LFS_CFLAGS" ; then
  11204. LFS_CFLAGS="$LFS_CFLAGS -D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
  11205. else
  11206. LFS_CFLAGS="-D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
  11207. fi
  11208. fi
  11209. # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
  11210. # in glibc 2.1.3, but that breaks too many other things.
  11211. # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
  11212. echo $ac_n "checking for fseeko""... $ac_c" 1>&6
  11213. echo "configure:14042: checking for fseeko" >&5
  11214. ac_cv_func_fseeko=no
  11215. cat > conftest.$ac_ext <<EOF
  11216. #line 14046 "configure"
  11217. #include "confdefs.h"
  11218. #include <stdio.h>
  11219. int main() {
  11220. return fseeko && fseeko (stdin, 0, 0);
  11221. ; return 0; }
  11222. EOF
  11223. if { (eval echo configure:14053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11224. rm -rf conftest*
  11225. ac_cv_func_fseeko=yes
  11226. else
  11227. echo "configure: failed program was:" >&5
  11228. cat conftest.$ac_ext >&5
  11229. fi
  11230. rm -f conftest*
  11231. echo "$ac_t""$ac_cv_func_fseeko" 1>&6
  11232. if test $ac_cv_func_fseeko != no; then
  11233. cat >> confdefs.h <<\EOF
  11234. #define HAVE_FSEEKO 1
  11235. EOF
  11236. fi
  11237. echo $ac_n "checking if system supports Large Files at all""... $ac_c" 1>&6
  11238. echo "configure:14070: checking if system supports Large Files at all" >&5
  11239. cat > conftest.$ac_ext <<EOF
  11240. #line 14073 "configure"
  11241. #include "confdefs.h"
  11242. #include <stdio.h>
  11243. #include <sys/types.h>
  11244. int main() {
  11245. /*
  11246. * Check that off_t can represent 2**63 - 1 correctly.
  11247. * We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11248. * since some C++ compilers masquerading as C compilers
  11249. * incorrectly reject 9223372036854775807.
  11250. *
  11251. * For MinGW, off64_t should be used and __MSVCRT_VERSION__ >= 0x0601
  11252. * (msvcrt.dll version 6.10 or higher) is needed for _fstat64 and _stat64.
  11253. */
  11254. #ifdef __MINGW32__
  11255. # define LARGE_OFF_T (((off64_t) 1 << 62) - 1 + ((off64_t) 1 << 62))
  11256. #else
  11257. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11258. #endif
  11259. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11260. && LARGE_OFF_T % 2147483647 == 1)
  11261. ? 1 : -1];
  11262. #ifdef __MINGW32__
  11263. return !fseeko64;
  11264. return !ftello64;
  11265. #else
  11266. return !fseeko;
  11267. return !ftello;
  11268. #endif
  11269. ; return 0; }
  11270. EOF
  11271. if { (eval echo configure:14105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11272. rm -rf conftest*
  11273. ac_cv_largefiles=yes
  11274. else
  11275. echo "configure: failed program was:" >&5
  11276. cat conftest.$ac_ext >&5
  11277. rm -rf conftest*
  11278. ac_cv_largefiles=no
  11279. fi
  11280. rm -f conftest*
  11281. echo "$ac_t""$ac_cv_largefiles" 1>&6
  11282. if test $ac_cv_largefiles = yes; then
  11283. cat >> confdefs.h <<\EOF
  11284. #define HAVE_LARGEFILES 1
  11285. EOF
  11286. USE_LARGEFILES=1
  11287. else
  11288. USE_LARGEFILES=
  11289. LFS_CFLAGS=
  11290. fi
  11291. CFLAGS=${ac_save_cflags}
  11292. # Done large file support
  11293. USE_TERMIO=
  11294. STRIPFLAG=
  11295. GRASS_HOME="${DSTDIR}"
  11296. trap '' 1 2 15
  11297. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  11298. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  11299. # Let make expand exec_prefix.
  11300. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  11301. # Any assignment to VPATH causes Sun make to only execute
  11302. # the first set of double-colon rules, so remove it if not needed.
  11303. # If there is a colon in the path, we need to keep it.
  11304. if test "x$srcdir" = x.; then
  11305. ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
  11306. fi
  11307. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  11308. DEFS=-DHAVE_CONFIG_H
  11309. # Without the "./", some shells look in PATH for config.status.
  11310. : ${CONFIG_STATUS=./config.status}
  11311. echo creating $CONFIG_STATUS
  11312. rm -f $CONFIG_STATUS
  11313. cat > $CONFIG_STATUS <<EOF
  11314. #! /bin/sh
  11315. # Generated automatically by configure.
  11316. # Run this file to recreate the current configuration.
  11317. # This directory was configured as follows,
  11318. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  11319. #
  11320. # $0 $ac_configure_args
  11321. #
  11322. # Compiler output produced by configure, useful for debugging
  11323. # configure, is in ./config.log if it exists.
  11324. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  11325. for ac_option
  11326. do
  11327. case "\$ac_option" in
  11328. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  11329. echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  11330. exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  11331. -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  11332. echo "$CONFIG_STATUS generated by autoconf version 2.13"
  11333. exit 0 ;;
  11334. -help | --help | --hel | --he | --h)
  11335. echo "\$ac_cs_usage"; exit 0 ;;
  11336. *) echo "\$ac_cs_usage"; exit 1 ;;
  11337. esac
  11338. done
  11339. ac_given_srcdir=$srcdir
  11340. ac_given_INSTALL="$INSTALL"
  11341. trap 'rm -fr `echo "include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex include/version.h grass.pc include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  11342. EOF
  11343. cat >> $CONFIG_STATUS <<EOF
  11344. # Protect against being on the right side of a sed subst in config.status.
  11345. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  11346. s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  11347. $ac_vpsub
  11348. $extrasub
  11349. s%@SHELL@%$SHELL%g
  11350. s%@CFLAGS@%$CFLAGS%g
  11351. s%@CPPFLAGS@%$CPPFLAGS%g
  11352. s%@CXXFLAGS@%$CXXFLAGS%g
  11353. s%@FFLAGS@%$FFLAGS%g
  11354. s%@DEFS@%$DEFS%g
  11355. s%@LDFLAGS@%$LDFLAGS%g
  11356. s%@LIBS@%$LIBS%g
  11357. s%@exec_prefix@%$exec_prefix%g
  11358. s%@prefix@%$prefix%g
  11359. s%@program_transform_name@%$program_transform_name%g
  11360. s%@bindir@%$bindir%g
  11361. s%@sbindir@%$sbindir%g
  11362. s%@libexecdir@%$libexecdir%g
  11363. s%@datadir@%$datadir%g
  11364. s%@sysconfdir@%$sysconfdir%g
  11365. s%@sharedstatedir@%$sharedstatedir%g
  11366. s%@localstatedir@%$localstatedir%g
  11367. s%@libdir@%$libdir%g
  11368. s%@includedir@%$includedir%g
  11369. s%@oldincludedir@%$oldincludedir%g
  11370. s%@infodir@%$infodir%g
  11371. s%@mandir@%$mandir%g
  11372. s%@host@%$host%g
  11373. s%@host_alias@%$host_alias%g
  11374. s%@host_cpu@%$host_cpu%g
  11375. s%@host_vendor@%$host_vendor%g
  11376. s%@host_os@%$host_os%g
  11377. s%@CC@%$CC%g
  11378. s%@EXEEXT@%$EXEEXT%g
  11379. s%@MINGW32@%$MINGW32%g
  11380. s%@BINDIR@%$BINDIR%g
  11381. s%@pwd@%$pwd%g
  11382. s%@SRCDIR@%$SRCDIR%g
  11383. s%@DSTDIR@%$DSTDIR%g
  11384. s%@ARCH@%$ARCH%g
  11385. s%@GISBASE@%$GISBASE%g
  11386. s%@GRASS_BIN@%$GRASS_BIN%g
  11387. s%@SVN_VERSION@%$SVN_VERSION%g
  11388. s%@GRASS_VERSION_FILE@%$GRASS_VERSION_FILE%g
  11389. s%@GRASS_VERSION_MAJOR@%$GRASS_VERSION_MAJOR%g
  11390. s%@GRASS_VERSION_MINOR@%$GRASS_VERSION_MINOR%g
  11391. s%@GRASS_VERSION_RELEASE@%$GRASS_VERSION_RELEASE%g
  11392. s%@GRASS_VERSION_NUMBER@%$GRASS_VERSION_NUMBER%g
  11393. s%@GRASS_VERSION_DATE@%$GRASS_VERSION_DATE%g
  11394. s%@GRASS_VERSION_SVN@%$GRASS_VERSION_SVN%g
  11395. s%@NAME_VER@%$NAME_VER%g
  11396. s%@LIB_VER@%$LIB_VER%g
  11397. s%@MACOSX_APP@%$MACOSX_APP%g
  11398. s%@MACOSX_ARCHS@%$MACOSX_ARCHS%g
  11399. s%@MACOSX_SDK@%$MACOSX_SDK%g
  11400. s%@INSTDIR@%$INSTDIR%g
  11401. s%@GRASS_LIBRARY_TYPE@%$GRASS_LIBRARY_TYPE%g
  11402. s%@LD_SEARCH_FLAGS@%$LD_SEARCH_FLAGS%g
  11403. s%@LD_LIBRARY_PATH_VAR@%$LD_LIBRARY_PATH_VAR%g
  11404. s%@SHLIB_LD@%$SHLIB_LD%g
  11405. s%@SHLIB_LD_FLAGS@%$SHLIB_LD_FLAGS%g
  11406. s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
  11407. s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
  11408. s%@STLIB_LD@%$STLIB_LD%g
  11409. s%@STLIB_SUFFIX@%$STLIB_SUFFIX%g
  11410. s%@INCLUDE_DIRS@%$INCLUDE_DIRS%g
  11411. s%@LIBRARY_DIRS@%$LIBRARY_DIRS%g
  11412. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  11413. s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
  11414. s%@INSTALL_DATA@%$INSTALL_DATA%g
  11415. s%@LEX@%$LEX%g
  11416. s%@LEXLIB@%$LEXLIB%g
  11417. s%@LEXPATH@%$LEXPATH%g
  11418. s%@YACC@%$YACC%g
  11419. s%@YACCPATH@%$YACCPATH%g
  11420. s%@RANLIB@%$RANLIB%g
  11421. s%@AR@%$AR%g
  11422. s%@ENV@%$ENV%g
  11423. s%@PERL@%$PERL%g
  11424. s%@CPP@%$CPP%g
  11425. s%@CROSS_COMPILING@%$CROSS_COMPILING%g
  11426. s%@X_CFLAGS@%$X_CFLAGS%g
  11427. s%@X_LIBS@%$X_LIBS%g
  11428. s%@X_PRE_LIBS@%$X_PRE_LIBS%g
  11429. s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
  11430. s%@XLIB@%$XLIB%g
  11431. s%@XTLIB@%$XTLIB%g
  11432. s%@USE_X11@%$USE_X11%g
  11433. s%@DBMIEXTRALIB@%$DBMIEXTRALIB%g
  11434. s%@HAVE_ASPRINTF@%$HAVE_ASPRINTF%g
  11435. s%@MATHLIB@%$MATHLIB%g
  11436. s%@DLLIB@%$DLLIB%g
  11437. s%@ICONVLIB@%$ICONVLIB%g
  11438. s%@SOCKLIB@%$SOCKLIB%g
  11439. s%@HAVE_SOCKET@%$HAVE_SOCKET%g
  11440. s%@ZLIBINCPATH@%$ZLIBINCPATH%g
  11441. s%@ZLIBLIBPATH@%$ZLIBLIBPATH%g
  11442. s%@ZLIB@%$ZLIB%g
  11443. s%@BZIP2INCPATH@%$BZIP2INCPATH%g
  11444. s%@BZIP2LIBPATH@%$BZIP2LIBPATH%g
  11445. s%@BZIP2LIB@%$BZIP2LIB%g
  11446. s%@ZSTDINCPATH@%$ZSTDINCPATH%g
  11447. s%@ZSTDLIBPATH@%$ZSTDLIBPATH%g
  11448. s%@ZSTDLIB@%$ZSTDLIB%g
  11449. s%@PROJINC@%$PROJINC%g
  11450. s%@PROJLIB@%$PROJLIB%g
  11451. s%@PROJSHARE@%$PROJSHARE%g
  11452. s%@NAD2BIN@%$NAD2BIN%g
  11453. s%@REGEXINCPATH@%$REGEXINCPATH%g
  11454. s%@REGEXLIBPATH@%$REGEXLIBPATH%g
  11455. s%@REGEXLIB@%$REGEXLIB%g
  11456. s%@USE_REGEX@%$USE_REGEX%g
  11457. s%@READLINEINCPATH@%$READLINEINCPATH%g
  11458. s%@READLINELIBPATH@%$READLINELIBPATH%g
  11459. s%@READLINELIB@%$READLINELIB%g
  11460. s%@HISTORYLIB@%$HISTORYLIB%g
  11461. s%@GDAL_CONFIG@%$GDAL_CONFIG%g
  11462. s%@GDAL_LIBS@%$GDAL_LIBS%g
  11463. s%@GDAL_CFLAGS@%$GDAL_CFLAGS%g
  11464. s%@USE_GDAL@%$USE_GDAL%g
  11465. s%@USE_OGR@%$USE_OGR%g
  11466. s%@LIBLAS_CONFIG@%$LIBLAS_CONFIG%g
  11467. s%@LIBLAS_LIBS@%$LIBLAS_LIBS%g
  11468. s%@LIBLAS_CFLAGS@%$LIBLAS_CFLAGS%g
  11469. s%@LIBLAS_INC@%$LIBLAS_INC%g
  11470. s%@USE_LIBLAS@%$USE_LIBLAS%g
  11471. s%@PDAL_CONFIG@%$PDAL_CONFIG%g
  11472. s%@PDAL_LIBS@%$PDAL_LIBS%g
  11473. s%@PDAL_CPPFLAGS@%$PDAL_CPPFLAGS%g
  11474. s%@PDAL_INC@%$PDAL_INC%g
  11475. s%@USE_PDAL@%$USE_PDAL%g
  11476. s%@NETCDF_CONFIG@%$NETCDF_CONFIG%g
  11477. s%@NETCDF_LIBS@%$NETCDF_LIBS%g
  11478. s%@NETCDF_CFLAGS@%$NETCDF_CFLAGS%g
  11479. s%@USE_NETCDF@%$USE_NETCDF%g
  11480. s%@GEOS_CONFIG@%$GEOS_CONFIG%g
  11481. s%@GEOS_LIBS@%$GEOS_LIBS%g
  11482. s%@GEOS_CFLAGS@%$GEOS_CFLAGS%g
  11483. s%@USE_GEOS@%$USE_GEOS%g
  11484. s%@TIFF_INCLUDE_DIRS@%$TIFF_INCLUDE_DIRS%g
  11485. s%@TIFF_LIBRARY_DIRS@%$TIFF_LIBRARY_DIRS%g
  11486. s%@TIFFLIB@%$TIFFLIB%g
  11487. s%@PNGINC@%$PNGINC%g
  11488. s%@PNGLIB@%$PNGLIB%g
  11489. s%@USE_PNG@%$USE_PNG%g
  11490. s%@USE_POSTGRES@%$USE_POSTGRES%g
  11491. s%@PQINCPATH@%$PQINCPATH%g
  11492. s%@PQLIBPATH@%$PQLIBPATH%g
  11493. s%@PQLIB@%$PQLIB%g
  11494. s%@MYSQLD_CONFIG@%$MYSQLD_CONFIG%g
  11495. s%@USE_MYSQL@%$USE_MYSQL%g
  11496. s%@MYSQLINCPATH@%$MYSQLINCPATH%g
  11497. s%@MYSQLLIBPATH@%$MYSQLLIBPATH%g
  11498. s%@MYSQLLIB@%$MYSQLLIB%g
  11499. s%@MYSQLDLIB@%$MYSQLDLIB%g
  11500. s%@USE_SQLITE@%$USE_SQLITE%g
  11501. s%@SQLITEINCPATH@%$SQLITEINCPATH%g
  11502. s%@SQLITELIBPATH@%$SQLITELIBPATH%g
  11503. s%@SQLITELIB@%$SQLITELIB%g
  11504. s%@USE_OPENGL@%$USE_OPENGL%g
  11505. s%@OPENGL_X11@%$OPENGL_X11%g
  11506. s%@OPENGL_AQUA@%$OPENGL_AQUA%g
  11507. s%@OPENGL_WINDOWS@%$OPENGL_WINDOWS%g
  11508. s%@OPENGLINC@%$OPENGLINC%g
  11509. s%@OPENGLLIB@%$OPENGLLIB%g
  11510. s%@OPENGLULIB@%$OPENGLULIB%g
  11511. s%@ODBCINC@%$ODBCINC%g
  11512. s%@ODBCLIB@%$ODBCLIB%g
  11513. s%@FFTWINC@%$FFTWINC%g
  11514. s%@FFTWLIB@%$FFTWLIB%g
  11515. s%@BLASLIB@%$BLASLIB%g
  11516. s%@BLASINC@%$BLASINC%g
  11517. s%@LAPACKLIB@%$LAPACKLIB%g
  11518. s%@LAPACKINC@%$LAPACKINC%g
  11519. s%@CAIRO_HAS_XRENDER@%$CAIRO_HAS_XRENDER%g
  11520. s%@CAIRO_HAS_XRENDER_SURFACE@%$CAIRO_HAS_XRENDER_SURFACE%g
  11521. s%@CAIROINC@%$CAIROINC%g
  11522. s%@CAIROLIB@%$CAIROLIB%g
  11523. s%@USE_CAIRO@%$USE_CAIRO%g
  11524. s%@FTINC@%$FTINC%g
  11525. s%@FTLIB@%$FTLIB%g
  11526. s%@INTLLIB@%$INTLLIB%g
  11527. s%@HAVE_NLS@%$HAVE_NLS%g
  11528. s%@CXX@%$CXX%g
  11529. s%@OPENDWGINCPATH@%$OPENDWGINCPATH%g
  11530. s%@OPENDWGLIBPATH@%$OPENDWGLIBPATH%g
  11531. s%@OPENDWGLIB@%$OPENDWGLIB%g
  11532. s%@USE_OPENDWG@%$USE_OPENDWG%g
  11533. s%@PTHREADINCPATH@%$PTHREADINCPATH%g
  11534. s%@PTHREADLIBPATH@%$PTHREADLIBPATH%g
  11535. s%@PTHREADLIB@%$PTHREADLIB%g
  11536. s%@USE_PTHREAD@%$USE_PTHREAD%g
  11537. s%@OMPINCPATH@%$OMPINCPATH%g
  11538. s%@OMPLIBPATH@%$OMPLIBPATH%g
  11539. s%@OMPLIB@%$OMPLIB%g
  11540. s%@OMPCFLAGS@%$OMPCFLAGS%g
  11541. s%@USE_OPENMP@%$USE_OPENMP%g
  11542. s%@OCLINCPATH@%$OCLINCPATH%g
  11543. s%@OCLLIBPATH@%$OCLLIBPATH%g
  11544. s%@OCLLIB@%$OCLLIB%g
  11545. s%@USE_OPENCL@%$USE_OPENCL%g
  11546. s%@USE_LARGEFILES@%$USE_LARGEFILES%g
  11547. s%@LFS_CFLAGS@%$LFS_CFLAGS%g
  11548. s%@USE_TERMIO@%$USE_TERMIO%g
  11549. s%@STRIPFLAG@%$STRIPFLAG%g
  11550. s%@GRASS_HOME@%$GRASS_HOME%g
  11551. CEOF
  11552. EOF
  11553. cat >> $CONFIG_STATUS <<\EOF
  11554. # Split the substitutions into bite-sized pieces for seds with
  11555. # small command number limits, like on Digital OSF/1 and HP-UX.
  11556. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  11557. ac_file=1 # Number of current file.
  11558. ac_beg=1 # First line for current file.
  11559. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  11560. ac_more_lines=:
  11561. ac_sed_cmds=""
  11562. while $ac_more_lines; do
  11563. if test $ac_beg -gt 1; then
  11564. sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  11565. else
  11566. sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  11567. fi
  11568. if test ! -s conftest.s$ac_file; then
  11569. ac_more_lines=false
  11570. rm -f conftest.s$ac_file
  11571. else
  11572. if test -z "$ac_sed_cmds"; then
  11573. ac_sed_cmds="sed -f conftest.s$ac_file"
  11574. else
  11575. ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  11576. fi
  11577. ac_file=`expr $ac_file + 1`
  11578. ac_beg=$ac_end
  11579. ac_end=`expr $ac_end + $ac_max_sed_cmds`
  11580. fi
  11581. done
  11582. if test -z "$ac_sed_cmds"; then
  11583. ac_sed_cmds=cat
  11584. fi
  11585. EOF
  11586. cat >> $CONFIG_STATUS <<EOF
  11587. CONFIG_FILES=\${CONFIG_FILES-"include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex include/version.h grass.pc"}
  11588. EOF
  11589. cat >> $CONFIG_STATUS <<\EOF
  11590. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  11591. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  11592. case "$ac_file" in
  11593. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  11594. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  11595. *) ac_file_in="${ac_file}.in" ;;
  11596. esac
  11597. # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  11598. # Remove last slash and all that follows it. Not all systems have dirname.
  11599. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  11600. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  11601. # The file is in a subdirectory.
  11602. test ! -d "$ac_dir" && mkdir "$ac_dir"
  11603. ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  11604. # A "../" for each directory in $ac_dir_suffix.
  11605. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  11606. else
  11607. ac_dir_suffix= ac_dots=
  11608. fi
  11609. case "$ac_given_srcdir" in
  11610. .) srcdir=.
  11611. if test -z "$ac_dots"; then top_srcdir=.
  11612. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  11613. /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  11614. *) # Relative path.
  11615. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  11616. top_srcdir="$ac_dots$ac_given_srcdir" ;;
  11617. esac
  11618. case "$ac_given_INSTALL" in
  11619. [/$]*) INSTALL="$ac_given_INSTALL" ;;
  11620. *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  11621. esac
  11622. echo creating "$ac_file"
  11623. rm -f "$ac_file"
  11624. configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  11625. case "$ac_file" in
  11626. *Makefile*) ac_comsub="1i\\
  11627. # $configure_input" ;;
  11628. *) ac_comsub= ;;
  11629. esac
  11630. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  11631. sed -e "$ac_comsub
  11632. s%@configure_input@%$configure_input%g
  11633. s%@srcdir@%$srcdir%g
  11634. s%@top_srcdir@%$top_srcdir%g
  11635. s%@INSTALL@%$INSTALL%g
  11636. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  11637. fi; done
  11638. rm -f conftest.s*
  11639. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  11640. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  11641. #
  11642. # ac_d sets the value in "#define NAME VALUE" lines.
  11643. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
  11644. ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
  11645. ac_dC='\3'
  11646. ac_dD='%g'
  11647. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  11648. ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  11649. ac_uB='\([ ]\)%\1#\2define\3'
  11650. ac_uC=' '
  11651. ac_uD='\4%g'
  11652. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  11653. ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  11654. ac_eB='$%\1#\2define\3'
  11655. ac_eC=' '
  11656. ac_eD='%g'
  11657. if test "${CONFIG_HEADERS+set}" != set; then
  11658. EOF
  11659. cat >> $CONFIG_STATUS <<EOF
  11660. CONFIG_HEADERS="include/config.h"
  11661. EOF
  11662. cat >> $CONFIG_STATUS <<\EOF
  11663. fi
  11664. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  11665. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  11666. case "$ac_file" in
  11667. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  11668. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  11669. *) ac_file_in="${ac_file}.in" ;;
  11670. esac
  11671. echo creating $ac_file
  11672. rm -f conftest.frag conftest.in conftest.out
  11673. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  11674. cat $ac_file_inputs > conftest.in
  11675. EOF
  11676. # Transform confdefs.h into a sed script conftest.vals that substitutes
  11677. # the proper values into config.h.in to produce config.h. And first:
  11678. # Protect against being on the right side of a sed subst in config.status.
  11679. # Protect against being in an unquoted here document in config.status.
  11680. rm -f conftest.vals
  11681. cat > conftest.hdr <<\EOF
  11682. s/[\\&%]/\\&/g
  11683. s%[\\$`]%\\&%g
  11684. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  11685. s%ac_d%ac_u%gp
  11686. s%ac_u%ac_e%gp
  11687. EOF
  11688. sed -n -f conftest.hdr confdefs.h > conftest.vals
  11689. rm -f conftest.hdr
  11690. # This sed command replaces #undef with comments. This is necessary, for
  11691. # example, in the case of _POSIX_SOURCE, which is predefined and required
  11692. # on some systems where configure will not decide to define it.
  11693. cat >> conftest.vals <<\EOF
  11694. s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  11695. EOF
  11696. # Break up conftest.vals because some shells have a limit on
  11697. # the size of here documents, and old seds have small limits too.
  11698. rm -f conftest.tail
  11699. while :
  11700. do
  11701. ac_lines=`grep -c . conftest.vals`
  11702. # grep -c gives empty output for an empty file on some AIX systems.
  11703. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  11704. # Write a limited-size here document to conftest.frag.
  11705. echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  11706. sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  11707. echo 'CEOF
  11708. sed -f conftest.frag conftest.in > conftest.out
  11709. rm -f conftest.in
  11710. mv conftest.out conftest.in
  11711. ' >> $CONFIG_STATUS
  11712. sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  11713. rm -f conftest.vals
  11714. mv conftest.tail conftest.vals
  11715. done
  11716. rm -f conftest.vals
  11717. cat >> $CONFIG_STATUS <<\EOF
  11718. rm -f conftest.frag conftest.h
  11719. echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
  11720. cat conftest.in >> conftest.h
  11721. rm -f conftest.in
  11722. if cmp -s $ac_file conftest.h 2>/dev/null; then
  11723. echo "$ac_file is unchanged"
  11724. rm -f conftest.h
  11725. else
  11726. # Remove last slash and all that follows it. Not all systems have dirname.
  11727. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  11728. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  11729. # The file is in a subdirectory.
  11730. test ! -d "$ac_dir" && mkdir "$ac_dir"
  11731. fi
  11732. rm -f $ac_file
  11733. mv conftest.h $ac_file
  11734. fi
  11735. fi; done
  11736. EOF
  11737. cat >> $CONFIG_STATUS <<EOF
  11738. EOF
  11739. cat >> $CONFIG_STATUS <<\EOF
  11740. exit 0
  11741. EOF
  11742. chmod +x $CONFIG_STATUS
  11743. rm -fr confdefs* $ac_clean_files
  11744. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  11745. echo "Copying config.status to config.status.${ARCH}"
  11746. cp -f config.status config.status.${ARCH}
  11747. # Display configuration status
  11748. echo ""
  11749. echo "GRASS is now configured for: ${host}"
  11750. echo ""
  11751. echo " Source directory: ${SRCDIR}"
  11752. echo " Build directory: ${DSTDIR}"
  11753. echo " Installation directory: ${INSTDIR}"
  11754. echo " Startup script in directory:${bindir}"
  11755. echo " C compiler: ${CC} ${CFLAGS}"
  11756. echo " C++ compiler: ${CXX} ${CXXFLAGS}"
  11757. echo " Building shared libraries: ${shared_ok}"
  11758. echo " OpenGL platform: ${OPENGL_TYPE}"
  11759. echo ""
  11760. echo " MacOSX application: `if test -n "${MACOSX_APP}" ; then echo yes ; else echo no ; fi`"
  11761. echo " MacOSX architectures: ${MACOSX_ARCHS}"
  11762. echo " MacOSX SDK: ${MACOSX_SDK}"
  11763. echo ""
  11764. echo " BLAS support: `if test -n "${USE_BLAS}" ; then echo yes ; else echo no ; fi`"
  11765. echo " BZIP2 support: `if test -n "${USE_BZIP2}" ; then echo yes ; else echo no ; fi`"
  11766. echo " C++ support: `if test -n "${USE_CXX}" ; then echo yes ; else echo no ; fi`"
  11767. echo " Cairo support: `if test -n "${USE_CAIRO}" ; then echo yes ; else echo no ; fi`"
  11768. echo " DWG support: `if test -n "${USE_OPENDWG}" ; then echo yes ; else echo no ; fi`"
  11769. echo " FFTW support: `if test -n "${USE_FFTW}" ; then echo yes ; else echo no ; fi`"
  11770. echo " FreeType support: `if test -n "${USE_FREETYPE}" ; then echo yes ; else echo no ; fi`"
  11771. echo " GDAL support: `if test -n "${USE_GDAL}" ; then echo yes ; else echo no ; fi`"
  11772. echo " GEOS support: `if test -n "${USE_GEOS}" ; then echo yes ; else echo no ; fi`"
  11773. echo " LAPACK support: `if test -n "${USE_LAPACK}" ; then echo yes ; else echo no ; fi`"
  11774. echo " Large File support (LFS): `if test -n "${USE_LARGEFILES}" ; then echo yes ; else echo no ; fi`"
  11775. echo " libLAS support: `if test -n "${USE_LIBLAS}" ; then echo yes ; else echo no ; fi`"
  11776. echo " MySQL support: `if test -n "${USE_MYSQL}" ; then echo yes ; else echo no ; fi`"
  11777. echo " NetCDF support: `if test -n "${USE_NETCDF}" ; then echo yes ; else echo no ; fi`"
  11778. echo " NLS support: `if test -n "${USE_NLS}" ; then echo yes ; else echo no ; fi`"
  11779. echo " ODBC support: `if test -n "${USE_ODBC}" ; then echo yes ; else echo no ; fi`"
  11780. echo " OGR support: `if test -n "${USE_OGR}" ; then echo yes ; else echo no ; fi`"
  11781. echo " OpenCL support: `if test -n "${USE_OPENCL}" ; then echo yes ; else echo no ; fi`"
  11782. echo " OpenGL support: `if test -n "${USE_OPENGL}" ; then echo yes ; else echo no ; fi`"
  11783. echo " OpenMP support: `if test -n "${USE_OPENMP}" ; then echo yes ; else echo no ; fi`"
  11784. echo " PDAL support: `if test -n "${USE_PDAL}" ; then echo yes ; else echo no ; fi`"
  11785. echo " PNG support: `if test -n "${USE_PNG}" ; then echo yes ; else echo no ; fi`"
  11786. echo " POSIX thread support: `if test -n "${USE_PTHREAD}" ; then echo yes ; else echo no ; fi`"
  11787. echo " PostgreSQL support: `if test -n "${USE_POSTGRES}" ; then echo yes ; else echo no ; fi`"
  11788. echo " Readline support: `if test -n "${USE_READLINE}" ; then echo yes ; else echo no ; fi`"
  11789. echo " Regex support: `if test -n "${USE_REGEX}" ; then echo yes ; else echo no ; fi`"
  11790. echo " SQLite support: `if test -n "${USE_SQLITE}" ; then echo yes ; else echo no ; fi`"
  11791. echo " TIFF support: `if test -n "${USE_TIFF}" ; then echo yes ; else echo no ; fi`"
  11792. echo " X11 support: `if test -n "${USE_X11}" ; then echo yes ; else echo no ; fi`"
  11793. echo " Zstandard support: `if test -n "${USE_ZSTD}" ; then echo yes ; else echo no ; fi`"
  11794. echo ""
  11795. # remove when the new PROJ API is stable
  11796. if test $PROJ4API = 0 ; then
  11797. echo "$ac_t"" using new PROJ 5+ API" 1>&6
  11798. else
  11799. echo "$ac_t"" using old PROJ 4 API" 1>&6
  11800. fi
  11801. echo ""