configure 390 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288
  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-tcltk support Tcl/Tk functionality (default: yes)"
  35. ac_help="$ac_help
  36. --with-postgres support PostgreSQL functionality (default: no)"
  37. ac_help="$ac_help
  38. --with-mysql support MySQL functionality (default: no)"
  39. ac_help="$ac_help
  40. --with-sqlite support SQLite functionality (default: no)"
  41. ac_help="$ac_help
  42. --with-ffmpeg support FFMPEG functionality (default: no)"
  43. ac_help="$ac_help
  44. --with-opengl support OpenGL functionality (default: yes)"
  45. ac_help="$ac_help
  46. --with-odbc support ODBC functionality (default: no)"
  47. ac_help="$ac_help
  48. --with-fftw support FFTW functionality (default: yes)"
  49. ac_help="$ac_help
  50. --with-blas support BLAS functionality (default: no)"
  51. ac_help="$ac_help
  52. --with-lapack support LAPACK functionality (default: no)"
  53. ac_help="$ac_help
  54. --with-cairo support Cairo functionality (default: yes)"
  55. ac_help="$ac_help
  56. --with-freetype support FreeType functionality (default: yes)"
  57. ac_help="$ac_help
  58. --with-nls support NLS functionality (default: no)"
  59. ac_help="$ac_help
  60. --with-readline support Readline functionality (default: no)"
  61. ac_help="$ac_help
  62. --with-opendwg support openDWG functionality (default: no)"
  63. ac_help="$ac_help
  64. --with-regex support regex functionality (default: yes)"
  65. ac_help="$ac_help
  66. --with-pthread support POSIX threads functionality (default: no)"
  67. ac_help="$ac_help
  68. --with-openmp support OpenMP functionality (default: no)"
  69. ac_help="$ac_help
  70. --with-gdal[=path/gdal-config]
  71. enable GDAL/OGR support (gdal-config with path,
  72. e.g. '--with-gdal=/usr/local/bin/gdal-config')"
  73. ac_help="$ac_help
  74. --with-liblas[=path/liblas-config]
  75. enable libLAS support (liblas-config with path,
  76. e.g. '--with-liblas=/usr/local/bin/liblas-config',
  77. default: no)"
  78. ac_help="$ac_help
  79. --with-wxwidgets[=path/wx-config]
  80. enable wxWidgets support (wx-config with path,
  81. e.g. '--with-wxwidgets=/usr/local/bin/wx-config',
  82. default: no)"
  83. ac_help="$ac_help
  84. --with-netcdf[=path/nc-config]
  85. enable NetCDF support (nc-config with path,
  86. e.g. '--with-nc=/usr/local/bin/nc-config',
  87. default: no)"
  88. ac_help="$ac_help
  89. --with-geos[=path/geos-config]
  90. enable GEOS support (geos-config with path,
  91. e.g. '--with-geos=/usr/local/bin/geos-config',
  92. default: no)"
  93. ac_help="$ac_help
  94. --with-includes=DIRS site include files are in DIRS"
  95. ac_help="$ac_help
  96. --with-libs=DIRS site library files are in DIRS"
  97. ac_help="$ac_help
  98. --with-zlib-includes=DIRS
  99. zlib include files are in DIRS"
  100. ac_help="$ac_help
  101. --with-zlib-libs=DIRS zlib library files are in DIRS"
  102. ac_help="$ac_help
  103. --with-readline-includes=DIRS
  104. Readline include files are in DIRS"
  105. ac_help="$ac_help
  106. --with-readline-libs=DIRS
  107. Readline library files are in DIRS"
  108. ac_help="$ac_help
  109. --with-tiff-includes=DIRS
  110. TIFF include files are in DIRS"
  111. ac_help="$ac_help
  112. --with-tiff-libs=DIRS TIFF library files are in DIRS"
  113. ac_help="$ac_help
  114. --with-png-includes=DIRS
  115. PNG include files are in DIRS"
  116. ac_help="$ac_help
  117. --with-png-libs=DIRS PNG library files are in DIRS"
  118. ac_help="$ac_help
  119. --with-tcltk-includes=DIRS
  120. Tcl/Tk include files are in DIRS"
  121. ac_help="$ac_help
  122. --with-tcltk-libs=DIRS Tcl/Tk library files are in DIRS"
  123. ac_help="$ac_help
  124. --with-postgres-includes=DIRS
  125. PostgreSQL include files are in DIRS"
  126. ac_help="$ac_help
  127. --with-postgres-libs=DIRS
  128. PostgreSQL library files are in DIRS"
  129. ac_help="$ac_help
  130. --with-mysql-includes=DIRS
  131. MySQL include files are in DIRS"
  132. ac_help="$ac_help
  133. --with-mysql-libs=DIRS MySQL library files are in DIRS"
  134. ac_help="$ac_help
  135. --with-sqlite-includes=DIRS
  136. SQLite include files are in DIRS"
  137. ac_help="$ac_help
  138. --with-sqlite-libs=DIRS SQLite library files are in DIRS"
  139. ac_help="$ac_help
  140. --with-ffmpeg-includes=DIRS
  141. FFMPEG include files are in DIRS"
  142. ac_help="$ac_help
  143. --with-ffmpeg-libs=DIRS FFMPEG library files are in DIRS"
  144. ac_help="$ac_help
  145. --with-opengl-includes=DIRS
  146. OpenGL include files are in DIRS"
  147. ac_help="$ac_help
  148. --with-opengl-libs=DIRS OpenGL library files are in DIRS"
  149. ac_help="$ac_help
  150. --with-opengl-framework=DIR
  151. OpenGL framework is in DIR"
  152. ac_help="$ac_help
  153. --with-odbc-includes=DIRS
  154. ODBC include files are in DIRS"
  155. ac_help="$ac_help
  156. --with-odbc-libs=DIRS ODBC library files are in DIRS"
  157. ac_help="$ac_help
  158. --with-fftw-includes=DIRS
  159. FFTW include files are in DIRS"
  160. ac_help="$ac_help
  161. --with-fftw-libs=DIRS FFTW library files are in DIRS"
  162. ac_help="$ac_help
  163. --with-blas-includes=DIRS
  164. BLAS include files are in DIRS"
  165. ac_help="$ac_help
  166. --with-blas-libs=DIRS BLAS library files are in DIRS"
  167. ac_help="$ac_help
  168. --with-lapack-includes=DIRS
  169. LAPACK include files are in DIRS"
  170. ac_help="$ac_help
  171. --with-lapack-libs=DIRS LAPACK library files are in DIRS"
  172. ac_help="$ac_help
  173. --with-cairo-includes=DIRS
  174. cairo include files are in DIRS"
  175. ac_help="$ac_help
  176. --with-cairo-libs=DIRS cairo library files are in DIRS"
  177. ac_help="$ac_help
  178. --with-cairo-ldflags=FLAGS
  179. cairo needs FLAGS when linking"
  180. ac_help="$ac_help
  181. --with-freetype-includes=DIRS
  182. FreeType include files are in DIRS"
  183. ac_help="$ac_help
  184. --with-freetype-libs=DIRS
  185. FreeType library files are in DIRS"
  186. ac_help="$ac_help
  187. --with-proj-includes=DIRS
  188. External PROJ.4 include files are in DIRS"
  189. ac_help="$ac_help
  190. --with-proj-libs=DIRS External PROJ.4 library files are in DIRS"
  191. ac_help="$ac_help
  192. --with-proj-share=DIR External PROJ.4 data files are in DIR"
  193. ac_help="$ac_help
  194. --with-opendwg-includes=DIRS
  195. openDWG include files are in DIRS"
  196. ac_help="$ac_help
  197. --with-opendwg-libs=DIRS
  198. openDWG library files are in DIRS"
  199. ac_help="$ac_help
  200. --with-regex-includes=DIRS
  201. regex include files are in DIRS"
  202. ac_help="$ac_help
  203. --with-regex-libs=DIRS regex library files are in DIRS"
  204. ac_help="$ac_help
  205. --with-pthread-includes=DIRS
  206. POSIX threads include files are in DIRS"
  207. ac_help="$ac_help
  208. --with-pthread-libs=DIRS
  209. POSIX threads library files are in DIRS"
  210. ac_help="$ac_help
  211. --with-openmp-includes=DIRS
  212. OpenMP include files are in DIRS"
  213. ac_help="$ac_help
  214. --with-openmp-libs=DIRS OpenMP library files are in DIRS"
  215. ac_help="$ac_help
  216. --with-x use the X Window System"
  217. ac_help="$ac_help
  218. --enable-largefile enable support for large files (LFS)"
  219. # Initialize some variables set by options.
  220. # The variables have the same names as the options, with
  221. # dashes changed to underlines.
  222. build=NONE
  223. cache_file=./config.cache
  224. exec_prefix=NONE
  225. host=NONE
  226. no_create=
  227. nonopt=NONE
  228. no_recursion=
  229. prefix=NONE
  230. program_prefix=NONE
  231. program_suffix=NONE
  232. program_transform_name=s,x,x,
  233. silent=
  234. site=
  235. srcdir=
  236. target=NONE
  237. verbose=
  238. x_includes=NONE
  239. x_libraries=NONE
  240. bindir='${exec_prefix}/bin'
  241. sbindir='${exec_prefix}/sbin'
  242. libexecdir='${exec_prefix}/libexec'
  243. datadir='${prefix}/share'
  244. sysconfdir='${prefix}/etc'
  245. sharedstatedir='${prefix}/com'
  246. localstatedir='${prefix}/var'
  247. libdir='${exec_prefix}/lib'
  248. includedir='${prefix}/include'
  249. oldincludedir='/usr/include'
  250. infodir='${prefix}/info'
  251. mandir='${prefix}/man'
  252. # Initialize some other variables.
  253. subdirs=
  254. MFLAGS= MAKEFLAGS=
  255. SHELL=${CONFIG_SHELL-/bin/sh}
  256. # Maximum number of lines to put in a shell here document.
  257. ac_max_here_lines=12
  258. ac_prev=
  259. for ac_option
  260. do
  261. # If the previous option needs an argument, assign it.
  262. if test -n "$ac_prev"; then
  263. eval "$ac_prev=\$ac_option"
  264. ac_prev=
  265. continue
  266. fi
  267. case "$ac_option" in
  268. -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  269. *) ac_optarg= ;;
  270. esac
  271. # Accept the important Cygnus configure options, so we can diagnose typos.
  272. case "$ac_option" in
  273. -bindir | --bindir | --bindi | --bind | --bin | --bi)
  274. ac_prev=bindir ;;
  275. -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  276. bindir="$ac_optarg" ;;
  277. -build | --build | --buil | --bui | --bu)
  278. ac_prev=build ;;
  279. -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  280. build="$ac_optarg" ;;
  281. -cache-file | --cache-file | --cache-fil | --cache-fi \
  282. | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  283. ac_prev=cache_file ;;
  284. -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  285. | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  286. cache_file="$ac_optarg" ;;
  287. -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  288. ac_prev=datadir ;;
  289. -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  290. | --da=*)
  291. datadir="$ac_optarg" ;;
  292. -disable-* | --disable-*)
  293. ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  294. # Reject names that are not valid shell variable names.
  295. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  296. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  297. fi
  298. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  299. eval "enable_${ac_feature}=no" ;;
  300. -enable-* | --enable-*)
  301. ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  302. # Reject names that are not valid shell variable names.
  303. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  304. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  305. fi
  306. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  307. case "$ac_option" in
  308. *=*) ;;
  309. *) ac_optarg=yes ;;
  310. esac
  311. eval "enable_${ac_feature}='$ac_optarg'" ;;
  312. -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  313. | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  314. | --exec | --exe | --ex)
  315. ac_prev=exec_prefix ;;
  316. -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  317. | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  318. | --exec=* | --exe=* | --ex=*)
  319. exec_prefix="$ac_optarg" ;;
  320. -gas | --gas | --ga | --g)
  321. # Obsolete; use --with-gas.
  322. with_gas=yes ;;
  323. -help | --help | --hel | --he)
  324. # Omit some internal or obsolete options to make the list less imposing.
  325. # This message is too long to be a string in the A/UX 3.1 sh.
  326. cat << EOF
  327. Usage: configure [options] [host]
  328. Options: [defaults in brackets after descriptions]
  329. Configuration:
  330. --cache-file=FILE cache test results in FILE
  331. --help print this message
  332. --no-create do not create output files
  333. --quiet, --silent do not print \`checking...' messages
  334. --version print the version of autoconf that created configure
  335. Directory and file names:
  336. --prefix=PREFIX install architecture-independent files in PREFIX
  337. [$ac_default_prefix]
  338. --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
  339. [same as prefix]
  340. --bindir=DIR user executables in DIR [EPREFIX/bin]
  341. --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
  342. --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
  343. --datadir=DIR read-only architecture-independent data in DIR
  344. [PREFIX/share]
  345. --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
  346. --sharedstatedir=DIR modifiable architecture-independent data in DIR
  347. [PREFIX/com]
  348. --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
  349. --libdir=DIR object code libraries in DIR [EPREFIX/lib]
  350. --includedir=DIR C header files in DIR [PREFIX/include]
  351. --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
  352. --infodir=DIR info documentation in DIR [PREFIX/info]
  353. --mandir=DIR man documentation in DIR [PREFIX/man]
  354. --srcdir=DIR find the sources in DIR [configure dir or ..]
  355. --program-prefix=PREFIX prepend PREFIX to installed program names
  356. --program-suffix=SUFFIX append SUFFIX to installed program names
  357. --program-transform-name=PROGRAM
  358. run sed PROGRAM on installed program names
  359. EOF
  360. cat << EOF
  361. Host type:
  362. --build=BUILD configure for building on BUILD [BUILD=HOST]
  363. --host=HOST configure for HOST [guessed]
  364. --target=TARGET configure for TARGET [TARGET=HOST]
  365. Features and packages:
  366. --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
  367. --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
  368. --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
  369. --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
  370. --x-includes=DIR X include files are in DIR
  371. --x-libraries=DIR X library files are in DIR
  372. EOF
  373. if test -n "$ac_help"; then
  374. echo "--enable and --with options recognized:$ac_help"
  375. fi
  376. exit 0 ;;
  377. -host | --host | --hos | --ho)
  378. ac_prev=host ;;
  379. -host=* | --host=* | --hos=* | --ho=*)
  380. host="$ac_optarg" ;;
  381. -includedir | --includedir | --includedi | --included | --include \
  382. | --includ | --inclu | --incl | --inc)
  383. ac_prev=includedir ;;
  384. -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  385. | --includ=* | --inclu=* | --incl=* | --inc=*)
  386. includedir="$ac_optarg" ;;
  387. -infodir | --infodir | --infodi | --infod | --info | --inf)
  388. ac_prev=infodir ;;
  389. -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  390. infodir="$ac_optarg" ;;
  391. -libdir | --libdir | --libdi | --libd)
  392. ac_prev=libdir ;;
  393. -libdir=* | --libdir=* | --libdi=* | --libd=*)
  394. libdir="$ac_optarg" ;;
  395. -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  396. | --libexe | --libex | --libe)
  397. ac_prev=libexecdir ;;
  398. -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  399. | --libexe=* | --libex=* | --libe=*)
  400. libexecdir="$ac_optarg" ;;
  401. -localstatedir | --localstatedir | --localstatedi | --localstated \
  402. | --localstate | --localstat | --localsta | --localst \
  403. | --locals | --local | --loca | --loc | --lo)
  404. ac_prev=localstatedir ;;
  405. -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  406. | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  407. | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  408. localstatedir="$ac_optarg" ;;
  409. -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  410. ac_prev=mandir ;;
  411. -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  412. mandir="$ac_optarg" ;;
  413. -nfp | --nfp | --nf)
  414. # Obsolete; use --without-fp.
  415. with_fp=no ;;
  416. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  417. | --no-cr | --no-c)
  418. no_create=yes ;;
  419. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  420. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  421. no_recursion=yes ;;
  422. -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  423. | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  424. | --oldin | --oldi | --old | --ol | --o)
  425. ac_prev=oldincludedir ;;
  426. -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  427. | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  428. | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  429. oldincludedir="$ac_optarg" ;;
  430. -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  431. ac_prev=prefix ;;
  432. -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  433. prefix="$ac_optarg" ;;
  434. -program-prefix | --program-prefix | --program-prefi | --program-pref \
  435. | --program-pre | --program-pr | --program-p)
  436. ac_prev=program_prefix ;;
  437. -program-prefix=* | --program-prefix=* | --program-prefi=* \
  438. | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  439. program_prefix="$ac_optarg" ;;
  440. -program-suffix | --program-suffix | --program-suffi | --program-suff \
  441. | --program-suf | --program-su | --program-s)
  442. ac_prev=program_suffix ;;
  443. -program-suffix=* | --program-suffix=* | --program-suffi=* \
  444. | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  445. program_suffix="$ac_optarg" ;;
  446. -program-transform-name | --program-transform-name \
  447. | --program-transform-nam | --program-transform-na \
  448. | --program-transform-n | --program-transform- \
  449. | --program-transform | --program-transfor \
  450. | --program-transfo | --program-transf \
  451. | --program-trans | --program-tran \
  452. | --progr-tra | --program-tr | --program-t)
  453. ac_prev=program_transform_name ;;
  454. -program-transform-name=* | --program-transform-name=* \
  455. | --program-transform-nam=* | --program-transform-na=* \
  456. | --program-transform-n=* | --program-transform-=* \
  457. | --program-transform=* | --program-transfor=* \
  458. | --program-transfo=* | --program-transf=* \
  459. | --program-trans=* | --program-tran=* \
  460. | --progr-tra=* | --program-tr=* | --program-t=*)
  461. program_transform_name="$ac_optarg" ;;
  462. -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  463. | -silent | --silent | --silen | --sile | --sil)
  464. silent=yes ;;
  465. -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  466. ac_prev=sbindir ;;
  467. -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  468. | --sbi=* | --sb=*)
  469. sbindir="$ac_optarg" ;;
  470. -sharedstatedir | --sharedstatedir | --sharedstatedi \
  471. | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  472. | --sharedst | --shareds | --shared | --share | --shar \
  473. | --sha | --sh)
  474. ac_prev=sharedstatedir ;;
  475. -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  476. | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  477. | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  478. | --sha=* | --sh=*)
  479. sharedstatedir="$ac_optarg" ;;
  480. -site | --site | --sit)
  481. ac_prev=site ;;
  482. -site=* | --site=* | --sit=*)
  483. site="$ac_optarg" ;;
  484. -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  485. ac_prev=srcdir ;;
  486. -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  487. srcdir="$ac_optarg" ;;
  488. -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  489. | --syscon | --sysco | --sysc | --sys | --sy)
  490. ac_prev=sysconfdir ;;
  491. -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  492. | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  493. sysconfdir="$ac_optarg" ;;
  494. -target | --target | --targe | --targ | --tar | --ta | --t)
  495. ac_prev=target ;;
  496. -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  497. target="$ac_optarg" ;;
  498. -v | -verbose | --verbose | --verbos | --verbo | --verb)
  499. verbose=yes ;;
  500. -version | --version | --versio | --versi | --vers)
  501. echo "configure generated by autoconf version 2.13"
  502. exit 0 ;;
  503. -with-* | --with-*)
  504. ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  505. # Reject names that are not valid shell variable names.
  506. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  507. { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  508. fi
  509. ac_package=`echo $ac_package| sed 's/-/_/g'`
  510. case "$ac_option" in
  511. *=*) ;;
  512. *) ac_optarg=yes ;;
  513. esac
  514. eval "with_${ac_package}='$ac_optarg'" ;;
  515. -without-* | --without-*)
  516. ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  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. eval "with_${ac_package}=no" ;;
  523. --x)
  524. # Obsolete; use --with-x.
  525. with_x=yes ;;
  526. -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  527. | --x-incl | --x-inc | --x-in | --x-i)
  528. ac_prev=x_includes ;;
  529. -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  530. | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  531. x_includes="$ac_optarg" ;;
  532. -x-libraries | --x-libraries | --x-librarie | --x-librari \
  533. | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  534. ac_prev=x_libraries ;;
  535. -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  536. | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  537. x_libraries="$ac_optarg" ;;
  538. -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  539. ;;
  540. *)
  541. if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  542. echo "configure: warning: $ac_option: invalid host type" 1>&2
  543. fi
  544. if test "x$nonopt" != xNONE; then
  545. { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  546. fi
  547. nonopt="$ac_option"
  548. ;;
  549. esac
  550. done
  551. if test -n "$ac_prev"; then
  552. { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  553. fi
  554. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  555. # File descriptor usage:
  556. # 0 standard input
  557. # 1 file creation
  558. # 2 errors and warnings
  559. # 3 some systems may open it to /dev/tty
  560. # 4 used on the Kubota Titan
  561. # 6 checking for... messages and results
  562. # 5 compiler messages saved in config.log
  563. if test "$silent" = yes; then
  564. exec 6>/dev/null
  565. else
  566. exec 6>&1
  567. fi
  568. exec 5>./config.log
  569. echo "\
  570. This file contains any messages produced by compilers while
  571. running configure, to aid debugging if configure makes a mistake.
  572. " 1>&5
  573. # Strip out --no-create and --no-recursion so they do not pile up.
  574. # Also quote any args containing shell metacharacters.
  575. ac_configure_args=
  576. for ac_arg
  577. do
  578. case "$ac_arg" in
  579. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  580. | --no-cr | --no-c) ;;
  581. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  582. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  583. *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  584. ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  585. *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  586. esac
  587. done
  588. # NLS nuisances.
  589. # Only set these to C if already set. These must not be set unconditionally
  590. # because not all systems understand e.g. LANG=C (notably SCO).
  591. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  592. # Non-C LC_CTYPE values break the ctype check.
  593. if test "${LANG+set}" = set; then LANG=C; export LANG; fi
  594. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  595. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  596. if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
  597. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  598. rm -rf conftest* confdefs.h
  599. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  600. echo > confdefs.h
  601. # A filename unique to this package, relative to the directory that
  602. # configure is in, which we can look for to find out if srcdir is correct.
  603. ac_unique_file=configure.in
  604. # Find the source files, if location was not specified.
  605. if test -z "$srcdir"; then
  606. ac_srcdir_defaulted=yes
  607. # Try the directory containing this script, then its parent.
  608. ac_prog=$0
  609. ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  610. test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  611. srcdir=$ac_confdir
  612. if test ! -r $srcdir/$ac_unique_file; then
  613. srcdir=..
  614. fi
  615. else
  616. ac_srcdir_defaulted=no
  617. fi
  618. if test ! -r $srcdir/$ac_unique_file; then
  619. if test "$ac_srcdir_defaulted" = yes; then
  620. { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  621. else
  622. { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  623. fi
  624. fi
  625. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  626. # Prefer explicitly selected file to automatically selected ones.
  627. if test -z "$CONFIG_SITE"; then
  628. if test "x$prefix" != xNONE; then
  629. CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  630. else
  631. CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  632. fi
  633. fi
  634. for ac_site_file in $CONFIG_SITE; do
  635. if test -r "$ac_site_file"; then
  636. echo "loading site script $ac_site_file"
  637. . "$ac_site_file"
  638. fi
  639. done
  640. ac_ext=c
  641. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  642. ac_cpp='$CPP $CPPFLAGS'
  643. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  644. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  645. cross_compiling=$ac_cv_prog_cc_cross
  646. ac_exeext=
  647. ac_objext=o
  648. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  649. # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  650. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  651. ac_n= ac_c='
  652. ' ac_t=' '
  653. else
  654. ac_n=-n ac_c= ac_t=
  655. fi
  656. else
  657. ac_n= ac_c='\c' ac_t=
  658. fi
  659. ac_aux_dir=
  660. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  661. if test -f $ac_dir/install-sh; then
  662. ac_aux_dir=$ac_dir
  663. ac_install_sh="$ac_aux_dir/install-sh -c"
  664. break
  665. elif test -f $ac_dir/install.sh; then
  666. ac_aux_dir=$ac_dir
  667. ac_install_sh="$ac_aux_dir/install.sh -c"
  668. break
  669. fi
  670. done
  671. if test -z "$ac_aux_dir"; then
  672. { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  673. fi
  674. ac_config_guess=$ac_aux_dir/config.guess
  675. ac_config_sub=$ac_aux_dir/config.sub
  676. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  677. # Make sure we can run config.sub.
  678. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
  679. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  680. fi
  681. echo $ac_n "checking host system type""... $ac_c" 1>&6
  682. echo "configure:754: checking host system type" >&5
  683. host_alias=$host
  684. case "$host_alias" in
  685. NONE)
  686. case $nonopt in
  687. NONE)
  688. if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
  689. else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  690. fi ;;
  691. *) host_alias=$nonopt ;;
  692. esac ;;
  693. esac
  694. host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
  695. host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  696. host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  697. host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  698. echo "$ac_t""$host" 1>&6
  699. # Extract the first word of "gcc", so it can be a program name with args.
  700. set dummy gcc; ac_word=$2
  701. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  702. echo "configure:777: checking for $ac_word" >&5
  703. if test -n "$CC"; then
  704. ac_cv_prog_CC="$CC" # Let the user override the test.
  705. else
  706. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  707. ac_dummy="$PATH"
  708. for ac_dir in $ac_dummy; do
  709. test -z "$ac_dir" && ac_dir=.
  710. if test -f $ac_dir/$ac_word; then
  711. ac_cv_prog_CC="gcc"
  712. break
  713. fi
  714. done
  715. IFS="$ac_save_ifs"
  716. fi
  717. CC="$ac_cv_prog_CC"
  718. if test -n "$CC"; then
  719. echo "$ac_t""$CC" 1>&6
  720. else
  721. echo "$ac_t""no" 1>&6
  722. fi
  723. if test -z "$CC"; then
  724. # Extract the first word of "cc", so it can be a program name with args.
  725. set dummy cc; ac_word=$2
  726. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  727. echo "configure:804: checking for $ac_word" >&5
  728. if test -n "$CC"; then
  729. ac_cv_prog_CC="$CC" # Let the user override the test.
  730. else
  731. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  732. ac_prog_rejected=no
  733. ac_dummy="$PATH"
  734. for ac_dir in $ac_dummy; do
  735. test -z "$ac_dir" && ac_dir=.
  736. if test -f $ac_dir/$ac_word; then
  737. if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  738. ac_prog_rejected=yes
  739. continue
  740. fi
  741. ac_cv_prog_CC="cc"
  742. break
  743. fi
  744. done
  745. IFS="$ac_save_ifs"
  746. if test $ac_prog_rejected = yes; then
  747. # We found a bogon in the path, so make sure we never use it.
  748. set dummy $ac_cv_prog_CC
  749. shift
  750. if test $# -gt 0; then
  751. # We chose a different compiler from the bogus one.
  752. # However, it has the same basename, so the bogon will be chosen
  753. # first if we set CC to just the basename; use the full file name.
  754. shift
  755. set dummy "$ac_dir/$ac_word" "$@"
  756. shift
  757. ac_cv_prog_CC="$@"
  758. fi
  759. fi
  760. fi
  761. CC="$ac_cv_prog_CC"
  762. if test -n "$CC"; then
  763. echo "$ac_t""$CC" 1>&6
  764. else
  765. echo "$ac_t""no" 1>&6
  766. fi
  767. if test -z "$CC"; then
  768. case "`uname -s`" in
  769. *win32* | *WIN32*)
  770. # Extract the first word of "cl", so it can be a program name with args.
  771. set dummy cl; ac_word=$2
  772. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  773. echo "configure:852: checking for $ac_word" >&5
  774. if test -n "$CC"; then
  775. ac_cv_prog_CC="$CC" # Let the user override the test.
  776. else
  777. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  778. ac_dummy="$PATH"
  779. for ac_dir in $ac_dummy; do
  780. test -z "$ac_dir" && ac_dir=.
  781. if test -f $ac_dir/$ac_word; then
  782. ac_cv_prog_CC="cl"
  783. break
  784. fi
  785. done
  786. IFS="$ac_save_ifs"
  787. fi
  788. CC="$ac_cv_prog_CC"
  789. if test -n "$CC"; then
  790. echo "$ac_t""$CC" 1>&6
  791. else
  792. echo "$ac_t""no" 1>&6
  793. fi
  794. ;;
  795. esac
  796. fi
  797. test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  798. fi
  799. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  800. echo "configure:881: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  801. ac_ext=c
  802. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  803. ac_cpp='$CPP $CPPFLAGS'
  804. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  805. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  806. cross_compiling=$ac_cv_prog_cc_cross
  807. cat > conftest.$ac_ext << EOF
  808. #line 892 "configure"
  809. #include "confdefs.h"
  810. main(){return(0);}
  811. EOF
  812. if { (eval echo configure:897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  813. ac_cv_prog_cc_works=yes
  814. # If we can't run a trivial program, we are probably using a cross compiler.
  815. if (./conftest; exit) 2>/dev/null; then
  816. ac_cv_prog_cc_cross=no
  817. else
  818. ac_cv_prog_cc_cross=yes
  819. fi
  820. else
  821. echo "configure: failed program was:" >&5
  822. cat conftest.$ac_ext >&5
  823. ac_cv_prog_cc_works=no
  824. fi
  825. rm -fr conftest*
  826. ac_ext=c
  827. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  828. ac_cpp='$CPP $CPPFLAGS'
  829. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  830. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  831. cross_compiling=$ac_cv_prog_cc_cross
  832. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  833. if test $ac_cv_prog_cc_works = no; then
  834. { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  835. fi
  836. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  837. echo "configure:923: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  838. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  839. cross_compiling=$ac_cv_prog_cc_cross
  840. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  841. echo "configure:928: checking whether we are using GNU C" >&5
  842. cat > conftest.c <<EOF
  843. #ifdef __GNUC__
  844. yes;
  845. #endif
  846. EOF
  847. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  848. ac_cv_prog_gcc=yes
  849. else
  850. ac_cv_prog_gcc=no
  851. fi
  852. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  853. if test $ac_cv_prog_gcc = yes; then
  854. GCC=yes
  855. else
  856. GCC=
  857. fi
  858. ac_test_CFLAGS="${CFLAGS+set}"
  859. ac_save_CFLAGS="$CFLAGS"
  860. CFLAGS=
  861. echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  862. echo "configure:953: checking whether ${CC-cc} accepts -g" >&5
  863. echo 'void f(){}' > conftest.c
  864. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  865. ac_cv_prog_cc_g=yes
  866. else
  867. ac_cv_prog_cc_g=no
  868. fi
  869. rm -f conftest*
  870. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  871. if test "$ac_test_CFLAGS" = set; then
  872. CFLAGS="$ac_save_CFLAGS"
  873. elif test $ac_cv_prog_cc_g = yes; then
  874. if test "$GCC" = yes; then
  875. CFLAGS="-g -O2"
  876. else
  877. CFLAGS="-g"
  878. fi
  879. else
  880. if test "$GCC" = yes; then
  881. CFLAGS="-O2"
  882. else
  883. CFLAGS=
  884. fi
  885. fi
  886. echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
  887. echo "configure:982: checking for Cygwin environment" >&5
  888. cat > conftest.$ac_ext <<EOF
  889. #line 985 "configure"
  890. #include "confdefs.h"
  891. int main() {
  892. #ifndef __CYGWIN__
  893. #define __CYGWIN__ __CYGWIN32__
  894. #endif
  895. return __CYGWIN__;
  896. ; return 0; }
  897. EOF
  898. if { (eval echo configure:996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  899. rm -rf conftest*
  900. ac_cv_cygwin=yes
  901. else
  902. echo "configure: failed program was:" >&5
  903. cat conftest.$ac_ext >&5
  904. rm -rf conftest*
  905. ac_cv_cygwin=no
  906. fi
  907. rm -f conftest*
  908. rm -f conftest*
  909. echo "$ac_t""$ac_cv_cygwin" 1>&6
  910. CYGWIN=
  911. test "$ac_cv_cygwin" = yes && CYGWIN=yes
  912. echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
  913. echo "configure:1012: checking for mingw32 environment" >&5
  914. cat > conftest.$ac_ext <<EOF
  915. #line 1015 "configure"
  916. #include "confdefs.h"
  917. int main() {
  918. return __MINGW32__;
  919. ; return 0; }
  920. EOF
  921. if { (eval echo configure:1022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  922. rm -rf conftest*
  923. ac_cv_mingw32=yes
  924. else
  925. echo "configure: failed program was:" >&5
  926. cat conftest.$ac_ext >&5
  927. rm -rf conftest*
  928. ac_cv_mingw32=no
  929. fi
  930. rm -f conftest*
  931. rm -f conftest*
  932. echo "$ac_t""$ac_cv_mingw32" 1>&6
  933. MINGW32=
  934. test "$ac_cv_mingw32" = yes && MINGW32=yes
  935. echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
  936. echo "configure:1040: checking for executable suffix" >&5
  937. if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
  938. ac_cv_exeext=.exe
  939. else
  940. ac_cv_exeext=no
  941. fi
  942. EXEEXT=""
  943. test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
  944. echo "$ac_t""${ac_cv_exeext}" 1>&6
  945. ac_exeext=$EXEEXT
  946. # Check for full floating-point support, including Infinity and NaN
  947. IEEEFLAG=
  948. echo $ac_n "checking for full floating-point support""... $ac_c" 1>&6
  949. echo "configure:1059: checking for full floating-point support" >&5
  950. if test "$cross_compiling" = yes; then
  951. echo "$ac_t""unknown (cross-compiling)" 1>&6
  952. echo $ac_n "checking whether "cc -mieee" works""... $ac_c" 1>&6
  953. echo "configure:1064: checking whether "cc -mieee" works" >&5
  954. ac_save_cflags=${CFLAGS}
  955. CFLAGS="$CFLAGS -mieee"
  956. cat > conftest.$ac_ext <<EOF
  957. #line 1068 "configure"
  958. #include "confdefs.h"
  959. int main() {
  960. ; return 0; }
  961. EOF
  962. if { (eval echo configure:1075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  963. rm -rf conftest*
  964. echo "$ac_t""yes" 1>&6
  965. IEEEFLAG="-mieee"
  966. else
  967. echo "configure: failed program was:" >&5
  968. cat conftest.$ac_ext >&5
  969. rm -rf conftest*
  970. echo "$ac_t""no" 1>&6
  971. fi
  972. rm -f conftest*
  973. CFLAGS=${ac_save_cflags}
  974. else
  975. cat > conftest.$ac_ext <<EOF
  976. #line 1091 "configure"
  977. #include "confdefs.h"
  978. #include <float.h>
  979. int main(void) {
  980. double one = 1.0;
  981. double zero = 0.0;
  982. if (one/zero > DBL_MAX) /* infinity */
  983. if (zero/zero != zero/zero) /* NaN */
  984. return 0;
  985. return 1;
  986. }
  987. EOF
  988. if { (eval echo configure:1105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  989. then
  990. echo "$ac_t""yes" 1>&6
  991. else
  992. echo "configure: failed program was:" >&5
  993. cat conftest.$ac_ext >&5
  994. rm -fr conftest*
  995. echo "$ac_t""no" 1>&6
  996. ac_save_cflags=${CFLAGS}
  997. CFLAGS=-mieee
  998. echo $ac_n "checking for full floating-point support with -mieee""... $ac_c" 1>&6
  999. echo "configure:1118: checking for full floating-point support with -mieee" >&5
  1000. if test "$cross_compiling" = yes; then
  1001. echo "$ac_t""unknown (cross-compiling)" 1>&6
  1002. { echo "configure: error: *** INTERNAL CONFIGURE ERROR" 1>&2; exit 1; }
  1003. else
  1004. cat > conftest.$ac_ext <<EOF
  1005. #line 1125 "configure"
  1006. #include "confdefs.h"
  1007. #include <float.h>
  1008. int main(void) {
  1009. double one = 1.0;
  1010. double zero = 0.0;
  1011. if (one/zero > DBL_MAX) /* infinity */
  1012. if (zero/zero != zero/zero) /* NaN */
  1013. return 0;
  1014. return 1;
  1015. }
  1016. EOF
  1017. if { (eval echo configure:1139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1018. then
  1019. echo "$ac_t""yes" 1>&6
  1020. IEEEFLAG="-mieee"
  1021. else
  1022. echo "configure: failed program was:" >&5
  1023. cat conftest.$ac_ext >&5
  1024. rm -fr conftest*
  1025. echo "$ac_t""no" 1>&6
  1026. echo "configure: warning: *** Incomplete floating-point support." 1>&2
  1027. fi
  1028. rm -fr conftest*
  1029. fi
  1030. CFLAGS=${ac_save_cflags}
  1031. fi
  1032. rm -fr conftest*
  1033. fi
  1034. CFLAGS="$CFLAGS $IEEEFLAG"
  1035. # Set BINDIR
  1036. if test -n "${bindir}"; then
  1037. BINDIR="${bindir}"
  1038. else
  1039. BINDIR=/usr/local/bin
  1040. fi
  1041. # Set SRCDIR and DSTDIR
  1042. # Extract the first word of "pwd", so it can be a program name with args.
  1043. set dummy pwd; ac_word=$2
  1044. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1045. echo "configure:1176: checking for $ac_word" >&5
  1046. case "$pwd" in
  1047. /*)
  1048. ac_cv_path_pwd="$pwd" # Let the user override the test with a path.
  1049. ;;
  1050. ?:/*)
  1051. ac_cv_path_pwd="$pwd" # Let the user override the test with a dos path.
  1052. ;;
  1053. *)
  1054. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1055. ac_dummy="$PATH"
  1056. for ac_dir in $ac_dummy; do
  1057. test -z "$ac_dir" && ac_dir=.
  1058. if test -f $ac_dir/$ac_word; then
  1059. ac_cv_path_pwd="$ac_dir/$ac_word"
  1060. break
  1061. fi
  1062. done
  1063. IFS="$ac_save_ifs"
  1064. test -z "$ac_cv_path_pwd" && ac_cv_path_pwd="pwd"
  1065. ;;
  1066. esac
  1067. pwd="$ac_cv_path_pwd"
  1068. if test -n "$pwd"; then
  1069. echo "$ac_t""$pwd" 1>&6
  1070. else
  1071. echo "$ac_t""no" 1>&6
  1072. fi
  1073. if test "$MINGW32" = yes ; then
  1074. winpwd="$pwd -W"
  1075. else
  1076. winpwd="$pwd"
  1077. fi
  1078. echo $ac_n "checking for source directory""... $ac_c" 1>&6
  1079. echo "configure:1214: checking for source directory" >&5
  1080. if test -z "$srcdir" ; then
  1081. SRCDIR=`$pwd`
  1082. else
  1083. SRCDIR=`(cd "$srcdir" ; $pwd)`
  1084. fi
  1085. echo "$ac_t"""$SRCDIR"" 1>&6
  1086. echo $ac_n "checking for build directory""... $ac_c" 1>&6
  1087. echo "configure:1225: checking for build directory" >&5
  1088. DSTDIR=`$pwd`
  1089. WINDSTDIR=`$winpwd`
  1090. echo "$ac_t"""$DSTDIR"" 1>&6
  1091. # Set ARCH
  1092. ARCH=
  1093. if test -z "${host}"; then
  1094. ARCH="unknown"
  1095. else
  1096. ARCH="${host}"
  1097. fi
  1098. # Use absolute path for aux directory so that install-sh works
  1099. ac_aux_dir=
  1100. for ac_dir in "$SRCDIR" $srcdir/"$SRCDIR"; do
  1101. if test -f $ac_dir/install-sh; then
  1102. ac_aux_dir=$ac_dir
  1103. ac_install_sh="$ac_aux_dir/install-sh -c"
  1104. break
  1105. elif test -f $ac_dir/install.sh; then
  1106. ac_aux_dir=$ac_dir
  1107. ac_install_sh="$ac_aux_dir/install.sh -c"
  1108. break
  1109. fi
  1110. done
  1111. if test -z "$ac_aux_dir"; then
  1112. { echo "configure: error: can not find install-sh or install.sh in "$SRCDIR" $srcdir/"$SRCDIR"" 1>&2; exit 1; }
  1113. fi
  1114. ac_config_guess=$ac_aux_dir/config.guess
  1115. ac_config_sub=$ac_aux_dir/config.sub
  1116. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  1117. # Set GISBASE and GRASS_BIN
  1118. GISBASE="${WINDSTDIR}/dist.${ARCH}"
  1119. GRASS_BIN="${DSTDIR}/bin.${ARCH}"
  1120. # Set GRASS_VERSION_*
  1121. GRASS_VERSION_FILE=include/VERSION
  1122. GRASS_VERSION_MAJOR=`sed -n 1p "${GRASS_VERSION_FILE}"`
  1123. GRASS_VERSION_MINOR=`sed -n 2p "${GRASS_VERSION_FILE}"`
  1124. GRASS_VERSION_RELEASE=`sed -n 3p "${GRASS_VERSION_FILE}"`
  1125. GRASS_VERSION_DATE=`sed -n 4p "${GRASS_VERSION_FILE}"`
  1126. GRASS_VERSION_NUMBER=`echo ${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}`
  1127. NAME_VER=`echo ${GRASS_VERSION_NUMBER} | sed 's/\..*//'`
  1128. LIB_VER=`echo ${GRASS_VERSION_NUMBER} | sed 's/^\([0-9.]*\).*$/\1/'`
  1129. GRASS_VERSION_SVN=
  1130. # Extract the first word of "svnversion", so it can be a program name with args.
  1131. set dummy svnversion; ac_word=$2
  1132. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1133. echo "configure:1293: checking for $ac_word" >&5
  1134. case "$SVN_VERSION" in
  1135. /*)
  1136. ac_cv_path_SVN_VERSION="$SVN_VERSION" # Let the user override the test with a path.
  1137. ;;
  1138. ?:/*)
  1139. ac_cv_path_SVN_VERSION="$SVN_VERSION" # Let the user override the test with a dos path.
  1140. ;;
  1141. *)
  1142. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1143. ac_dummy="$PATH"
  1144. for ac_dir in $ac_dummy; do
  1145. test -z "$ac_dir" && ac_dir=.
  1146. if test -f $ac_dir/$ac_word; then
  1147. ac_cv_path_SVN_VERSION="$ac_dir/$ac_word"
  1148. break
  1149. fi
  1150. done
  1151. IFS="$ac_save_ifs"
  1152. test -z "$ac_cv_path_SVN_VERSION" && ac_cv_path_SVN_VERSION="no"
  1153. ;;
  1154. esac
  1155. SVN_VERSION="$ac_cv_path_SVN_VERSION"
  1156. if test -n "$SVN_VERSION"; then
  1157. echo "$ac_t""$SVN_VERSION" 1>&6
  1158. else
  1159. echo "$ac_t""no" 1>&6
  1160. fi
  1161. if test "$SVN_VERSION" != "no" ; then
  1162. GRASS_VERSION_SVN=`$SVN_VERSION -c | cut -f2 -d:`
  1163. if test "$GRASS_VERSION_SVN" = "exported" ; then
  1164. GRASS_VERSION_SVN=
  1165. fi
  1166. fi
  1167. # Check for MacOSX App
  1168. # Check whether --enable-macosx-app or --disable-macosx-app was given.
  1169. if test "${enable_macosx_app+set}" = set; then
  1170. enableval="$enable_macosx_app"
  1171. :
  1172. else
  1173. enable_macosx_app=no
  1174. fi
  1175. echo $ac_n "checking for MacOSX App""... $ac_c" 1>&6
  1176. echo "configure:1352: checking for MacOSX App" >&5
  1177. case "$enable_macosx_app" in
  1178. yes) MACOSX_APP=1 ;;
  1179. no) MACOSX_APP= ;;
  1180. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  1181. esac
  1182. echo "$ac_t"""$enable_macosx_app"" 1>&6
  1183. # Check for MacOSX archs
  1184. echo $ac_n "checking for MacOSX architectures""... $ac_c" 1>&6
  1185. echo "configure:1364: checking for MacOSX architectures" >&5
  1186. MACOSX_ARCHS=
  1187. if test -z "$with_macosx_archs" ; then
  1188. echo "$ac_t""no" 1>&6
  1189. else
  1190. for a in $with_macosx_archs
  1191. do
  1192. # check if valid arch?
  1193. case "$a" in
  1194. i386|ppc|x86_64|ppc64)
  1195. MACOSX_ARCHS="$MACOSX_ARCHS -arch $a"
  1196. ;;
  1197. esac
  1198. done
  1199. echo "$ac_t""$MACOSX_ARCHS" 1>&6
  1200. LDFLAGS="$LDFLAGS $MACOSX_ARCHS"
  1201. CFLAGS="$CFLAGS $MACOSX_ARCHS"
  1202. CXXFLAGS="$CXXFLAGS $MACOSX_ARCHS"
  1203. fi
  1204. # Done checking MacOSX archs
  1205. # Check for MacOSX SDK
  1206. echo $ac_n "checking for MacOSX SDK""... $ac_c" 1>&6
  1207. echo "configure:1393: checking for MacOSX SDK" >&5
  1208. MACOSX_SDK=
  1209. if test -z "$with_macosx_sdk" ; then
  1210. echo "$ac_t""no" 1>&6
  1211. else
  1212. ac_safe=`echo "$with_macosx_sdk/SDKSettings.plist" | sed 'y%./+-%__p_%'`
  1213. echo $ac_n "checking for $with_macosx_sdk/SDKSettings.plist""... $ac_c" 1>&6
  1214. echo "configure:1403: checking for $with_macosx_sdk/SDKSettings.plist" >&5
  1215. if test "$cross_compiling" = yes; then
  1216. { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
  1217. else
  1218. if test -r $with_macosx_sdk/SDKSettings.plist; then
  1219. eval "ac_cv_file_$ac_safe=yes"
  1220. else
  1221. eval "ac_cv_file_$ac_safe=no"
  1222. fi
  1223. fi
  1224. if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
  1225. echo "$ac_t""yes" 1>&6
  1226. MACOSX_SDK="-isysroot $with_macosx_sdk"
  1227. else
  1228. echo "$ac_t""no" 1>&6
  1229. { echo "configure: error: *** specified SDK does not exist or is not a SDK" 1>&2; exit 1; }
  1230. fi
  1231. LDFLAGS="$LDFLAGS $MACOSX_SDK"
  1232. CFLAGS="$CFLAGS $MACOSX_SDK"
  1233. CXXFLAGS="$CXXFLAGS $MACOSX_SDK"
  1234. fi
  1235. # Done checking MacOSX SDK
  1236. # Set INST_DIR
  1237. if test -n "$MACOSX_APP" ; then
  1238. INSTDIR='${prefix}'"/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.app/Contents/MacOS"
  1239. else
  1240. INSTDIR='${prefix}'"/grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}"
  1241. fi
  1242. # Get flags for building shared libraries
  1243. echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
  1244. echo "configure:1447: checking how to build libraries" >&5
  1245. # Check whether --enable-shared or --disable-shared was given.
  1246. if test "${enable_shared+set}" = set; then
  1247. enableval="$enable_shared"
  1248. shared_ok=$enableval
  1249. else
  1250. shared_ok=yes
  1251. fi
  1252. if test "${enable_shared+set}" = set; then
  1253. enableval="$enable_shared"
  1254. shared_ok=$enableval
  1255. else
  1256. shared_ok=yes
  1257. fi
  1258. if test "$shared_ok" = "yes" ; then
  1259. echo "$ac_t""shared" 1>&6
  1260. SHARED_BUILD=1
  1261. GRASS_LIBRARY_TYPE='shlib'
  1262. else
  1263. echo "$ac_t""static" 1>&6
  1264. SHARED_BUILD=0
  1265. cat >> confdefs.h <<\EOF
  1266. #define STATIC_BUILD 1
  1267. EOF
  1268. GRASS_LIBRARY_TYPE='stlib'
  1269. fi
  1270. ac_save_ldflags="$LDFLAGS"
  1271. SHLIB_CFLAGS=""
  1272. SHLIB_LD_FLAGS=""
  1273. SHLIB_LD_LIBS=""
  1274. SHLIB_SUFFIX=""
  1275. SHLIB_LD=""
  1276. STLIB_LD='${AR} cr'
  1277. STLIB_SUFFIX='.a'
  1278. LDFLAGS=""
  1279. CC_SEARCH_FLAGS=""
  1280. LD_SEARCH_FLAGS=""
  1281. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1282. PLAT_OBJS=""
  1283. case $host in
  1284. *-linux-*)
  1285. SHLIB_CFLAGS="-fPIC"
  1286. SHLIB_LD_FLAGS=""
  1287. SHLIB_LD_LIBS='${LIBS}'
  1288. SHLIB_SUFFIX=".so"
  1289. SHLIB_LD="${CC} -shared"
  1290. LDFLAGS="-Wl,--export-dynamic"
  1291. CC_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
  1292. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1293. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1294. ;;
  1295. *-pc-cygwin)
  1296. SHLIB_LD_LIBS='${LIBS}'
  1297. SHLIB_SUFFIX=".dll"
  1298. SHLIB_LD="${CC} -shared"
  1299. LDFLAGS="-Wl,--export-dynamic"
  1300. LD_LIBRARY_PATH_VAR="PATH"
  1301. ;;
  1302. *-pc-mingw32)
  1303. SHLIB_LD_LIBS='${LIBS}'
  1304. SHLIB_SUFFIX=".dll"
  1305. SHLIB_LD="${CC} -shared"
  1306. LDFLAGS="-Wl,--export-dynamic,--enable-runtime-pseudo-reloc"
  1307. LD_LIBRARY_PATH_VAR="PATH"
  1308. ;;
  1309. *-apple-darwin*)
  1310. SHLIB_CFLAGS="-fno-common"
  1311. SHLIB_LD_LIBS='${LIBS}'
  1312. SHLIB_SUFFIX=".dylib"
  1313. 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}"
  1314. LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
  1315. ;;
  1316. *-sun-solaris*)
  1317. # Note: If _REENTRANT isn't defined, then Solaris
  1318. # won't define thread-safe library routines.
  1319. cat >> confdefs.h <<\EOF
  1320. #define _REENTRANT 1
  1321. EOF
  1322. cat >> confdefs.h <<\EOF
  1323. #define _POSIX_PTHREAD_SEMANTICS 1
  1324. EOF
  1325. # Note: need the LIBS below, otherwise Tk won't find Tcl's
  1326. # symbols when dynamically loaded into tclsh.
  1327. if test "$GCC" = "yes" ; then
  1328. SHLIB_CFLAGS="-fPIC"
  1329. SHLIB_LD="$CC -shared"
  1330. CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  1331. else
  1332. SHLIB_CFLAGS="-KPIC"
  1333. SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  1334. CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  1335. fi
  1336. SHLIB_SUFFIX=".so"
  1337. SHLIB_LD_LIBS='${LIBS}'
  1338. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1339. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1340. ;;
  1341. *)
  1342. { echo "configure: error: ***Unknown platform: $host***" 1>&2; exit 1; }
  1343. ;;
  1344. esac
  1345. LDFLAGS="${ac_save_ldflags} $LDFLAGS"
  1346. # Enable options
  1347. # Check whether --enable-w11 or --disable-w11 was given.
  1348. if test "${enable_w11+set}" = set; then
  1349. enableval="$enable_w11"
  1350. :
  1351. else
  1352. enable_w11=no
  1353. fi
  1354. # With options
  1355. # Check whether --with-cxx or --without-cxx was given.
  1356. if test "${with_cxx+set}" = set; then
  1357. withval="$with_cxx"
  1358. :
  1359. else
  1360. with_cxx=yes
  1361. fi
  1362. #LOC_ARG_WITH(g77, GNU Fortran 77, no)
  1363. # Check whether --with-macosx-archs or --without-macosx-archs was given.
  1364. if test "${with_macosx_archs+set}" = set; then
  1365. withval="$with_macosx_archs"
  1366. :
  1367. else
  1368. with_macosx_archs="no"
  1369. fi
  1370. # Check whether --with-macosx-sdk or --without-macosx-sdk was given.
  1371. if test "${with_macosx_sdk+set}" = set; then
  1372. withval="$with_macosx_sdk"
  1373. :
  1374. else
  1375. with_macosx_sdk="no"
  1376. fi
  1377. # Check whether --with-tiff or --without-tiff was given.
  1378. if test "${with_tiff+set}" = set; then
  1379. withval="$with_tiff"
  1380. :
  1381. else
  1382. with_tiff=yes
  1383. fi
  1384. # Check whether --with-png or --without-png was given.
  1385. if test "${with_png+set}" = set; then
  1386. withval="$with_png"
  1387. :
  1388. else
  1389. with_png=yes
  1390. fi
  1391. # Check whether --with-tcltk or --without-tcltk was given.
  1392. if test "${with_tcltk+set}" = set; then
  1393. withval="$with_tcltk"
  1394. :
  1395. else
  1396. with_tcltk=yes
  1397. fi
  1398. # Check whether --with-postgres or --without-postgres was given.
  1399. if test "${with_postgres+set}" = set; then
  1400. withval="$with_postgres"
  1401. :
  1402. else
  1403. with_postgres=no
  1404. fi
  1405. # Check whether --with-mysql or --without-mysql was given.
  1406. if test "${with_mysql+set}" = set; then
  1407. withval="$with_mysql"
  1408. :
  1409. else
  1410. with_mysql=no
  1411. fi
  1412. # Check whether --with-sqlite or --without-sqlite was given.
  1413. if test "${with_sqlite+set}" = set; then
  1414. withval="$with_sqlite"
  1415. :
  1416. else
  1417. with_sqlite=no
  1418. fi
  1419. # Check whether --with-ffmpeg or --without-ffmpeg was given.
  1420. if test "${with_ffmpeg+set}" = set; then
  1421. withval="$with_ffmpeg"
  1422. :
  1423. else
  1424. with_ffmpeg=no
  1425. fi
  1426. # Check whether --with-opengl or --without-opengl was given.
  1427. if test "${with_opengl+set}" = set; then
  1428. withval="$with_opengl"
  1429. :
  1430. else
  1431. with_opengl=yes
  1432. fi
  1433. # Check whether --with-odbc or --without-odbc was given.
  1434. if test "${with_odbc+set}" = set; then
  1435. withval="$with_odbc"
  1436. :
  1437. else
  1438. with_odbc=no
  1439. fi
  1440. # Check whether --with-fftw or --without-fftw was given.
  1441. if test "${with_fftw+set}" = set; then
  1442. withval="$with_fftw"
  1443. :
  1444. else
  1445. with_fftw=yes
  1446. fi
  1447. # Check whether --with-blas or --without-blas was given.
  1448. if test "${with_blas+set}" = set; then
  1449. withval="$with_blas"
  1450. :
  1451. else
  1452. with_blas=no
  1453. fi
  1454. # Check whether --with-lapack or --without-lapack was given.
  1455. if test "${with_lapack+set}" = set; then
  1456. withval="$with_lapack"
  1457. :
  1458. else
  1459. with_lapack=no
  1460. fi
  1461. # Check whether --with-cairo or --without-cairo was given.
  1462. if test "${with_cairo+set}" = set; then
  1463. withval="$with_cairo"
  1464. :
  1465. else
  1466. with_cairo=yes
  1467. fi
  1468. # Check whether --with-freetype or --without-freetype was given.
  1469. if test "${with_freetype+set}" = set; then
  1470. withval="$with_freetype"
  1471. :
  1472. else
  1473. with_freetype=yes
  1474. fi
  1475. # Check whether --with-nls or --without-nls was given.
  1476. if test "${with_nls+set}" = set; then
  1477. withval="$with_nls"
  1478. :
  1479. else
  1480. with_nls=no
  1481. fi
  1482. # Check whether --with-readline or --without-readline was given.
  1483. if test "${with_readline+set}" = set; then
  1484. withval="$with_readline"
  1485. :
  1486. else
  1487. with_readline=no
  1488. fi
  1489. # Check whether --with-opendwg or --without-opendwg was given.
  1490. if test "${with_opendwg+set}" = set; then
  1491. withval="$with_opendwg"
  1492. :
  1493. else
  1494. with_opendwg=no
  1495. fi
  1496. # Check whether --with-regex or --without-regex was given.
  1497. if test "${with_regex+set}" = set; then
  1498. withval="$with_regex"
  1499. :
  1500. else
  1501. with_regex=yes
  1502. fi
  1503. # Check whether --with-pthread or --without-pthread was given.
  1504. if test "${with_pthread+set}" = set; then
  1505. withval="$with_pthread"
  1506. :
  1507. else
  1508. with_pthread=no
  1509. fi
  1510. # Check whether --with-openmp or --without-openmp was given.
  1511. if test "${with_openmp+set}" = set; then
  1512. withval="$with_openmp"
  1513. :
  1514. else
  1515. with_openmp=no
  1516. fi
  1517. # Check whether --with-gdal or --without-gdal was given.
  1518. if test "${with_gdal+set}" = set; then
  1519. withval="$with_gdal"
  1520. :
  1521. fi
  1522. # Check whether --with-liblas or --without-liblas was given.
  1523. if test "${with_liblas+set}" = set; then
  1524. withval="$with_liblas"
  1525. :
  1526. else
  1527. with_liblas="no"
  1528. fi
  1529. # Check whether --with-wxwidgets or --without-wxwidgets was given.
  1530. if test "${with_wxwidgets+set}" = set; then
  1531. withval="$with_wxwidgets"
  1532. :
  1533. else
  1534. with_wxwidgets="no"
  1535. fi
  1536. # Check whether --with-netcdf or --without-netcdf was given.
  1537. if test "${with_netcdf+set}" = set; then
  1538. withval="$with_netcdf"
  1539. :
  1540. else
  1541. with_netcdf="no"
  1542. fi
  1543. # With includes and libs options
  1544. # Check whether --with-geos or --without-geos was given.
  1545. if test "${with_geos+set}" = set; then
  1546. withval="$with_geos"
  1547. :
  1548. else
  1549. with_geos="no"
  1550. fi
  1551. # Check whether --with-includes or --without-includes was given.
  1552. if test "${with_includes+set}" = set; then
  1553. withval="$with_includes"
  1554. :
  1555. fi
  1556. # Check whether --with-libs or --without-libs was given.
  1557. if test "${with_libs+set}" = set; then
  1558. withval="$with_libs"
  1559. :
  1560. fi
  1561. # Check whether --with-zlib-includes or --without-zlib-includes was given.
  1562. if test "${with_zlib_includes+set}" = set; then
  1563. withval="$with_zlib_includes"
  1564. :
  1565. fi
  1566. # Check whether --with-zlib-libs or --without-zlib-libs was given.
  1567. if test "${with_zlib_libs+set}" = set; then
  1568. withval="$with_zlib_libs"
  1569. :
  1570. fi
  1571. # Check whether --with-readline-includes or --without-readline-includes was given.
  1572. if test "${with_readline_includes+set}" = set; then
  1573. withval="$with_readline_includes"
  1574. :
  1575. fi
  1576. # Check whether --with-readline-libs or --without-readline-libs was given.
  1577. if test "${with_readline_libs+set}" = set; then
  1578. withval="$with_readline_libs"
  1579. :
  1580. fi
  1581. # Check whether --with-tiff-includes or --without-tiff-includes was given.
  1582. if test "${with_tiff_includes+set}" = set; then
  1583. withval="$with_tiff_includes"
  1584. :
  1585. fi
  1586. # Check whether --with-tiff-libs or --without-tiff-libs was given.
  1587. if test "${with_tiff_libs+set}" = set; then
  1588. withval="$with_tiff_libs"
  1589. :
  1590. fi
  1591. # Check whether --with-png-includes or --without-png-includes was given.
  1592. if test "${with_png_includes+set}" = set; then
  1593. withval="$with_png_includes"
  1594. :
  1595. fi
  1596. # Check whether --with-png-libs or --without-png-libs was given.
  1597. if test "${with_png_libs+set}" = set; then
  1598. withval="$with_png_libs"
  1599. :
  1600. fi
  1601. # Check whether --with-tcltk-includes or --without-tcltk-includes was given.
  1602. if test "${with_tcltk_includes+set}" = set; then
  1603. withval="$with_tcltk_includes"
  1604. :
  1605. fi
  1606. # Check whether --with-tcltk-libs or --without-tcltk-libs was given.
  1607. if test "${with_tcltk_libs+set}" = set; then
  1608. withval="$with_tcltk_libs"
  1609. :
  1610. fi
  1611. # Check whether --with-postgres-includes or --without-postgres-includes was given.
  1612. if test "${with_postgres_includes+set}" = set; then
  1613. withval="$with_postgres_includes"
  1614. :
  1615. fi
  1616. # Check whether --with-postgres-libs or --without-postgres-libs was given.
  1617. if test "${with_postgres_libs+set}" = set; then
  1618. withval="$with_postgres_libs"
  1619. :
  1620. fi
  1621. # Check whether --with-mysql-includes or --without-mysql-includes was given.
  1622. if test "${with_mysql_includes+set}" = set; then
  1623. withval="$with_mysql_includes"
  1624. :
  1625. fi
  1626. # Check whether --with-mysql-libs or --without-mysql-libs was given.
  1627. if test "${with_mysql_libs+set}" = set; then
  1628. withval="$with_mysql_libs"
  1629. :
  1630. fi
  1631. # Check whether --with-sqlite-includes or --without-sqlite-includes was given.
  1632. if test "${with_sqlite_includes+set}" = set; then
  1633. withval="$with_sqlite_includes"
  1634. :
  1635. fi
  1636. # Check whether --with-sqlite-libs or --without-sqlite-libs was given.
  1637. if test "${with_sqlite_libs+set}" = set; then
  1638. withval="$with_sqlite_libs"
  1639. :
  1640. fi
  1641. # Check whether --with-ffmpeg-includes or --without-ffmpeg-includes was given.
  1642. if test "${with_ffmpeg_includes+set}" = set; then
  1643. withval="$with_ffmpeg_includes"
  1644. :
  1645. fi
  1646. # Check whether --with-ffmpeg-libs or --without-ffmpeg-libs was given.
  1647. if test "${with_ffmpeg_libs+set}" = set; then
  1648. withval="$with_ffmpeg_libs"
  1649. :
  1650. fi
  1651. # Check whether --with-opengl-includes or --without-opengl-includes was given.
  1652. if test "${with_opengl_includes+set}" = set; then
  1653. withval="$with_opengl_includes"
  1654. :
  1655. fi
  1656. # Check whether --with-opengl-libs or --without-opengl-libs was given.
  1657. if test "${with_opengl_libs+set}" = set; then
  1658. withval="$with_opengl_libs"
  1659. :
  1660. fi
  1661. # Check whether --with-opengl-framework or --without-opengl-framework was given.
  1662. if test "${with_opengl_framework+set}" = set; then
  1663. withval="$with_opengl_framework"
  1664. :
  1665. fi
  1666. # Check whether --with-odbc-includes or --without-odbc-includes was given.
  1667. if test "${with_odbc_includes+set}" = set; then
  1668. withval="$with_odbc_includes"
  1669. :
  1670. fi
  1671. # Check whether --with-odbc-libs or --without-odbc-libs was given.
  1672. if test "${with_odbc_libs+set}" = set; then
  1673. withval="$with_odbc_libs"
  1674. :
  1675. fi
  1676. # Check whether --with-fftw-includes or --without-fftw-includes was given.
  1677. if test "${with_fftw_includes+set}" = set; then
  1678. withval="$with_fftw_includes"
  1679. :
  1680. fi
  1681. # Check whether --with-fftw-libs or --without-fftw-libs was given.
  1682. if test "${with_fftw_libs+set}" = set; then
  1683. withval="$with_fftw_libs"
  1684. :
  1685. fi
  1686. # Check whether --with-blas-includes or --without-blas-includes was given.
  1687. if test "${with_blas_includes+set}" = set; then
  1688. withval="$with_blas_includes"
  1689. :
  1690. fi
  1691. # Check whether --with-blas-libs or --without-blas-libs was given.
  1692. if test "${with_blas_libs+set}" = set; then
  1693. withval="$with_blas_libs"
  1694. :
  1695. fi
  1696. # Check whether --with-lapack-includes or --without-lapack-includes was given.
  1697. if test "${with_lapack_includes+set}" = set; then
  1698. withval="$with_lapack_includes"
  1699. :
  1700. fi
  1701. # Check whether --with-lapack-libs or --without-lapack-libs was given.
  1702. if test "${with_lapack_libs+set}" = set; then
  1703. withval="$with_lapack_libs"
  1704. :
  1705. fi
  1706. # Check whether --with-cairo-includes or --without-cairo-includes was given.
  1707. if test "${with_cairo_includes+set}" = set; then
  1708. withval="$with_cairo_includes"
  1709. :
  1710. fi
  1711. # Check whether --with-cairo-libs or --without-cairo-libs was given.
  1712. if test "${with_cairo_libs+set}" = set; then
  1713. withval="$with_cairo_libs"
  1714. :
  1715. fi
  1716. # Check whether --with-cairo-ldflags or --without-cairo-ldflags was given.
  1717. if test "${with_cairo_ldflags+set}" = set; then
  1718. withval="$with_cairo_ldflags"
  1719. :
  1720. fi
  1721. # Check whether --with-freetype-includes or --without-freetype-includes was given.
  1722. if test "${with_freetype_includes+set}" = set; then
  1723. withval="$with_freetype_includes"
  1724. :
  1725. fi
  1726. # Check whether --with-freetype-libs or --without-freetype-libs was given.
  1727. if test "${with_freetype_libs+set}" = set; then
  1728. withval="$with_freetype_libs"
  1729. :
  1730. fi
  1731. # Check whether --with-proj-includes or --without-proj-includes was given.
  1732. if test "${with_proj_includes+set}" = set; then
  1733. withval="$with_proj_includes"
  1734. :
  1735. fi
  1736. # Check whether --with-proj-libs or --without-proj-libs was given.
  1737. if test "${with_proj_libs+set}" = set; then
  1738. withval="$with_proj_libs"
  1739. :
  1740. fi
  1741. # Check whether --with-proj-share or --without-proj-share was given.
  1742. if test "${with_proj_share+set}" = set; then
  1743. withval="$with_proj_share"
  1744. :
  1745. fi
  1746. # Check whether --with-opendwg-includes or --without-opendwg-includes was given.
  1747. if test "${with_opendwg_includes+set}" = set; then
  1748. withval="$with_opendwg_includes"
  1749. :
  1750. fi
  1751. # Check whether --with-opendwg-libs or --without-opendwg-libs was given.
  1752. if test "${with_opendwg_libs+set}" = set; then
  1753. withval="$with_opendwg_libs"
  1754. :
  1755. fi
  1756. # Check whether --with-regex-includes or --without-regex-includes was given.
  1757. if test "${with_regex_includes+set}" = set; then
  1758. withval="$with_regex_includes"
  1759. :
  1760. fi
  1761. # Check whether --with-regex-libs or --without-regex-libs was given.
  1762. if test "${with_regex_libs+set}" = set; then
  1763. withval="$with_regex_libs"
  1764. :
  1765. fi
  1766. # Check whether --with-pthread-includes or --without-pthread-includes was given.
  1767. if test "${with_pthread_includes+set}" = set; then
  1768. withval="$with_pthread_includes"
  1769. :
  1770. fi
  1771. # Check whether --with-pthread-libs or --without-pthread-libs was given.
  1772. if test "${with_pthread_libs+set}" = set; then
  1773. withval="$with_pthread_libs"
  1774. :
  1775. fi
  1776. # Check whether --with-openmp-includes or --without-openmp-includes was given.
  1777. if test "${with_openmp_includes+set}" = set; then
  1778. withval="$with_openmp_includes"
  1779. :
  1780. fi
  1781. # Check whether --with-openmp-libs or --without-openmp-libs was given.
  1782. if test "${with_openmp_libs+set}" = set; then
  1783. withval="$with_openmp_libs"
  1784. :
  1785. fi
  1786. # Put this early on so CPPFLAGS and LDFLAGS have any additional dirs
  1787. # With includes option
  1788. # Handle Fortran compiler choice
  1789. #LOC_CHECK_USE(g77, GNU Fortran 77, USE_G77)
  1790. # Done checking fortran
  1791. echo $ac_n "checking for additional include dirs""... $ac_c" 1>&6
  1792. echo "configure:2268: checking for additional include dirs" >&5
  1793. case "$with_includes" in
  1794. y | ye | yes | n | no)
  1795. { echo "configure: error: *** You must supply a directory to list --with-includes." 1>&2; exit 1; }
  1796. ;;
  1797. esac
  1798. echo "$ac_t""$with_includes" 1>&6
  1799. if test -n "$with_includes"; then
  1800. for dir in $with_includes; do
  1801. if test -d "$dir"; then
  1802. INCLUDE_DIRS="$INCLUDE_DIRS -I$dir"
  1803. else
  1804. { echo "configure: error: *** Include directory $dir does not exist." 1>&2; exit 1; }
  1805. fi
  1806. done
  1807. CPPFLAGS="$CPPFLAGS $INCLUDE_DIRS"
  1808. fi
  1809. # With libs option
  1810. echo $ac_n "checking for additional library dirs""... $ac_c" 1>&6
  1811. echo "configure:2291: checking for additional library dirs" >&5
  1812. case "$with_libs" in
  1813. y | ye | yes | n | no)
  1814. { echo "configure: error: *** You must supply a directory list to --with-libs." 1>&2; exit 1; }
  1815. ;;
  1816. esac
  1817. echo "$ac_t""$with_libs" 1>&6
  1818. if test -n "$with_libs"; then
  1819. for dir in $with_libs; do
  1820. if test -d "$dir"; then
  1821. LIBRARY_DIRS="$LIBRARY_DIRS -L$dir"
  1822. else
  1823. { echo "configure: error: *** Library directory $dir does not exist." 1>&2; exit 1; }
  1824. fi
  1825. done
  1826. LDFLAGS="$LDFLAGS $LIBRARY_DIRS"
  1827. fi
  1828. # Programs and standard headers, libraries, functions
  1829. # Find a good install program. We prefer a C program (faster),
  1830. # so one script is as good as another. But avoid the broken or
  1831. # incompatible versions:
  1832. # SysV /etc/install, /usr/sbin/install
  1833. # SunOS /usr/etc/install
  1834. # IRIX /sbin/install
  1835. # AIX /bin/install
  1836. # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  1837. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  1838. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  1839. # ./install, which can be erroneously created by make from ./install.sh.
  1840. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  1841. echo "configure:2325: checking for a BSD compatible install" >&5
  1842. if test -z "$INSTALL"; then
  1843. IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
  1844. for ac_dir in $PATH; do
  1845. # Account for people who put trailing slashes in PATH elements.
  1846. case "$ac_dir/" in
  1847. /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  1848. *)
  1849. # OSF1 and SCO ODT 3.0 have their own names for install.
  1850. # Don't use installbsd from OSF since it installs stuff as root
  1851. # by default.
  1852. for ac_prog in ginstall scoinst install; do
  1853. if test -f $ac_dir/$ac_prog; then
  1854. if test $ac_prog = install &&
  1855. grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  1856. # AIX install. It has an incompatible calling convention.
  1857. :
  1858. else
  1859. ac_cv_path_install="$ac_dir/$ac_prog -c"
  1860. break 2
  1861. fi
  1862. fi
  1863. done
  1864. ;;
  1865. esac
  1866. done
  1867. IFS="$ac_save_IFS"
  1868. if test "${ac_cv_path_install+set}" = set; then
  1869. INSTALL="$ac_cv_path_install"
  1870. else
  1871. # As a last resort, use the slow shell script. We don't cache a
  1872. # path for INSTALL within a source directory, because that will
  1873. # break other packages using the cache if that directory is
  1874. # removed, or if the path is relative.
  1875. INSTALL="$ac_install_sh"
  1876. fi
  1877. fi
  1878. echo "$ac_t""$INSTALL" 1>&6
  1879. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  1880. # It thinks the first close brace ends the variable substitution.
  1881. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  1882. test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  1883. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  1884. # Extract the first word of "flex", so it can be a program name with args.
  1885. set dummy flex; ac_word=$2
  1886. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1887. echo "configure:2378: checking for $ac_word" >&5
  1888. if test -n "$LEX"; then
  1889. ac_cv_prog_LEX="$LEX" # Let the user override the test.
  1890. else
  1891. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1892. ac_dummy="$PATH"
  1893. for ac_dir in $ac_dummy; do
  1894. test -z "$ac_dir" && ac_dir=.
  1895. if test -f $ac_dir/$ac_word; then
  1896. ac_cv_prog_LEX="flex"
  1897. break
  1898. fi
  1899. done
  1900. IFS="$ac_save_ifs"
  1901. test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
  1902. fi
  1903. LEX="$ac_cv_prog_LEX"
  1904. if test -n "$LEX"; then
  1905. echo "$ac_t""$LEX" 1>&6
  1906. else
  1907. echo "$ac_t""no" 1>&6
  1908. fi
  1909. if test -z "$LEXLIB"
  1910. then
  1911. case "$LEX" in
  1912. flex*) ac_lib=fl ;;
  1913. *) ac_lib=l ;;
  1914. esac
  1915. echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
  1916. echo "configure:2409: checking for yywrap in -l$ac_lib" >&5
  1917. ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
  1918. ac_save_LIBS="$LIBS"
  1919. LIBS="-l$ac_lib $LIBS"
  1920. cat > conftest.$ac_ext <<EOF
  1921. #line 2415 "configure"
  1922. #include "confdefs.h"
  1923. /* Override any gcc2 internal prototype to avoid an error. */
  1924. /* We use char because int might match the return type of a gcc2
  1925. builtin and then its argument prototype would still apply. */
  1926. char yywrap();
  1927. int main() {
  1928. yywrap()
  1929. ; return 0; }
  1930. EOF
  1931. if { (eval echo configure:2426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1932. rm -rf conftest*
  1933. eval "ac_cv_lib_$ac_lib_var=yes"
  1934. else
  1935. echo "configure: failed program was:" >&5
  1936. cat conftest.$ac_ext >&5
  1937. rm -rf conftest*
  1938. eval "ac_cv_lib_$ac_lib_var=no"
  1939. fi
  1940. rm -f conftest*
  1941. LIBS="$ac_save_LIBS"
  1942. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1943. echo "$ac_t""yes" 1>&6
  1944. LEXLIB="-l$ac_lib"
  1945. else
  1946. echo "$ac_t""no" 1>&6
  1947. fi
  1948. fi
  1949. if test "$LEX" = "lex"; then
  1950. # Extract the first word of "lex", so it can be a program name with args.
  1951. set dummy lex; ac_word=$2
  1952. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1953. echo "configure:2451: checking for $ac_word" >&5
  1954. case "$LEXPATH" in
  1955. /*)
  1956. ac_cv_path_LEXPATH="$LEXPATH" # Let the user override the test with a path.
  1957. ;;
  1958. ?:/*)
  1959. ac_cv_path_LEXPATH="$LEXPATH" # Let the user override the test with a dos path.
  1960. ;;
  1961. *)
  1962. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1963. ac_dummy="$PATH"
  1964. for ac_dir in $ac_dummy; do
  1965. test -z "$ac_dir" && ac_dir=.
  1966. if test -f $ac_dir/$ac_word; then
  1967. ac_cv_path_LEXPATH="$ac_dir/$ac_word"
  1968. break
  1969. fi
  1970. done
  1971. IFS="$ac_save_ifs"
  1972. test -z "$ac_cv_path_LEXPATH" && ac_cv_path_LEXPATH="no"
  1973. ;;
  1974. esac
  1975. LEXPATH="$ac_cv_path_LEXPATH"
  1976. if test -n "$LEXPATH"; then
  1977. echo "$ac_t""$LEXPATH" 1>&6
  1978. else
  1979. echo "$ac_t""no" 1>&6
  1980. fi
  1981. if test "$LEXPATH" = "no"; then
  1982. { echo "configure: error: *** Unable to locate lex." 1>&2; exit 1; }
  1983. fi
  1984. fi
  1985. for ac_prog in 'bison -y' byacc
  1986. do
  1987. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1988. set dummy $ac_prog; ac_word=$2
  1989. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1990. echo "configure:2491: checking for $ac_word" >&5
  1991. if test -n "$YACC"; then
  1992. ac_cv_prog_YACC="$YACC" # Let the user override the test.
  1993. else
  1994. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1995. ac_dummy="$PATH"
  1996. for ac_dir in $ac_dummy; do
  1997. test -z "$ac_dir" && ac_dir=.
  1998. if test -f $ac_dir/$ac_word; then
  1999. ac_cv_prog_YACC="$ac_prog"
  2000. break
  2001. fi
  2002. done
  2003. IFS="$ac_save_ifs"
  2004. fi
  2005. YACC="$ac_cv_prog_YACC"
  2006. if test -n "$YACC"; then
  2007. echo "$ac_t""$YACC" 1>&6
  2008. else
  2009. echo "$ac_t""no" 1>&6
  2010. fi
  2011. test -n "$YACC" && break
  2012. done
  2013. test -n "$YACC" || YACC="yacc"
  2014. if test "$YACC" = "yacc"; then
  2015. # Extract the first word of "yacc", so it can be a program name with args.
  2016. set dummy yacc; ac_word=$2
  2017. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2018. echo "configure:2522: checking for $ac_word" >&5
  2019. case "$YACCPATH" in
  2020. /*)
  2021. ac_cv_path_YACCPATH="$YACCPATH" # Let the user override the test with a path.
  2022. ;;
  2023. ?:/*)
  2024. ac_cv_path_YACCPATH="$YACCPATH" # Let the user override the test with a dos path.
  2025. ;;
  2026. *)
  2027. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2028. ac_dummy="$PATH"
  2029. for ac_dir in $ac_dummy; do
  2030. test -z "$ac_dir" && ac_dir=.
  2031. if test -f $ac_dir/$ac_word; then
  2032. ac_cv_path_YACCPATH="$ac_dir/$ac_word"
  2033. break
  2034. fi
  2035. done
  2036. IFS="$ac_save_ifs"
  2037. test -z "$ac_cv_path_YACCPATH" && ac_cv_path_YACCPATH="no"
  2038. ;;
  2039. esac
  2040. YACCPATH="$ac_cv_path_YACCPATH"
  2041. if test -n "$YACCPATH"; then
  2042. echo "$ac_t""$YACCPATH" 1>&6
  2043. else
  2044. echo "$ac_t""no" 1>&6
  2045. fi
  2046. if test "$YACCPATH" = "no"; then
  2047. { echo "configure: error: *** Unable to locate yacc." 1>&2; exit 1; }
  2048. fi
  2049. fi
  2050. # Extract the first word of "ranlib", so it can be a program name with args.
  2051. set dummy ranlib; ac_word=$2
  2052. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2053. echo "configure:2560: checking for $ac_word" >&5
  2054. if test -n "$RANLIB"; then
  2055. ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  2056. else
  2057. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2058. ac_dummy="$PATH"
  2059. for ac_dir in $ac_dummy; do
  2060. test -z "$ac_dir" && ac_dir=.
  2061. if test -f $ac_dir/$ac_word; then
  2062. ac_cv_prog_RANLIB="ranlib"
  2063. break
  2064. fi
  2065. done
  2066. IFS="$ac_save_ifs"
  2067. test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  2068. fi
  2069. RANLIB="$ac_cv_prog_RANLIB"
  2070. if test -n "$RANLIB"; then
  2071. echo "$ac_t""$RANLIB" 1>&6
  2072. else
  2073. echo "$ac_t""no" 1>&6
  2074. fi
  2075. for ac_prog in ar
  2076. do
  2077. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2078. set dummy $ac_prog; ac_word=$2
  2079. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2080. echo "configure:2589: checking for $ac_word" >&5
  2081. if test -n "$AR"; then
  2082. ac_cv_prog_AR="$AR" # Let the user override the test.
  2083. else
  2084. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2085. ac_dummy="$PATH"
  2086. for ac_dir in $ac_dummy; do
  2087. test -z "$ac_dir" && ac_dir=.
  2088. if test -f $ac_dir/$ac_word; then
  2089. ac_cv_prog_AR="$ac_prog"
  2090. break
  2091. fi
  2092. done
  2093. IFS="$ac_save_ifs"
  2094. fi
  2095. AR="$ac_cv_prog_AR"
  2096. if test -n "$AR"; then
  2097. echo "$ac_t""$AR" 1>&6
  2098. else
  2099. echo "$ac_t""no" 1>&6
  2100. fi
  2101. test -n "$AR" && break
  2102. done
  2103. for ac_prog in env
  2104. do
  2105. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2106. set dummy $ac_prog; ac_word=$2
  2107. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2108. echo "configure:2620: checking for $ac_word" >&5
  2109. if test -n "$ENV"; then
  2110. ac_cv_prog_ENV="$ENV" # Let the user override the test.
  2111. else
  2112. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2113. ac_dummy="$PATH"
  2114. for ac_dir in $ac_dummy; do
  2115. test -z "$ac_dir" && ac_dir=.
  2116. if test -f $ac_dir/$ac_word; then
  2117. ac_cv_prog_ENV="$ac_prog"
  2118. break
  2119. fi
  2120. done
  2121. IFS="$ac_save_ifs"
  2122. fi
  2123. ENV="$ac_cv_prog_ENV"
  2124. if test -n "$ENV"; then
  2125. echo "$ac_t""$ENV" 1>&6
  2126. else
  2127. echo "$ac_t""no" 1>&6
  2128. fi
  2129. test -n "$ENV" && break
  2130. done
  2131. # Extract the first word of "perl", so it can be a program name with args.
  2132. set dummy perl; ac_word=$2
  2133. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2134. echo "configure:2649: checking for $ac_word" >&5
  2135. case "$PERL" in
  2136. /*)
  2137. ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
  2138. ;;
  2139. ?:/*)
  2140. ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
  2141. ;;
  2142. *)
  2143. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2144. ac_dummy="$PATH"
  2145. for ac_dir in $ac_dummy; do
  2146. test -z "$ac_dir" && ac_dir=.
  2147. if test -f $ac_dir/$ac_word; then
  2148. ac_cv_path_PERL="$ac_dir/$ac_word"
  2149. break
  2150. fi
  2151. done
  2152. IFS="$ac_save_ifs"
  2153. test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no"
  2154. ;;
  2155. esac
  2156. PERL="$ac_cv_path_PERL"
  2157. if test -n "$PERL"; then
  2158. echo "$ac_t""$PERL" 1>&6
  2159. else
  2160. echo "$ac_t""no" 1>&6
  2161. fi
  2162. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  2163. echo "configure:2680: checking how to run the C preprocessor" >&5
  2164. # On Suns, sometimes $CPP names a directory.
  2165. if test -n "$CPP" && test -d "$CPP"; then
  2166. CPP=
  2167. fi
  2168. if test -z "$CPP"; then
  2169. # This must be in double quotes, not single quotes, because CPP may get
  2170. # substituted into the Makefile and "${CC-cc}" will confuse make.
  2171. CPP="${CC-cc} -E"
  2172. # On the NeXT, cc -E runs the code through the compiler's parser,
  2173. # not just through cpp.
  2174. cat > conftest.$ac_ext <<EOF
  2175. #line 2693 "configure"
  2176. #include "confdefs.h"
  2177. #include <assert.h>
  2178. Syntax Error
  2179. EOF
  2180. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2181. { (eval echo configure:2699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2182. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2183. if test -z "$ac_err"; then
  2184. :
  2185. else
  2186. echo "$ac_err" >&5
  2187. echo "configure: failed program was:" >&5
  2188. cat conftest.$ac_ext >&5
  2189. rm -rf conftest*
  2190. CPP="${CC-cc} -E -traditional-cpp"
  2191. cat > conftest.$ac_ext <<EOF
  2192. #line 2710 "configure"
  2193. #include "confdefs.h"
  2194. #include <assert.h>
  2195. Syntax Error
  2196. EOF
  2197. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2198. { (eval echo configure:2716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2199. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2200. if test -z "$ac_err"; then
  2201. :
  2202. else
  2203. echo "$ac_err" >&5
  2204. echo "configure: failed program was:" >&5
  2205. cat conftest.$ac_ext >&5
  2206. rm -rf conftest*
  2207. CPP="${CC-cc} -nologo -E"
  2208. cat > conftest.$ac_ext <<EOF
  2209. #line 2727 "configure"
  2210. #include "confdefs.h"
  2211. #include <assert.h>
  2212. Syntax Error
  2213. EOF
  2214. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2215. { (eval echo configure:2733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2216. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2217. if test -z "$ac_err"; then
  2218. :
  2219. else
  2220. echo "$ac_err" >&5
  2221. echo "configure: failed program was:" >&5
  2222. cat conftest.$ac_ext >&5
  2223. rm -rf conftest*
  2224. CPP=/lib/cpp
  2225. fi
  2226. rm -f conftest*
  2227. fi
  2228. rm -f conftest*
  2229. fi
  2230. rm -f conftest*
  2231. ac_cv_prog_CPP="$CPP"
  2232. CPP="$ac_cv_prog_CPP"
  2233. else
  2234. ac_cv_prog_CPP="$CPP"
  2235. fi
  2236. echo "$ac_t""$CPP" 1>&6
  2237. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  2238. echo "configure:2757: checking for ANSI C header files" >&5
  2239. cat > conftest.$ac_ext <<EOF
  2240. #line 2760 "configure"
  2241. #include "confdefs.h"
  2242. #include <stdlib.h>
  2243. #include <stdarg.h>
  2244. #include <string.h>
  2245. #include <float.h>
  2246. EOF
  2247. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2248. { (eval echo configure:2768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2249. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2250. if test -z "$ac_err"; then
  2251. rm -rf conftest*
  2252. ac_cv_header_stdc=yes
  2253. else
  2254. echo "$ac_err" >&5
  2255. echo "configure: failed program was:" >&5
  2256. cat conftest.$ac_ext >&5
  2257. rm -rf conftest*
  2258. ac_cv_header_stdc=no
  2259. fi
  2260. rm -f conftest*
  2261. if test $ac_cv_header_stdc = yes; then
  2262. # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  2263. cat > conftest.$ac_ext <<EOF
  2264. #line 2785 "configure"
  2265. #include "confdefs.h"
  2266. #include <string.h>
  2267. EOF
  2268. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2269. egrep "memchr" >/dev/null 2>&1; then
  2270. :
  2271. else
  2272. rm -rf conftest*
  2273. ac_cv_header_stdc=no
  2274. fi
  2275. rm -f conftest*
  2276. fi
  2277. if test $ac_cv_header_stdc = yes; then
  2278. # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  2279. cat > conftest.$ac_ext <<EOF
  2280. #line 2803 "configure"
  2281. #include "confdefs.h"
  2282. #include <stdlib.h>
  2283. EOF
  2284. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2285. egrep "free" >/dev/null 2>&1; then
  2286. :
  2287. else
  2288. rm -rf conftest*
  2289. ac_cv_header_stdc=no
  2290. fi
  2291. rm -f conftest*
  2292. fi
  2293. if test $ac_cv_header_stdc = yes; then
  2294. # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  2295. if test "$cross_compiling" = yes; then
  2296. :
  2297. else
  2298. cat > conftest.$ac_ext <<EOF
  2299. #line 2824 "configure"
  2300. #include "confdefs.h"
  2301. #include <ctype.h>
  2302. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  2303. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  2304. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  2305. int main () { int i; for (i = 0; i < 256; i++)
  2306. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  2307. exit (0); }
  2308. EOF
  2309. if { (eval echo configure:2835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2310. then
  2311. :
  2312. else
  2313. echo "configure: failed program was:" >&5
  2314. cat conftest.$ac_ext >&5
  2315. rm -fr conftest*
  2316. ac_cv_header_stdc=no
  2317. fi
  2318. rm -fr conftest*
  2319. fi
  2320. fi
  2321. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  2322. if test $ac_cv_header_stdc = yes; then
  2323. cat >> confdefs.h <<\EOF
  2324. #define STDC_HEADERS 1
  2325. EOF
  2326. fi
  2327. #AC_CHECK_HEADERS(curses.h limits.h termio.h termios.h unistd.h values.h)
  2328. for ac_hdr in limits.h termio.h termios.h unistd.h values.h f2c.h g2c.h
  2329. do
  2330. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2331. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2332. echo "configure:2862: checking for $ac_hdr" >&5
  2333. cat > conftest.$ac_ext <<EOF
  2334. #line 2865 "configure"
  2335. #include "confdefs.h"
  2336. #include <$ac_hdr>
  2337. EOF
  2338. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2339. { (eval echo configure:2870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2340. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2341. if test -z "$ac_err"; then
  2342. rm -rf conftest*
  2343. eval "ac_cv_header_$ac_safe=yes"
  2344. else
  2345. echo "$ac_err" >&5
  2346. echo "configure: failed program was:" >&5
  2347. cat conftest.$ac_ext >&5
  2348. rm -rf conftest*
  2349. eval "ac_cv_header_$ac_safe=no"
  2350. fi
  2351. rm -f conftest*
  2352. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2353. echo "$ac_t""yes" 1>&6
  2354. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2355. cat >> confdefs.h <<EOF
  2356. #define $ac_tr_hdr 1
  2357. EOF
  2358. else
  2359. echo "$ac_t""no" 1>&6
  2360. fi
  2361. done
  2362. for ac_hdr in sys/ioctl.h sys/mtio.h sys/resource.h sys/time.h
  2363. do
  2364. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2365. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2366. echo "configure:2899: checking for $ac_hdr" >&5
  2367. cat > conftest.$ac_ext <<EOF
  2368. #line 2902 "configure"
  2369. #include "confdefs.h"
  2370. #include <$ac_hdr>
  2371. EOF
  2372. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2373. { (eval echo configure:2907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2374. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2375. if test -z "$ac_err"; then
  2376. rm -rf conftest*
  2377. eval "ac_cv_header_$ac_safe=yes"
  2378. else
  2379. echo "$ac_err" >&5
  2380. echo "configure: failed program was:" >&5
  2381. cat conftest.$ac_ext >&5
  2382. rm -rf conftest*
  2383. eval "ac_cv_header_$ac_safe=no"
  2384. fi
  2385. rm -f conftest*
  2386. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2387. echo "$ac_t""yes" 1>&6
  2388. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2389. cat >> confdefs.h <<EOF
  2390. #define $ac_tr_hdr 1
  2391. EOF
  2392. else
  2393. echo "$ac_t""no" 1>&6
  2394. fi
  2395. done
  2396. for ac_hdr in sys/timeb.h sys/types.h sys/utsname.h
  2397. do
  2398. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2399. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2400. echo "configure:2936: checking for $ac_hdr" >&5
  2401. cat > conftest.$ac_ext <<EOF
  2402. #line 2939 "configure"
  2403. #include "confdefs.h"
  2404. #include <$ac_hdr>
  2405. EOF
  2406. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2407. { (eval echo configure:2944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2408. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2409. if test -z "$ac_err"; then
  2410. rm -rf conftest*
  2411. eval "ac_cv_header_$ac_safe=yes"
  2412. else
  2413. echo "$ac_err" >&5
  2414. echo "configure: failed program was:" >&5
  2415. cat conftest.$ac_ext >&5
  2416. rm -rf conftest*
  2417. eval "ac_cv_header_$ac_safe=no"
  2418. fi
  2419. rm -f conftest*
  2420. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2421. echo "$ac_t""yes" 1>&6
  2422. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2423. cat >> confdefs.h <<EOF
  2424. #define $ac_tr_hdr 1
  2425. EOF
  2426. else
  2427. echo "$ac_t""no" 1>&6
  2428. fi
  2429. done
  2430. for ac_hdr in libintl.h iconv.h
  2431. do
  2432. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2433. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2434. echo "configure:2973: checking for $ac_hdr" >&5
  2435. cat > conftest.$ac_ext <<EOF
  2436. #line 2976 "configure"
  2437. #include "confdefs.h"
  2438. #include <$ac_hdr>
  2439. EOF
  2440. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2441. { (eval echo configure:2981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2442. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2443. if test -z "$ac_err"; then
  2444. rm -rf conftest*
  2445. eval "ac_cv_header_$ac_safe=yes"
  2446. else
  2447. echo "$ac_err" >&5
  2448. echo "configure: failed program was:" >&5
  2449. cat conftest.$ac_ext >&5
  2450. rm -rf conftest*
  2451. eval "ac_cv_header_$ac_safe=no"
  2452. fi
  2453. rm -f conftest*
  2454. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2455. echo "$ac_t""yes" 1>&6
  2456. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2457. cat >> confdefs.h <<EOF
  2458. #define $ac_tr_hdr 1
  2459. EOF
  2460. else
  2461. echo "$ac_t""no" 1>&6
  2462. fi
  2463. done
  2464. for ac_hdr in langinfo.h
  2465. do
  2466. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2467. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2468. echo "configure:3010: checking for $ac_hdr" >&5
  2469. cat > conftest.$ac_ext <<EOF
  2470. #line 3013 "configure"
  2471. #include "confdefs.h"
  2472. #include <$ac_hdr>
  2473. EOF
  2474. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2475. { (eval echo configure:3018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2476. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2477. if test -z "$ac_err"; then
  2478. rm -rf conftest*
  2479. eval "ac_cv_header_$ac_safe=yes"
  2480. else
  2481. echo "$ac_err" >&5
  2482. echo "configure: failed program was:" >&5
  2483. cat conftest.$ac_ext >&5
  2484. rm -rf conftest*
  2485. eval "ac_cv_header_$ac_safe=no"
  2486. fi
  2487. rm -f conftest*
  2488. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2489. echo "$ac_t""yes" 1>&6
  2490. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2491. cat >> confdefs.h <<EOF
  2492. #define $ac_tr_hdr 1
  2493. EOF
  2494. else
  2495. echo "$ac_t""no" 1>&6
  2496. fi
  2497. done
  2498. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  2499. echo "configure:3044: checking whether time.h and sys/time.h may both be included" >&5
  2500. cat > conftest.$ac_ext <<EOF
  2501. #line 3047 "configure"
  2502. #include "confdefs.h"
  2503. #include <sys/types.h>
  2504. #include <sys/time.h>
  2505. #include <time.h>
  2506. int main() {
  2507. struct tm *tp;
  2508. ; return 0; }
  2509. EOF
  2510. if { (eval echo configure:3056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2511. rm -rf conftest*
  2512. ac_cv_header_time=yes
  2513. else
  2514. echo "configure: failed program was:" >&5
  2515. cat conftest.$ac_ext >&5
  2516. rm -rf conftest*
  2517. ac_cv_header_time=no
  2518. fi
  2519. rm -f conftest*
  2520. echo "$ac_t""$ac_cv_header_time" 1>&6
  2521. if test $ac_cv_header_time = yes; then
  2522. cat >> confdefs.h <<\EOF
  2523. #define TIME_WITH_SYS_TIME 1
  2524. EOF
  2525. fi
  2526. echo $ac_n "checking for off_t""... $ac_c" 1>&6
  2527. echo "configure:3076: checking for off_t" >&5
  2528. cat > conftest.$ac_ext <<EOF
  2529. #line 3079 "configure"
  2530. #include "confdefs.h"
  2531. #include <sys/types.h>
  2532. #if STDC_HEADERS
  2533. #include <stdlib.h>
  2534. #include <stddef.h>
  2535. #endif
  2536. EOF
  2537. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2538. egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  2539. rm -rf conftest*
  2540. ac_cv_type_off_t=yes
  2541. else
  2542. rm -rf conftest*
  2543. ac_cv_type_off_t=no
  2544. fi
  2545. rm -f conftest*
  2546. echo "$ac_t""$ac_cv_type_off_t" 1>&6
  2547. if test $ac_cv_type_off_t = no; then
  2548. cat >> confdefs.h <<\EOF
  2549. #define off_t long
  2550. EOF
  2551. fi
  2552. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  2553. echo "configure:3106: checking for uid_t in sys/types.h" >&5
  2554. cat > conftest.$ac_ext <<EOF
  2555. #line 3109 "configure"
  2556. #include "confdefs.h"
  2557. #include <sys/types.h>
  2558. EOF
  2559. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2560. egrep "uid_t" >/dev/null 2>&1; then
  2561. rm -rf conftest*
  2562. ac_cv_type_uid_t=yes
  2563. else
  2564. rm -rf conftest*
  2565. ac_cv_type_uid_t=no
  2566. fi
  2567. rm -f conftest*
  2568. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  2569. if test $ac_cv_type_uid_t = no; then
  2570. cat >> confdefs.h <<\EOF
  2571. #define uid_t int
  2572. EOF
  2573. cat >> confdefs.h <<\EOF
  2574. #define gid_t int
  2575. EOF
  2576. fi
  2577. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  2578. echo "configure:3137: checking return type of signal handlers" >&5
  2579. cat > conftest.$ac_ext <<EOF
  2580. #line 3140 "configure"
  2581. #include "confdefs.h"
  2582. #include <sys/types.h>
  2583. #include <signal.h>
  2584. #ifdef signal
  2585. #undef signal
  2586. #endif
  2587. #ifdef __cplusplus
  2588. extern "C" void (*signal (int, void (*)(int)))(int);
  2589. #else
  2590. void (*signal ()) ();
  2591. #endif
  2592. int main() {
  2593. int i;
  2594. ; return 0; }
  2595. EOF
  2596. if { (eval echo configure:3157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2597. rm -rf conftest*
  2598. ac_cv_type_signal=void
  2599. else
  2600. echo "configure: failed program was:" >&5
  2601. cat conftest.$ac_ext >&5
  2602. rm -rf conftest*
  2603. ac_cv_type_signal=int
  2604. fi
  2605. rm -f conftest*
  2606. echo "$ac_t""$ac_cv_type_signal" 1>&6
  2607. cat >> confdefs.h <<EOF
  2608. #define RETSIGTYPE $ac_cv_type_signal
  2609. EOF
  2610. echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
  2611. echo "configure:3175: checking for Cygwin environment" >&5
  2612. cat > conftest.$ac_ext <<EOF
  2613. #line 3178 "configure"
  2614. #include "confdefs.h"
  2615. int main() {
  2616. #ifndef __CYGWIN__
  2617. #define __CYGWIN__ __CYGWIN32__
  2618. #endif
  2619. return __CYGWIN__;
  2620. ; return 0; }
  2621. EOF
  2622. if { (eval echo configure:3189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2623. rm -rf conftest*
  2624. ac_cv_cygwin=yes
  2625. else
  2626. echo "configure: failed program was:" >&5
  2627. cat conftest.$ac_ext >&5
  2628. rm -rf conftest*
  2629. ac_cv_cygwin=no
  2630. fi
  2631. rm -f conftest*
  2632. rm -f conftest*
  2633. echo "$ac_t""$ac_cv_cygwin" 1>&6
  2634. CYGWIN=
  2635. test "$ac_cv_cygwin" = yes && CYGWIN=yes
  2636. for ac_func in ftime gethostname gettimeofday lseek nice time uname
  2637. do
  2638. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2639. echo "configure:3207: checking for $ac_func" >&5
  2640. cat > conftest.$ac_ext <<EOF
  2641. #line 3210 "configure"
  2642. #include "confdefs.h"
  2643. /* System header to define __stub macros and hopefully few prototypes,
  2644. which can conflict with char $ac_func(); below. */
  2645. #include <assert.h>
  2646. /* Override any gcc2 internal prototype to avoid an error. */
  2647. /* We use char because int might match the return type of a gcc2
  2648. builtin and then its argument prototype would still apply. */
  2649. char $ac_func();
  2650. int main() {
  2651. /* The GNU C library defines this for functions which it implements
  2652. to always fail with ENOSYS. Some functions are actually named
  2653. something starting with __ and the normal name is an alias. */
  2654. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2655. choke me
  2656. #else
  2657. $ac_func();
  2658. #endif
  2659. ; return 0; }
  2660. EOF
  2661. if { (eval echo configure:3233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2662. rm -rf conftest*
  2663. eval "ac_cv_func_$ac_func=yes"
  2664. else
  2665. echo "configure: failed program was:" >&5
  2666. cat conftest.$ac_ext >&5
  2667. rm -rf conftest*
  2668. eval "ac_cv_func_$ac_func=no"
  2669. fi
  2670. rm -f conftest*
  2671. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2672. echo "$ac_t""yes" 1>&6
  2673. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2674. cat >> confdefs.h <<EOF
  2675. #define $ac_tr_func 1
  2676. EOF
  2677. else
  2678. echo "$ac_t""no" 1>&6
  2679. fi
  2680. done
  2681. for ac_func in seteuid setpriority setreuid setruid
  2682. do
  2683. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2684. echo "configure:3259: checking for $ac_func" >&5
  2685. cat > conftest.$ac_ext <<EOF
  2686. #line 3262 "configure"
  2687. #include "confdefs.h"
  2688. /* System header to define __stub macros and hopefully few prototypes,
  2689. which can conflict with char $ac_func(); below. */
  2690. #include <assert.h>
  2691. /* Override any gcc2 internal prototype to avoid an error. */
  2692. /* We use char because int might match the return type of a gcc2
  2693. builtin and then its argument prototype would still apply. */
  2694. char $ac_func();
  2695. int main() {
  2696. /* The GNU C library defines this for functions which it implements
  2697. to always fail with ENOSYS. Some functions are actually named
  2698. something starting with __ and the normal name is an alias. */
  2699. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2700. choke me
  2701. #else
  2702. $ac_func();
  2703. #endif
  2704. ; return 0; }
  2705. EOF
  2706. if { (eval echo configure:3285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2707. rm -rf conftest*
  2708. eval "ac_cv_func_$ac_func=yes"
  2709. else
  2710. echo "configure: failed program was:" >&5
  2711. cat conftest.$ac_ext >&5
  2712. rm -rf conftest*
  2713. eval "ac_cv_func_$ac_func=no"
  2714. fi
  2715. rm -f conftest*
  2716. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2717. echo "$ac_t""yes" 1>&6
  2718. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2719. cat >> confdefs.h <<EOF
  2720. #define $ac_tr_func 1
  2721. EOF
  2722. else
  2723. echo "$ac_t""no" 1>&6
  2724. fi
  2725. done
  2726. for ac_func in drand48
  2727. do
  2728. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2729. echo "configure:3311: checking for $ac_func" >&5
  2730. cat > conftest.$ac_ext <<EOF
  2731. #line 3314 "configure"
  2732. #include "confdefs.h"
  2733. /* System header to define __stub macros and hopefully few prototypes,
  2734. which can conflict with char $ac_func(); below. */
  2735. #include <assert.h>
  2736. /* Override any gcc2 internal prototype to avoid an error. */
  2737. /* We use char because int might match the return type of a gcc2
  2738. builtin and then its argument prototype would still apply. */
  2739. char $ac_func();
  2740. int main() {
  2741. /* The GNU C library defines this for functions which it implements
  2742. to always fail with ENOSYS. Some functions are actually named
  2743. something starting with __ and the normal name is an alias. */
  2744. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2745. choke me
  2746. #else
  2747. $ac_func();
  2748. #endif
  2749. ; return 0; }
  2750. EOF
  2751. if { (eval echo configure:3337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2752. rm -rf conftest*
  2753. eval "ac_cv_func_$ac_func=yes"
  2754. else
  2755. echo "configure: failed program was:" >&5
  2756. cat conftest.$ac_ext >&5
  2757. rm -rf conftest*
  2758. eval "ac_cv_func_$ac_func=no"
  2759. fi
  2760. rm -f conftest*
  2761. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2762. echo "$ac_t""yes" 1>&6
  2763. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2764. cat >> confdefs.h <<EOF
  2765. #define $ac_tr_func 1
  2766. EOF
  2767. else
  2768. echo "$ac_t""no" 1>&6
  2769. fi
  2770. done
  2771. for ac_func in putenv setenv
  2772. do
  2773. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2774. echo "configure:3363: checking for $ac_func" >&5
  2775. cat > conftest.$ac_ext <<EOF
  2776. #line 3366 "configure"
  2777. #include "confdefs.h"
  2778. /* System header to define __stub macros and hopefully few prototypes,
  2779. which can conflict with char $ac_func(); below. */
  2780. #include <assert.h>
  2781. /* Override any gcc2 internal prototype to avoid an error. */
  2782. /* We use char because int might match the return type of a gcc2
  2783. builtin and then its argument prototype would still apply. */
  2784. char $ac_func();
  2785. int main() {
  2786. /* The GNU C library defines this for functions which it implements
  2787. to always fail with ENOSYS. Some functions are actually named
  2788. something starting with __ and the normal name is an alias. */
  2789. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2790. choke me
  2791. #else
  2792. $ac_func();
  2793. #endif
  2794. ; return 0; }
  2795. EOF
  2796. if { (eval echo configure:3389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2797. rm -rf conftest*
  2798. eval "ac_cv_func_$ac_func=yes"
  2799. else
  2800. echo "configure: failed program was:" >&5
  2801. cat conftest.$ac_ext >&5
  2802. rm -rf conftest*
  2803. eval "ac_cv_func_$ac_func=no"
  2804. fi
  2805. rm -f conftest*
  2806. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2807. echo "$ac_t""yes" 1>&6
  2808. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2809. cat >> confdefs.h <<EOF
  2810. #define $ac_tr_func 1
  2811. EOF
  2812. else
  2813. echo "$ac_t""no" 1>&6
  2814. fi
  2815. done
  2816. for ac_func in nanosleep
  2817. do
  2818. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2819. echo "configure:3415: checking for $ac_func" >&5
  2820. cat > conftest.$ac_ext <<EOF
  2821. #line 3418 "configure"
  2822. #include "confdefs.h"
  2823. /* System header to define __stub macros and hopefully few prototypes,
  2824. which can conflict with char $ac_func(); below. */
  2825. #include <assert.h>
  2826. /* Override any gcc2 internal prototype to avoid an error. */
  2827. /* We use char because int might match the return type of a gcc2
  2828. builtin and then its argument prototype would still apply. */
  2829. char $ac_func();
  2830. int main() {
  2831. /* The GNU C library defines this for functions which it implements
  2832. to always fail with ENOSYS. Some functions are actually named
  2833. something starting with __ and the normal name is an alias. */
  2834. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2835. choke me
  2836. #else
  2837. $ac_func();
  2838. #endif
  2839. ; return 0; }
  2840. EOF
  2841. if { (eval echo configure:3441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2842. rm -rf conftest*
  2843. eval "ac_cv_func_$ac_func=yes"
  2844. else
  2845. echo "configure: failed program was:" >&5
  2846. cat conftest.$ac_ext >&5
  2847. rm -rf conftest*
  2848. eval "ac_cv_func_$ac_func=no"
  2849. fi
  2850. rm -f conftest*
  2851. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2852. echo "$ac_t""yes" 1>&6
  2853. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2854. cat >> confdefs.h <<EOF
  2855. #define $ac_tr_func 1
  2856. EOF
  2857. else
  2858. echo "$ac_t""no" 1>&6
  2859. fi
  2860. done
  2861. if test "$cross_compiling" != "yes" ; then
  2862. echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
  2863. echo "configure:3466: checking whether setpgrp takes no argument" >&5
  2864. if test "$cross_compiling" = yes; then
  2865. { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
  2866. else
  2867. cat > conftest.$ac_ext <<EOF
  2868. #line 3472 "configure"
  2869. #include "confdefs.h"
  2870. #ifdef HAVE_UNISTD_H
  2871. #include <unistd.h>
  2872. #endif
  2873. /*
  2874. * If this system has a BSD-style setpgrp, which takes arguments, exit
  2875. * successfully.
  2876. */
  2877. main()
  2878. {
  2879. if (setpgrp(1,1) == -1)
  2880. exit(0);
  2881. else
  2882. exit(1);
  2883. }
  2884. EOF
  2885. if { (eval echo configure:3492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2886. then
  2887. ac_cv_func_setpgrp_void=no
  2888. else
  2889. echo "configure: failed program was:" >&5
  2890. cat conftest.$ac_ext >&5
  2891. rm -fr conftest*
  2892. ac_cv_func_setpgrp_void=yes
  2893. fi
  2894. rm -fr conftest*
  2895. fi
  2896. echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
  2897. if test $ac_cv_func_setpgrp_void = yes; then
  2898. cat >> confdefs.h <<\EOF
  2899. #define SETPGRP_VOID 1
  2900. EOF
  2901. fi
  2902. else
  2903. CROSS_COMPILING=1
  2904. fi
  2905. echo $ac_n "checking for long long int""... $ac_c" 1>&6
  2906. echo "configure:3520: checking for long long int" >&5
  2907. cat > conftest.$ac_ext <<EOF
  2908. #line 3522 "configure"
  2909. #include "confdefs.h"
  2910. int main() {
  2911. long long int x;
  2912. ; return 0; }
  2913. EOF
  2914. if { (eval echo configure:3529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2915. rm -rf conftest*
  2916. echo "$ac_t""yes" 1>&6
  2917. cat >> confdefs.h <<\EOF
  2918. #define HAVE_LONG_LONG_INT 1
  2919. EOF
  2920. else
  2921. echo "configure: failed program was:" >&5
  2922. cat conftest.$ac_ext >&5
  2923. rm -rf conftest*
  2924. echo "$ac_t""no" 1>&6
  2925. fi
  2926. rm -f conftest*
  2927. echo $ac_n "checking for W11""... $ac_c" 1>&6
  2928. echo "configure:3549: checking for W11" >&5
  2929. case "$enable_w11" in
  2930. yes|no) echo "$ac_t"""$enable_w11"" 1>&6 ;;
  2931. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  2932. esac
  2933. USE_X11=
  2934. USE_W11=
  2935. XLIB=
  2936. XTLIB=
  2937. if test "$enable_w11" = "yes" ; then
  2938. X_CFLAGS=-I${SRCDIR}/display/drivers/windows/libW11
  2939. X_LIBS='-L$(LIBDIR)'
  2940. USE_W11="1"
  2941. USE_X11="1"
  2942. XLIB=-lX11
  2943. CFLAGS="$CFLAGS -D__W98__"
  2944. else
  2945. # If we find X, set shell vars x_includes and x_libraries to the
  2946. # paths, otherwise set no_x=yes.
  2947. # Uses ac_ vars as temps to allow command line to override cache and checks.
  2948. # --without-x overrides everything else, but does not touch the cache.
  2949. echo $ac_n "checking for X""... $ac_c" 1>&6
  2950. echo "configure:3577: checking for X" >&5
  2951. # Check whether --with-x or --without-x was given.
  2952. if test "${with_x+set}" = set; then
  2953. withval="$with_x"
  2954. :
  2955. fi
  2956. # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
  2957. if test "x$with_x" = xno; then
  2958. # The user explicitly disabled X.
  2959. have_x=disabled
  2960. else
  2961. if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  2962. # Both variables are already set.
  2963. have_x=yes
  2964. else
  2965. # One or both of the vars are not set, and there is no cached value.
  2966. ac_x_includes=NO ac_x_libraries=NO
  2967. rm -fr conftestdir
  2968. if mkdir conftestdir; then
  2969. cd conftestdir
  2970. # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  2971. cat > Imakefile <<'EOF'
  2972. acfindx:
  2973. @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  2974. EOF
  2975. if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  2976. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  2977. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  2978. # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  2979. for ac_extension in a so sl; do
  2980. if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  2981. test -f $ac_im_libdir/libX11.$ac_extension; then
  2982. ac_im_usrlibdir=$ac_im_libdir; break
  2983. fi
  2984. done
  2985. # Screen out bogus values from the imake configuration. They are
  2986. # bogus both because they are the default anyway, and because
  2987. # using them would break gcc on systems where it needs fixed includes.
  2988. case "$ac_im_incroot" in
  2989. /usr/include) ;;
  2990. *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  2991. esac
  2992. case "$ac_im_usrlibdir" in
  2993. /usr/lib | /lib) ;;
  2994. *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  2995. esac
  2996. fi
  2997. cd ..
  2998. rm -fr conftestdir
  2999. fi
  3000. if test "$ac_x_includes" = NO; then
  3001. # Guess where to find include files, by looking for this one X11 .h file.
  3002. test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  3003. # First, try using that file with no special directory specified.
  3004. cat > conftest.$ac_ext <<EOF
  3005. #line 3637 "configure"
  3006. #include "confdefs.h"
  3007. #include <$x_direct_test_include>
  3008. EOF
  3009. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3010. { (eval echo configure:3642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3011. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3012. if test -z "$ac_err"; then
  3013. rm -rf conftest*
  3014. # We can compile using X headers with no special include directory.
  3015. ac_x_includes=
  3016. else
  3017. echo "$ac_err" >&5
  3018. echo "configure: failed program was:" >&5
  3019. cat conftest.$ac_ext >&5
  3020. rm -rf conftest*
  3021. # Look for the header file in a standard set of common directories.
  3022. # Check X11 before X11Rn because it is often a symlink to the current release.
  3023. for ac_dir in \
  3024. /usr/X11/include \
  3025. /usr/X11R6/include \
  3026. /usr/X11R5/include \
  3027. /usr/X11R4/include \
  3028. \
  3029. /usr/include/X11 \
  3030. /usr/include/X11R6 \
  3031. /usr/include/X11R5 \
  3032. /usr/include/X11R4 \
  3033. \
  3034. /usr/local/X11/include \
  3035. /usr/local/X11R6/include \
  3036. /usr/local/X11R5/include \
  3037. /usr/local/X11R4/include \
  3038. \
  3039. /usr/local/include/X11 \
  3040. /usr/local/include/X11R6 \
  3041. /usr/local/include/X11R5 \
  3042. /usr/local/include/X11R4 \
  3043. \
  3044. /usr/X386/include \
  3045. /usr/x386/include \
  3046. /usr/XFree86/include/X11 \
  3047. \
  3048. /usr/include \
  3049. /usr/local/include \
  3050. /usr/unsupported/include \
  3051. /usr/athena/include \
  3052. /usr/local/x11r5/include \
  3053. /usr/lpp/Xamples/include \
  3054. \
  3055. /usr/openwin/include \
  3056. /usr/openwin/share/include \
  3057. ; \
  3058. do
  3059. if test -r "$ac_dir/$x_direct_test_include"; then
  3060. ac_x_includes=$ac_dir
  3061. break
  3062. fi
  3063. done
  3064. fi
  3065. rm -f conftest*
  3066. fi # $ac_x_includes = NO
  3067. if test "$ac_x_libraries" = NO; then
  3068. # Check for the libraries.
  3069. test -z "$x_direct_test_library" && x_direct_test_library=Xt
  3070. test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  3071. # See if we find them without any special options.
  3072. # Don't add to $LIBS permanently.
  3073. ac_save_LIBS="$LIBS"
  3074. LIBS="-l$x_direct_test_library $LIBS"
  3075. cat > conftest.$ac_ext <<EOF
  3076. #line 3711 "configure"
  3077. #include "confdefs.h"
  3078. int main() {
  3079. ${x_direct_test_function}()
  3080. ; return 0; }
  3081. EOF
  3082. if { (eval echo configure:3718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3083. rm -rf conftest*
  3084. LIBS="$ac_save_LIBS"
  3085. # We can link X programs with no special library path.
  3086. ac_x_libraries=
  3087. else
  3088. echo "configure: failed program was:" >&5
  3089. cat conftest.$ac_ext >&5
  3090. rm -rf conftest*
  3091. LIBS="$ac_save_LIBS"
  3092. # First see if replacing the include by lib works.
  3093. # Check X11 before X11Rn because it is often a symlink to the current release.
  3094. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  3095. /usr/X11/lib \
  3096. /usr/X11R6/lib \
  3097. /usr/X11R5/lib \
  3098. /usr/X11R4/lib \
  3099. \
  3100. /usr/lib/X11 \
  3101. /usr/lib/X11R6 \
  3102. /usr/lib/X11R5 \
  3103. /usr/lib/X11R4 \
  3104. \
  3105. /usr/local/X11/lib \
  3106. /usr/local/X11R6/lib \
  3107. /usr/local/X11R5/lib \
  3108. /usr/local/X11R4/lib \
  3109. \
  3110. /usr/local/lib/X11 \
  3111. /usr/local/lib/X11R6 \
  3112. /usr/local/lib/X11R5 \
  3113. /usr/local/lib/X11R4 \
  3114. \
  3115. /usr/X386/lib \
  3116. /usr/x386/lib \
  3117. /usr/XFree86/lib/X11 \
  3118. \
  3119. /usr/lib \
  3120. /usr/local/lib \
  3121. /usr/unsupported/lib \
  3122. /usr/athena/lib \
  3123. /usr/local/x11r5/lib \
  3124. /usr/lpp/Xamples/lib \
  3125. /lib/usr/lib/X11 \
  3126. \
  3127. /usr/openwin/lib \
  3128. /usr/openwin/share/lib \
  3129. ; \
  3130. do
  3131. for ac_extension in a so sl; do
  3132. if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  3133. ac_x_libraries=$ac_dir
  3134. break 2
  3135. fi
  3136. done
  3137. done
  3138. fi
  3139. rm -f conftest*
  3140. fi # $ac_x_libraries = NO
  3141. if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  3142. # Didn't find X anywhere. Cache the known absence of X.
  3143. ac_cv_have_x="have_x=no"
  3144. else
  3145. # Record where we found X for the cache.
  3146. ac_cv_have_x="have_x=yes \
  3147. ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  3148. fi
  3149. fi
  3150. eval "$ac_cv_have_x"
  3151. fi # $with_x != no
  3152. if test "$have_x" != yes; then
  3153. echo "$ac_t""$have_x" 1>&6
  3154. no_x=yes
  3155. else
  3156. # If each of the values was on the command line, it overrides each guess.
  3157. test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  3158. test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  3159. # Update the cache value to reflect the command line values.
  3160. ac_cv_have_x="have_x=yes \
  3161. ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  3162. echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  3163. fi
  3164. if test "$no_x" = yes; then
  3165. # Not all programs may use this symbol, but it does not hurt to define it.
  3166. cat >> confdefs.h <<\EOF
  3167. #define X_DISPLAY_MISSING 1
  3168. EOF
  3169. X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
  3170. else
  3171. if test -n "$x_includes"; then
  3172. X_CFLAGS="$X_CFLAGS -I$x_includes"
  3173. fi
  3174. # It would also be nice to do this for all -L options, not just this one.
  3175. if test -n "$x_libraries"; then
  3176. X_LIBS="$X_LIBS -L$x_libraries"
  3177. # For Solaris; some versions of Sun CC require a space after -R and
  3178. # others require no space. Words are not sufficient . . . .
  3179. case "`(uname -sr) 2>/dev/null`" in
  3180. "SunOS 5"*)
  3181. echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
  3182. echo "configure:3823: checking whether -R must be followed by a space" >&5
  3183. ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
  3184. cat > conftest.$ac_ext <<EOF
  3185. #line 3826 "configure"
  3186. #include "confdefs.h"
  3187. int main() {
  3188. ; return 0; }
  3189. EOF
  3190. if { (eval echo configure:3833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3191. rm -rf conftest*
  3192. ac_R_nospace=yes
  3193. else
  3194. echo "configure: failed program was:" >&5
  3195. cat conftest.$ac_ext >&5
  3196. rm -rf conftest*
  3197. ac_R_nospace=no
  3198. fi
  3199. rm -f conftest*
  3200. if test $ac_R_nospace = yes; then
  3201. echo "$ac_t""no" 1>&6
  3202. X_LIBS="$X_LIBS -R$x_libraries"
  3203. else
  3204. LIBS="$ac_xsave_LIBS -R $x_libraries"
  3205. cat > conftest.$ac_ext <<EOF
  3206. #line 3849 "configure"
  3207. #include "confdefs.h"
  3208. int main() {
  3209. ; return 0; }
  3210. EOF
  3211. if { (eval echo configure:3856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3212. rm -rf conftest*
  3213. ac_R_space=yes
  3214. else
  3215. echo "configure: failed program was:" >&5
  3216. cat conftest.$ac_ext >&5
  3217. rm -rf conftest*
  3218. ac_R_space=no
  3219. fi
  3220. rm -f conftest*
  3221. if test $ac_R_space = yes; then
  3222. echo "$ac_t""yes" 1>&6
  3223. X_LIBS="$X_LIBS -R $x_libraries"
  3224. else
  3225. echo "$ac_t""neither works" 1>&6
  3226. fi
  3227. fi
  3228. LIBS="$ac_xsave_LIBS"
  3229. esac
  3230. fi
  3231. # Check for system-dependent libraries X programs must link with.
  3232. # Do this before checking for the system-independent R6 libraries
  3233. # (-lICE), since we may need -lsocket or whatever for X linking.
  3234. if test "$ISC" = yes; then
  3235. X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  3236. else
  3237. # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
  3238. # libraries were built with DECnet support. And karl@cs.umb.edu says
  3239. # the Alpha needs dnet_stub (dnet does not exist).
  3240. echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
  3241. echo "configure:3888: checking for dnet_ntoa in -ldnet" >&5
  3242. ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  3243. ac_save_LIBS="$LIBS"
  3244. LIBS="-ldnet $LIBS"
  3245. cat > conftest.$ac_ext <<EOF
  3246. #line 3894 "configure"
  3247. #include "confdefs.h"
  3248. /* Override any gcc2 internal prototype to avoid an error. */
  3249. /* We use char because int might match the return type of a gcc2
  3250. builtin and then its argument prototype would still apply. */
  3251. char dnet_ntoa();
  3252. int main() {
  3253. dnet_ntoa()
  3254. ; return 0; }
  3255. EOF
  3256. if { (eval echo configure:3905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3257. rm -rf conftest*
  3258. eval "ac_cv_lib_$ac_lib_var=yes"
  3259. else
  3260. echo "configure: failed program was:" >&5
  3261. cat conftest.$ac_ext >&5
  3262. rm -rf conftest*
  3263. eval "ac_cv_lib_$ac_lib_var=no"
  3264. fi
  3265. rm -f conftest*
  3266. LIBS="$ac_save_LIBS"
  3267. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3268. echo "$ac_t""yes" 1>&6
  3269. X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  3270. else
  3271. echo "$ac_t""no" 1>&6
  3272. fi
  3273. if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  3274. echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
  3275. echo "configure:3926: checking for dnet_ntoa in -ldnet_stub" >&5
  3276. ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  3277. ac_save_LIBS="$LIBS"
  3278. LIBS="-ldnet_stub $LIBS"
  3279. cat > conftest.$ac_ext <<EOF
  3280. #line 3932 "configure"
  3281. #include "confdefs.h"
  3282. /* Override any gcc2 internal prototype to avoid an error. */
  3283. /* We use char because int might match the return type of a gcc2
  3284. builtin and then its argument prototype would still apply. */
  3285. char dnet_ntoa();
  3286. int main() {
  3287. dnet_ntoa()
  3288. ; return 0; }
  3289. EOF
  3290. if { (eval echo configure:3943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3291. rm -rf conftest*
  3292. eval "ac_cv_lib_$ac_lib_var=yes"
  3293. else
  3294. echo "configure: failed program was:" >&5
  3295. cat conftest.$ac_ext >&5
  3296. rm -rf conftest*
  3297. eval "ac_cv_lib_$ac_lib_var=no"
  3298. fi
  3299. rm -f conftest*
  3300. LIBS="$ac_save_LIBS"
  3301. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3302. echo "$ac_t""yes" 1>&6
  3303. X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  3304. else
  3305. echo "$ac_t""no" 1>&6
  3306. fi
  3307. fi
  3308. # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
  3309. # to get the SysV transport functions.
  3310. # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
  3311. # needs -lnsl.
  3312. # The nsl library prevents programs from opening the X display
  3313. # on Irix 5.2, according to dickey@clark.net.
  3314. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  3315. echo "configure:3971: checking for gethostbyname" >&5
  3316. cat > conftest.$ac_ext <<EOF
  3317. #line 3974 "configure"
  3318. #include "confdefs.h"
  3319. /* System header to define __stub macros and hopefully few prototypes,
  3320. which can conflict with char gethostbyname(); below. */
  3321. #include <assert.h>
  3322. /* Override any gcc2 internal prototype to avoid an error. */
  3323. /* We use char because int might match the return type of a gcc2
  3324. builtin and then its argument prototype would still apply. */
  3325. char gethostbyname();
  3326. int main() {
  3327. /* The GNU C library defines this for functions which it implements
  3328. to always fail with ENOSYS. Some functions are actually named
  3329. something starting with __ and the normal name is an alias. */
  3330. #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  3331. choke me
  3332. #else
  3333. gethostbyname();
  3334. #endif
  3335. ; return 0; }
  3336. EOF
  3337. if { (eval echo configure:3997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3338. rm -rf conftest*
  3339. eval "ac_cv_func_gethostbyname=yes"
  3340. else
  3341. echo "configure: failed program was:" >&5
  3342. cat conftest.$ac_ext >&5
  3343. rm -rf conftest*
  3344. eval "ac_cv_func_gethostbyname=no"
  3345. fi
  3346. rm -f conftest*
  3347. if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  3348. echo "$ac_t""yes" 1>&6
  3349. :
  3350. else
  3351. echo "$ac_t""no" 1>&6
  3352. fi
  3353. if test $ac_cv_func_gethostbyname = no; then
  3354. echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
  3355. echo "configure:4017: checking for gethostbyname in -lnsl" >&5
  3356. ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
  3357. ac_save_LIBS="$LIBS"
  3358. LIBS="-lnsl $LIBS"
  3359. cat > conftest.$ac_ext <<EOF
  3360. #line 4023 "configure"
  3361. #include "confdefs.h"
  3362. /* Override any gcc2 internal prototype to avoid an error. */
  3363. /* We use char because int might match the return type of a gcc2
  3364. builtin and then its argument prototype would still apply. */
  3365. char gethostbyname();
  3366. int main() {
  3367. gethostbyname()
  3368. ; return 0; }
  3369. EOF
  3370. if { (eval echo configure:4034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3371. rm -rf conftest*
  3372. eval "ac_cv_lib_$ac_lib_var=yes"
  3373. else
  3374. echo "configure: failed program was:" >&5
  3375. cat conftest.$ac_ext >&5
  3376. rm -rf conftest*
  3377. eval "ac_cv_lib_$ac_lib_var=no"
  3378. fi
  3379. rm -f conftest*
  3380. LIBS="$ac_save_LIBS"
  3381. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3382. echo "$ac_t""yes" 1>&6
  3383. X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  3384. else
  3385. echo "$ac_t""no" 1>&6
  3386. fi
  3387. fi
  3388. # lieder@skyler.mavd.honeywell.com says without -lsocket,
  3389. # socket/setsockopt and other routines are undefined under SCO ODT
  3390. # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
  3391. # on later versions), says simon@lia.di.epfl.ch: it contains
  3392. # gethostby* variants that don't use the nameserver (or something).
  3393. # -lsocket must be given before -lnsl if both are needed.
  3394. # We assume that if connect needs -lnsl, so does gethostbyname.
  3395. echo $ac_n "checking for connect""... $ac_c" 1>&6
  3396. echo "configure:4063: checking for connect" >&5
  3397. cat > conftest.$ac_ext <<EOF
  3398. #line 4066 "configure"
  3399. #include "confdefs.h"
  3400. /* System header to define __stub macros and hopefully few prototypes,
  3401. which can conflict with char connect(); below. */
  3402. #include <assert.h>
  3403. /* Override any gcc2 internal prototype to avoid an error. */
  3404. /* We use char because int might match the return type of a gcc2
  3405. builtin and then its argument prototype would still apply. */
  3406. char connect();
  3407. int main() {
  3408. /* The GNU C library defines this for functions which it implements
  3409. to always fail with ENOSYS. Some functions are actually named
  3410. something starting with __ and the normal name is an alias. */
  3411. #if defined (__stub_connect) || defined (__stub___connect)
  3412. choke me
  3413. #else
  3414. connect();
  3415. #endif
  3416. ; return 0; }
  3417. EOF
  3418. if { (eval echo configure:4089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3419. rm -rf conftest*
  3420. eval "ac_cv_func_connect=yes"
  3421. else
  3422. echo "configure: failed program was:" >&5
  3423. cat conftest.$ac_ext >&5
  3424. rm -rf conftest*
  3425. eval "ac_cv_func_connect=no"
  3426. fi
  3427. rm -f conftest*
  3428. if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  3429. echo "$ac_t""yes" 1>&6
  3430. :
  3431. else
  3432. echo "$ac_t""no" 1>&6
  3433. fi
  3434. if test $ac_cv_func_connect = no; then
  3435. echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
  3436. echo "configure:4109: checking for connect in -lsocket" >&5
  3437. ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
  3438. ac_save_LIBS="$LIBS"
  3439. LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
  3440. cat > conftest.$ac_ext <<EOF
  3441. #line 4115 "configure"
  3442. #include "confdefs.h"
  3443. /* Override any gcc2 internal prototype to avoid an error. */
  3444. /* We use char because int might match the return type of a gcc2
  3445. builtin and then its argument prototype would still apply. */
  3446. char connect();
  3447. int main() {
  3448. connect()
  3449. ; return 0; }
  3450. EOF
  3451. if { (eval echo configure:4126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3452. rm -rf conftest*
  3453. eval "ac_cv_lib_$ac_lib_var=yes"
  3454. else
  3455. echo "configure: failed program was:" >&5
  3456. cat conftest.$ac_ext >&5
  3457. rm -rf conftest*
  3458. eval "ac_cv_lib_$ac_lib_var=no"
  3459. fi
  3460. rm -f conftest*
  3461. LIBS="$ac_save_LIBS"
  3462. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3463. echo "$ac_t""yes" 1>&6
  3464. X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
  3465. else
  3466. echo "$ac_t""no" 1>&6
  3467. fi
  3468. fi
  3469. # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
  3470. echo $ac_n "checking for remove""... $ac_c" 1>&6
  3471. echo "configure:4149: checking for remove" >&5
  3472. cat > conftest.$ac_ext <<EOF
  3473. #line 4152 "configure"
  3474. #include "confdefs.h"
  3475. /* System header to define __stub macros and hopefully few prototypes,
  3476. which can conflict with char remove(); below. */
  3477. #include <assert.h>
  3478. /* Override any gcc2 internal prototype to avoid an error. */
  3479. /* We use char because int might match the return type of a gcc2
  3480. builtin and then its argument prototype would still apply. */
  3481. char remove();
  3482. int main() {
  3483. /* The GNU C library defines this for functions which it implements
  3484. to always fail with ENOSYS. Some functions are actually named
  3485. something starting with __ and the normal name is an alias. */
  3486. #if defined (__stub_remove) || defined (__stub___remove)
  3487. choke me
  3488. #else
  3489. remove();
  3490. #endif
  3491. ; return 0; }
  3492. EOF
  3493. if { (eval echo configure:4175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3494. rm -rf conftest*
  3495. eval "ac_cv_func_remove=yes"
  3496. else
  3497. echo "configure: failed program was:" >&5
  3498. cat conftest.$ac_ext >&5
  3499. rm -rf conftest*
  3500. eval "ac_cv_func_remove=no"
  3501. fi
  3502. rm -f conftest*
  3503. if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  3504. echo "$ac_t""yes" 1>&6
  3505. :
  3506. else
  3507. echo "$ac_t""no" 1>&6
  3508. fi
  3509. if test $ac_cv_func_remove = no; then
  3510. echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
  3511. echo "configure:4195: checking for remove in -lposix" >&5
  3512. ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
  3513. ac_save_LIBS="$LIBS"
  3514. LIBS="-lposix $LIBS"
  3515. cat > conftest.$ac_ext <<EOF
  3516. #line 4201 "configure"
  3517. #include "confdefs.h"
  3518. /* Override any gcc2 internal prototype to avoid an error. */
  3519. /* We use char because int might match the return type of a gcc2
  3520. builtin and then its argument prototype would still apply. */
  3521. char remove();
  3522. int main() {
  3523. remove()
  3524. ; return 0; }
  3525. EOF
  3526. if { (eval echo configure:4212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3527. rm -rf conftest*
  3528. eval "ac_cv_lib_$ac_lib_var=yes"
  3529. else
  3530. echo "configure: failed program was:" >&5
  3531. cat conftest.$ac_ext >&5
  3532. rm -rf conftest*
  3533. eval "ac_cv_lib_$ac_lib_var=no"
  3534. fi
  3535. rm -f conftest*
  3536. LIBS="$ac_save_LIBS"
  3537. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3538. echo "$ac_t""yes" 1>&6
  3539. X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
  3540. else
  3541. echo "$ac_t""no" 1>&6
  3542. fi
  3543. fi
  3544. # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
  3545. echo $ac_n "checking for shmat""... $ac_c" 1>&6
  3546. echo "configure:4235: checking for shmat" >&5
  3547. cat > conftest.$ac_ext <<EOF
  3548. #line 4238 "configure"
  3549. #include "confdefs.h"
  3550. /* System header to define __stub macros and hopefully few prototypes,
  3551. which can conflict with char shmat(); below. */
  3552. #include <assert.h>
  3553. /* Override any gcc2 internal prototype to avoid an error. */
  3554. /* We use char because int might match the return type of a gcc2
  3555. builtin and then its argument prototype would still apply. */
  3556. char shmat();
  3557. int main() {
  3558. /* The GNU C library defines this for functions which it implements
  3559. to always fail with ENOSYS. Some functions are actually named
  3560. something starting with __ and the normal name is an alias. */
  3561. #if defined (__stub_shmat) || defined (__stub___shmat)
  3562. choke me
  3563. #else
  3564. shmat();
  3565. #endif
  3566. ; return 0; }
  3567. EOF
  3568. if { (eval echo configure:4261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3569. rm -rf conftest*
  3570. eval "ac_cv_func_shmat=yes"
  3571. else
  3572. echo "configure: failed program was:" >&5
  3573. cat conftest.$ac_ext >&5
  3574. rm -rf conftest*
  3575. eval "ac_cv_func_shmat=no"
  3576. fi
  3577. rm -f conftest*
  3578. if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  3579. echo "$ac_t""yes" 1>&6
  3580. :
  3581. else
  3582. echo "$ac_t""no" 1>&6
  3583. fi
  3584. if test $ac_cv_func_shmat = no; then
  3585. echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
  3586. echo "configure:4281: checking for shmat in -lipc" >&5
  3587. ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
  3588. ac_save_LIBS="$LIBS"
  3589. LIBS="-lipc $LIBS"
  3590. cat > conftest.$ac_ext <<EOF
  3591. #line 4287 "configure"
  3592. #include "confdefs.h"
  3593. /* Override any gcc2 internal prototype to avoid an error. */
  3594. /* We use char because int might match the return type of a gcc2
  3595. builtin and then its argument prototype would still apply. */
  3596. char shmat();
  3597. int main() {
  3598. shmat()
  3599. ; return 0; }
  3600. EOF
  3601. if { (eval echo configure:4298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3602. rm -rf conftest*
  3603. eval "ac_cv_lib_$ac_lib_var=yes"
  3604. else
  3605. echo "configure: failed program was:" >&5
  3606. cat conftest.$ac_ext >&5
  3607. rm -rf conftest*
  3608. eval "ac_cv_lib_$ac_lib_var=no"
  3609. fi
  3610. rm -f conftest*
  3611. LIBS="$ac_save_LIBS"
  3612. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3613. echo "$ac_t""yes" 1>&6
  3614. X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
  3615. else
  3616. echo "$ac_t""no" 1>&6
  3617. fi
  3618. fi
  3619. fi
  3620. # Check for libraries that X11R6 Xt/Xaw programs need.
  3621. ac_save_LDFLAGS="$LDFLAGS"
  3622. test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  3623. # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  3624. # check for ICE first), but we must link in the order -lSM -lICE or
  3625. # we get undefined symbols. So assume we have SM if we have ICE.
  3626. # These have to be linked with before -lX11, unlike the other
  3627. # libraries we check for below, so use a different variable.
  3628. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  3629. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
  3630. echo "configure:4330: checking for IceConnectionNumber in -lICE" >&5
  3631. ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
  3632. ac_save_LIBS="$LIBS"
  3633. LIBS="-lICE $X_EXTRA_LIBS $LIBS"
  3634. cat > conftest.$ac_ext <<EOF
  3635. #line 4336 "configure"
  3636. #include "confdefs.h"
  3637. /* Override any gcc2 internal prototype to avoid an error. */
  3638. /* We use char because int might match the return type of a gcc2
  3639. builtin and then its argument prototype would still apply. */
  3640. char IceConnectionNumber();
  3641. int main() {
  3642. IceConnectionNumber()
  3643. ; return 0; }
  3644. EOF
  3645. if { (eval echo configure:4347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3646. rm -rf conftest*
  3647. eval "ac_cv_lib_$ac_lib_var=yes"
  3648. else
  3649. echo "configure: failed program was:" >&5
  3650. cat conftest.$ac_ext >&5
  3651. rm -rf conftest*
  3652. eval "ac_cv_lib_$ac_lib_var=no"
  3653. fi
  3654. rm -f conftest*
  3655. LIBS="$ac_save_LIBS"
  3656. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3657. echo "$ac_t""yes" 1>&6
  3658. X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  3659. else
  3660. echo "$ac_t""no" 1>&6
  3661. fi
  3662. LDFLAGS="$ac_save_LDFLAGS"
  3663. fi
  3664. if test "$no_x" != "yes"; then
  3665. USE_X11="1"
  3666. XLIB=-lX11
  3667. XTLIB=-lXt
  3668. fi
  3669. fi
  3670. # Note that some systems (FreeBSD for example) need an extra library for
  3671. # cuserid
  3672. ac_save_libs="$LIBS"
  3673. LIBS=""
  3674. echo $ac_n "checking for library containing cuserid""... $ac_c" 1>&6
  3675. echo "configure:4387: checking for library containing cuserid" >&5
  3676. ac_func_search_save_LIBS="$LIBS"
  3677. ac_cv_search_cuserid="no"
  3678. cat > conftest.$ac_ext <<EOF
  3679. #line 4392 "configure"
  3680. #include "confdefs.h"
  3681. /* Override any gcc2 internal prototype to avoid an error. */
  3682. /* We use char because int might match the return type of a gcc2
  3683. builtin and then its argument prototype would still apply. */
  3684. char cuserid();
  3685. int main() {
  3686. cuserid()
  3687. ; return 0; }
  3688. EOF
  3689. if { (eval echo configure:4403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3690. rm -rf conftest*
  3691. ac_cv_search_cuserid="none required"
  3692. else
  3693. echo "configure: failed program was:" >&5
  3694. cat conftest.$ac_ext >&5
  3695. fi
  3696. rm -f conftest*
  3697. test "$ac_cv_search_cuserid" = "no" && for i in compat; do
  3698. LIBS="-l$i $ac_func_search_save_LIBS"
  3699. cat > conftest.$ac_ext <<EOF
  3700. #line 4414 "configure"
  3701. #include "confdefs.h"
  3702. /* Override any gcc2 internal prototype to avoid an error. */
  3703. /* We use char because int might match the return type of a gcc2
  3704. builtin and then its argument prototype would still apply. */
  3705. char cuserid();
  3706. int main() {
  3707. cuserid()
  3708. ; return 0; }
  3709. EOF
  3710. if { (eval echo configure:4425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3711. rm -rf conftest*
  3712. ac_cv_search_cuserid="-l$i"
  3713. break
  3714. else
  3715. echo "configure: failed program was:" >&5
  3716. cat conftest.$ac_ext >&5
  3717. fi
  3718. rm -f conftest*
  3719. done
  3720. LIBS="$ac_func_search_save_LIBS"
  3721. echo "$ac_t""$ac_cv_search_cuserid" 1>&6
  3722. if test "$ac_cv_search_cuserid" != "no"; then
  3723. test "$ac_cv_search_cuserid" = "none required" || LIBS="$ac_cv_search_cuserid $LIBS"
  3724. else :
  3725. fi
  3726. DBMIEXTRALIB="$LIBS"
  3727. LIBS="$ac_save_libs"
  3728. # Note: -lxdr -liberty -lws2_32 is for MinGW
  3729. echo $ac_n "checking for xdrmem_create""... $ac_c" 1>&6
  3730. echo "configure:4451: checking for xdrmem_create" >&5
  3731. cat > conftest.$ac_ext <<EOF
  3732. #line 4454 "configure"
  3733. #include "confdefs.h"
  3734. /* System header to define __stub macros and hopefully few prototypes,
  3735. which can conflict with char xdrmem_create(); below. */
  3736. #include <assert.h>
  3737. /* Override any gcc2 internal prototype to avoid an error. */
  3738. /* We use char because int might match the return type of a gcc2
  3739. builtin and then its argument prototype would still apply. */
  3740. char xdrmem_create();
  3741. int main() {
  3742. /* The GNU C library defines this for functions which it implements
  3743. to always fail with ENOSYS. Some functions are actually named
  3744. something starting with __ and the normal name is an alias. */
  3745. #if defined (__stub_xdrmem_create) || defined (__stub___xdrmem_create)
  3746. choke me
  3747. #else
  3748. xdrmem_create();
  3749. #endif
  3750. ; return 0; }
  3751. EOF
  3752. if { (eval echo configure:4477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3753. rm -rf conftest*
  3754. eval "ac_cv_func_xdrmem_create=yes"
  3755. else
  3756. echo "configure: failed program was:" >&5
  3757. cat conftest.$ac_ext >&5
  3758. rm -rf conftest*
  3759. eval "ac_cv_func_xdrmem_create=no"
  3760. fi
  3761. rm -f conftest*
  3762. if eval "test \"`echo '$ac_cv_func_'xdrmem_create`\" = yes"; then
  3763. echo "$ac_t""yes" 1>&6
  3764. XDRLIB=
  3765. else
  3766. echo "$ac_t""no" 1>&6
  3767. echo $ac_n "checking for xdrmem_create in -lsun""... $ac_c" 1>&6
  3768. echo "configure:4495: checking for xdrmem_create in -lsun" >&5
  3769. ac_lib_var=`echo sun'_'xdrmem_create | sed 'y%./+-%__p_%'`
  3770. ac_save_LIBS="$LIBS"
  3771. LIBS="-lsun $LIBS"
  3772. cat > conftest.$ac_ext <<EOF
  3773. #line 4501 "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 xdrmem_create();
  3779. int main() {
  3780. xdrmem_create()
  3781. ; return 0; }
  3782. EOF
  3783. if { (eval echo configure:4512: \"$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. XDRLIB=-lsun
  3797. else
  3798. echo "$ac_t""no" 1>&6
  3799. echo $ac_n "checking for xdrmem_create in -lnsl""... $ac_c" 1>&6
  3800. echo "configure:4531: checking for xdrmem_create in -lnsl" >&5
  3801. ac_lib_var=`echo nsl'_'xdrmem_create | sed 'y%./+-%__p_%'`
  3802. ac_save_LIBS="$LIBS"
  3803. LIBS="-lnsl $LIBS"
  3804. cat > conftest.$ac_ext <<EOF
  3805. #line 4537 "configure"
  3806. #include "confdefs.h"
  3807. /* Override any gcc2 internal prototype to avoid an error. */
  3808. /* We use char because int might match the return type of a gcc2
  3809. builtin and then its argument prototype would still apply. */
  3810. char xdrmem_create();
  3811. int main() {
  3812. xdrmem_create()
  3813. ; return 0; }
  3814. EOF
  3815. if { (eval echo configure:4548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3816. rm -rf conftest*
  3817. eval "ac_cv_lib_$ac_lib_var=yes"
  3818. else
  3819. echo "configure: failed program was:" >&5
  3820. cat conftest.$ac_ext >&5
  3821. rm -rf conftest*
  3822. eval "ac_cv_lib_$ac_lib_var=no"
  3823. fi
  3824. rm -f conftest*
  3825. LIBS="$ac_save_LIBS"
  3826. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3827. echo "$ac_t""yes" 1>&6
  3828. XDRLIB=-lnsl
  3829. else
  3830. echo "$ac_t""no" 1>&6
  3831. echo $ac_n "checking for xdrmem_create in -lrpclib""... $ac_c" 1>&6
  3832. echo "configure:4567: checking for xdrmem_create in -lrpclib" >&5
  3833. ac_lib_var=`echo rpclib'_'xdrmem_create | sed 'y%./+-%__p_%'`
  3834. ac_save_LIBS="$LIBS"
  3835. LIBS="-lrpclib $LIBS"
  3836. cat > conftest.$ac_ext <<EOF
  3837. #line 4573 "configure"
  3838. #include "confdefs.h"
  3839. /* Override any gcc2 internal prototype to avoid an error. */
  3840. /* We use char because int might match the return type of a gcc2
  3841. builtin and then its argument prototype would still apply. */
  3842. char xdrmem_create();
  3843. int main() {
  3844. xdrmem_create()
  3845. ; return 0; }
  3846. EOF
  3847. if { (eval echo configure:4584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3848. rm -rf conftest*
  3849. eval "ac_cv_lib_$ac_lib_var=yes"
  3850. else
  3851. echo "configure: failed program was:" >&5
  3852. cat conftest.$ac_ext >&5
  3853. rm -rf conftest*
  3854. eval "ac_cv_lib_$ac_lib_var=no"
  3855. fi
  3856. rm -f conftest*
  3857. LIBS="$ac_save_LIBS"
  3858. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3859. echo "$ac_t""yes" 1>&6
  3860. XDRLIB=-lrpclib
  3861. else
  3862. echo "$ac_t""no" 1>&6
  3863. echo $ac_n "checking for xdrmem_create in -lxdr""... $ac_c" 1>&6
  3864. echo "configure:4603: checking for xdrmem_create in -lxdr" >&5
  3865. ac_lib_var=`echo xdr'_'xdrmem_create | sed 'y%./+-%__p_%'`
  3866. ac_save_LIBS="$LIBS"
  3867. LIBS="-lxdr -liberty -lws2_32 $LIBS"
  3868. cat > conftest.$ac_ext <<EOF
  3869. #line 4609 "configure"
  3870. #include "confdefs.h"
  3871. /* Override any gcc2 internal prototype to avoid an error. */
  3872. /* We use char because int might match the return type of a gcc2
  3873. builtin and then its argument prototype would still apply. */
  3874. char xdrmem_create();
  3875. int main() {
  3876. xdrmem_create()
  3877. ; return 0; }
  3878. EOF
  3879. if { (eval echo configure:4620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3880. rm -rf conftest*
  3881. eval "ac_cv_lib_$ac_lib_var=yes"
  3882. else
  3883. echo "configure: failed program was:" >&5
  3884. cat conftest.$ac_ext >&5
  3885. rm -rf conftest*
  3886. eval "ac_cv_lib_$ac_lib_var=no"
  3887. fi
  3888. rm -f conftest*
  3889. LIBS="$ac_save_LIBS"
  3890. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3891. echo "$ac_t""yes" 1>&6
  3892. XDRLIB="-lxdr -liberty -lws2_32"
  3893. else
  3894. echo "$ac_t""no" 1>&6
  3895. { echo "configure: error: *** Unable to locate XDR functions." 1>&2; exit 1; }
  3896. fi
  3897. fi
  3898. fi
  3899. fi
  3900. fi
  3901. for ac_func in asprintf
  3902. do
  3903. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3904. echo "configure:4654: checking for $ac_func" >&5
  3905. cat > conftest.$ac_ext <<EOF
  3906. #line 4657 "configure"
  3907. #include "confdefs.h"
  3908. /* System header to define __stub macros and hopefully few prototypes,
  3909. which can conflict with char $ac_func(); below. */
  3910. #include <assert.h>
  3911. /* Override any gcc2 internal prototype to avoid an error. */
  3912. /* We use char because int might match the return type of a gcc2
  3913. builtin and then its argument prototype would still apply. */
  3914. char $ac_func();
  3915. int main() {
  3916. /* The GNU C library defines this for functions which it implements
  3917. to always fail with ENOSYS. Some functions are actually named
  3918. something starting with __ and the normal name is an alias. */
  3919. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3920. choke me
  3921. #else
  3922. $ac_func();
  3923. #endif
  3924. ; return 0; }
  3925. EOF
  3926. if { (eval echo configure:4680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3927. rm -rf conftest*
  3928. eval "ac_cv_func_$ac_func=yes"
  3929. else
  3930. echo "configure: failed program was:" >&5
  3931. cat conftest.$ac_ext >&5
  3932. rm -rf conftest*
  3933. eval "ac_cv_func_$ac_func=no"
  3934. fi
  3935. rm -f conftest*
  3936. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3937. echo "$ac_t""yes" 1>&6
  3938. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3939. cat >> confdefs.h <<EOF
  3940. #define $ac_tr_func 1
  3941. EOF
  3942. else
  3943. echo "$ac_t""no" 1>&6
  3944. fi
  3945. done
  3946. # Test if mathlib needs -lm flag or is included with libc
  3947. echo $ac_n "checking for atan""... $ac_c" 1>&6
  3948. echo "configure:4707: checking for atan" >&5
  3949. cat > conftest.$ac_ext <<EOF
  3950. #line 4710 "configure"
  3951. #include "confdefs.h"
  3952. /* System header to define __stub macros and hopefully few prototypes,
  3953. which can conflict with char atan(); below. */
  3954. #include <assert.h>
  3955. /* Override any gcc2 internal prototype to avoid an error. */
  3956. /* We use char because int might match the return type of a gcc2
  3957. builtin and then its argument prototype would still apply. */
  3958. char atan();
  3959. int main() {
  3960. /* The GNU C library defines this for functions which it implements
  3961. to always fail with ENOSYS. Some functions are actually named
  3962. something starting with __ and the normal name is an alias. */
  3963. #if defined (__stub_atan) || defined (__stub___atan)
  3964. choke me
  3965. #else
  3966. atan();
  3967. #endif
  3968. ; return 0; }
  3969. EOF
  3970. if { (eval echo configure:4733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3971. rm -rf conftest*
  3972. eval "ac_cv_func_atan=yes"
  3973. else
  3974. echo "configure: failed program was:" >&5
  3975. cat conftest.$ac_ext >&5
  3976. rm -rf conftest*
  3977. eval "ac_cv_func_atan=no"
  3978. fi
  3979. rm -f conftest*
  3980. if eval "test \"`echo '$ac_cv_func_'atan`\" = yes"; then
  3981. echo "$ac_t""yes" 1>&6
  3982. MATHLIB=
  3983. else
  3984. echo "$ac_t""no" 1>&6
  3985. echo $ac_n "checking for atan in -lm""... $ac_c" 1>&6
  3986. echo "configure:4751: checking for atan in -lm" >&5
  3987. ac_lib_var=`echo m'_'atan | sed 'y%./+-%__p_%'`
  3988. ac_save_LIBS="$LIBS"
  3989. LIBS="-lm $LIBS"
  3990. cat > conftest.$ac_ext <<EOF
  3991. #line 4757 "configure"
  3992. #include "confdefs.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 atan();
  3997. int main() {
  3998. atan()
  3999. ; return 0; }
  4000. EOF
  4001. if { (eval echo configure:4768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4002. rm -rf conftest*
  4003. eval "ac_cv_lib_$ac_lib_var=yes"
  4004. else
  4005. echo "configure: failed program was:" >&5
  4006. cat conftest.$ac_ext >&5
  4007. rm -rf conftest*
  4008. eval "ac_cv_lib_$ac_lib_var=no"
  4009. fi
  4010. rm -f conftest*
  4011. LIBS="$ac_save_LIBS"
  4012. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4013. echo "$ac_t""yes" 1>&6
  4014. MATHLIB=-lm
  4015. else
  4016. echo "$ac_t""no" 1>&6
  4017. { echo "configure: error: *** Failed check for math library." 1>&2; exit 1; }
  4018. fi
  4019. fi
  4020. echo $ac_n "checking for dlsym""... $ac_c" 1>&6
  4021. echo "configure:4795: checking for dlsym" >&5
  4022. cat > conftest.$ac_ext <<EOF
  4023. #line 4798 "configure"
  4024. #include "confdefs.h"
  4025. /* System header to define __stub macros and hopefully few prototypes,
  4026. which can conflict with char dlsym(); below. */
  4027. #include <assert.h>
  4028. /* Override any gcc2 internal prototype to avoid an error. */
  4029. /* We use char because int might match the return type of a gcc2
  4030. builtin and then its argument prototype would still apply. */
  4031. char dlsym();
  4032. int main() {
  4033. /* The GNU C library defines this for functions which it implements
  4034. to always fail with ENOSYS. Some functions are actually named
  4035. something starting with __ and the normal name is an alias. */
  4036. #if defined (__stub_dlsym) || defined (__stub___dlsym)
  4037. choke me
  4038. #else
  4039. dlsym();
  4040. #endif
  4041. ; return 0; }
  4042. EOF
  4043. if { (eval echo configure:4821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4044. rm -rf conftest*
  4045. eval "ac_cv_func_dlsym=yes"
  4046. else
  4047. echo "configure: failed program was:" >&5
  4048. cat conftest.$ac_ext >&5
  4049. rm -rf conftest*
  4050. eval "ac_cv_func_dlsym=no"
  4051. fi
  4052. rm -f conftest*
  4053. if eval "test \"`echo '$ac_cv_func_'dlsym`\" = yes"; then
  4054. echo "$ac_t""yes" 1>&6
  4055. DLLIB=
  4056. else
  4057. echo "$ac_t""no" 1>&6
  4058. echo $ac_n "checking for dlsym in -ldl""... $ac_c" 1>&6
  4059. echo "configure:4839: checking for dlsym in -ldl" >&5
  4060. ac_lib_var=`echo dl'_'dlsym | sed 'y%./+-%__p_%'`
  4061. ac_save_LIBS="$LIBS"
  4062. LIBS="-ldl $LIBS"
  4063. cat > conftest.$ac_ext <<EOF
  4064. #line 4845 "configure"
  4065. #include "confdefs.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 dlsym();
  4070. int main() {
  4071. dlsym()
  4072. ; return 0; }
  4073. EOF
  4074. if { (eval echo configure:4856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4075. rm -rf conftest*
  4076. eval "ac_cv_lib_$ac_lib_var=yes"
  4077. else
  4078. echo "configure: failed program was:" >&5
  4079. cat conftest.$ac_ext >&5
  4080. rm -rf conftest*
  4081. eval "ac_cv_lib_$ac_lib_var=no"
  4082. fi
  4083. rm -f conftest*
  4084. LIBS="$ac_save_LIBS"
  4085. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4086. echo "$ac_t""yes" 1>&6
  4087. DLLIB=-ldl
  4088. else
  4089. echo "$ac_t""no" 1>&6
  4090. DLLIB=
  4091. fi
  4092. fi
  4093. echo $ac_n "checking for iconv""... $ac_c" 1>&6
  4094. echo "configure:4883: checking for iconv" >&5
  4095. cat > conftest.$ac_ext <<EOF
  4096. #line 4886 "configure"
  4097. #include "confdefs.h"
  4098. /* System header to define __stub macros and hopefully few prototypes,
  4099. which can conflict with char iconv(); below. */
  4100. #include <assert.h>
  4101. /* Override any gcc2 internal prototype to avoid an error. */
  4102. /* We use char because int might match the return type of a gcc2
  4103. builtin and then its argument prototype would still apply. */
  4104. char iconv();
  4105. int main() {
  4106. /* The GNU C library defines this for functions which it implements
  4107. to always fail with ENOSYS. Some functions are actually named
  4108. something starting with __ and the normal name is an alias. */
  4109. #if defined (__stub_iconv) || defined (__stub___iconv)
  4110. choke me
  4111. #else
  4112. iconv();
  4113. #endif
  4114. ; return 0; }
  4115. EOF
  4116. if { (eval echo configure:4909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4117. rm -rf conftest*
  4118. eval "ac_cv_func_iconv=yes"
  4119. else
  4120. echo "configure: failed program was:" >&5
  4121. cat conftest.$ac_ext >&5
  4122. rm -rf conftest*
  4123. eval "ac_cv_func_iconv=no"
  4124. fi
  4125. rm -f conftest*
  4126. if eval "test \"`echo '$ac_cv_func_'iconv`\" = yes"; then
  4127. echo "$ac_t""yes" 1>&6
  4128. ICONVLIB=
  4129. else
  4130. echo "$ac_t""no" 1>&6
  4131. echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
  4132. echo "configure:4927: checking for iconv in -liconv" >&5
  4133. ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
  4134. ac_save_LIBS="$LIBS"
  4135. LIBS="-liconv $LIBS"
  4136. cat > conftest.$ac_ext <<EOF
  4137. #line 4933 "configure"
  4138. #include "confdefs.h"
  4139. /* Override any gcc2 internal prototype to avoid an error. */
  4140. /* We use char because int might match the return type of a gcc2
  4141. builtin and then its argument prototype would still apply. */
  4142. char iconv();
  4143. int main() {
  4144. iconv()
  4145. ; return 0; }
  4146. EOF
  4147. if { (eval echo configure:4944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4148. rm -rf conftest*
  4149. eval "ac_cv_lib_$ac_lib_var=yes"
  4150. else
  4151. echo "configure: failed program was:" >&5
  4152. cat conftest.$ac_ext >&5
  4153. rm -rf conftest*
  4154. eval "ac_cv_lib_$ac_lib_var=no"
  4155. fi
  4156. rm -f conftest*
  4157. LIBS="$ac_save_LIBS"
  4158. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4159. echo "$ac_t""yes" 1>&6
  4160. ICONVLIB=-liconv
  4161. else
  4162. echo "$ac_t""no" 1>&6
  4163. echo $ac_n "checking for iconv in -lgiconv""... $ac_c" 1>&6
  4164. echo "configure:4963: checking for iconv in -lgiconv" >&5
  4165. ac_lib_var=`echo giconv'_'iconv | sed 'y%./+-%__p_%'`
  4166. ac_save_LIBS="$LIBS"
  4167. LIBS="-lgiconv $LIBS"
  4168. cat > conftest.$ac_ext <<EOF
  4169. #line 4969 "configure"
  4170. #include "confdefs.h"
  4171. /* Override any gcc2 internal prototype to avoid an error. */
  4172. /* We use char because int might match the return type of a gcc2
  4173. builtin and then its argument prototype would still apply. */
  4174. char iconv();
  4175. int main() {
  4176. iconv()
  4177. ; return 0; }
  4178. EOF
  4179. if { (eval echo configure:4980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4180. rm -rf conftest*
  4181. eval "ac_cv_lib_$ac_lib_var=yes"
  4182. else
  4183. echo "configure: failed program was:" >&5
  4184. cat conftest.$ac_ext >&5
  4185. rm -rf conftest*
  4186. eval "ac_cv_lib_$ac_lib_var=no"
  4187. fi
  4188. rm -f conftest*
  4189. LIBS="$ac_save_LIBS"
  4190. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4191. echo "$ac_t""yes" 1>&6
  4192. ICONVLIB=-lgiconv
  4193. else
  4194. echo "$ac_t""no" 1>&6
  4195. echo $ac_n "checking for libiconv""... $ac_c" 1>&6
  4196. echo "configure:4999: checking for libiconv" >&5
  4197. cat > conftest.$ac_ext <<EOF
  4198. #line 5002 "configure"
  4199. #include "confdefs.h"
  4200. /* System header to define __stub macros and hopefully few prototypes,
  4201. which can conflict with char libiconv(); below. */
  4202. #include <assert.h>
  4203. /* Override any gcc2 internal prototype to avoid an error. */
  4204. /* We use char because int might match the return type of a gcc2
  4205. builtin and then its argument prototype would still apply. */
  4206. char libiconv();
  4207. int main() {
  4208. /* The GNU C library defines this for functions which it implements
  4209. to always fail with ENOSYS. Some functions are actually named
  4210. something starting with __ and the normal name is an alias. */
  4211. #if defined (__stub_libiconv) || defined (__stub___libiconv)
  4212. choke me
  4213. #else
  4214. libiconv();
  4215. #endif
  4216. ; return 0; }
  4217. EOF
  4218. if { (eval echo configure:5025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4219. rm -rf conftest*
  4220. eval "ac_cv_func_libiconv=yes"
  4221. else
  4222. echo "configure: failed program was:" >&5
  4223. cat conftest.$ac_ext >&5
  4224. rm -rf conftest*
  4225. eval "ac_cv_func_libiconv=no"
  4226. fi
  4227. rm -f conftest*
  4228. if eval "test \"`echo '$ac_cv_func_'libiconv`\" = yes"; then
  4229. echo "$ac_t""yes" 1>&6
  4230. ICONVLIB=
  4231. else
  4232. echo "$ac_t""no" 1>&6
  4233. echo $ac_n "checking for libiconv in -liconv""... $ac_c" 1>&6
  4234. echo "configure:5043: checking for libiconv in -liconv" >&5
  4235. ac_lib_var=`echo iconv'_'libiconv | sed 'y%./+-%__p_%'`
  4236. ac_save_LIBS="$LIBS"
  4237. LIBS="-liconv $LIBS"
  4238. cat > conftest.$ac_ext <<EOF
  4239. #line 5049 "configure"
  4240. #include "confdefs.h"
  4241. /* Override any gcc2 internal prototype to avoid an error. */
  4242. /* We use char because int might match the return type of a gcc2
  4243. builtin and then its argument prototype would still apply. */
  4244. char libiconv();
  4245. int main() {
  4246. libiconv()
  4247. ; return 0; }
  4248. EOF
  4249. if { (eval echo configure:5060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4250. rm -rf conftest*
  4251. eval "ac_cv_lib_$ac_lib_var=yes"
  4252. else
  4253. echo "configure: failed program was:" >&5
  4254. cat conftest.$ac_ext >&5
  4255. rm -rf conftest*
  4256. eval "ac_cv_lib_$ac_lib_var=no"
  4257. fi
  4258. rm -f conftest*
  4259. LIBS="$ac_save_LIBS"
  4260. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4261. echo "$ac_t""yes" 1>&6
  4262. ICONVLIB=-liconv
  4263. else
  4264. echo "$ac_t""no" 1>&6
  4265. echo $ac_n "checking for libiconv in -lgiconv""... $ac_c" 1>&6
  4266. echo "configure:5079: checking for libiconv in -lgiconv" >&5
  4267. ac_lib_var=`echo giconv'_'libiconv | sed 'y%./+-%__p_%'`
  4268. ac_save_LIBS="$LIBS"
  4269. LIBS="-lgiconv $LIBS"
  4270. cat > conftest.$ac_ext <<EOF
  4271. #line 5085 "configure"
  4272. #include "confdefs.h"
  4273. /* Override any gcc2 internal prototype to avoid an error. */
  4274. /* We use char because int might match the return type of a gcc2
  4275. builtin and then its argument prototype would still apply. */
  4276. char libiconv();
  4277. int main() {
  4278. libiconv()
  4279. ; return 0; }
  4280. EOF
  4281. if { (eval echo configure:5096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4282. rm -rf conftest*
  4283. eval "ac_cv_lib_$ac_lib_var=yes"
  4284. else
  4285. echo "configure: failed program was:" >&5
  4286. cat conftest.$ac_ext >&5
  4287. rm -rf conftest*
  4288. eval "ac_cv_lib_$ac_lib_var=no"
  4289. fi
  4290. rm -f conftest*
  4291. LIBS="$ac_save_LIBS"
  4292. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4293. echo "$ac_t""yes" 1>&6
  4294. ICONVLIB=-lgiconv
  4295. else
  4296. echo "$ac_t""no" 1>&6
  4297. echo "configure: warning: *** Unable to locate iconv() function." 1>&2
  4298. ICONVLIB=
  4299. fi
  4300. fi
  4301. fi
  4302. fi
  4303. fi
  4304. fi
  4305. have_socket=1
  4306. echo $ac_n "checking for socket""... $ac_c" 1>&6
  4307. echo "configure:5133: checking for socket" >&5
  4308. cat > conftest.$ac_ext <<EOF
  4309. #line 5136 "configure"
  4310. #include "confdefs.h"
  4311. /* System header to define __stub macros and hopefully few prototypes,
  4312. which can conflict with char socket(); below. */
  4313. #include <assert.h>
  4314. /* Override any gcc2 internal prototype to avoid an error. */
  4315. /* We use char because int might match the return type of a gcc2
  4316. builtin and then its argument prototype would still apply. */
  4317. char socket();
  4318. int main() {
  4319. /* The GNU C library defines this for functions which it implements
  4320. to always fail with ENOSYS. Some functions are actually named
  4321. something starting with __ and the normal name is an alias. */
  4322. #if defined (__stub_socket) || defined (__stub___socket)
  4323. choke me
  4324. #else
  4325. socket();
  4326. #endif
  4327. ; return 0; }
  4328. EOF
  4329. if { (eval echo configure:5159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4330. rm -rf conftest*
  4331. eval "ac_cv_func_socket=yes"
  4332. else
  4333. echo "configure: failed program was:" >&5
  4334. cat conftest.$ac_ext >&5
  4335. rm -rf conftest*
  4336. eval "ac_cv_func_socket=no"
  4337. fi
  4338. rm -f conftest*
  4339. if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
  4340. echo "$ac_t""yes" 1>&6
  4341. SOCKLIB=
  4342. else
  4343. echo "$ac_t""no" 1>&6
  4344. echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
  4345. echo "configure:5177: checking for socket in -lsocket" >&5
  4346. ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
  4347. ac_save_LIBS="$LIBS"
  4348. LIBS="-lsocket $LIBS"
  4349. cat > conftest.$ac_ext <<EOF
  4350. #line 5183 "configure"
  4351. #include "confdefs.h"
  4352. /* Override any gcc2 internal prototype to avoid an error. */
  4353. /* We use char because int might match the return type of a gcc2
  4354. builtin and then its argument prototype would still apply. */
  4355. char socket();
  4356. int main() {
  4357. socket()
  4358. ; return 0; }
  4359. EOF
  4360. if { (eval echo configure:5194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4361. rm -rf conftest*
  4362. eval "ac_cv_lib_$ac_lib_var=yes"
  4363. else
  4364. echo "configure: failed program was:" >&5
  4365. cat conftest.$ac_ext >&5
  4366. rm -rf conftest*
  4367. eval "ac_cv_lib_$ac_lib_var=no"
  4368. fi
  4369. rm -f conftest*
  4370. LIBS="$ac_save_LIBS"
  4371. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4372. echo "$ac_t""yes" 1>&6
  4373. SOCKLIB=-lsocket
  4374. else
  4375. echo "$ac_t""no" 1>&6
  4376. have_socket=0
  4377. echo "configure: warning: *** Unable to locate socket() function." 1>&2
  4378. fi
  4379. fi
  4380. if test "$have_socket" = 1 ; then
  4381. HAVE_SOCKET=1
  4382. cat >> confdefs.h <<\EOF
  4383. #define HAVE_SOCKET 1
  4384. EOF
  4385. else
  4386. HAVE_SOCKET=
  4387. fi
  4388. # Mandatory zlib dependency
  4389. ZLIBLIBPATH=
  4390. ZLIBINCPATH=
  4391. ZLIB=
  4392. # With zlib includes directory
  4393. echo $ac_n "checking for location of zlib includes""... $ac_c" 1>&6
  4394. echo "configure:5242: checking for location of zlib includes" >&5
  4395. case "$with_zlib_includes" in
  4396. y | ye | yes | n | no)
  4397. { echo "configure: error: *** You must supply a directory to --with-zlib-includes." 1>&2; exit 1; }
  4398. ;;
  4399. esac
  4400. echo "$ac_t""$with_zlib_includes" 1>&6
  4401. if test -n "$with_zlib_includes" ; then
  4402. for dir in $with_zlib_includes; do
  4403. if test -d "$dir"; then
  4404. ZLIBINCPATH="$ZLIBINCPATH -I$dir"
  4405. else
  4406. { echo "configure: error: *** zlib includes directory $dir does not exist." 1>&2; exit 1; }
  4407. fi
  4408. done
  4409. fi
  4410. ac_save_cppflags="$CPPFLAGS"
  4411. CPPFLAGS="$ZLIBINCPATH $CPPFLAGS"
  4412. for ac_hdr in zlib.h
  4413. do
  4414. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4415. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4416. echo "configure:5268: checking for $ac_hdr" >&5
  4417. cat > conftest.$ac_ext <<EOF
  4418. #line 5271 "configure"
  4419. #include "confdefs.h"
  4420. #include <$ac_hdr>
  4421. EOF
  4422. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4423. { (eval echo configure:5276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4424. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4425. if test -z "$ac_err"; then
  4426. rm -rf conftest*
  4427. eval "ac_cv_header_$ac_safe=yes"
  4428. else
  4429. echo "$ac_err" >&5
  4430. echo "configure: failed program was:" >&5
  4431. cat conftest.$ac_ext >&5
  4432. rm -rf conftest*
  4433. eval "ac_cv_header_$ac_safe=no"
  4434. fi
  4435. rm -f conftest*
  4436. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4437. echo "$ac_t""yes" 1>&6
  4438. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4439. cat >> confdefs.h <<EOF
  4440. #define $ac_tr_hdr 1
  4441. EOF
  4442. else
  4443. echo "$ac_t""no" 1>&6
  4444. { echo "configure: error: *** Unable to locate zlib includes." 1>&2; exit 1; }
  4445. fi
  4446. done
  4447. CPPFLAGS=$ac_save_cppflags
  4448. # With zlib library directory
  4449. echo $ac_n "checking for location of zlib library""... $ac_c" 1>&6
  4450. echo "configure:5310: checking for location of zlib library" >&5
  4451. case "$with_zlib_libs" in
  4452. y | ye | yes | n | no)
  4453. { echo "configure: error: *** You must supply a directory to --with-zlib-libs." 1>&2; exit 1; }
  4454. ;;
  4455. esac
  4456. echo "$ac_t""$with_zlib_libs" 1>&6
  4457. if test -n "$with_zlib_libs"; then
  4458. for dir in $with_zlib_libs; do
  4459. if test -d "$dir"; then
  4460. ZLIBLIBPATH="$ZLIBLIBPATH -L$dir"
  4461. else
  4462. { echo "configure: error: *** zlib library directory $dir does not exist." 1>&2; exit 1; }
  4463. fi
  4464. done
  4465. fi
  4466. ac_save_ldflags="$LDFLAGS"
  4467. LDFLAGS="$ZLIBLIBPATH $LDFLAGS"
  4468. echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
  4469. echo "configure:5335: checking for deflate in -lz" >&5
  4470. ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
  4471. ac_save_LIBS="$LIBS"
  4472. LIBS="-lz $LIBS"
  4473. cat > conftest.$ac_ext <<EOF
  4474. #line 5341 "configure"
  4475. #include "confdefs.h"
  4476. /* Override any gcc2 internal prototype to avoid an error. */
  4477. /* We use char because int might match the return type of a gcc2
  4478. builtin and then its argument prototype would still apply. */
  4479. char deflate();
  4480. int main() {
  4481. deflate()
  4482. ; return 0; }
  4483. EOF
  4484. if { (eval echo configure:5352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4485. rm -rf conftest*
  4486. eval "ac_cv_lib_$ac_lib_var=yes"
  4487. else
  4488. echo "configure: failed program was:" >&5
  4489. cat conftest.$ac_ext >&5
  4490. rm -rf conftest*
  4491. eval "ac_cv_lib_$ac_lib_var=no"
  4492. fi
  4493. rm -f conftest*
  4494. LIBS="$ac_save_LIBS"
  4495. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4496. echo "$ac_t""yes" 1>&6
  4497. ZLIB="$ZLIB -lz "
  4498. else
  4499. echo "$ac_t""no" 1>&6
  4500. LDFLAGS=${ac_save_ldflags}
  4501. { echo "configure: error: *** Unable to locate zlib library." 1>&2; exit 1; }
  4502. fi
  4503. LDFLAGS=${ac_save_ldflags}
  4504. #
  4505. # Done checking zlib
  4506. # Mandatory PROJ dependency
  4507. PROJINC=
  4508. PROJLIB=
  4509. PROJSHARE=
  4510. # With PROJ includes directory
  4511. echo $ac_n "checking for location of External PROJ.4 includes""... $ac_c" 1>&6
  4512. echo "configure:5400: checking for location of External PROJ.4 includes" >&5
  4513. case "$with_proj_includes" in
  4514. y | ye | yes | n | no)
  4515. { echo "configure: error: *** You must supply a directory to --with-proj-includes." 1>&2; exit 1; }
  4516. ;;
  4517. esac
  4518. echo "$ac_t""$with_proj_includes" 1>&6
  4519. if test -n "$with_proj_includes" ; then
  4520. for dir in $with_proj_includes; do
  4521. if test -d "$dir"; then
  4522. PROJINC="$PROJINC -I$dir"
  4523. else
  4524. { echo "configure: error: *** External PROJ.4 includes directory $dir does not exist." 1>&2; exit 1; }
  4525. fi
  4526. done
  4527. fi
  4528. ac_save_cppflags="$CPPFLAGS"
  4529. CPPFLAGS="$PROJINC $CPPFLAGS"
  4530. for ac_hdr in proj_api.h
  4531. do
  4532. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4533. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4534. echo "configure:5426: checking for $ac_hdr" >&5
  4535. cat > conftest.$ac_ext <<EOF
  4536. #line 5429 "configure"
  4537. #include "confdefs.h"
  4538. #include <$ac_hdr>
  4539. EOF
  4540. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4541. { (eval echo configure:5434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4542. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4543. if test -z "$ac_err"; then
  4544. rm -rf conftest*
  4545. eval "ac_cv_header_$ac_safe=yes"
  4546. else
  4547. echo "$ac_err" >&5
  4548. echo "configure: failed program was:" >&5
  4549. cat conftest.$ac_ext >&5
  4550. rm -rf conftest*
  4551. eval "ac_cv_header_$ac_safe=no"
  4552. fi
  4553. rm -f conftest*
  4554. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4555. echo "$ac_t""yes" 1>&6
  4556. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4557. cat >> confdefs.h <<EOF
  4558. #define $ac_tr_hdr 1
  4559. EOF
  4560. else
  4561. echo "$ac_t""no" 1>&6
  4562. { echo "configure: error: *** Unable to locate External PROJ.4 includes." 1>&2; exit 1; }
  4563. fi
  4564. done
  4565. CPPFLAGS=$ac_save_cppflags
  4566. # PROJ version check
  4567. if test "$cross_compiling" = yes; then
  4568. echo "configure: warning: *** Cannot check PROJ.4 version (cross-compiling)." 1>&2
  4569. else
  4570. echo $ac_n "checking External PROJ.4 version""... $ac_c" 1>&6
  4571. echo "configure:5471: checking External PROJ.4 version" >&5
  4572. ac_save_cppflags="$CPPFLAGS"
  4573. CPPFLAGS="$PROJINC $CPPFLAGS"
  4574. if test "$cross_compiling" = yes; then
  4575. proj_ver=0
  4576. echo "$ac_t""unknown (cross-compiling)" 1>&6
  4577. else
  4578. cat > conftest.$ac_ext <<EOF
  4579. #line 5479 "configure"
  4580. #include "confdefs.h"
  4581. #include <stdio.h>
  4582. #include <proj_api.h>
  4583. int main(void) {
  4584. FILE *fp = fopen("conftestdata","w");
  4585. fprintf(fp, "%d", PJ_VERSION);
  4586. return 0;
  4587. }
  4588. EOF
  4589. if { (eval echo configure:5491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  4590. then
  4591. proj_ver=`cat conftestdata`
  4592. echo "$ac_t""$proj_ver" 1>&6
  4593. else
  4594. echo "configure: failed program was:" >&5
  4595. cat conftest.$ac_ext >&5
  4596. rm -fr conftest*
  4597. { echo "configure: error: *** Could not determine External PROJ.4 version." 1>&2; exit 1; }
  4598. fi
  4599. rm -fr conftest*
  4600. fi
  4601. CPPFLAGS=$ac_save_cppflags
  4602. if test `expr "$proj_ver" \< 446` = 1 ; then
  4603. { echo "configure: error: *** PROJ.4.4.6 or later is required." 1>&2; exit 1; }
  4604. fi
  4605. fi
  4606. # With PROJ library directory
  4607. echo $ac_n "checking for location of External PROJ.4 library""... $ac_c" 1>&6
  4608. echo "configure:5516: checking for location of External PROJ.4 library" >&5
  4609. case "$with_proj_libs" in
  4610. y | ye | yes | n | no)
  4611. { echo "configure: error: *** You must supply a directory to --with-proj-libs." 1>&2; exit 1; }
  4612. ;;
  4613. esac
  4614. echo "$ac_t""$with_proj_libs" 1>&6
  4615. if test -n "$with_proj_libs"; then
  4616. for dir in $with_proj_libs; do
  4617. if test -d "$dir"; then
  4618. PROJLIB="$PROJLIB -L$dir"
  4619. else
  4620. { echo "configure: error: *** External PROJ.4 library directory $dir does not exist." 1>&2; exit 1; }
  4621. fi
  4622. done
  4623. fi
  4624. ac_save_ldflags="$LDFLAGS"
  4625. LDFLAGS="$PROJLIB $LDFLAGS"
  4626. echo $ac_n "checking for pj_get_def in -lproj""... $ac_c" 1>&6
  4627. echo "configure:5541: checking for pj_get_def in -lproj" >&5
  4628. ac_lib_var=`echo proj'_'pj_get_def | sed 'y%./+-%__p_%'`
  4629. ac_save_LIBS="$LIBS"
  4630. LIBS="-lproj $LIBS"
  4631. cat > conftest.$ac_ext <<EOF
  4632. #line 5547 "configure"
  4633. #include "confdefs.h"
  4634. /* Override any gcc2 internal prototype to avoid an error. */
  4635. /* We use char because int might match the return type of a gcc2
  4636. builtin and then its argument prototype would still apply. */
  4637. char pj_get_def();
  4638. int main() {
  4639. pj_get_def()
  4640. ; return 0; }
  4641. EOF
  4642. if { (eval echo configure:5558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4643. rm -rf conftest*
  4644. eval "ac_cv_lib_$ac_lib_var=yes"
  4645. else
  4646. echo "configure: failed program was:" >&5
  4647. cat conftest.$ac_ext >&5
  4648. rm -rf conftest*
  4649. eval "ac_cv_lib_$ac_lib_var=no"
  4650. fi
  4651. rm -f conftest*
  4652. LIBS="$ac_save_LIBS"
  4653. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4654. echo "$ac_t""yes" 1>&6
  4655. PROJLIB="$PROJLIB -lproj "
  4656. else
  4657. echo "$ac_t""no" 1>&6
  4658. LDFLAGS=${ac_save_ldflags}
  4659. { echo "configure: error: *** Unable to locate External PROJ.4 library." 1>&2; exit 1; }
  4660. fi
  4661. LDFLAGS=${ac_save_ldflags}
  4662. # With PROJ share directory
  4663. echo $ac_n "checking for location of External PROJ.4 data files""... $ac_c" 1>&6
  4664. echo "configure:5592: checking for location of External PROJ.4 data files" >&5
  4665. case "$with_proj_share" in
  4666. y | ye | yes | n | no)
  4667. { echo "configure: error: *** You must supply a directory to --with-proj-share." 1>&2; exit 1; }
  4668. ;;
  4669. esac
  4670. echo "$ac_t""$with_proj_share" 1>&6
  4671. if test -n "$with_proj_share" ; then
  4672. if test -d "$with_proj_share"; then
  4673. PROJSHARE="$with_proj_share"
  4674. else
  4675. { echo "configure: error: *** External PROJ.4 data directory $dir does not exist." 1>&2; exit 1; }
  4676. fi
  4677. fi
  4678. if test -z "$PROJSHARE" ; then
  4679. echo "configure: warning: *** External PROJ.4 directory not specified; default will be used" 1>&2
  4680. PROJSHARE=/usr/local/share/proj
  4681. fi
  4682. # LOC_CHECK_SHARE does not work when cross compiling
  4683. if test "$cross_compiling" = "yes" ; then
  4684. echo $ac_n "checking for epsg""... $ac_c" 1>&6
  4685. echo "configure:5616: checking for epsg" >&5
  4686. echo "$ac_t""unknown (cross-compiling)" 1>&6
  4687. else
  4688. ac_safe=`echo "$PROJSHARE/epsg" | sed 'y%./+-%__p_%'`
  4689. echo $ac_n "checking for $PROJSHARE/epsg""... $ac_c" 1>&6
  4690. echo "configure:5623: checking for $PROJSHARE/epsg" >&5
  4691. if test "$cross_compiling" = yes; then
  4692. { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
  4693. else
  4694. if test -r $PROJSHARE/epsg; then
  4695. eval "ac_cv_file_$ac_safe=yes"
  4696. else
  4697. eval "ac_cv_file_$ac_safe=no"
  4698. fi
  4699. fi
  4700. if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
  4701. echo "$ac_t""yes" 1>&6
  4702. :
  4703. else
  4704. echo "$ac_t""no" 1>&6
  4705. echo "configure: warning: *** Unable to locate PROJ data files." 1>&2
  4706. fi
  4707. fi
  4708. # nad2bin needs to be in path for installing datum gridshift files
  4709. # Extract the first word of "nad2bin", so it can be a program name with args.
  4710. set dummy nad2bin; ac_word=$2
  4711. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4712. echo "configure:5655: checking for $ac_word" >&5
  4713. case "$NAD2BIN" in
  4714. /*)
  4715. ac_cv_path_NAD2BIN="$NAD2BIN" # Let the user override the test with a path.
  4716. ;;
  4717. ?:/*)
  4718. ac_cv_path_NAD2BIN="$NAD2BIN" # Let the user override the test with a dos path.
  4719. ;;
  4720. *)
  4721. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  4722. ac_dummy="$PATH"
  4723. for ac_dir in $ac_dummy; do
  4724. test -z "$ac_dir" && ac_dir=.
  4725. if test -f $ac_dir/$ac_word; then
  4726. ac_cv_path_NAD2BIN="$ac_dir/$ac_word"
  4727. break
  4728. fi
  4729. done
  4730. IFS="$ac_save_ifs"
  4731. test -z "$ac_cv_path_NAD2BIN" && ac_cv_path_NAD2BIN="no"
  4732. ;;
  4733. esac
  4734. NAD2BIN="$ac_cv_path_NAD2BIN"
  4735. if test -n "$NAD2BIN"; then
  4736. echo "$ac_t""$NAD2BIN" 1>&6
  4737. else
  4738. echo "$ac_t""no" 1>&6
  4739. fi
  4740. if test "$NAD2BIN" = "no"; then
  4741. { echo "configure: error: *** Unable to locate nad2bin (needs to be in PATH)." 1>&2; exit 1; }
  4742. fi
  4743. # Done checking PROJ
  4744. # Enable regex option
  4745. echo $ac_n "checking whether to use regex""... $ac_c" 1>&6
  4746. echo "configure:5695: checking whether to use regex" >&5
  4747. echo "$ac_t"""$with_regex"" 1>&6
  4748. case "$with_regex" in
  4749. "no") USE_REGEX= ;;
  4750. "yes") USE_REGEX="1" ;;
  4751. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  4752. esac
  4753. REGEXINCPATH=
  4754. REGEXLIBPATH=
  4755. REGEXLIB=
  4756. if test -n "$USE_REGEX"; then
  4757. # With regex includes directory
  4758. echo $ac_n "checking for location of regex includes""... $ac_c" 1>&6
  4759. echo "configure:5715: checking for location of regex includes" >&5
  4760. case "$with_regex_includes" in
  4761. y | ye | yes | n | no)
  4762. { echo "configure: error: *** You must supply a directory to --with-regex-includes." 1>&2; exit 1; }
  4763. ;;
  4764. esac
  4765. echo "$ac_t""$with_regex_includes" 1>&6
  4766. if test -n "$with_regex_includes" ; then
  4767. for dir in $with_regex_includes; do
  4768. if test -d "$dir"; then
  4769. REGEXINCPATH="$REGEXINCPATH -I$dir"
  4770. else
  4771. { echo "configure: error: *** regex includes directory $dir does not exist." 1>&2; exit 1; }
  4772. fi
  4773. done
  4774. fi
  4775. ac_save_cppflags="$CPPFLAGS"
  4776. CPPFLAGS="$REGEXINCPATH $CPPFLAGS"
  4777. for ac_hdr in regex.h
  4778. do
  4779. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4780. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4781. echo "configure:5741: checking for $ac_hdr" >&5
  4782. cat > conftest.$ac_ext <<EOF
  4783. #line 5744 "configure"
  4784. #include "confdefs.h"
  4785. #include <$ac_hdr>
  4786. EOF
  4787. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4788. { (eval echo configure:5749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4789. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4790. if test -z "$ac_err"; then
  4791. rm -rf conftest*
  4792. eval "ac_cv_header_$ac_safe=yes"
  4793. else
  4794. echo "$ac_err" >&5
  4795. echo "configure: failed program was:" >&5
  4796. cat conftest.$ac_ext >&5
  4797. rm -rf conftest*
  4798. eval "ac_cv_header_$ac_safe=no"
  4799. fi
  4800. rm -f conftest*
  4801. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4802. echo "$ac_t""yes" 1>&6
  4803. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4804. cat >> confdefs.h <<EOF
  4805. #define $ac_tr_hdr 1
  4806. EOF
  4807. else
  4808. echo "$ac_t""no" 1>&6
  4809. { echo "configure: error: *** Unable to locate regex includes." 1>&2; exit 1; }
  4810. fi
  4811. done
  4812. CPPFLAGS=$ac_save_cppflags
  4813. # With regex library directory
  4814. echo $ac_n "checking for location of regex library""... $ac_c" 1>&6
  4815. echo "configure:5783: checking for location of regex library" >&5
  4816. case "$with_regex_libs" in
  4817. y | ye | yes | n | no)
  4818. { echo "configure: error: *** You must supply a directory to --with-regex-libs." 1>&2; exit 1; }
  4819. ;;
  4820. esac
  4821. echo "$ac_t""$with_regex_libs" 1>&6
  4822. if test -n "$with_regex_libs"; then
  4823. for dir in $with_regex_libs; do
  4824. if test -d "$dir"; then
  4825. REGEXLIBPATH="$REGEXLIBPATH -L$dir"
  4826. else
  4827. { echo "configure: error: *** regex library directory $dir does not exist." 1>&2; exit 1; }
  4828. fi
  4829. done
  4830. fi
  4831. ac_save_libs="$LIBS"
  4832. ac_save_ldflags="$LDFLAGS"
  4833. LIBS=" $LIBS"
  4834. LDFLAGS=" $LDFLAGS"
  4835. echo $ac_n "checking for regcomp""... $ac_c" 1>&6
  4836. echo "configure:5808: checking for regcomp" >&5
  4837. cat > conftest.$ac_ext <<EOF
  4838. #line 5811 "configure"
  4839. #include "confdefs.h"
  4840. /* System header to define __stub macros and hopefully few prototypes,
  4841. which can conflict with char regcomp(); below. */
  4842. #include <assert.h>
  4843. /* Override any gcc2 internal prototype to avoid an error. */
  4844. /* We use char because int might match the return type of a gcc2
  4845. builtin and then its argument prototype would still apply. */
  4846. char regcomp();
  4847. int main() {
  4848. /* The GNU C library defines this for functions which it implements
  4849. to always fail with ENOSYS. Some functions are actually named
  4850. something starting with __ and the normal name is an alias. */
  4851. #if defined (__stub_regcomp) || defined (__stub___regcomp)
  4852. choke me
  4853. #else
  4854. regcomp();
  4855. #endif
  4856. ; return 0; }
  4857. EOF
  4858. if { (eval echo configure:5834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4859. rm -rf conftest*
  4860. eval "ac_cv_func_regcomp=yes"
  4861. else
  4862. echo "configure: failed program was:" >&5
  4863. cat conftest.$ac_ext >&5
  4864. rm -rf conftest*
  4865. eval "ac_cv_func_regcomp=no"
  4866. fi
  4867. rm -f conftest*
  4868. if eval "test \"`echo '$ac_cv_func_'regcomp`\" = yes"; then
  4869. echo "$ac_t""yes" 1>&6
  4870. REGEXLIB="$REGEXLIB "
  4871. else
  4872. echo "$ac_t""no" 1>&6
  4873. ac_save_ldflags="$LDFLAGS"
  4874. LDFLAGS="$REGEXLIBPATH $LDFLAGS"
  4875. echo $ac_n "checking for regcomp in -lregex""... $ac_c" 1>&6
  4876. echo "configure:5861: checking for regcomp in -lregex" >&5
  4877. ac_lib_var=`echo regex'_'regcomp | sed 'y%./+-%__p_%'`
  4878. ac_save_LIBS="$LIBS"
  4879. LIBS="-lregex $LIBS"
  4880. cat > conftest.$ac_ext <<EOF
  4881. #line 5867 "configure"
  4882. #include "confdefs.h"
  4883. /* Override any gcc2 internal prototype to avoid an error. */
  4884. /* We use char because int might match the return type of a gcc2
  4885. builtin and then its argument prototype would still apply. */
  4886. char regcomp();
  4887. int main() {
  4888. regcomp()
  4889. ; return 0; }
  4890. EOF
  4891. if { (eval echo configure:5878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4892. rm -rf conftest*
  4893. eval "ac_cv_lib_$ac_lib_var=yes"
  4894. else
  4895. echo "configure: failed program was:" >&5
  4896. cat conftest.$ac_ext >&5
  4897. rm -rf conftest*
  4898. eval "ac_cv_lib_$ac_lib_var=no"
  4899. fi
  4900. rm -f conftest*
  4901. LIBS="$ac_save_LIBS"
  4902. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4903. echo "$ac_t""yes" 1>&6
  4904. REGEXLIB="$REGEXLIB -lregex "
  4905. else
  4906. echo "$ac_t""no" 1>&6
  4907. LDFLAGS=${ac_save_ldflags}
  4908. { echo "configure: error: *** Unable to locate regex library." 1>&2; exit 1; }
  4909. fi
  4910. LDFLAGS=${ac_save_ldflags}
  4911. fi
  4912. LIBS=${ac_save_libs}
  4913. LDFLAGS=${ac_save_ldflags}
  4914. fi # $USE_REGEX
  4915. # Done checking regex
  4916. # Enable Readline option
  4917. echo $ac_n "checking whether to use Readline""... $ac_c" 1>&6
  4918. echo "configure:5928: checking whether to use Readline" >&5
  4919. echo "$ac_t"""$with_readline"" 1>&6
  4920. case "$with_readline" in
  4921. "no") USE_READLINE= ;;
  4922. "yes") USE_READLINE="1" ;;
  4923. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  4924. esac
  4925. READLINEINCPATH=
  4926. READLINELIBPATH=
  4927. READLINELIB=
  4928. HISTORYLIB=
  4929. if test -n "$USE_READLINE"; then
  4930. # With Readline includes directory
  4931. echo $ac_n "checking for location of Readline includes""... $ac_c" 1>&6
  4932. echo "configure:5949: checking for location of Readline includes" >&5
  4933. case "$with_readline_includes" in
  4934. y | ye | yes | n | no)
  4935. { echo "configure: error: *** You must supply a directory to --with-readline-includes." 1>&2; exit 1; }
  4936. ;;
  4937. esac
  4938. echo "$ac_t""$with_readline_includes" 1>&6
  4939. if test -n "$with_readline_includes" ; then
  4940. for dir in $with_readline_includes; do
  4941. if test -d "$dir"; then
  4942. READLINEINCPATH="$READLINEINCPATH -I$dir"
  4943. else
  4944. { echo "configure: error: *** Readline includes directory $dir does not exist." 1>&2; exit 1; }
  4945. fi
  4946. done
  4947. fi
  4948. ac_save_cppflags="$CPPFLAGS"
  4949. CPPFLAGS="$READLINEINCPATH $CPPFLAGS"
  4950. for ac_hdr in readline/readline.h
  4951. do
  4952. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4953. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4954. echo "configure:5975: checking for $ac_hdr" >&5
  4955. cat > conftest.$ac_ext <<EOF
  4956. #line 5978 "configure"
  4957. #include "confdefs.h"
  4958. #include <$ac_hdr>
  4959. EOF
  4960. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4961. { (eval echo configure:5983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4962. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4963. if test -z "$ac_err"; then
  4964. rm -rf conftest*
  4965. eval "ac_cv_header_$ac_safe=yes"
  4966. else
  4967. echo "$ac_err" >&5
  4968. echo "configure: failed program was:" >&5
  4969. cat conftest.$ac_ext >&5
  4970. rm -rf conftest*
  4971. eval "ac_cv_header_$ac_safe=no"
  4972. fi
  4973. rm -f conftest*
  4974. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4975. echo "$ac_t""yes" 1>&6
  4976. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4977. cat >> confdefs.h <<EOF
  4978. #define $ac_tr_hdr 1
  4979. EOF
  4980. else
  4981. echo "$ac_t""no" 1>&6
  4982. { echo "configure: error: *** Unable to locate Readline includes." 1>&2; exit 1; }
  4983. fi
  4984. done
  4985. CPPFLAGS=$ac_save_cppflags
  4986. ac_save_cppflags="$CPPFLAGS"
  4987. CPPFLAGS="$READLINEINCPATH $CPPFLAGS"
  4988. for ac_hdr in readline/history.h
  4989. do
  4990. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4991. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4992. echo "configure:6019: checking for $ac_hdr" >&5
  4993. cat > conftest.$ac_ext <<EOF
  4994. #line 6022 "configure"
  4995. #include "confdefs.h"
  4996. #include <$ac_hdr>
  4997. EOF
  4998. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4999. { (eval echo configure:6027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5000. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5001. if test -z "$ac_err"; then
  5002. rm -rf conftest*
  5003. eval "ac_cv_header_$ac_safe=yes"
  5004. else
  5005. echo "$ac_err" >&5
  5006. echo "configure: failed program was:" >&5
  5007. cat conftest.$ac_ext >&5
  5008. rm -rf conftest*
  5009. eval "ac_cv_header_$ac_safe=no"
  5010. fi
  5011. rm -f conftest*
  5012. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5013. echo "$ac_t""yes" 1>&6
  5014. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5015. cat >> confdefs.h <<EOF
  5016. #define $ac_tr_hdr 1
  5017. EOF
  5018. else
  5019. echo "$ac_t""no" 1>&6
  5020. { echo "configure: error: *** Unable to locate Readline includes." 1>&2; exit 1; }
  5021. fi
  5022. done
  5023. CPPFLAGS=$ac_save_cppflags
  5024. # With Readline library directory
  5025. echo $ac_n "checking for location of Readline library""... $ac_c" 1>&6
  5026. echo "configure:6061: checking for location of Readline library" >&5
  5027. case "$with_readline_libs" in
  5028. y | ye | yes | n | no)
  5029. { echo "configure: error: *** You must supply a directory to --with-readline-libs." 1>&2; exit 1; }
  5030. ;;
  5031. esac
  5032. echo "$ac_t""$with_readline_libs" 1>&6
  5033. if test -n "$with_readline_libs"; then
  5034. for dir in $with_readline_libs; do
  5035. if test -d "$dir"; then
  5036. READLINELIBPATH="$READLINELIBPATH -L$dir"
  5037. else
  5038. { echo "configure: error: *** Readline library directory $dir does not exist." 1>&2; exit 1; }
  5039. fi
  5040. done
  5041. fi
  5042. ac_save_ldflags="$LDFLAGS"
  5043. LDFLAGS="$READLINELIBPATH $LDFLAGS"
  5044. echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
  5045. echo "configure:6086: checking for readline in -lreadline" >&5
  5046. ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
  5047. ac_save_LIBS="$LIBS"
  5048. LIBS="-lreadline $LIBS"
  5049. cat > conftest.$ac_ext <<EOF
  5050. #line 6092 "configure"
  5051. #include "confdefs.h"
  5052. /* Override any gcc2 internal prototype to avoid an error. */
  5053. /* We use char because int might match the return type of a gcc2
  5054. builtin and then its argument prototype would still apply. */
  5055. char readline();
  5056. int main() {
  5057. readline()
  5058. ; return 0; }
  5059. EOF
  5060. if { (eval echo configure:6103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5061. rm -rf conftest*
  5062. eval "ac_cv_lib_$ac_lib_var=yes"
  5063. else
  5064. echo "configure: failed program was:" >&5
  5065. cat conftest.$ac_ext >&5
  5066. rm -rf conftest*
  5067. eval "ac_cv_lib_$ac_lib_var=no"
  5068. fi
  5069. rm -f conftest*
  5070. LIBS="$ac_save_LIBS"
  5071. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5072. echo "$ac_t""yes" 1>&6
  5073. READLINELIB="$READLINELIB -lreadline "
  5074. else
  5075. echo "$ac_t""no" 1>&6
  5076. LDFLAGS=${ac_save_ldflags}
  5077. { echo "configure: error: *** Unable to locate Readline library." 1>&2; exit 1; }
  5078. fi
  5079. LDFLAGS=${ac_save_ldflags}
  5080. ac_save_ldflags="$LDFLAGS"
  5081. LDFLAGS="$READLINELIBPATH $LDFLAGS"
  5082. echo $ac_n "checking for add_history in -lhistory""... $ac_c" 1>&6
  5083. echo "configure:6138: checking for add_history in -lhistory" >&5
  5084. ac_lib_var=`echo history'_'add_history | sed 'y%./+-%__p_%'`
  5085. ac_save_LIBS="$LIBS"
  5086. LIBS="-lhistory $LIBS"
  5087. cat > conftest.$ac_ext <<EOF
  5088. #line 6144 "configure"
  5089. #include "confdefs.h"
  5090. /* Override any gcc2 internal prototype to avoid an error. */
  5091. /* We use char because int might match the return type of a gcc2
  5092. builtin and then its argument prototype would still apply. */
  5093. char add_history();
  5094. int main() {
  5095. add_history()
  5096. ; return 0; }
  5097. EOF
  5098. if { (eval echo configure:6155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5099. rm -rf conftest*
  5100. eval "ac_cv_lib_$ac_lib_var=yes"
  5101. else
  5102. echo "configure: failed program was:" >&5
  5103. cat conftest.$ac_ext >&5
  5104. rm -rf conftest*
  5105. eval "ac_cv_lib_$ac_lib_var=no"
  5106. fi
  5107. rm -f conftest*
  5108. LIBS="$ac_save_LIBS"
  5109. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5110. echo "$ac_t""yes" 1>&6
  5111. HISTORYLIB="$HISTORYLIB -lhistory "
  5112. else
  5113. echo "$ac_t""no" 1>&6
  5114. LDFLAGS=${ac_save_ldflags}
  5115. { echo "configure: error: *** Unable to locate History library." 1>&2; exit 1; }
  5116. fi
  5117. LDFLAGS=${ac_save_ldflags}
  5118. fi # $USE_READLINE
  5119. # Done checking Readline
  5120. # GDAL option
  5121. echo $ac_n "checking whether to use GDAL""... $ac_c" 1>&6
  5122. echo "configure:6197: checking whether to use GDAL" >&5
  5123. GDAL_LIBS=
  5124. GDAL_CFLAGS=
  5125. USE_GDAL=
  5126. USE_OGR=
  5127. if test "`basename xx/$with_gdal`" = "gdal-config" ; then
  5128. GDAL_CONFIG="$with_gdal"
  5129. fi
  5130. if test "$with_gdal" = "no" ; then
  5131. echo "$ac_t""no" 1>&6
  5132. else
  5133. echo "$ac_t""yes" 1>&6
  5134. # Extract the first word of "gdal-config", so it can be a program name with args.
  5135. set dummy gdal-config; ac_word=$2
  5136. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5137. echo "configure:6215: checking for $ac_word" >&5
  5138. case "$GDAL_CONFIG" in
  5139. /*)
  5140. ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a path.
  5141. ;;
  5142. ?:/*)
  5143. ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a dos path.
  5144. ;;
  5145. *)
  5146. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5147. ac_dummy="$PATH"
  5148. for ac_dir in $ac_dummy; do
  5149. test -z "$ac_dir" && ac_dir=.
  5150. if test -f $ac_dir/$ac_word; then
  5151. ac_cv_path_GDAL_CONFIG="$ac_dir/$ac_word"
  5152. break
  5153. fi
  5154. done
  5155. IFS="$ac_save_ifs"
  5156. test -z "$ac_cv_path_GDAL_CONFIG" && ac_cv_path_GDAL_CONFIG="no"
  5157. ;;
  5158. esac
  5159. GDAL_CONFIG="$ac_cv_path_GDAL_CONFIG"
  5160. if test -n "$GDAL_CONFIG"; then
  5161. echo "$ac_t""$GDAL_CONFIG" 1>&6
  5162. else
  5163. echo "$ac_t""no" 1>&6
  5164. fi
  5165. if test "$GDAL_CONFIG" = "no" ; then
  5166. { echo "configure: error: *** couldn't find gdal-config" 1>&2; exit 1; }
  5167. fi
  5168. if test "$GDAL_CONFIG" != "" ; then
  5169. GDAL_LIBS=`"$GDAL_CONFIG" --libs`
  5170. GDAL_DEP_LIBS=`"$GDAL_CONFIG" --dep-libs`
  5171. GDAL_CFLAGS=`"$GDAL_CONFIG" --cflags`
  5172. USE_GDAL=1
  5173. if test `"$GDAL_CONFIG" --ogr-enabled` = "yes" ; then
  5174. cat >> confdefs.h <<\EOF
  5175. #define HAVE_OGR 1
  5176. EOF
  5177. USE_OGR=1
  5178. fi
  5179. fi
  5180. GDAL=
  5181. ac_save_libs="$LIBS"
  5182. ac_save_cflags="$CFLAGS"
  5183. LIBS="$LIBS $GDAL_LIBS"
  5184. CFLAGS="$CFLAGS $GDAL_CFLAGS"
  5185. cat > conftest.$ac_ext <<EOF
  5186. #line 6270 "configure"
  5187. #include "confdefs.h"
  5188. #include <gdal.h>
  5189. int main() {
  5190. GDALOpen("foo", GA_ReadOnly);
  5191. ; return 0; }
  5192. EOF
  5193. if { (eval echo configure:6277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5194. :
  5195. else
  5196. echo "configure: failed program was:" >&5
  5197. cat conftest.$ac_ext >&5
  5198. rm -rf conftest*
  5199. LIBS="$LIBS $GDAL_DEP_LIBS"
  5200. cat > conftest.$ac_ext <<EOF
  5201. #line 6286 "configure"
  5202. #include "confdefs.h"
  5203. #include <gdal.h>
  5204. int main() {
  5205. GDALOpen("foo", GA_ReadOnly);
  5206. ; return 0; }
  5207. EOF
  5208. if { (eval echo configure:6293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5209. rm -rf conftest*
  5210. GDAL_LIBS="$GDAL_LIBS $GDAL_DEP_LIBS"
  5211. else
  5212. echo "configure: failed program was:" >&5
  5213. cat conftest.$ac_ext >&5
  5214. rm -rf conftest*
  5215. { echo "configure: error: *** Unable to locate GDAL library." 1>&2; exit 1; }
  5216. fi
  5217. rm -f conftest*
  5218. fi
  5219. rm -f conftest*
  5220. LIBS=${ac_save_libs}
  5221. CFLAGS=${ac_save_cflags}
  5222. cat >> confdefs.h <<\EOF
  5223. #define HAVE_GDAL 1
  5224. EOF
  5225. fi
  5226. # libLAS option
  5227. echo $ac_n "checking whether to use libLAS""... $ac_c" 1>&6
  5228. echo "configure:6325: checking whether to use libLAS" >&5
  5229. LIBLAS_LIBS=
  5230. LIBLAS_CFLAGS=
  5231. USE_LIBLAS=
  5232. if test "`basename xx/$with_liblas`" = "liblas-config" ; then
  5233. LIBLAS_CONFIG="$with_liblas"
  5234. fi
  5235. if test "$with_liblas" = "no" ; then
  5236. echo "$ac_t""no" 1>&6
  5237. else
  5238. echo "$ac_t""yes" 1>&6
  5239. # Extract the first word of "liblas-config", so it can be a program name with args.
  5240. set dummy liblas-config; ac_word=$2
  5241. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5242. echo "configure:6342: checking for $ac_word" >&5
  5243. case "$LIBLAS_CONFIG" in
  5244. /*)
  5245. ac_cv_path_LIBLAS_CONFIG="$LIBLAS_CONFIG" # Let the user override the test with a path.
  5246. ;;
  5247. ?:/*)
  5248. ac_cv_path_LIBLAS_CONFIG="$LIBLAS_CONFIG" # Let the user override the test with a dos path.
  5249. ;;
  5250. *)
  5251. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5252. ac_dummy="$PATH"
  5253. for ac_dir in $ac_dummy; do
  5254. test -z "$ac_dir" && ac_dir=.
  5255. if test -f $ac_dir/$ac_word; then
  5256. ac_cv_path_LIBLAS_CONFIG="$ac_dir/$ac_word"
  5257. break
  5258. fi
  5259. done
  5260. IFS="$ac_save_ifs"
  5261. test -z "$ac_cv_path_LIBLAS_CONFIG" && ac_cv_path_LIBLAS_CONFIG="no"
  5262. ;;
  5263. esac
  5264. LIBLAS_CONFIG="$ac_cv_path_LIBLAS_CONFIG"
  5265. if test -n "$LIBLAS_CONFIG"; then
  5266. echo "$ac_t""$LIBLAS_CONFIG" 1>&6
  5267. else
  5268. echo "$ac_t""no" 1>&6
  5269. fi
  5270. if test "$LIBLAS_CONFIG" = "no" ; then
  5271. { echo "configure: error: *** couldn't find liblas-config" 1>&2; exit 1; }
  5272. fi
  5273. if test "$LIBLAS_CONFIG" != "" ; then
  5274. LIBLAS_LIBS=`"$LIBLAS_CONFIG" --libs`
  5275. LIBLAS_CFLAGS=`"$LIBLAS_CONFIG" --cflags`
  5276. LIBLAS_INC=`"$LIBLAS_CONFIG" --includes`
  5277. USE_LIBLAS=1
  5278. fi
  5279. LIBLAS=
  5280. ac_save_libs="$LIBS"
  5281. ac_save_cflags="$CFLAGS"
  5282. LIBS="$LIBS $LIBLAS_LIBS"
  5283. CFLAGS="$CFLAGS $LIBLAS_CFLAGS"
  5284. cat > conftest.$ac_ext <<EOF
  5285. #line 6390 "configure"
  5286. #include "confdefs.h"
  5287. #include <liblas/capi/liblas.h>
  5288. int main() {
  5289. LASReader_Create("foo");
  5290. ; return 0; }
  5291. EOF
  5292. if { (eval echo configure:6397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5293. :
  5294. else
  5295. echo "configure: failed program was:" >&5
  5296. cat conftest.$ac_ext >&5
  5297. rm -rf conftest*
  5298. cat > conftest.$ac_ext <<EOF
  5299. #line 6405 "configure"
  5300. #include "confdefs.h"
  5301. #include <liblas/capi/liblas.h>
  5302. int main() {
  5303. LASReader_Create("foo");
  5304. ; return 0; }
  5305. EOF
  5306. if { (eval echo configure:6412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5307. rm -rf conftest*
  5308. LAS_LIBS="$LAS_LIBS"
  5309. else
  5310. echo "configure: failed program was:" >&5
  5311. cat conftest.$ac_ext >&5
  5312. rm -rf conftest*
  5313. { echo "configure: error: *** Unable to locate libLAS library." 1>&2; exit 1; }
  5314. fi
  5315. rm -f conftest*
  5316. fi
  5317. rm -f conftest*
  5318. LIBS=${ac_save_libs}
  5319. CFLAGS=${ac_save_cflags}
  5320. cat >> confdefs.h <<\EOF
  5321. #define HAVE_LIBLAS 1
  5322. EOF
  5323. fi
  5324. # NetCDF option
  5325. echo $ac_n "checking whether to use NetCDF""... $ac_c" 1>&6
  5326. echo "configure:6444: checking whether to use NetCDF" >&5
  5327. NETCDF_LIBS=
  5328. NETCDF_CFLAGS=
  5329. USE_NETCDF=
  5330. if test "`basename xx/$with_netcdf`" = "nc-config" ; then
  5331. NETCDF_CONFIG="$with_netcdf"
  5332. fi
  5333. if test "$with_netcdf" = "no" ; then
  5334. echo "$ac_t""no" 1>&6
  5335. else
  5336. echo "$ac_t""yes" 1>&6
  5337. # Extract the first word of "nc-config", so it can be a program name with args.
  5338. set dummy nc-config; ac_word=$2
  5339. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5340. echo "configure:6461: checking for $ac_word" >&5
  5341. case "$NETCDF_CONFIG" in
  5342. /*)
  5343. ac_cv_path_NETCDF_CONFIG="$NETCDF_CONFIG" # Let the user override the test with a path.
  5344. ;;
  5345. ?:/*)
  5346. ac_cv_path_NETCDF_CONFIG="$NETCDF_CONFIG" # Let the user override the test with a dos path.
  5347. ;;
  5348. *)
  5349. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5350. ac_dummy="$PATH"
  5351. for ac_dir in $ac_dummy; do
  5352. test -z "$ac_dir" && ac_dir=.
  5353. if test -f $ac_dir/$ac_word; then
  5354. ac_cv_path_NETCDF_CONFIG="$ac_dir/$ac_word"
  5355. break
  5356. fi
  5357. done
  5358. IFS="$ac_save_ifs"
  5359. test -z "$ac_cv_path_NETCDF_CONFIG" && ac_cv_path_NETCDF_CONFIG="no"
  5360. ;;
  5361. esac
  5362. NETCDF_CONFIG="$ac_cv_path_NETCDF_CONFIG"
  5363. if test -n "$NETCDF_CONFIG"; then
  5364. echo "$ac_t""$NETCDF_CONFIG" 1>&6
  5365. else
  5366. echo "$ac_t""no" 1>&6
  5367. fi
  5368. if test "$NETCDF_CONFIG" = "no" ; then
  5369. { echo "configure: error: *** couldn't find nc-config" 1>&2; exit 1; }
  5370. fi
  5371. if test "$NETCDF_CONFIG" != "" ; then
  5372. NETCDF_LIBS=`"$NETCDF_CONFIG" --libs`
  5373. NETCDF_CFLAGS=`"$NETCDF_CONFIG" --cflags`
  5374. USE_NETCDF=1
  5375. fi
  5376. NETCDF=
  5377. ac_save_libs="$LIBS"
  5378. ac_save_cflags="$CFLAGS"
  5379. LIBS="$LIBS $NETCDF_LIBS"
  5380. CFLAGS="$CFLAGS $NETCDF_CFLAGS"
  5381. cat > conftest.$ac_ext <<EOF
  5382. #line 6508 "configure"
  5383. #include "confdefs.h"
  5384. #include <netcdf.h>
  5385. int main() {
  5386. nc_create("foo", NC_CLOBBER, NULL);
  5387. ; return 0; }
  5388. EOF
  5389. if { (eval echo configure:6515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5390. :
  5391. else
  5392. echo "configure: failed program was:" >&5
  5393. cat conftest.$ac_ext >&5
  5394. rm -rf conftest*
  5395. cat > conftest.$ac_ext <<EOF
  5396. #line 6523 "configure"
  5397. #include "confdefs.h"
  5398. #include <netcdf.h>
  5399. int main() {
  5400. nc_create("foo", NC_CLOBBER, NULL);
  5401. ; return 0; }
  5402. EOF
  5403. if { (eval echo configure:6530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5404. rm -rf conftest*
  5405. NETCDF_LIBS="$NETCDF_LIBS"
  5406. else
  5407. echo "configure: failed program was:" >&5
  5408. cat conftest.$ac_ext >&5
  5409. rm -rf conftest*
  5410. { echo "configure: error: *** Unable to locate NetCDF library." 1>&2; exit 1; }
  5411. fi
  5412. rm -f conftest*
  5413. fi
  5414. rm -f conftest*
  5415. LIBS=${ac_save_libs}
  5416. CFLAGS=${ac_save_cflags}
  5417. cat >> confdefs.h <<\EOF
  5418. #define HAVE_NETCDF 1
  5419. EOF
  5420. fi
  5421. # GEOS option
  5422. echo $ac_n "checking whether to use GEOS""... $ac_c" 1>&6
  5423. echo "configure:6561: checking whether to use GEOS" >&5
  5424. GEOS_LIBS=
  5425. GEOS_CFLAGS=
  5426. USE_GEOS=
  5427. # FIXME: "quote" $with_geos ?
  5428. if test "`basename xx/$with_geos`" = "geos-config" ; then
  5429. GEOS_CONFIG="$with_geos"
  5430. fi
  5431. if test "$with_geos" = "no" ; then
  5432. echo "$ac_t""no" 1>&6
  5433. else
  5434. echo "$ac_t""yes" 1>&6
  5435. # Extract the first word of "geos-config", so it can be a program name with args.
  5436. set dummy geos-config; ac_word=$2
  5437. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5438. echo "configure:6579: checking for $ac_word" >&5
  5439. case "$GEOS_CONFIG" in
  5440. /*)
  5441. ac_cv_path_GEOS_CONFIG="$GEOS_CONFIG" # Let the user override the test with a path.
  5442. ;;
  5443. ?:/*)
  5444. ac_cv_path_GEOS_CONFIG="$GEOS_CONFIG" # Let the user override the test with a dos path.
  5445. ;;
  5446. *)
  5447. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5448. ac_dummy="$PATH"
  5449. for ac_dir in $ac_dummy; do
  5450. test -z "$ac_dir" && ac_dir=.
  5451. if test -f $ac_dir/$ac_word; then
  5452. ac_cv_path_GEOS_CONFIG="$ac_dir/$ac_word"
  5453. break
  5454. fi
  5455. done
  5456. IFS="$ac_save_ifs"
  5457. test -z "$ac_cv_path_GEOS_CONFIG" && ac_cv_path_GEOS_CONFIG="no"
  5458. ;;
  5459. esac
  5460. GEOS_CONFIG="$ac_cv_path_GEOS_CONFIG"
  5461. if test -n "$GEOS_CONFIG"; then
  5462. echo "$ac_t""$GEOS_CONFIG" 1>&6
  5463. else
  5464. echo "$ac_t""no" 1>&6
  5465. fi
  5466. if test "$GEOS_CONFIG" = "no" ; then
  5467. { echo "configure: error: *** couldn't find geos-config" 1>&2; exit 1; }
  5468. fi
  5469. if test "$GEOS_CONFIG" != "" ; then
  5470. GEOS_LIBS=`"$GEOS_CONFIG" --libs`
  5471. GEOS_CFLAGS=`"$GEOS_CONFIG" --cflags`
  5472. USE_GEOS=1
  5473. fi
  5474. ac_save_cppflags="$CPPFLAGS"
  5475. CPPFLAGS="$GEOS_CFLAGS $CPPFLAGS"
  5476. for ac_hdr in geos_c.h
  5477. do
  5478. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5479. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5480. echo "configure:6627: checking for $ac_hdr" >&5
  5481. cat > conftest.$ac_ext <<EOF
  5482. #line 6630 "configure"
  5483. #include "confdefs.h"
  5484. #include <$ac_hdr>
  5485. EOF
  5486. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5487. { (eval echo configure:6635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5488. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5489. if test -z "$ac_err"; then
  5490. rm -rf conftest*
  5491. eval "ac_cv_header_$ac_safe=yes"
  5492. else
  5493. echo "$ac_err" >&5
  5494. echo "configure: failed program was:" >&5
  5495. cat conftest.$ac_ext >&5
  5496. rm -rf conftest*
  5497. eval "ac_cv_header_$ac_safe=no"
  5498. fi
  5499. rm -f conftest*
  5500. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5501. echo "$ac_t""yes" 1>&6
  5502. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5503. cat >> confdefs.h <<EOF
  5504. #define $ac_tr_hdr 1
  5505. EOF
  5506. else
  5507. echo "$ac_t""no" 1>&6
  5508. { echo "configure: error: *** Unable to locate GEOS includes." 1>&2; exit 1; }
  5509. fi
  5510. done
  5511. CPPFLAGS=$ac_save_cppflags
  5512. if test "$MINGW32" = yes ; then
  5513. ac_save_ldflags="$LDFLAGS"
  5514. LDFLAGS="$GEOS_LIBS $LDFLAGS"
  5515. echo $ac_n "checking for initGEOS in -lgeos_c_i""... $ac_c" 1>&6
  5516. echo "configure:6671: checking for initGEOS in -lgeos_c_i" >&5
  5517. ac_lib_var=`echo geos_c_i'_'initGEOS | sed 'y%./+-%__p_%'`
  5518. ac_save_LIBS="$LIBS"
  5519. LIBS="-lgeos_c_i $LIBS"
  5520. cat > conftest.$ac_ext <<EOF
  5521. #line 6677 "configure"
  5522. #include "confdefs.h"
  5523. /* Override any gcc2 internal prototype to avoid an error. */
  5524. /* We use char because int might match the return type of a gcc2
  5525. builtin and then its argument prototype would still apply. */
  5526. char initGEOS();
  5527. int main() {
  5528. initGEOS()
  5529. ; return 0; }
  5530. EOF
  5531. if { (eval echo configure:6688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5532. rm -rf conftest*
  5533. eval "ac_cv_lib_$ac_lib_var=yes"
  5534. else
  5535. echo "configure: failed program was:" >&5
  5536. cat conftest.$ac_ext >&5
  5537. rm -rf conftest*
  5538. eval "ac_cv_lib_$ac_lib_var=no"
  5539. fi
  5540. rm -f conftest*
  5541. LIBS="$ac_save_LIBS"
  5542. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5543. echo "$ac_t""yes" 1>&6
  5544. GEOS_LIBS="$GEOS_LIBS -lgeos_c_i "
  5545. else
  5546. echo "$ac_t""no" 1>&6
  5547. LDFLAGS=${ac_save_ldflags}
  5548. { echo "configure: error: *** Unable to locate GEOS library." 1>&2; exit 1; }
  5549. fi
  5550. LDFLAGS=${ac_save_ldflags}
  5551. else
  5552. ac_save_ldflags="$LDFLAGS"
  5553. LDFLAGS="$GEOS_LIBS $LDFLAGS"
  5554. echo $ac_n "checking for initGEOS in -lgeos_c""... $ac_c" 1>&6
  5555. echo "configure:6724: checking for initGEOS in -lgeos_c" >&5
  5556. ac_lib_var=`echo geos_c'_'initGEOS | sed 'y%./+-%__p_%'`
  5557. ac_save_LIBS="$LIBS"
  5558. LIBS="-lgeos_c $LIBS"
  5559. cat > conftest.$ac_ext <<EOF
  5560. #line 6730 "configure"
  5561. #include "confdefs.h"
  5562. /* Override any gcc2 internal prototype to avoid an error. */
  5563. /* We use char because int might match the return type of a gcc2
  5564. builtin and then its argument prototype would still apply. */
  5565. char initGEOS();
  5566. int main() {
  5567. initGEOS()
  5568. ; return 0; }
  5569. EOF
  5570. if { (eval echo configure:6741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5571. rm -rf conftest*
  5572. eval "ac_cv_lib_$ac_lib_var=yes"
  5573. else
  5574. echo "configure: failed program was:" >&5
  5575. cat conftest.$ac_ext >&5
  5576. rm -rf conftest*
  5577. eval "ac_cv_lib_$ac_lib_var=no"
  5578. fi
  5579. rm -f conftest*
  5580. LIBS="$ac_save_LIBS"
  5581. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5582. echo "$ac_t""yes" 1>&6
  5583. GEOS_LIBS="$GEOS_LIBS -lgeos_c "
  5584. else
  5585. echo "$ac_t""no" 1>&6
  5586. LDFLAGS=${ac_save_ldflags}
  5587. { echo "configure: error: *** Unable to locate GEOS library." 1>&2; exit 1; }
  5588. fi
  5589. LDFLAGS=${ac_save_ldflags}
  5590. fi
  5591. cat >> confdefs.h <<\EOF
  5592. #define HAVE_GEOS 1
  5593. EOF
  5594. fi
  5595. # Enable TIFF option
  5596. echo $ac_n "checking whether to use TIFF""... $ac_c" 1>&6
  5597. echo "configure:6785: checking whether to use TIFF" >&5
  5598. echo "$ac_t"""$with_tiff"" 1>&6
  5599. case "$with_tiff" in
  5600. "no") USE_TIFF= ;;
  5601. "yes") USE_TIFF="1" ;;
  5602. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  5603. esac
  5604. TIFF_INCLUDE_DIRS=
  5605. TIFF_LIBRARY_DIRS=
  5606. TIFFLIB=
  5607. if test -n "$USE_TIFF"; then
  5608. # With TIFF includes directory
  5609. echo $ac_n "checking for location of TIFF includes""... $ac_c" 1>&6
  5610. echo "configure:6805: checking for location of TIFF includes" >&5
  5611. case "$with_tiff_includes" in
  5612. y | ye | yes | n | no)
  5613. { echo "configure: error: *** You must supply a directory to --with-tiff-includes." 1>&2; exit 1; }
  5614. ;;
  5615. esac
  5616. echo "$ac_t""$with_tiff_includes" 1>&6
  5617. if test -n "$with_tiff_includes" ; then
  5618. for dir in $with_tiff_includes; do
  5619. if test -d "$dir"; then
  5620. TIFF_INCLUDE_DIRS="$TIFF_INCLUDE_DIRS -I$dir"
  5621. else
  5622. { echo "configure: error: *** TIFF includes directory $dir does not exist." 1>&2; exit 1; }
  5623. fi
  5624. done
  5625. fi
  5626. ac_save_cppflags="$CPPFLAGS"
  5627. CPPFLAGS="$TIFF_INCLUDE_DIRS $CPPFLAGS"
  5628. for ac_hdr in tiffio.h
  5629. do
  5630. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5631. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5632. echo "configure:6831: checking for $ac_hdr" >&5
  5633. cat > conftest.$ac_ext <<EOF
  5634. #line 6834 "configure"
  5635. #include "confdefs.h"
  5636. #include <$ac_hdr>
  5637. EOF
  5638. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5639. { (eval echo configure:6839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5640. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5641. if test -z "$ac_err"; then
  5642. rm -rf conftest*
  5643. eval "ac_cv_header_$ac_safe=yes"
  5644. else
  5645. echo "$ac_err" >&5
  5646. echo "configure: failed program was:" >&5
  5647. cat conftest.$ac_ext >&5
  5648. rm -rf conftest*
  5649. eval "ac_cv_header_$ac_safe=no"
  5650. fi
  5651. rm -f conftest*
  5652. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5653. echo "$ac_t""yes" 1>&6
  5654. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5655. cat >> confdefs.h <<EOF
  5656. #define $ac_tr_hdr 1
  5657. EOF
  5658. else
  5659. echo "$ac_t""no" 1>&6
  5660. { echo "configure: error: *** Unable to locate TIFF includes." 1>&2; exit 1; }
  5661. fi
  5662. done
  5663. CPPFLAGS=$ac_save_cppflags
  5664. # With TIFF library directory
  5665. echo $ac_n "checking for location of TIFF library""... $ac_c" 1>&6
  5666. echo "configure:6873: checking for location of TIFF library" >&5
  5667. case "$with_tiff_libs" in
  5668. y | ye | yes | n | no)
  5669. { echo "configure: error: *** You must supply a directory to --with-tiff-libs." 1>&2; exit 1; }
  5670. ;;
  5671. esac
  5672. echo "$ac_t""$with_tiff_libs" 1>&6
  5673. if test -n "$with_tiff_libs"; then
  5674. for dir in $with_tiff_libs; do
  5675. if test -d "$dir"; then
  5676. TIFF_LIBRARY_DIRS="$TIFF_LIBRARY_DIRS -L$dir"
  5677. else
  5678. { echo "configure: error: *** TIFF library directory $dir does not exist." 1>&2; exit 1; }
  5679. fi
  5680. done
  5681. fi
  5682. ac_save_ldflags="$LDFLAGS"
  5683. LDFLAGS="$TIFF_LIBRARY_DIRS $LDFLAGS"
  5684. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5685. echo "configure:6904: checking for TIFFOpen in -ltiff" >&5
  5686. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5687. ac_save_LIBS="$LIBS"
  5688. LIBS="-ltiff $LIBS"
  5689. cat > conftest.$ac_ext <<EOF
  5690. #line 6910 "configure"
  5691. #include "confdefs.h"
  5692. /* Override any gcc2 internal prototype to avoid an error. */
  5693. /* We use char because int might match the return type of a gcc2
  5694. builtin and then its argument prototype would still apply. */
  5695. char TIFFOpen();
  5696. int main() {
  5697. TIFFOpen()
  5698. ; return 0; }
  5699. EOF
  5700. if { (eval echo configure:6921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5701. rm -rf conftest*
  5702. eval "ac_cv_lib_$ac_lib_var=yes"
  5703. else
  5704. echo "configure: failed program was:" >&5
  5705. cat conftest.$ac_ext >&5
  5706. rm -rf conftest*
  5707. eval "ac_cv_lib_$ac_lib_var=no"
  5708. fi
  5709. rm -f conftest*
  5710. LIBS="$ac_save_LIBS"
  5711. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5712. echo "$ac_t""yes" 1>&6
  5713. TIFFLIB="$TIFFLIB -ltiff "
  5714. else
  5715. echo "$ac_t""no" 1>&6
  5716. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5717. echo "configure:6940: checking for TIFFOpen in -ltiff" >&5
  5718. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5719. ac_save_LIBS="$LIBS"
  5720. LIBS="-ltiff $MATHLIB $LIBS"
  5721. cat > conftest.$ac_ext <<EOF
  5722. #line 6946 "configure"
  5723. #include "confdefs.h"
  5724. /* Override any gcc2 internal prototype to avoid an error. */
  5725. /* We use char because int might match the return type of a gcc2
  5726. builtin and then its argument prototype would still apply. */
  5727. char TIFFOpen();
  5728. int main() {
  5729. TIFFOpen()
  5730. ; return 0; }
  5731. EOF
  5732. if { (eval echo configure:6957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5733. rm -rf conftest*
  5734. eval "ac_cv_lib_$ac_lib_var=yes"
  5735. else
  5736. echo "configure: failed program was:" >&5
  5737. cat conftest.$ac_ext >&5
  5738. rm -rf conftest*
  5739. eval "ac_cv_lib_$ac_lib_var=no"
  5740. fi
  5741. rm -f conftest*
  5742. LIBS="$ac_save_LIBS"
  5743. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5744. echo "$ac_t""yes" 1>&6
  5745. TIFFLIB="$TIFFLIB -ltiff $MATHLIB"
  5746. else
  5747. echo "$ac_t""no" 1>&6
  5748. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5749. echo "configure:6976: checking for TIFFOpen in -ltiff" >&5
  5750. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5751. ac_save_LIBS="$LIBS"
  5752. LIBS="-ltiff $ZLIB $LIBS"
  5753. cat > conftest.$ac_ext <<EOF
  5754. #line 6982 "configure"
  5755. #include "confdefs.h"
  5756. /* Override any gcc2 internal prototype to avoid an error. */
  5757. /* We use char because int might match the return type of a gcc2
  5758. builtin and then its argument prototype would still apply. */
  5759. char TIFFOpen();
  5760. int main() {
  5761. TIFFOpen()
  5762. ; return 0; }
  5763. EOF
  5764. if { (eval echo configure:6993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5765. rm -rf conftest*
  5766. eval "ac_cv_lib_$ac_lib_var=yes"
  5767. else
  5768. echo "configure: failed program was:" >&5
  5769. cat conftest.$ac_ext >&5
  5770. rm -rf conftest*
  5771. eval "ac_cv_lib_$ac_lib_var=no"
  5772. fi
  5773. rm -f conftest*
  5774. LIBS="$ac_save_LIBS"
  5775. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5776. echo "$ac_t""yes" 1>&6
  5777. TIFFLIB="$TIFFLIB -ltiff $ZLIB"
  5778. else
  5779. echo "$ac_t""no" 1>&6
  5780. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5781. echo "configure:7012: checking for TIFFOpen in -ltiff" >&5
  5782. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5783. ac_save_LIBS="$LIBS"
  5784. LIBS="-ltiff $ZLIB $MATHLIB $LIBS"
  5785. cat > conftest.$ac_ext <<EOF
  5786. #line 7018 "configure"
  5787. #include "confdefs.h"
  5788. /* Override any gcc2 internal prototype to avoid an error. */
  5789. /* We use char because int might match the return type of a gcc2
  5790. builtin and then its argument prototype would still apply. */
  5791. char TIFFOpen();
  5792. int main() {
  5793. TIFFOpen()
  5794. ; return 0; }
  5795. EOF
  5796. if { (eval echo configure:7029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5797. rm -rf conftest*
  5798. eval "ac_cv_lib_$ac_lib_var=yes"
  5799. else
  5800. echo "configure: failed program was:" >&5
  5801. cat conftest.$ac_ext >&5
  5802. rm -rf conftest*
  5803. eval "ac_cv_lib_$ac_lib_var=no"
  5804. fi
  5805. rm -f conftest*
  5806. LIBS="$ac_save_LIBS"
  5807. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5808. echo "$ac_t""yes" 1>&6
  5809. TIFFLIB="$TIFFLIB -ltiff $ZLIB $MATHLIB"
  5810. else
  5811. echo "$ac_t""no" 1>&6
  5812. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5813. echo "configure:7048: checking for TIFFOpen in -ltiff" >&5
  5814. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5815. ac_save_LIBS="$LIBS"
  5816. LIBS="-ltiff -ljpeg $LIBS"
  5817. cat > conftest.$ac_ext <<EOF
  5818. #line 7054 "configure"
  5819. #include "confdefs.h"
  5820. /* Override any gcc2 internal prototype to avoid an error. */
  5821. /* We use char because int might match the return type of a gcc2
  5822. builtin and then its argument prototype would still apply. */
  5823. char TIFFOpen();
  5824. int main() {
  5825. TIFFOpen()
  5826. ; return 0; }
  5827. EOF
  5828. if { (eval echo configure:7065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5829. rm -rf conftest*
  5830. eval "ac_cv_lib_$ac_lib_var=yes"
  5831. else
  5832. echo "configure: failed program was:" >&5
  5833. cat conftest.$ac_ext >&5
  5834. rm -rf conftest*
  5835. eval "ac_cv_lib_$ac_lib_var=no"
  5836. fi
  5837. rm -f conftest*
  5838. LIBS="$ac_save_LIBS"
  5839. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5840. echo "$ac_t""yes" 1>&6
  5841. TIFFLIB="$TIFFLIB -ltiff -ljpeg"
  5842. else
  5843. echo "$ac_t""no" 1>&6
  5844. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5845. echo "configure:7084: checking for TIFFOpen in -ltiff" >&5
  5846. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5847. ac_save_LIBS="$LIBS"
  5848. LIBS="-ltiff -ljpeg $MATHLIB $LIBS"
  5849. cat > conftest.$ac_ext <<EOF
  5850. #line 7090 "configure"
  5851. #include "confdefs.h"
  5852. /* Override any gcc2 internal prototype to avoid an error. */
  5853. /* We use char because int might match the return type of a gcc2
  5854. builtin and then its argument prototype would still apply. */
  5855. char TIFFOpen();
  5856. int main() {
  5857. TIFFOpen()
  5858. ; return 0; }
  5859. EOF
  5860. if { (eval echo configure:7101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5861. rm -rf conftest*
  5862. eval "ac_cv_lib_$ac_lib_var=yes"
  5863. else
  5864. echo "configure: failed program was:" >&5
  5865. cat conftest.$ac_ext >&5
  5866. rm -rf conftest*
  5867. eval "ac_cv_lib_$ac_lib_var=no"
  5868. fi
  5869. rm -f conftest*
  5870. LIBS="$ac_save_LIBS"
  5871. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5872. echo "$ac_t""yes" 1>&6
  5873. TIFFLIB="$TIFFLIB -ltiff -ljpeg $MATHLIB"
  5874. else
  5875. echo "$ac_t""no" 1>&6
  5876. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5877. echo "configure:7120: checking for TIFFOpen in -ltiff" >&5
  5878. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5879. ac_save_LIBS="$LIBS"
  5880. LIBS="-ltiff -ljpeg $ZLIB $LIBS"
  5881. cat > conftest.$ac_ext <<EOF
  5882. #line 7126 "configure"
  5883. #include "confdefs.h"
  5884. /* Override any gcc2 internal prototype to avoid an error. */
  5885. /* We use char because int might match the return type of a gcc2
  5886. builtin and then its argument prototype would still apply. */
  5887. char TIFFOpen();
  5888. int main() {
  5889. TIFFOpen()
  5890. ; return 0; }
  5891. EOF
  5892. if { (eval echo configure:7137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5893. rm -rf conftest*
  5894. eval "ac_cv_lib_$ac_lib_var=yes"
  5895. else
  5896. echo "configure: failed program was:" >&5
  5897. cat conftest.$ac_ext >&5
  5898. rm -rf conftest*
  5899. eval "ac_cv_lib_$ac_lib_var=no"
  5900. fi
  5901. rm -f conftest*
  5902. LIBS="$ac_save_LIBS"
  5903. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5904. echo "$ac_t""yes" 1>&6
  5905. TIFFLIB="$TIFFLIB -ltiff -ljpeg $ZLIB"
  5906. else
  5907. echo "$ac_t""no" 1>&6
  5908. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5909. echo "configure:7156: checking for TIFFOpen in -ltiff" >&5
  5910. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5911. ac_save_LIBS="$LIBS"
  5912. LIBS="-ltiff -ljpeg $ZLIB $MATHLIB $LIBS"
  5913. cat > conftest.$ac_ext <<EOF
  5914. #line 7162 "configure"
  5915. #include "confdefs.h"
  5916. /* Override any gcc2 internal prototype to avoid an error. */
  5917. /* We use char because int might match the return type of a gcc2
  5918. builtin and then its argument prototype would still apply. */
  5919. char TIFFOpen();
  5920. int main() {
  5921. TIFFOpen()
  5922. ; return 0; }
  5923. EOF
  5924. if { (eval echo configure:7173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5925. rm -rf conftest*
  5926. eval "ac_cv_lib_$ac_lib_var=yes"
  5927. else
  5928. echo "configure: failed program was:" >&5
  5929. cat conftest.$ac_ext >&5
  5930. rm -rf conftest*
  5931. eval "ac_cv_lib_$ac_lib_var=no"
  5932. fi
  5933. rm -f conftest*
  5934. LIBS="$ac_save_LIBS"
  5935. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5936. echo "$ac_t""yes" 1>&6
  5937. TIFFLIB="$TIFFLIB -ltiff -ljpeg $ZLIB $MATHLIB"
  5938. else
  5939. echo "$ac_t""no" 1>&6
  5940. LDFLAGS=${ac_save_ldflags}
  5941. { echo "configure: error: *** Unable to locate TIFF library." 1>&2; exit 1; }
  5942. fi
  5943. fi
  5944. fi
  5945. fi
  5946. fi
  5947. fi
  5948. fi
  5949. fi
  5950. LDFLAGS=${ac_save_ldflags}
  5951. fi # $USE_TIFF
  5952. # Done checking TIFF
  5953. # Enable PNG option
  5954. echo $ac_n "checking whether to use PNG""... $ac_c" 1>&6
  5955. echo "configure:7271: checking whether to use PNG" >&5
  5956. echo "$ac_t"""$with_png"" 1>&6
  5957. case "$with_png" in
  5958. "no") USE_PNG= ;;
  5959. "yes") USE_PNG="1" ;;
  5960. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  5961. esac
  5962. PNGINC=
  5963. PNGLIB=
  5964. if test -n "$USE_PNG"; then
  5965. # With PNG includes directory
  5966. echo $ac_n "checking for location of PNG includes""... $ac_c" 1>&6
  5967. echo "configure:7290: checking for location of PNG includes" >&5
  5968. case "$with_png_includes" in
  5969. y | ye | yes | n | no)
  5970. { echo "configure: error: *** You must supply a directory to --with-png-includes." 1>&2; exit 1; }
  5971. ;;
  5972. esac
  5973. echo "$ac_t""$with_png_includes" 1>&6
  5974. if test -n "$with_png_includes" ; then
  5975. for dir in $with_png_includes; do
  5976. if test -d "$dir"; then
  5977. PNGINC="$PNGINC -I$dir"
  5978. else
  5979. { echo "configure: error: *** PNG includes directory $dir does not exist." 1>&2; exit 1; }
  5980. fi
  5981. done
  5982. fi
  5983. ac_save_cppflags="$CPPFLAGS"
  5984. CPPFLAGS="$PNGINC $CPPFLAGS"
  5985. for ac_hdr in png.h
  5986. do
  5987. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5988. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5989. echo "configure:7316: checking for $ac_hdr" >&5
  5990. cat > conftest.$ac_ext <<EOF
  5991. #line 7319 "configure"
  5992. #include "confdefs.h"
  5993. #include <$ac_hdr>
  5994. EOF
  5995. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5996. { (eval echo configure:7324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5997. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5998. if test -z "$ac_err"; then
  5999. rm -rf conftest*
  6000. eval "ac_cv_header_$ac_safe=yes"
  6001. else
  6002. echo "$ac_err" >&5
  6003. echo "configure: failed program was:" >&5
  6004. cat conftest.$ac_ext >&5
  6005. rm -rf conftest*
  6006. eval "ac_cv_header_$ac_safe=no"
  6007. fi
  6008. rm -f conftest*
  6009. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6010. echo "$ac_t""yes" 1>&6
  6011. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6012. cat >> confdefs.h <<EOF
  6013. #define $ac_tr_hdr 1
  6014. EOF
  6015. else
  6016. echo "$ac_t""no" 1>&6
  6017. { echo "configure: error: *** Unable to locate PNG includes." 1>&2; exit 1; }
  6018. fi
  6019. done
  6020. CPPFLAGS=$ac_save_cppflags
  6021. # With PNG library directory
  6022. echo $ac_n "checking for location of PNG library""... $ac_c" 1>&6
  6023. echo "configure:7358: checking for location of PNG library" >&5
  6024. case "$with_png_libs" in
  6025. y | ye | yes | n | no)
  6026. { echo "configure: error: *** You must supply a directory to --with-png-libs." 1>&2; exit 1; }
  6027. ;;
  6028. esac
  6029. echo "$ac_t""$with_png_libs" 1>&6
  6030. if test -n "$with_png_libs"; then
  6031. for dir in $with_png_libs; do
  6032. if test -d "$dir"; then
  6033. PNGLIB="$PNGLIB -L$dir"
  6034. else
  6035. { echo "configure: error: *** PNG library directory $dir does not exist." 1>&2; exit 1; }
  6036. fi
  6037. done
  6038. fi
  6039. ac_save_ldflags="$LDFLAGS"
  6040. LDFLAGS="$PNGLIB $LDFLAGS"
  6041. echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
  6042. echo "configure:7383: checking for png_read_image in -lpng" >&5
  6043. ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
  6044. ac_save_LIBS="$LIBS"
  6045. LIBS="-lpng $ZLIB $MATHLIB $LIBS"
  6046. cat > conftest.$ac_ext <<EOF
  6047. #line 7389 "configure"
  6048. #include "confdefs.h"
  6049. /* Override any gcc2 internal prototype to avoid an error. */
  6050. /* We use char because int might match the return type of a gcc2
  6051. builtin and then its argument prototype would still apply. */
  6052. char png_read_image();
  6053. int main() {
  6054. png_read_image()
  6055. ; return 0; }
  6056. EOF
  6057. if { (eval echo configure:7400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6058. rm -rf conftest*
  6059. eval "ac_cv_lib_$ac_lib_var=yes"
  6060. else
  6061. echo "configure: failed program was:" >&5
  6062. cat conftest.$ac_ext >&5
  6063. rm -rf conftest*
  6064. eval "ac_cv_lib_$ac_lib_var=no"
  6065. fi
  6066. rm -f conftest*
  6067. LIBS="$ac_save_LIBS"
  6068. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6069. echo "$ac_t""yes" 1>&6
  6070. PNGLIB="$PNGLIB -lpng $ZLIB $MATHLIB"
  6071. else
  6072. echo "$ac_t""no" 1>&6
  6073. LDFLAGS=${ac_save_ldflags}
  6074. { echo "configure: error: *** Unable to locate PNG library." 1>&2; exit 1; }
  6075. fi
  6076. LDFLAGS=${ac_save_ldflags}
  6077. fi # $USE_PNG
  6078. # Done checking PNG
  6079. # Enable PostgreSQL option
  6080. echo $ac_n "checking whether to use PostgreSQL""... $ac_c" 1>&6
  6081. echo "configure:7442: checking whether to use PostgreSQL" >&5
  6082. echo "$ac_t"""$with_postgres"" 1>&6
  6083. case "$with_postgres" in
  6084. "no") USE_POSTGRES= ;;
  6085. "yes") USE_POSTGRES="1" ;;
  6086. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6087. esac
  6088. if test -n "$USE_POSTGRES"; then
  6089. cat >> confdefs.h <<\EOF
  6090. #define HAVE_POSTGRES 1
  6091. EOF
  6092. fi # $USE_POSTGRES
  6093. PQINCPATH=
  6094. PQLIBPATH=
  6095. PQLIB=
  6096. if test -n "$USE_POSTGRES"; then
  6097. # With PostgreSQL includes directory
  6098. echo $ac_n "checking for location of PostgreSQL includes""... $ac_c" 1>&6
  6099. echo "configure:7469: checking for location of PostgreSQL includes" >&5
  6100. case "$with_postgres_includes" in
  6101. y | ye | yes | n | no)
  6102. { echo "configure: error: *** You must supply a directory to --with-postgres-includes." 1>&2; exit 1; }
  6103. ;;
  6104. esac
  6105. echo "$ac_t""$with_postgres_includes" 1>&6
  6106. if test -n "$with_postgres_includes" ; then
  6107. for dir in $with_postgres_includes; do
  6108. if test -d "$dir"; then
  6109. PQINCPATH="$PQINCPATH -I$dir"
  6110. else
  6111. { echo "configure: error: *** PostgreSQL includes directory $dir does not exist." 1>&2; exit 1; }
  6112. fi
  6113. done
  6114. fi
  6115. ac_save_cppflags="$CPPFLAGS"
  6116. CPPFLAGS="$PQINCPATH $CPPFLAGS"
  6117. for ac_hdr in libpq-fe.h
  6118. do
  6119. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6120. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6121. echo "configure:7495: checking for $ac_hdr" >&5
  6122. cat > conftest.$ac_ext <<EOF
  6123. #line 7498 "configure"
  6124. #include "confdefs.h"
  6125. #include <$ac_hdr>
  6126. EOF
  6127. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6128. { (eval echo configure:7503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6129. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6130. if test -z "$ac_err"; then
  6131. rm -rf conftest*
  6132. eval "ac_cv_header_$ac_safe=yes"
  6133. else
  6134. echo "$ac_err" >&5
  6135. echo "configure: failed program was:" >&5
  6136. cat conftest.$ac_ext >&5
  6137. rm -rf conftest*
  6138. eval "ac_cv_header_$ac_safe=no"
  6139. fi
  6140. rm -f conftest*
  6141. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6142. echo "$ac_t""yes" 1>&6
  6143. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6144. cat >> confdefs.h <<EOF
  6145. #define $ac_tr_hdr 1
  6146. EOF
  6147. else
  6148. echo "$ac_t""no" 1>&6
  6149. { echo "configure: error: *** Unable to locate PostgreSQL includes." 1>&2; exit 1; }
  6150. fi
  6151. done
  6152. CPPFLAGS=$ac_save_cppflags
  6153. fi # $USE_POSTGRES
  6154. if test -n "$USE_POSTGRES"; then
  6155. # With PostgreSQL library directory
  6156. echo $ac_n "checking for location of PostgreSQL library""... $ac_c" 1>&6
  6157. echo "configure:7541: checking for location of PostgreSQL library" >&5
  6158. case "$with_postgres_libs" in
  6159. y | ye | yes | n | no)
  6160. { echo "configure: error: *** You must supply a directory to --with-postgres-libs." 1>&2; exit 1; }
  6161. ;;
  6162. esac
  6163. echo "$ac_t""$with_postgres_libs" 1>&6
  6164. if test -n "$with_postgres_libs"; then
  6165. for dir in $with_postgres_libs; do
  6166. if test -d "$dir"; then
  6167. PQLIBPATH="$PQLIBPATH -L$dir"
  6168. else
  6169. { echo "configure: error: *** PostgreSQL library directory $dir does not exist." 1>&2; exit 1; }
  6170. fi
  6171. done
  6172. fi
  6173. ac_save_ldflags="$LDFLAGS"
  6174. LDFLAGS="$PQLIBPATH $LDFLAGS"
  6175. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6176. echo "configure:7570: checking for PQsetdbLogin in -lpq" >&5
  6177. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6178. ac_save_LIBS="$LIBS"
  6179. LIBS="-lpq $LIBS"
  6180. cat > conftest.$ac_ext <<EOF
  6181. #line 7576 "configure"
  6182. #include "confdefs.h"
  6183. /* Override any gcc2 internal prototype to avoid an error. */
  6184. /* We use char because int might match the return type of a gcc2
  6185. builtin and then its argument prototype would still apply. */
  6186. char PQsetdbLogin();
  6187. int main() {
  6188. PQsetdbLogin()
  6189. ; return 0; }
  6190. EOF
  6191. if { (eval echo configure:7587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6192. rm -rf conftest*
  6193. eval "ac_cv_lib_$ac_lib_var=yes"
  6194. else
  6195. echo "configure: failed program was:" >&5
  6196. cat conftest.$ac_ext >&5
  6197. rm -rf conftest*
  6198. eval "ac_cv_lib_$ac_lib_var=no"
  6199. fi
  6200. rm -f conftest*
  6201. LIBS="$ac_save_LIBS"
  6202. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6203. echo "$ac_t""yes" 1>&6
  6204. PQLIB="$PQLIB -lpq "
  6205. else
  6206. echo "$ac_t""no" 1>&6
  6207. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6208. echo "configure:7606: checking for PQsetdbLogin in -lpq" >&5
  6209. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6210. ac_save_LIBS="$LIBS"
  6211. LIBS="-lpq -lssl -lcrypto $LIBS"
  6212. cat > conftest.$ac_ext <<EOF
  6213. #line 7612 "configure"
  6214. #include "confdefs.h"
  6215. /* Override any gcc2 internal prototype to avoid an error. */
  6216. /* We use char because int might match the return type of a gcc2
  6217. builtin and then its argument prototype would still apply. */
  6218. char PQsetdbLogin();
  6219. int main() {
  6220. PQsetdbLogin()
  6221. ; return 0; }
  6222. EOF
  6223. if { (eval echo configure:7623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6224. rm -rf conftest*
  6225. eval "ac_cv_lib_$ac_lib_var=yes"
  6226. else
  6227. echo "configure: failed program was:" >&5
  6228. cat conftest.$ac_ext >&5
  6229. rm -rf conftest*
  6230. eval "ac_cv_lib_$ac_lib_var=no"
  6231. fi
  6232. rm -f conftest*
  6233. LIBS="$ac_save_LIBS"
  6234. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6235. echo "$ac_t""yes" 1>&6
  6236. PQLIB="$PQLIB -lpq -lssl -lcrypto"
  6237. else
  6238. echo "$ac_t""no" 1>&6
  6239. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6240. echo "configure:7642: checking for PQsetdbLogin in -lpq" >&5
  6241. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6242. ac_save_LIBS="$LIBS"
  6243. LIBS="-lpq -lcrypt $LIBS"
  6244. cat > conftest.$ac_ext <<EOF
  6245. #line 7648 "configure"
  6246. #include "confdefs.h"
  6247. /* Override any gcc2 internal prototype to avoid an error. */
  6248. /* We use char because int might match the return type of a gcc2
  6249. builtin and then its argument prototype would still apply. */
  6250. char PQsetdbLogin();
  6251. int main() {
  6252. PQsetdbLogin()
  6253. ; return 0; }
  6254. EOF
  6255. if { (eval echo configure:7659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6256. rm -rf conftest*
  6257. eval "ac_cv_lib_$ac_lib_var=yes"
  6258. else
  6259. echo "configure: failed program was:" >&5
  6260. cat conftest.$ac_ext >&5
  6261. rm -rf conftest*
  6262. eval "ac_cv_lib_$ac_lib_var=no"
  6263. fi
  6264. rm -f conftest*
  6265. LIBS="$ac_save_LIBS"
  6266. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6267. echo "$ac_t""yes" 1>&6
  6268. PQLIB="$PQLIB -lpq -lcrypt"
  6269. else
  6270. echo "$ac_t""no" 1>&6
  6271. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6272. echo "configure:7678: checking for PQsetdbLogin in -lpq" >&5
  6273. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6274. ac_save_LIBS="$LIBS"
  6275. LIBS="-lpq -lcrypt -lssl -lcrypto $LIBS"
  6276. cat > conftest.$ac_ext <<EOF
  6277. #line 7684 "configure"
  6278. #include "confdefs.h"
  6279. /* Override any gcc2 internal prototype to avoid an error. */
  6280. /* We use char because int might match the return type of a gcc2
  6281. builtin and then its argument prototype would still apply. */
  6282. char PQsetdbLogin();
  6283. int main() {
  6284. PQsetdbLogin()
  6285. ; return 0; }
  6286. EOF
  6287. if { (eval echo configure:7695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6288. rm -rf conftest*
  6289. eval "ac_cv_lib_$ac_lib_var=yes"
  6290. else
  6291. echo "configure: failed program was:" >&5
  6292. cat conftest.$ac_ext >&5
  6293. rm -rf conftest*
  6294. eval "ac_cv_lib_$ac_lib_var=no"
  6295. fi
  6296. rm -f conftest*
  6297. LIBS="$ac_save_LIBS"
  6298. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6299. echo "$ac_t""yes" 1>&6
  6300. PQLIB="$PQLIB -lpq -lcrypt -lssl -lcrypto"
  6301. else
  6302. echo "$ac_t""no" 1>&6
  6303. LDFLAGS=${ac_save_ldflags}
  6304. { echo "configure: error: *** Unable to locate PostgreSQL library." 1>&2; exit 1; }
  6305. fi
  6306. fi
  6307. fi
  6308. fi
  6309. LDFLAGS=${ac_save_ldflags}
  6310. ac_save_ldflags="$LDFLAGS"
  6311. LDFLAGS="$LDFLAGS $PQLIBPATH"
  6312. echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
  6313. echo "configure:7752: checking for PQcmdTuples in -lpq" >&5
  6314. ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
  6315. ac_save_LIBS="$LIBS"
  6316. LIBS="-lpq $LIBS"
  6317. cat > conftest.$ac_ext <<EOF
  6318. #line 7758 "configure"
  6319. #include "confdefs.h"
  6320. /* Override any gcc2 internal prototype to avoid an error. */
  6321. /* We use char because int might match the return type of a gcc2
  6322. builtin and then its argument prototype would still apply. */
  6323. char PQcmdTuples();
  6324. int main() {
  6325. PQcmdTuples()
  6326. ; return 0; }
  6327. EOF
  6328. if { (eval echo configure:7769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6329. rm -rf conftest*
  6330. eval "ac_cv_lib_$ac_lib_var=yes"
  6331. else
  6332. echo "configure: failed program was:" >&5
  6333. cat conftest.$ac_ext >&5
  6334. rm -rf conftest*
  6335. eval "ac_cv_lib_$ac_lib_var=no"
  6336. fi
  6337. rm -f conftest*
  6338. LIBS="$ac_save_LIBS"
  6339. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6340. echo "$ac_t""yes" 1>&6
  6341. cat >> confdefs.h <<\EOF
  6342. #define HAVE_PQCMDTUPLES 1
  6343. EOF
  6344. else
  6345. echo "$ac_t""no" 1>&6
  6346. echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
  6347. echo "configure:7791: checking for PQcmdTuples in -lpq" >&5
  6348. ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
  6349. ac_save_LIBS="$LIBS"
  6350. LIBS="-lpq -lcrypt $LIBS"
  6351. cat > conftest.$ac_ext <<EOF
  6352. #line 7797 "configure"
  6353. #include "confdefs.h"
  6354. /* Override any gcc2 internal prototype to avoid an error. */
  6355. /* We use char because int might match the return type of a gcc2
  6356. builtin and then its argument prototype would still apply. */
  6357. char PQcmdTuples();
  6358. int main() {
  6359. PQcmdTuples()
  6360. ; return 0; }
  6361. EOF
  6362. if { (eval echo configure:7808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6363. rm -rf conftest*
  6364. eval "ac_cv_lib_$ac_lib_var=yes"
  6365. else
  6366. echo "configure: failed program was:" >&5
  6367. cat conftest.$ac_ext >&5
  6368. rm -rf conftest*
  6369. eval "ac_cv_lib_$ac_lib_var=no"
  6370. fi
  6371. rm -f conftest*
  6372. LIBS="$ac_save_LIBS"
  6373. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6374. echo "$ac_t""yes" 1>&6
  6375. cat >> confdefs.h <<\EOF
  6376. #define HAVE_PQCMDTUPLES 1
  6377. EOF
  6378. else
  6379. echo "$ac_t""no" 1>&6
  6380. fi
  6381. fi
  6382. LDFLAGS="${ac_save_ldflags}"
  6383. fi # $USE_POSTGRES
  6384. # Done checking PostgreSQL
  6385. # Enable MySQL option
  6386. echo $ac_n "checking whether to use MySQL""... $ac_c" 1>&6
  6387. echo "configure:7851: checking whether to use MySQL" >&5
  6388. echo "$ac_t"""$with_mysql"" 1>&6
  6389. case "$with_mysql" in
  6390. "no") USE_MYSQL= ;;
  6391. "yes") USE_MYSQL="1" ;;
  6392. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6393. esac
  6394. MYSQLINCPATH=
  6395. MYSQLLIBPATH=
  6396. MYSQLLIB=
  6397. if test -n "$USE_MYSQL"; then
  6398. # With MySQL includes directory
  6399. echo $ac_n "checking for location of MySQL includes""... $ac_c" 1>&6
  6400. echo "configure:7871: checking for location of MySQL includes" >&5
  6401. case "$with_mysql_includes" in
  6402. y | ye | yes | n | no)
  6403. { echo "configure: error: *** You must supply a directory to --with-mysql-includes." 1>&2; exit 1; }
  6404. ;;
  6405. esac
  6406. echo "$ac_t""$with_mysql_includes" 1>&6
  6407. if test -n "$with_mysql_includes" ; then
  6408. for dir in $with_mysql_includes; do
  6409. if test -d "$dir"; then
  6410. MYSQLINCPATH="$MYSQLINCPATH -I$dir"
  6411. else
  6412. { echo "configure: error: *** MySQL includes directory $dir does not exist." 1>&2; exit 1; }
  6413. fi
  6414. done
  6415. fi
  6416. ac_save_cppflags="$CPPFLAGS"
  6417. CPPFLAGS="$MYSQLINCPATH $CPPFLAGS"
  6418. for ac_hdr in mysql.h
  6419. do
  6420. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6421. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6422. echo "configure:7897: checking for $ac_hdr" >&5
  6423. cat > conftest.$ac_ext <<EOF
  6424. #line 7900 "configure"
  6425. #include "confdefs.h"
  6426. #include <$ac_hdr>
  6427. EOF
  6428. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6429. { (eval echo configure:7905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6430. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6431. if test -z "$ac_err"; then
  6432. rm -rf conftest*
  6433. eval "ac_cv_header_$ac_safe=yes"
  6434. else
  6435. echo "$ac_err" >&5
  6436. echo "configure: failed program was:" >&5
  6437. cat conftest.$ac_ext >&5
  6438. rm -rf conftest*
  6439. eval "ac_cv_header_$ac_safe=no"
  6440. fi
  6441. rm -f conftest*
  6442. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6443. echo "$ac_t""yes" 1>&6
  6444. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6445. cat >> confdefs.h <<EOF
  6446. #define $ac_tr_hdr 1
  6447. EOF
  6448. else
  6449. echo "$ac_t""no" 1>&6
  6450. { echo "configure: error: *** Unable to locate MySQL includes." 1>&2; exit 1; }
  6451. fi
  6452. done
  6453. CPPFLAGS=$ac_save_cppflags
  6454. fi # $USE_MYSQL
  6455. if test -n "$USE_MYSQL"; then
  6456. # With MySQL library directory
  6457. echo $ac_n "checking for location of MySQL library""... $ac_c" 1>&6
  6458. echo "configure:7942: checking for location of MySQL library" >&5
  6459. case "$with_mysql_libs" in
  6460. y | ye | yes | n | no)
  6461. { echo "configure: error: *** You must supply a directory to --with-mysql-libs." 1>&2; exit 1; }
  6462. ;;
  6463. esac
  6464. echo "$ac_t""$with_mysql_libs" 1>&6
  6465. if test -n "$with_mysql_libs"; then
  6466. for dir in $with_mysql_libs; do
  6467. if test -d "$dir"; then
  6468. MYSQLLIBPATH="$MYSQLLIBPATH -L$dir"
  6469. else
  6470. { echo "configure: error: *** MySQL library directory $dir does not exist." 1>&2; exit 1; }
  6471. fi
  6472. done
  6473. fi
  6474. ac_save_ldflags="$LDFLAGS"
  6475. LDFLAGS="$MYSQLLIBPATH $LDFLAGS"
  6476. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6477. echo "configure:7973: checking for mysql_query in -lmysqlclient" >&5
  6478. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6479. ac_save_LIBS="$LIBS"
  6480. LIBS="-lmysqlclient $LIBS"
  6481. cat > conftest.$ac_ext <<EOF
  6482. #line 7979 "configure"
  6483. #include "confdefs.h"
  6484. /* Override any gcc2 internal prototype to avoid an error. */
  6485. /* We use char because int might match the return type of a gcc2
  6486. builtin and then its argument prototype would still apply. */
  6487. char mysql_query();
  6488. int main() {
  6489. mysql_query()
  6490. ; return 0; }
  6491. EOF
  6492. if { (eval echo configure:7990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6493. rm -rf conftest*
  6494. eval "ac_cv_lib_$ac_lib_var=yes"
  6495. else
  6496. echo "configure: failed program was:" >&5
  6497. cat conftest.$ac_ext >&5
  6498. rm -rf conftest*
  6499. eval "ac_cv_lib_$ac_lib_var=no"
  6500. fi
  6501. rm -f conftest*
  6502. LIBS="$ac_save_LIBS"
  6503. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6504. echo "$ac_t""yes" 1>&6
  6505. MYSQLLIB="$MYSQLLIB -lmysqlclient "
  6506. else
  6507. echo "$ac_t""no" 1>&6
  6508. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6509. echo "configure:8009: checking for mysql_query in -lmysqlclient" >&5
  6510. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6511. ac_save_LIBS="$LIBS"
  6512. LIBS="-lmysqlclient $MATHLIB $LIBS"
  6513. cat > conftest.$ac_ext <<EOF
  6514. #line 8015 "configure"
  6515. #include "confdefs.h"
  6516. /* Override any gcc2 internal prototype to avoid an error. */
  6517. /* We use char because int might match the return type of a gcc2
  6518. builtin and then its argument prototype would still apply. */
  6519. char mysql_query();
  6520. int main() {
  6521. mysql_query()
  6522. ; return 0; }
  6523. EOF
  6524. if { (eval echo configure:8026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6525. rm -rf conftest*
  6526. eval "ac_cv_lib_$ac_lib_var=yes"
  6527. else
  6528. echo "configure: failed program was:" >&5
  6529. cat conftest.$ac_ext >&5
  6530. rm -rf conftest*
  6531. eval "ac_cv_lib_$ac_lib_var=no"
  6532. fi
  6533. rm -f conftest*
  6534. LIBS="$ac_save_LIBS"
  6535. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6536. echo "$ac_t""yes" 1>&6
  6537. MYSQLLIB="$MYSQLLIB -lmysqlclient $MATHLIB"
  6538. else
  6539. echo "$ac_t""no" 1>&6
  6540. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6541. echo "configure:8045: checking for mysql_query in -lmysqlclient" >&5
  6542. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6543. ac_save_LIBS="$LIBS"
  6544. LIBS="-lmysqlclient $SOCKLIB $LIBS"
  6545. cat > conftest.$ac_ext <<EOF
  6546. #line 8051 "configure"
  6547. #include "confdefs.h"
  6548. /* Override any gcc2 internal prototype to avoid an error. */
  6549. /* We use char because int might match the return type of a gcc2
  6550. builtin and then its argument prototype would still apply. */
  6551. char mysql_query();
  6552. int main() {
  6553. mysql_query()
  6554. ; return 0; }
  6555. EOF
  6556. if { (eval echo configure:8062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6557. rm -rf conftest*
  6558. eval "ac_cv_lib_$ac_lib_var=yes"
  6559. else
  6560. echo "configure: failed program was:" >&5
  6561. cat conftest.$ac_ext >&5
  6562. rm -rf conftest*
  6563. eval "ac_cv_lib_$ac_lib_var=no"
  6564. fi
  6565. rm -f conftest*
  6566. LIBS="$ac_save_LIBS"
  6567. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6568. echo "$ac_t""yes" 1>&6
  6569. MYSQLLIB="$MYSQLLIB -lmysqlclient $SOCKLIB"
  6570. else
  6571. echo "$ac_t""no" 1>&6
  6572. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6573. echo "configure:8081: checking for mysql_query in -lmysqlclient" >&5
  6574. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6575. ac_save_LIBS="$LIBS"
  6576. LIBS="-lmysqlclient $SOCKLIB $MATHLIB $LIBS"
  6577. cat > conftest.$ac_ext <<EOF
  6578. #line 8087 "configure"
  6579. #include "confdefs.h"
  6580. /* Override any gcc2 internal prototype to avoid an error. */
  6581. /* We use char because int might match the return type of a gcc2
  6582. builtin and then its argument prototype would still apply. */
  6583. char mysql_query();
  6584. int main() {
  6585. mysql_query()
  6586. ; return 0; }
  6587. EOF
  6588. if { (eval echo configure:8098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6589. rm -rf conftest*
  6590. eval "ac_cv_lib_$ac_lib_var=yes"
  6591. else
  6592. echo "configure: failed program was:" >&5
  6593. cat conftest.$ac_ext >&5
  6594. rm -rf conftest*
  6595. eval "ac_cv_lib_$ac_lib_var=no"
  6596. fi
  6597. rm -f conftest*
  6598. LIBS="$ac_save_LIBS"
  6599. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6600. echo "$ac_t""yes" 1>&6
  6601. MYSQLLIB="$MYSQLLIB -lmysqlclient $SOCKLIB $MATHLIB"
  6602. else
  6603. echo "$ac_t""no" 1>&6
  6604. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6605. echo "configure:8117: checking for mysql_query in -lmysqlclient" >&5
  6606. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6607. ac_save_LIBS="$LIBS"
  6608. LIBS="-lmysqlclient $ZLIB $LIBS"
  6609. cat > conftest.$ac_ext <<EOF
  6610. #line 8123 "configure"
  6611. #include "confdefs.h"
  6612. /* Override any gcc2 internal prototype to avoid an error. */
  6613. /* We use char because int might match the return type of a gcc2
  6614. builtin and then its argument prototype would still apply. */
  6615. char mysql_query();
  6616. int main() {
  6617. mysql_query()
  6618. ; return 0; }
  6619. EOF
  6620. if { (eval echo configure:8134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6621. rm -rf conftest*
  6622. eval "ac_cv_lib_$ac_lib_var=yes"
  6623. else
  6624. echo "configure: failed program was:" >&5
  6625. cat conftest.$ac_ext >&5
  6626. rm -rf conftest*
  6627. eval "ac_cv_lib_$ac_lib_var=no"
  6628. fi
  6629. rm -f conftest*
  6630. LIBS="$ac_save_LIBS"
  6631. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6632. echo "$ac_t""yes" 1>&6
  6633. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB"
  6634. else
  6635. echo "$ac_t""no" 1>&6
  6636. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6637. echo "configure:8153: checking for mysql_query in -lmysqlclient" >&5
  6638. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6639. ac_save_LIBS="$LIBS"
  6640. LIBS="-lmysqlclient $ZLIB $MATHLIB $LIBS"
  6641. cat > conftest.$ac_ext <<EOF
  6642. #line 8159 "configure"
  6643. #include "confdefs.h"
  6644. /* Override any gcc2 internal prototype to avoid an error. */
  6645. /* We use char because int might match the return type of a gcc2
  6646. builtin and then its argument prototype would still apply. */
  6647. char mysql_query();
  6648. int main() {
  6649. mysql_query()
  6650. ; return 0; }
  6651. EOF
  6652. if { (eval echo configure:8170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6653. rm -rf conftest*
  6654. eval "ac_cv_lib_$ac_lib_var=yes"
  6655. else
  6656. echo "configure: failed program was:" >&5
  6657. cat conftest.$ac_ext >&5
  6658. rm -rf conftest*
  6659. eval "ac_cv_lib_$ac_lib_var=no"
  6660. fi
  6661. rm -f conftest*
  6662. LIBS="$ac_save_LIBS"
  6663. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6664. echo "$ac_t""yes" 1>&6
  6665. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $MATHLIB"
  6666. else
  6667. echo "$ac_t""no" 1>&6
  6668. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6669. echo "configure:8189: checking for mysql_query in -lmysqlclient" >&5
  6670. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6671. ac_save_LIBS="$LIBS"
  6672. LIBS="-lmysqlclient $ZLIB $SOCKLIB $LIBS"
  6673. cat > conftest.$ac_ext <<EOF
  6674. #line 8195 "configure"
  6675. #include "confdefs.h"
  6676. /* Override any gcc2 internal prototype to avoid an error. */
  6677. /* We use char because int might match the return type of a gcc2
  6678. builtin and then its argument prototype would still apply. */
  6679. char mysql_query();
  6680. int main() {
  6681. mysql_query()
  6682. ; return 0; }
  6683. EOF
  6684. if { (eval echo configure:8206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6685. rm -rf conftest*
  6686. eval "ac_cv_lib_$ac_lib_var=yes"
  6687. else
  6688. echo "configure: failed program was:" >&5
  6689. cat conftest.$ac_ext >&5
  6690. rm -rf conftest*
  6691. eval "ac_cv_lib_$ac_lib_var=no"
  6692. fi
  6693. rm -f conftest*
  6694. LIBS="$ac_save_LIBS"
  6695. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6696. echo "$ac_t""yes" 1>&6
  6697. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $SOCKLIB"
  6698. else
  6699. echo "$ac_t""no" 1>&6
  6700. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6701. echo "configure:8225: checking for mysql_query in -lmysqlclient" >&5
  6702. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6703. ac_save_LIBS="$LIBS"
  6704. LIBS="-lmysqlclient $ZLIB $SOCKLIB $MATHLIB $LIBS"
  6705. cat > conftest.$ac_ext <<EOF
  6706. #line 8231 "configure"
  6707. #include "confdefs.h"
  6708. /* Override any gcc2 internal prototype to avoid an error. */
  6709. /* We use char because int might match the return type of a gcc2
  6710. builtin and then its argument prototype would still apply. */
  6711. char mysql_query();
  6712. int main() {
  6713. mysql_query()
  6714. ; return 0; }
  6715. EOF
  6716. if { (eval echo configure:8242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6717. rm -rf conftest*
  6718. eval "ac_cv_lib_$ac_lib_var=yes"
  6719. else
  6720. echo "configure: failed program was:" >&5
  6721. cat conftest.$ac_ext >&5
  6722. rm -rf conftest*
  6723. eval "ac_cv_lib_$ac_lib_var=no"
  6724. fi
  6725. rm -f conftest*
  6726. LIBS="$ac_save_LIBS"
  6727. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6728. echo "$ac_t""yes" 1>&6
  6729. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $SOCKLIB $MATHLIB"
  6730. else
  6731. echo "$ac_t""no" 1>&6
  6732. LDFLAGS=${ac_save_ldflags}
  6733. { echo "configure: error: *** Unable to locate MySQL library." 1>&2; exit 1; }
  6734. fi
  6735. fi
  6736. fi
  6737. fi
  6738. fi
  6739. fi
  6740. fi
  6741. fi
  6742. LDFLAGS=${ac_save_ldflags}
  6743. # Check for libmysqld (for embeded version of the driver)
  6744. # Extract the first word of "mysql_config", so it can be a program name with args.
  6745. set dummy mysql_config; ac_word=$2
  6746. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  6747. echo "configure:8332: checking for $ac_word" >&5
  6748. case "$MYSQLD_CONFIG" in
  6749. /*)
  6750. ac_cv_path_MYSQLD_CONFIG="$MYSQLD_CONFIG" # Let the user override the test with a path.
  6751. ;;
  6752. ?:/*)
  6753. ac_cv_path_MYSQLD_CONFIG="$MYSQLD_CONFIG" # Let the user override the test with a dos path.
  6754. ;;
  6755. *)
  6756. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  6757. ac_dummy="$PATH"
  6758. for ac_dir in $ac_dummy; do
  6759. test -z "$ac_dir" && ac_dir=.
  6760. if test -f $ac_dir/$ac_word; then
  6761. ac_cv_path_MYSQLD_CONFIG="$ac_dir/$ac_word"
  6762. break
  6763. fi
  6764. done
  6765. IFS="$ac_save_ifs"
  6766. test -z "$ac_cv_path_MYSQLD_CONFIG" && ac_cv_path_MYSQLD_CONFIG="no"
  6767. ;;
  6768. esac
  6769. MYSQLD_CONFIG="$ac_cv_path_MYSQLD_CONFIG"
  6770. if test -n "$MYSQLD_CONFIG"; then
  6771. echo "$ac_t""$MYSQLD_CONFIG" 1>&6
  6772. else
  6773. echo "$ac_t""no" 1>&6
  6774. fi
  6775. if test "$MYSQLD_CONFIG" = "no" ; then
  6776. { echo "configure: error: *** couldn't find mysql_config" 1>&2; exit 1; }
  6777. fi
  6778. if test "$MYSQLD_CONFIG" != "" ; then
  6779. ac_ext=C
  6780. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  6781. ac_cpp='$CXXCPP $CPPFLAGS'
  6782. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  6783. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  6784. cross_compiling=$ac_cv_prog_cxx_cross
  6785. ac_save_libs="$LIBS"
  6786. MYSQLDLIB=`"$MYSQLD_CONFIG" --libmysqld-libs`
  6787. LIBS="$MYSQLDLIB $LIBS"
  6788. echo $ac_n "checking for mysql_server_init""... $ac_c" 1>&6
  6789. echo "configure:8381: checking for mysql_server_init" >&5
  6790. cat > conftest.$ac_ext <<EOF
  6791. #line 8384 "configure"
  6792. #include "confdefs.h"
  6793. /* System header to define __stub macros and hopefully few prototypes,
  6794. which can conflict with char mysql_server_init(); below. */
  6795. #include <assert.h>
  6796. /* Override any gcc2 internal prototype to avoid an error. */
  6797. #ifdef __cplusplus
  6798. extern "C"
  6799. #endif
  6800. /* We use char because int might match the return type of a gcc2
  6801. builtin and then its argument prototype would still apply. */
  6802. char mysql_server_init();
  6803. int main() {
  6804. /* The GNU C library defines this for functions which it implements
  6805. to always fail with ENOSYS. Some functions are actually named
  6806. something starting with __ and the normal name is an alias. */
  6807. #if defined (__stub_mysql_server_init) || defined (__stub___mysql_server_init)
  6808. choke me
  6809. #else
  6810. mysql_server_init();
  6811. #endif
  6812. ; return 0; }
  6813. EOF
  6814. if { (eval echo configure:8410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6815. rm -rf conftest*
  6816. eval "ac_cv_func_mysql_server_init=yes"
  6817. else
  6818. echo "configure: failed program was:" >&5
  6819. cat conftest.$ac_ext >&5
  6820. rm -rf conftest*
  6821. eval "ac_cv_func_mysql_server_init=no"
  6822. fi
  6823. rm -f conftest*
  6824. if eval "test \"`echo '$ac_cv_func_'mysql_server_init`\" = yes"; then
  6825. echo "$ac_t""yes" 1>&6
  6826. :
  6827. else
  6828. echo "$ac_t""no" 1>&6
  6829. MYSQLDLIB="";
  6830. echo "configure: warning: libmysqld not found" 1>&2
  6831. fi
  6832. LIBS=$ac_save_libs
  6833. ac_ext=c
  6834. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  6835. ac_cpp='$CPP $CPPFLAGS'
  6836. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  6837. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  6838. cross_compiling=$ac_cv_prog_cc_cross
  6839. ac_ext=c
  6840. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  6841. ac_cpp='$CPP $CPPFLAGS'
  6842. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  6843. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  6844. cross_compiling=$ac_cv_prog_cc_cross
  6845. fi
  6846. fi # $USE_MYSQL
  6847. # Done checking MySQL
  6848. # Enable SQLite option
  6849. echo $ac_n "checking whether to use SQLite""... $ac_c" 1>&6
  6850. echo "configure:8462: checking whether to use SQLite" >&5
  6851. echo "$ac_t"""$with_sqlite"" 1>&6
  6852. case "$with_sqlite" in
  6853. "no") USE_SQLITE= ;;
  6854. "yes") USE_SQLITE="1" ;;
  6855. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6856. esac
  6857. SQLITEINCPATH=
  6858. SQLITELIBPATH=
  6859. SQLITELIB=
  6860. if test -n "$USE_SQLITE"; then
  6861. # With SQLite includes directory
  6862. echo $ac_n "checking for location of SQLite includes""... $ac_c" 1>&6
  6863. echo "configure:8482: checking for location of SQLite includes" >&5
  6864. case "$with_sqlite_includes" in
  6865. y | ye | yes | n | no)
  6866. { echo "configure: error: *** You must supply a directory to --with-sqlite-includes." 1>&2; exit 1; }
  6867. ;;
  6868. esac
  6869. echo "$ac_t""$with_sqlite_includes" 1>&6
  6870. if test -n "$with_sqlite_includes" ; then
  6871. for dir in $with_sqlite_includes; do
  6872. if test -d "$dir"; then
  6873. SQLITEINCPATH="$SQLITEINCPATH -I$dir"
  6874. else
  6875. { echo "configure: error: *** SQLite includes directory $dir does not exist." 1>&2; exit 1; }
  6876. fi
  6877. done
  6878. fi
  6879. ac_save_cppflags="$CPPFLAGS"
  6880. CPPFLAGS="$SQLITEINCPATH $CPPFLAGS"
  6881. for ac_hdr in sqlite3.h
  6882. do
  6883. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6884. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6885. echo "configure:8508: checking for $ac_hdr" >&5
  6886. cat > conftest.$ac_ext <<EOF
  6887. #line 8511 "configure"
  6888. #include "confdefs.h"
  6889. #include <$ac_hdr>
  6890. EOF
  6891. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6892. { (eval echo configure:8516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6893. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6894. if test -z "$ac_err"; then
  6895. rm -rf conftest*
  6896. eval "ac_cv_header_$ac_safe=yes"
  6897. else
  6898. echo "$ac_err" >&5
  6899. echo "configure: failed program was:" >&5
  6900. cat conftest.$ac_ext >&5
  6901. rm -rf conftest*
  6902. eval "ac_cv_header_$ac_safe=no"
  6903. fi
  6904. rm -f conftest*
  6905. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6906. echo "$ac_t""yes" 1>&6
  6907. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6908. cat >> confdefs.h <<EOF
  6909. #define $ac_tr_hdr 1
  6910. EOF
  6911. else
  6912. echo "$ac_t""no" 1>&6
  6913. { echo "configure: error: *** Unable to locate SQLite includes." 1>&2; exit 1; }
  6914. fi
  6915. done
  6916. CPPFLAGS=$ac_save_cppflags
  6917. cat >> confdefs.h <<\EOF
  6918. #define HAVE_SQLITE 1
  6919. EOF
  6920. fi # $USE_SQLITE
  6921. if test -n "$USE_SQLITE"; then
  6922. # With SQLite library directory
  6923. echo $ac_n "checking for location of SQLite library""... $ac_c" 1>&6
  6924. echo "configure:8559: checking for location of SQLite library" >&5
  6925. case "$with_sqlite_libs" in
  6926. y | ye | yes | n | no)
  6927. { echo "configure: error: *** You must supply a directory to --with-sqlite-libs." 1>&2; exit 1; }
  6928. ;;
  6929. esac
  6930. echo "$ac_t""$with_sqlite_libs" 1>&6
  6931. if test -n "$with_sqlite_libs"; then
  6932. for dir in $with_sqlite_libs; do
  6933. if test -d "$dir"; then
  6934. SQLITELIBPATH="$SQLITELIBPATH -L$dir"
  6935. else
  6936. { echo "configure: error: *** SQLite library directory $dir does not exist." 1>&2; exit 1; }
  6937. fi
  6938. done
  6939. fi
  6940. ac_save_ldflags="$LDFLAGS"
  6941. LDFLAGS="$SQLITELIBPATH $LDFLAGS"
  6942. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  6943. echo "configure:8588: checking for sqlite3_open in -lsqlite3" >&5
  6944. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  6945. ac_save_LIBS="$LIBS"
  6946. LIBS="-lsqlite3 $LIBS"
  6947. cat > conftest.$ac_ext <<EOF
  6948. #line 8594 "configure"
  6949. #include "confdefs.h"
  6950. /* Override any gcc2 internal prototype to avoid an error. */
  6951. /* We use char because int might match the return type of a gcc2
  6952. builtin and then its argument prototype would still apply. */
  6953. char sqlite3_open();
  6954. int main() {
  6955. sqlite3_open()
  6956. ; return 0; }
  6957. EOF
  6958. if { (eval echo configure:8605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6959. rm -rf conftest*
  6960. eval "ac_cv_lib_$ac_lib_var=yes"
  6961. else
  6962. echo "configure: failed program was:" >&5
  6963. cat conftest.$ac_ext >&5
  6964. rm -rf conftest*
  6965. eval "ac_cv_lib_$ac_lib_var=no"
  6966. fi
  6967. rm -f conftest*
  6968. LIBS="$ac_save_LIBS"
  6969. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6970. echo "$ac_t""yes" 1>&6
  6971. SQLITELIB="$SQLITELIB -lsqlite3 "
  6972. else
  6973. echo "$ac_t""no" 1>&6
  6974. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  6975. echo "configure:8624: checking for sqlite3_open in -lsqlite3" >&5
  6976. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  6977. ac_save_LIBS="$LIBS"
  6978. LIBS="-lsqlite3 $DLLIB $LIBS"
  6979. cat > conftest.$ac_ext <<EOF
  6980. #line 8630 "configure"
  6981. #include "confdefs.h"
  6982. /* Override any gcc2 internal prototype to avoid an error. */
  6983. /* We use char because int might match the return type of a gcc2
  6984. builtin and then its argument prototype would still apply. */
  6985. char sqlite3_open();
  6986. int main() {
  6987. sqlite3_open()
  6988. ; return 0; }
  6989. EOF
  6990. if { (eval echo configure:8641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6991. rm -rf conftest*
  6992. eval "ac_cv_lib_$ac_lib_var=yes"
  6993. else
  6994. echo "configure: failed program was:" >&5
  6995. cat conftest.$ac_ext >&5
  6996. rm -rf conftest*
  6997. eval "ac_cv_lib_$ac_lib_var=no"
  6998. fi
  6999. rm -f conftest*
  7000. LIBS="$ac_save_LIBS"
  7001. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7002. echo "$ac_t""yes" 1>&6
  7003. SQLITELIB="$SQLITELIB -lsqlite3 $DLLIB"
  7004. else
  7005. echo "$ac_t""no" 1>&6
  7006. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7007. echo "configure:8660: checking for sqlite3_open in -lsqlite3" >&5
  7008. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7009. ac_save_LIBS="$LIBS"
  7010. LIBS="-lsqlite3 $MATHLIB $LIBS"
  7011. cat > conftest.$ac_ext <<EOF
  7012. #line 8666 "configure"
  7013. #include "confdefs.h"
  7014. /* Override any gcc2 internal prototype to avoid an error. */
  7015. /* We use char because int might match the return type of a gcc2
  7016. builtin and then its argument prototype would still apply. */
  7017. char sqlite3_open();
  7018. int main() {
  7019. sqlite3_open()
  7020. ; return 0; }
  7021. EOF
  7022. if { (eval echo configure:8677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7023. rm -rf conftest*
  7024. eval "ac_cv_lib_$ac_lib_var=yes"
  7025. else
  7026. echo "configure: failed program was:" >&5
  7027. cat conftest.$ac_ext >&5
  7028. rm -rf conftest*
  7029. eval "ac_cv_lib_$ac_lib_var=no"
  7030. fi
  7031. rm -f conftest*
  7032. LIBS="$ac_save_LIBS"
  7033. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7034. echo "$ac_t""yes" 1>&6
  7035. SQLITELIB="$SQLITELIB -lsqlite3 $MATHLIB"
  7036. else
  7037. echo "$ac_t""no" 1>&6
  7038. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7039. echo "configure:8696: checking for sqlite3_open in -lsqlite3" >&5
  7040. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7041. ac_save_LIBS="$LIBS"
  7042. LIBS="-lsqlite3 $MATHLIB $DLLIB $LIBS"
  7043. cat > conftest.$ac_ext <<EOF
  7044. #line 8702 "configure"
  7045. #include "confdefs.h"
  7046. /* Override any gcc2 internal prototype to avoid an error. */
  7047. /* We use char because int might match the return type of a gcc2
  7048. builtin and then its argument prototype would still apply. */
  7049. char sqlite3_open();
  7050. int main() {
  7051. sqlite3_open()
  7052. ; return 0; }
  7053. EOF
  7054. if { (eval echo configure:8713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7055. rm -rf conftest*
  7056. eval "ac_cv_lib_$ac_lib_var=yes"
  7057. else
  7058. echo "configure: failed program was:" >&5
  7059. cat conftest.$ac_ext >&5
  7060. rm -rf conftest*
  7061. eval "ac_cv_lib_$ac_lib_var=no"
  7062. fi
  7063. rm -f conftest*
  7064. LIBS="$ac_save_LIBS"
  7065. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7066. echo "$ac_t""yes" 1>&6
  7067. SQLITELIB="$SQLITELIB -lsqlite3 $MATHLIB $DLLIB"
  7068. else
  7069. echo "$ac_t""no" 1>&6
  7070. LDFLAGS=${ac_save_ldflags}
  7071. { echo "configure: error: *** Unable to locate SQLite library." 1>&2; exit 1; }
  7072. fi
  7073. fi
  7074. fi
  7075. fi
  7076. LDFLAGS=${ac_save_ldflags}
  7077. fi # $USE_SQLITE
  7078. # Done checking SQLite
  7079. # Enable FFMPEG option
  7080. echo $ac_n "checking whether to use FFMPEG""... $ac_c" 1>&6
  7081. echo "configure:8782: checking whether to use FFMPEG" >&5
  7082. echo "$ac_t"""$with_ffmpeg"" 1>&6
  7083. case "$with_ffmpeg" in
  7084. "no") USE_FFMPEG= ;;
  7085. "yes") USE_FFMPEG="1" ;;
  7086. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  7087. esac
  7088. FFMPEGINCPATH=
  7089. FFMPEGLIBPATH=
  7090. FFMPEGLIB=
  7091. if test -n "$USE_FFMPEG"; then
  7092. # With FFMPEG includes directory
  7093. echo $ac_n "checking for location of FFMPEG includes""... $ac_c" 1>&6
  7094. echo "configure:8802: checking for location of FFMPEG includes" >&5
  7095. case "$with_ffmpeg_includes" in
  7096. y | ye | yes | n | no)
  7097. { echo "configure: error: *** You must supply a directory to --with-ffmpeg-includes." 1>&2; exit 1; }
  7098. ;;
  7099. esac
  7100. echo "$ac_t""$with_ffmpeg_includes" 1>&6
  7101. if test -n "$with_ffmpeg_includes" ; then
  7102. for dir in $with_ffmpeg_includes; do
  7103. if test -d "$dir"; then
  7104. FFMPEGINCPATH="$FFMPEGINCPATH -I$dir"
  7105. else
  7106. { echo "configure: error: *** FFMPEG includes directory $dir does not exist." 1>&2; exit 1; }
  7107. fi
  7108. done
  7109. fi
  7110. ac_save_cppflags="$CPPFLAGS"
  7111. CPPFLAGS="$FFMPEGINCPATH $CPPFLAGS"
  7112. for ac_hdr in avcodec.h
  7113. do
  7114. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7115. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7116. echo "configure:8828: checking for $ac_hdr" >&5
  7117. cat > conftest.$ac_ext <<EOF
  7118. #line 8831 "configure"
  7119. #include "confdefs.h"
  7120. #include <$ac_hdr>
  7121. EOF
  7122. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7123. { (eval echo configure:8836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7124. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7125. if test -z "$ac_err"; then
  7126. rm -rf conftest*
  7127. eval "ac_cv_header_$ac_safe=yes"
  7128. else
  7129. echo "$ac_err" >&5
  7130. echo "configure: failed program was:" >&5
  7131. cat conftest.$ac_ext >&5
  7132. rm -rf conftest*
  7133. eval "ac_cv_header_$ac_safe=no"
  7134. fi
  7135. rm -f conftest*
  7136. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7137. echo "$ac_t""yes" 1>&6
  7138. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7139. cat >> confdefs.h <<EOF
  7140. #define $ac_tr_hdr 1
  7141. EOF
  7142. else
  7143. echo "$ac_t""no" 1>&6
  7144. { echo "configure: error: *** Unable to locate FFMPEG includes." 1>&2; exit 1; }
  7145. fi
  7146. done
  7147. CPPFLAGS=$ac_save_cppflags
  7148. ac_save_cppflags="$CPPFLAGS"
  7149. CPPFLAGS="$FFMPEGINCPATH $CPPFLAGS"
  7150. for ac_hdr in avformat.h
  7151. do
  7152. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7153. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7154. echo "configure:8872: checking for $ac_hdr" >&5
  7155. cat > conftest.$ac_ext <<EOF
  7156. #line 8875 "configure"
  7157. #include "confdefs.h"
  7158. #include <$ac_hdr>
  7159. EOF
  7160. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7161. { (eval echo configure:8880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7162. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7163. if test -z "$ac_err"; then
  7164. rm -rf conftest*
  7165. eval "ac_cv_header_$ac_safe=yes"
  7166. else
  7167. echo "$ac_err" >&5
  7168. echo "configure: failed program was:" >&5
  7169. cat conftest.$ac_ext >&5
  7170. rm -rf conftest*
  7171. eval "ac_cv_header_$ac_safe=no"
  7172. fi
  7173. rm -f conftest*
  7174. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7175. echo "$ac_t""yes" 1>&6
  7176. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7177. cat >> confdefs.h <<EOF
  7178. #define $ac_tr_hdr 1
  7179. EOF
  7180. else
  7181. echo "$ac_t""no" 1>&6
  7182. { echo "configure: error: *** Unable to locate FFMPEG includes." 1>&2; exit 1; }
  7183. fi
  7184. done
  7185. CPPFLAGS=$ac_save_cppflags
  7186. ac_save_cppflags="$CPPFLAGS"
  7187. CPPFLAGS="$FFMPEGINCPATH $CPPFLAGS"
  7188. for ac_hdr in swscale.h
  7189. do
  7190. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7191. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7192. echo "configure:8916: checking for $ac_hdr" >&5
  7193. cat > conftest.$ac_ext <<EOF
  7194. #line 8919 "configure"
  7195. #include "confdefs.h"
  7196. #include <$ac_hdr>
  7197. EOF
  7198. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7199. { (eval echo configure:8924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7200. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7201. if test -z "$ac_err"; then
  7202. rm -rf conftest*
  7203. eval "ac_cv_header_$ac_safe=yes"
  7204. else
  7205. echo "$ac_err" >&5
  7206. echo "configure: failed program was:" >&5
  7207. cat conftest.$ac_ext >&5
  7208. rm -rf conftest*
  7209. eval "ac_cv_header_$ac_safe=no"
  7210. fi
  7211. rm -f conftest*
  7212. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7213. echo "$ac_t""yes" 1>&6
  7214. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7215. cat >> confdefs.h <<EOF
  7216. #define $ac_tr_hdr 1
  7217. EOF
  7218. else
  7219. echo "$ac_t""no" 1>&6
  7220. { echo "configure: error: *** Unable to locate FFMPEG includes." 1>&2; exit 1; }
  7221. fi
  7222. done
  7223. CPPFLAGS=$ac_save_cppflags
  7224. cat >> confdefs.h <<\EOF
  7225. #define HAVE_FFMPEG 1
  7226. EOF
  7227. fi # $USE_FFMPEG
  7228. if test -n "$USE_FFMPEG"; then
  7229. # With FFMPEG library directory
  7230. echo $ac_n "checking for location of FFMPEG library""... $ac_c" 1>&6
  7231. echo "configure:8967: checking for location of FFMPEG library" >&5
  7232. case "$with_ffmpeg_libs" in
  7233. y | ye | yes | n | no)
  7234. { echo "configure: error: *** You must supply a directory to --with-ffmpeg-libs." 1>&2; exit 1; }
  7235. ;;
  7236. esac
  7237. echo "$ac_t""$with_ffmpeg_libs" 1>&6
  7238. if test -n "$with_ffmpeg_libs"; then
  7239. for dir in $with_ffmpeg_libs; do
  7240. if test -d "$dir"; then
  7241. FFMPEGLIBPATH="$FFMPEGLIBPATH -L$dir"
  7242. else
  7243. { echo "configure: error: *** FFMPEG library directory $dir does not exist." 1>&2; exit 1; }
  7244. fi
  7245. done
  7246. fi
  7247. ac_save_ldflags="$LDFLAGS"
  7248. LDFLAGS="$FFMPEGLIBPATH $LDFLAGS"
  7249. echo $ac_n "checking for av_free in -lavutil""... $ac_c" 1>&6
  7250. echo "configure:8994: checking for av_free in -lavutil" >&5
  7251. ac_lib_var=`echo avutil'_'av_free | sed 'y%./+-%__p_%'`
  7252. ac_save_LIBS="$LIBS"
  7253. LIBS="-lavutil $LIBS"
  7254. cat > conftest.$ac_ext <<EOF
  7255. #line 9000 "configure"
  7256. #include "confdefs.h"
  7257. /* Override any gcc2 internal prototype to avoid an error. */
  7258. /* We use char because int might match the return type of a gcc2
  7259. builtin and then its argument prototype would still apply. */
  7260. char av_free();
  7261. int main() {
  7262. av_free()
  7263. ; return 0; }
  7264. EOF
  7265. if { (eval echo configure:9011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7266. rm -rf conftest*
  7267. eval "ac_cv_lib_$ac_lib_var=yes"
  7268. else
  7269. echo "configure: failed program was:" >&5
  7270. cat conftest.$ac_ext >&5
  7271. rm -rf conftest*
  7272. eval "ac_cv_lib_$ac_lib_var=no"
  7273. fi
  7274. rm -f conftest*
  7275. LIBS="$ac_save_LIBS"
  7276. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7277. echo "$ac_t""yes" 1>&6
  7278. FFMPEGLIB="$FFMPEGLIB -lavutil "
  7279. else
  7280. echo "$ac_t""no" 1>&6
  7281. echo $ac_n "checking for av_free in -lavutil""... $ac_c" 1>&6
  7282. echo "configure:9030: checking for av_free in -lavutil" >&5
  7283. ac_lib_var=`echo avutil'_'av_free | sed 'y%./+-%__p_%'`
  7284. ac_save_LIBS="$LIBS"
  7285. LIBS="-lavutil $MATHLIB $LIBS"
  7286. cat > conftest.$ac_ext <<EOF
  7287. #line 9036 "configure"
  7288. #include "confdefs.h"
  7289. /* Override any gcc2 internal prototype to avoid an error. */
  7290. /* We use char because int might match the return type of a gcc2
  7291. builtin and then its argument prototype would still apply. */
  7292. char av_free();
  7293. int main() {
  7294. av_free()
  7295. ; return 0; }
  7296. EOF
  7297. if { (eval echo configure:9047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7298. rm -rf conftest*
  7299. eval "ac_cv_lib_$ac_lib_var=yes"
  7300. else
  7301. echo "configure: failed program was:" >&5
  7302. cat conftest.$ac_ext >&5
  7303. rm -rf conftest*
  7304. eval "ac_cv_lib_$ac_lib_var=no"
  7305. fi
  7306. rm -f conftest*
  7307. LIBS="$ac_save_LIBS"
  7308. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7309. echo "$ac_t""yes" 1>&6
  7310. FFMPEGLIB="$FFMPEGLIB -lavutil $MATHLIB"
  7311. else
  7312. echo "$ac_t""no" 1>&6
  7313. LDFLAGS=${ac_save_ldflags}
  7314. { echo "configure: error: *** Unable to locate FFMPEG library." 1>&2; exit 1; }
  7315. fi
  7316. fi
  7317. LDFLAGS=${ac_save_ldflags}
  7318. ac_save_ldflags="$LDFLAGS"
  7319. LDFLAGS="$FFMPEGLIBPATH $LDFLAGS"
  7320. echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6
  7321. echo "configure:9092: checking for avcodec_init in -lavcodec" >&5
  7322. ac_lib_var=`echo avcodec'_'avcodec_init | sed 'y%./+-%__p_%'`
  7323. ac_save_LIBS="$LIBS"
  7324. LIBS="-lavcodec $FFMPEGLIB $LIBS"
  7325. cat > conftest.$ac_ext <<EOF
  7326. #line 9098 "configure"
  7327. #include "confdefs.h"
  7328. /* Override any gcc2 internal prototype to avoid an error. */
  7329. /* We use char because int might match the return type of a gcc2
  7330. builtin and then its argument prototype would still apply. */
  7331. char avcodec_init();
  7332. int main() {
  7333. avcodec_init()
  7334. ; return 0; }
  7335. EOF
  7336. if { (eval echo configure:9109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7337. rm -rf conftest*
  7338. eval "ac_cv_lib_$ac_lib_var=yes"
  7339. else
  7340. echo "configure: failed program was:" >&5
  7341. cat conftest.$ac_ext >&5
  7342. rm -rf conftest*
  7343. eval "ac_cv_lib_$ac_lib_var=no"
  7344. fi
  7345. rm -f conftest*
  7346. LIBS="$ac_save_LIBS"
  7347. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7348. echo "$ac_t""yes" 1>&6
  7349. FFMPEGLIB="$FFMPEGLIB -lavcodec "
  7350. else
  7351. echo "$ac_t""no" 1>&6
  7352. echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6
  7353. echo "configure:9128: checking for avcodec_init in -lavcodec" >&5
  7354. ac_lib_var=`echo avcodec'_'avcodec_init | sed 'y%./+-%__p_%'`
  7355. ac_save_LIBS="$LIBS"
  7356. LIBS="-lavcodec $FFMPEGLIB $MATHLIB $LIBS"
  7357. cat > conftest.$ac_ext <<EOF
  7358. #line 9134 "configure"
  7359. #include "confdefs.h"
  7360. /* Override any gcc2 internal prototype to avoid an error. */
  7361. /* We use char because int might match the return type of a gcc2
  7362. builtin and then its argument prototype would still apply. */
  7363. char avcodec_init();
  7364. int main() {
  7365. avcodec_init()
  7366. ; return 0; }
  7367. EOF
  7368. if { (eval echo configure:9145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7369. rm -rf conftest*
  7370. eval "ac_cv_lib_$ac_lib_var=yes"
  7371. else
  7372. echo "configure: failed program was:" >&5
  7373. cat conftest.$ac_ext >&5
  7374. rm -rf conftest*
  7375. eval "ac_cv_lib_$ac_lib_var=no"
  7376. fi
  7377. rm -f conftest*
  7378. LIBS="$ac_save_LIBS"
  7379. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7380. echo "$ac_t""yes" 1>&6
  7381. FFMPEGLIB="$FFMPEGLIB -lavcodec $MATHLIB"
  7382. else
  7383. echo "$ac_t""no" 1>&6
  7384. LDFLAGS=${ac_save_ldflags}
  7385. { echo "configure: error: *** Unable to locate FFMPEG library." 1>&2; exit 1; }
  7386. fi
  7387. fi
  7388. LDFLAGS=${ac_save_ldflags}
  7389. ac_save_ldflags="$LDFLAGS"
  7390. LDFLAGS="$FFMPEGLIBPATH $LDFLAGS"
  7391. echo $ac_n "checking for av_set_parameters in -lavformat""... $ac_c" 1>&6
  7392. echo "configure:9190: checking for av_set_parameters in -lavformat" >&5
  7393. ac_lib_var=`echo avformat'_'av_set_parameters | sed 'y%./+-%__p_%'`
  7394. ac_save_LIBS="$LIBS"
  7395. LIBS="-lavformat $FFMPEGLIB $LIBS"
  7396. cat > conftest.$ac_ext <<EOF
  7397. #line 9196 "configure"
  7398. #include "confdefs.h"
  7399. /* Override any gcc2 internal prototype to avoid an error. */
  7400. /* We use char because int might match the return type of a gcc2
  7401. builtin and then its argument prototype would still apply. */
  7402. char av_set_parameters();
  7403. int main() {
  7404. av_set_parameters()
  7405. ; return 0; }
  7406. EOF
  7407. if { (eval echo configure:9207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7408. rm -rf conftest*
  7409. eval "ac_cv_lib_$ac_lib_var=yes"
  7410. else
  7411. echo "configure: failed program was:" >&5
  7412. cat conftest.$ac_ext >&5
  7413. rm -rf conftest*
  7414. eval "ac_cv_lib_$ac_lib_var=no"
  7415. fi
  7416. rm -f conftest*
  7417. LIBS="$ac_save_LIBS"
  7418. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7419. echo "$ac_t""yes" 1>&6
  7420. FFMPEGLIB="$FFMPEGLIB -lavformat "
  7421. else
  7422. echo "$ac_t""no" 1>&6
  7423. echo $ac_n "checking for av_set_parameters in -lavformat""... $ac_c" 1>&6
  7424. echo "configure:9226: checking for av_set_parameters in -lavformat" >&5
  7425. ac_lib_var=`echo avformat'_'av_set_parameters | sed 'y%./+-%__p_%'`
  7426. ac_save_LIBS="$LIBS"
  7427. LIBS="-lavformat $FFMPEGLIB $MATHLIB $LIBS"
  7428. cat > conftest.$ac_ext <<EOF
  7429. #line 9232 "configure"
  7430. #include "confdefs.h"
  7431. /* Override any gcc2 internal prototype to avoid an error. */
  7432. /* We use char because int might match the return type of a gcc2
  7433. builtin and then its argument prototype would still apply. */
  7434. char av_set_parameters();
  7435. int main() {
  7436. av_set_parameters()
  7437. ; return 0; }
  7438. EOF
  7439. if { (eval echo configure:9243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7440. rm -rf conftest*
  7441. eval "ac_cv_lib_$ac_lib_var=yes"
  7442. else
  7443. echo "configure: failed program was:" >&5
  7444. cat conftest.$ac_ext >&5
  7445. rm -rf conftest*
  7446. eval "ac_cv_lib_$ac_lib_var=no"
  7447. fi
  7448. rm -f conftest*
  7449. LIBS="$ac_save_LIBS"
  7450. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7451. echo "$ac_t""yes" 1>&6
  7452. FFMPEGLIB="$FFMPEGLIB -lavformat $MATHLIB"
  7453. else
  7454. echo "$ac_t""no" 1>&6
  7455. LDFLAGS=${ac_save_ldflags}
  7456. { echo "configure: error: *** Unable to locate FFMPEG library." 1>&2; exit 1; }
  7457. fi
  7458. fi
  7459. LDFLAGS=${ac_save_ldflags}
  7460. fi # $USE_FFMPEG
  7461. # Done checking FFMPEG
  7462. # Enable OpenGL option
  7463. OPENGLINC=
  7464. OPENGLLIB=
  7465. OPENGLULIB=
  7466. USE_OPENGL=
  7467. OPENGL_X11=
  7468. OPENGL_AQUA=
  7469. OPENGL_WINDOWS=
  7470. echo $ac_n "checking whether to use OpenGL""... $ac_c" 1>&6
  7471. echo "configure:9302: checking whether to use OpenGL" >&5
  7472. echo "$ac_t"""$with_opengl"" 1>&6
  7473. case "$with_opengl" in
  7474. n|no)
  7475. OPENGL_TYPE=none
  7476. ;;
  7477. y|yes|x|x11|glx)
  7478. OPENGL_TYPE=X11
  7479. USE_OPENGL=1
  7480. OPENGL_X11=1
  7481. ;;
  7482. aqua|mac|osx|macosx|agl)
  7483. OPENGL_TYPE=Aqua
  7484. USE_OPENGL=1
  7485. OPENGL_AQUA=1
  7486. ;;
  7487. win|windows|mswin|wgl)
  7488. OPENGL_TYPE=Windows
  7489. USE_OPENGL=1
  7490. OPENGL_WINDOWS=1
  7491. ;;
  7492. *)
  7493. { echo "configure: error: *** Valid arguments for --with-opengl= are yes,no,x11,aqua,windows." 1>&2; exit 1; }
  7494. ;;
  7495. esac
  7496. if test -n "$USE_OPENGL" ; then
  7497. if test "$OPENGL_X11" = 1 ; then
  7498. # With OpenGL includes directory
  7499. echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
  7500. echo "configure:9336: checking for location of OpenGL includes" >&5
  7501. case "$with_opengl_includes" in
  7502. y | ye | yes | n | no)
  7503. { echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
  7504. ;;
  7505. esac
  7506. echo "$ac_t""$with_opengl_includes" 1>&6
  7507. if test -n "$with_opengl_includes" ; then
  7508. for dir in $with_opengl_includes; do
  7509. if test -d "$dir"; then
  7510. OPENGLINC="$OPENGLINC -I$dir"
  7511. else
  7512. { echo "configure: error: *** OpenGL includes directory $dir does not exist." 1>&2; exit 1; }
  7513. fi
  7514. done
  7515. fi
  7516. ac_save_cppflags="$CPPFLAGS"
  7517. CPPFLAGS="$OPENGLINC $X_CFLAGS $CPPFLAGS"
  7518. for ac_hdr in GL/gl.h GL/glu.h
  7519. do
  7520. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7521. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7522. echo "configure:9362: checking for $ac_hdr" >&5
  7523. cat > conftest.$ac_ext <<EOF
  7524. #line 9365 "configure"
  7525. #include "confdefs.h"
  7526. #include <$ac_hdr>
  7527. EOF
  7528. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7529. { (eval echo configure:9370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7530. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7531. if test -z "$ac_err"; then
  7532. rm -rf conftest*
  7533. eval "ac_cv_header_$ac_safe=yes"
  7534. else
  7535. echo "$ac_err" >&5
  7536. echo "configure: failed program was:" >&5
  7537. cat conftest.$ac_ext >&5
  7538. rm -rf conftest*
  7539. eval "ac_cv_header_$ac_safe=no"
  7540. fi
  7541. rm -f conftest*
  7542. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7543. echo "$ac_t""yes" 1>&6
  7544. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7545. cat >> confdefs.h <<EOF
  7546. #define $ac_tr_hdr 1
  7547. EOF
  7548. else
  7549. echo "$ac_t""no" 1>&6
  7550. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  7551. fi
  7552. done
  7553. CPPFLAGS=$ac_save_cppflags
  7554. # With OpenGL library directory
  7555. echo $ac_n "checking for location of OpenGL library""... $ac_c" 1>&6
  7556. echo "configure:9404: checking for location of OpenGL library" >&5
  7557. case "$with_opengl_libs" in
  7558. y | ye | yes | n | no)
  7559. { echo "configure: error: *** You must supply a directory to --with-opengl-libs." 1>&2; exit 1; }
  7560. ;;
  7561. esac
  7562. echo "$ac_t""$with_opengl_libs" 1>&6
  7563. if test -n "$with_opengl_libs"; then
  7564. for dir in $with_opengl_libs; do
  7565. if test -d "$dir"; then
  7566. OPENGL_LIB_PATH="$OPENGL_LIB_PATH -L$dir"
  7567. else
  7568. { echo "configure: error: *** OpenGL library directory $dir does not exist." 1>&2; exit 1; }
  7569. fi
  7570. done
  7571. fi
  7572. ac_save_ldflags="$LDFLAGS"
  7573. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  7574. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7575. echo "configure:9433: checking for glBegin in -lGL" >&5
  7576. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7577. ac_save_LIBS="$LIBS"
  7578. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
  7579. cat > conftest.$ac_ext <<EOF
  7580. #line 9439 "configure"
  7581. #include "confdefs.h"
  7582. /* Override any gcc2 internal prototype to avoid an error. */
  7583. /* We use char because int might match the return type of a gcc2
  7584. builtin and then its argument prototype would still apply. */
  7585. char glBegin();
  7586. int main() {
  7587. glBegin()
  7588. ; return 0; }
  7589. EOF
  7590. if { (eval echo configure:9450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7591. rm -rf conftest*
  7592. eval "ac_cv_lib_$ac_lib_var=yes"
  7593. else
  7594. echo "configure: failed program was:" >&5
  7595. cat conftest.$ac_ext >&5
  7596. rm -rf conftest*
  7597. eval "ac_cv_lib_$ac_lib_var=no"
  7598. fi
  7599. rm -f conftest*
  7600. LIBS="$ac_save_LIBS"
  7601. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7602. echo "$ac_t""yes" 1>&6
  7603. OPENGLLIB="$OPENGLLIB -lGL "
  7604. else
  7605. echo "$ac_t""no" 1>&6
  7606. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7607. echo "configure:9469: checking for glBegin in -lGL" >&5
  7608. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7609. ac_save_LIBS="$LIBS"
  7610. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lXext $LIBS"
  7611. cat > conftest.$ac_ext <<EOF
  7612. #line 9475 "configure"
  7613. #include "confdefs.h"
  7614. /* Override any gcc2 internal prototype to avoid an error. */
  7615. /* We use char because int might match the return type of a gcc2
  7616. builtin and then its argument prototype would still apply. */
  7617. char glBegin();
  7618. int main() {
  7619. glBegin()
  7620. ; return 0; }
  7621. EOF
  7622. if { (eval echo configure:9486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7623. rm -rf conftest*
  7624. eval "ac_cv_lib_$ac_lib_var=yes"
  7625. else
  7626. echo "configure: failed program was:" >&5
  7627. cat conftest.$ac_ext >&5
  7628. rm -rf conftest*
  7629. eval "ac_cv_lib_$ac_lib_var=no"
  7630. fi
  7631. rm -f conftest*
  7632. LIBS="$ac_save_LIBS"
  7633. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7634. echo "$ac_t""yes" 1>&6
  7635. OPENGLLIB="$OPENGLLIB -lGL -lXext"
  7636. else
  7637. echo "$ac_t""no" 1>&6
  7638. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7639. echo "configure:9505: checking for glBegin in -lGL" >&5
  7640. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7641. ac_save_LIBS="$LIBS"
  7642. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lpthread $LIBS"
  7643. cat > conftest.$ac_ext <<EOF
  7644. #line 9511 "configure"
  7645. #include "confdefs.h"
  7646. /* Override any gcc2 internal prototype to avoid an error. */
  7647. /* We use char because int might match the return type of a gcc2
  7648. builtin and then its argument prototype would still apply. */
  7649. char glBegin();
  7650. int main() {
  7651. glBegin()
  7652. ; return 0; }
  7653. EOF
  7654. if { (eval echo configure:9522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7655. rm -rf conftest*
  7656. eval "ac_cv_lib_$ac_lib_var=yes"
  7657. else
  7658. echo "configure: failed program was:" >&5
  7659. cat conftest.$ac_ext >&5
  7660. rm -rf conftest*
  7661. eval "ac_cv_lib_$ac_lib_var=no"
  7662. fi
  7663. rm -f conftest*
  7664. LIBS="$ac_save_LIBS"
  7665. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7666. echo "$ac_t""yes" 1>&6
  7667. OPENGLLIB="$OPENGLLIB -lGL -lpthread"
  7668. else
  7669. echo "$ac_t""no" 1>&6
  7670. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7671. echo "configure:9541: checking for glBegin in -lGL" >&5
  7672. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7673. ac_save_LIBS="$LIBS"
  7674. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lpthread -lXext $LIBS"
  7675. cat > conftest.$ac_ext <<EOF
  7676. #line 9547 "configure"
  7677. #include "confdefs.h"
  7678. /* Override any gcc2 internal prototype to avoid an error. */
  7679. /* We use char because int might match the return type of a gcc2
  7680. builtin and then its argument prototype would still apply. */
  7681. char glBegin();
  7682. int main() {
  7683. glBegin()
  7684. ; return 0; }
  7685. EOF
  7686. if { (eval echo configure:9558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7687. rm -rf conftest*
  7688. eval "ac_cv_lib_$ac_lib_var=yes"
  7689. else
  7690. echo "configure: failed program was:" >&5
  7691. cat conftest.$ac_ext >&5
  7692. rm -rf conftest*
  7693. eval "ac_cv_lib_$ac_lib_var=no"
  7694. fi
  7695. rm -f conftest*
  7696. LIBS="$ac_save_LIBS"
  7697. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7698. echo "$ac_t""yes" 1>&6
  7699. OPENGLLIB="$OPENGLLIB -lGL -lpthread -lXext"
  7700. else
  7701. echo "$ac_t""no" 1>&6
  7702. LDFLAGS=${ac_save_ldflags}
  7703. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  7704. fi
  7705. fi
  7706. fi
  7707. fi
  7708. LDFLAGS=${ac_save_ldflags}
  7709. ac_save_ldflags="$LDFLAGS"
  7710. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  7711. echo $ac_n "checking for gluBeginCurve in -lGLU""... $ac_c" 1>&6
  7712. echo "configure:9620: checking for gluBeginCurve in -lGLU" >&5
  7713. ac_lib_var=`echo GLU'_'gluBeginCurve | sed 'y%./+-%__p_%'`
  7714. ac_save_LIBS="$LIBS"
  7715. LIBS="-lGLU $OPENGLLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
  7716. cat > conftest.$ac_ext <<EOF
  7717. #line 9626 "configure"
  7718. #include "confdefs.h"
  7719. /* Override any gcc2 internal prototype to avoid an error. */
  7720. /* We use char because int might match the return type of a gcc2
  7721. builtin and then its argument prototype would still apply. */
  7722. char gluBeginCurve();
  7723. int main() {
  7724. gluBeginCurve()
  7725. ; return 0; }
  7726. EOF
  7727. if { (eval echo configure:9637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7728. rm -rf conftest*
  7729. eval "ac_cv_lib_$ac_lib_var=yes"
  7730. else
  7731. echo "configure: failed program was:" >&5
  7732. cat conftest.$ac_ext >&5
  7733. rm -rf conftest*
  7734. eval "ac_cv_lib_$ac_lib_var=no"
  7735. fi
  7736. rm -f conftest*
  7737. LIBS="$ac_save_LIBS"
  7738. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7739. echo "$ac_t""yes" 1>&6
  7740. OPENGLULIB="$OPENGLULIB -lGLU "
  7741. else
  7742. echo "$ac_t""no" 1>&6
  7743. echo $ac_n "checking for gluBeginCurve in -lGLU""... $ac_c" 1>&6
  7744. echo "configure:9656: checking for gluBeginCurve in -lGLU" >&5
  7745. ac_lib_var=`echo GLU'_'gluBeginCurve | sed 'y%./+-%__p_%'`
  7746. ac_save_LIBS="$LIBS"
  7747. LIBS="-lGLU $OPENGLLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lstdc++ $LIBS"
  7748. cat > conftest.$ac_ext <<EOF
  7749. #line 9662 "configure"
  7750. #include "confdefs.h"
  7751. /* Override any gcc2 internal prototype to avoid an error. */
  7752. /* We use char because int might match the return type of a gcc2
  7753. builtin and then its argument prototype would still apply. */
  7754. char gluBeginCurve();
  7755. int main() {
  7756. gluBeginCurve()
  7757. ; return 0; }
  7758. EOF
  7759. if { (eval echo configure:9673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7760. rm -rf conftest*
  7761. eval "ac_cv_lib_$ac_lib_var=yes"
  7762. else
  7763. echo "configure: failed program was:" >&5
  7764. cat conftest.$ac_ext >&5
  7765. rm -rf conftest*
  7766. eval "ac_cv_lib_$ac_lib_var=no"
  7767. fi
  7768. rm -f conftest*
  7769. LIBS="$ac_save_LIBS"
  7770. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7771. echo "$ac_t""yes" 1>&6
  7772. OPENGLULIB="$OPENGLULIB -lGLU -lstdc++"
  7773. else
  7774. echo "$ac_t""no" 1>&6
  7775. LDFLAGS=${ac_save_ldflags}
  7776. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  7777. fi
  7778. fi
  7779. LDFLAGS=${ac_save_ldflags}
  7780. OPENGLLIB="$OPENGL_LIB_PATH $OPENGLLIB"
  7781. OPENGLULIB="$OPENGL_LIB_PATH $OPENGLULIB"
  7782. ac_save_libs="$LIBS"
  7783. ac_save_ldflags="$LDFLAGS"
  7784. LIBS=" $OPENGLLIB $LIBS"
  7785. LDFLAGS=" $LDFLAGS"
  7786. echo $ac_n "checking for glXCreatePbuffer""... $ac_c" 1>&6
  7787. echo "configure:9720: checking for glXCreatePbuffer" >&5
  7788. cat > conftest.$ac_ext <<EOF
  7789. #line 9723 "configure"
  7790. #include "confdefs.h"
  7791. /* System header to define __stub macros and hopefully few prototypes,
  7792. which can conflict with char glXCreatePbuffer(); below. */
  7793. #include <assert.h>
  7794. /* Override any gcc2 internal prototype to avoid an error. */
  7795. /* We use char because int might match the return type of a gcc2
  7796. builtin and then its argument prototype would still apply. */
  7797. char glXCreatePbuffer();
  7798. int main() {
  7799. /* The GNU C library defines this for functions which it implements
  7800. to always fail with ENOSYS. Some functions are actually named
  7801. something starting with __ and the normal name is an alias. */
  7802. #if defined (__stub_glXCreatePbuffer) || defined (__stub___glXCreatePbuffer)
  7803. choke me
  7804. #else
  7805. glXCreatePbuffer();
  7806. #endif
  7807. ; return 0; }
  7808. EOF
  7809. if { (eval echo configure:9746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7810. rm -rf conftest*
  7811. eval "ac_cv_func_glXCreatePbuffer=yes"
  7812. else
  7813. echo "configure: failed program was:" >&5
  7814. cat conftest.$ac_ext >&5
  7815. rm -rf conftest*
  7816. eval "ac_cv_func_glXCreatePbuffer=no"
  7817. fi
  7818. rm -f conftest*
  7819. if eval "test \"`echo '$ac_cv_func_'glXCreatePbuffer`\" = yes"; then
  7820. echo "$ac_t""yes" 1>&6
  7821. cat >> confdefs.h <<\EOF
  7822. #define HAVE_PBUFFERS 1
  7823. EOF
  7824. else
  7825. echo "$ac_t""no" 1>&6
  7826. { echo "configure: error: *** Unable to locate glXCreatePbuffer." 1>&2; exit 1; }
  7827. fi
  7828. LIBS=${ac_save_libs}
  7829. LDFLAGS=${ac_save_ldflags}
  7830. ac_save_libs="$LIBS"
  7831. ac_save_ldflags="$LDFLAGS"
  7832. LIBS=" $OPENGLLIB $LIBS"
  7833. LDFLAGS=" $LDFLAGS"
  7834. echo $ac_n "checking for glXCreateGLXPixmap""... $ac_c" 1>&6
  7835. echo "configure:9783: checking for glXCreateGLXPixmap" >&5
  7836. cat > conftest.$ac_ext <<EOF
  7837. #line 9786 "configure"
  7838. #include "confdefs.h"
  7839. /* System header to define __stub macros and hopefully few prototypes,
  7840. which can conflict with char glXCreateGLXPixmap(); below. */
  7841. #include <assert.h>
  7842. /* Override any gcc2 internal prototype to avoid an error. */
  7843. /* We use char because int might match the return type of a gcc2
  7844. builtin and then its argument prototype would still apply. */
  7845. char glXCreateGLXPixmap();
  7846. int main() {
  7847. /* The GNU C library defines this for functions which it implements
  7848. to always fail with ENOSYS. Some functions are actually named
  7849. something starting with __ and the normal name is an alias. */
  7850. #if defined (__stub_glXCreateGLXPixmap) || defined (__stub___glXCreateGLXPixmap)
  7851. choke me
  7852. #else
  7853. glXCreateGLXPixmap();
  7854. #endif
  7855. ; return 0; }
  7856. EOF
  7857. if { (eval echo configure:9809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7858. rm -rf conftest*
  7859. eval "ac_cv_func_glXCreateGLXPixmap=yes"
  7860. else
  7861. echo "configure: failed program was:" >&5
  7862. cat conftest.$ac_ext >&5
  7863. rm -rf conftest*
  7864. eval "ac_cv_func_glXCreateGLXPixmap=no"
  7865. fi
  7866. rm -f conftest*
  7867. if eval "test \"`echo '$ac_cv_func_'glXCreateGLXPixmap`\" = yes"; then
  7868. echo "$ac_t""yes" 1>&6
  7869. cat >> confdefs.h <<\EOF
  7870. #define HAVE_PIXMAPS 1
  7871. EOF
  7872. else
  7873. echo "$ac_t""no" 1>&6
  7874. { echo "configure: error: *** Unable to locate glXCreateGLXPixmap." 1>&2; exit 1; }
  7875. fi
  7876. LIBS=${ac_save_libs}
  7877. LDFLAGS=${ac_save_ldflags}
  7878. cat >> confdefs.h <<\EOF
  7879. #define OPENGL_X11 1
  7880. EOF
  7881. fi # $OPENGL_X11
  7882. if test "$OPENGL_AQUA" = 1 ; then
  7883. echo $ac_n "checking for location of OpenGL framework""... $ac_c" 1>&6
  7884. echo "configure:9852: checking for location of OpenGL framework" >&5
  7885. case "$with_opengl_framework" in
  7886. y | ye | yes | n | no)
  7887. { echo "configure: error: *** You must supply a directory to --with-opengl-framework." 1>&2; exit 1; }
  7888. ;;
  7889. esac
  7890. echo "$ac_t""$with_opengl_framework" 1>&6
  7891. if test -n "$with_opengl_framework"; then
  7892. if test -d $with_opengl_framework; then
  7893. OPENGLPATH="$OPENGLPATH -F$with_opengl_framework"
  7894. else
  7895. { echo "configure: error: *** OpenGL framework directory $dir does not exist." 1>&2; exit 1; }
  7896. fi
  7897. fi
  7898. ac_save_cppflags="$CPPFLAGS"
  7899. CPPFLAGS="$OPENGLPATH $CPPFLAGS"
  7900. for ac_hdr in OpenGL/gl.h OpenGL/glu.h
  7901. do
  7902. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7903. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7904. echo "configure:9876: checking for $ac_hdr" >&5
  7905. cat > conftest.$ac_ext <<EOF
  7906. #line 9879 "configure"
  7907. #include "confdefs.h"
  7908. #include <$ac_hdr>
  7909. EOF
  7910. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7911. { (eval echo configure:9884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7912. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7913. if test -z "$ac_err"; then
  7914. rm -rf conftest*
  7915. eval "ac_cv_header_$ac_safe=yes"
  7916. else
  7917. echo "$ac_err" >&5
  7918. echo "configure: failed program was:" >&5
  7919. cat conftest.$ac_ext >&5
  7920. rm -rf conftest*
  7921. eval "ac_cv_header_$ac_safe=no"
  7922. fi
  7923. rm -f conftest*
  7924. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7925. echo "$ac_t""yes" 1>&6
  7926. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7927. cat >> confdefs.h <<EOF
  7928. #define $ac_tr_hdr 1
  7929. EOF
  7930. else
  7931. echo "$ac_t""no" 1>&6
  7932. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  7933. fi
  7934. done
  7935. CPPFLAGS=$ac_save_cppflags
  7936. ac_save_libs="$LIBS"
  7937. ac_save_ldflags="$LDFLAGS"
  7938. LIBS="-framework OpenGL -framework AGL -framework ApplicationServices $LIBS"
  7939. LDFLAGS="$OPENGLPATH $LDFLAGS"
  7940. echo $ac_n "checking for glBegin""... $ac_c" 1>&6
  7941. echo "configure:9920: checking for glBegin" >&5
  7942. cat > conftest.$ac_ext <<EOF
  7943. #line 9923 "configure"
  7944. #include "confdefs.h"
  7945. /* System header to define __stub macros and hopefully few prototypes,
  7946. which can conflict with char glBegin(); below. */
  7947. #include <assert.h>
  7948. /* Override any gcc2 internal prototype to avoid an error. */
  7949. /* We use char because int might match the return type of a gcc2
  7950. builtin and then its argument prototype would still apply. */
  7951. char glBegin();
  7952. int main() {
  7953. /* The GNU C library defines this for functions which it implements
  7954. to always fail with ENOSYS. Some functions are actually named
  7955. something starting with __ and the normal name is an alias. */
  7956. #if defined (__stub_glBegin) || defined (__stub___glBegin)
  7957. choke me
  7958. #else
  7959. glBegin();
  7960. #endif
  7961. ; return 0; }
  7962. EOF
  7963. if { (eval echo configure:9946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7964. rm -rf conftest*
  7965. eval "ac_cv_func_glBegin=yes"
  7966. else
  7967. echo "configure: failed program was:" >&5
  7968. cat conftest.$ac_ext >&5
  7969. rm -rf conftest*
  7970. eval "ac_cv_func_glBegin=no"
  7971. fi
  7972. rm -f conftest*
  7973. if eval "test \"`echo '$ac_cv_func_'glBegin`\" = yes"; then
  7974. echo "$ac_t""yes" 1>&6
  7975. OPENGLLIB="$OPENGLLIB -framework OpenGL -framework AGL -framework ApplicationServices"
  7976. else
  7977. echo "$ac_t""no" 1>&6
  7978. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  7979. fi
  7980. LIBS=${ac_save_libs}
  7981. LDFLAGS=${ac_save_ldflags}
  7982. ac_save_libs="$LIBS"
  7983. ac_save_ldflags="$LDFLAGS"
  7984. LIBS=" $OPENGLLIB $LIBS"
  7985. LDFLAGS="$OPENGLPATH $LDFLAGS"
  7986. echo $ac_n "checking for gluBeginCurve""... $ac_c" 1>&6
  7987. echo "configure:9983: checking for gluBeginCurve" >&5
  7988. cat > conftest.$ac_ext <<EOF
  7989. #line 9986 "configure"
  7990. #include "confdefs.h"
  7991. /* System header to define __stub macros and hopefully few prototypes,
  7992. which can conflict with char gluBeginCurve(); below. */
  7993. #include <assert.h>
  7994. /* Override any gcc2 internal prototype to avoid an error. */
  7995. /* We use char because int might match the return type of a gcc2
  7996. builtin and then its argument prototype would still apply. */
  7997. char gluBeginCurve();
  7998. int main() {
  7999. /* The GNU C library defines this for functions which it implements
  8000. to always fail with ENOSYS. Some functions are actually named
  8001. something starting with __ and the normal name is an alias. */
  8002. #if defined (__stub_gluBeginCurve) || defined (__stub___gluBeginCurve)
  8003. choke me
  8004. #else
  8005. gluBeginCurve();
  8006. #endif
  8007. ; return 0; }
  8008. EOF
  8009. if { (eval echo configure:10009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8010. rm -rf conftest*
  8011. eval "ac_cv_func_gluBeginCurve=yes"
  8012. else
  8013. echo "configure: failed program was:" >&5
  8014. cat conftest.$ac_ext >&5
  8015. rm -rf conftest*
  8016. eval "ac_cv_func_gluBeginCurve=no"
  8017. fi
  8018. rm -f conftest*
  8019. if eval "test \"`echo '$ac_cv_func_'gluBeginCurve`\" = yes"; then
  8020. echo "$ac_t""yes" 1>&6
  8021. OPENGLLIB="$OPENGLLIB "
  8022. else
  8023. echo "$ac_t""no" 1>&6
  8024. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  8025. fi
  8026. LIBS=${ac_save_libs}
  8027. LDFLAGS=${ac_save_ldflags}
  8028. OPENGLINC="$OPENGLPATH"
  8029. OPENGLLIBPATH="$OPENGLPATH"
  8030. cat >> confdefs.h <<\EOF
  8031. #define OPENGL_AQUA 1
  8032. EOF
  8033. fi # $OPENGL_AQUA
  8034. if test "$OPENGL_WINDOWS" = 1 ; then
  8035. # With OpenGL includes directory
  8036. echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
  8037. echo "configure:10057: checking for location of OpenGL includes" >&5
  8038. case "$with_opengl_includes" in
  8039. y | ye | yes | n | no)
  8040. { echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
  8041. ;;
  8042. esac
  8043. echo "$ac_t""$with_opengl_includes" 1>&6
  8044. if test -n "$with_opengl_includes" ; then
  8045. for dir in $with_opengl_includes; do
  8046. if test -d "$dir"; then
  8047. OPENGLINC="$OPENGLINC -I$dir"
  8048. else
  8049. { echo "configure: error: *** OpenGL includes directory $dir does not exist." 1>&2; exit 1; }
  8050. fi
  8051. done
  8052. fi
  8053. ac_save_cppflags="$CPPFLAGS"
  8054. CPPFLAGS="$OPENGLINC $CPPFLAGS"
  8055. for ac_hdr in GL/gl.h GL/glu.h
  8056. do
  8057. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8058. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8059. echo "configure:10083: checking for $ac_hdr" >&5
  8060. cat > conftest.$ac_ext <<EOF
  8061. #line 10086 "configure"
  8062. #include "confdefs.h"
  8063. #include <$ac_hdr>
  8064. EOF
  8065. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8066. { (eval echo configure:10091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8067. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8068. if test -z "$ac_err"; then
  8069. rm -rf conftest*
  8070. eval "ac_cv_header_$ac_safe=yes"
  8071. else
  8072. echo "$ac_err" >&5
  8073. echo "configure: failed program was:" >&5
  8074. cat conftest.$ac_ext >&5
  8075. rm -rf conftest*
  8076. eval "ac_cv_header_$ac_safe=no"
  8077. fi
  8078. rm -f conftest*
  8079. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8080. echo "$ac_t""yes" 1>&6
  8081. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8082. cat >> confdefs.h <<EOF
  8083. #define $ac_tr_hdr 1
  8084. EOF
  8085. else
  8086. echo "$ac_t""no" 1>&6
  8087. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  8088. fi
  8089. done
  8090. CPPFLAGS=$ac_save_cppflags
  8091. # With OpenGL library directory
  8092. echo $ac_n "checking for location of OpenGL library""... $ac_c" 1>&6
  8093. echo "configure:10125: checking for location of OpenGL library" >&5
  8094. case "$with_opengl_libs" in
  8095. y | ye | yes | n | no)
  8096. { echo "configure: error: *** You must supply a directory to --with-opengl-libs." 1>&2; exit 1; }
  8097. ;;
  8098. esac
  8099. echo "$ac_t""$with_opengl_libs" 1>&6
  8100. if test -n "$with_opengl_libs"; then
  8101. for dir in $with_opengl_libs; do
  8102. if test -d "$dir"; then
  8103. OPENGL_LIB_PATH="$OPENGL_LIB_PATH -L$dir"
  8104. else
  8105. { echo "configure: error: *** OpenGL library directory $dir does not exist." 1>&2; exit 1; }
  8106. fi
  8107. done
  8108. fi
  8109. ac_save_cflags="$CFLAGS"
  8110. CFLAGS="$CFLAGS $OPENGLINC"
  8111. ac_save_ldflags="$LDFLAGS"
  8112. ac_save_libs="$LIBS"
  8113. echo $ac_n "checking for OpenGL library""... $ac_c" 1>&6
  8114. echo "configure:10150: checking for OpenGL library" >&5
  8115. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  8116. LIBS="-lopengl32 "
  8117. cat > conftest.$ac_ext <<EOF
  8118. #line 10154 "configure"
  8119. #include "confdefs.h"
  8120. #include <GL/gl.h>
  8121. int main() {
  8122. glEnd();
  8123. ; return 0; }
  8124. EOF
  8125. if { (eval echo configure:10161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8126. rm -rf conftest*
  8127. echo "$ac_t""found" 1>&6
  8128. OPENGLLIB="$OPENGLLIB -lopengl32 "
  8129. else
  8130. echo "configure: failed program was:" >&5
  8131. cat conftest.$ac_ext >&5
  8132. rm -rf conftest*
  8133. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  8134. fi
  8135. rm -f conftest*
  8136. LIBS=${ac_save_libs}
  8137. LDFLAGS=${ac_save_ldflags}
  8138. ac_save_ldflags="$LDFLAGS"
  8139. ac_save_libs="$LIBS"
  8140. echo $ac_n "checking for GLU library""... $ac_c" 1>&6
  8141. echo "configure:10185: checking for GLU library" >&5
  8142. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  8143. LIBS="-lglu32 $OPENGLLIB "
  8144. cat > conftest.$ac_ext <<EOF
  8145. #line 10189 "configure"
  8146. #include "confdefs.h"
  8147. #include <GL/glu.h>
  8148. int main() {
  8149. gluNewQuadric();
  8150. ; return 0; }
  8151. EOF
  8152. if { (eval echo configure:10196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8153. rm -rf conftest*
  8154. echo "$ac_t""found" 1>&6
  8155. OPENGLULIB="$OPENGLULIB -lglu32 "
  8156. else
  8157. echo "configure: failed program was:" >&5
  8158. cat conftest.$ac_ext >&5
  8159. rm -rf conftest*
  8160. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  8161. fi
  8162. rm -f conftest*
  8163. LIBS=${ac_save_libs}
  8164. LDFLAGS=${ac_save_ldflags}
  8165. CFLAGS="${ac_save_cflags}"
  8166. OPENGLLIB="$OPENGL_LIB_PATH $OPENGLLIB"
  8167. OPENGLULIB="$OPENGL_LIB_PATH $OPENGLULIB"
  8168. cat >> confdefs.h <<\EOF
  8169. #define OPENGL_WINDOWS 1
  8170. EOF
  8171. fi # $OPENGL_WINDOWS
  8172. fi # $USE_OPENGL
  8173. # Done checking OpenGL
  8174. # Enable TCLTK option
  8175. echo $ac_n "checking whether to use Tcl/Tk""... $ac_c" 1>&6
  8176. echo "configure:10245: checking whether to use Tcl/Tk" >&5
  8177. echo "$ac_t"""$with_tcltk"" 1>&6
  8178. case "$with_tcltk" in
  8179. "no") USE_TCLTK= ;;
  8180. "yes") USE_TCLTK="1" ;;
  8181. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  8182. esac
  8183. TCLINCDIR=
  8184. TCLTKLIBPATH=
  8185. TCLTKLIBS=
  8186. if test -n "$USE_TCLTK"; then
  8187. # With Tcl/Tk includes directory
  8188. echo $ac_n "checking for location of Tcl/Tk includes""... $ac_c" 1>&6
  8189. echo "configure:10265: checking for location of Tcl/Tk includes" >&5
  8190. case "$with_tcltk_includes" in
  8191. y | ye | yes | n | no)
  8192. { echo "configure: error: *** You must supply a directory to --with-tcltk-includes." 1>&2; exit 1; }
  8193. ;;
  8194. esac
  8195. echo "$ac_t""$with_tcltk_includes" 1>&6
  8196. if test -n "$with_tcltk_includes" ; then
  8197. for dir in $with_tcltk_includes; do
  8198. if test -d "$dir"; then
  8199. TCLINCDIR="$TCLINCDIR -I$dir"
  8200. else
  8201. { echo "configure: error: *** Tcl/Tk includes directory $dir does not exist." 1>&2; exit 1; }
  8202. fi
  8203. done
  8204. fi
  8205. ac_save_cppflags="$CPPFLAGS"
  8206. CPPFLAGS="$TCLINCDIR $CPPFLAGS"
  8207. for ac_hdr in tcl.h
  8208. do
  8209. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8210. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8211. echo "configure:10291: checking for $ac_hdr" >&5
  8212. cat > conftest.$ac_ext <<EOF
  8213. #line 10294 "configure"
  8214. #include "confdefs.h"
  8215. #include <$ac_hdr>
  8216. EOF
  8217. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8218. { (eval echo configure:10299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8219. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8220. if test -z "$ac_err"; then
  8221. rm -rf conftest*
  8222. eval "ac_cv_header_$ac_safe=yes"
  8223. else
  8224. echo "$ac_err" >&5
  8225. echo "configure: failed program was:" >&5
  8226. cat conftest.$ac_ext >&5
  8227. rm -rf conftest*
  8228. eval "ac_cv_header_$ac_safe=no"
  8229. fi
  8230. rm -f conftest*
  8231. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8232. echo "$ac_t""yes" 1>&6
  8233. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8234. cat >> confdefs.h <<EOF
  8235. #define $ac_tr_hdr 1
  8236. EOF
  8237. else
  8238. echo "$ac_t""no" 1>&6
  8239. { echo "configure: error: *** Unable to locate Tcl includes." 1>&2; exit 1; }
  8240. fi
  8241. done
  8242. CPPFLAGS=$ac_save_cppflags
  8243. ac_save_cppflags="$CPPFLAGS"
  8244. CPPFLAGS="$TCLINCDIR $X_CFLAGS $CPPFLAGS"
  8245. for ac_hdr in tk.h
  8246. do
  8247. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8248. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8249. echo "configure:10336: checking for $ac_hdr" >&5
  8250. cat > conftest.$ac_ext <<EOF
  8251. #line 10339 "configure"
  8252. #include "confdefs.h"
  8253. #include <$ac_hdr>
  8254. EOF
  8255. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8256. { (eval echo configure:10344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8257. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8258. if test -z "$ac_err"; then
  8259. rm -rf conftest*
  8260. eval "ac_cv_header_$ac_safe=yes"
  8261. else
  8262. echo "$ac_err" >&5
  8263. echo "configure: failed program was:" >&5
  8264. cat conftest.$ac_ext >&5
  8265. rm -rf conftest*
  8266. eval "ac_cv_header_$ac_safe=no"
  8267. fi
  8268. rm -f conftest*
  8269. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8270. echo "$ac_t""yes" 1>&6
  8271. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8272. cat >> confdefs.h <<EOF
  8273. #define $ac_tr_hdr 1
  8274. EOF
  8275. else
  8276. echo "$ac_t""no" 1>&6
  8277. { echo "configure: error: *** Unable to locate Tk includes." 1>&2; exit 1; }
  8278. fi
  8279. done
  8280. CPPFLAGS=$ac_save_cppflags
  8281. # Tcl/Tk version checks
  8282. echo $ac_n "checking Tcl version""... $ac_c" 1>&6
  8283. echo "configure:10378: checking Tcl version" >&5
  8284. ac_save_cppflags="$CPPFLAGS"
  8285. CPPFLAGS="$TCLINCDIR $CPPFLAGS"
  8286. if test "$cross_compiling" = yes; then
  8287. tcl_ver=UNKNOWN
  8288. echo "$ac_t""unknown (cross-compiling)" 1>&6
  8289. else
  8290. cat > conftest.$ac_ext <<EOF
  8291. #line 10386 "configure"
  8292. #include "confdefs.h"
  8293. #include <stdio.h>
  8294. #include <tcl.h>
  8295. int main(void) {
  8296. FILE *fp = fopen("conftestdata","w");
  8297. fputs(TCL_VERSION, fp);
  8298. return 0;
  8299. }
  8300. EOF
  8301. if { (eval echo configure:10398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  8302. then
  8303. tcl_ver=`cat conftestdata`
  8304. echo "$ac_t""$tcl_ver" 1>&6
  8305. else
  8306. echo "configure: failed program was:" >&5
  8307. cat conftest.$ac_ext >&5
  8308. rm -fr conftest*
  8309. { echo "configure: error: *** Could not determine Tcl version." 1>&2; exit 1; }
  8310. fi
  8311. rm -fr conftest*
  8312. fi
  8313. CPPFLAGS=$ac_save_cppflags
  8314. echo $ac_n "checking Tk version""... $ac_c" 1>&6
  8315. echo "configure:10416: checking Tk version" >&5
  8316. ac_save_cppflags="$CPPFLAGS"
  8317. CPPFLAGS="$TCLINCDIR $X_CFLAGS $CPPFLAGS"
  8318. if test "$cross_compiling" = yes; then
  8319. tk_ver=UNKNOWN
  8320. echo "$ac_t""unknown (cross-compiling)" 1>&6
  8321. else
  8322. cat > conftest.$ac_ext <<EOF
  8323. #line 10424 "configure"
  8324. #include "confdefs.h"
  8325. #include <stdio.h>
  8326. #include <tk.h>
  8327. int main(void) {
  8328. FILE *fp = fopen("conftestdata","w");
  8329. fputs(TK_VERSION, fp);
  8330. return 0;
  8331. }
  8332. EOF
  8333. if { (eval echo configure:10436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  8334. then
  8335. tk_ver=`cat conftestdata`
  8336. echo "$ac_t""$tk_ver" 1>&6
  8337. else
  8338. echo "configure: failed program was:" >&5
  8339. cat conftest.$ac_ext >&5
  8340. rm -fr conftest*
  8341. { echo "configure: error: *** Could not determine Tk version." 1>&2; exit 1; }
  8342. fi
  8343. rm -fr conftest*
  8344. fi
  8345. CPPFLAGS=$ac_save_cppflags
  8346. if test "$tcl_ver" = "$tk_ver" ; then
  8347. tcltk_ver="$tcl_ver"
  8348. else
  8349. { echo "configure: error: *** Tcl/Tk version mismatch." 1>&2; exit 1; }
  8350. fi
  8351. # FreeBSD and CygWin don't have a "dot" between major/minor version number
  8352. tcltk_ver2=`echo "$tcltk_ver" | sed 's/\.//g'`
  8353. # With Tcl/Tk library directory
  8354. echo $ac_n "checking for location of Tcl/Tk library""... $ac_c" 1>&6
  8355. echo "configure:10465: checking for location of Tcl/Tk library" >&5
  8356. case "$with_tcltk_libs" in
  8357. y | ye | yes | n | no)
  8358. { echo "configure: error: *** You must supply a directory to --with-tcltk-libs." 1>&2; exit 1; }
  8359. ;;
  8360. esac
  8361. echo "$ac_t""$with_tcltk_libs" 1>&6
  8362. if test -n "$with_tcltk_libs"; then
  8363. for dir in $with_tcltk_libs; do
  8364. if test -d "$dir"; then
  8365. TCLTKLIBPATH="$TCLTKLIBPATH -L$dir"
  8366. else
  8367. { echo "configure: error: *** Tcl/Tk library directory $dir does not exist." 1>&2; exit 1; }
  8368. fi
  8369. done
  8370. fi
  8371. TCLLIB=
  8372. TKLIB=
  8373. MACOSX_ARCHS_TCLTK=
  8374. # Can't test tcl/tk libs on 64bit OSX Aqua for now
  8375. # assume that if OpenGL Aqua, then user specifies TclTk Aqua
  8376. if test "$OPENGL_AQUA" = 1 ; then
  8377. save_CFLAGS="$CFLAGS"
  8378. CFLAGS="`echo \"$CFLAGS\" | sed -E 's/-arch +x86_64//g' | sed -E 's/-arch +ppc64//g'`"
  8379. save_LDFLAGS="$LDFLAGS"
  8380. LDFLAGS="`echo \"$LDFLAGS\" | sed -E 's/-arch +x86_64//g' | sed -E 's/-arch +ppc64//g'`"
  8381. fi
  8382. ac_save_ldflags="$LDFLAGS"
  8383. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  8384. echo $ac_n "checking for Tcl_Init in -ltcl""... $ac_c" 1>&6
  8385. echo "configure:10505: checking for Tcl_Init in -ltcl" >&5
  8386. ac_lib_var=`echo tcl'_'Tcl_Init | sed 'y%./+-%__p_%'`
  8387. ac_save_LIBS="$LIBS"
  8388. LIBS="-ltcl $MATHLIB $LIBS"
  8389. cat > conftest.$ac_ext <<EOF
  8390. #line 10511 "configure"
  8391. #include "confdefs.h"
  8392. /* Override any gcc2 internal prototype to avoid an error. */
  8393. /* We use char because int might match the return type of a gcc2
  8394. builtin and then its argument prototype would still apply. */
  8395. char Tcl_Init();
  8396. int main() {
  8397. Tcl_Init()
  8398. ; return 0; }
  8399. EOF
  8400. if { (eval echo configure:10522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8401. rm -rf conftest*
  8402. eval "ac_cv_lib_$ac_lib_var=yes"
  8403. else
  8404. echo "configure: failed program was:" >&5
  8405. cat conftest.$ac_ext >&5
  8406. rm -rf conftest*
  8407. eval "ac_cv_lib_$ac_lib_var=no"
  8408. fi
  8409. rm -f conftest*
  8410. LIBS="$ac_save_LIBS"
  8411. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8412. echo "$ac_t""yes" 1>&6
  8413. TCLLIB="$TCLLIB -ltcl $MATHLIB"
  8414. else
  8415. echo "$ac_t""no" 1>&6
  8416. echo $ac_n "checking for Tcl_Init in -ltcl""... $ac_c" 1>&6
  8417. echo "configure:10541: checking for Tcl_Init in -ltcl" >&5
  8418. ac_lib_var=`echo tcl'_'Tcl_Init | sed 'y%./+-%__p_%'`
  8419. ac_save_LIBS="$LIBS"
  8420. LIBS="-ltcl $MATHLIB $DLLIB $LIBS"
  8421. cat > conftest.$ac_ext <<EOF
  8422. #line 10547 "configure"
  8423. #include "confdefs.h"
  8424. /* Override any gcc2 internal prototype to avoid an error. */
  8425. /* We use char because int might match the return type of a gcc2
  8426. builtin and then its argument prototype would still apply. */
  8427. char Tcl_Init();
  8428. int main() {
  8429. Tcl_Init()
  8430. ; return 0; }
  8431. EOF
  8432. if { (eval echo configure:10558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8433. rm -rf conftest*
  8434. eval "ac_cv_lib_$ac_lib_var=yes"
  8435. else
  8436. echo "configure: failed program was:" >&5
  8437. cat conftest.$ac_ext >&5
  8438. rm -rf conftest*
  8439. eval "ac_cv_lib_$ac_lib_var=no"
  8440. fi
  8441. rm -f conftest*
  8442. LIBS="$ac_save_LIBS"
  8443. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8444. echo "$ac_t""yes" 1>&6
  8445. TCLLIB="$TCLLIB -ltcl $MATHLIB $DLLIB"
  8446. else
  8447. echo "$ac_t""no" 1>&6
  8448. LDFLAGS=${ac_save_ldflags}
  8449. ac_save_ldflags="$LDFLAGS"
  8450. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  8451. echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver""... $ac_c" 1>&6
  8452. echo "configure:10585: checking for Tcl_Init in -ltcl$tcltk_ver" >&5
  8453. ac_lib_var=`echo tcl$tcltk_ver'_'Tcl_Init | sed 'y%./+-%__p_%'`
  8454. ac_save_LIBS="$LIBS"
  8455. LIBS="-ltcl$tcltk_ver $MATHLIB $LIBS"
  8456. cat > conftest.$ac_ext <<EOF
  8457. #line 10591 "configure"
  8458. #include "confdefs.h"
  8459. /* Override any gcc2 internal prototype to avoid an error. */
  8460. /* We use char because int might match the return type of a gcc2
  8461. builtin and then its argument prototype would still apply. */
  8462. char Tcl_Init();
  8463. int main() {
  8464. Tcl_Init()
  8465. ; return 0; }
  8466. EOF
  8467. if { (eval echo configure:10602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8468. rm -rf conftest*
  8469. eval "ac_cv_lib_$ac_lib_var=yes"
  8470. else
  8471. echo "configure: failed program was:" >&5
  8472. cat conftest.$ac_ext >&5
  8473. rm -rf conftest*
  8474. eval "ac_cv_lib_$ac_lib_var=no"
  8475. fi
  8476. rm -f conftest*
  8477. LIBS="$ac_save_LIBS"
  8478. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8479. echo "$ac_t""yes" 1>&6
  8480. TCLLIB="$TCLLIB -ltcl$tcltk_ver $MATHLIB"
  8481. else
  8482. echo "$ac_t""no" 1>&6
  8483. echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver""... $ac_c" 1>&6
  8484. echo "configure:10621: checking for Tcl_Init in -ltcl$tcltk_ver" >&5
  8485. ac_lib_var=`echo tcl$tcltk_ver'_'Tcl_Init | sed 'y%./+-%__p_%'`
  8486. ac_save_LIBS="$LIBS"
  8487. LIBS="-ltcl$tcltk_ver $MATHLIB $DLLIB $LIBS"
  8488. cat > conftest.$ac_ext <<EOF
  8489. #line 10627 "configure"
  8490. #include "confdefs.h"
  8491. /* Override any gcc2 internal prototype to avoid an error. */
  8492. /* We use char because int might match the return type of a gcc2
  8493. builtin and then its argument prototype would still apply. */
  8494. char Tcl_Init();
  8495. int main() {
  8496. Tcl_Init()
  8497. ; return 0; }
  8498. EOF
  8499. if { (eval echo configure:10638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8500. rm -rf conftest*
  8501. eval "ac_cv_lib_$ac_lib_var=yes"
  8502. else
  8503. echo "configure: failed program was:" >&5
  8504. cat conftest.$ac_ext >&5
  8505. rm -rf conftest*
  8506. eval "ac_cv_lib_$ac_lib_var=no"
  8507. fi
  8508. rm -f conftest*
  8509. LIBS="$ac_save_LIBS"
  8510. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8511. echo "$ac_t""yes" 1>&6
  8512. TCLLIB="$TCLLIB -ltcl$tcltk_ver $MATHLIB $DLLIB"
  8513. else
  8514. echo "$ac_t""no" 1>&6
  8515. LDFLAGS=${ac_save_ldflags}
  8516. ac_save_ldflags="$LDFLAGS"
  8517. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  8518. echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver2""... $ac_c" 1>&6
  8519. echo "configure:10665: checking for Tcl_Init in -ltcl$tcltk_ver2" >&5
  8520. ac_lib_var=`echo tcl$tcltk_ver2'_'Tcl_Init | sed 'y%./+-%__p_%'`
  8521. ac_save_LIBS="$LIBS"
  8522. LIBS="-ltcl$tcltk_ver2 $MATHLIB $LIBS"
  8523. cat > conftest.$ac_ext <<EOF
  8524. #line 10671 "configure"
  8525. #include "confdefs.h"
  8526. /* Override any gcc2 internal prototype to avoid an error. */
  8527. /* We use char because int might match the return type of a gcc2
  8528. builtin and then its argument prototype would still apply. */
  8529. char Tcl_Init();
  8530. int main() {
  8531. Tcl_Init()
  8532. ; return 0; }
  8533. EOF
  8534. if { (eval echo configure:10682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8535. rm -rf conftest*
  8536. eval "ac_cv_lib_$ac_lib_var=yes"
  8537. else
  8538. echo "configure: failed program was:" >&5
  8539. cat conftest.$ac_ext >&5
  8540. rm -rf conftest*
  8541. eval "ac_cv_lib_$ac_lib_var=no"
  8542. fi
  8543. rm -f conftest*
  8544. LIBS="$ac_save_LIBS"
  8545. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8546. echo "$ac_t""yes" 1>&6
  8547. TCLLIB="$TCLLIB -ltcl$tcltk_ver2 $MATHLIB"
  8548. else
  8549. echo "$ac_t""no" 1>&6
  8550. echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver2""... $ac_c" 1>&6
  8551. echo "configure:10701: checking for Tcl_Init in -ltcl$tcltk_ver2" >&5
  8552. ac_lib_var=`echo tcl$tcltk_ver2'_'Tcl_Init | sed 'y%./+-%__p_%'`
  8553. ac_save_LIBS="$LIBS"
  8554. LIBS="-ltcl$tcltk_ver2 $MATHLIB $DLLIB $LIBS"
  8555. cat > conftest.$ac_ext <<EOF
  8556. #line 10707 "configure"
  8557. #include "confdefs.h"
  8558. /* Override any gcc2 internal prototype to avoid an error. */
  8559. /* We use char because int might match the return type of a gcc2
  8560. builtin and then its argument prototype would still apply. */
  8561. char Tcl_Init();
  8562. int main() {
  8563. Tcl_Init()
  8564. ; return 0; }
  8565. EOF
  8566. if { (eval echo configure:10718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8567. rm -rf conftest*
  8568. eval "ac_cv_lib_$ac_lib_var=yes"
  8569. else
  8570. echo "configure: failed program was:" >&5
  8571. cat conftest.$ac_ext >&5
  8572. rm -rf conftest*
  8573. eval "ac_cv_lib_$ac_lib_var=no"
  8574. fi
  8575. rm -f conftest*
  8576. LIBS="$ac_save_LIBS"
  8577. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8578. echo "$ac_t""yes" 1>&6
  8579. TCLLIB="$TCLLIB -ltcl$tcltk_ver2 $MATHLIB $DLLIB"
  8580. else
  8581. echo "$ac_t""no" 1>&6
  8582. LDFLAGS=${ac_save_ldflags}
  8583. { echo "configure: error: *** Unable to locate Tcl library." 1>&2; exit 1; }
  8584. fi
  8585. fi
  8586. LDFLAGS=${ac_save_ldflags}
  8587. fi
  8588. fi
  8589. LDFLAGS=${ac_save_ldflags}
  8590. fi
  8591. fi
  8592. LDFLAGS=${ac_save_ldflags}
  8593. ac_save_ldflags="$LDFLAGS"
  8594. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  8595. echo $ac_n "checking for Tk_MainWindow in -ltk""... $ac_c" 1>&6
  8596. echo "configure:10796: checking for Tk_MainWindow in -ltk" >&5
  8597. ac_lib_var=`echo tk'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  8598. ac_save_LIBS="$LIBS"
  8599. LIBS="-ltk $TCLLIB $MATHLIB $LIBS"
  8600. cat > conftest.$ac_ext <<EOF
  8601. #line 10802 "configure"
  8602. #include "confdefs.h"
  8603. /* Override any gcc2 internal prototype to avoid an error. */
  8604. /* We use char because int might match the return type of a gcc2
  8605. builtin and then its argument prototype would still apply. */
  8606. char Tk_MainWindow();
  8607. int main() {
  8608. Tk_MainWindow()
  8609. ; return 0; }
  8610. EOF
  8611. if { (eval echo configure:10813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8612. rm -rf conftest*
  8613. eval "ac_cv_lib_$ac_lib_var=yes"
  8614. else
  8615. echo "configure: failed program was:" >&5
  8616. cat conftest.$ac_ext >&5
  8617. rm -rf conftest*
  8618. eval "ac_cv_lib_$ac_lib_var=no"
  8619. fi
  8620. rm -f conftest*
  8621. LIBS="$ac_save_LIBS"
  8622. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8623. echo "$ac_t""yes" 1>&6
  8624. TKLIB="$TKLIB -ltk $MATHLIB"
  8625. else
  8626. echo "$ac_t""no" 1>&6
  8627. echo $ac_n "checking for Tk_MainWindow in -ltk""... $ac_c" 1>&6
  8628. echo "configure:10832: checking for Tk_MainWindow in -ltk" >&5
  8629. ac_lib_var=`echo tk'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  8630. ac_save_LIBS="$LIBS"
  8631. LIBS="-ltk $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
  8632. cat > conftest.$ac_ext <<EOF
  8633. #line 10838 "configure"
  8634. #include "confdefs.h"
  8635. /* Override any gcc2 internal prototype to avoid an error. */
  8636. /* We use char because int might match the return type of a gcc2
  8637. builtin and then its argument prototype would still apply. */
  8638. char Tk_MainWindow();
  8639. int main() {
  8640. Tk_MainWindow()
  8641. ; return 0; }
  8642. EOF
  8643. if { (eval echo configure:10849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8644. rm -rf conftest*
  8645. eval "ac_cv_lib_$ac_lib_var=yes"
  8646. else
  8647. echo "configure: failed program was:" >&5
  8648. cat conftest.$ac_ext >&5
  8649. rm -rf conftest*
  8650. eval "ac_cv_lib_$ac_lib_var=no"
  8651. fi
  8652. rm -f conftest*
  8653. LIBS="$ac_save_LIBS"
  8654. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8655. echo "$ac_t""yes" 1>&6
  8656. TKLIB="$TKLIB -ltk $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
  8657. else
  8658. echo "$ac_t""no" 1>&6
  8659. LDFLAGS=${ac_save_ldflags}
  8660. ac_save_ldflags="$LDFLAGS"
  8661. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  8662. echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver""... $ac_c" 1>&6
  8663. echo "configure:10876: checking for Tk_MainWindow in -ltk$tcltk_ver" >&5
  8664. ac_lib_var=`echo tk$tcltk_ver'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  8665. ac_save_LIBS="$LIBS"
  8666. LIBS="-ltk$tcltk_ver $TCLLIB $MATHLIB $LIBS"
  8667. cat > conftest.$ac_ext <<EOF
  8668. #line 10882 "configure"
  8669. #include "confdefs.h"
  8670. /* Override any gcc2 internal prototype to avoid an error. */
  8671. /* We use char because int might match the return type of a gcc2
  8672. builtin and then its argument prototype would still apply. */
  8673. char Tk_MainWindow();
  8674. int main() {
  8675. Tk_MainWindow()
  8676. ; return 0; }
  8677. EOF
  8678. if { (eval echo configure:10893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8679. rm -rf conftest*
  8680. eval "ac_cv_lib_$ac_lib_var=yes"
  8681. else
  8682. echo "configure: failed program was:" >&5
  8683. cat conftest.$ac_ext >&5
  8684. rm -rf conftest*
  8685. eval "ac_cv_lib_$ac_lib_var=no"
  8686. fi
  8687. rm -f conftest*
  8688. LIBS="$ac_save_LIBS"
  8689. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8690. echo "$ac_t""yes" 1>&6
  8691. TKLIB="$TKLIB -ltk$tcltk_ver $MATHLIB"
  8692. else
  8693. echo "$ac_t""no" 1>&6
  8694. echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver""... $ac_c" 1>&6
  8695. echo "configure:10912: checking for Tk_MainWindow in -ltk$tcltk_ver" >&5
  8696. ac_lib_var=`echo tk$tcltk_ver'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  8697. ac_save_LIBS="$LIBS"
  8698. LIBS="-ltk$tcltk_ver $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
  8699. cat > conftest.$ac_ext <<EOF
  8700. #line 10918 "configure"
  8701. #include "confdefs.h"
  8702. /* Override any gcc2 internal prototype to avoid an error. */
  8703. /* We use char because int might match the return type of a gcc2
  8704. builtin and then its argument prototype would still apply. */
  8705. char Tk_MainWindow();
  8706. int main() {
  8707. Tk_MainWindow()
  8708. ; return 0; }
  8709. EOF
  8710. if { (eval echo configure:10929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8711. rm -rf conftest*
  8712. eval "ac_cv_lib_$ac_lib_var=yes"
  8713. else
  8714. echo "configure: failed program was:" >&5
  8715. cat conftest.$ac_ext >&5
  8716. rm -rf conftest*
  8717. eval "ac_cv_lib_$ac_lib_var=no"
  8718. fi
  8719. rm -f conftest*
  8720. LIBS="$ac_save_LIBS"
  8721. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8722. echo "$ac_t""yes" 1>&6
  8723. TKLIB="$TKLIB -ltk$tcltk_ver $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
  8724. else
  8725. echo "$ac_t""no" 1>&6
  8726. LDFLAGS=${ac_save_ldflags}
  8727. ac_save_ldflags="$LDFLAGS"
  8728. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  8729. echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver2""... $ac_c" 1>&6
  8730. echo "configure:10956: checking for Tk_MainWindow in -ltk$tcltk_ver2" >&5
  8731. ac_lib_var=`echo tk$tcltk_ver2'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  8732. ac_save_LIBS="$LIBS"
  8733. LIBS="-ltk$tcltk_ver2 $TCLLIB $MATHLIB $LIBS"
  8734. cat > conftest.$ac_ext <<EOF
  8735. #line 10962 "configure"
  8736. #include "confdefs.h"
  8737. /* Override any gcc2 internal prototype to avoid an error. */
  8738. /* We use char because int might match the return type of a gcc2
  8739. builtin and then its argument prototype would still apply. */
  8740. char Tk_MainWindow();
  8741. int main() {
  8742. Tk_MainWindow()
  8743. ; return 0; }
  8744. EOF
  8745. if { (eval echo configure:10973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8746. rm -rf conftest*
  8747. eval "ac_cv_lib_$ac_lib_var=yes"
  8748. else
  8749. echo "configure: failed program was:" >&5
  8750. cat conftest.$ac_ext >&5
  8751. rm -rf conftest*
  8752. eval "ac_cv_lib_$ac_lib_var=no"
  8753. fi
  8754. rm -f conftest*
  8755. LIBS="$ac_save_LIBS"
  8756. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8757. echo "$ac_t""yes" 1>&6
  8758. TKLIB="$TKLIB -ltk$tcltk_ver2 $MATHLIB"
  8759. else
  8760. echo "$ac_t""no" 1>&6
  8761. echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver2""... $ac_c" 1>&6
  8762. echo "configure:10992: checking for Tk_MainWindow in -ltk$tcltk_ver2" >&5
  8763. ac_lib_var=`echo tk$tcltk_ver2'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  8764. ac_save_LIBS="$LIBS"
  8765. LIBS="-ltk$tcltk_ver2 $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
  8766. cat > conftest.$ac_ext <<EOF
  8767. #line 10998 "configure"
  8768. #include "confdefs.h"
  8769. /* Override any gcc2 internal prototype to avoid an error. */
  8770. /* We use char because int might match the return type of a gcc2
  8771. builtin and then its argument prototype would still apply. */
  8772. char Tk_MainWindow();
  8773. int main() {
  8774. Tk_MainWindow()
  8775. ; return 0; }
  8776. EOF
  8777. if { (eval echo configure:11009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8778. rm -rf conftest*
  8779. eval "ac_cv_lib_$ac_lib_var=yes"
  8780. else
  8781. echo "configure: failed program was:" >&5
  8782. cat conftest.$ac_ext >&5
  8783. rm -rf conftest*
  8784. eval "ac_cv_lib_$ac_lib_var=no"
  8785. fi
  8786. rm -f conftest*
  8787. LIBS="$ac_save_LIBS"
  8788. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8789. echo "$ac_t""yes" 1>&6
  8790. TKLIB="$TKLIB -ltk$tcltk_ver2 $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
  8791. else
  8792. echo "$ac_t""no" 1>&6
  8793. LDFLAGS=${ac_save_ldflags}
  8794. { echo "configure: error: *** Unable to locate Tk library." 1>&2; exit 1; }
  8795. fi
  8796. fi
  8797. LDFLAGS=${ac_save_ldflags}
  8798. fi
  8799. fi
  8800. LDFLAGS=${ac_save_ldflags}
  8801. fi
  8802. fi
  8803. LDFLAGS=${ac_save_ldflags}
  8804. # restore CFLAGS/LDLFAGS from Aqua 64bit strip
  8805. # only Tcl/Tk-based makefiles will strip 64bit out during compile
  8806. if test "$OPENGL_AQUA" = 1 ; then
  8807. CFLAGS="$save_CFLAGS"
  8808. LDFLAGS="$save_LDFLAGS"
  8809. fi
  8810. TCLTKLIBS="$TKLIB $TCLLIB"
  8811. # check for available OSX archs in TclTk
  8812. if test -n "$MACOSX_ARCHS" ; then
  8813. save_LDFLAGS="$LDFLAGS"
  8814. LDFLAGS=
  8815. save_CFLAGS="$CFLAGS"
  8816. CFLAGS=
  8817. tlib=`echo "$TCLLIB" | sed -e 's/-l//' -e 's/^ *//' -e 's/ *$//'`
  8818. for a in i386 ppc x86_64 ppc64
  8819. do
  8820. # add only if in MACOSX_ARCHS
  8821. echo $ac_n "checking for Tcl_Init in -l$tlib""... $ac_c" 1>&6
  8822. echo "configure:11099: checking for Tcl_Init in -l$tlib" >&5
  8823. ac_lib_var=`echo $tlib'_'Tcl_Init | sed 'y%./+-%__p_%'`
  8824. ac_save_LIBS="$LIBS"
  8825. LIBS="-l$tlib -arch $a $MACOSX_SDK $TCLTKLIBPATH $LIBS"
  8826. cat > conftest.$ac_ext <<EOF
  8827. #line 11105 "configure"
  8828. #include "confdefs.h"
  8829. /* Override any gcc2 internal prototype to avoid an error. */
  8830. /* We use char because int might match the return type of a gcc2
  8831. builtin and then its argument prototype would still apply. */
  8832. char Tcl_Init();
  8833. int main() {
  8834. Tcl_Init()
  8835. ; return 0; }
  8836. EOF
  8837. if { (eval echo configure:11116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8838. rm -rf conftest*
  8839. eval "ac_cv_lib_$ac_lib_var=yes"
  8840. else
  8841. echo "configure: failed program was:" >&5
  8842. cat conftest.$ac_ext >&5
  8843. rm -rf conftest*
  8844. eval "ac_cv_lib_$ac_lib_var=no"
  8845. fi
  8846. rm -f conftest*
  8847. LIBS="$ac_save_LIBS"
  8848. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8849. echo "$ac_t""yes" 1>&6
  8850. if test -n "`echo "$MACOSX_ARCHS" | grep $a`" ; then
  8851. MACOSX_ARCHS_TCLTK="$MACOSX_ARCHS_TCLTK -arch $a"
  8852. fi
  8853. else
  8854. echo "$ac_t""no" 1>&6
  8855. fi
  8856. done
  8857. LDFLAGS="$save_LDFLAGS"
  8858. CFLAGS="$save_CFLAGS"
  8859. fi
  8860. cat >> confdefs.h <<\EOF
  8861. #define HAVE_TCLTK 1
  8862. EOF
  8863. fi # $USE_TCLTK
  8864. TKINCDIR=$TCLINCDIR
  8865. # Done checking Tcl/Tk
  8866. # Enable ODBC option
  8867. echo $ac_n "checking whether to use ODBC""... $ac_c" 1>&6
  8868. echo "configure:11166: checking whether to use ODBC" >&5
  8869. echo "$ac_t"""$with_odbc"" 1>&6
  8870. case "$with_odbc" in
  8871. "no") USE_ODBC= ;;
  8872. "yes") USE_ODBC="1" ;;
  8873. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  8874. esac
  8875. ODBCINC=
  8876. ODBCLIB=
  8877. if test -n "$USE_ODBC"; then
  8878. # With ODBC includes directory
  8879. echo $ac_n "checking for location of ODBC includes""... $ac_c" 1>&6
  8880. echo "configure:11185: checking for location of ODBC includes" >&5
  8881. case "$with_odbc_includes" in
  8882. y | ye | yes | n | no)
  8883. { echo "configure: error: *** You must supply a directory to --with-odbc-includes." 1>&2; exit 1; }
  8884. ;;
  8885. esac
  8886. echo "$ac_t""$with_odbc_includes" 1>&6
  8887. if test -n "$with_odbc_includes" ; then
  8888. for dir in $with_odbc_includes; do
  8889. if test -d "$dir"; then
  8890. ODBCINC="$ODBCINC -I$dir"
  8891. else
  8892. { echo "configure: error: *** ODBC includes directory $dir does not exist." 1>&2; exit 1; }
  8893. fi
  8894. done
  8895. fi
  8896. ac_save_cppflags="$CPPFLAGS"
  8897. CPPFLAGS="$ODBCINC $CPPFLAGS"
  8898. for ac_hdr in sql.h
  8899. do
  8900. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8901. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8902. echo "configure:11211: checking for $ac_hdr" >&5
  8903. cat > conftest.$ac_ext <<EOF
  8904. #line 11214 "configure"
  8905. #include "confdefs.h"
  8906. #include <$ac_hdr>
  8907. EOF
  8908. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8909. { (eval echo configure:11219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8910. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8911. if test -z "$ac_err"; then
  8912. rm -rf conftest*
  8913. eval "ac_cv_header_$ac_safe=yes"
  8914. else
  8915. echo "$ac_err" >&5
  8916. echo "configure: failed program was:" >&5
  8917. cat conftest.$ac_ext >&5
  8918. rm -rf conftest*
  8919. eval "ac_cv_header_$ac_safe=no"
  8920. fi
  8921. rm -f conftest*
  8922. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8923. echo "$ac_t""yes" 1>&6
  8924. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8925. cat >> confdefs.h <<EOF
  8926. #define $ac_tr_hdr 1
  8927. EOF
  8928. else
  8929. echo "$ac_t""no" 1>&6
  8930. { echo "configure: error: *** Unable to locate ODBC includes." 1>&2; exit 1; }
  8931. fi
  8932. done
  8933. CPPFLAGS=$ac_save_cppflags
  8934. # With ODBC library directory
  8935. echo $ac_n "checking for location of ODBC library""... $ac_c" 1>&6
  8936. echo "configure:11253: checking for location of ODBC library" >&5
  8937. case "$with_odbc_libs" in
  8938. y | ye | yes | n | no)
  8939. { echo "configure: error: *** You must supply a directory to --with-odbc-libs." 1>&2; exit 1; }
  8940. ;;
  8941. esac
  8942. echo "$ac_t""$with_odbc_libs" 1>&6
  8943. if test -n "$with_odbc_libs"; then
  8944. for dir in $with_odbc_libs; do
  8945. if test -d "$dir"; then
  8946. ODBCLIB="$ODBCLIB -L$dir"
  8947. else
  8948. { echo "configure: error: *** ODBC library directory $dir does not exist." 1>&2; exit 1; }
  8949. fi
  8950. done
  8951. fi
  8952. ac_save_ldflags="$LDFLAGS"
  8953. LDFLAGS="$ODBCLIB $LDFLAGS"
  8954. echo $ac_n "checking for SQLConnect in -lodbc""... $ac_c" 1>&6
  8955. echo "configure:11278: checking for SQLConnect in -lodbc" >&5
  8956. ac_lib_var=`echo odbc'_'SQLConnect | sed 'y%./+-%__p_%'`
  8957. ac_save_LIBS="$LIBS"
  8958. LIBS="-lodbc $ICONVLIB $LIBS"
  8959. cat > conftest.$ac_ext <<EOF
  8960. #line 11284 "configure"
  8961. #include "confdefs.h"
  8962. /* Override any gcc2 internal prototype to avoid an error. */
  8963. /* We use char because int might match the return type of a gcc2
  8964. builtin and then its argument prototype would still apply. */
  8965. char SQLConnect();
  8966. int main() {
  8967. SQLConnect()
  8968. ; return 0; }
  8969. EOF
  8970. if { (eval echo configure:11295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8971. rm -rf conftest*
  8972. eval "ac_cv_lib_$ac_lib_var=yes"
  8973. else
  8974. echo "configure: failed program was:" >&5
  8975. cat conftest.$ac_ext >&5
  8976. rm -rf conftest*
  8977. eval "ac_cv_lib_$ac_lib_var=no"
  8978. fi
  8979. rm -f conftest*
  8980. LIBS="$ac_save_LIBS"
  8981. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8982. echo "$ac_t""yes" 1>&6
  8983. ODBCLIB="$ODBCLIB -lodbc "
  8984. else
  8985. echo "$ac_t""no" 1>&6
  8986. LDFLAGS=${ac_save_ldflags}
  8987. ac_save_ldflags="$LDFLAGS"
  8988. LDFLAGS="$ODBCLIB $LDFLAGS"
  8989. echo $ac_n "checking for SQLConnect in -liodbc""... $ac_c" 1>&6
  8990. echo "configure:11320: checking for SQLConnect in -liodbc" >&5
  8991. ac_lib_var=`echo iodbc'_'SQLConnect | sed 'y%./+-%__p_%'`
  8992. ac_save_LIBS="$LIBS"
  8993. LIBS="-liodbc $LIBS"
  8994. cat > conftest.$ac_ext <<EOF
  8995. #line 11326 "configure"
  8996. #include "confdefs.h"
  8997. /* Override any gcc2 internal prototype to avoid an error. */
  8998. /* We use char because int might match the return type of a gcc2
  8999. builtin and then its argument prototype would still apply. */
  9000. char SQLConnect();
  9001. int main() {
  9002. SQLConnect()
  9003. ; return 0; }
  9004. EOF
  9005. if { (eval echo configure:11337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9006. rm -rf conftest*
  9007. eval "ac_cv_lib_$ac_lib_var=yes"
  9008. else
  9009. echo "configure: failed program was:" >&5
  9010. cat conftest.$ac_ext >&5
  9011. rm -rf conftest*
  9012. eval "ac_cv_lib_$ac_lib_var=no"
  9013. fi
  9014. rm -f conftest*
  9015. LIBS="$ac_save_LIBS"
  9016. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9017. echo "$ac_t""yes" 1>&6
  9018. ODBCLIB="$ODBCLIB -liodbc "
  9019. else
  9020. echo "$ac_t""no" 1>&6
  9021. LDFLAGS=${ac_save_ldflags}
  9022. ac_save_cflags="$CFLAGS"
  9023. CFLAGS="$CFLAGS $ODBCINC"
  9024. ac_save_ldflags="$LDFLAGS"
  9025. ac_save_libs="$LIBS"
  9026. echo $ac_n "checking for ODBC library""... $ac_c" 1>&6
  9027. echo "configure:11362: checking for ODBC library" >&5
  9028. LDFLAGS="$ODBCLIB $LDFLAGS"
  9029. LIBS="-lodbc32 "
  9030. cat > conftest.$ac_ext <<EOF
  9031. #line 11366 "configure"
  9032. #include "confdefs.h"
  9033. #include <windows.h>
  9034. #include <sql.h>
  9035. int main() {
  9036. SQLAllocEnv((SQLHENV *)0);
  9037. ; return 0; }
  9038. EOF
  9039. if { (eval echo configure:11374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9040. rm -rf conftest*
  9041. echo "$ac_t""found" 1>&6
  9042. ODBCLIB="$ODBCLIB -lodbc32 "
  9043. else
  9044. echo "configure: failed program was:" >&5
  9045. cat conftest.$ac_ext >&5
  9046. rm -rf conftest*
  9047. { echo "configure: error: *** Unable to locate ODBC library." 1>&2; exit 1; }
  9048. fi
  9049. rm -f conftest*
  9050. LIBS=${ac_save_libs}
  9051. LDFLAGS=${ac_save_ldflags}
  9052. CFLAGS="${ac_save_cflags}"
  9053. fi
  9054. LDFLAGS=${ac_save_ldflags}
  9055. fi
  9056. LDFLAGS=${ac_save_ldflags}
  9057. fi # $USE_ODBC
  9058. # Done checking ODBC
  9059. # Enable FFTW option
  9060. echo $ac_n "checking whether to use FFTW""... $ac_c" 1>&6
  9061. echo "configure:11423: checking whether to use FFTW" >&5
  9062. echo "$ac_t"""$with_fftw"" 1>&6
  9063. case "$with_fftw" in
  9064. "no") USE_FFTW= ;;
  9065. "yes") USE_FFTW="1" ;;
  9066. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9067. esac
  9068. FFTWINC=
  9069. FFTWLIB=
  9070. if test -n "$USE_FFTW"; then
  9071. # With FFTW includes directory
  9072. echo $ac_n "checking for location of FFTW includes""... $ac_c" 1>&6
  9073. echo "configure:11442: checking for location of FFTW includes" >&5
  9074. case "$with_fftw_includes" in
  9075. y | ye | yes | n | no)
  9076. { echo "configure: error: *** You must supply a directory to --with-fftw-includes." 1>&2; exit 1; }
  9077. ;;
  9078. esac
  9079. echo "$ac_t""$with_fftw_includes" 1>&6
  9080. if test -n "$with_fftw_includes" ; then
  9081. for dir in $with_fftw_includes; do
  9082. if test -d "$dir"; then
  9083. FFTWINC="$FFTWINC -I$dir"
  9084. else
  9085. { echo "configure: error: *** FFTW includes directory $dir does not exist." 1>&2; exit 1; }
  9086. fi
  9087. done
  9088. fi
  9089. ac_save_cppflags="$CPPFLAGS"
  9090. CPPFLAGS="$FFTWINC $CPPFLAGS"
  9091. for ac_hdr in fftw3.h
  9092. do
  9093. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9094. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9095. echo "configure:11468: checking for $ac_hdr" >&5
  9096. cat > conftest.$ac_ext <<EOF
  9097. #line 11471 "configure"
  9098. #include "confdefs.h"
  9099. #include <$ac_hdr>
  9100. EOF
  9101. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9102. { (eval echo configure:11476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9103. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9104. if test -z "$ac_err"; then
  9105. rm -rf conftest*
  9106. eval "ac_cv_header_$ac_safe=yes"
  9107. else
  9108. echo "$ac_err" >&5
  9109. echo "configure: failed program was:" >&5
  9110. cat conftest.$ac_ext >&5
  9111. rm -rf conftest*
  9112. eval "ac_cv_header_$ac_safe=no"
  9113. fi
  9114. rm -f conftest*
  9115. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9116. echo "$ac_t""yes" 1>&6
  9117. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9118. cat >> confdefs.h <<EOF
  9119. #define $ac_tr_hdr 1
  9120. EOF
  9121. else
  9122. echo "$ac_t""no" 1>&6
  9123. ac_save_cppflags="$CPPFLAGS"
  9124. CPPFLAGS=" $CPPFLAGS"
  9125. for ac_hdr in fftw.h
  9126. do
  9127. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9128. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9129. echo "configure:11504: checking for $ac_hdr" >&5
  9130. cat > conftest.$ac_ext <<EOF
  9131. #line 11507 "configure"
  9132. #include "confdefs.h"
  9133. #include <$ac_hdr>
  9134. EOF
  9135. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9136. { (eval echo configure:11512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9137. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9138. if test -z "$ac_err"; then
  9139. rm -rf conftest*
  9140. eval "ac_cv_header_$ac_safe=yes"
  9141. else
  9142. echo "$ac_err" >&5
  9143. echo "configure: failed program was:" >&5
  9144. cat conftest.$ac_ext >&5
  9145. rm -rf conftest*
  9146. eval "ac_cv_header_$ac_safe=no"
  9147. fi
  9148. rm -f conftest*
  9149. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9150. echo "$ac_t""yes" 1>&6
  9151. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9152. cat >> confdefs.h <<EOF
  9153. #define $ac_tr_hdr 1
  9154. EOF
  9155. else
  9156. echo "$ac_t""no" 1>&6
  9157. ac_save_cppflags="$CPPFLAGS"
  9158. CPPFLAGS=" $CPPFLAGS"
  9159. for ac_hdr in dfftw.h
  9160. do
  9161. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9162. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9163. echo "configure:11540: checking for $ac_hdr" >&5
  9164. cat > conftest.$ac_ext <<EOF
  9165. #line 11543 "configure"
  9166. #include "confdefs.h"
  9167. #include <$ac_hdr>
  9168. EOF
  9169. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9170. { (eval echo configure:11548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9171. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9172. if test -z "$ac_err"; then
  9173. rm -rf conftest*
  9174. eval "ac_cv_header_$ac_safe=yes"
  9175. else
  9176. echo "$ac_err" >&5
  9177. echo "configure: failed program was:" >&5
  9178. cat conftest.$ac_ext >&5
  9179. rm -rf conftest*
  9180. eval "ac_cv_header_$ac_safe=no"
  9181. fi
  9182. rm -f conftest*
  9183. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9184. echo "$ac_t""yes" 1>&6
  9185. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9186. cat >> confdefs.h <<EOF
  9187. #define $ac_tr_hdr 1
  9188. EOF
  9189. else
  9190. echo "$ac_t""no" 1>&6
  9191. { echo "configure: error: *** Unable to locate FFTW includes." 1>&2; exit 1; }
  9192. fi
  9193. done
  9194. CPPFLAGS=$ac_save_cppflags
  9195. fi
  9196. done
  9197. CPPFLAGS=$ac_save_cppflags
  9198. fi
  9199. done
  9200. CPPFLAGS=$ac_save_cppflags
  9201. # With FFTW library directory
  9202. echo $ac_n "checking for location of FFTW library""... $ac_c" 1>&6
  9203. echo "configure:11594: checking for location of FFTW library" >&5
  9204. case "$with_fftw_libs" in
  9205. y | ye | yes | n | no)
  9206. { echo "configure: error: *** You must supply a directory to --with-fftw-libs." 1>&2; exit 1; }
  9207. ;;
  9208. esac
  9209. echo "$ac_t""$with_fftw_libs" 1>&6
  9210. if test -n "$with_fftw_libs"; then
  9211. for dir in $with_fftw_libs; do
  9212. if test -d "$dir"; then
  9213. FFTWLIB="$FFTWLIB -L$dir"
  9214. else
  9215. { echo "configure: error: *** FFTW library directory $dir does not exist." 1>&2; exit 1; }
  9216. fi
  9217. done
  9218. fi
  9219. ac_save_ldflags="$LDFLAGS"
  9220. LDFLAGS="$FFTWLIB $LDFLAGS"
  9221. echo $ac_n "checking for fftw_execute in -lfftw3""... $ac_c" 1>&6
  9222. echo "configure:11619: checking for fftw_execute in -lfftw3" >&5
  9223. ac_lib_var=`echo fftw3'_'fftw_execute | sed 'y%./+-%__p_%'`
  9224. ac_save_LIBS="$LIBS"
  9225. LIBS="-lfftw3 $MATHLIB $LIBS"
  9226. cat > conftest.$ac_ext <<EOF
  9227. #line 11625 "configure"
  9228. #include "confdefs.h"
  9229. /* Override any gcc2 internal prototype to avoid an error. */
  9230. /* We use char because int might match the return type of a gcc2
  9231. builtin and then its argument prototype would still apply. */
  9232. char fftw_execute();
  9233. int main() {
  9234. fftw_execute()
  9235. ; return 0; }
  9236. EOF
  9237. if { (eval echo configure:11636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9238. rm -rf conftest*
  9239. eval "ac_cv_lib_$ac_lib_var=yes"
  9240. else
  9241. echo "configure: failed program was:" >&5
  9242. cat conftest.$ac_ext >&5
  9243. rm -rf conftest*
  9244. eval "ac_cv_lib_$ac_lib_var=no"
  9245. fi
  9246. rm -f conftest*
  9247. LIBS="$ac_save_LIBS"
  9248. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9249. echo "$ac_t""yes" 1>&6
  9250. FFTWLIB="$FFTWLIB -lfftw3 $MATHLIB"
  9251. else
  9252. echo "$ac_t""no" 1>&6
  9253. LDFLAGS=${ac_save_ldflags}
  9254. ac_save_ldflags="$LDFLAGS"
  9255. LDFLAGS="$FFTWLIB $LDFLAGS"
  9256. echo $ac_n "checking for fftwnd_one in -lfftw""... $ac_c" 1>&6
  9257. echo "configure:11661: checking for fftwnd_one in -lfftw" >&5
  9258. ac_lib_var=`echo fftw'_'fftwnd_one | sed 'y%./+-%__p_%'`
  9259. ac_save_LIBS="$LIBS"
  9260. LIBS="-lfftw $MATHLIB $LIBS"
  9261. cat > conftest.$ac_ext <<EOF
  9262. #line 11667 "configure"
  9263. #include "confdefs.h"
  9264. /* Override any gcc2 internal prototype to avoid an error. */
  9265. /* We use char because int might match the return type of a gcc2
  9266. builtin and then its argument prototype would still apply. */
  9267. char fftwnd_one();
  9268. int main() {
  9269. fftwnd_one()
  9270. ; return 0; }
  9271. EOF
  9272. if { (eval echo configure:11678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9273. rm -rf conftest*
  9274. eval "ac_cv_lib_$ac_lib_var=yes"
  9275. else
  9276. echo "configure: failed program was:" >&5
  9277. cat conftest.$ac_ext >&5
  9278. rm -rf conftest*
  9279. eval "ac_cv_lib_$ac_lib_var=no"
  9280. fi
  9281. rm -f conftest*
  9282. LIBS="$ac_save_LIBS"
  9283. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9284. echo "$ac_t""yes" 1>&6
  9285. FFTWLIB="$FFTWLIB -lfftw $MATHLIB"
  9286. else
  9287. echo "$ac_t""no" 1>&6
  9288. LDFLAGS=${ac_save_ldflags}
  9289. ac_save_ldflags="$LDFLAGS"
  9290. LDFLAGS="$FFTWLIB $LDFLAGS"
  9291. echo $ac_n "checking for fftwnd_one in -ldfftw""... $ac_c" 1>&6
  9292. echo "configure:11703: checking for fftwnd_one in -ldfftw" >&5
  9293. ac_lib_var=`echo dfftw'_'fftwnd_one | sed 'y%./+-%__p_%'`
  9294. ac_save_LIBS="$LIBS"
  9295. LIBS="-ldfftw $MATHLIB $LIBS"
  9296. cat > conftest.$ac_ext <<EOF
  9297. #line 11709 "configure"
  9298. #include "confdefs.h"
  9299. /* Override any gcc2 internal prototype to avoid an error. */
  9300. /* We use char because int might match the return type of a gcc2
  9301. builtin and then its argument prototype would still apply. */
  9302. char fftwnd_one();
  9303. int main() {
  9304. fftwnd_one()
  9305. ; return 0; }
  9306. EOF
  9307. if { (eval echo configure:11720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9308. rm -rf conftest*
  9309. eval "ac_cv_lib_$ac_lib_var=yes"
  9310. else
  9311. echo "configure: failed program was:" >&5
  9312. cat conftest.$ac_ext >&5
  9313. rm -rf conftest*
  9314. eval "ac_cv_lib_$ac_lib_var=no"
  9315. fi
  9316. rm -f conftest*
  9317. LIBS="$ac_save_LIBS"
  9318. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9319. echo "$ac_t""yes" 1>&6
  9320. FFTWLIB="$FFTWLIB -ldfftw $MATHLIB"
  9321. else
  9322. echo "$ac_t""no" 1>&6
  9323. LDFLAGS=${ac_save_ldflags}
  9324. { echo "configure: error: *** Unable to locate FFTW library." 1>&2; exit 1; }
  9325. fi
  9326. LDFLAGS=${ac_save_ldflags}
  9327. fi
  9328. LDFLAGS=${ac_save_ldflags}
  9329. fi
  9330. LDFLAGS=${ac_save_ldflags}
  9331. fi # $USE_FFTW
  9332. # Done checking FFTW
  9333. # Enable BLAS option
  9334. echo $ac_n "checking whether to use BLAS""... $ac_c" 1>&6
  9335. echo "configure:11777: checking whether to use BLAS" >&5
  9336. echo "$ac_t"""$with_blas"" 1>&6
  9337. case "$with_blas" in
  9338. "no") USE_BLAS= ;;
  9339. "yes") USE_BLAS="1" ;;
  9340. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9341. esac
  9342. BLASLIB=
  9343. BLASINC=
  9344. if test -n "$USE_BLAS"; then
  9345. # With BLAS includes directory
  9346. # BLAS doesn't have includes (FORTRAN library)
  9347. # With BLAS library directory
  9348. echo $ac_n "checking for location of BLAS includes""... $ac_c" 1>&6
  9349. echo "configure:11798: checking for location of BLAS includes" >&5
  9350. case "$with_blas_includes" in
  9351. y | ye | yes | n | no)
  9352. { echo "configure: error: *** You must supply a directory to --with-blas-includes." 1>&2; exit 1; }
  9353. ;;
  9354. esac
  9355. echo "$ac_t""$with_blas_includes" 1>&6
  9356. if test -n "$with_blas_includes" ; then
  9357. for dir in $with_blas_includes; do
  9358. if test -d "$dir"; then
  9359. BLASINC="$BLASINC -I$dir"
  9360. else
  9361. { echo "configure: error: *** BLAS includes directory $dir does not exist." 1>&2; exit 1; }
  9362. fi
  9363. done
  9364. fi
  9365. echo $ac_n "checking for location of BLAS library""... $ac_c" 1>&6
  9366. echo "configure:11818: checking for location of BLAS library" >&5
  9367. case "$with_blas_libs" in
  9368. y | ye | yes | n | no)
  9369. { echo "configure: error: *** You must supply a directory to --with-blas-libs." 1>&2; exit 1; }
  9370. ;;
  9371. esac
  9372. echo "$ac_t""$with_blas_libs" 1>&6
  9373. if test -n "$with_blas_libs"; then
  9374. for dir in $with_blas_libs; do
  9375. if test -d "$dir"; then
  9376. BLASLIB="$BLASLIB -L$dir"
  9377. else
  9378. { echo "configure: error: *** BLAS library directory $dir does not exist." 1>&2; exit 1; }
  9379. fi
  9380. done
  9381. fi
  9382. # See if cblas.h exists (CBLAS,ATLAS,others)
  9383. save_CPPFLAGS="$CPPFLAGS"
  9384. CPPFLAGS="$BLASINC $CPPFLAGS"
  9385. for ac_hdr in cblas.h
  9386. do
  9387. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9388. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9389. echo "configure:11844: checking for $ac_hdr" >&5
  9390. cat > conftest.$ac_ext <<EOF
  9391. #line 11847 "configure"
  9392. #include "confdefs.h"
  9393. #include <$ac_hdr>
  9394. EOF
  9395. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9396. { (eval echo configure:11852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9397. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9398. if test -z "$ac_err"; then
  9399. rm -rf conftest*
  9400. eval "ac_cv_header_$ac_safe=yes"
  9401. else
  9402. echo "$ac_err" >&5
  9403. echo "configure: failed program was:" >&5
  9404. cat conftest.$ac_ext >&5
  9405. rm -rf conftest*
  9406. eval "ac_cv_header_$ac_safe=no"
  9407. fi
  9408. rm -f conftest*
  9409. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9410. echo "$ac_t""yes" 1>&6
  9411. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9412. cat >> confdefs.h <<EOF
  9413. #define $ac_tr_hdr 1
  9414. EOF
  9415. else
  9416. echo "$ac_t""no" 1>&6
  9417. fi
  9418. done
  9419. CPPFLAGS="$save_CPPFLAGS"
  9420. ac_save_ldflags="$LDFLAGS"
  9421. LDFLAGS="$BLASLIB $LDFLAGS"
  9422. echo $ac_n "checking for dnrm2_ in -lblas""... $ac_c" 1>&6
  9423. echo "configure:11887: checking for dnrm2_ in -lblas" >&5
  9424. ac_lib_var=`echo blas'_'dnrm2_ | sed 'y%./+-%__p_%'`
  9425. ac_save_LIBS="$LIBS"
  9426. LIBS="-lblas $MATHLIB $LIBS"
  9427. cat > conftest.$ac_ext <<EOF
  9428. #line 11893 "configure"
  9429. #include "confdefs.h"
  9430. /* Override any gcc2 internal prototype to avoid an error. */
  9431. /* We use char because int might match the return type of a gcc2
  9432. builtin and then its argument prototype would still apply. */
  9433. char dnrm2_();
  9434. int main() {
  9435. dnrm2_()
  9436. ; return 0; }
  9437. EOF
  9438. if { (eval echo configure:11904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9439. rm -rf conftest*
  9440. eval "ac_cv_lib_$ac_lib_var=yes"
  9441. else
  9442. echo "configure: failed program was:" >&5
  9443. cat conftest.$ac_ext >&5
  9444. rm -rf conftest*
  9445. eval "ac_cv_lib_$ac_lib_var=no"
  9446. fi
  9447. rm -f conftest*
  9448. LIBS="$ac_save_LIBS"
  9449. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9450. echo "$ac_t""yes" 1>&6
  9451. BLASLIB="$BLASLIB -lblas "
  9452. else
  9453. echo "$ac_t""no" 1>&6
  9454. echo $ac_n "checking for dnrm2_ in -lblas""... $ac_c" 1>&6
  9455. echo "configure:11923: checking for dnrm2_ in -lblas" >&5
  9456. ac_lib_var=`echo blas'_'dnrm2_ | sed 'y%./+-%__p_%'`
  9457. ac_save_LIBS="$LIBS"
  9458. LIBS="-lblas $MATHLIB -lg2c $LIBS"
  9459. cat > conftest.$ac_ext <<EOF
  9460. #line 11929 "configure"
  9461. #include "confdefs.h"
  9462. /* Override any gcc2 internal prototype to avoid an error. */
  9463. /* We use char because int might match the return type of a gcc2
  9464. builtin and then its argument prototype would still apply. */
  9465. char dnrm2_();
  9466. int main() {
  9467. dnrm2_()
  9468. ; return 0; }
  9469. EOF
  9470. if { (eval echo configure:11940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9471. rm -rf conftest*
  9472. eval "ac_cv_lib_$ac_lib_var=yes"
  9473. else
  9474. echo "configure: failed program was:" >&5
  9475. cat conftest.$ac_ext >&5
  9476. rm -rf conftest*
  9477. eval "ac_cv_lib_$ac_lib_var=no"
  9478. fi
  9479. rm -f conftest*
  9480. LIBS="$ac_save_LIBS"
  9481. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9482. echo "$ac_t""yes" 1>&6
  9483. BLASLIB="$BLASLIB -lblas -lg2c"
  9484. else
  9485. echo "$ac_t""no" 1>&6
  9486. LDFLAGS=${ac_save_ldflags}
  9487. { echo "configure: error: *** Unable to locate BLAS library." 1>&2; exit 1; }
  9488. fi
  9489. fi
  9490. LDFLAGS=${ac_save_ldflags}
  9491. blas_ok=no
  9492. # Check for ATLAS
  9493. save_LDFLAGS="$LDFLAGS"
  9494. LDFLAGS="$BLASLIB $LDFLAGS"
  9495. echo $ac_n "checking for ATL_xerbla in -latlas""... $ac_c" 1>&6
  9496. echo "configure:11984: checking for ATL_xerbla in -latlas" >&5
  9497. ac_lib_var=`echo atlas'_'ATL_xerbla | sed 'y%./+-%__p_%'`
  9498. ac_save_LIBS="$LIBS"
  9499. LIBS="-latlas $LIBS"
  9500. cat > conftest.$ac_ext <<EOF
  9501. #line 11990 "configure"
  9502. #include "confdefs.h"
  9503. /* Override any gcc2 internal prototype to avoid an error. */
  9504. /* We use char because int might match the return type of a gcc2
  9505. builtin and then its argument prototype would still apply. */
  9506. char ATL_xerbla();
  9507. int main() {
  9508. ATL_xerbla()
  9509. ; return 0; }
  9510. EOF
  9511. if { (eval echo configure:12001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9512. rm -rf conftest*
  9513. eval "ac_cv_lib_$ac_lib_var=yes"
  9514. else
  9515. echo "configure: failed program was:" >&5
  9516. cat conftest.$ac_ext >&5
  9517. rm -rf conftest*
  9518. eval "ac_cv_lib_$ac_lib_var=no"
  9519. fi
  9520. rm -f conftest*
  9521. LIBS="$ac_save_LIBS"
  9522. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9523. echo "$ac_t""yes" 1>&6
  9524. echo $ac_n "checking for sgemm_ in -lf77blas""... $ac_c" 1>&6
  9525. echo "configure:12016: checking for sgemm_ in -lf77blas" >&5
  9526. ac_lib_var=`echo f77blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  9527. ac_save_LIBS="$LIBS"
  9528. LIBS="-lf77blas -latlas $LIBS"
  9529. cat > conftest.$ac_ext <<EOF
  9530. #line 12022 "configure"
  9531. #include "confdefs.h"
  9532. /* Override any gcc2 internal prototype to avoid an error. */
  9533. /* We use char because int might match the return type of a gcc2
  9534. builtin and then its argument prototype would still apply. */
  9535. char sgemm_();
  9536. int main() {
  9537. sgemm_()
  9538. ; return 0; }
  9539. EOF
  9540. if { (eval echo configure:12033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9541. rm -rf conftest*
  9542. eval "ac_cv_lib_$ac_lib_var=yes"
  9543. else
  9544. echo "configure: failed program was:" >&5
  9545. cat conftest.$ac_ext >&5
  9546. rm -rf conftest*
  9547. eval "ac_cv_lib_$ac_lib_var=no"
  9548. fi
  9549. rm -f conftest*
  9550. LIBS="$ac_save_LIBS"
  9551. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9552. echo "$ac_t""yes" 1>&6
  9553. echo $ac_n "checking for cblas_dgemm in -lcblas""... $ac_c" 1>&6
  9554. echo "configure:12048: checking for cblas_dgemm in -lcblas" >&5
  9555. ac_lib_var=`echo cblas'_'cblas_dgemm | sed 'y%./+-%__p_%'`
  9556. ac_save_LIBS="$LIBS"
  9557. LIBS="-lcblas -lf77blas -latlas $LIBS"
  9558. cat > conftest.$ac_ext <<EOF
  9559. #line 12054 "configure"
  9560. #include "confdefs.h"
  9561. /* Override any gcc2 internal prototype to avoid an error. */
  9562. /* We use char because int might match the return type of a gcc2
  9563. builtin and then its argument prototype would still apply. */
  9564. char cblas_dgemm();
  9565. int main() {
  9566. cblas_dgemm()
  9567. ; return 0; }
  9568. EOF
  9569. if { (eval echo configure:12065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9570. rm -rf conftest*
  9571. eval "ac_cv_lib_$ac_lib_var=yes"
  9572. else
  9573. echo "configure: failed program was:" >&5
  9574. cat conftest.$ac_ext >&5
  9575. rm -rf conftest*
  9576. eval "ac_cv_lib_$ac_lib_var=no"
  9577. fi
  9578. rm -f conftest*
  9579. LIBS="$ac_save_LIBS"
  9580. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9581. echo "$ac_t""yes" 1>&6
  9582. blas_ok=yes; BLASLIB="-lcblas -lf77blas -latlas"
  9583. else
  9584. echo "$ac_t""no" 1>&6
  9585. fi
  9586. else
  9587. echo "$ac_t""no" 1>&6
  9588. fi
  9589. else
  9590. echo "$ac_t""no" 1>&6
  9591. fi
  9592. LDFLAGS="$save_LDFLAGS"
  9593. # Do we have ATLAS?
  9594. if test $blas_ok = yes; then
  9595. cat >> confdefs.h <<\EOF
  9596. #define HAVE_LIBATLAS 1
  9597. EOF
  9598. fi
  9599. # BLAS in Apple vecLib framework? (Mac OS-X)
  9600. # not dependent on APP build
  9601. #if test -n "$MACOSX_APP"; then
  9602. if test $blas_ok = no; then
  9603. vlib_flags="-framework vecLib"
  9604. save_LIBS="$LIBS"
  9605. LIBS="$vlib_flags $LIBS"
  9606. echo $ac_n "checking for sgemm in $vlib_flags""... $ac_c" 1>&6
  9607. echo "configure:12111: checking for sgemm in $vlib_flags" >&5
  9608. cat > conftest.$ac_ext <<EOF
  9609. #line 12113 "configure"
  9610. #include "confdefs.h"
  9611. int main() {
  9612. sgemm
  9613. ; return 0; }
  9614. EOF
  9615. if { (eval echo configure:12120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9616. rm -rf conftest*
  9617. blas_ok=yes; BLASLIB="$vlib_flags"
  9618. else
  9619. echo "configure: failed program was:" >&5
  9620. cat conftest.$ac_ext >&5
  9621. rm -rf conftest*
  9622. BLASLIB=""
  9623. fi
  9624. rm -f conftest*
  9625. echo "$ac_t""$blas_ok" 1>&6
  9626. LIBS="$save_LIBS"
  9627. fi
  9628. #fi # $MACOSX_APP
  9629. # BLAS in PhiPACK libraries? (requires generic BLAS, too)
  9630. if test $blas_ok = no; then
  9631. echo $ac_n "checking for sgemm_ in -lblas""... $ac_c" 1>&6
  9632. echo "configure:12138: checking for sgemm_ in -lblas" >&5
  9633. ac_lib_var=`echo blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  9634. ac_save_LIBS="$LIBS"
  9635. LIBS="-lblas $LIBS"
  9636. cat > conftest.$ac_ext <<EOF
  9637. #line 12144 "configure"
  9638. #include "confdefs.h"
  9639. /* Override any gcc2 internal prototype to avoid an error. */
  9640. /* We use char because int might match the return type of a gcc2
  9641. builtin and then its argument prototype would still apply. */
  9642. char sgemm_();
  9643. int main() {
  9644. sgemm_()
  9645. ; return 0; }
  9646. EOF
  9647. if { (eval echo configure:12155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9648. rm -rf conftest*
  9649. eval "ac_cv_lib_$ac_lib_var=yes"
  9650. else
  9651. echo "configure: failed program was:" >&5
  9652. cat conftest.$ac_ext >&5
  9653. rm -rf conftest*
  9654. eval "ac_cv_lib_$ac_lib_var=no"
  9655. fi
  9656. rm -f conftest*
  9657. LIBS="$ac_save_LIBS"
  9658. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9659. echo "$ac_t""yes" 1>&6
  9660. echo $ac_n "checking for dgemm_ in -ldgemm""... $ac_c" 1>&6
  9661. echo "configure:12170: checking for dgemm_ in -ldgemm" >&5
  9662. ac_lib_var=`echo dgemm'_'dgemm_ | sed 'y%./+-%__p_%'`
  9663. ac_save_LIBS="$LIBS"
  9664. LIBS="-ldgemm -lblas $LIBS"
  9665. cat > conftest.$ac_ext <<EOF
  9666. #line 12176 "configure"
  9667. #include "confdefs.h"
  9668. /* Override any gcc2 internal prototype to avoid an error. */
  9669. /* We use char because int might match the return type of a gcc2
  9670. builtin and then its argument prototype would still apply. */
  9671. char dgemm_();
  9672. int main() {
  9673. dgemm_()
  9674. ; return 0; }
  9675. EOF
  9676. if { (eval echo configure:12187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9677. rm -rf conftest*
  9678. eval "ac_cv_lib_$ac_lib_var=yes"
  9679. else
  9680. echo "configure: failed program was:" >&5
  9681. cat conftest.$ac_ext >&5
  9682. rm -rf conftest*
  9683. eval "ac_cv_lib_$ac_lib_var=no"
  9684. fi
  9685. rm -f conftest*
  9686. LIBS="$ac_save_LIBS"
  9687. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9688. echo "$ac_t""yes" 1>&6
  9689. echo $ac_n "checking for sgemm_ in -lsgemm""... $ac_c" 1>&6
  9690. echo "configure:12202: checking for sgemm_ in -lsgemm" >&5
  9691. ac_lib_var=`echo sgemm'_'sgemm_ | sed 'y%./+-%__p_%'`
  9692. ac_save_LIBS="$LIBS"
  9693. LIBS="-lsgemm -lblas $LIBS"
  9694. cat > conftest.$ac_ext <<EOF
  9695. #line 12208 "configure"
  9696. #include "confdefs.h"
  9697. /* Override any gcc2 internal prototype to avoid an error. */
  9698. /* We use char because int might match the return type of a gcc2
  9699. builtin and then its argument prototype would still apply. */
  9700. char sgemm_();
  9701. int main() {
  9702. sgemm_()
  9703. ; return 0; }
  9704. EOF
  9705. if { (eval echo configure:12219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9706. rm -rf conftest*
  9707. eval "ac_cv_lib_$ac_lib_var=yes"
  9708. else
  9709. echo "configure: failed program was:" >&5
  9710. cat conftest.$ac_ext >&5
  9711. rm -rf conftest*
  9712. eval "ac_cv_lib_$ac_lib_var=no"
  9713. fi
  9714. rm -f conftest*
  9715. LIBS="$ac_save_LIBS"
  9716. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9717. echo "$ac_t""yes" 1>&6
  9718. blas_ok=yes; BLASLIB="-lsgemm -ldgemm -lblas"
  9719. else
  9720. echo "$ac_t""no" 1>&6
  9721. fi
  9722. else
  9723. echo "$ac_t""no" 1>&6
  9724. fi
  9725. else
  9726. echo "$ac_t""no" 1>&6
  9727. fi
  9728. fi
  9729. # BLAS in Sun Performance library?
  9730. if test $blas_ok = no; then
  9731. if test "x$GCC" != xyes; then # only works with Sun CC
  9732. echo $ac_n "checking for acosp in -lsunmath""... $ac_c" 1>&6
  9733. echo "configure:12253: checking for acosp in -lsunmath" >&5
  9734. ac_lib_var=`echo sunmath'_'acosp | sed 'y%./+-%__p_%'`
  9735. ac_save_LIBS="$LIBS"
  9736. LIBS="-lsunmath $LIBS"
  9737. cat > conftest.$ac_ext <<EOF
  9738. #line 12259 "configure"
  9739. #include "confdefs.h"
  9740. /* Override any gcc2 internal prototype to avoid an error. */
  9741. /* We use char because int might match the return type of a gcc2
  9742. builtin and then its argument prototype would still apply. */
  9743. char acosp();
  9744. int main() {
  9745. acosp()
  9746. ; return 0; }
  9747. EOF
  9748. if { (eval echo configure:12270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9749. rm -rf conftest*
  9750. eval "ac_cv_lib_$ac_lib_var=yes"
  9751. else
  9752. echo "configure: failed program was:" >&5
  9753. cat conftest.$ac_ext >&5
  9754. rm -rf conftest*
  9755. eval "ac_cv_lib_$ac_lib_var=no"
  9756. fi
  9757. rm -f conftest*
  9758. LIBS="$ac_save_LIBS"
  9759. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9760. echo "$ac_t""yes" 1>&6
  9761. echo $ac_n "checking for sgemm_ in -lsunperf""... $ac_c" 1>&6
  9762. echo "configure:12285: checking for sgemm_ in -lsunperf" >&5
  9763. ac_lib_var=`echo sunperf'_'sgemm_ | sed 'y%./+-%__p_%'`
  9764. ac_save_LIBS="$LIBS"
  9765. LIBS="-lsunperf -lsunmath $LIBS"
  9766. cat > conftest.$ac_ext <<EOF
  9767. #line 12291 "configure"
  9768. #include "confdefs.h"
  9769. /* Override any gcc2 internal prototype to avoid an error. */
  9770. /* We use char because int might match the return type of a gcc2
  9771. builtin and then its argument prototype would still apply. */
  9772. char sgemm_();
  9773. int main() {
  9774. sgemm_()
  9775. ; return 0; }
  9776. EOF
  9777. if { (eval echo configure:12302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9778. rm -rf conftest*
  9779. eval "ac_cv_lib_$ac_lib_var=yes"
  9780. else
  9781. echo "configure: failed program was:" >&5
  9782. cat conftest.$ac_ext >&5
  9783. rm -rf conftest*
  9784. eval "ac_cv_lib_$ac_lib_var=no"
  9785. fi
  9786. rm -f conftest*
  9787. LIBS="$ac_save_LIBS"
  9788. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9789. echo "$ac_t""yes" 1>&6
  9790. blas_ok=yes; BLASLIB="-xlic_lib=sunperf -lsunmath"
  9791. else
  9792. echo "$ac_t""no" 1>&6
  9793. fi
  9794. else
  9795. echo "$ac_t""no" 1>&6
  9796. fi
  9797. fi
  9798. fi
  9799. # Generic BLAS library
  9800. if test $blas_ok = no; then
  9801. echo $ac_n "checking for sgemm_ in -lblas""... $ac_c" 1>&6
  9802. echo "configure:12332: checking for sgemm_ in -lblas" >&5
  9803. ac_lib_var=`echo blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  9804. ac_save_LIBS="$LIBS"
  9805. LIBS="-lblas $LIBS"
  9806. cat > conftest.$ac_ext <<EOF
  9807. #line 12338 "configure"
  9808. #include "confdefs.h"
  9809. /* Override any gcc2 internal prototype to avoid an error. */
  9810. /* We use char because int might match the return type of a gcc2
  9811. builtin and then its argument prototype would still apply. */
  9812. char sgemm_();
  9813. int main() {
  9814. sgemm_()
  9815. ; return 0; }
  9816. EOF
  9817. if { (eval echo configure:12349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9818. rm -rf conftest*
  9819. eval "ac_cv_lib_$ac_lib_var=yes"
  9820. else
  9821. echo "configure: failed program was:" >&5
  9822. cat conftest.$ac_ext >&5
  9823. rm -rf conftest*
  9824. eval "ac_cv_lib_$ac_lib_var=no"
  9825. fi
  9826. rm -f conftest*
  9827. LIBS="$ac_save_LIBS"
  9828. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9829. echo "$ac_t""yes" 1>&6
  9830. blas_ok=yes; BLASLIB="-lblas"
  9831. else
  9832. echo "$ac_t""no" 1>&6
  9833. fi
  9834. fi
  9835. if test $blas_ok = yes; then
  9836. cat >> confdefs.h <<\EOF
  9837. #define HAVE_LIBBLAS 1
  9838. EOF
  9839. fi
  9840. fi # $USE_BLAS
  9841. # Done checking BLAS
  9842. # Enable LAPACK option
  9843. echo $ac_n "checking whether to use LAPACK""... $ac_c" 1>&6
  9844. echo "configure:12388: checking whether to use LAPACK" >&5
  9845. echo "$ac_t"""$with_lapack"" 1>&6
  9846. case "$with_lapack" in
  9847. "no") USE_LAPACK= ;;
  9848. "yes") USE_LAPACK="1" ;;
  9849. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9850. esac
  9851. LAPACKLIB=
  9852. LAPACKINC=
  9853. # LAPACK is useless without BLAS
  9854. if test -n "$USE_BLAS"; then
  9855. if test -n "$USE_LAPACK"; then
  9856. # With LAPACK includes directory
  9857. # LAPACK doesn't have includes (FORTRAN library)
  9858. # With LAPACK library directory
  9859. lapack_ok=no
  9860. echo $ac_n "checking for location of LAPACK includes""... $ac_c" 1>&6
  9861. echo "configure:12413: checking for location of LAPACK includes" >&5
  9862. case "$with_lapack_includes" in
  9863. y | ye | yes | n | no)
  9864. { echo "configure: error: *** You must supply a directory to --with-lapack-includes." 1>&2; exit 1; }
  9865. ;;
  9866. esac
  9867. echo "$ac_t""$with_lapack_includes" 1>&6
  9868. if test -n "$with_lapack_includes" ; then
  9869. for dir in $with_lapack_includes; do
  9870. if test -d "$dir"; then
  9871. LAPACKINC="$LAPACKINC -I$dir"
  9872. else
  9873. { echo "configure: error: *** LAPACK includes directory $dir does not exist." 1>&2; exit 1; }
  9874. fi
  9875. done
  9876. fi
  9877. echo $ac_n "checking for location of LAPACK library""... $ac_c" 1>&6
  9878. echo "configure:12433: checking for location of LAPACK library" >&5
  9879. case "$with_lapack_libs" in
  9880. y | ye | yes | n | no)
  9881. { echo "configure: error: *** You must supply a directory to --with-lapack-libs." 1>&2; exit 1; }
  9882. ;;
  9883. esac
  9884. echo "$ac_t""$with_lapack_libs" 1>&6
  9885. if test -n "$with_lapack_libs"; then
  9886. for dir in $with_lapack_libs; do
  9887. if test -d "$dir"; then
  9888. LAPACKLIB="$LAPACKLIB -L$dir"
  9889. else
  9890. { echo "configure: error: *** LAPACK library directory $dir does not exist." 1>&2; exit 1; }
  9891. fi
  9892. done
  9893. fi
  9894. # See if clapack.h exists (ATLAS)
  9895. save_CPPFLAGS="$CPPFLAGS"
  9896. CPPFLAGS="$LAPACKINC $CPPFLAGS"
  9897. for ac_hdr in clapack.h
  9898. do
  9899. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9900. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9901. echo "configure:12459: checking for $ac_hdr" >&5
  9902. cat > conftest.$ac_ext <<EOF
  9903. #line 12462 "configure"
  9904. #include "confdefs.h"
  9905. #include <$ac_hdr>
  9906. EOF
  9907. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9908. { (eval echo configure:12467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9909. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9910. if test -z "$ac_err"; then
  9911. rm -rf conftest*
  9912. eval "ac_cv_header_$ac_safe=yes"
  9913. else
  9914. echo "$ac_err" >&5
  9915. echo "configure: failed program was:" >&5
  9916. cat conftest.$ac_ext >&5
  9917. rm -rf conftest*
  9918. eval "ac_cv_header_$ac_safe=no"
  9919. fi
  9920. rm -f conftest*
  9921. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9922. echo "$ac_t""yes" 1>&6
  9923. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9924. cat >> confdefs.h <<EOF
  9925. #define $ac_tr_hdr 1
  9926. EOF
  9927. else
  9928. echo "$ac_t""no" 1>&6
  9929. fi
  9930. done
  9931. CPPFLAGS="$save_CPPFLAGS"
  9932. # LAPACK linked to by default?
  9933. if test lapack_ok=no; then
  9934. save_LIBS="$LIBS"; LIBS="$LIBS $BLASLIB $MATHLIB $FLIBS"
  9935. save_LDFLAGS="$LDFLAGS"; LDFLAGS="$LAPACKLIB $LDFLAGS"
  9936. echo $ac_n "checking for dsegv_""... $ac_c" 1>&6
  9937. echo "configure:12499: checking for dsegv_" >&5
  9938. cat > conftest.$ac_ext <<EOF
  9939. #line 12502 "configure"
  9940. #include "confdefs.h"
  9941. /* System header to define __stub macros and hopefully few prototypes,
  9942. which can conflict with char dsegv_(); below. */
  9943. #include <assert.h>
  9944. /* Override any gcc2 internal prototype to avoid an error. */
  9945. /* We use char because int might match the return type of a gcc2
  9946. builtin and then its argument prototype would still apply. */
  9947. char dsegv_();
  9948. int main() {
  9949. /* The GNU C library defines this for functions which it implements
  9950. to always fail with ENOSYS. Some functions are actually named
  9951. something starting with __ and the normal name is an alias. */
  9952. #if defined (__stub_dsegv_) || defined (__stub___dsegv_)
  9953. choke me
  9954. #else
  9955. dsegv_();
  9956. #endif
  9957. ; return 0; }
  9958. EOF
  9959. if { (eval echo configure:12525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9960. rm -rf conftest*
  9961. eval "ac_cv_func_dsegv_=yes"
  9962. else
  9963. echo "configure: failed program was:" >&5
  9964. cat conftest.$ac_ext >&5
  9965. rm -rf conftest*
  9966. eval "ac_cv_func_dsegv_=no"
  9967. fi
  9968. rm -f conftest*
  9969. if eval "test \"`echo '$ac_cv_func_'dsegv_`\" = yes"; then
  9970. echo "$ac_t""yes" 1>&6
  9971. lapack_ok=yes
  9972. else
  9973. echo "$ac_t""no" 1>&6
  9974. fi
  9975. LIBS="$save_LIBS"
  9976. LDFLAGS="$save_LDFLAGS"
  9977. fi
  9978. # Generic LAPACK library?
  9979. if test $lapack_ok = no; then
  9980. save_libs="$LIBS"; LIBS="$BLASLIB $MATHLIB $LIBS"
  9981. save_LDFLAGS="$LDFLAGS"; LDFLAGS="$LAPACKLIB $LDFLAGS"
  9982. echo $ac_n "checking for desgv_ in -llapack""... $ac_c" 1>&6
  9983. echo "configure:12552: checking for desgv_ in -llapack" >&5
  9984. ac_lib_var=`echo lapack'_'desgv_ | sed 'y%./+-%__p_%'`
  9985. ac_save_LIBS="$LIBS"
  9986. LIBS="-llapack $FLIBS $LIBS"
  9987. cat > conftest.$ac_ext <<EOF
  9988. #line 12558 "configure"
  9989. #include "confdefs.h"
  9990. /* Override any gcc2 internal prototype to avoid an error. */
  9991. /* We use char because int might match the return type of a gcc2
  9992. builtin and then its argument prototype would still apply. */
  9993. char desgv_();
  9994. int main() {
  9995. desgv_()
  9996. ; return 0; }
  9997. EOF
  9998. if { (eval echo configure:12569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9999. rm -rf conftest*
  10000. eval "ac_cv_lib_$ac_lib_var=yes"
  10001. else
  10002. echo "configure: failed program was:" >&5
  10003. cat conftest.$ac_ext >&5
  10004. rm -rf conftest*
  10005. eval "ac_cv_lib_$ac_lib_var=no"
  10006. fi
  10007. rm -f conftest*
  10008. LIBS="$ac_save_LIBS"
  10009. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10010. echo "$ac_t""yes" 1>&6
  10011. lapack_ok=yes; LAPACKLIB="-llapack"
  10012. else
  10013. echo "$ac_t""no" 1>&6
  10014. fi
  10015. LIBS="$save_LIBS"
  10016. LDFLAGS="$save_LDFLAGS"
  10017. fi
  10018. if test $lapack_ok = no; then
  10019. ac_save_ldflags="$LDFLAGS"
  10020. LDFLAGS="$LAPACKLIB $LDFLAGS"
  10021. echo $ac_n "checking for dgesv_ in -llapack""... $ac_c" 1>&6
  10022. echo "configure:12601: checking for dgesv_ in -llapack" >&5
  10023. ac_lib_var=`echo lapack'_'dgesv_ | sed 'y%./+-%__p_%'`
  10024. ac_save_LIBS="$LIBS"
  10025. LIBS="-llapack $BLASLIB $MATHLIB $LIBS"
  10026. cat > conftest.$ac_ext <<EOF
  10027. #line 12607 "configure"
  10028. #include "confdefs.h"
  10029. /* Override any gcc2 internal prototype to avoid an error. */
  10030. /* We use char because int might match the return type of a gcc2
  10031. builtin and then its argument prototype would still apply. */
  10032. char dgesv_();
  10033. int main() {
  10034. dgesv_()
  10035. ; return 0; }
  10036. EOF
  10037. if { (eval echo configure:12618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10038. rm -rf conftest*
  10039. eval "ac_cv_lib_$ac_lib_var=yes"
  10040. else
  10041. echo "configure: failed program was:" >&5
  10042. cat conftest.$ac_ext >&5
  10043. rm -rf conftest*
  10044. eval "ac_cv_lib_$ac_lib_var=no"
  10045. fi
  10046. rm -f conftest*
  10047. LIBS="$ac_save_LIBS"
  10048. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10049. echo "$ac_t""yes" 1>&6
  10050. LAPACKLIB="$LAPACKLIB -llapack "
  10051. else
  10052. echo "$ac_t""no" 1>&6
  10053. echo $ac_n "checking for dgesv_ in -llapack""... $ac_c" 1>&6
  10054. echo "configure:12637: checking for dgesv_ in -llapack" >&5
  10055. ac_lib_var=`echo lapack'_'dgesv_ | sed 'y%./+-%__p_%'`
  10056. ac_save_LIBS="$LIBS"
  10057. LIBS="-llapack $BLASLIB $MATHLIB -lg2c $LIBS"
  10058. cat > conftest.$ac_ext <<EOF
  10059. #line 12643 "configure"
  10060. #include "confdefs.h"
  10061. /* Override any gcc2 internal prototype to avoid an error. */
  10062. /* We use char because int might match the return type of a gcc2
  10063. builtin and then its argument prototype would still apply. */
  10064. char dgesv_();
  10065. int main() {
  10066. dgesv_()
  10067. ; return 0; }
  10068. EOF
  10069. if { (eval echo configure:12654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10070. rm -rf conftest*
  10071. eval "ac_cv_lib_$ac_lib_var=yes"
  10072. else
  10073. echo "configure: failed program was:" >&5
  10074. cat conftest.$ac_ext >&5
  10075. rm -rf conftest*
  10076. eval "ac_cv_lib_$ac_lib_var=no"
  10077. fi
  10078. rm -f conftest*
  10079. LIBS="$ac_save_LIBS"
  10080. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10081. echo "$ac_t""yes" 1>&6
  10082. LAPACKLIB="$LAPACKLIB -llapack -lg2c"
  10083. else
  10084. echo "$ac_t""no" 1>&6
  10085. LDFLAGS=${ac_save_ldflags}
  10086. { echo "configure: error: *** Unable to locate LAPACK library." 1>&2; exit 1; }
  10087. fi
  10088. fi
  10089. LDFLAGS=${ac_save_ldflags}
  10090. fi
  10091. cat >> confdefs.h <<\EOF
  10092. #define HAVE_LIBLAPACK 1
  10093. EOF
  10094. fi # $USE_LAPACK
  10095. fi # $USE_BLAS
  10096. # Done checking LAPACK
  10097. # Enable Cairo display driver option
  10098. echo $ac_n "checking whether to use Cairo""... $ac_c" 1>&6
  10099. echo "configure:12710: checking whether to use Cairo" >&5
  10100. echo "$ac_t"""$with_cairo"" 1>&6
  10101. case "$with_cairo" in
  10102. "no") USE_CAIRO= ;;
  10103. "yes") USE_CAIRO="1" ;;
  10104. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10105. esac
  10106. CAIROINC=
  10107. CAIROLIB=
  10108. if test -n "$USE_CAIRO"; then
  10109. cairo="cairo"
  10110. pkgs="cairo-ft cairo-fc cairo-pdf cairo-ps cairo-svg"
  10111. if test -n "$USE_X11"; then
  10112. pkgs="$pkgs cairo-xlib cairo-xlib-xrender"
  10113. fi
  10114. for pkg in $pkgs ; do
  10115. if pkg-config --exists $pkg ; then
  10116. cairo="$cairo $pkg"
  10117. fi
  10118. done
  10119. # With Cairo includes directory
  10120. #FIXME: somehow quote dirs with spaces in $cairo ?
  10121. CAIROINC=`pkg-config --cflags $cairo`
  10122. echo $ac_n "checking for location of cairo includes""... $ac_c" 1>&6
  10123. echo "configure:12742: checking for location of cairo includes" >&5
  10124. case "$with_cairo_includes" in
  10125. y | ye | yes | n | no)
  10126. { echo "configure: error: *** You must supply a directory to --with-cairo-includes." 1>&2; exit 1; }
  10127. ;;
  10128. esac
  10129. echo "$ac_t""$with_cairo_includes" 1>&6
  10130. if test -n "$with_cairo_includes" ; then
  10131. for dir in $with_cairo_includes; do
  10132. if test -d "$dir"; then
  10133. CAIROINC="$CAIROINC -I$dir"
  10134. else
  10135. { echo "configure: error: *** cairo includes directory $dir does not exist." 1>&2; exit 1; }
  10136. fi
  10137. done
  10138. fi
  10139. ac_save_cppflags="$CPPFLAGS"
  10140. CPPFLAGS="$CAIROINC $CPPFLAGS"
  10141. for ac_hdr in cairo.h
  10142. do
  10143. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10144. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10145. echo "configure:12768: checking for $ac_hdr" >&5
  10146. cat > conftest.$ac_ext <<EOF
  10147. #line 12771 "configure"
  10148. #include "confdefs.h"
  10149. #include <$ac_hdr>
  10150. EOF
  10151. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10152. { (eval echo configure:12776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10153. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10154. if test -z "$ac_err"; then
  10155. rm -rf conftest*
  10156. eval "ac_cv_header_$ac_safe=yes"
  10157. else
  10158. echo "$ac_err" >&5
  10159. echo "configure: failed program was:" >&5
  10160. cat conftest.$ac_ext >&5
  10161. rm -rf conftest*
  10162. eval "ac_cv_header_$ac_safe=no"
  10163. fi
  10164. rm -f conftest*
  10165. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10166. echo "$ac_t""yes" 1>&6
  10167. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10168. cat >> confdefs.h <<EOF
  10169. #define $ac_tr_hdr 1
  10170. EOF
  10171. else
  10172. echo "$ac_t""no" 1>&6
  10173. { echo "configure: error: *** Unable to locate Cairo includes." 1>&2; exit 1; }
  10174. fi
  10175. done
  10176. CPPFLAGS=$ac_save_cppflags
  10177. # With Cairo library directory
  10178. CAIROLIB=`pkg-config --libs $cairo`
  10179. echo $ac_n "checking for location of cairo library""... $ac_c" 1>&6
  10180. echo "configure:12812: checking for location of cairo library" >&5
  10181. case "$with_cairo_libs" in
  10182. y | ye | yes | n | no)
  10183. { echo "configure: error: *** You must supply a directory to --with-cairo-libs." 1>&2; exit 1; }
  10184. ;;
  10185. esac
  10186. echo "$ac_t""$with_cairo_libs" 1>&6
  10187. if test -n "$with_cairo_libs"; then
  10188. for dir in $with_cairo_libs; do
  10189. if test -d "$dir"; then
  10190. CAIROLIB="$CAIROLIB -L$dir"
  10191. else
  10192. { echo "configure: error: *** cairo library directory $dir does not exist." 1>&2; exit 1; }
  10193. fi
  10194. done
  10195. fi
  10196. echo $ac_n "checking for cairo linking flags""... $ac_c" 1>&6
  10197. echo "configure:12832: checking for cairo linking flags" >&5
  10198. case "$with_cairo_ldflags" in
  10199. y | ye | yes | n | no)
  10200. { echo "configure: error: *** You must supply a directory to --with-cairo-ldflags." 1>&2; exit 1; }
  10201. ;;
  10202. esac
  10203. echo "$ac_t""$with_cairo_ldflags" 1>&6
  10204. CAIROLIB="$CAIROLIB $with_cairo_ldflags"
  10205. ac_save_libs="$LIBS"
  10206. ac_save_ldflags="$LDFLAGS"
  10207. LIBS=" $CAIROLIB $LIBS"
  10208. LDFLAGS=" $LDFLAGS"
  10209. echo $ac_n "checking for cairo_create""... $ac_c" 1>&6
  10210. echo "configure:12848: checking for cairo_create" >&5
  10211. cat > conftest.$ac_ext <<EOF
  10212. #line 12851 "configure"
  10213. #include "confdefs.h"
  10214. /* System header to define __stub macros and hopefully few prototypes,
  10215. which can conflict with char cairo_create(); below. */
  10216. #include <assert.h>
  10217. /* Override any gcc2 internal prototype to avoid an error. */
  10218. /* We use char because int might match the return type of a gcc2
  10219. builtin and then its argument prototype would still apply. */
  10220. char cairo_create();
  10221. int main() {
  10222. /* The GNU C library defines this for functions which it implements
  10223. to always fail with ENOSYS. Some functions are actually named
  10224. something starting with __ and the normal name is an alias. */
  10225. #if defined (__stub_cairo_create) || defined (__stub___cairo_create)
  10226. choke me
  10227. #else
  10228. cairo_create();
  10229. #endif
  10230. ; return 0; }
  10231. EOF
  10232. if { (eval echo configure:12874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10233. rm -rf conftest*
  10234. eval "ac_cv_func_cairo_create=yes"
  10235. else
  10236. echo "configure: failed program was:" >&5
  10237. cat conftest.$ac_ext >&5
  10238. rm -rf conftest*
  10239. eval "ac_cv_func_cairo_create=no"
  10240. fi
  10241. rm -f conftest*
  10242. if eval "test \"`echo '$ac_cv_func_'cairo_create`\" = yes"; then
  10243. echo "$ac_t""yes" 1>&6
  10244. :
  10245. else
  10246. echo "$ac_t""no" 1>&6
  10247. { echo "configure: error: *** Unable to locate cairo_create." 1>&2; exit 1; }
  10248. fi
  10249. LIBS=${ac_save_libs}
  10250. LDFLAGS=${ac_save_ldflags}
  10251. ac_save_libs="$LIBS"
  10252. ac_save_ldflags="$LDFLAGS"
  10253. LIBS=" $CAIROLIB $LIBS"
  10254. LDFLAGS=" $LDFLAGS"
  10255. echo $ac_n "checking for cairo_xlib_surface_create_with_xrender_format""... $ac_c" 1>&6
  10256. echo "configure:12908: checking for cairo_xlib_surface_create_with_xrender_format" >&5
  10257. cat > conftest.$ac_ext <<EOF
  10258. #line 12911 "configure"
  10259. #include "confdefs.h"
  10260. /* System header to define __stub macros and hopefully few prototypes,
  10261. which can conflict with char cairo_xlib_surface_create_with_xrender_format(); below. */
  10262. #include <assert.h>
  10263. /* Override any gcc2 internal prototype to avoid an error. */
  10264. /* We use char because int might match the return type of a gcc2
  10265. builtin and then its argument prototype would still apply. */
  10266. char cairo_xlib_surface_create_with_xrender_format();
  10267. int main() {
  10268. /* The GNU C library defines this for functions which it implements
  10269. to always fail with ENOSYS. Some functions are actually named
  10270. something starting with __ and the normal name is an alias. */
  10271. #if defined (__stub_cairo_xlib_surface_create_with_xrender_format) || defined (__stub___cairo_xlib_surface_create_with_xrender_format)
  10272. choke me
  10273. #else
  10274. cairo_xlib_surface_create_with_xrender_format();
  10275. #endif
  10276. ; return 0; }
  10277. EOF
  10278. if { (eval echo configure:12934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10279. rm -rf conftest*
  10280. eval "ac_cv_func_cairo_xlib_surface_create_with_xrender_format=yes"
  10281. else
  10282. echo "configure: failed program was:" >&5
  10283. cat conftest.$ac_ext >&5
  10284. rm -rf conftest*
  10285. eval "ac_cv_func_cairo_xlib_surface_create_with_xrender_format=no"
  10286. fi
  10287. rm -f conftest*
  10288. if eval "test \"`echo '$ac_cv_func_'cairo_xlib_surface_create_with_xrender_format`\" = yes"; then
  10289. echo "$ac_t""yes" 1>&6
  10290. CAIRO_HAS_XRENDER=1
  10291. else
  10292. echo "$ac_t""no" 1>&6
  10293. CAIRO_HAS_XRENDER=
  10294. fi
  10295. LIBS=${ac_save_libs}
  10296. LDFLAGS=${ac_save_ldflags}
  10297. ac_save_libs="$LIBS"
  10298. ac_save_ldflags="$LDFLAGS"
  10299. LIBS=" $CAIROLIB $LIBS"
  10300. LDFLAGS=" $LDFLAGS"
  10301. echo $ac_n "checking for cairo_xlib_surface_get_xrender_format""... $ac_c" 1>&6
  10302. echo "configure:12967: checking for cairo_xlib_surface_get_xrender_format" >&5
  10303. cat > conftest.$ac_ext <<EOF
  10304. #line 12970 "configure"
  10305. #include "confdefs.h"
  10306. /* System header to define __stub macros and hopefully few prototypes,
  10307. which can conflict with char cairo_xlib_surface_get_xrender_format(); below. */
  10308. #include <assert.h>
  10309. /* Override any gcc2 internal prototype to avoid an error. */
  10310. /* We use char because int might match the return type of a gcc2
  10311. builtin and then its argument prototype would still apply. */
  10312. char cairo_xlib_surface_get_xrender_format();
  10313. int main() {
  10314. /* The GNU C library defines this for functions which it implements
  10315. to always fail with ENOSYS. Some functions are actually named
  10316. something starting with __ and the normal name is an alias. */
  10317. #if defined (__stub_cairo_xlib_surface_get_xrender_format) || defined (__stub___cairo_xlib_surface_get_xrender_format)
  10318. choke me
  10319. #else
  10320. cairo_xlib_surface_get_xrender_format();
  10321. #endif
  10322. ; return 0; }
  10323. EOF
  10324. if { (eval echo configure:12993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10325. rm -rf conftest*
  10326. eval "ac_cv_func_cairo_xlib_surface_get_xrender_format=yes"
  10327. else
  10328. echo "configure: failed program was:" >&5
  10329. cat conftest.$ac_ext >&5
  10330. rm -rf conftest*
  10331. eval "ac_cv_func_cairo_xlib_surface_get_xrender_format=no"
  10332. fi
  10333. rm -f conftest*
  10334. if eval "test \"`echo '$ac_cv_func_'cairo_xlib_surface_get_xrender_format`\" = yes"; then
  10335. echo "$ac_t""yes" 1>&6
  10336. CAIRO_HAS_XRENDER_SURFACE=1
  10337. else
  10338. echo "$ac_t""no" 1>&6
  10339. CAIRO_HAS_XRENDER_SURFACE=
  10340. fi
  10341. LIBS=${ac_save_libs}
  10342. LDFLAGS=${ac_save_ldflags}
  10343. CAIROLIB="$CAIROLIB $CAIROLDFLAGS"
  10344. fi # $USE_CAIRO
  10345. # Done checking Cairo
  10346. # Enable FreeType option
  10347. echo $ac_n "checking whether to use FreeType""... $ac_c" 1>&6
  10348. echo "configure:13035: checking whether to use FreeType" >&5
  10349. echo "$ac_t"""$with_freetype"" 1>&6
  10350. case "$with_freetype" in
  10351. "no") USE_FREETYPE= ;;
  10352. "yes") USE_FREETYPE="1" ;;
  10353. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10354. esac
  10355. FTINC=
  10356. FTLIB=
  10357. if test -n "$USE_FREETYPE"; then
  10358. # With FreeType includes directory
  10359. echo $ac_n "checking for location of FreeType includes""... $ac_c" 1>&6
  10360. echo "configure:13054: checking for location of FreeType includes" >&5
  10361. case "$with_freetype_includes" in
  10362. y | ye | yes | n | no)
  10363. { echo "configure: error: *** You must supply a directory to --with-freetype-includes." 1>&2; exit 1; }
  10364. ;;
  10365. esac
  10366. echo "$ac_t""$with_freetype_includes" 1>&6
  10367. if test -n "$with_freetype_includes" ; then
  10368. for dir in $with_freetype_includes; do
  10369. if test -d "$dir"; then
  10370. FTINC="$FTINC -I$dir"
  10371. else
  10372. { echo "configure: error: *** FreeType includes directory $dir does not exist." 1>&2; exit 1; }
  10373. fi
  10374. done
  10375. fi
  10376. ac_save_cppflags="$CPPFLAGS"
  10377. CPPFLAGS="$FTINC $CPPFLAGS"
  10378. for ac_hdr in ft2build.h
  10379. do
  10380. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10381. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10382. echo "configure:13080: checking for $ac_hdr" >&5
  10383. cat > conftest.$ac_ext <<EOF
  10384. #line 13083 "configure"
  10385. #include "confdefs.h"
  10386. #include <$ac_hdr>
  10387. EOF
  10388. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10389. { (eval echo configure:13088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10390. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10391. if test -z "$ac_err"; then
  10392. rm -rf conftest*
  10393. eval "ac_cv_header_$ac_safe=yes"
  10394. else
  10395. echo "$ac_err" >&5
  10396. echo "configure: failed program was:" >&5
  10397. cat conftest.$ac_ext >&5
  10398. rm -rf conftest*
  10399. eval "ac_cv_header_$ac_safe=no"
  10400. fi
  10401. rm -f conftest*
  10402. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10403. echo "$ac_t""yes" 1>&6
  10404. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10405. cat >> confdefs.h <<EOF
  10406. #define $ac_tr_hdr 1
  10407. EOF
  10408. else
  10409. echo "$ac_t""no" 1>&6
  10410. { echo "configure: error: *** Unable to locate FreeType includes." 1>&2; exit 1; }
  10411. fi
  10412. done
  10413. CPPFLAGS=$ac_save_cppflags
  10414. # With FreeType library directory
  10415. echo $ac_n "checking for location of FreeType library""... $ac_c" 1>&6
  10416. echo "configure:13122: checking for location of FreeType library" >&5
  10417. case "$with_freetype_libs" in
  10418. y | ye | yes | n | no)
  10419. { echo "configure: error: *** You must supply a directory to --with-freetype-libs." 1>&2; exit 1; }
  10420. ;;
  10421. esac
  10422. echo "$ac_t""$with_freetype_libs" 1>&6
  10423. if test -n "$with_freetype_libs"; then
  10424. for dir in $with_freetype_libs; do
  10425. if test -d "$dir"; then
  10426. FTLIB="$FTLIB -L$dir"
  10427. else
  10428. { echo "configure: error: *** FreeType library directory $dir does not exist." 1>&2; exit 1; }
  10429. fi
  10430. done
  10431. fi
  10432. ac_save_ldflags="$LDFLAGS"
  10433. LDFLAGS="$FTLIB $LDFLAGS"
  10434. echo $ac_n "checking for FT_Init_FreeType in -lfreetype""... $ac_c" 1>&6
  10435. echo "configure:13147: checking for FT_Init_FreeType in -lfreetype" >&5
  10436. ac_lib_var=`echo freetype'_'FT_Init_FreeType | sed 'y%./+-%__p_%'`
  10437. ac_save_LIBS="$LIBS"
  10438. LIBS="-lfreetype $LIBS"
  10439. cat > conftest.$ac_ext <<EOF
  10440. #line 13153 "configure"
  10441. #include "confdefs.h"
  10442. /* Override any gcc2 internal prototype to avoid an error. */
  10443. /* We use char because int might match the return type of a gcc2
  10444. builtin and then its argument prototype would still apply. */
  10445. char FT_Init_FreeType();
  10446. int main() {
  10447. FT_Init_FreeType()
  10448. ; return 0; }
  10449. EOF
  10450. if { (eval echo configure:13164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10451. rm -rf conftest*
  10452. eval "ac_cv_lib_$ac_lib_var=yes"
  10453. else
  10454. echo "configure: failed program was:" >&5
  10455. cat conftest.$ac_ext >&5
  10456. rm -rf conftest*
  10457. eval "ac_cv_lib_$ac_lib_var=no"
  10458. fi
  10459. rm -f conftest*
  10460. LIBS="$ac_save_LIBS"
  10461. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10462. echo "$ac_t""yes" 1>&6
  10463. FTLIB="$FTLIB -lfreetype "
  10464. else
  10465. echo "$ac_t""no" 1>&6
  10466. LDFLAGS=${ac_save_ldflags}
  10467. { echo "configure: error: *** Unable to locate FreeType library." 1>&2; exit 1; }
  10468. fi
  10469. LDFLAGS=${ac_save_ldflags}
  10470. fi # $USE_FREETYPE
  10471. # Done checking FreeType
  10472. # Enable NLS option
  10473. echo $ac_n "checking whether to use NLS""... $ac_c" 1>&6
  10474. echo "configure:13205: checking whether to use NLS" >&5
  10475. echo "$ac_t"""$with_nls"" 1>&6
  10476. case "$with_nls" in
  10477. "no") USE_NLS= ;;
  10478. "yes") USE_NLS="1" ;;
  10479. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10480. esac
  10481. INTLLIB=
  10482. HAVE_NLS=
  10483. if test -n "${USE_NLS}" ; then
  10484. cat >> confdefs.h <<\EOF
  10485. #define USE_NLS 1
  10486. EOF
  10487. echo $ac_n "checking for gettext""... $ac_c" 1>&6
  10488. echo "configure:13225: checking for gettext" >&5
  10489. cat > conftest.$ac_ext <<EOF
  10490. #line 13228 "configure"
  10491. #include "confdefs.h"
  10492. /* System header to define __stub macros and hopefully few prototypes,
  10493. which can conflict with char gettext(); below. */
  10494. #include <assert.h>
  10495. /* Override any gcc2 internal prototype to avoid an error. */
  10496. /* We use char because int might match the return type of a gcc2
  10497. builtin and then its argument prototype would still apply. */
  10498. char gettext();
  10499. int main() {
  10500. /* The GNU C library defines this for functions which it implements
  10501. to always fail with ENOSYS. Some functions are actually named
  10502. something starting with __ and the normal name is an alias. */
  10503. #if defined (__stub_gettext) || defined (__stub___gettext)
  10504. choke me
  10505. #else
  10506. gettext();
  10507. #endif
  10508. ; return 0; }
  10509. EOF
  10510. if { (eval echo configure:13251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10511. rm -rf conftest*
  10512. eval "ac_cv_func_gettext=yes"
  10513. else
  10514. echo "configure: failed program was:" >&5
  10515. cat conftest.$ac_ext >&5
  10516. rm -rf conftest*
  10517. eval "ac_cv_func_gettext=no"
  10518. fi
  10519. rm -f conftest*
  10520. if eval "test \"`echo '$ac_cv_func_'gettext`\" = yes"; then
  10521. echo "$ac_t""yes" 1>&6
  10522. INTLLIB=
  10523. else
  10524. echo "$ac_t""no" 1>&6
  10525. echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
  10526. echo "configure:13269: checking for gettext in -lintl" >&5
  10527. ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
  10528. ac_save_LIBS="$LIBS"
  10529. LIBS="-lintl $LIBS"
  10530. cat > conftest.$ac_ext <<EOF
  10531. #line 13275 "configure"
  10532. #include "confdefs.h"
  10533. /* Override any gcc2 internal prototype to avoid an error. */
  10534. /* We use char because int might match the return type of a gcc2
  10535. builtin and then its argument prototype would still apply. */
  10536. char gettext();
  10537. int main() {
  10538. gettext()
  10539. ; return 0; }
  10540. EOF
  10541. if { (eval echo configure:13286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10542. rm -rf conftest*
  10543. eval "ac_cv_lib_$ac_lib_var=yes"
  10544. else
  10545. echo "configure: failed program was:" >&5
  10546. cat conftest.$ac_ext >&5
  10547. rm -rf conftest*
  10548. eval "ac_cv_lib_$ac_lib_var=no"
  10549. fi
  10550. rm -f conftest*
  10551. LIBS="$ac_save_LIBS"
  10552. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10553. echo "$ac_t""yes" 1>&6
  10554. INTLLIB=-lintl
  10555. else
  10556. echo "$ac_t""no" 1>&6
  10557. { echo "configure: error: *** Unable to locate gettext() function." 1>&2; exit 1; }
  10558. fi
  10559. fi
  10560. HAVE_NLS=1
  10561. fi
  10562. # Enable C++ option
  10563. echo $ac_n "checking whether to use C++""... $ac_c" 1>&6
  10564. echo "configure:13321: checking whether to use C++" >&5
  10565. echo "$ac_t"""$with_cxx"" 1>&6
  10566. case "$with_cxx" in
  10567. "no") USE_CXX= ;;
  10568. "yes") USE_CXX="1" ;;
  10569. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10570. esac
  10571. if test -n "$USE_CXX"; then
  10572. for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
  10573. do
  10574. # Extract the first word of "$ac_prog", so it can be a program name with args.
  10575. set dummy $ac_prog; ac_word=$2
  10576. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  10577. echo "configure:13337: checking for $ac_word" >&5
  10578. if test -n "$CXX"; then
  10579. ac_cv_prog_CXX="$CXX" # Let the user override the test.
  10580. else
  10581. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  10582. ac_dummy="$PATH"
  10583. for ac_dir in $ac_dummy; do
  10584. test -z "$ac_dir" && ac_dir=.
  10585. if test -f $ac_dir/$ac_word; then
  10586. ac_cv_prog_CXX="$ac_prog"
  10587. break
  10588. fi
  10589. done
  10590. IFS="$ac_save_ifs"
  10591. fi
  10592. CXX="$ac_cv_prog_CXX"
  10593. if test -n "$CXX"; then
  10594. echo "$ac_t""$CXX" 1>&6
  10595. else
  10596. echo "$ac_t""no" 1>&6
  10597. fi
  10598. test -n "$CXX" && break
  10599. done
  10600. test -n "$CXX" || CXX="gcc"
  10601. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  10602. echo "configure:13366: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
  10603. ac_ext=C
  10604. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  10605. ac_cpp='$CXXCPP $CPPFLAGS'
  10606. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  10607. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  10608. cross_compiling=$ac_cv_prog_cxx_cross
  10609. cat > conftest.$ac_ext << EOF
  10610. #line 13377 "configure"
  10611. #include "confdefs.h"
  10612. int main(){return(0);}
  10613. EOF
  10614. if { (eval echo configure:13382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10615. ac_cv_prog_cxx_works=yes
  10616. # If we can't run a trivial program, we are probably using a cross compiler.
  10617. if (./conftest; exit) 2>/dev/null; then
  10618. ac_cv_prog_cxx_cross=no
  10619. else
  10620. ac_cv_prog_cxx_cross=yes
  10621. fi
  10622. else
  10623. echo "configure: failed program was:" >&5
  10624. cat conftest.$ac_ext >&5
  10625. ac_cv_prog_cxx_works=no
  10626. fi
  10627. rm -fr conftest*
  10628. ac_ext=c
  10629. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  10630. ac_cpp='$CPP $CPPFLAGS'
  10631. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  10632. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  10633. cross_compiling=$ac_cv_prog_cc_cross
  10634. echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
  10635. if test $ac_cv_prog_cxx_works = no; then
  10636. { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
  10637. fi
  10638. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  10639. echo "configure:13408: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
  10640. echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
  10641. cross_compiling=$ac_cv_prog_cxx_cross
  10642. echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
  10643. echo "configure:13413: checking whether we are using GNU C++" >&5
  10644. cat > conftest.C <<EOF
  10645. #ifdef __GNUC__
  10646. yes;
  10647. #endif
  10648. EOF
  10649. if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:13420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  10650. ac_cv_prog_gxx=yes
  10651. else
  10652. ac_cv_prog_gxx=no
  10653. fi
  10654. echo "$ac_t""$ac_cv_prog_gxx" 1>&6
  10655. if test $ac_cv_prog_gxx = yes; then
  10656. GXX=yes
  10657. else
  10658. GXX=
  10659. fi
  10660. ac_test_CXXFLAGS="${CXXFLAGS+set}"
  10661. ac_save_CXXFLAGS="$CXXFLAGS"
  10662. CXXFLAGS=
  10663. echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
  10664. echo "configure:13438: checking whether ${CXX-g++} accepts -g" >&5
  10665. echo 'void f(){}' > conftest.cc
  10666. if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  10667. ac_cv_prog_cxx_g=yes
  10668. else
  10669. ac_cv_prog_cxx_g=no
  10670. fi
  10671. rm -f conftest*
  10672. echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
  10673. if test "$ac_test_CXXFLAGS" = set; then
  10674. CXXFLAGS="$ac_save_CXXFLAGS"
  10675. elif test $ac_cv_prog_cxx_g = yes; then
  10676. if test "$GXX" = yes; then
  10677. CXXFLAGS="-g -O2"
  10678. else
  10679. CXXFLAGS="-g"
  10680. fi
  10681. else
  10682. if test "$GXX" = yes; then
  10683. CXXFLAGS="-O2"
  10684. else
  10685. CXXFLAGS=
  10686. fi
  10687. fi
  10688. else
  10689. CXX=
  10690. CXXFLAGS=
  10691. fi
  10692. # Done checking C++
  10693. # Enable openDWG option
  10694. echo $ac_n "checking whether to use openDWG""... $ac_c" 1>&6
  10695. echo "configure:13479: checking whether to use openDWG" >&5
  10696. echo "$ac_t"""$with_opendwg"" 1>&6
  10697. case "$with_opendwg" in
  10698. "no") USE_OPENDWG= ;;
  10699. "yes") USE_OPENDWG="1" ;;
  10700. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10701. esac
  10702. OPENDWGINCPATH=
  10703. OPENDWGLIBPATH=
  10704. OPENDWGLIB=
  10705. if test -n "${USE_OPENDWG}"; then
  10706. # With OPENDWG includes directory
  10707. echo $ac_n "checking for location of openDGW includes""... $ac_c" 1>&6
  10708. echo "configure:13499: checking for location of openDGW includes" >&5
  10709. case "$with_opendwg_includes" in
  10710. y | ye | yes | n | no)
  10711. { echo "configure: error: *** You must supply a directory to --with-opendwg-includes." 1>&2; exit 1; }
  10712. ;;
  10713. esac
  10714. echo "$ac_t""$with_opendwg_includes" 1>&6
  10715. if test -n "$with_opendwg_includes" ; then
  10716. for dir in $with_opendwg_includes; do
  10717. if test -d "$dir"; then
  10718. OPENDWGINCPATH="$OPENDWGINCPATH -I$dir"
  10719. else
  10720. { echo "configure: error: *** openDGW includes directory $dir does not exist." 1>&2; exit 1; }
  10721. fi
  10722. done
  10723. fi
  10724. ac_save_cppflags="$CPPFLAGS"
  10725. CPPFLAGS="$OPENDWGINCPATH $CPPFLAGS"
  10726. for ac_hdr in ad2.h
  10727. do
  10728. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10729. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10730. echo "configure:13525: checking for $ac_hdr" >&5
  10731. cat > conftest.$ac_ext <<EOF
  10732. #line 13528 "configure"
  10733. #include "confdefs.h"
  10734. #include <$ac_hdr>
  10735. EOF
  10736. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10737. { (eval echo configure:13533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10738. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10739. if test -z "$ac_err"; then
  10740. rm -rf conftest*
  10741. eval "ac_cv_header_$ac_safe=yes"
  10742. else
  10743. echo "$ac_err" >&5
  10744. echo "configure: failed program was:" >&5
  10745. cat conftest.$ac_ext >&5
  10746. rm -rf conftest*
  10747. eval "ac_cv_header_$ac_safe=no"
  10748. fi
  10749. rm -f conftest*
  10750. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10751. echo "$ac_t""yes" 1>&6
  10752. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10753. cat >> confdefs.h <<EOF
  10754. #define $ac_tr_hdr 1
  10755. EOF
  10756. else
  10757. echo "$ac_t""no" 1>&6
  10758. { echo "configure: error: *** Unable to locate openDWG includes." 1>&2; exit 1; }
  10759. fi
  10760. done
  10761. CPPFLAGS=$ac_save_cppflags
  10762. # With OPENDWG library directory
  10763. echo $ac_n "checking for location of openDWG library""... $ac_c" 1>&6
  10764. echo "configure:13567: checking for location of openDWG library" >&5
  10765. case "$with_opendwg_libs" in
  10766. y | ye | yes | n | no)
  10767. { echo "configure: error: *** You must supply a directory to --with-opendwg-libs." 1>&2; exit 1; }
  10768. ;;
  10769. esac
  10770. echo "$ac_t""$with_opendwg_libs" 1>&6
  10771. if test -n "$with_opendwg_libs"; then
  10772. for dir in $with_opendwg_libs; do
  10773. if test -d "$dir"; then
  10774. OPENDWGLIBPATH="$OPENDWGLIBPATH -L$dir"
  10775. else
  10776. { echo "configure: error: *** openDWG library directory $dir does not exist." 1>&2; exit 1; }
  10777. fi
  10778. done
  10779. fi
  10780. #search for ad2.a, ad3.a ... in openDWG toolkit directory:
  10781. #FIX ME how to program this test??
  10782. #LOC_CHECK_LIBS(ad?.a,adSeekLayer,openDWG,$OPENDWGLIBPATH,OPENDWGLIB,,)
  10783. #
  10784. #for now hack (but working):
  10785. TRUEOPENDWGLIBPATH=`echo "$OPENDWGLIBPATH" | cut -b3-`
  10786. adlib=`ls -1 "$TRUEOPENDWGLIBPATH"/ad?.a | tail -1`
  10787. OPENDWGLIB="$adlib"
  10788. fi # $USE_OPENDWG
  10789. # Done checking OPENDWG
  10790. # Enable pthread option
  10791. echo $ac_n "checking whether to use POSIX threads""... $ac_c" 1>&6
  10792. echo "configure:13608: checking whether to use POSIX threads" >&5
  10793. echo "$ac_t"""$with_pthread"" 1>&6
  10794. case "$with_pthread" in
  10795. "no") USE_PTHREAD= ;;
  10796. "yes") USE_PTHREAD="1" ;;
  10797. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10798. esac
  10799. PTHREADINCPATH=
  10800. PTHREADLIBPATH=
  10801. PTHREADLIB=
  10802. if test -n "$USE_PTHREAD"; then
  10803. # With pthread includes directory
  10804. echo $ac_n "checking for location of POSIX threads includes""... $ac_c" 1>&6
  10805. echo "configure:13628: checking for location of POSIX threads includes" >&5
  10806. case "$with_pthread_includes" in
  10807. y | ye | yes | n | no)
  10808. { echo "configure: error: *** You must supply a directory to --with-pthread-includes." 1>&2; exit 1; }
  10809. ;;
  10810. esac
  10811. echo "$ac_t""$with_pthread_includes" 1>&6
  10812. if test -n "$with_pthread_includes" ; then
  10813. for dir in $with_pthread_includes; do
  10814. if test -d "$dir"; then
  10815. PTHREADINCPATH="$PTHREADINCPATH -I$dir"
  10816. else
  10817. { echo "configure: error: *** POSIX threads includes directory $dir does not exist." 1>&2; exit 1; }
  10818. fi
  10819. done
  10820. fi
  10821. ac_save_cppflags="$CPPFLAGS"
  10822. CPPFLAGS="$PTHREADINCPATH $CPPFLAGS"
  10823. for ac_hdr in pthread.h
  10824. do
  10825. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10826. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10827. echo "configure:13654: checking for $ac_hdr" >&5
  10828. cat > conftest.$ac_ext <<EOF
  10829. #line 13657 "configure"
  10830. #include "confdefs.h"
  10831. #include <$ac_hdr>
  10832. EOF
  10833. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10834. { (eval echo configure:13662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10835. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10836. if test -z "$ac_err"; then
  10837. rm -rf conftest*
  10838. eval "ac_cv_header_$ac_safe=yes"
  10839. else
  10840. echo "$ac_err" >&5
  10841. echo "configure: failed program was:" >&5
  10842. cat conftest.$ac_ext >&5
  10843. rm -rf conftest*
  10844. eval "ac_cv_header_$ac_safe=no"
  10845. fi
  10846. rm -f conftest*
  10847. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10848. echo "$ac_t""yes" 1>&6
  10849. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10850. cat >> confdefs.h <<EOF
  10851. #define $ac_tr_hdr 1
  10852. EOF
  10853. else
  10854. echo "$ac_t""no" 1>&6
  10855. { echo "configure: error: *** Unable to locate POSIX threads includes." 1>&2; exit 1; }
  10856. fi
  10857. done
  10858. CPPFLAGS=$ac_save_cppflags
  10859. # With pthread library directory
  10860. echo $ac_n "checking for location of POSIX threads library""... $ac_c" 1>&6
  10861. echo "configure:13696: checking for location of POSIX threads library" >&5
  10862. case "$with_pthread_libs" in
  10863. y | ye | yes | n | no)
  10864. { echo "configure: error: *** You must supply a directory to --with-pthread-libs." 1>&2; exit 1; }
  10865. ;;
  10866. esac
  10867. echo "$ac_t""$with_pthread_libs" 1>&6
  10868. if test -n "$with_pthread_libs"; then
  10869. for dir in $with_pthread_libs; do
  10870. if test -d "$dir"; then
  10871. PTHREADLIBPATH="$PTHREADLIBPATH -L$dir"
  10872. else
  10873. { echo "configure: error: *** POSIX threads library directory $dir does not exist." 1>&2; exit 1; }
  10874. fi
  10875. done
  10876. fi
  10877. ac_save_libs="$LIBS"
  10878. ac_save_ldflags="$LDFLAGS"
  10879. LIBS=" $LIBS"
  10880. LDFLAGS=" $LDFLAGS"
  10881. echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
  10882. echo "configure:13721: checking for pthread_create" >&5
  10883. cat > conftest.$ac_ext <<EOF
  10884. #line 13724 "configure"
  10885. #include "confdefs.h"
  10886. /* System header to define __stub macros and hopefully few prototypes,
  10887. which can conflict with char pthread_create(); below. */
  10888. #include <assert.h>
  10889. /* Override any gcc2 internal prototype to avoid an error. */
  10890. /* We use char because int might match the return type of a gcc2
  10891. builtin and then its argument prototype would still apply. */
  10892. char pthread_create();
  10893. int main() {
  10894. /* The GNU C library defines this for functions which it implements
  10895. to always fail with ENOSYS. Some functions are actually named
  10896. something starting with __ and the normal name is an alias. */
  10897. #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
  10898. choke me
  10899. #else
  10900. pthread_create();
  10901. #endif
  10902. ; return 0; }
  10903. EOF
  10904. if { (eval echo configure:13747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10905. rm -rf conftest*
  10906. eval "ac_cv_func_pthread_create=yes"
  10907. else
  10908. echo "configure: failed program was:" >&5
  10909. cat conftest.$ac_ext >&5
  10910. rm -rf conftest*
  10911. eval "ac_cv_func_pthread_create=no"
  10912. fi
  10913. rm -f conftest*
  10914. if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
  10915. echo "$ac_t""yes" 1>&6
  10916. PTHREADLIB="$PTHREADLIB "
  10917. else
  10918. echo "$ac_t""no" 1>&6
  10919. ac_save_ldflags="$LDFLAGS"
  10920. LDFLAGS="$PTHREADLIBPATH $LDFLAGS"
  10921. echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
  10922. echo "configure:13774: checking for pthread_create in -lpthread" >&5
  10923. ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
  10924. ac_save_LIBS="$LIBS"
  10925. LIBS="-lpthread $LIBS"
  10926. cat > conftest.$ac_ext <<EOF
  10927. #line 13780 "configure"
  10928. #include "confdefs.h"
  10929. /* Override any gcc2 internal prototype to avoid an error. */
  10930. /* We use char because int might match the return type of a gcc2
  10931. builtin and then its argument prototype would still apply. */
  10932. char pthread_create();
  10933. int main() {
  10934. pthread_create()
  10935. ; return 0; }
  10936. EOF
  10937. if { (eval echo configure:13791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10938. rm -rf conftest*
  10939. eval "ac_cv_lib_$ac_lib_var=yes"
  10940. else
  10941. echo "configure: failed program was:" >&5
  10942. cat conftest.$ac_ext >&5
  10943. rm -rf conftest*
  10944. eval "ac_cv_lib_$ac_lib_var=no"
  10945. fi
  10946. rm -f conftest*
  10947. LIBS="$ac_save_LIBS"
  10948. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10949. echo "$ac_t""yes" 1>&6
  10950. PTHREADLIB="$PTHREADLIB -lpthread "
  10951. else
  10952. echo "$ac_t""no" 1>&6
  10953. LDFLAGS=${ac_save_ldflags}
  10954. { echo "configure: error: *** Unable to locate POSIX threads library." 1>&2; exit 1; }
  10955. fi
  10956. LDFLAGS=${ac_save_ldflags}
  10957. fi
  10958. LIBS=${ac_save_libs}
  10959. LDFLAGS=${ac_save_ldflags}
  10960. fi # $USE_PTHREAD
  10961. # Done checking pthread
  10962. # Enable OpenMP option
  10963. echo $ac_n "checking whether to use OpenMP""... $ac_c" 1>&6
  10964. echo "configure:13841: checking whether to use OpenMP" >&5
  10965. echo "$ac_t"""$with_openmp"" 1>&6
  10966. case "$with_openmp" in
  10967. "no") USE_OPENMP= ;;
  10968. "yes") USE_OPENMP="1" ;;
  10969. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10970. esac
  10971. OMPINCPATH=
  10972. OMPLIBPATH=
  10973. OMPLIB=
  10974. OMPCFLAGS=
  10975. if test -n "$USE_OPENMP"; then
  10976. # With OpenMP includes directory
  10977. echo $ac_n "checking for location of OpenMP includes""... $ac_c" 1>&6
  10978. echo "configure:13862: checking for location of OpenMP includes" >&5
  10979. case "$with_openmp_includes" in
  10980. y | ye | yes | n | no)
  10981. { echo "configure: error: *** You must supply a directory to --with-openmp-includes." 1>&2; exit 1; }
  10982. ;;
  10983. esac
  10984. echo "$ac_t""$with_openmp_includes" 1>&6
  10985. if test -n "$with_openmp_includes" ; then
  10986. for dir in $with_openmp_includes; do
  10987. if test -d "$dir"; then
  10988. OMPINCPATH="$OMPINCPATH -I$dir"
  10989. else
  10990. { echo "configure: error: *** OpenMP includes directory $dir does not exist." 1>&2; exit 1; }
  10991. fi
  10992. done
  10993. fi
  10994. ac_save_cppflags="$CPPFLAGS"
  10995. CPPFLAGS="$OMPINCPATH $CPPFLAGS"
  10996. for ac_hdr in omp.h
  10997. do
  10998. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10999. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  11000. echo "configure:13888: checking for $ac_hdr" >&5
  11001. cat > conftest.$ac_ext <<EOF
  11002. #line 13891 "configure"
  11003. #include "confdefs.h"
  11004. #include <$ac_hdr>
  11005. EOF
  11006. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  11007. { (eval echo configure:13896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  11008. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  11009. if test -z "$ac_err"; then
  11010. rm -rf conftest*
  11011. eval "ac_cv_header_$ac_safe=yes"
  11012. else
  11013. echo "$ac_err" >&5
  11014. echo "configure: failed program was:" >&5
  11015. cat conftest.$ac_ext >&5
  11016. rm -rf conftest*
  11017. eval "ac_cv_header_$ac_safe=no"
  11018. fi
  11019. rm -f conftest*
  11020. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  11021. echo "$ac_t""yes" 1>&6
  11022. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  11023. cat >> confdefs.h <<EOF
  11024. #define $ac_tr_hdr 1
  11025. EOF
  11026. else
  11027. echo "$ac_t""no" 1>&6
  11028. { echo "configure: error: *** Unable to locate OpenMP includes." 1>&2; exit 1; }
  11029. fi
  11030. done
  11031. CPPFLAGS=$ac_save_cppflags
  11032. # With OpenMP library directory
  11033. # GCC et al.: -lgomp
  11034. # Solaris cc: -lmtsk
  11035. # AIX xlc: -lxlsmp
  11036. # SGI IRIX 6.5 MIPSpro C/C++: -lmp
  11037. echo $ac_n "checking for location of OpenMP library""... $ac_c" 1>&6
  11038. echo "configure:13934: checking for location of OpenMP library" >&5
  11039. case "$with_gomp_libs" in
  11040. y | ye | yes | n | no)
  11041. { echo "configure: error: *** You must supply a directory to --with-gomp-libs." 1>&2; exit 1; }
  11042. ;;
  11043. esac
  11044. echo "$ac_t""$with_gomp_libs" 1>&6
  11045. if test -n "$with_gomp_libs"; then
  11046. for dir in $with_gomp_libs; do
  11047. if test -d "$dir"; then
  11048. OMPLIBPATH="$OMPLIBPATH -L$dir"
  11049. else
  11050. { echo "configure: error: *** OpenMP library directory $dir does not exist." 1>&2; exit 1; }
  11051. fi
  11052. done
  11053. fi
  11054. ac_save_libs="$LIBS"
  11055. ac_save_ldflags="$LDFLAGS"
  11056. LIBS=" $LIBS"
  11057. LDFLAGS=" $LDFLAGS"
  11058. echo $ac_n "checking for GOMP_parallel_start""... $ac_c" 1>&6
  11059. echo "configure:13959: checking for GOMP_parallel_start" >&5
  11060. cat > conftest.$ac_ext <<EOF
  11061. #line 13962 "configure"
  11062. #include "confdefs.h"
  11063. /* System header to define __stub macros and hopefully few prototypes,
  11064. which can conflict with char GOMP_parallel_start(); below. */
  11065. #include <assert.h>
  11066. /* Override any gcc2 internal prototype to avoid an error. */
  11067. /* We use char because int might match the return type of a gcc2
  11068. builtin and then its argument prototype would still apply. */
  11069. char GOMP_parallel_start();
  11070. int main() {
  11071. /* The GNU C library defines this for functions which it implements
  11072. to always fail with ENOSYS. Some functions are actually named
  11073. something starting with __ and the normal name is an alias. */
  11074. #if defined (__stub_GOMP_parallel_start) || defined (__stub___GOMP_parallel_start)
  11075. choke me
  11076. #else
  11077. GOMP_parallel_start();
  11078. #endif
  11079. ; return 0; }
  11080. EOF
  11081. if { (eval echo configure:13985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11082. rm -rf conftest*
  11083. eval "ac_cv_func_GOMP_parallel_start=yes"
  11084. else
  11085. echo "configure: failed program was:" >&5
  11086. cat conftest.$ac_ext >&5
  11087. rm -rf conftest*
  11088. eval "ac_cv_func_GOMP_parallel_start=no"
  11089. fi
  11090. rm -f conftest*
  11091. if eval "test \"`echo '$ac_cv_func_'GOMP_parallel_start`\" = yes"; then
  11092. echo "$ac_t""yes" 1>&6
  11093. OMPLIB="$OMPLIB "
  11094. else
  11095. echo "$ac_t""no" 1>&6
  11096. ac_save_ldflags="$LDFLAGS"
  11097. LDFLAGS="$OMPLIBPATH $LDFLAGS"
  11098. echo $ac_n "checking for GOMP_parallel_start in -lgomp""... $ac_c" 1>&6
  11099. echo "configure:14012: checking for GOMP_parallel_start in -lgomp" >&5
  11100. ac_lib_var=`echo gomp'_'GOMP_parallel_start | sed 'y%./+-%__p_%'`
  11101. ac_save_LIBS="$LIBS"
  11102. LIBS="-lgomp $LIBS"
  11103. cat > conftest.$ac_ext <<EOF
  11104. #line 14018 "configure"
  11105. #include "confdefs.h"
  11106. /* Override any gcc2 internal prototype to avoid an error. */
  11107. /* We use char because int might match the return type of a gcc2
  11108. builtin and then its argument prototype would still apply. */
  11109. char GOMP_parallel_start();
  11110. int main() {
  11111. GOMP_parallel_start()
  11112. ; return 0; }
  11113. EOF
  11114. if { (eval echo configure:14029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11115. rm -rf conftest*
  11116. eval "ac_cv_lib_$ac_lib_var=yes"
  11117. else
  11118. echo "configure: failed program was:" >&5
  11119. cat conftest.$ac_ext >&5
  11120. rm -rf conftest*
  11121. eval "ac_cv_lib_$ac_lib_var=no"
  11122. fi
  11123. rm -f conftest*
  11124. LIBS="$ac_save_LIBS"
  11125. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  11126. echo "$ac_t""yes" 1>&6
  11127. OMPLIB="$OMPLIB -lgomp "
  11128. else
  11129. echo "$ac_t""no" 1>&6
  11130. LDFLAGS=${ac_save_ldflags}
  11131. { echo "configure: error: *** Unable to locate OpenMP library." 1>&2; exit 1; }
  11132. fi
  11133. LDFLAGS=${ac_save_ldflags}
  11134. fi
  11135. LIBS=${ac_save_libs}
  11136. LDFLAGS=${ac_save_ldflags}
  11137. # compiler dependent
  11138. #if test ${CC} = "gcc" ; then
  11139. if test x$GCC = xyes ; then
  11140. # GNU C compiler (>= 4.2.1)
  11141. OMPCFLAGS=-fopenmp
  11142. elif test ${CC} = "icc" ; then
  11143. # Intel compiler
  11144. OMPCFLAGS=-openmp
  11145. elif test ${CC} = "opencc" ; then
  11146. # AMD's x86 Open64 compiler
  11147. OMPCFLAGS=-mp
  11148. elif test ${CC} = "pgcc" ; then
  11149. # Portland Group's compiler
  11150. OMPCFLAGS=-mp
  11151. # ... anybody else?
  11152. fi
  11153. # try to build a test program with "$CC $OMPCLFAGS" to confirm it works
  11154. #...how?
  11155. #echo "int main() {return 0;}" > test.c
  11156. #$CC $OMPCLFAGS test.c -o test
  11157. fi # $USE_OPENMP
  11158. # Done checking OpenMP
  11159. # Enable LFS (from cdr-tools)
  11160. # Check whether --enable-largefile or --disable-largefile was given.
  11161. if test "${enable_largefile+set}" = set; then
  11162. enableval="$enable_largefile"
  11163. :
  11164. fi
  11165. if test "$enable_largefile" = yes; then
  11166. echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6
  11167. echo "configure:14108: checking for special C compiler options needed for large files" >&5
  11168. ac_cv_sys_largefile_CC=no
  11169. largefile_cc_opt=""
  11170. if test "$GCC" != yes; then
  11171. # IRIX 6.2 and later do not support large files by default,
  11172. # so use the C compiler's -n32 option if that helps.
  11173. cat > conftest.$ac_ext <<EOF
  11174. #line 14116 "configure"
  11175. #include "confdefs.h"
  11176. #include <sys/types.h>
  11177. /* Check that off_t can represent 2**63 - 1 correctly.
  11178. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11179. since some C++ compilers masquerading as C compilers
  11180. incorrectly reject 9223372036854775807. */
  11181. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11182. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11183. && LARGE_OFF_T % 2147483647 == 1)
  11184. ? 1 : -1];
  11185. int main() {
  11186. ; return 0; }
  11187. EOF
  11188. if { (eval echo configure:14132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11189. :
  11190. else
  11191. echo "configure: failed program was:" >&5
  11192. cat conftest.$ac_ext >&5
  11193. rm -rf conftest*
  11194. ac_save_CC="${CC-cc}"
  11195. CC="$CC -n32"
  11196. cat > conftest.$ac_ext <<EOF
  11197. #line 14141 "configure"
  11198. #include "confdefs.h"
  11199. #include <sys/types.h>
  11200. /* Check that off_t can represent 2**63 - 1 correctly.
  11201. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11202. since some C++ compilers masquerading as C compilers
  11203. incorrectly reject 9223372036854775807. */
  11204. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11205. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11206. && LARGE_OFF_T % 2147483647 == 1)
  11207. ? 1 : -1];
  11208. int main() {
  11209. ; return 0; }
  11210. EOF
  11211. if { (eval echo configure:14157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11212. rm -rf conftest*
  11213. ac_cv_sys_largefile_CC=' -n32'
  11214. else
  11215. echo "configure: failed program was:" >&5
  11216. cat conftest.$ac_ext >&5
  11217. fi
  11218. rm -f conftest*
  11219. CC="$ac_save_CC"
  11220. fi
  11221. rm -f conftest*
  11222. fi
  11223. echo "$ac_t""$ac_cv_sys_largefile_CC" 1>&6
  11224. if test "$ac_cv_sys_largefile_CC" != no; then
  11225. CC="$CC$ac_cv_sys_largefile_CC"
  11226. largefile_cc_opt="$ac_cv_sys_largefile_CC"
  11227. fi
  11228. echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6
  11229. echo "configure:14177: checking for _FILE_OFFSET_BITS value needed for large files" >&5
  11230. ac_cv_sys_file_offset_bits=no
  11231. cat > conftest.$ac_ext <<EOF
  11232. #line 14181 "configure"
  11233. #include "confdefs.h"
  11234. #include <sys/types.h>
  11235. /* Check that off_t can represent 2**63 - 1 correctly.
  11236. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11237. since some C++ compilers masquerading as C compilers
  11238. incorrectly reject 9223372036854775807. */
  11239. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11240. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11241. && LARGE_OFF_T % 2147483647 == 1)
  11242. ? 1 : -1];
  11243. int main() {
  11244. ; return 0; }
  11245. EOF
  11246. if { (eval echo configure:14197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11247. :
  11248. else
  11249. echo "configure: failed program was:" >&5
  11250. cat conftest.$ac_ext >&5
  11251. rm -rf conftest*
  11252. cat > conftest.$ac_ext <<EOF
  11253. #line 14204 "configure"
  11254. #include "confdefs.h"
  11255. #define _FILE_OFFSET_BITS 64
  11256. #include <sys/types.h>
  11257. /* Check that off_t can represent 2**63 - 1 correctly.
  11258. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11259. since some C++ compilers masquerading as C compilers
  11260. incorrectly reject 9223372036854775807. */
  11261. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11262. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11263. && LARGE_OFF_T % 2147483647 == 1)
  11264. ? 1 : -1];
  11265. int main() {
  11266. ; return 0; }
  11267. EOF
  11268. if { (eval echo configure:14222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11269. rm -rf conftest*
  11270. ac_cv_sys_file_offset_bits=64
  11271. else
  11272. echo "configure: failed program was:" >&5
  11273. cat conftest.$ac_ext >&5
  11274. fi
  11275. rm -f conftest*
  11276. fi
  11277. rm -f conftest*
  11278. echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
  11279. if test "$ac_cv_sys_file_offset_bits" != no; then
  11280. cat >> confdefs.h <<EOF
  11281. #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
  11282. EOF
  11283. fi
  11284. echo $ac_n "checking for _LARGE_FILES value needed for large files""... $ac_c" 1>&6
  11285. echo "configure:14241: checking for _LARGE_FILES value needed for large files" >&5
  11286. ac_cv_sys_large_files=no
  11287. cat > conftest.$ac_ext <<EOF
  11288. #line 14245 "configure"
  11289. #include "confdefs.h"
  11290. #include <sys/types.h>
  11291. /* Check that off_t can represent 2**63 - 1 correctly.
  11292. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11293. since some C++ compilers masquerading as C compilers
  11294. incorrectly reject 9223372036854775807. */
  11295. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11296. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11297. && LARGE_OFF_T % 2147483647 == 1)
  11298. ? 1 : -1];
  11299. int main() {
  11300. ; return 0; }
  11301. EOF
  11302. if { (eval echo configure:14261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11303. :
  11304. else
  11305. echo "configure: failed program was:" >&5
  11306. cat conftest.$ac_ext >&5
  11307. rm -rf conftest*
  11308. cat > conftest.$ac_ext <<EOF
  11309. #line 14268 "configure"
  11310. #include "confdefs.h"
  11311. #define _LARGE_FILES 1
  11312. #include <sys/types.h>
  11313. /* Check that off_t can represent 2**63 - 1 correctly.
  11314. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11315. since some C++ compilers masquerading as C compilers
  11316. incorrectly reject 9223372036854775807. */
  11317. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11318. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11319. && LARGE_OFF_T % 2147483647 == 1)
  11320. ? 1 : -1];
  11321. int main() {
  11322. ; return 0; }
  11323. EOF
  11324. if { (eval echo configure:14286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11325. rm -rf conftest*
  11326. ac_cv_sys_large_files=1
  11327. else
  11328. echo "configure: failed program was:" >&5
  11329. cat conftest.$ac_ext >&5
  11330. fi
  11331. rm -f conftest*
  11332. fi
  11333. rm -f conftest*
  11334. echo "$ac_t""$ac_cv_sys_large_files" 1>&6
  11335. if test "$ac_cv_sys_large_files" != no; then
  11336. cat >> confdefs.h <<EOF
  11337. #define _LARGE_FILES $ac_cv_sys_large_files
  11338. EOF
  11339. fi
  11340. echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
  11341. echo "configure:14305: checking for _LARGEFILE_SOURCE value needed for large files" >&5
  11342. ac_cv_sys_largefile_source=no
  11343. cat > conftest.$ac_ext <<EOF
  11344. #line 14309 "configure"
  11345. #include "confdefs.h"
  11346. #include <stdio.h>
  11347. int main() {
  11348. return !fseeko;
  11349. ; return 0; }
  11350. EOF
  11351. if { (eval echo configure:14316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11352. :
  11353. else
  11354. echo "configure: failed program was:" >&5
  11355. cat conftest.$ac_ext >&5
  11356. rm -rf conftest*
  11357. cat > conftest.$ac_ext <<EOF
  11358. #line 14323 "configure"
  11359. #include "confdefs.h"
  11360. #define _LARGEFILE_SOURCE 1
  11361. #include <stdio.h>
  11362. int main() {
  11363. return !fseeko;
  11364. ; return 0; }
  11365. EOF
  11366. if { (eval echo configure:14332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11367. rm -rf conftest*
  11368. ac_cv_sys_largefile_source=1
  11369. else
  11370. echo "configure: failed program was:" >&5
  11371. cat conftest.$ac_ext >&5
  11372. fi
  11373. rm -f conftest*
  11374. fi
  11375. rm -f conftest*
  11376. echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
  11377. if test "$ac_cv_sys_largefile_source" != no; then
  11378. cat >> confdefs.h <<EOF
  11379. #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
  11380. EOF
  11381. fi
  11382. fi
  11383. echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
  11384. echo "configure:14353: checking for _LARGEFILE_SOURCE value needed for large files" >&5
  11385. ac_cv_sys_largefile_source=no
  11386. cat > conftest.$ac_ext <<EOF
  11387. #line 14357 "configure"
  11388. #include "confdefs.h"
  11389. #include <stdio.h>
  11390. int main() {
  11391. return !fseeko;
  11392. ; return 0; }
  11393. EOF
  11394. if { (eval echo configure:14364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11395. :
  11396. else
  11397. echo "configure: failed program was:" >&5
  11398. cat conftest.$ac_ext >&5
  11399. rm -rf conftest*
  11400. cat > conftest.$ac_ext <<EOF
  11401. #line 14371 "configure"
  11402. #include "confdefs.h"
  11403. #define _LARGEFILE_SOURCE 1
  11404. #include <stdio.h>
  11405. int main() {
  11406. return !fseeko;
  11407. ; return 0; }
  11408. EOF
  11409. if { (eval echo configure:14380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11410. rm -rf conftest*
  11411. ac_cv_sys_largefile_source=1
  11412. else
  11413. echo "configure: failed program was:" >&5
  11414. cat conftest.$ac_ext >&5
  11415. fi
  11416. rm -f conftest*
  11417. fi
  11418. rm -f conftest*
  11419. echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
  11420. if test "$ac_cv_sys_largefile_source" != no; then
  11421. cat >> confdefs.h <<EOF
  11422. #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
  11423. EOF
  11424. fi
  11425. # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
  11426. # in glibc 2.1.3, but that breaks too many other things.
  11427. # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
  11428. echo $ac_n "checking for fseeko""... $ac_c" 1>&6
  11429. echo "configure:14403: checking for fseeko" >&5
  11430. ac_cv_func_fseeko=no
  11431. cat > conftest.$ac_ext <<EOF
  11432. #line 14407 "configure"
  11433. #include "confdefs.h"
  11434. #include <stdio.h>
  11435. int main() {
  11436. return fseeko && fseeko (stdin, 0, 0);
  11437. ; return 0; }
  11438. EOF
  11439. if { (eval echo configure:14414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11440. rm -rf conftest*
  11441. ac_cv_func_fseeko=yes
  11442. else
  11443. echo "configure: failed program was:" >&5
  11444. cat conftest.$ac_ext >&5
  11445. fi
  11446. rm -f conftest*
  11447. echo "$ac_t""$ac_cv_func_fseeko" 1>&6
  11448. if test $ac_cv_func_fseeko != no; then
  11449. cat >> confdefs.h <<\EOF
  11450. #define HAVE_FSEEKO 1
  11451. EOF
  11452. fi
  11453. echo $ac_n "checking if system supports Large Files at all""... $ac_c" 1>&6
  11454. echo "configure:14431: checking if system supports Large Files at all" >&5
  11455. cat > conftest.$ac_ext <<EOF
  11456. #line 14434 "configure"
  11457. #include "confdefs.h"
  11458. #include <stdio.h>
  11459. #include <sys/types.h>
  11460. int main() {
  11461. /*
  11462. * Check that off_t can represent 2**63 - 1 correctly.
  11463. * We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11464. * since some C++ compilers masquerading as C compilers
  11465. * incorrectly reject 9223372036854775807.
  11466. *
  11467. * For MinGW, off64_t should be used and __MSVCRT_VERSION__ >= 0x0601
  11468. * (msvcrt.dll version 6.10 or higher) is needed for _fstat64 and _stat64.
  11469. */
  11470. #ifdef __MINGW32__
  11471. # define LARGE_OFF_T (((off64_t) 1 << 62) - 1 + ((off64_t) 1 << 62))
  11472. #else
  11473. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11474. #endif
  11475. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11476. && LARGE_OFF_T % 2147483647 == 1)
  11477. ? 1 : -1];
  11478. #ifdef __MINGW32__
  11479. return !fseeko64;
  11480. return !ftello64;
  11481. #else
  11482. return !fseeko;
  11483. return !ftello;
  11484. #endif
  11485. ; return 0; }
  11486. EOF
  11487. if { (eval echo configure:14466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11488. rm -rf conftest*
  11489. ac_cv_largefiles=yes
  11490. else
  11491. echo "configure: failed program was:" >&5
  11492. cat conftest.$ac_ext >&5
  11493. rm -rf conftest*
  11494. ac_cv_largefiles=no
  11495. fi
  11496. rm -f conftest*
  11497. echo "$ac_t""$ac_cv_largefiles" 1>&6
  11498. if test $ac_cv_largefiles = yes; then
  11499. cat >> confdefs.h <<\EOF
  11500. #define HAVE_LARGEFILES 1
  11501. EOF
  11502. fi
  11503. USE_LARGEFILES=
  11504. if test $ac_cv_largefiles = yes; then
  11505. USE_LARGEFILES=1
  11506. fi
  11507. # Done large file support
  11508. # Enable wxWidgets support (for wxGUI)
  11509. echo $ac_n "checking whether to use wxWidgets""... $ac_c" 1>&6
  11510. echo "configure:14495: checking whether to use wxWidgets" >&5
  11511. WXVERSION=
  11512. WXWIDGETSCXXFLAGS=
  11513. WXWIDGETSCPPFLAGS=
  11514. WXWIDGETSLIB=
  11515. USE_WXWIDGETS=
  11516. MACOSX_ARCHS_WXPYTHON=
  11517. if test "$with_wxwidgets" = "no" ; then
  11518. echo "$ac_t""no" 1>&6
  11519. else
  11520. echo "$ac_t""yes" 1>&6
  11521. USE_WXWIDGETS="1"
  11522. if test "$with_wxwidgets" != "yes" ; then
  11523. WX_CONFIG="$with_wxwidgets"
  11524. fi
  11525. # Extract the first word of "wx-config", so it can be a program name with args.
  11526. set dummy wx-config; ac_word=$2
  11527. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  11528. echo "configure:14516: checking for $ac_word" >&5
  11529. case "$WX_CONFIG" in
  11530. /*)
  11531. ac_cv_path_WX_CONFIG="$WX_CONFIG" # Let the user override the test with a path.
  11532. ;;
  11533. ?:/*)
  11534. ac_cv_path_WX_CONFIG="$WX_CONFIG" # Let the user override the test with a dos path.
  11535. ;;
  11536. *)
  11537. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  11538. ac_dummy="$PATH"
  11539. for ac_dir in $ac_dummy; do
  11540. test -z "$ac_dir" && ac_dir=.
  11541. if test -f $ac_dir/$ac_word; then
  11542. ac_cv_path_WX_CONFIG="$ac_dir/$ac_word"
  11543. break
  11544. fi
  11545. done
  11546. IFS="$ac_save_ifs"
  11547. test -z "$ac_cv_path_WX_CONFIG" && ac_cv_path_WX_CONFIG="no"
  11548. ;;
  11549. esac
  11550. WX_CONFIG="$ac_cv_path_WX_CONFIG"
  11551. if test -n "$WX_CONFIG"; then
  11552. echo "$ac_t""$WX_CONFIG" 1>&6
  11553. else
  11554. echo "$ac_t""no" 1>&6
  11555. fi
  11556. if test "$WX_CONFIG" = "no" ; then
  11557. { echo "configure: error: *** couldn't find wx-config
  11558. wxWidgets must be installed on your system.
  11559. Please check that wx-config is in path, the directory
  11560. where wxWidgets libraries are installed (returned by
  11561. 'wx-config --libs' or 'wx-config --static --libs' command)
  11562. is in LD_LIBRARY_PATH or equivalent variable and
  11563. wxWidgets version is 2.8.1 or above." 1>&2; exit 1; }
  11564. fi
  11565. # Check wxWidgets version
  11566. REQWX="2.8.1"
  11567. echo $ac_n "checking wxWidgets version""... $ac_c" 1>&6
  11568. echo "configure:14564: checking wxWidgets version" >&5
  11569. if WXVERSION=`"$WX_CONFIG" --version`; then
  11570. echo "$ac_t""$WXVERSION" 1>&6
  11571. else
  11572. echo "$ac_t""not found" 1>&6
  11573. { echo "configure: error: wxWidgets is required." 1>&2; exit 1; }
  11574. fi
  11575. if test `expr "$WXVERSION" \< "$REQWX"` = 1 ; then
  11576. { echo "configure: error: *** wxWidgets "$REQWX" or later is required." 1>&2; exit 1; }
  11577. fi
  11578. # With wxWidgets includes directory
  11579. WXWIDGETSCXXFLAGS=`"$WX_CONFIG" --cxxflags`
  11580. WXWIDGETSCPPFLAGS=`"$WX_CONFIG" --cppflags`
  11581. ac_save_cppflags="$CPPFLAGS"
  11582. CPPFLAGS="$WXWIDGETSCPPFLAGS $CPPFLAGS"
  11583. for ac_hdr in wx/wxprec.h
  11584. do
  11585. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  11586. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  11587. echo "configure:14587: checking for $ac_hdr" >&5
  11588. cat > conftest.$ac_ext <<EOF
  11589. #line 14590 "configure"
  11590. #include "confdefs.h"
  11591. #include <$ac_hdr>
  11592. EOF
  11593. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  11594. { (eval echo configure:14595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  11595. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  11596. if test -z "$ac_err"; then
  11597. rm -rf conftest*
  11598. eval "ac_cv_header_$ac_safe=yes"
  11599. else
  11600. echo "$ac_err" >&5
  11601. echo "configure: failed program was:" >&5
  11602. cat conftest.$ac_ext >&5
  11603. rm -rf conftest*
  11604. eval "ac_cv_header_$ac_safe=no"
  11605. fi
  11606. rm -f conftest*
  11607. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  11608. echo "$ac_t""yes" 1>&6
  11609. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  11610. cat >> confdefs.h <<EOF
  11611. #define $ac_tr_hdr 1
  11612. EOF
  11613. else
  11614. echo "$ac_t""no" 1>&6
  11615. { echo "configure: error: *** Unable to locate wxWidgets includes." 1>&2; exit 1; }
  11616. fi
  11617. done
  11618. CPPFLAGS=$ac_save_cppflags
  11619. # With wxWidgets library directory
  11620. WXWIDGETSLIB=`"$WX_CONFIG" --libs`
  11621. # shouldn't have arch flags in C/LD flags on OSX
  11622. for a in i386 ppc x86_64 ppc64
  11623. do
  11624. WXWIDGETSCXXFLAGS=`echo "$WXWIDGETSCXXFLAGS" | sed "s/-arch *$a//g"`
  11625. WXWIDGETSCPPFLAGS=`echo "$WXWIDGETSCPPFLAGS" | sed "s/-arch *$a//g"`
  11626. WXWIDGETSLIB=`echo "$WXWIDGETSLIB" | sed "s/-arch *$a//g"`
  11627. done
  11628. # check for available OSX archs in wxPython
  11629. if test -n "$MACOSX_ARCHS" ; then
  11630. wxver=`"$WX_CONFIG" --version`
  11631. wxlib=`"$WX_CONFIG" --prefix`/lib/lib`"$WX_CONFIG" --basename`-`echo "$wxver" | cut -d . -f1,2`.dylib
  11632. wxlibinfo=`file "$wxlib"`
  11633. for a in i386 ppc x86_64 ppc64
  11634. do
  11635. # add only if in MACOSX_ARCHS
  11636. if test -n "`echo \"$wxlibinfo\" | grep \"library $a\"`" ; then
  11637. if test -n "`echo \"$MACOSX_ARCHS\" | grep $a`" ; then
  11638. MACOSX_ARCHS_WXPYTHON="$MACOSX_ARCHS_WXPYTHON -arch $a"
  11639. fi
  11640. fi
  11641. done
  11642. fi
  11643. fi # $USE_WXWIDGETS
  11644. # Done checking wxWidgets
  11645. USE_TERMIO=
  11646. STRIPFLAG=
  11647. GRASS_HOME="${DSTDIR}"
  11648. trap '' 1 2 15
  11649. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  11650. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  11651. # Let make expand exec_prefix.
  11652. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  11653. # Any assignment to VPATH causes Sun make to only execute
  11654. # the first set of double-colon rules, so remove it if not needed.
  11655. # If there is a colon in the path, we need to keep it.
  11656. if test "x$srcdir" = x.; then
  11657. ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
  11658. fi
  11659. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  11660. DEFS=-DHAVE_CONFIG_H
  11661. # Without the "./", some shells look in PATH for config.status.
  11662. : ${CONFIG_STATUS=./config.status}
  11663. echo creating $CONFIG_STATUS
  11664. rm -f $CONFIG_STATUS
  11665. cat > $CONFIG_STATUS <<EOF
  11666. #! /bin/sh
  11667. # Generated automatically by configure.
  11668. # Run this file to recreate the current configuration.
  11669. # This directory was configured as follows,
  11670. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  11671. #
  11672. # $0 $ac_configure_args
  11673. #
  11674. # Compiler output produced by configure, useful for debugging
  11675. # configure, is in ./config.log if it exists.
  11676. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  11677. for ac_option
  11678. do
  11679. case "\$ac_option" in
  11680. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  11681. echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  11682. exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  11683. -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  11684. echo "$CONFIG_STATUS generated by autoconf version 2.13"
  11685. exit 0 ;;
  11686. -help | --help | --hel | --he | --h)
  11687. echo "\$ac_cs_usage"; exit 0 ;;
  11688. *) echo "\$ac_cs_usage"; exit 1 ;;
  11689. esac
  11690. done
  11691. ac_given_srcdir=$srcdir
  11692. ac_given_INSTALL="$INSTALL"
  11693. 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
  11694. EOF
  11695. cat >> $CONFIG_STATUS <<EOF
  11696. # Protect against being on the right side of a sed subst in config.status.
  11697. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  11698. s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  11699. $ac_vpsub
  11700. $extrasub
  11701. s%@SHELL@%$SHELL%g
  11702. s%@CFLAGS@%$CFLAGS%g
  11703. s%@CPPFLAGS@%$CPPFLAGS%g
  11704. s%@CXXFLAGS@%$CXXFLAGS%g
  11705. s%@FFLAGS@%$FFLAGS%g
  11706. s%@DEFS@%$DEFS%g
  11707. s%@LDFLAGS@%$LDFLAGS%g
  11708. s%@LIBS@%$LIBS%g
  11709. s%@exec_prefix@%$exec_prefix%g
  11710. s%@prefix@%$prefix%g
  11711. s%@program_transform_name@%$program_transform_name%g
  11712. s%@bindir@%$bindir%g
  11713. s%@sbindir@%$sbindir%g
  11714. s%@libexecdir@%$libexecdir%g
  11715. s%@datadir@%$datadir%g
  11716. s%@sysconfdir@%$sysconfdir%g
  11717. s%@sharedstatedir@%$sharedstatedir%g
  11718. s%@localstatedir@%$localstatedir%g
  11719. s%@libdir@%$libdir%g
  11720. s%@includedir@%$includedir%g
  11721. s%@oldincludedir@%$oldincludedir%g
  11722. s%@infodir@%$infodir%g
  11723. s%@mandir@%$mandir%g
  11724. s%@host@%$host%g
  11725. s%@host_alias@%$host_alias%g
  11726. s%@host_cpu@%$host_cpu%g
  11727. s%@host_vendor@%$host_vendor%g
  11728. s%@host_os@%$host_os%g
  11729. s%@CC@%$CC%g
  11730. s%@EXEEXT@%$EXEEXT%g
  11731. s%@MINGW32@%$MINGW32%g
  11732. s%@BINDIR@%$BINDIR%g
  11733. s%@pwd@%$pwd%g
  11734. s%@SRCDIR@%$SRCDIR%g
  11735. s%@DSTDIR@%$DSTDIR%g
  11736. s%@ARCH@%$ARCH%g
  11737. s%@GISBASE@%$GISBASE%g
  11738. s%@GRASS_BIN@%$GRASS_BIN%g
  11739. s%@SVN_VERSION@%$SVN_VERSION%g
  11740. s%@GRASS_VERSION_FILE@%$GRASS_VERSION_FILE%g
  11741. s%@GRASS_VERSION_MAJOR@%$GRASS_VERSION_MAJOR%g
  11742. s%@GRASS_VERSION_MINOR@%$GRASS_VERSION_MINOR%g
  11743. s%@GRASS_VERSION_RELEASE@%$GRASS_VERSION_RELEASE%g
  11744. s%@GRASS_VERSION_NUMBER@%$GRASS_VERSION_NUMBER%g
  11745. s%@GRASS_VERSION_DATE@%$GRASS_VERSION_DATE%g
  11746. s%@GRASS_VERSION_SVN@%$GRASS_VERSION_SVN%g
  11747. s%@NAME_VER@%$NAME_VER%g
  11748. s%@LIB_VER@%$LIB_VER%g
  11749. s%@MACOSX_APP@%$MACOSX_APP%g
  11750. s%@MACOSX_ARCHS@%$MACOSX_ARCHS%g
  11751. s%@MACOSX_SDK@%$MACOSX_SDK%g
  11752. s%@INSTDIR@%$INSTDIR%g
  11753. s%@GRASS_LIBRARY_TYPE@%$GRASS_LIBRARY_TYPE%g
  11754. s%@PLAT_OBJS@%$PLAT_OBJS%g
  11755. s%@CC_SEARCH_FLAGS@%$CC_SEARCH_FLAGS%g
  11756. s%@LD_SEARCH_FLAGS@%$LD_SEARCH_FLAGS%g
  11757. s%@LD_LIBRARY_PATH_VAR@%$LD_LIBRARY_PATH_VAR%g
  11758. s%@SHLIB_LD@%$SHLIB_LD%g
  11759. s%@SHLIB_LD_FLAGS@%$SHLIB_LD_FLAGS%g
  11760. s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
  11761. s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
  11762. s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
  11763. s%@STLIB_LD@%$STLIB_LD%g
  11764. s%@STLIB_SUFFIX@%$STLIB_SUFFIX%g
  11765. s%@INCLUDE_DIRS@%$INCLUDE_DIRS%g
  11766. s%@LIBRARY_DIRS@%$LIBRARY_DIRS%g
  11767. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  11768. s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
  11769. s%@INSTALL_DATA@%$INSTALL_DATA%g
  11770. s%@LEX@%$LEX%g
  11771. s%@LEXLIB@%$LEXLIB%g
  11772. s%@LEXPATH@%$LEXPATH%g
  11773. s%@YACC@%$YACC%g
  11774. s%@YACCPATH@%$YACCPATH%g
  11775. s%@RANLIB@%$RANLIB%g
  11776. s%@AR@%$AR%g
  11777. s%@ENV@%$ENV%g
  11778. s%@PERL@%$PERL%g
  11779. s%@CPP@%$CPP%g
  11780. s%@CROSS_COMPILING@%$CROSS_COMPILING%g
  11781. s%@X_CFLAGS@%$X_CFLAGS%g
  11782. s%@X_LIBS@%$X_LIBS%g
  11783. s%@X_PRE_LIBS@%$X_PRE_LIBS%g
  11784. s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
  11785. s%@XLIB@%$XLIB%g
  11786. s%@XTLIB@%$XTLIB%g
  11787. s%@USE_X11@%$USE_X11%g
  11788. s%@DBMIEXTRALIB@%$DBMIEXTRALIB%g
  11789. s%@XDRLIB@%$XDRLIB%g
  11790. s%@HAVE_ASPRINTF@%$HAVE_ASPRINTF%g
  11791. s%@MATHLIB@%$MATHLIB%g
  11792. s%@DLLIB@%$DLLIB%g
  11793. s%@ICONVLIB@%$ICONVLIB%g
  11794. s%@SOCKLIB@%$SOCKLIB%g
  11795. s%@HAVE_SOCKET@%$HAVE_SOCKET%g
  11796. s%@ZLIBINCPATH@%$ZLIBINCPATH%g
  11797. s%@ZLIBLIBPATH@%$ZLIBLIBPATH%g
  11798. s%@ZLIB@%$ZLIB%g
  11799. s%@PROJINC@%$PROJINC%g
  11800. s%@PROJLIB@%$PROJLIB%g
  11801. s%@PROJSHARE@%$PROJSHARE%g
  11802. s%@NAD2BIN@%$NAD2BIN%g
  11803. s%@REGEXINCPATH@%$REGEXINCPATH%g
  11804. s%@REGEXLIBPATH@%$REGEXLIBPATH%g
  11805. s%@REGEXLIB@%$REGEXLIB%g
  11806. s%@USE_REGEX@%$USE_REGEX%g
  11807. s%@READLINEINCPATH@%$READLINEINCPATH%g
  11808. s%@READLINELIBPATH@%$READLINELIBPATH%g
  11809. s%@READLINELIB@%$READLINELIB%g
  11810. s%@HISTORYLIB@%$HISTORYLIB%g
  11811. s%@GDAL_CONFIG@%$GDAL_CONFIG%g
  11812. s%@GDAL_LIBS@%$GDAL_LIBS%g
  11813. s%@GDAL_CFLAGS@%$GDAL_CFLAGS%g
  11814. s%@USE_GDAL@%$USE_GDAL%g
  11815. s%@USE_OGR@%$USE_OGR%g
  11816. s%@LIBLAS_CONFIG@%$LIBLAS_CONFIG%g
  11817. s%@LIBLAS_LIBS@%$LIBLAS_LIBS%g
  11818. s%@LIBLAS_CFLAGS@%$LIBLAS_CFLAGS%g
  11819. s%@LIBLAS_INC@%$LIBLAS_INC%g
  11820. s%@USE_LIBLAS@%$USE_LIBLAS%g
  11821. s%@NETCDF_CONFIG@%$NETCDF_CONFIG%g
  11822. s%@NETCDF_LIBS@%$NETCDF_LIBS%g
  11823. s%@NETCDF_CFLAGS@%$NETCDF_CFLAGS%g
  11824. s%@USE_NETCDF@%$USE_NETCDF%g
  11825. s%@GEOS_CONFIG@%$GEOS_CONFIG%g
  11826. s%@GEOS_LIBS@%$GEOS_LIBS%g
  11827. s%@GEOS_CFLAGS@%$GEOS_CFLAGS%g
  11828. s%@USE_GEOS@%$USE_GEOS%g
  11829. s%@TIFF_INCLUDE_DIRS@%$TIFF_INCLUDE_DIRS%g
  11830. s%@TIFF_LIBRARY_DIRS@%$TIFF_LIBRARY_DIRS%g
  11831. s%@TIFFLIB@%$TIFFLIB%g
  11832. s%@PNGINC@%$PNGINC%g
  11833. s%@PNGLIB@%$PNGLIB%g
  11834. s%@USE_PNG@%$USE_PNG%g
  11835. s%@USE_POSTGRES@%$USE_POSTGRES%g
  11836. s%@PQINCPATH@%$PQINCPATH%g
  11837. s%@PQLIBPATH@%$PQLIBPATH%g
  11838. s%@PQLIB@%$PQLIB%g
  11839. s%@MYSQLD_CONFIG@%$MYSQLD_CONFIG%g
  11840. s%@USE_MYSQL@%$USE_MYSQL%g
  11841. s%@MYSQLINCPATH@%$MYSQLINCPATH%g
  11842. s%@MYSQLLIBPATH@%$MYSQLLIBPATH%g
  11843. s%@MYSQLLIB@%$MYSQLLIB%g
  11844. s%@MYSQLDLIB@%$MYSQLDLIB%g
  11845. s%@USE_SQLITE@%$USE_SQLITE%g
  11846. s%@SQLITEINCPATH@%$SQLITEINCPATH%g
  11847. s%@SQLITELIBPATH@%$SQLITELIBPATH%g
  11848. s%@SQLITELIB@%$SQLITELIB%g
  11849. s%@USE_FFMPEG@%$USE_FFMPEG%g
  11850. s%@FFMPEGINCPATH@%$FFMPEGINCPATH%g
  11851. s%@FFMPEGLIBPATH@%$FFMPEGLIBPATH%g
  11852. s%@FFMPEGLIB@%$FFMPEGLIB%g
  11853. s%@USE_OPENGL@%$USE_OPENGL%g
  11854. s%@OPENGL_X11@%$OPENGL_X11%g
  11855. s%@OPENGL_AQUA@%$OPENGL_AQUA%g
  11856. s%@OPENGL_WINDOWS@%$OPENGL_WINDOWS%g
  11857. s%@OPENGLINC@%$OPENGLINC%g
  11858. s%@OPENGLLIB@%$OPENGLLIB%g
  11859. s%@OPENGLULIB@%$OPENGLULIB%g
  11860. s%@USE_TCLTK@%$USE_TCLTK%g
  11861. s%@TCLINCDIR@%$TCLINCDIR%g
  11862. s%@TKINCDIR@%$TKINCDIR%g
  11863. s%@TCLTKLIBPATH@%$TCLTKLIBPATH%g
  11864. s%@TCLTKLIBS@%$TCLTKLIBS%g
  11865. s%@MACOSX_ARCHS_TCLTK@%$MACOSX_ARCHS_TCLTK%g
  11866. s%@ODBCINC@%$ODBCINC%g
  11867. s%@ODBCLIB@%$ODBCLIB%g
  11868. s%@FFTWINC@%$FFTWINC%g
  11869. s%@FFTWLIB@%$FFTWLIB%g
  11870. s%@BLASLIB@%$BLASLIB%g
  11871. s%@BLASINC@%$BLASINC%g
  11872. s%@LAPACKLIB@%$LAPACKLIB%g
  11873. s%@LAPACKINC@%$LAPACKINC%g
  11874. s%@CAIRO_HAS_XRENDER@%$CAIRO_HAS_XRENDER%g
  11875. s%@CAIRO_HAS_XRENDER_SURFACE@%$CAIRO_HAS_XRENDER_SURFACE%g
  11876. s%@CAIROINC@%$CAIROINC%g
  11877. s%@CAIROLIB@%$CAIROLIB%g
  11878. s%@USE_CAIRO@%$USE_CAIRO%g
  11879. s%@FTINC@%$FTINC%g
  11880. s%@FTLIB@%$FTLIB%g
  11881. s%@INTLLIB@%$INTLLIB%g
  11882. s%@HAVE_NLS@%$HAVE_NLS%g
  11883. s%@CXX@%$CXX%g
  11884. s%@OPENDWGINCPATH@%$OPENDWGINCPATH%g
  11885. s%@OPENDWGLIBPATH@%$OPENDWGLIBPATH%g
  11886. s%@OPENDWGLIB@%$OPENDWGLIB%g
  11887. s%@USE_OPENDWG@%$USE_OPENDWG%g
  11888. s%@PTHREADINCPATH@%$PTHREADINCPATH%g
  11889. s%@PTHREADLIBPATH@%$PTHREADLIBPATH%g
  11890. s%@PTHREADLIB@%$PTHREADLIB%g
  11891. s%@USE_PTHREAD@%$USE_PTHREAD%g
  11892. s%@OMPINCPATH@%$OMPINCPATH%g
  11893. s%@OMPLIBPATH@%$OMPLIBPATH%g
  11894. s%@OMPLIB@%$OMPLIB%g
  11895. s%@OMPCFLAGS@%$OMPCFLAGS%g
  11896. s%@USE_OPENMP@%$USE_OPENMP%g
  11897. s%@USE_LARGEFILES@%$USE_LARGEFILES%g
  11898. s%@WX_CONFIG@%$WX_CONFIG%g
  11899. s%@WXVERSION@%$WXVERSION%g
  11900. s%@WXWIDGETSCXXFLAGS@%$WXWIDGETSCXXFLAGS%g
  11901. s%@WXWIDGETSCPPFLAGS@%$WXWIDGETSCPPFLAGS%g
  11902. s%@WXWIDGETSLIB@%$WXWIDGETSLIB%g
  11903. s%@USE_WXWIDGETS@%$USE_WXWIDGETS%g
  11904. s%@MACOSX_ARCHS_WXPYTHON@%$MACOSX_ARCHS_WXPYTHON%g
  11905. s%@USE_TERMIO@%$USE_TERMIO%g
  11906. s%@STRIPFLAG@%$STRIPFLAG%g
  11907. s%@GRASS_HOME@%$GRASS_HOME%g
  11908. CEOF
  11909. EOF
  11910. cat >> $CONFIG_STATUS <<\EOF
  11911. # Split the substitutions into bite-sized pieces for seds with
  11912. # small command number limits, like on Digital OSF/1 and HP-UX.
  11913. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  11914. ac_file=1 # Number of current file.
  11915. ac_beg=1 # First line for current file.
  11916. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  11917. ac_more_lines=:
  11918. ac_sed_cmds=""
  11919. while $ac_more_lines; do
  11920. if test $ac_beg -gt 1; then
  11921. sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  11922. else
  11923. sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  11924. fi
  11925. if test ! -s conftest.s$ac_file; then
  11926. ac_more_lines=false
  11927. rm -f conftest.s$ac_file
  11928. else
  11929. if test -z "$ac_sed_cmds"; then
  11930. ac_sed_cmds="sed -f conftest.s$ac_file"
  11931. else
  11932. ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  11933. fi
  11934. ac_file=`expr $ac_file + 1`
  11935. ac_beg=$ac_end
  11936. ac_end=`expr $ac_end + $ac_max_sed_cmds`
  11937. fi
  11938. done
  11939. if test -z "$ac_sed_cmds"; then
  11940. ac_sed_cmds=cat
  11941. fi
  11942. EOF
  11943. cat >> $CONFIG_STATUS <<EOF
  11944. CONFIG_FILES=\${CONFIG_FILES-"include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex include/version.h grass.pc"}
  11945. EOF
  11946. cat >> $CONFIG_STATUS <<\EOF
  11947. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  11948. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  11949. case "$ac_file" in
  11950. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  11951. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  11952. *) ac_file_in="${ac_file}.in" ;;
  11953. esac
  11954. # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  11955. # Remove last slash and all that follows it. Not all systems have dirname.
  11956. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  11957. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  11958. # The file is in a subdirectory.
  11959. test ! -d "$ac_dir" && mkdir "$ac_dir"
  11960. ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  11961. # A "../" for each directory in $ac_dir_suffix.
  11962. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  11963. else
  11964. ac_dir_suffix= ac_dots=
  11965. fi
  11966. case "$ac_given_srcdir" in
  11967. .) srcdir=.
  11968. if test -z "$ac_dots"; then top_srcdir=.
  11969. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  11970. /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  11971. *) # Relative path.
  11972. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  11973. top_srcdir="$ac_dots$ac_given_srcdir" ;;
  11974. esac
  11975. case "$ac_given_INSTALL" in
  11976. [/$]*) INSTALL="$ac_given_INSTALL" ;;
  11977. *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  11978. esac
  11979. echo creating "$ac_file"
  11980. rm -f "$ac_file"
  11981. configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  11982. case "$ac_file" in
  11983. *Makefile*) ac_comsub="1i\\
  11984. # $configure_input" ;;
  11985. *) ac_comsub= ;;
  11986. esac
  11987. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  11988. sed -e "$ac_comsub
  11989. s%@configure_input@%$configure_input%g
  11990. s%@srcdir@%$srcdir%g
  11991. s%@top_srcdir@%$top_srcdir%g
  11992. s%@INSTALL@%$INSTALL%g
  11993. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  11994. fi; done
  11995. rm -f conftest.s*
  11996. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  11997. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  11998. #
  11999. # ac_d sets the value in "#define NAME VALUE" lines.
  12000. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
  12001. ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
  12002. ac_dC='\3'
  12003. ac_dD='%g'
  12004. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  12005. ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  12006. ac_uB='\([ ]\)%\1#\2define\3'
  12007. ac_uC=' '
  12008. ac_uD='\4%g'
  12009. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  12010. ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  12011. ac_eB='$%\1#\2define\3'
  12012. ac_eC=' '
  12013. ac_eD='%g'
  12014. if test "${CONFIG_HEADERS+set}" != set; then
  12015. EOF
  12016. cat >> $CONFIG_STATUS <<EOF
  12017. CONFIG_HEADERS="include/config.h"
  12018. EOF
  12019. cat >> $CONFIG_STATUS <<\EOF
  12020. fi
  12021. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  12022. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  12023. case "$ac_file" in
  12024. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  12025. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  12026. *) ac_file_in="${ac_file}.in" ;;
  12027. esac
  12028. echo creating $ac_file
  12029. rm -f conftest.frag conftest.in conftest.out
  12030. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  12031. cat $ac_file_inputs > conftest.in
  12032. EOF
  12033. # Transform confdefs.h into a sed script conftest.vals that substitutes
  12034. # the proper values into config.h.in to produce config.h. And first:
  12035. # Protect against being on the right side of a sed subst in config.status.
  12036. # Protect against being in an unquoted here document in config.status.
  12037. rm -f conftest.vals
  12038. cat > conftest.hdr <<\EOF
  12039. s/[\\&%]/\\&/g
  12040. s%[\\$`]%\\&%g
  12041. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  12042. s%ac_d%ac_u%gp
  12043. s%ac_u%ac_e%gp
  12044. EOF
  12045. sed -n -f conftest.hdr confdefs.h > conftest.vals
  12046. rm -f conftest.hdr
  12047. # This sed command replaces #undef with comments. This is necessary, for
  12048. # example, in the case of _POSIX_SOURCE, which is predefined and required
  12049. # on some systems where configure will not decide to define it.
  12050. cat >> conftest.vals <<\EOF
  12051. s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  12052. EOF
  12053. # Break up conftest.vals because some shells have a limit on
  12054. # the size of here documents, and old seds have small limits too.
  12055. rm -f conftest.tail
  12056. while :
  12057. do
  12058. ac_lines=`grep -c . conftest.vals`
  12059. # grep -c gives empty output for an empty file on some AIX systems.
  12060. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  12061. # Write a limited-size here document to conftest.frag.
  12062. echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  12063. sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  12064. echo 'CEOF
  12065. sed -f conftest.frag conftest.in > conftest.out
  12066. rm -f conftest.in
  12067. mv conftest.out conftest.in
  12068. ' >> $CONFIG_STATUS
  12069. sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  12070. rm -f conftest.vals
  12071. mv conftest.tail conftest.vals
  12072. done
  12073. rm -f conftest.vals
  12074. cat >> $CONFIG_STATUS <<\EOF
  12075. rm -f conftest.frag conftest.h
  12076. echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
  12077. cat conftest.in >> conftest.h
  12078. rm -f conftest.in
  12079. if cmp -s $ac_file conftest.h 2>/dev/null; then
  12080. echo "$ac_file is unchanged"
  12081. rm -f conftest.h
  12082. else
  12083. # Remove last slash and all that follows it. Not all systems have dirname.
  12084. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  12085. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  12086. # The file is in a subdirectory.
  12087. test ! -d "$ac_dir" && mkdir "$ac_dir"
  12088. fi
  12089. rm -f $ac_file
  12090. mv conftest.h $ac_file
  12091. fi
  12092. fi; done
  12093. EOF
  12094. cat >> $CONFIG_STATUS <<EOF
  12095. EOF
  12096. cat >> $CONFIG_STATUS <<\EOF
  12097. exit 0
  12098. EOF
  12099. chmod +x $CONFIG_STATUS
  12100. rm -fr confdefs* $ac_clean_files
  12101. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  12102. echo "Copying config.status to config.status.${ARCH}"
  12103. cp -f config.status config.status.${ARCH}
  12104. # Display configuration status
  12105. USE_TOGL=
  12106. if test -n "${USE_TCLTK}" -a -n "${USE_OPENGL}" ; then
  12107. USE_TOGL="1"
  12108. fi
  12109. echo ""
  12110. echo "GRASS is now configured for: ${host}"
  12111. echo ""
  12112. echo " Source directory: ${SRCDIR}"
  12113. echo " Build directory: ${DSTDIR}"
  12114. echo " Installation directory: ${INSTDIR}"
  12115. echo " Startup script in directory: ${bindir}"
  12116. echo " C compiler: ${CC} ${CFLAGS}"
  12117. echo " C++ compiler: ${CXX} ${CXXFLAGS}"
  12118. #LOC_MSG([ FORTRAN compiler: ${F77} ${FFLAGS}])
  12119. echo " Building shared libraries: ${shared_ok}"
  12120. echo " OpenGL platform: ${OPENGL_TYPE}"
  12121. echo ""
  12122. echo " MacOSX application: `if test -n "${MACOSX_APP}" ; then echo yes ; else echo no ; fi`"
  12123. echo " MacOSX architectures: ${MACOSX_ARCHS}"
  12124. echo " MacOSX SDK: ${MACOSX_SDK}"
  12125. echo ""
  12126. echo " Tcl/Tk NVIZ: `if test -n "${USE_TOGL}" ; then echo yes ; else echo no ; fi`"
  12127. echo ""
  12128. echo " BLAS support: `if test -n "${USE_BLAS}" ; then echo yes ; else echo no ; fi`"
  12129. echo " C++ support: `if test -n "${USE_CXX}" ; then echo yes ; else echo no ; fi`"
  12130. echo " Cairo support: `if test -n "${USE_CAIRO}" ; then echo yes ; else echo no ; fi`"
  12131. echo " DWG support: `if test -n "${USE_OPENDWG}" ; then echo yes ; else echo no ; fi`"
  12132. echo " FFMPEG support: `if test -n "${USE_FFMPEG}" ; then echo yes ; else echo no ; fi`"
  12133. echo " FFTW support: `if test -n "${USE_FFTW}" ; then echo yes ; else echo no ; fi`"
  12134. echo " FreeType support: `if test -n "${USE_FREETYPE}" ; then echo yes ; else echo no ; fi`"
  12135. echo " GDAL support: `if test -n "${USE_GDAL}" ; then echo yes ; else echo no ; fi`"
  12136. echo " NETCDF support: `if test -n "${USE_NETCDF}" ; then echo yes ; else echo no ; fi`"
  12137. echo " GEOS support: `if test -n "${USE_GEOS}" ; then echo yes ; else echo no ; fi`"
  12138. echo " LAPACK support: `if test -n "${USE_LAPACK}" ; then echo yes ; else echo no ; fi`"
  12139. echo " Large File support (LFS): `if test -n "${USE_LARGEFILES}" ; then echo yes ; else echo no ; fi`"
  12140. echo " libLAS support: `if test -n "${USE_LIBLAS}" ; then echo yes ; else echo no ; fi`"
  12141. echo " MySQL support: `if test -n "${USE_MYSQL}" ; then echo yes ; else echo no ; fi`"
  12142. echo " NLS support: `if test -n "${USE_NLS}" ; then echo yes ; else echo no ; fi`"
  12143. echo " ODBC support: `if test -n "${USE_ODBC}" ; then echo yes ; else echo no ; fi`"
  12144. echo " OGR support: `if test -n "${USE_OGR}" ; then echo yes ; else echo no ; fi`"
  12145. echo " OpenGL support: `if test -n "${USE_OPENGL}" ; then echo yes ; else echo no ; fi`"
  12146. echo " OpenMP support: `if test -n "${USE_OPENMP}" ; then echo yes ; else echo no ; fi`"
  12147. echo " PNG support: `if test -n "${USE_PNG}" ; then echo yes ; else echo no ; fi`"
  12148. echo " POSIX thread support: `if test -n "${USE_PTHREAD}" ; then echo yes ; else echo no ; fi`"
  12149. echo " PostgreSQL support: `if test -n "${USE_POSTGRES}" ; then echo yes ; else echo no ; fi`"
  12150. echo " Readline support: `if test -n "${USE_READLINE}" ; then echo yes ; else echo no ; fi`"
  12151. echo " Regex support: `if test -n "${USE_REGEX}" ; then echo yes ; else echo no ; fi`"
  12152. echo " SQLite support: `if test -n "${USE_SQLITE}" ; then echo yes ; else echo no ; fi`"
  12153. echo " TIFF support: `if test -n "${USE_TIFF}" ; then echo yes ; else echo no ; fi`"
  12154. echo " Tcl/Tk support: `if test -n "${USE_TCLTK}" ; then echo yes ; else echo no ; fi`"
  12155. echo " wxWidgets support: `if test -n "${USE_WXWIDGETS}" ; then echo yes ; else echo no ; fi`"
  12156. echo " X11 support: `if test -n "${USE_X11}" ; then echo yes ; else echo no ; fi`"
  12157. echo ""