configure 393 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408
  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-jpeg support JPEG functionality (default: yes)"
  31. ac_help="$ac_help
  32. --with-tiff support TIFF functionality (default: yes)"
  33. ac_help="$ac_help
  34. --with-png support PNG functionality (default: yes)"
  35. ac_help="$ac_help
  36. --with-tcltk support Tcl/Tk functionality (default: yes)"
  37. ac_help="$ac_help
  38. --with-postgres support PostgreSQL functionality (default: no)"
  39. ac_help="$ac_help
  40. --with-mysql support MySQL functionality (default: no)"
  41. ac_help="$ac_help
  42. --with-sqlite support SQLite functionality (default: no)"
  43. ac_help="$ac_help
  44. --with-ffmpeg support FFMPEG functionality (default: no)"
  45. ac_help="$ac_help
  46. --with-opengl support OpenGL functionality (default: yes)"
  47. ac_help="$ac_help
  48. --with-odbc support ODBC functionality (default: no)"
  49. ac_help="$ac_help
  50. --with-fftw support FFTW functionality (default: yes)"
  51. ac_help="$ac_help
  52. --with-blas support BLAS functionality (default: no)"
  53. ac_help="$ac_help
  54. --with-lapack support LAPACK functionality (default: no)"
  55. ac_help="$ac_help
  56. --with-cairo support Cairo functionality (default: yes)"
  57. ac_help="$ac_help
  58. --with-freetype support FreeType functionality (default: yes)"
  59. ac_help="$ac_help
  60. --with-nls support NLS functionality (default: no)"
  61. ac_help="$ac_help
  62. --with-readline support Readline functionality (default: no)"
  63. ac_help="$ac_help
  64. --with-opendwg support openDWG functionality (default: no)"
  65. ac_help="$ac_help
  66. --with-regex support regex functionality (default: yes)"
  67. ac_help="$ac_help
  68. --with-pthread support POSIX threads functionality (default: no)"
  69. ac_help="$ac_help
  70. --with-openmp support OpenMP functionality (default: no)"
  71. ac_help="$ac_help
  72. --with-gdal[=path/gdal-config]
  73. enable GDAL/OGR support (gdal-config with path,
  74. e.g. '--with-gdal=/usr/local/bin/gdal-config')"
  75. ac_help="$ac_help
  76. --with-liblas[=path/liblas-config]
  77. enable libLAS support (liblas-config with path,
  78. e.g. '--with-liblas=/usr/local/bin/liblas-config',
  79. default: no)"
  80. ac_help="$ac_help
  81. --with-wxwidgets[=path/wx-config]
  82. enable wxWidgets support (wx-config with path,
  83. e.g. '--with-wxwidgets=/usr/local/bin/wx-config',
  84. default: no)"
  85. ac_help="$ac_help
  86. --with-geos[=path/geos-config]
  87. enable GEOS support (geos-config with path,
  88. e.g. '--with-geos=/usr/local/bin/geos-config',
  89. default: no)"
  90. ac_help="$ac_help
  91. --with-includes=DIRS site include files are in DIRS"
  92. ac_help="$ac_help
  93. --with-libs=DIRS site library files are in DIRS"
  94. ac_help="$ac_help
  95. --with-zlib-includes=DIRS
  96. zlib include files are in DIRS"
  97. ac_help="$ac_help
  98. --with-zlib-libs=DIRS zlib library files are in DIRS"
  99. ac_help="$ac_help
  100. --with-readline-includes=DIRS
  101. Readline include files are in DIRS"
  102. ac_help="$ac_help
  103. --with-readline-libs=DIRS
  104. Readline library files are in DIRS"
  105. ac_help="$ac_help
  106. --with-jpeg-includes=DIRS
  107. JPEG include files are in DIRS"
  108. ac_help="$ac_help
  109. --with-jpeg-libs=DIRS JPEG library files are in DIRS"
  110. ac_help="$ac_help
  111. --with-tiff-includes=DIRS
  112. TIFF include files are in DIRS"
  113. ac_help="$ac_help
  114. --with-tiff-libs=DIRS TIFF library files are in DIRS"
  115. ac_help="$ac_help
  116. --with-png-includes=DIRS
  117. PNG include files are in DIRS"
  118. ac_help="$ac_help
  119. --with-png-libs=DIRS PNG library files are in DIRS"
  120. ac_help="$ac_help
  121. --with-tcltk-includes=DIRS
  122. Tcl/Tk include files are in DIRS"
  123. ac_help="$ac_help
  124. --with-tcltk-libs=DIRS Tcl/Tk library files are in DIRS"
  125. ac_help="$ac_help
  126. --with-postgres-includes=DIRS
  127. PostgreSQL include files are in DIRS"
  128. ac_help="$ac_help
  129. --with-postgres-libs=DIRS
  130. PostgreSQL library files are in DIRS"
  131. ac_help="$ac_help
  132. --with-mysql-includes=DIRS
  133. MySQL include files are in DIRS"
  134. ac_help="$ac_help
  135. --with-mysql-libs=DIRS MySQL library files are in DIRS"
  136. ac_help="$ac_help
  137. --with-sqlite-includes=DIRS
  138. SQLite include files are in DIRS"
  139. ac_help="$ac_help
  140. --with-sqlite-libs=DIRS SQLite library files are in DIRS"
  141. ac_help="$ac_help
  142. --with-ffmpeg-includes=DIRS
  143. FFMPEG include files are in DIRS"
  144. ac_help="$ac_help
  145. --with-ffmpeg-libs=DIRS FFMPEG library files are in DIRS"
  146. ac_help="$ac_help
  147. --with-opengl-includes=DIRS
  148. OpenGL include files are in DIRS"
  149. ac_help="$ac_help
  150. --with-opengl-libs=DIRS OpenGL library files are in DIRS"
  151. ac_help="$ac_help
  152. --with-opengl-framework=DIR
  153. OpenGL framework is in DIR"
  154. ac_help="$ac_help
  155. --with-odbc-includes=DIRS
  156. ODBC include files are in DIRS"
  157. ac_help="$ac_help
  158. --with-odbc-libs=DIRS ODBC library files are in DIRS"
  159. ac_help="$ac_help
  160. --with-fftw-includes=DIRS
  161. FFTW include files are in DIRS"
  162. ac_help="$ac_help
  163. --with-fftw-libs=DIRS FFTW library files are in DIRS"
  164. ac_help="$ac_help
  165. --with-blas-includes=DIRS
  166. BLAS include files are in DIRS"
  167. ac_help="$ac_help
  168. --with-blas-libs=DIRS BLAS library files are in DIRS"
  169. ac_help="$ac_help
  170. --with-lapack-includes=DIRS
  171. LAPACK include files are in DIRS"
  172. ac_help="$ac_help
  173. --with-lapack-libs=DIRS LAPACK library files are in DIRS"
  174. ac_help="$ac_help
  175. --with-cairo-includes=DIRS
  176. cairo include files are in DIRS"
  177. ac_help="$ac_help
  178. --with-cairo-libs=DIRS cairo library files are in DIRS"
  179. ac_help="$ac_help
  180. --with-cairo-ldflags=FLAGS
  181. cairo needs FLAGS when linking"
  182. ac_help="$ac_help
  183. --with-freetype-includes=DIRS
  184. FreeType include files are in DIRS"
  185. ac_help="$ac_help
  186. --with-freetype-libs=DIRS
  187. FreeType library files are in DIRS"
  188. ac_help="$ac_help
  189. --with-proj-includes=DIRS
  190. External PROJ.4 include files are in DIRS"
  191. ac_help="$ac_help
  192. --with-proj-libs=DIRS External PROJ.4 library files are in DIRS"
  193. ac_help="$ac_help
  194. --with-proj-share=DIR External PROJ.4 data files are in DIR"
  195. ac_help="$ac_help
  196. --with-opendwg-includes=DIRS
  197. openDWG include files are in DIRS"
  198. ac_help="$ac_help
  199. --with-opendwg-libs=DIRS
  200. openDWG library files are in DIRS"
  201. ac_help="$ac_help
  202. --with-regex-includes=DIRS
  203. regex include files are in DIRS"
  204. ac_help="$ac_help
  205. --with-regex-libs=DIRS regex library files are in DIRS"
  206. ac_help="$ac_help
  207. --with-pthread-includes=DIRS
  208. POSIX threads include files are in DIRS"
  209. ac_help="$ac_help
  210. --with-pthread-libs=DIRS
  211. POSIX threads library files are in DIRS"
  212. ac_help="$ac_help
  213. --with-openmp-includes=DIRS
  214. OpenMP include files are in DIRS"
  215. ac_help="$ac_help
  216. --with-openmp-libs=DIRS OpenMP library files are in DIRS"
  217. ac_help="$ac_help
  218. --with-x use the X Window System"
  219. ac_help="$ac_help
  220. --enable-largefile enable support for large files (LFS)"
  221. # Initialize some variables set by options.
  222. # The variables have the same names as the options, with
  223. # dashes changed to underlines.
  224. build=NONE
  225. cache_file=./config.cache
  226. exec_prefix=NONE
  227. host=NONE
  228. no_create=
  229. nonopt=NONE
  230. no_recursion=
  231. prefix=NONE
  232. program_prefix=NONE
  233. program_suffix=NONE
  234. program_transform_name=s,x,x,
  235. silent=
  236. site=
  237. srcdir=
  238. target=NONE
  239. verbose=
  240. x_includes=NONE
  241. x_libraries=NONE
  242. bindir='${exec_prefix}/bin'
  243. sbindir='${exec_prefix}/sbin'
  244. libexecdir='${exec_prefix}/libexec'
  245. datadir='${prefix}/share'
  246. sysconfdir='${prefix}/etc'
  247. sharedstatedir='${prefix}/com'
  248. localstatedir='${prefix}/var'
  249. libdir='${exec_prefix}/lib'
  250. includedir='${prefix}/include'
  251. oldincludedir='/usr/include'
  252. infodir='${prefix}/info'
  253. mandir='${prefix}/man'
  254. # Initialize some other variables.
  255. subdirs=
  256. MFLAGS= MAKEFLAGS=
  257. SHELL=${CONFIG_SHELL-/bin/sh}
  258. # Maximum number of lines to put in a shell here document.
  259. ac_max_here_lines=12
  260. ac_prev=
  261. for ac_option
  262. do
  263. # If the previous option needs an argument, assign it.
  264. if test -n "$ac_prev"; then
  265. eval "$ac_prev=\$ac_option"
  266. ac_prev=
  267. continue
  268. fi
  269. case "$ac_option" in
  270. -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  271. *) ac_optarg= ;;
  272. esac
  273. # Accept the important Cygnus configure options, so we can diagnose typos.
  274. case "$ac_option" in
  275. -bindir | --bindir | --bindi | --bind | --bin | --bi)
  276. ac_prev=bindir ;;
  277. -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  278. bindir="$ac_optarg" ;;
  279. -build | --build | --buil | --bui | --bu)
  280. ac_prev=build ;;
  281. -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  282. build="$ac_optarg" ;;
  283. -cache-file | --cache-file | --cache-fil | --cache-fi \
  284. | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  285. ac_prev=cache_file ;;
  286. -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  287. | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  288. cache_file="$ac_optarg" ;;
  289. -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  290. ac_prev=datadir ;;
  291. -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  292. | --da=*)
  293. datadir="$ac_optarg" ;;
  294. -disable-* | --disable-*)
  295. ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  296. # Reject names that are not valid shell variable names.
  297. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  298. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  299. fi
  300. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  301. eval "enable_${ac_feature}=no" ;;
  302. -enable-* | --enable-*)
  303. ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  304. # Reject names that are not valid shell variable names.
  305. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  306. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  307. fi
  308. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  309. case "$ac_option" in
  310. *=*) ;;
  311. *) ac_optarg=yes ;;
  312. esac
  313. eval "enable_${ac_feature}='$ac_optarg'" ;;
  314. -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  315. | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  316. | --exec | --exe | --ex)
  317. ac_prev=exec_prefix ;;
  318. -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  319. | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  320. | --exec=* | --exe=* | --ex=*)
  321. exec_prefix="$ac_optarg" ;;
  322. -gas | --gas | --ga | --g)
  323. # Obsolete; use --with-gas.
  324. with_gas=yes ;;
  325. -help | --help | --hel | --he)
  326. # Omit some internal or obsolete options to make the list less imposing.
  327. # This message is too long to be a string in the A/UX 3.1 sh.
  328. cat << EOF
  329. Usage: configure [options] [host]
  330. Options: [defaults in brackets after descriptions]
  331. Configuration:
  332. --cache-file=FILE cache test results in FILE
  333. --help print this message
  334. --no-create do not create output files
  335. --quiet, --silent do not print \`checking...' messages
  336. --version print the version of autoconf that created configure
  337. Directory and file names:
  338. --prefix=PREFIX install architecture-independent files in PREFIX
  339. [$ac_default_prefix]
  340. --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
  341. [same as prefix]
  342. --bindir=DIR user executables in DIR [EPREFIX/bin]
  343. --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
  344. --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
  345. --datadir=DIR read-only architecture-independent data in DIR
  346. [PREFIX/share]
  347. --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
  348. --sharedstatedir=DIR modifiable architecture-independent data in DIR
  349. [PREFIX/com]
  350. --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
  351. --libdir=DIR object code libraries in DIR [EPREFIX/lib]
  352. --includedir=DIR C header files in DIR [PREFIX/include]
  353. --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
  354. --infodir=DIR info documentation in DIR [PREFIX/info]
  355. --mandir=DIR man documentation in DIR [PREFIX/man]
  356. --srcdir=DIR find the sources in DIR [configure dir or ..]
  357. --program-prefix=PREFIX prepend PREFIX to installed program names
  358. --program-suffix=SUFFIX append SUFFIX to installed program names
  359. --program-transform-name=PROGRAM
  360. run sed PROGRAM on installed program names
  361. EOF
  362. cat << EOF
  363. Host type:
  364. --build=BUILD configure for building on BUILD [BUILD=HOST]
  365. --host=HOST configure for HOST [guessed]
  366. --target=TARGET configure for TARGET [TARGET=HOST]
  367. Features and packages:
  368. --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
  369. --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
  370. --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
  371. --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
  372. --x-includes=DIR X include files are in DIR
  373. --x-libraries=DIR X library files are in DIR
  374. EOF
  375. if test -n "$ac_help"; then
  376. echo "--enable and --with options recognized:$ac_help"
  377. fi
  378. exit 0 ;;
  379. -host | --host | --hos | --ho)
  380. ac_prev=host ;;
  381. -host=* | --host=* | --hos=* | --ho=*)
  382. host="$ac_optarg" ;;
  383. -includedir | --includedir | --includedi | --included | --include \
  384. | --includ | --inclu | --incl | --inc)
  385. ac_prev=includedir ;;
  386. -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  387. | --includ=* | --inclu=* | --incl=* | --inc=*)
  388. includedir="$ac_optarg" ;;
  389. -infodir | --infodir | --infodi | --infod | --info | --inf)
  390. ac_prev=infodir ;;
  391. -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  392. infodir="$ac_optarg" ;;
  393. -libdir | --libdir | --libdi | --libd)
  394. ac_prev=libdir ;;
  395. -libdir=* | --libdir=* | --libdi=* | --libd=*)
  396. libdir="$ac_optarg" ;;
  397. -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  398. | --libexe | --libex | --libe)
  399. ac_prev=libexecdir ;;
  400. -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  401. | --libexe=* | --libex=* | --libe=*)
  402. libexecdir="$ac_optarg" ;;
  403. -localstatedir | --localstatedir | --localstatedi | --localstated \
  404. | --localstate | --localstat | --localsta | --localst \
  405. | --locals | --local | --loca | --loc | --lo)
  406. ac_prev=localstatedir ;;
  407. -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  408. | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  409. | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  410. localstatedir="$ac_optarg" ;;
  411. -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  412. ac_prev=mandir ;;
  413. -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  414. mandir="$ac_optarg" ;;
  415. -nfp | --nfp | --nf)
  416. # Obsolete; use --without-fp.
  417. with_fp=no ;;
  418. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  419. | --no-cr | --no-c)
  420. no_create=yes ;;
  421. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  422. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  423. no_recursion=yes ;;
  424. -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  425. | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  426. | --oldin | --oldi | --old | --ol | --o)
  427. ac_prev=oldincludedir ;;
  428. -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  429. | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  430. | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  431. oldincludedir="$ac_optarg" ;;
  432. -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  433. ac_prev=prefix ;;
  434. -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  435. prefix="$ac_optarg" ;;
  436. -program-prefix | --program-prefix | --program-prefi | --program-pref \
  437. | --program-pre | --program-pr | --program-p)
  438. ac_prev=program_prefix ;;
  439. -program-prefix=* | --program-prefix=* | --program-prefi=* \
  440. | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  441. program_prefix="$ac_optarg" ;;
  442. -program-suffix | --program-suffix | --program-suffi | --program-suff \
  443. | --program-suf | --program-su | --program-s)
  444. ac_prev=program_suffix ;;
  445. -program-suffix=* | --program-suffix=* | --program-suffi=* \
  446. | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  447. program_suffix="$ac_optarg" ;;
  448. -program-transform-name | --program-transform-name \
  449. | --program-transform-nam | --program-transform-na \
  450. | --program-transform-n | --program-transform- \
  451. | --program-transform | --program-transfor \
  452. | --program-transfo | --program-transf \
  453. | --program-trans | --program-tran \
  454. | --progr-tra | --program-tr | --program-t)
  455. ac_prev=program_transform_name ;;
  456. -program-transform-name=* | --program-transform-name=* \
  457. | --program-transform-nam=* | --program-transform-na=* \
  458. | --program-transform-n=* | --program-transform-=* \
  459. | --program-transform=* | --program-transfor=* \
  460. | --program-transfo=* | --program-transf=* \
  461. | --program-trans=* | --program-tran=* \
  462. | --progr-tra=* | --program-tr=* | --program-t=*)
  463. program_transform_name="$ac_optarg" ;;
  464. -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  465. | -silent | --silent | --silen | --sile | --sil)
  466. silent=yes ;;
  467. -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  468. ac_prev=sbindir ;;
  469. -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  470. | --sbi=* | --sb=*)
  471. sbindir="$ac_optarg" ;;
  472. -sharedstatedir | --sharedstatedir | --sharedstatedi \
  473. | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  474. | --sharedst | --shareds | --shared | --share | --shar \
  475. | --sha | --sh)
  476. ac_prev=sharedstatedir ;;
  477. -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  478. | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  479. | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  480. | --sha=* | --sh=*)
  481. sharedstatedir="$ac_optarg" ;;
  482. -site | --site | --sit)
  483. ac_prev=site ;;
  484. -site=* | --site=* | --sit=*)
  485. site="$ac_optarg" ;;
  486. -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  487. ac_prev=srcdir ;;
  488. -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  489. srcdir="$ac_optarg" ;;
  490. -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  491. | --syscon | --sysco | --sysc | --sys | --sy)
  492. ac_prev=sysconfdir ;;
  493. -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  494. | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  495. sysconfdir="$ac_optarg" ;;
  496. -target | --target | --targe | --targ | --tar | --ta | --t)
  497. ac_prev=target ;;
  498. -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  499. target="$ac_optarg" ;;
  500. -v | -verbose | --verbose | --verbos | --verbo | --verb)
  501. verbose=yes ;;
  502. -version | --version | --versio | --versi | --vers)
  503. echo "configure generated by autoconf version 2.13"
  504. exit 0 ;;
  505. -with-* | --with-*)
  506. ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  507. # Reject names that are not valid shell variable names.
  508. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  509. { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  510. fi
  511. ac_package=`echo $ac_package| sed 's/-/_/g'`
  512. case "$ac_option" in
  513. *=*) ;;
  514. *) ac_optarg=yes ;;
  515. esac
  516. eval "with_${ac_package}='$ac_optarg'" ;;
  517. -without-* | --without-*)
  518. ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  519. # Reject names that are not valid shell variable names.
  520. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  521. { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  522. fi
  523. ac_package=`echo $ac_package| sed 's/-/_/g'`
  524. eval "with_${ac_package}=no" ;;
  525. --x)
  526. # Obsolete; use --with-x.
  527. with_x=yes ;;
  528. -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  529. | --x-incl | --x-inc | --x-in | --x-i)
  530. ac_prev=x_includes ;;
  531. -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  532. | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  533. x_includes="$ac_optarg" ;;
  534. -x-libraries | --x-libraries | --x-librarie | --x-librari \
  535. | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  536. ac_prev=x_libraries ;;
  537. -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  538. | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  539. x_libraries="$ac_optarg" ;;
  540. -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  541. ;;
  542. *)
  543. if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  544. echo "configure: warning: $ac_option: invalid host type" 1>&2
  545. fi
  546. if test "x$nonopt" != xNONE; then
  547. { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  548. fi
  549. nonopt="$ac_option"
  550. ;;
  551. esac
  552. done
  553. if test -n "$ac_prev"; then
  554. { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  555. fi
  556. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  557. # File descriptor usage:
  558. # 0 standard input
  559. # 1 file creation
  560. # 2 errors and warnings
  561. # 3 some systems may open it to /dev/tty
  562. # 4 used on the Kubota Titan
  563. # 6 checking for... messages and results
  564. # 5 compiler messages saved in config.log
  565. if test "$silent" = yes; then
  566. exec 6>/dev/null
  567. else
  568. exec 6>&1
  569. fi
  570. exec 5>./config.log
  571. echo "\
  572. This file contains any messages produced by compilers while
  573. running configure, to aid debugging if configure makes a mistake.
  574. " 1>&5
  575. # Strip out --no-create and --no-recursion so they do not pile up.
  576. # Also quote any args containing shell metacharacters.
  577. ac_configure_args=
  578. for ac_arg
  579. do
  580. case "$ac_arg" in
  581. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  582. | --no-cr | --no-c) ;;
  583. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  584. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  585. *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  586. ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  587. *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  588. esac
  589. done
  590. # NLS nuisances.
  591. # Only set these to C if already set. These must not be set unconditionally
  592. # because not all systems understand e.g. LANG=C (notably SCO).
  593. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  594. # Non-C LC_CTYPE values break the ctype check.
  595. if test "${LANG+set}" = set; then LANG=C; export LANG; fi
  596. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  597. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  598. if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
  599. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  600. rm -rf conftest* confdefs.h
  601. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  602. echo > confdefs.h
  603. # A filename unique to this package, relative to the directory that
  604. # configure is in, which we can look for to find out if srcdir is correct.
  605. ac_unique_file=configure.in
  606. # Find the source files, if location was not specified.
  607. if test -z "$srcdir"; then
  608. ac_srcdir_defaulted=yes
  609. # Try the directory containing this script, then its parent.
  610. ac_prog=$0
  611. ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  612. test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  613. srcdir=$ac_confdir
  614. if test ! -r $srcdir/$ac_unique_file; then
  615. srcdir=..
  616. fi
  617. else
  618. ac_srcdir_defaulted=no
  619. fi
  620. if test ! -r $srcdir/$ac_unique_file; then
  621. if test "$ac_srcdir_defaulted" = yes; then
  622. { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  623. else
  624. { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  625. fi
  626. fi
  627. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  628. # Prefer explicitly selected file to automatically selected ones.
  629. if test -z "$CONFIG_SITE"; then
  630. if test "x$prefix" != xNONE; then
  631. CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  632. else
  633. CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  634. fi
  635. fi
  636. for ac_site_file in $CONFIG_SITE; do
  637. if test -r "$ac_site_file"; then
  638. echo "loading site script $ac_site_file"
  639. . "$ac_site_file"
  640. fi
  641. done
  642. ac_ext=c
  643. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  644. ac_cpp='$CPP $CPPFLAGS'
  645. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  646. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  647. cross_compiling=$ac_cv_prog_cc_cross
  648. ac_exeext=
  649. ac_objext=o
  650. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  651. # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  652. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  653. ac_n= ac_c='
  654. ' ac_t=' '
  655. else
  656. ac_n=-n ac_c= ac_t=
  657. fi
  658. else
  659. ac_n= ac_c='\c' ac_t=
  660. fi
  661. ac_aux_dir=
  662. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  663. if test -f $ac_dir/install-sh; then
  664. ac_aux_dir=$ac_dir
  665. ac_install_sh="$ac_aux_dir/install-sh -c"
  666. break
  667. elif test -f $ac_dir/install.sh; then
  668. ac_aux_dir=$ac_dir
  669. ac_install_sh="$ac_aux_dir/install.sh -c"
  670. break
  671. fi
  672. done
  673. if test -z "$ac_aux_dir"; then
  674. { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  675. fi
  676. ac_config_guess=$ac_aux_dir/config.guess
  677. ac_config_sub=$ac_aux_dir/config.sub
  678. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  679. # Make sure we can run config.sub.
  680. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
  681. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  682. fi
  683. echo $ac_n "checking host system type""... $ac_c" 1>&6
  684. echo "configure:756: checking host system type" >&5
  685. host_alias=$host
  686. case "$host_alias" in
  687. NONE)
  688. case $nonopt in
  689. NONE)
  690. if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
  691. else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  692. fi ;;
  693. *) host_alias=$nonopt ;;
  694. esac ;;
  695. esac
  696. host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
  697. host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  698. host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  699. host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  700. echo "$ac_t""$host" 1>&6
  701. # Extract the first word of "gcc", so it can be a program name with args.
  702. set dummy gcc; ac_word=$2
  703. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  704. echo "configure:779: checking for $ac_word" >&5
  705. if test -n "$CC"; then
  706. ac_cv_prog_CC="$CC" # Let the user override the test.
  707. else
  708. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  709. ac_dummy="$PATH"
  710. for ac_dir in $ac_dummy; do
  711. test -z "$ac_dir" && ac_dir=.
  712. if test -f $ac_dir/$ac_word; then
  713. ac_cv_prog_CC="gcc"
  714. break
  715. fi
  716. done
  717. IFS="$ac_save_ifs"
  718. fi
  719. CC="$ac_cv_prog_CC"
  720. if test -n "$CC"; then
  721. echo "$ac_t""$CC" 1>&6
  722. else
  723. echo "$ac_t""no" 1>&6
  724. fi
  725. if test -z "$CC"; then
  726. # Extract the first word of "cc", so it can be a program name with args.
  727. set dummy cc; ac_word=$2
  728. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  729. echo "configure:806: checking for $ac_word" >&5
  730. if test -n "$CC"; then
  731. ac_cv_prog_CC="$CC" # Let the user override the test.
  732. else
  733. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  734. ac_prog_rejected=no
  735. ac_dummy="$PATH"
  736. for ac_dir in $ac_dummy; do
  737. test -z "$ac_dir" && ac_dir=.
  738. if test -f $ac_dir/$ac_word; then
  739. if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  740. ac_prog_rejected=yes
  741. continue
  742. fi
  743. ac_cv_prog_CC="cc"
  744. break
  745. fi
  746. done
  747. IFS="$ac_save_ifs"
  748. if test $ac_prog_rejected = yes; then
  749. # We found a bogon in the path, so make sure we never use it.
  750. set dummy $ac_cv_prog_CC
  751. shift
  752. if test $# -gt 0; then
  753. # We chose a different compiler from the bogus one.
  754. # However, it has the same basename, so the bogon will be chosen
  755. # first if we set CC to just the basename; use the full file name.
  756. shift
  757. set dummy "$ac_dir/$ac_word" "$@"
  758. shift
  759. ac_cv_prog_CC="$@"
  760. fi
  761. fi
  762. fi
  763. CC="$ac_cv_prog_CC"
  764. if test -n "$CC"; then
  765. echo "$ac_t""$CC" 1>&6
  766. else
  767. echo "$ac_t""no" 1>&6
  768. fi
  769. if test -z "$CC"; then
  770. case "`uname -s`" in
  771. *win32* | *WIN32*)
  772. # Extract the first word of "cl", so it can be a program name with args.
  773. set dummy cl; ac_word=$2
  774. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  775. echo "configure:854: checking for $ac_word" >&5
  776. if test -n "$CC"; then
  777. ac_cv_prog_CC="$CC" # Let the user override the test.
  778. else
  779. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  780. ac_dummy="$PATH"
  781. for ac_dir in $ac_dummy; do
  782. test -z "$ac_dir" && ac_dir=.
  783. if test -f $ac_dir/$ac_word; then
  784. ac_cv_prog_CC="cl"
  785. break
  786. fi
  787. done
  788. IFS="$ac_save_ifs"
  789. fi
  790. CC="$ac_cv_prog_CC"
  791. if test -n "$CC"; then
  792. echo "$ac_t""$CC" 1>&6
  793. else
  794. echo "$ac_t""no" 1>&6
  795. fi
  796. ;;
  797. esac
  798. fi
  799. test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  800. fi
  801. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  802. echo "configure:883: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  803. ac_ext=c
  804. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  805. ac_cpp='$CPP $CPPFLAGS'
  806. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  807. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  808. cross_compiling=$ac_cv_prog_cc_cross
  809. cat > conftest.$ac_ext << EOF
  810. #line 894 "configure"
  811. #include "confdefs.h"
  812. main(){return(0);}
  813. EOF
  814. if { (eval echo configure:899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  815. ac_cv_prog_cc_works=yes
  816. # If we can't run a trivial program, we are probably using a cross compiler.
  817. if (./conftest; exit) 2>/dev/null; then
  818. ac_cv_prog_cc_cross=no
  819. else
  820. ac_cv_prog_cc_cross=yes
  821. fi
  822. else
  823. echo "configure: failed program was:" >&5
  824. cat conftest.$ac_ext >&5
  825. ac_cv_prog_cc_works=no
  826. fi
  827. rm -fr conftest*
  828. ac_ext=c
  829. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  830. ac_cpp='$CPP $CPPFLAGS'
  831. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  832. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  833. cross_compiling=$ac_cv_prog_cc_cross
  834. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  835. if test $ac_cv_prog_cc_works = no; then
  836. { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  837. fi
  838. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  839. echo "configure:925: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  840. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  841. cross_compiling=$ac_cv_prog_cc_cross
  842. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  843. echo "configure:930: checking whether we are using GNU C" >&5
  844. cat > conftest.c <<EOF
  845. #ifdef __GNUC__
  846. yes;
  847. #endif
  848. EOF
  849. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  850. ac_cv_prog_gcc=yes
  851. else
  852. ac_cv_prog_gcc=no
  853. fi
  854. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  855. if test $ac_cv_prog_gcc = yes; then
  856. GCC=yes
  857. else
  858. GCC=
  859. fi
  860. ac_test_CFLAGS="${CFLAGS+set}"
  861. ac_save_CFLAGS="$CFLAGS"
  862. CFLAGS=
  863. echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  864. echo "configure:955: checking whether ${CC-cc} accepts -g" >&5
  865. echo 'void f(){}' > conftest.c
  866. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  867. ac_cv_prog_cc_g=yes
  868. else
  869. ac_cv_prog_cc_g=no
  870. fi
  871. rm -f conftest*
  872. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  873. if test "$ac_test_CFLAGS" = set; then
  874. CFLAGS="$ac_save_CFLAGS"
  875. elif test $ac_cv_prog_cc_g = yes; then
  876. if test "$GCC" = yes; then
  877. CFLAGS="-g -O2"
  878. else
  879. CFLAGS="-g"
  880. fi
  881. else
  882. if test "$GCC" = yes; then
  883. CFLAGS="-O2"
  884. else
  885. CFLAGS=
  886. fi
  887. fi
  888. echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
  889. echo "configure:984: checking for Cygwin environment" >&5
  890. cat > conftest.$ac_ext <<EOF
  891. #line 987 "configure"
  892. #include "confdefs.h"
  893. int main() {
  894. #ifndef __CYGWIN__
  895. #define __CYGWIN__ __CYGWIN32__
  896. #endif
  897. return __CYGWIN__;
  898. ; return 0; }
  899. EOF
  900. if { (eval echo configure:998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  901. rm -rf conftest*
  902. ac_cv_cygwin=yes
  903. else
  904. echo "configure: failed program was:" >&5
  905. cat conftest.$ac_ext >&5
  906. rm -rf conftest*
  907. ac_cv_cygwin=no
  908. fi
  909. rm -f conftest*
  910. rm -f conftest*
  911. echo "$ac_t""$ac_cv_cygwin" 1>&6
  912. CYGWIN=
  913. test "$ac_cv_cygwin" = yes && CYGWIN=yes
  914. echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
  915. echo "configure:1014: checking for mingw32 environment" >&5
  916. cat > conftest.$ac_ext <<EOF
  917. #line 1017 "configure"
  918. #include "confdefs.h"
  919. int main() {
  920. return __MINGW32__;
  921. ; return 0; }
  922. EOF
  923. if { (eval echo configure:1024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  924. rm -rf conftest*
  925. ac_cv_mingw32=yes
  926. else
  927. echo "configure: failed program was:" >&5
  928. cat conftest.$ac_ext >&5
  929. rm -rf conftest*
  930. ac_cv_mingw32=no
  931. fi
  932. rm -f conftest*
  933. rm -f conftest*
  934. echo "$ac_t""$ac_cv_mingw32" 1>&6
  935. MINGW32=
  936. test "$ac_cv_mingw32" = yes && MINGW32=yes
  937. echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
  938. echo "configure:1042: checking for executable suffix" >&5
  939. if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
  940. ac_cv_exeext=.exe
  941. else
  942. ac_cv_exeext=no
  943. fi
  944. EXEEXT=""
  945. test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
  946. echo "$ac_t""${ac_cv_exeext}" 1>&6
  947. ac_exeext=$EXEEXT
  948. # Check for full floating-point support, including Infinity and NaN
  949. IEEEFLAG=
  950. echo $ac_n "checking for full floating-point support""... $ac_c" 1>&6
  951. echo "configure:1061: checking for full floating-point support" >&5
  952. if test "$cross_compiling" = yes; then
  953. echo "$ac_t""unknown (cross-compiling)" 1>&6
  954. echo $ac_n "checking whether "cc -mieee" works""... $ac_c" 1>&6
  955. echo "configure:1066: checking whether "cc -mieee" works" >&5
  956. ac_save_cflags=${CFLAGS}
  957. CFLAGS="$CFLAGS -mieee"
  958. cat > conftest.$ac_ext <<EOF
  959. #line 1070 "configure"
  960. #include "confdefs.h"
  961. int main() {
  962. ; return 0; }
  963. EOF
  964. if { (eval echo configure:1077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  965. rm -rf conftest*
  966. echo "$ac_t""yes" 1>&6
  967. IEEEFLAG="-mieee"
  968. else
  969. echo "configure: failed program was:" >&5
  970. cat conftest.$ac_ext >&5
  971. rm -rf conftest*
  972. echo "$ac_t""no" 1>&6
  973. fi
  974. rm -f conftest*
  975. CFLAGS=${ac_save_cflags}
  976. else
  977. cat > conftest.$ac_ext <<EOF
  978. #line 1093 "configure"
  979. #include "confdefs.h"
  980. #include <float.h>
  981. int main(void) {
  982. double one = 1.0;
  983. double zero = 0.0;
  984. if (one/zero > DBL_MAX) /* infinity */
  985. if (zero/zero != zero/zero) /* NaN */
  986. return 0;
  987. return 1;
  988. }
  989. EOF
  990. if { (eval echo configure:1107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  991. then
  992. echo "$ac_t""yes" 1>&6
  993. else
  994. echo "configure: failed program was:" >&5
  995. cat conftest.$ac_ext >&5
  996. rm -fr conftest*
  997. echo "$ac_t""no" 1>&6
  998. ac_save_cflags=${CFLAGS}
  999. CFLAGS=-mieee
  1000. echo $ac_n "checking for full floating-point support with -mieee""... $ac_c" 1>&6
  1001. echo "configure:1120: checking for full floating-point support with -mieee" >&5
  1002. if test "$cross_compiling" = yes; then
  1003. echo "$ac_t""unknown (cross-compiling)" 1>&6
  1004. { echo "configure: error: *** INTERNAL CONFIGURE ERROR" 1>&2; exit 1; }
  1005. else
  1006. cat > conftest.$ac_ext <<EOF
  1007. #line 1127 "configure"
  1008. #include "confdefs.h"
  1009. #include <float.h>
  1010. int main(void) {
  1011. double one = 1.0;
  1012. double zero = 0.0;
  1013. if (one/zero > DBL_MAX) /* infinity */
  1014. if (zero/zero != zero/zero) /* NaN */
  1015. return 0;
  1016. return 1;
  1017. }
  1018. EOF
  1019. if { (eval echo configure:1141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1020. then
  1021. echo "$ac_t""yes" 1>&6
  1022. IEEEFLAG="-mieee"
  1023. else
  1024. echo "configure: failed program was:" >&5
  1025. cat conftest.$ac_ext >&5
  1026. rm -fr conftest*
  1027. echo "$ac_t""no" 1>&6
  1028. echo "configure: warning: *** Incomplete floating-point support." 1>&2
  1029. fi
  1030. rm -fr conftest*
  1031. fi
  1032. CFLAGS=${ac_save_cflags}
  1033. fi
  1034. rm -fr conftest*
  1035. fi
  1036. CFLAGS="$CFLAGS $IEEEFLAG"
  1037. # Set BINDIR
  1038. if test -n "${bindir}"; then
  1039. BINDIR="${bindir}"
  1040. else
  1041. BINDIR=/usr/local/bin
  1042. fi
  1043. # Set SRCDIR and DSTDIR
  1044. # Extract the first word of "pwd", so it can be a program name with args.
  1045. set dummy pwd; ac_word=$2
  1046. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1047. echo "configure:1178: checking for $ac_word" >&5
  1048. case "$pwd" in
  1049. /*)
  1050. ac_cv_path_pwd="$pwd" # Let the user override the test with a path.
  1051. ;;
  1052. ?:/*)
  1053. ac_cv_path_pwd="$pwd" # Let the user override the test with a dos path.
  1054. ;;
  1055. *)
  1056. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1057. ac_dummy="$PATH"
  1058. for ac_dir in $ac_dummy; do
  1059. test -z "$ac_dir" && ac_dir=.
  1060. if test -f $ac_dir/$ac_word; then
  1061. ac_cv_path_pwd="$ac_dir/$ac_word"
  1062. break
  1063. fi
  1064. done
  1065. IFS="$ac_save_ifs"
  1066. test -z "$ac_cv_path_pwd" && ac_cv_path_pwd="pwd"
  1067. ;;
  1068. esac
  1069. pwd="$ac_cv_path_pwd"
  1070. if test -n "$pwd"; then
  1071. echo "$ac_t""$pwd" 1>&6
  1072. else
  1073. echo "$ac_t""no" 1>&6
  1074. fi
  1075. if test "$MINGW32" = yes ; then
  1076. winpwd="$pwd -W"
  1077. else
  1078. winpwd="$pwd"
  1079. fi
  1080. echo $ac_n "checking for source directory""... $ac_c" 1>&6
  1081. echo "configure:1216: checking for source directory" >&5
  1082. if test -z "$srcdir" ; then
  1083. SRCDIR=`$pwd`
  1084. else
  1085. SRCDIR=`(cd "$srcdir" ; $pwd)`
  1086. fi
  1087. echo "$ac_t"""$SRCDIR"" 1>&6
  1088. echo $ac_n "checking for build directory""... $ac_c" 1>&6
  1089. echo "configure:1227: checking for build directory" >&5
  1090. DSTDIR=`$pwd`
  1091. WINDSTDIR=`$winpwd`
  1092. echo "$ac_t"""$DSTDIR"" 1>&6
  1093. # Set ARCH
  1094. ARCH=
  1095. if test -z "${host}"; then
  1096. ARCH="unknown"
  1097. else
  1098. ARCH="${host}"
  1099. fi
  1100. # Use absolute path for aux directory so that install-sh works
  1101. ac_aux_dir=
  1102. for ac_dir in "$SRCDIR" $srcdir/"$SRCDIR"; do
  1103. if test -f $ac_dir/install-sh; then
  1104. ac_aux_dir=$ac_dir
  1105. ac_install_sh="$ac_aux_dir/install-sh -c"
  1106. break
  1107. elif test -f $ac_dir/install.sh; then
  1108. ac_aux_dir=$ac_dir
  1109. ac_install_sh="$ac_aux_dir/install.sh -c"
  1110. break
  1111. fi
  1112. done
  1113. if test -z "$ac_aux_dir"; then
  1114. { echo "configure: error: can not find install-sh or install.sh in "$SRCDIR" $srcdir/"$SRCDIR"" 1>&2; exit 1; }
  1115. fi
  1116. ac_config_guess=$ac_aux_dir/config.guess
  1117. ac_config_sub=$ac_aux_dir/config.sub
  1118. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  1119. # Set GISBASE and GRASS_BIN
  1120. GISBASE="${WINDSTDIR}/dist.${ARCH}"
  1121. GRASS_BIN="${DSTDIR}/bin.${ARCH}"
  1122. # Set GRASS_VERSION_*
  1123. GRASS_VERSION_FILE=include/VERSION
  1124. GRASS_VERSION_MAJOR=`sed -n 1p "${GRASS_VERSION_FILE}"`
  1125. GRASS_VERSION_MINOR=`sed -n 2p "${GRASS_VERSION_FILE}"`
  1126. GRASS_VERSION_RELEASE=`sed -n 3p "${GRASS_VERSION_FILE}"`
  1127. GRASS_VERSION_DATE=`sed -n 4p "${GRASS_VERSION_FILE}"`
  1128. GRASS_VERSION_NUMBER=`echo ${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}`
  1129. NAME_VER=`echo ${GRASS_VERSION_NUMBER} | sed 's/\..*//'`
  1130. LIB_VER=`echo ${GRASS_VERSION_NUMBER} | sed 's/^\([0-9.]*\).*$/\1/'`
  1131. GRASS_VERSION_SVN=
  1132. # Extract the first word of "svnversion", so it can be a program name with args.
  1133. set dummy svnversion; ac_word=$2
  1134. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1135. echo "configure:1295: checking for $ac_word" >&5
  1136. case "$SVN_VERSION" in
  1137. /*)
  1138. ac_cv_path_SVN_VERSION="$SVN_VERSION" # Let the user override the test with a path.
  1139. ;;
  1140. ?:/*)
  1141. ac_cv_path_SVN_VERSION="$SVN_VERSION" # Let the user override the test with a dos path.
  1142. ;;
  1143. *)
  1144. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1145. ac_dummy="$PATH"
  1146. for ac_dir in $ac_dummy; do
  1147. test -z "$ac_dir" && ac_dir=.
  1148. if test -f $ac_dir/$ac_word; then
  1149. ac_cv_path_SVN_VERSION="$ac_dir/$ac_word"
  1150. break
  1151. fi
  1152. done
  1153. IFS="$ac_save_ifs"
  1154. test -z "$ac_cv_path_SVN_VERSION" && ac_cv_path_SVN_VERSION="no"
  1155. ;;
  1156. esac
  1157. SVN_VERSION="$ac_cv_path_SVN_VERSION"
  1158. if test -n "$SVN_VERSION"; then
  1159. echo "$ac_t""$SVN_VERSION" 1>&6
  1160. else
  1161. echo "$ac_t""no" 1>&6
  1162. fi
  1163. if test "$SVN_VERSION" != "no" ; then
  1164. GRASS_VERSION_SVN=`$SVN_VERSION -c | cut -f2 -d:`
  1165. if test "$GRASS_VERSION_SVN" = "exported" ; then
  1166. GRASS_VERSION_SVN=
  1167. fi
  1168. fi
  1169. # Check for MacOSX App
  1170. # Check whether --enable-macosx-app or --disable-macosx-app was given.
  1171. if test "${enable_macosx_app+set}" = set; then
  1172. enableval="$enable_macosx_app"
  1173. :
  1174. else
  1175. enable_macosx_app=no
  1176. fi
  1177. echo $ac_n "checking for MacOSX App""... $ac_c" 1>&6
  1178. echo "configure:1354: checking for MacOSX App" >&5
  1179. case "$enable_macosx_app" in
  1180. yes) MACOSX_APP=1 ;;
  1181. no) MACOSX_APP= ;;
  1182. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  1183. esac
  1184. echo "$ac_t"""$enable_macosx_app"" 1>&6
  1185. # Check for MacOSX archs
  1186. echo $ac_n "checking for MacOSX architectures""... $ac_c" 1>&6
  1187. echo "configure:1366: checking for MacOSX architectures" >&5
  1188. MACOSX_ARCHS=
  1189. if test -z "$with_macosx_archs" ; then
  1190. echo "$ac_t""no" 1>&6
  1191. else
  1192. for a in $with_macosx_archs
  1193. do
  1194. # check if valid arch?
  1195. case "$a" in
  1196. i386|ppc|x86_64|ppc64)
  1197. MACOSX_ARCHS="$MACOSX_ARCHS -arch $a"
  1198. ;;
  1199. esac
  1200. done
  1201. echo "$ac_t""$MACOSX_ARCHS" 1>&6
  1202. LDFLAGS="$LDFLAGS $MACOSX_ARCHS"
  1203. CFLAGS="$CFLAGS $MACOSX_ARCHS"
  1204. CXXFLAGS="$CXXFLAGS $MACOSX_ARCHS"
  1205. fi
  1206. # Done checking MacOSX archs
  1207. # Check for MacOSX SDK
  1208. echo $ac_n "checking for MacOSX SDK""... $ac_c" 1>&6
  1209. echo "configure:1395: checking for MacOSX SDK" >&5
  1210. MACOSX_SDK=
  1211. if test -z "$with_macosx_sdk" ; then
  1212. echo "$ac_t""no" 1>&6
  1213. else
  1214. ac_safe=`echo "$with_macosx_sdk/SDKSettings.plist" | sed 'y%./+-%__p_%'`
  1215. echo $ac_n "checking for $with_macosx_sdk/SDKSettings.plist""... $ac_c" 1>&6
  1216. echo "configure:1405: checking for $with_macosx_sdk/SDKSettings.plist" >&5
  1217. if test "$cross_compiling" = yes; then
  1218. { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
  1219. else
  1220. if test -r $with_macosx_sdk/SDKSettings.plist; then
  1221. eval "ac_cv_file_$ac_safe=yes"
  1222. else
  1223. eval "ac_cv_file_$ac_safe=no"
  1224. fi
  1225. fi
  1226. if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
  1227. echo "$ac_t""yes" 1>&6
  1228. MACOSX_SDK="-isysroot $with_macosx_sdk"
  1229. else
  1230. echo "$ac_t""no" 1>&6
  1231. { echo "configure: error: *** specified SDK does not exist or is not a SDK" 1>&2; exit 1; }
  1232. fi
  1233. LDFLAGS="$LDFLAGS $MACOSX_SDK"
  1234. CFLAGS="$CFLAGS $MACOSX_SDK"
  1235. CXXFLAGS="$CXXFLAGS $MACOSX_SDK"
  1236. fi
  1237. # Done checking MacOSX SDK
  1238. # Set INST_DIR
  1239. if test -n "$MACOSX_APP" ; then
  1240. INSTDIR='${prefix}'"/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.app/Contents/MacOS"
  1241. else
  1242. INSTDIR='${prefix}'"/grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}"
  1243. fi
  1244. # Get flags for building shared libraries
  1245. echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
  1246. echo "configure:1449: checking how to build libraries" >&5
  1247. # Check whether --enable-shared or --disable-shared was given.
  1248. if test "${enable_shared+set}" = set; then
  1249. enableval="$enable_shared"
  1250. shared_ok=$enableval
  1251. else
  1252. shared_ok=yes
  1253. fi
  1254. if test "${enable_shared+set}" = set; then
  1255. enableval="$enable_shared"
  1256. shared_ok=$enableval
  1257. else
  1258. shared_ok=yes
  1259. fi
  1260. if test "$shared_ok" = "yes" ; then
  1261. echo "$ac_t""shared" 1>&6
  1262. SHARED_BUILD=1
  1263. GRASS_LIBRARY_TYPE='shlib'
  1264. else
  1265. echo "$ac_t""static" 1>&6
  1266. SHARED_BUILD=0
  1267. cat >> confdefs.h <<\EOF
  1268. #define STATIC_BUILD 1
  1269. EOF
  1270. GRASS_LIBRARY_TYPE='stlib'
  1271. fi
  1272. ac_save_ldflags="$LDFLAGS"
  1273. SHLIB_CFLAGS=""
  1274. SHLIB_LD_FLAGS=""
  1275. SHLIB_LD_LIBS=""
  1276. SHLIB_SUFFIX=""
  1277. SHLIB_LD=""
  1278. STLIB_LD='${AR} cr'
  1279. STLIB_SUFFIX='.a'
  1280. LDFLAGS=""
  1281. CC_SEARCH_FLAGS=""
  1282. LD_SEARCH_FLAGS=""
  1283. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1284. PLAT_OBJS=""
  1285. case $host in
  1286. *-linux-*)
  1287. SHLIB_CFLAGS="-fPIC"
  1288. SHLIB_LD_FLAGS=""
  1289. SHLIB_LD_LIBS='${LIBS}'
  1290. SHLIB_SUFFIX=".so"
  1291. SHLIB_LD="${CC} -shared"
  1292. LDFLAGS="-Wl,--export-dynamic"
  1293. CC_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
  1294. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1295. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1296. ;;
  1297. *-pc-cygwin)
  1298. SHLIB_LD_LIBS='${LIBS}'
  1299. SHLIB_SUFFIX=".dll"
  1300. SHLIB_LD="${CC} -shared"
  1301. LDFLAGS="-Wl,--export-dynamic"
  1302. LD_LIBRARY_PATH_VAR="PATH"
  1303. ;;
  1304. *-pc-mingw32)
  1305. SHLIB_LD_LIBS='${LIBS}'
  1306. SHLIB_SUFFIX=".dll"
  1307. SHLIB_LD="${CC} -shared"
  1308. LDFLAGS="-Wl,--export-dynamic,--enable-runtime-pseudo-reloc"
  1309. LD_LIBRARY_PATH_VAR="PATH"
  1310. ;;
  1311. *-apple-darwin*)
  1312. SHLIB_CFLAGS="-fno-common"
  1313. SHLIB_LD_LIBS='${LIBS}'
  1314. SHLIB_SUFFIX=".dylib"
  1315. 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}"
  1316. LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
  1317. ;;
  1318. *-sun-solaris*)
  1319. # Note: If _REENTRANT isn't defined, then Solaris
  1320. # won't define thread-safe library routines.
  1321. cat >> confdefs.h <<\EOF
  1322. #define _REENTRANT 1
  1323. EOF
  1324. cat >> confdefs.h <<\EOF
  1325. #define _POSIX_PTHREAD_SEMANTICS 1
  1326. EOF
  1327. # Note: need the LIBS below, otherwise Tk won't find Tcl's
  1328. # symbols when dynamically loaded into tclsh.
  1329. if test "$GCC" = "yes" ; then
  1330. SHLIB_CFLAGS="-fPIC"
  1331. SHLIB_LD="$CC -shared"
  1332. CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  1333. else
  1334. SHLIB_CFLAGS="-KPIC"
  1335. SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  1336. CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  1337. fi
  1338. SHLIB_SUFFIX=".so"
  1339. SHLIB_LD_LIBS='${LIBS}'
  1340. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1341. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1342. ;;
  1343. *)
  1344. { echo "configure: error: ***Unknown platform: $host***" 1>&2; exit 1; }
  1345. ;;
  1346. esac
  1347. LDFLAGS="${ac_save_ldflags} $LDFLAGS"
  1348. # Enable options
  1349. # Check whether --enable-w11 or --disable-w11 was given.
  1350. if test "${enable_w11+set}" = set; then
  1351. enableval="$enable_w11"
  1352. :
  1353. else
  1354. enable_w11=no
  1355. fi
  1356. # With options
  1357. # Check whether --with-cxx or --without-cxx was given.
  1358. if test "${with_cxx+set}" = set; then
  1359. withval="$with_cxx"
  1360. :
  1361. else
  1362. with_cxx=yes
  1363. fi
  1364. #LOC_ARG_WITH(g77, GNU Fortran 77, no)
  1365. # Check whether --with-macosx-archs or --without-macosx-archs was given.
  1366. if test "${with_macosx_archs+set}" = set; then
  1367. withval="$with_macosx_archs"
  1368. :
  1369. else
  1370. with_macosx_archs="no"
  1371. fi
  1372. # Check whether --with-macosx-sdk or --without-macosx-sdk was given.
  1373. if test "${with_macosx_sdk+set}" = set; then
  1374. withval="$with_macosx_sdk"
  1375. :
  1376. else
  1377. with_macosx_sdk="no"
  1378. fi
  1379. # Check whether --with-jpeg or --without-jpeg was given.
  1380. if test "${with_jpeg+set}" = set; then
  1381. withval="$with_jpeg"
  1382. :
  1383. else
  1384. with_jpeg=yes
  1385. fi
  1386. # Check whether --with-tiff or --without-tiff was given.
  1387. if test "${with_tiff+set}" = set; then
  1388. withval="$with_tiff"
  1389. :
  1390. else
  1391. with_tiff=yes
  1392. fi
  1393. # Check whether --with-png or --without-png was given.
  1394. if test "${with_png+set}" = set; then
  1395. withval="$with_png"
  1396. :
  1397. else
  1398. with_png=yes
  1399. fi
  1400. # Check whether --with-tcltk or --without-tcltk was given.
  1401. if test "${with_tcltk+set}" = set; then
  1402. withval="$with_tcltk"
  1403. :
  1404. else
  1405. with_tcltk=yes
  1406. fi
  1407. # Check whether --with-postgres or --without-postgres was given.
  1408. if test "${with_postgres+set}" = set; then
  1409. withval="$with_postgres"
  1410. :
  1411. else
  1412. with_postgres=no
  1413. fi
  1414. # Check whether --with-mysql or --without-mysql was given.
  1415. if test "${with_mysql+set}" = set; then
  1416. withval="$with_mysql"
  1417. :
  1418. else
  1419. with_mysql=no
  1420. fi
  1421. # Check whether --with-sqlite or --without-sqlite was given.
  1422. if test "${with_sqlite+set}" = set; then
  1423. withval="$with_sqlite"
  1424. :
  1425. else
  1426. with_sqlite=no
  1427. fi
  1428. # Check whether --with-ffmpeg or --without-ffmpeg was given.
  1429. if test "${with_ffmpeg+set}" = set; then
  1430. withval="$with_ffmpeg"
  1431. :
  1432. else
  1433. with_ffmpeg=no
  1434. fi
  1435. # Check whether --with-opengl or --without-opengl was given.
  1436. if test "${with_opengl+set}" = set; then
  1437. withval="$with_opengl"
  1438. :
  1439. else
  1440. with_opengl=yes
  1441. fi
  1442. # Check whether --with-odbc or --without-odbc was given.
  1443. if test "${with_odbc+set}" = set; then
  1444. withval="$with_odbc"
  1445. :
  1446. else
  1447. with_odbc=no
  1448. fi
  1449. # Check whether --with-fftw or --without-fftw was given.
  1450. if test "${with_fftw+set}" = set; then
  1451. withval="$with_fftw"
  1452. :
  1453. else
  1454. with_fftw=yes
  1455. fi
  1456. # Check whether --with-blas or --without-blas was given.
  1457. if test "${with_blas+set}" = set; then
  1458. withval="$with_blas"
  1459. :
  1460. else
  1461. with_blas=no
  1462. fi
  1463. # Check whether --with-lapack or --without-lapack was given.
  1464. if test "${with_lapack+set}" = set; then
  1465. withval="$with_lapack"
  1466. :
  1467. else
  1468. with_lapack=no
  1469. fi
  1470. # Check whether --with-cairo or --without-cairo was given.
  1471. if test "${with_cairo+set}" = set; then
  1472. withval="$with_cairo"
  1473. :
  1474. else
  1475. with_cairo=yes
  1476. fi
  1477. # Check whether --with-freetype or --without-freetype was given.
  1478. if test "${with_freetype+set}" = set; then
  1479. withval="$with_freetype"
  1480. :
  1481. else
  1482. with_freetype=yes
  1483. fi
  1484. # Check whether --with-nls or --without-nls was given.
  1485. if test "${with_nls+set}" = set; then
  1486. withval="$with_nls"
  1487. :
  1488. else
  1489. with_nls=no
  1490. fi
  1491. # Check whether --with-readline or --without-readline was given.
  1492. if test "${with_readline+set}" = set; then
  1493. withval="$with_readline"
  1494. :
  1495. else
  1496. with_readline=no
  1497. fi
  1498. # Check whether --with-opendwg or --without-opendwg was given.
  1499. if test "${with_opendwg+set}" = set; then
  1500. withval="$with_opendwg"
  1501. :
  1502. else
  1503. with_opendwg=no
  1504. fi
  1505. # Check whether --with-regex or --without-regex was given.
  1506. if test "${with_regex+set}" = set; then
  1507. withval="$with_regex"
  1508. :
  1509. else
  1510. with_regex=yes
  1511. fi
  1512. # Check whether --with-pthread or --without-pthread was given.
  1513. if test "${with_pthread+set}" = set; then
  1514. withval="$with_pthread"
  1515. :
  1516. else
  1517. with_pthread=no
  1518. fi
  1519. # Check whether --with-openmp or --without-openmp was given.
  1520. if test "${with_openmp+set}" = set; then
  1521. withval="$with_openmp"
  1522. :
  1523. else
  1524. with_openmp=no
  1525. fi
  1526. # Check whether --with-gdal or --without-gdal was given.
  1527. if test "${with_gdal+set}" = set; then
  1528. withval="$with_gdal"
  1529. :
  1530. fi
  1531. # Check whether --with-liblas or --without-liblas was given.
  1532. if test "${with_liblas+set}" = set; then
  1533. withval="$with_liblas"
  1534. :
  1535. else
  1536. with_liblas="no"
  1537. fi
  1538. # Check whether --with-wxwidgets or --without-wxwidgets was given.
  1539. if test "${with_wxwidgets+set}" = set; then
  1540. withval="$with_wxwidgets"
  1541. :
  1542. else
  1543. with_wxwidgets="no"
  1544. fi
  1545. # With includes and libs options
  1546. # Check whether --with-geos or --without-geos was given.
  1547. if test "${with_geos+set}" = set; then
  1548. withval="$with_geos"
  1549. :
  1550. else
  1551. with_geos="no"
  1552. fi
  1553. # Check whether --with-includes or --without-includes was given.
  1554. if test "${with_includes+set}" = set; then
  1555. withval="$with_includes"
  1556. :
  1557. fi
  1558. # Check whether --with-libs or --without-libs was given.
  1559. if test "${with_libs+set}" = set; then
  1560. withval="$with_libs"
  1561. :
  1562. fi
  1563. # Check whether --with-zlib-includes or --without-zlib-includes was given.
  1564. if test "${with_zlib_includes+set}" = set; then
  1565. withval="$with_zlib_includes"
  1566. :
  1567. fi
  1568. # Check whether --with-zlib-libs or --without-zlib-libs was given.
  1569. if test "${with_zlib_libs+set}" = set; then
  1570. withval="$with_zlib_libs"
  1571. :
  1572. fi
  1573. # Check whether --with-readline-includes or --without-readline-includes was given.
  1574. if test "${with_readline_includes+set}" = set; then
  1575. withval="$with_readline_includes"
  1576. :
  1577. fi
  1578. # Check whether --with-readline-libs or --without-readline-libs was given.
  1579. if test "${with_readline_libs+set}" = set; then
  1580. withval="$with_readline_libs"
  1581. :
  1582. fi
  1583. # Check whether --with-jpeg-includes or --without-jpeg-includes was given.
  1584. if test "${with_jpeg_includes+set}" = set; then
  1585. withval="$with_jpeg_includes"
  1586. :
  1587. fi
  1588. # Check whether --with-jpeg-libs or --without-jpeg-libs was given.
  1589. if test "${with_jpeg_libs+set}" = set; then
  1590. withval="$with_jpeg_libs"
  1591. :
  1592. fi
  1593. # Check whether --with-tiff-includes or --without-tiff-includes was given.
  1594. if test "${with_tiff_includes+set}" = set; then
  1595. withval="$with_tiff_includes"
  1596. :
  1597. fi
  1598. # Check whether --with-tiff-libs or --without-tiff-libs was given.
  1599. if test "${with_tiff_libs+set}" = set; then
  1600. withval="$with_tiff_libs"
  1601. :
  1602. fi
  1603. # Check whether --with-png-includes or --without-png-includes was given.
  1604. if test "${with_png_includes+set}" = set; then
  1605. withval="$with_png_includes"
  1606. :
  1607. fi
  1608. # Check whether --with-png-libs or --without-png-libs was given.
  1609. if test "${with_png_libs+set}" = set; then
  1610. withval="$with_png_libs"
  1611. :
  1612. fi
  1613. # Check whether --with-tcltk-includes or --without-tcltk-includes was given.
  1614. if test "${with_tcltk_includes+set}" = set; then
  1615. withval="$with_tcltk_includes"
  1616. :
  1617. fi
  1618. # Check whether --with-tcltk-libs or --without-tcltk-libs was given.
  1619. if test "${with_tcltk_libs+set}" = set; then
  1620. withval="$with_tcltk_libs"
  1621. :
  1622. fi
  1623. # Check whether --with-postgres-includes or --without-postgres-includes was given.
  1624. if test "${with_postgres_includes+set}" = set; then
  1625. withval="$with_postgres_includes"
  1626. :
  1627. fi
  1628. # Check whether --with-postgres-libs or --without-postgres-libs was given.
  1629. if test "${with_postgres_libs+set}" = set; then
  1630. withval="$with_postgres_libs"
  1631. :
  1632. fi
  1633. # Check whether --with-mysql-includes or --without-mysql-includes was given.
  1634. if test "${with_mysql_includes+set}" = set; then
  1635. withval="$with_mysql_includes"
  1636. :
  1637. fi
  1638. # Check whether --with-mysql-libs or --without-mysql-libs was given.
  1639. if test "${with_mysql_libs+set}" = set; then
  1640. withval="$with_mysql_libs"
  1641. :
  1642. fi
  1643. # Check whether --with-sqlite-includes or --without-sqlite-includes was given.
  1644. if test "${with_sqlite_includes+set}" = set; then
  1645. withval="$with_sqlite_includes"
  1646. :
  1647. fi
  1648. # Check whether --with-sqlite-libs or --without-sqlite-libs was given.
  1649. if test "${with_sqlite_libs+set}" = set; then
  1650. withval="$with_sqlite_libs"
  1651. :
  1652. fi
  1653. # Check whether --with-ffmpeg-includes or --without-ffmpeg-includes was given.
  1654. if test "${with_ffmpeg_includes+set}" = set; then
  1655. withval="$with_ffmpeg_includes"
  1656. :
  1657. fi
  1658. # Check whether --with-ffmpeg-libs or --without-ffmpeg-libs was given.
  1659. if test "${with_ffmpeg_libs+set}" = set; then
  1660. withval="$with_ffmpeg_libs"
  1661. :
  1662. fi
  1663. # Check whether --with-opengl-includes or --without-opengl-includes was given.
  1664. if test "${with_opengl_includes+set}" = set; then
  1665. withval="$with_opengl_includes"
  1666. :
  1667. fi
  1668. # Check whether --with-opengl-libs or --without-opengl-libs was given.
  1669. if test "${with_opengl_libs+set}" = set; then
  1670. withval="$with_opengl_libs"
  1671. :
  1672. fi
  1673. # Check whether --with-opengl-framework or --without-opengl-framework was given.
  1674. if test "${with_opengl_framework+set}" = set; then
  1675. withval="$with_opengl_framework"
  1676. :
  1677. fi
  1678. # Check whether --with-odbc-includes or --without-odbc-includes was given.
  1679. if test "${with_odbc_includes+set}" = set; then
  1680. withval="$with_odbc_includes"
  1681. :
  1682. fi
  1683. # Check whether --with-odbc-libs or --without-odbc-libs was given.
  1684. if test "${with_odbc_libs+set}" = set; then
  1685. withval="$with_odbc_libs"
  1686. :
  1687. fi
  1688. # Check whether --with-fftw-includes or --without-fftw-includes was given.
  1689. if test "${with_fftw_includes+set}" = set; then
  1690. withval="$with_fftw_includes"
  1691. :
  1692. fi
  1693. # Check whether --with-fftw-libs or --without-fftw-libs was given.
  1694. if test "${with_fftw_libs+set}" = set; then
  1695. withval="$with_fftw_libs"
  1696. :
  1697. fi
  1698. # Check whether --with-blas-includes or --without-blas-includes was given.
  1699. if test "${with_blas_includes+set}" = set; then
  1700. withval="$with_blas_includes"
  1701. :
  1702. fi
  1703. # Check whether --with-blas-libs or --without-blas-libs was given.
  1704. if test "${with_blas_libs+set}" = set; then
  1705. withval="$with_blas_libs"
  1706. :
  1707. fi
  1708. # Check whether --with-lapack-includes or --without-lapack-includes was given.
  1709. if test "${with_lapack_includes+set}" = set; then
  1710. withval="$with_lapack_includes"
  1711. :
  1712. fi
  1713. # Check whether --with-lapack-libs or --without-lapack-libs was given.
  1714. if test "${with_lapack_libs+set}" = set; then
  1715. withval="$with_lapack_libs"
  1716. :
  1717. fi
  1718. # Check whether --with-cairo-includes or --without-cairo-includes was given.
  1719. if test "${with_cairo_includes+set}" = set; then
  1720. withval="$with_cairo_includes"
  1721. :
  1722. fi
  1723. # Check whether --with-cairo-libs or --without-cairo-libs was given.
  1724. if test "${with_cairo_libs+set}" = set; then
  1725. withval="$with_cairo_libs"
  1726. :
  1727. fi
  1728. # Check whether --with-cairo-ldflags or --without-cairo-ldflags was given.
  1729. if test "${with_cairo_ldflags+set}" = set; then
  1730. withval="$with_cairo_ldflags"
  1731. :
  1732. fi
  1733. # Check whether --with-freetype-includes or --without-freetype-includes was given.
  1734. if test "${with_freetype_includes+set}" = set; then
  1735. withval="$with_freetype_includes"
  1736. :
  1737. fi
  1738. # Check whether --with-freetype-libs or --without-freetype-libs was given.
  1739. if test "${with_freetype_libs+set}" = set; then
  1740. withval="$with_freetype_libs"
  1741. :
  1742. fi
  1743. # Check whether --with-proj-includes or --without-proj-includes was given.
  1744. if test "${with_proj_includes+set}" = set; then
  1745. withval="$with_proj_includes"
  1746. :
  1747. fi
  1748. # Check whether --with-proj-libs or --without-proj-libs was given.
  1749. if test "${with_proj_libs+set}" = set; then
  1750. withval="$with_proj_libs"
  1751. :
  1752. fi
  1753. # Check whether --with-proj-share or --without-proj-share was given.
  1754. if test "${with_proj_share+set}" = set; then
  1755. withval="$with_proj_share"
  1756. :
  1757. fi
  1758. # Check whether --with-opendwg-includes or --without-opendwg-includes was given.
  1759. if test "${with_opendwg_includes+set}" = set; then
  1760. withval="$with_opendwg_includes"
  1761. :
  1762. fi
  1763. # Check whether --with-opendwg-libs or --without-opendwg-libs was given.
  1764. if test "${with_opendwg_libs+set}" = set; then
  1765. withval="$with_opendwg_libs"
  1766. :
  1767. fi
  1768. # Check whether --with-regex-includes or --without-regex-includes was given.
  1769. if test "${with_regex_includes+set}" = set; then
  1770. withval="$with_regex_includes"
  1771. :
  1772. fi
  1773. # Check whether --with-regex-libs or --without-regex-libs was given.
  1774. if test "${with_regex_libs+set}" = set; then
  1775. withval="$with_regex_libs"
  1776. :
  1777. fi
  1778. # Check whether --with-pthread-includes or --without-pthread-includes was given.
  1779. if test "${with_pthread_includes+set}" = set; then
  1780. withval="$with_pthread_includes"
  1781. :
  1782. fi
  1783. # Check whether --with-pthread-libs or --without-pthread-libs was given.
  1784. if test "${with_pthread_libs+set}" = set; then
  1785. withval="$with_pthread_libs"
  1786. :
  1787. fi
  1788. # Check whether --with-openmp-includes or --without-openmp-includes was given.
  1789. if test "${with_openmp_includes+set}" = set; then
  1790. withval="$with_openmp_includes"
  1791. :
  1792. fi
  1793. # Check whether --with-openmp-libs or --without-openmp-libs was given.
  1794. if test "${with_openmp_libs+set}" = set; then
  1795. withval="$with_openmp_libs"
  1796. :
  1797. fi
  1798. # Put this early on so CPPFLAGS and LDFLAGS have any additional dirs
  1799. # With includes option
  1800. # Handle Fortran compiler choice
  1801. #LOC_CHECK_USE(g77, GNU Fortran 77, USE_G77)
  1802. # Done checking fortran
  1803. echo $ac_n "checking for additional include dirs""... $ac_c" 1>&6
  1804. echo "configure:2288: checking for additional include dirs" >&5
  1805. case "$with_includes" in
  1806. y | ye | yes | n | no)
  1807. { echo "configure: error: *** You must supply a directory to list --with-includes." 1>&2; exit 1; }
  1808. ;;
  1809. esac
  1810. echo "$ac_t""$with_includes" 1>&6
  1811. if test -n "$with_includes"; then
  1812. for dir in $with_includes; do
  1813. if test -d "$dir"; then
  1814. INCLUDE_DIRS="$INCLUDE_DIRS -I$dir"
  1815. else
  1816. { echo "configure: error: *** Include directory $dir does not exist." 1>&2; exit 1; }
  1817. fi
  1818. done
  1819. CPPFLAGS="$CPPFLAGS $INCLUDE_DIRS"
  1820. fi
  1821. # With libs option
  1822. echo $ac_n "checking for additional library dirs""... $ac_c" 1>&6
  1823. echo "configure:2311: checking for additional library dirs" >&5
  1824. case "$with_libs" in
  1825. y | ye | yes | n | no)
  1826. { echo "configure: error: *** You must supply a directory list to --with-libs." 1>&2; exit 1; }
  1827. ;;
  1828. esac
  1829. echo "$ac_t""$with_libs" 1>&6
  1830. if test -n "$with_libs"; then
  1831. for dir in $with_libs; do
  1832. if test -d "$dir"; then
  1833. LIBRARY_DIRS="$LIBRARY_DIRS -L$dir"
  1834. else
  1835. { echo "configure: error: *** Library directory $dir does not exist." 1>&2; exit 1; }
  1836. fi
  1837. done
  1838. LDFLAGS="$LDFLAGS $LIBRARY_DIRS"
  1839. fi
  1840. # Programs and standard headers, libraries, functions
  1841. # Find a good install program. We prefer a C program (faster),
  1842. # so one script is as good as another. But avoid the broken or
  1843. # incompatible versions:
  1844. # SysV /etc/install, /usr/sbin/install
  1845. # SunOS /usr/etc/install
  1846. # IRIX /sbin/install
  1847. # AIX /bin/install
  1848. # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  1849. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  1850. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  1851. # ./install, which can be erroneously created by make from ./install.sh.
  1852. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  1853. echo "configure:2345: checking for a BSD compatible install" >&5
  1854. if test -z "$INSTALL"; then
  1855. IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
  1856. for ac_dir in $PATH; do
  1857. # Account for people who put trailing slashes in PATH elements.
  1858. case "$ac_dir/" in
  1859. /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  1860. *)
  1861. # OSF1 and SCO ODT 3.0 have their own names for install.
  1862. # Don't use installbsd from OSF since it installs stuff as root
  1863. # by default.
  1864. for ac_prog in ginstall scoinst install; do
  1865. if test -f $ac_dir/$ac_prog; then
  1866. if test $ac_prog = install &&
  1867. grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  1868. # AIX install. It has an incompatible calling convention.
  1869. :
  1870. else
  1871. ac_cv_path_install="$ac_dir/$ac_prog -c"
  1872. break 2
  1873. fi
  1874. fi
  1875. done
  1876. ;;
  1877. esac
  1878. done
  1879. IFS="$ac_save_IFS"
  1880. if test "${ac_cv_path_install+set}" = set; then
  1881. INSTALL="$ac_cv_path_install"
  1882. else
  1883. # As a last resort, use the slow shell script. We don't cache a
  1884. # path for INSTALL within a source directory, because that will
  1885. # break other packages using the cache if that directory is
  1886. # removed, or if the path is relative.
  1887. INSTALL="$ac_install_sh"
  1888. fi
  1889. fi
  1890. echo "$ac_t""$INSTALL" 1>&6
  1891. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  1892. # It thinks the first close brace ends the variable substitution.
  1893. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  1894. test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  1895. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  1896. # Extract the first word of "flex", so it can be a program name with args.
  1897. set dummy flex; ac_word=$2
  1898. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1899. echo "configure:2398: checking for $ac_word" >&5
  1900. if test -n "$LEX"; then
  1901. ac_cv_prog_LEX="$LEX" # Let the user override the test.
  1902. else
  1903. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1904. ac_dummy="$PATH"
  1905. for ac_dir in $ac_dummy; do
  1906. test -z "$ac_dir" && ac_dir=.
  1907. if test -f $ac_dir/$ac_word; then
  1908. ac_cv_prog_LEX="flex"
  1909. break
  1910. fi
  1911. done
  1912. IFS="$ac_save_ifs"
  1913. test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
  1914. fi
  1915. LEX="$ac_cv_prog_LEX"
  1916. if test -n "$LEX"; then
  1917. echo "$ac_t""$LEX" 1>&6
  1918. else
  1919. echo "$ac_t""no" 1>&6
  1920. fi
  1921. if test -z "$LEXLIB"
  1922. then
  1923. case "$LEX" in
  1924. flex*) ac_lib=fl ;;
  1925. *) ac_lib=l ;;
  1926. esac
  1927. echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
  1928. echo "configure:2429: checking for yywrap in -l$ac_lib" >&5
  1929. ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
  1930. ac_save_LIBS="$LIBS"
  1931. LIBS="-l$ac_lib $LIBS"
  1932. cat > conftest.$ac_ext <<EOF
  1933. #line 2435 "configure"
  1934. #include "confdefs.h"
  1935. /* Override any gcc2 internal prototype to avoid an error. */
  1936. /* We use char because int might match the return type of a gcc2
  1937. builtin and then its argument prototype would still apply. */
  1938. char yywrap();
  1939. int main() {
  1940. yywrap()
  1941. ; return 0; }
  1942. EOF
  1943. if { (eval echo configure:2446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1944. rm -rf conftest*
  1945. eval "ac_cv_lib_$ac_lib_var=yes"
  1946. else
  1947. echo "configure: failed program was:" >&5
  1948. cat conftest.$ac_ext >&5
  1949. rm -rf conftest*
  1950. eval "ac_cv_lib_$ac_lib_var=no"
  1951. fi
  1952. rm -f conftest*
  1953. LIBS="$ac_save_LIBS"
  1954. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1955. echo "$ac_t""yes" 1>&6
  1956. LEXLIB="-l$ac_lib"
  1957. else
  1958. echo "$ac_t""no" 1>&6
  1959. fi
  1960. fi
  1961. if test "$LEX" = "lex"; then
  1962. # Extract the first word of "lex", so it can be a program name with args.
  1963. set dummy lex; ac_word=$2
  1964. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1965. echo "configure:2471: checking for $ac_word" >&5
  1966. case "$LEXPATH" in
  1967. /*)
  1968. ac_cv_path_LEXPATH="$LEXPATH" # Let the user override the test with a path.
  1969. ;;
  1970. ?:/*)
  1971. ac_cv_path_LEXPATH="$LEXPATH" # Let the user override the test with a dos path.
  1972. ;;
  1973. *)
  1974. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1975. ac_dummy="$PATH"
  1976. for ac_dir in $ac_dummy; do
  1977. test -z "$ac_dir" && ac_dir=.
  1978. if test -f $ac_dir/$ac_word; then
  1979. ac_cv_path_LEXPATH="$ac_dir/$ac_word"
  1980. break
  1981. fi
  1982. done
  1983. IFS="$ac_save_ifs"
  1984. test -z "$ac_cv_path_LEXPATH" && ac_cv_path_LEXPATH="no"
  1985. ;;
  1986. esac
  1987. LEXPATH="$ac_cv_path_LEXPATH"
  1988. if test -n "$LEXPATH"; then
  1989. echo "$ac_t""$LEXPATH" 1>&6
  1990. else
  1991. echo "$ac_t""no" 1>&6
  1992. fi
  1993. if test "$LEXPATH" = "no"; then
  1994. { echo "configure: error: *** Unable to locate lex." 1>&2; exit 1; }
  1995. fi
  1996. fi
  1997. for ac_prog in 'bison -y' byacc
  1998. do
  1999. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2000. set dummy $ac_prog; ac_word=$2
  2001. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2002. echo "configure:2511: checking for $ac_word" >&5
  2003. if test -n "$YACC"; then
  2004. ac_cv_prog_YACC="$YACC" # Let the user override the test.
  2005. else
  2006. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2007. ac_dummy="$PATH"
  2008. for ac_dir in $ac_dummy; do
  2009. test -z "$ac_dir" && ac_dir=.
  2010. if test -f $ac_dir/$ac_word; then
  2011. ac_cv_prog_YACC="$ac_prog"
  2012. break
  2013. fi
  2014. done
  2015. IFS="$ac_save_ifs"
  2016. fi
  2017. YACC="$ac_cv_prog_YACC"
  2018. if test -n "$YACC"; then
  2019. echo "$ac_t""$YACC" 1>&6
  2020. else
  2021. echo "$ac_t""no" 1>&6
  2022. fi
  2023. test -n "$YACC" && break
  2024. done
  2025. test -n "$YACC" || YACC="yacc"
  2026. if test "$YACC" = "yacc"; then
  2027. # Extract the first word of "yacc", so it can be a program name with args.
  2028. set dummy yacc; ac_word=$2
  2029. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2030. echo "configure:2542: checking for $ac_word" >&5
  2031. case "$YACCPATH" in
  2032. /*)
  2033. ac_cv_path_YACCPATH="$YACCPATH" # Let the user override the test with a path.
  2034. ;;
  2035. ?:/*)
  2036. ac_cv_path_YACCPATH="$YACCPATH" # Let the user override the test with a dos path.
  2037. ;;
  2038. *)
  2039. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2040. ac_dummy="$PATH"
  2041. for ac_dir in $ac_dummy; do
  2042. test -z "$ac_dir" && ac_dir=.
  2043. if test -f $ac_dir/$ac_word; then
  2044. ac_cv_path_YACCPATH="$ac_dir/$ac_word"
  2045. break
  2046. fi
  2047. done
  2048. IFS="$ac_save_ifs"
  2049. test -z "$ac_cv_path_YACCPATH" && ac_cv_path_YACCPATH="no"
  2050. ;;
  2051. esac
  2052. YACCPATH="$ac_cv_path_YACCPATH"
  2053. if test -n "$YACCPATH"; then
  2054. echo "$ac_t""$YACCPATH" 1>&6
  2055. else
  2056. echo "$ac_t""no" 1>&6
  2057. fi
  2058. if test "$YACCPATH" = "no"; then
  2059. { echo "configure: error: *** Unable to locate yacc." 1>&2; exit 1; }
  2060. fi
  2061. fi
  2062. # Extract the first word of "ranlib", so it can be a program name with args.
  2063. set dummy ranlib; ac_word=$2
  2064. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2065. echo "configure:2580: checking for $ac_word" >&5
  2066. if test -n "$RANLIB"; then
  2067. ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  2068. else
  2069. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2070. ac_dummy="$PATH"
  2071. for ac_dir in $ac_dummy; do
  2072. test -z "$ac_dir" && ac_dir=.
  2073. if test -f $ac_dir/$ac_word; then
  2074. ac_cv_prog_RANLIB="ranlib"
  2075. break
  2076. fi
  2077. done
  2078. IFS="$ac_save_ifs"
  2079. test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  2080. fi
  2081. RANLIB="$ac_cv_prog_RANLIB"
  2082. if test -n "$RANLIB"; then
  2083. echo "$ac_t""$RANLIB" 1>&6
  2084. else
  2085. echo "$ac_t""no" 1>&6
  2086. fi
  2087. for ac_prog in ar
  2088. do
  2089. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2090. set dummy $ac_prog; ac_word=$2
  2091. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2092. echo "configure:2609: checking for $ac_word" >&5
  2093. if test -n "$AR"; then
  2094. ac_cv_prog_AR="$AR" # Let the user override the test.
  2095. else
  2096. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2097. ac_dummy="$PATH"
  2098. for ac_dir in $ac_dummy; do
  2099. test -z "$ac_dir" && ac_dir=.
  2100. if test -f $ac_dir/$ac_word; then
  2101. ac_cv_prog_AR="$ac_prog"
  2102. break
  2103. fi
  2104. done
  2105. IFS="$ac_save_ifs"
  2106. fi
  2107. AR="$ac_cv_prog_AR"
  2108. if test -n "$AR"; then
  2109. echo "$ac_t""$AR" 1>&6
  2110. else
  2111. echo "$ac_t""no" 1>&6
  2112. fi
  2113. test -n "$AR" && break
  2114. done
  2115. for ac_prog in env
  2116. do
  2117. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2118. set dummy $ac_prog; ac_word=$2
  2119. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2120. echo "configure:2640: checking for $ac_word" >&5
  2121. if test -n "$ENV"; then
  2122. ac_cv_prog_ENV="$ENV" # Let the user override the test.
  2123. else
  2124. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2125. ac_dummy="$PATH"
  2126. for ac_dir in $ac_dummy; do
  2127. test -z "$ac_dir" && ac_dir=.
  2128. if test -f $ac_dir/$ac_word; then
  2129. ac_cv_prog_ENV="$ac_prog"
  2130. break
  2131. fi
  2132. done
  2133. IFS="$ac_save_ifs"
  2134. fi
  2135. ENV="$ac_cv_prog_ENV"
  2136. if test -n "$ENV"; then
  2137. echo "$ac_t""$ENV" 1>&6
  2138. else
  2139. echo "$ac_t""no" 1>&6
  2140. fi
  2141. test -n "$ENV" && break
  2142. done
  2143. # Extract the first word of "perl", so it can be a program name with args.
  2144. set dummy perl; ac_word=$2
  2145. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2146. echo "configure:2669: checking for $ac_word" >&5
  2147. case "$PERL" in
  2148. /*)
  2149. ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
  2150. ;;
  2151. ?:/*)
  2152. ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
  2153. ;;
  2154. *)
  2155. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2156. ac_dummy="$PATH"
  2157. for ac_dir in $ac_dummy; do
  2158. test -z "$ac_dir" && ac_dir=.
  2159. if test -f $ac_dir/$ac_word; then
  2160. ac_cv_path_PERL="$ac_dir/$ac_word"
  2161. break
  2162. fi
  2163. done
  2164. IFS="$ac_save_ifs"
  2165. test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no"
  2166. ;;
  2167. esac
  2168. PERL="$ac_cv_path_PERL"
  2169. if test -n "$PERL"; then
  2170. echo "$ac_t""$PERL" 1>&6
  2171. else
  2172. echo "$ac_t""no" 1>&6
  2173. fi
  2174. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  2175. echo "configure:2700: checking how to run the C preprocessor" >&5
  2176. # On Suns, sometimes $CPP names a directory.
  2177. if test -n "$CPP" && test -d "$CPP"; then
  2178. CPP=
  2179. fi
  2180. if test -z "$CPP"; then
  2181. # This must be in double quotes, not single quotes, because CPP may get
  2182. # substituted into the Makefile and "${CC-cc}" will confuse make.
  2183. CPP="${CC-cc} -E"
  2184. # On the NeXT, cc -E runs the code through the compiler's parser,
  2185. # not just through cpp.
  2186. cat > conftest.$ac_ext <<EOF
  2187. #line 2713 "configure"
  2188. #include "confdefs.h"
  2189. #include <assert.h>
  2190. Syntax Error
  2191. EOF
  2192. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2193. { (eval echo configure:2719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2194. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2195. if test -z "$ac_err"; then
  2196. :
  2197. else
  2198. echo "$ac_err" >&5
  2199. echo "configure: failed program was:" >&5
  2200. cat conftest.$ac_ext >&5
  2201. rm -rf conftest*
  2202. CPP="${CC-cc} -E -traditional-cpp"
  2203. cat > conftest.$ac_ext <<EOF
  2204. #line 2730 "configure"
  2205. #include "confdefs.h"
  2206. #include <assert.h>
  2207. Syntax Error
  2208. EOF
  2209. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2210. { (eval echo configure:2736: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2211. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2212. if test -z "$ac_err"; then
  2213. :
  2214. else
  2215. echo "$ac_err" >&5
  2216. echo "configure: failed program was:" >&5
  2217. cat conftest.$ac_ext >&5
  2218. rm -rf conftest*
  2219. CPP="${CC-cc} -nologo -E"
  2220. cat > conftest.$ac_ext <<EOF
  2221. #line 2747 "configure"
  2222. #include "confdefs.h"
  2223. #include <assert.h>
  2224. Syntax Error
  2225. EOF
  2226. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2227. { (eval echo configure:2753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2228. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2229. if test -z "$ac_err"; then
  2230. :
  2231. else
  2232. echo "$ac_err" >&5
  2233. echo "configure: failed program was:" >&5
  2234. cat conftest.$ac_ext >&5
  2235. rm -rf conftest*
  2236. CPP=/lib/cpp
  2237. fi
  2238. rm -f conftest*
  2239. fi
  2240. rm -f conftest*
  2241. fi
  2242. rm -f conftest*
  2243. ac_cv_prog_CPP="$CPP"
  2244. CPP="$ac_cv_prog_CPP"
  2245. else
  2246. ac_cv_prog_CPP="$CPP"
  2247. fi
  2248. echo "$ac_t""$CPP" 1>&6
  2249. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  2250. echo "configure:2777: checking for ANSI C header files" >&5
  2251. cat > conftest.$ac_ext <<EOF
  2252. #line 2780 "configure"
  2253. #include "confdefs.h"
  2254. #include <stdlib.h>
  2255. #include <stdarg.h>
  2256. #include <string.h>
  2257. #include <float.h>
  2258. EOF
  2259. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2260. { (eval echo configure:2788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2261. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2262. if test -z "$ac_err"; then
  2263. rm -rf conftest*
  2264. ac_cv_header_stdc=yes
  2265. else
  2266. echo "$ac_err" >&5
  2267. echo "configure: failed program was:" >&5
  2268. cat conftest.$ac_ext >&5
  2269. rm -rf conftest*
  2270. ac_cv_header_stdc=no
  2271. fi
  2272. rm -f conftest*
  2273. if test $ac_cv_header_stdc = yes; then
  2274. # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  2275. cat > conftest.$ac_ext <<EOF
  2276. #line 2805 "configure"
  2277. #include "confdefs.h"
  2278. #include <string.h>
  2279. EOF
  2280. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2281. egrep "memchr" >/dev/null 2>&1; then
  2282. :
  2283. else
  2284. rm -rf conftest*
  2285. ac_cv_header_stdc=no
  2286. fi
  2287. rm -f conftest*
  2288. fi
  2289. if test $ac_cv_header_stdc = yes; then
  2290. # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  2291. cat > conftest.$ac_ext <<EOF
  2292. #line 2823 "configure"
  2293. #include "confdefs.h"
  2294. #include <stdlib.h>
  2295. EOF
  2296. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2297. egrep "free" >/dev/null 2>&1; then
  2298. :
  2299. else
  2300. rm -rf conftest*
  2301. ac_cv_header_stdc=no
  2302. fi
  2303. rm -f conftest*
  2304. fi
  2305. if test $ac_cv_header_stdc = yes; then
  2306. # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  2307. if test "$cross_compiling" = yes; then
  2308. :
  2309. else
  2310. cat > conftest.$ac_ext <<EOF
  2311. #line 2844 "configure"
  2312. #include "confdefs.h"
  2313. #include <ctype.h>
  2314. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  2315. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  2316. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  2317. int main () { int i; for (i = 0; i < 256; i++)
  2318. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  2319. exit (0); }
  2320. EOF
  2321. if { (eval echo configure:2855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2322. then
  2323. :
  2324. else
  2325. echo "configure: failed program was:" >&5
  2326. cat conftest.$ac_ext >&5
  2327. rm -fr conftest*
  2328. ac_cv_header_stdc=no
  2329. fi
  2330. rm -fr conftest*
  2331. fi
  2332. fi
  2333. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  2334. if test $ac_cv_header_stdc = yes; then
  2335. cat >> confdefs.h <<\EOF
  2336. #define STDC_HEADERS 1
  2337. EOF
  2338. fi
  2339. #AC_CHECK_HEADERS(curses.h limits.h termio.h termios.h unistd.h values.h)
  2340. for ac_hdr in limits.h termio.h termios.h unistd.h values.h f2c.h g2c.h
  2341. do
  2342. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2343. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2344. echo "configure:2882: checking for $ac_hdr" >&5
  2345. cat > conftest.$ac_ext <<EOF
  2346. #line 2885 "configure"
  2347. #include "confdefs.h"
  2348. #include <$ac_hdr>
  2349. EOF
  2350. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2351. { (eval echo configure:2890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2352. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2353. if test -z "$ac_err"; then
  2354. rm -rf conftest*
  2355. eval "ac_cv_header_$ac_safe=yes"
  2356. else
  2357. echo "$ac_err" >&5
  2358. echo "configure: failed program was:" >&5
  2359. cat conftest.$ac_ext >&5
  2360. rm -rf conftest*
  2361. eval "ac_cv_header_$ac_safe=no"
  2362. fi
  2363. rm -f conftest*
  2364. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2365. echo "$ac_t""yes" 1>&6
  2366. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2367. cat >> confdefs.h <<EOF
  2368. #define $ac_tr_hdr 1
  2369. EOF
  2370. else
  2371. echo "$ac_t""no" 1>&6
  2372. fi
  2373. done
  2374. for ac_hdr in sys/ioctl.h sys/mtio.h sys/resource.h sys/time.h
  2375. do
  2376. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2377. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2378. echo "configure:2919: checking for $ac_hdr" >&5
  2379. cat > conftest.$ac_ext <<EOF
  2380. #line 2922 "configure"
  2381. #include "confdefs.h"
  2382. #include <$ac_hdr>
  2383. EOF
  2384. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2385. { (eval echo configure:2927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2386. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2387. if test -z "$ac_err"; then
  2388. rm -rf conftest*
  2389. eval "ac_cv_header_$ac_safe=yes"
  2390. else
  2391. echo "$ac_err" >&5
  2392. echo "configure: failed program was:" >&5
  2393. cat conftest.$ac_ext >&5
  2394. rm -rf conftest*
  2395. eval "ac_cv_header_$ac_safe=no"
  2396. fi
  2397. rm -f conftest*
  2398. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2399. echo "$ac_t""yes" 1>&6
  2400. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2401. cat >> confdefs.h <<EOF
  2402. #define $ac_tr_hdr 1
  2403. EOF
  2404. else
  2405. echo "$ac_t""no" 1>&6
  2406. fi
  2407. done
  2408. for ac_hdr in sys/timeb.h sys/types.h sys/utsname.h
  2409. do
  2410. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2411. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2412. echo "configure:2956: checking for $ac_hdr" >&5
  2413. cat > conftest.$ac_ext <<EOF
  2414. #line 2959 "configure"
  2415. #include "confdefs.h"
  2416. #include <$ac_hdr>
  2417. EOF
  2418. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2419. { (eval echo configure:2964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2420. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2421. if test -z "$ac_err"; then
  2422. rm -rf conftest*
  2423. eval "ac_cv_header_$ac_safe=yes"
  2424. else
  2425. echo "$ac_err" >&5
  2426. echo "configure: failed program was:" >&5
  2427. cat conftest.$ac_ext >&5
  2428. rm -rf conftest*
  2429. eval "ac_cv_header_$ac_safe=no"
  2430. fi
  2431. rm -f conftest*
  2432. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2433. echo "$ac_t""yes" 1>&6
  2434. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2435. cat >> confdefs.h <<EOF
  2436. #define $ac_tr_hdr 1
  2437. EOF
  2438. else
  2439. echo "$ac_t""no" 1>&6
  2440. fi
  2441. done
  2442. for ac_hdr in libintl.h iconv.h
  2443. do
  2444. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2445. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2446. echo "configure:2993: checking for $ac_hdr" >&5
  2447. cat > conftest.$ac_ext <<EOF
  2448. #line 2996 "configure"
  2449. #include "confdefs.h"
  2450. #include <$ac_hdr>
  2451. EOF
  2452. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2453. { (eval echo configure:3001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2454. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2455. if test -z "$ac_err"; then
  2456. rm -rf conftest*
  2457. eval "ac_cv_header_$ac_safe=yes"
  2458. else
  2459. echo "$ac_err" >&5
  2460. echo "configure: failed program was:" >&5
  2461. cat conftest.$ac_ext >&5
  2462. rm -rf conftest*
  2463. eval "ac_cv_header_$ac_safe=no"
  2464. fi
  2465. rm -f conftest*
  2466. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2467. echo "$ac_t""yes" 1>&6
  2468. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2469. cat >> confdefs.h <<EOF
  2470. #define $ac_tr_hdr 1
  2471. EOF
  2472. else
  2473. echo "$ac_t""no" 1>&6
  2474. fi
  2475. done
  2476. for ac_hdr in langinfo.h
  2477. do
  2478. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2479. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2480. echo "configure:3030: checking for $ac_hdr" >&5
  2481. cat > conftest.$ac_ext <<EOF
  2482. #line 3033 "configure"
  2483. #include "confdefs.h"
  2484. #include <$ac_hdr>
  2485. EOF
  2486. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2487. { (eval echo configure:3038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2488. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2489. if test -z "$ac_err"; then
  2490. rm -rf conftest*
  2491. eval "ac_cv_header_$ac_safe=yes"
  2492. else
  2493. echo "$ac_err" >&5
  2494. echo "configure: failed program was:" >&5
  2495. cat conftest.$ac_ext >&5
  2496. rm -rf conftest*
  2497. eval "ac_cv_header_$ac_safe=no"
  2498. fi
  2499. rm -f conftest*
  2500. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2501. echo "$ac_t""yes" 1>&6
  2502. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2503. cat >> confdefs.h <<EOF
  2504. #define $ac_tr_hdr 1
  2505. EOF
  2506. else
  2507. echo "$ac_t""no" 1>&6
  2508. fi
  2509. done
  2510. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  2511. echo "configure:3064: checking whether time.h and sys/time.h may both be included" >&5
  2512. cat > conftest.$ac_ext <<EOF
  2513. #line 3067 "configure"
  2514. #include "confdefs.h"
  2515. #include <sys/types.h>
  2516. #include <sys/time.h>
  2517. #include <time.h>
  2518. int main() {
  2519. struct tm *tp;
  2520. ; return 0; }
  2521. EOF
  2522. if { (eval echo configure:3076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2523. rm -rf conftest*
  2524. ac_cv_header_time=yes
  2525. else
  2526. echo "configure: failed program was:" >&5
  2527. cat conftest.$ac_ext >&5
  2528. rm -rf conftest*
  2529. ac_cv_header_time=no
  2530. fi
  2531. rm -f conftest*
  2532. echo "$ac_t""$ac_cv_header_time" 1>&6
  2533. if test $ac_cv_header_time = yes; then
  2534. cat >> confdefs.h <<\EOF
  2535. #define TIME_WITH_SYS_TIME 1
  2536. EOF
  2537. fi
  2538. echo $ac_n "checking for off_t""... $ac_c" 1>&6
  2539. echo "configure:3096: checking for off_t" >&5
  2540. cat > conftest.$ac_ext <<EOF
  2541. #line 3099 "configure"
  2542. #include "confdefs.h"
  2543. #include <sys/types.h>
  2544. #if STDC_HEADERS
  2545. #include <stdlib.h>
  2546. #include <stddef.h>
  2547. #endif
  2548. EOF
  2549. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2550. egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  2551. rm -rf conftest*
  2552. ac_cv_type_off_t=yes
  2553. else
  2554. rm -rf conftest*
  2555. ac_cv_type_off_t=no
  2556. fi
  2557. rm -f conftest*
  2558. echo "$ac_t""$ac_cv_type_off_t" 1>&6
  2559. if test $ac_cv_type_off_t = no; then
  2560. cat >> confdefs.h <<\EOF
  2561. #define off_t long
  2562. EOF
  2563. fi
  2564. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  2565. echo "configure:3126: checking for uid_t in sys/types.h" >&5
  2566. cat > conftest.$ac_ext <<EOF
  2567. #line 3129 "configure"
  2568. #include "confdefs.h"
  2569. #include <sys/types.h>
  2570. EOF
  2571. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2572. egrep "uid_t" >/dev/null 2>&1; then
  2573. rm -rf conftest*
  2574. ac_cv_type_uid_t=yes
  2575. else
  2576. rm -rf conftest*
  2577. ac_cv_type_uid_t=no
  2578. fi
  2579. rm -f conftest*
  2580. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  2581. if test $ac_cv_type_uid_t = no; then
  2582. cat >> confdefs.h <<\EOF
  2583. #define uid_t int
  2584. EOF
  2585. cat >> confdefs.h <<\EOF
  2586. #define gid_t int
  2587. EOF
  2588. fi
  2589. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  2590. echo "configure:3157: checking return type of signal handlers" >&5
  2591. cat > conftest.$ac_ext <<EOF
  2592. #line 3160 "configure"
  2593. #include "confdefs.h"
  2594. #include <sys/types.h>
  2595. #include <signal.h>
  2596. #ifdef signal
  2597. #undef signal
  2598. #endif
  2599. #ifdef __cplusplus
  2600. extern "C" void (*signal (int, void (*)(int)))(int);
  2601. #else
  2602. void (*signal ()) ();
  2603. #endif
  2604. int main() {
  2605. int i;
  2606. ; return 0; }
  2607. EOF
  2608. if { (eval echo configure:3177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2609. rm -rf conftest*
  2610. ac_cv_type_signal=void
  2611. else
  2612. echo "configure: failed program was:" >&5
  2613. cat conftest.$ac_ext >&5
  2614. rm -rf conftest*
  2615. ac_cv_type_signal=int
  2616. fi
  2617. rm -f conftest*
  2618. echo "$ac_t""$ac_cv_type_signal" 1>&6
  2619. cat >> confdefs.h <<EOF
  2620. #define RETSIGTYPE $ac_cv_type_signal
  2621. EOF
  2622. echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
  2623. echo "configure:3195: checking for Cygwin environment" >&5
  2624. cat > conftest.$ac_ext <<EOF
  2625. #line 3198 "configure"
  2626. #include "confdefs.h"
  2627. int main() {
  2628. #ifndef __CYGWIN__
  2629. #define __CYGWIN__ __CYGWIN32__
  2630. #endif
  2631. return __CYGWIN__;
  2632. ; return 0; }
  2633. EOF
  2634. if { (eval echo configure:3209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2635. rm -rf conftest*
  2636. ac_cv_cygwin=yes
  2637. else
  2638. echo "configure: failed program was:" >&5
  2639. cat conftest.$ac_ext >&5
  2640. rm -rf conftest*
  2641. ac_cv_cygwin=no
  2642. fi
  2643. rm -f conftest*
  2644. rm -f conftest*
  2645. echo "$ac_t""$ac_cv_cygwin" 1>&6
  2646. CYGWIN=
  2647. test "$ac_cv_cygwin" = yes && CYGWIN=yes
  2648. for ac_func in ftime gethostname gettimeofday lseek nice time uname
  2649. do
  2650. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2651. echo "configure:3227: checking for $ac_func" >&5
  2652. cat > conftest.$ac_ext <<EOF
  2653. #line 3230 "configure"
  2654. #include "confdefs.h"
  2655. /* System header to define __stub macros and hopefully few prototypes,
  2656. which can conflict with char $ac_func(); below. */
  2657. #include <assert.h>
  2658. /* Override any gcc2 internal prototype to avoid an error. */
  2659. /* We use char because int might match the return type of a gcc2
  2660. builtin and then its argument prototype would still apply. */
  2661. char $ac_func();
  2662. int main() {
  2663. /* The GNU C library defines this for functions which it implements
  2664. to always fail with ENOSYS. Some functions are actually named
  2665. something starting with __ and the normal name is an alias. */
  2666. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2667. choke me
  2668. #else
  2669. $ac_func();
  2670. #endif
  2671. ; return 0; }
  2672. EOF
  2673. if { (eval echo configure:3253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2674. rm -rf conftest*
  2675. eval "ac_cv_func_$ac_func=yes"
  2676. else
  2677. echo "configure: failed program was:" >&5
  2678. cat conftest.$ac_ext >&5
  2679. rm -rf conftest*
  2680. eval "ac_cv_func_$ac_func=no"
  2681. fi
  2682. rm -f conftest*
  2683. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2684. echo "$ac_t""yes" 1>&6
  2685. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2686. cat >> confdefs.h <<EOF
  2687. #define $ac_tr_func 1
  2688. EOF
  2689. else
  2690. echo "$ac_t""no" 1>&6
  2691. fi
  2692. done
  2693. for ac_func in seteuid setpriority setreuid setruid
  2694. do
  2695. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2696. echo "configure:3279: checking for $ac_func" >&5
  2697. cat > conftest.$ac_ext <<EOF
  2698. #line 3282 "configure"
  2699. #include "confdefs.h"
  2700. /* System header to define __stub macros and hopefully few prototypes,
  2701. which can conflict with char $ac_func(); below. */
  2702. #include <assert.h>
  2703. /* Override any gcc2 internal prototype to avoid an error. */
  2704. /* We use char because int might match the return type of a gcc2
  2705. builtin and then its argument prototype would still apply. */
  2706. char $ac_func();
  2707. int main() {
  2708. /* The GNU C library defines this for functions which it implements
  2709. to always fail with ENOSYS. Some functions are actually named
  2710. something starting with __ and the normal name is an alias. */
  2711. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2712. choke me
  2713. #else
  2714. $ac_func();
  2715. #endif
  2716. ; return 0; }
  2717. EOF
  2718. if { (eval echo configure:3305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2719. rm -rf conftest*
  2720. eval "ac_cv_func_$ac_func=yes"
  2721. else
  2722. echo "configure: failed program was:" >&5
  2723. cat conftest.$ac_ext >&5
  2724. rm -rf conftest*
  2725. eval "ac_cv_func_$ac_func=no"
  2726. fi
  2727. rm -f conftest*
  2728. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2729. echo "$ac_t""yes" 1>&6
  2730. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2731. cat >> confdefs.h <<EOF
  2732. #define $ac_tr_func 1
  2733. EOF
  2734. else
  2735. echo "$ac_t""no" 1>&6
  2736. fi
  2737. done
  2738. for ac_func in drand48
  2739. do
  2740. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2741. echo "configure:3331: checking for $ac_func" >&5
  2742. cat > conftest.$ac_ext <<EOF
  2743. #line 3334 "configure"
  2744. #include "confdefs.h"
  2745. /* System header to define __stub macros and hopefully few prototypes,
  2746. which can conflict with char $ac_func(); below. */
  2747. #include <assert.h>
  2748. /* Override any gcc2 internal prototype to avoid an error. */
  2749. /* We use char because int might match the return type of a gcc2
  2750. builtin and then its argument prototype would still apply. */
  2751. char $ac_func();
  2752. int main() {
  2753. /* The GNU C library defines this for functions which it implements
  2754. to always fail with ENOSYS. Some functions are actually named
  2755. something starting with __ and the normal name is an alias. */
  2756. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2757. choke me
  2758. #else
  2759. $ac_func();
  2760. #endif
  2761. ; return 0; }
  2762. EOF
  2763. if { (eval echo configure:3357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2764. rm -rf conftest*
  2765. eval "ac_cv_func_$ac_func=yes"
  2766. else
  2767. echo "configure: failed program was:" >&5
  2768. cat conftest.$ac_ext >&5
  2769. rm -rf conftest*
  2770. eval "ac_cv_func_$ac_func=no"
  2771. fi
  2772. rm -f conftest*
  2773. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2774. echo "$ac_t""yes" 1>&6
  2775. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2776. cat >> confdefs.h <<EOF
  2777. #define $ac_tr_func 1
  2778. EOF
  2779. else
  2780. echo "$ac_t""no" 1>&6
  2781. fi
  2782. done
  2783. for ac_func in putenv setenv
  2784. do
  2785. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2786. echo "configure:3383: checking for $ac_func" >&5
  2787. cat > conftest.$ac_ext <<EOF
  2788. #line 3386 "configure"
  2789. #include "confdefs.h"
  2790. /* System header to define __stub macros and hopefully few prototypes,
  2791. which can conflict with char $ac_func(); below. */
  2792. #include <assert.h>
  2793. /* Override any gcc2 internal prototype to avoid an error. */
  2794. /* We use char because int might match the return type of a gcc2
  2795. builtin and then its argument prototype would still apply. */
  2796. char $ac_func();
  2797. int main() {
  2798. /* The GNU C library defines this for functions which it implements
  2799. to always fail with ENOSYS. Some functions are actually named
  2800. something starting with __ and the normal name is an alias. */
  2801. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2802. choke me
  2803. #else
  2804. $ac_func();
  2805. #endif
  2806. ; return 0; }
  2807. EOF
  2808. if { (eval echo configure:3409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2809. rm -rf conftest*
  2810. eval "ac_cv_func_$ac_func=yes"
  2811. else
  2812. echo "configure: failed program was:" >&5
  2813. cat conftest.$ac_ext >&5
  2814. rm -rf conftest*
  2815. eval "ac_cv_func_$ac_func=no"
  2816. fi
  2817. rm -f conftest*
  2818. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2819. echo "$ac_t""yes" 1>&6
  2820. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2821. cat >> confdefs.h <<EOF
  2822. #define $ac_tr_func 1
  2823. EOF
  2824. else
  2825. echo "$ac_t""no" 1>&6
  2826. fi
  2827. done
  2828. for ac_func in nanosleep
  2829. do
  2830. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2831. echo "configure:3435: checking for $ac_func" >&5
  2832. cat > conftest.$ac_ext <<EOF
  2833. #line 3438 "configure"
  2834. #include "confdefs.h"
  2835. /* System header to define __stub macros and hopefully few prototypes,
  2836. which can conflict with char $ac_func(); below. */
  2837. #include <assert.h>
  2838. /* Override any gcc2 internal prototype to avoid an error. */
  2839. /* We use char because int might match the return type of a gcc2
  2840. builtin and then its argument prototype would still apply. */
  2841. char $ac_func();
  2842. int main() {
  2843. /* The GNU C library defines this for functions which it implements
  2844. to always fail with ENOSYS. Some functions are actually named
  2845. something starting with __ and the normal name is an alias. */
  2846. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2847. choke me
  2848. #else
  2849. $ac_func();
  2850. #endif
  2851. ; return 0; }
  2852. EOF
  2853. if { (eval echo configure:3461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2854. rm -rf conftest*
  2855. eval "ac_cv_func_$ac_func=yes"
  2856. else
  2857. echo "configure: failed program was:" >&5
  2858. cat conftest.$ac_ext >&5
  2859. rm -rf conftest*
  2860. eval "ac_cv_func_$ac_func=no"
  2861. fi
  2862. rm -f conftest*
  2863. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2864. echo "$ac_t""yes" 1>&6
  2865. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2866. cat >> confdefs.h <<EOF
  2867. #define $ac_tr_func 1
  2868. EOF
  2869. else
  2870. echo "$ac_t""no" 1>&6
  2871. fi
  2872. done
  2873. if test "$cross_compiling" != "yes" ; then
  2874. echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
  2875. echo "configure:3486: checking whether setpgrp takes no argument" >&5
  2876. if test "$cross_compiling" = yes; then
  2877. { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
  2878. else
  2879. cat > conftest.$ac_ext <<EOF
  2880. #line 3492 "configure"
  2881. #include "confdefs.h"
  2882. #ifdef HAVE_UNISTD_H
  2883. #include <unistd.h>
  2884. #endif
  2885. /*
  2886. * If this system has a BSD-style setpgrp, which takes arguments, exit
  2887. * successfully.
  2888. */
  2889. main()
  2890. {
  2891. if (setpgrp(1,1) == -1)
  2892. exit(0);
  2893. else
  2894. exit(1);
  2895. }
  2896. EOF
  2897. if { (eval echo configure:3512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2898. then
  2899. ac_cv_func_setpgrp_void=no
  2900. else
  2901. echo "configure: failed program was:" >&5
  2902. cat conftest.$ac_ext >&5
  2903. rm -fr conftest*
  2904. ac_cv_func_setpgrp_void=yes
  2905. fi
  2906. rm -fr conftest*
  2907. fi
  2908. echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
  2909. if test $ac_cv_func_setpgrp_void = yes; then
  2910. cat >> confdefs.h <<\EOF
  2911. #define SETPGRP_VOID 1
  2912. EOF
  2913. fi
  2914. else
  2915. CROSS_COMPILING=1
  2916. fi
  2917. echo $ac_n "checking for long long int""... $ac_c" 1>&6
  2918. echo "configure:3540: checking for long long int" >&5
  2919. cat > conftest.$ac_ext <<EOF
  2920. #line 3542 "configure"
  2921. #include "confdefs.h"
  2922. int main() {
  2923. long long int x;
  2924. ; return 0; }
  2925. EOF
  2926. if { (eval echo configure:3549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2927. rm -rf conftest*
  2928. echo "$ac_t""yes" 1>&6
  2929. cat >> confdefs.h <<\EOF
  2930. #define HAVE_LONG_LONG_INT 1
  2931. EOF
  2932. else
  2933. echo "configure: failed program was:" >&5
  2934. cat conftest.$ac_ext >&5
  2935. rm -rf conftest*
  2936. echo "$ac_t""no" 1>&6
  2937. fi
  2938. rm -f conftest*
  2939. echo $ac_n "checking for W11""... $ac_c" 1>&6
  2940. echo "configure:3569: checking for W11" >&5
  2941. case "$enable_w11" in
  2942. yes|no) echo "$ac_t"""$enable_w11"" 1>&6 ;;
  2943. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  2944. esac
  2945. USE_X11=
  2946. USE_W11=
  2947. XLIB=
  2948. XTLIB=
  2949. if test "$enable_w11" = "yes" ; then
  2950. X_CFLAGS=-I${SRCDIR}/display/drivers/windows/libW11
  2951. X_LIBS='-L$(LIBDIR)'
  2952. USE_W11="1"
  2953. USE_X11="1"
  2954. XLIB=-lX11
  2955. CFLAGS="$CFLAGS -D__W98__"
  2956. else
  2957. # If we find X, set shell vars x_includes and x_libraries to the
  2958. # paths, otherwise set no_x=yes.
  2959. # Uses ac_ vars as temps to allow command line to override cache and checks.
  2960. # --without-x overrides everything else, but does not touch the cache.
  2961. echo $ac_n "checking for X""... $ac_c" 1>&6
  2962. echo "configure:3597: checking for X" >&5
  2963. # Check whether --with-x or --without-x was given.
  2964. if test "${with_x+set}" = set; then
  2965. withval="$with_x"
  2966. :
  2967. fi
  2968. # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
  2969. if test "x$with_x" = xno; then
  2970. # The user explicitly disabled X.
  2971. have_x=disabled
  2972. else
  2973. if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  2974. # Both variables are already set.
  2975. have_x=yes
  2976. else
  2977. # One or both of the vars are not set, and there is no cached value.
  2978. ac_x_includes=NO ac_x_libraries=NO
  2979. rm -fr conftestdir
  2980. if mkdir conftestdir; then
  2981. cd conftestdir
  2982. # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  2983. cat > Imakefile <<'EOF'
  2984. acfindx:
  2985. @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  2986. EOF
  2987. if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  2988. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  2989. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  2990. # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  2991. for ac_extension in a so sl; do
  2992. if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  2993. test -f $ac_im_libdir/libX11.$ac_extension; then
  2994. ac_im_usrlibdir=$ac_im_libdir; break
  2995. fi
  2996. done
  2997. # Screen out bogus values from the imake configuration. They are
  2998. # bogus both because they are the default anyway, and because
  2999. # using them would break gcc on systems where it needs fixed includes.
  3000. case "$ac_im_incroot" in
  3001. /usr/include) ;;
  3002. *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  3003. esac
  3004. case "$ac_im_usrlibdir" in
  3005. /usr/lib | /lib) ;;
  3006. *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  3007. esac
  3008. fi
  3009. cd ..
  3010. rm -fr conftestdir
  3011. fi
  3012. if test "$ac_x_includes" = NO; then
  3013. # Guess where to find include files, by looking for this one X11 .h file.
  3014. test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  3015. # First, try using that file with no special directory specified.
  3016. cat > conftest.$ac_ext <<EOF
  3017. #line 3657 "configure"
  3018. #include "confdefs.h"
  3019. #include <$x_direct_test_include>
  3020. EOF
  3021. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3022. { (eval echo configure:3662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3023. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3024. if test -z "$ac_err"; then
  3025. rm -rf conftest*
  3026. # We can compile using X headers with no special include directory.
  3027. ac_x_includes=
  3028. else
  3029. echo "$ac_err" >&5
  3030. echo "configure: failed program was:" >&5
  3031. cat conftest.$ac_ext >&5
  3032. rm -rf conftest*
  3033. # Look for the header file in a standard set of common directories.
  3034. # Check X11 before X11Rn because it is often a symlink to the current release.
  3035. for ac_dir in \
  3036. /usr/X11/include \
  3037. /usr/X11R6/include \
  3038. /usr/X11R5/include \
  3039. /usr/X11R4/include \
  3040. \
  3041. /usr/include/X11 \
  3042. /usr/include/X11R6 \
  3043. /usr/include/X11R5 \
  3044. /usr/include/X11R4 \
  3045. \
  3046. /usr/local/X11/include \
  3047. /usr/local/X11R6/include \
  3048. /usr/local/X11R5/include \
  3049. /usr/local/X11R4/include \
  3050. \
  3051. /usr/local/include/X11 \
  3052. /usr/local/include/X11R6 \
  3053. /usr/local/include/X11R5 \
  3054. /usr/local/include/X11R4 \
  3055. \
  3056. /usr/X386/include \
  3057. /usr/x386/include \
  3058. /usr/XFree86/include/X11 \
  3059. \
  3060. /usr/include \
  3061. /usr/local/include \
  3062. /usr/unsupported/include \
  3063. /usr/athena/include \
  3064. /usr/local/x11r5/include \
  3065. /usr/lpp/Xamples/include \
  3066. \
  3067. /usr/openwin/include \
  3068. /usr/openwin/share/include \
  3069. ; \
  3070. do
  3071. if test -r "$ac_dir/$x_direct_test_include"; then
  3072. ac_x_includes=$ac_dir
  3073. break
  3074. fi
  3075. done
  3076. fi
  3077. rm -f conftest*
  3078. fi # $ac_x_includes = NO
  3079. if test "$ac_x_libraries" = NO; then
  3080. # Check for the libraries.
  3081. test -z "$x_direct_test_library" && x_direct_test_library=Xt
  3082. test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  3083. # See if we find them without any special options.
  3084. # Don't add to $LIBS permanently.
  3085. ac_save_LIBS="$LIBS"
  3086. LIBS="-l$x_direct_test_library $LIBS"
  3087. cat > conftest.$ac_ext <<EOF
  3088. #line 3731 "configure"
  3089. #include "confdefs.h"
  3090. int main() {
  3091. ${x_direct_test_function}()
  3092. ; return 0; }
  3093. EOF
  3094. if { (eval echo configure:3738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3095. rm -rf conftest*
  3096. LIBS="$ac_save_LIBS"
  3097. # We can link X programs with no special library path.
  3098. ac_x_libraries=
  3099. else
  3100. echo "configure: failed program was:" >&5
  3101. cat conftest.$ac_ext >&5
  3102. rm -rf conftest*
  3103. LIBS="$ac_save_LIBS"
  3104. # First see if replacing the include by lib works.
  3105. # Check X11 before X11Rn because it is often a symlink to the current release.
  3106. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  3107. /usr/X11/lib \
  3108. /usr/X11R6/lib \
  3109. /usr/X11R5/lib \
  3110. /usr/X11R4/lib \
  3111. \
  3112. /usr/lib/X11 \
  3113. /usr/lib/X11R6 \
  3114. /usr/lib/X11R5 \
  3115. /usr/lib/X11R4 \
  3116. \
  3117. /usr/local/X11/lib \
  3118. /usr/local/X11R6/lib \
  3119. /usr/local/X11R5/lib \
  3120. /usr/local/X11R4/lib \
  3121. \
  3122. /usr/local/lib/X11 \
  3123. /usr/local/lib/X11R6 \
  3124. /usr/local/lib/X11R5 \
  3125. /usr/local/lib/X11R4 \
  3126. \
  3127. /usr/X386/lib \
  3128. /usr/x386/lib \
  3129. /usr/XFree86/lib/X11 \
  3130. \
  3131. /usr/lib \
  3132. /usr/local/lib \
  3133. /usr/unsupported/lib \
  3134. /usr/athena/lib \
  3135. /usr/local/x11r5/lib \
  3136. /usr/lpp/Xamples/lib \
  3137. /lib/usr/lib/X11 \
  3138. \
  3139. /usr/openwin/lib \
  3140. /usr/openwin/share/lib \
  3141. ; \
  3142. do
  3143. for ac_extension in a so sl; do
  3144. if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  3145. ac_x_libraries=$ac_dir
  3146. break 2
  3147. fi
  3148. done
  3149. done
  3150. fi
  3151. rm -f conftest*
  3152. fi # $ac_x_libraries = NO
  3153. if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  3154. # Didn't find X anywhere. Cache the known absence of X.
  3155. ac_cv_have_x="have_x=no"
  3156. else
  3157. # Record where we found X for the cache.
  3158. ac_cv_have_x="have_x=yes \
  3159. ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  3160. fi
  3161. fi
  3162. eval "$ac_cv_have_x"
  3163. fi # $with_x != no
  3164. if test "$have_x" != yes; then
  3165. echo "$ac_t""$have_x" 1>&6
  3166. no_x=yes
  3167. else
  3168. # If each of the values was on the command line, it overrides each guess.
  3169. test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  3170. test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  3171. # Update the cache value to reflect the command line values.
  3172. ac_cv_have_x="have_x=yes \
  3173. ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  3174. echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  3175. fi
  3176. if test "$no_x" = yes; then
  3177. # Not all programs may use this symbol, but it does not hurt to define it.
  3178. cat >> confdefs.h <<\EOF
  3179. #define X_DISPLAY_MISSING 1
  3180. EOF
  3181. X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
  3182. else
  3183. if test -n "$x_includes"; then
  3184. X_CFLAGS="$X_CFLAGS -I$x_includes"
  3185. fi
  3186. # It would also be nice to do this for all -L options, not just this one.
  3187. if test -n "$x_libraries"; then
  3188. X_LIBS="$X_LIBS -L$x_libraries"
  3189. # For Solaris; some versions of Sun CC require a space after -R and
  3190. # others require no space. Words are not sufficient . . . .
  3191. case "`(uname -sr) 2>/dev/null`" in
  3192. "SunOS 5"*)
  3193. echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
  3194. echo "configure:3843: checking whether -R must be followed by a space" >&5
  3195. ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
  3196. cat > conftest.$ac_ext <<EOF
  3197. #line 3846 "configure"
  3198. #include "confdefs.h"
  3199. int main() {
  3200. ; return 0; }
  3201. EOF
  3202. if { (eval echo configure:3853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3203. rm -rf conftest*
  3204. ac_R_nospace=yes
  3205. else
  3206. echo "configure: failed program was:" >&5
  3207. cat conftest.$ac_ext >&5
  3208. rm -rf conftest*
  3209. ac_R_nospace=no
  3210. fi
  3211. rm -f conftest*
  3212. if test $ac_R_nospace = yes; then
  3213. echo "$ac_t""no" 1>&6
  3214. X_LIBS="$X_LIBS -R$x_libraries"
  3215. else
  3216. LIBS="$ac_xsave_LIBS -R $x_libraries"
  3217. cat > conftest.$ac_ext <<EOF
  3218. #line 3869 "configure"
  3219. #include "confdefs.h"
  3220. int main() {
  3221. ; return 0; }
  3222. EOF
  3223. if { (eval echo configure:3876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3224. rm -rf conftest*
  3225. ac_R_space=yes
  3226. else
  3227. echo "configure: failed program was:" >&5
  3228. cat conftest.$ac_ext >&5
  3229. rm -rf conftest*
  3230. ac_R_space=no
  3231. fi
  3232. rm -f conftest*
  3233. if test $ac_R_space = yes; then
  3234. echo "$ac_t""yes" 1>&6
  3235. X_LIBS="$X_LIBS -R $x_libraries"
  3236. else
  3237. echo "$ac_t""neither works" 1>&6
  3238. fi
  3239. fi
  3240. LIBS="$ac_xsave_LIBS"
  3241. esac
  3242. fi
  3243. # Check for system-dependent libraries X programs must link with.
  3244. # Do this before checking for the system-independent R6 libraries
  3245. # (-lICE), since we may need -lsocket or whatever for X linking.
  3246. if test "$ISC" = yes; then
  3247. X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  3248. else
  3249. # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
  3250. # libraries were built with DECnet support. And karl@cs.umb.edu says
  3251. # the Alpha needs dnet_stub (dnet does not exist).
  3252. echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
  3253. echo "configure:3908: checking for dnet_ntoa in -ldnet" >&5
  3254. ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  3255. ac_save_LIBS="$LIBS"
  3256. LIBS="-ldnet $LIBS"
  3257. cat > conftest.$ac_ext <<EOF
  3258. #line 3914 "configure"
  3259. #include "confdefs.h"
  3260. /* Override any gcc2 internal prototype to avoid an error. */
  3261. /* We use char because int might match the return type of a gcc2
  3262. builtin and then its argument prototype would still apply. */
  3263. char dnet_ntoa();
  3264. int main() {
  3265. dnet_ntoa()
  3266. ; return 0; }
  3267. EOF
  3268. if { (eval echo configure:3925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3269. rm -rf conftest*
  3270. eval "ac_cv_lib_$ac_lib_var=yes"
  3271. else
  3272. echo "configure: failed program was:" >&5
  3273. cat conftest.$ac_ext >&5
  3274. rm -rf conftest*
  3275. eval "ac_cv_lib_$ac_lib_var=no"
  3276. fi
  3277. rm -f conftest*
  3278. LIBS="$ac_save_LIBS"
  3279. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3280. echo "$ac_t""yes" 1>&6
  3281. X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  3282. else
  3283. echo "$ac_t""no" 1>&6
  3284. fi
  3285. if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  3286. echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
  3287. echo "configure:3946: checking for dnet_ntoa in -ldnet_stub" >&5
  3288. ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  3289. ac_save_LIBS="$LIBS"
  3290. LIBS="-ldnet_stub $LIBS"
  3291. cat > conftest.$ac_ext <<EOF
  3292. #line 3952 "configure"
  3293. #include "confdefs.h"
  3294. /* Override any gcc2 internal prototype to avoid an error. */
  3295. /* We use char because int might match the return type of a gcc2
  3296. builtin and then its argument prototype would still apply. */
  3297. char dnet_ntoa();
  3298. int main() {
  3299. dnet_ntoa()
  3300. ; return 0; }
  3301. EOF
  3302. if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3303. rm -rf conftest*
  3304. eval "ac_cv_lib_$ac_lib_var=yes"
  3305. else
  3306. echo "configure: failed program was:" >&5
  3307. cat conftest.$ac_ext >&5
  3308. rm -rf conftest*
  3309. eval "ac_cv_lib_$ac_lib_var=no"
  3310. fi
  3311. rm -f conftest*
  3312. LIBS="$ac_save_LIBS"
  3313. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3314. echo "$ac_t""yes" 1>&6
  3315. X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  3316. else
  3317. echo "$ac_t""no" 1>&6
  3318. fi
  3319. fi
  3320. # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
  3321. # to get the SysV transport functions.
  3322. # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
  3323. # needs -lnsl.
  3324. # The nsl library prevents programs from opening the X display
  3325. # on Irix 5.2, according to dickey@clark.net.
  3326. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  3327. echo "configure:3991: checking for gethostbyname" >&5
  3328. cat > conftest.$ac_ext <<EOF
  3329. #line 3994 "configure"
  3330. #include "confdefs.h"
  3331. /* System header to define __stub macros and hopefully few prototypes,
  3332. which can conflict with char gethostbyname(); below. */
  3333. #include <assert.h>
  3334. /* Override any gcc2 internal prototype to avoid an error. */
  3335. /* We use char because int might match the return type of a gcc2
  3336. builtin and then its argument prototype would still apply. */
  3337. char gethostbyname();
  3338. int main() {
  3339. /* The GNU C library defines this for functions which it implements
  3340. to always fail with ENOSYS. Some functions are actually named
  3341. something starting with __ and the normal name is an alias. */
  3342. #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  3343. choke me
  3344. #else
  3345. gethostbyname();
  3346. #endif
  3347. ; return 0; }
  3348. EOF
  3349. if { (eval echo configure:4017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3350. rm -rf conftest*
  3351. eval "ac_cv_func_gethostbyname=yes"
  3352. else
  3353. echo "configure: failed program was:" >&5
  3354. cat conftest.$ac_ext >&5
  3355. rm -rf conftest*
  3356. eval "ac_cv_func_gethostbyname=no"
  3357. fi
  3358. rm -f conftest*
  3359. if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  3360. echo "$ac_t""yes" 1>&6
  3361. :
  3362. else
  3363. echo "$ac_t""no" 1>&6
  3364. fi
  3365. if test $ac_cv_func_gethostbyname = no; then
  3366. echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
  3367. echo "configure:4037: checking for gethostbyname in -lnsl" >&5
  3368. ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
  3369. ac_save_LIBS="$LIBS"
  3370. LIBS="-lnsl $LIBS"
  3371. cat > conftest.$ac_ext <<EOF
  3372. #line 4043 "configure"
  3373. #include "confdefs.h"
  3374. /* Override any gcc2 internal prototype to avoid an error. */
  3375. /* We use char because int might match the return type of a gcc2
  3376. builtin and then its argument prototype would still apply. */
  3377. char gethostbyname();
  3378. int main() {
  3379. gethostbyname()
  3380. ; return 0; }
  3381. EOF
  3382. if { (eval echo configure:4054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3383. rm -rf conftest*
  3384. eval "ac_cv_lib_$ac_lib_var=yes"
  3385. else
  3386. echo "configure: failed program was:" >&5
  3387. cat conftest.$ac_ext >&5
  3388. rm -rf conftest*
  3389. eval "ac_cv_lib_$ac_lib_var=no"
  3390. fi
  3391. rm -f conftest*
  3392. LIBS="$ac_save_LIBS"
  3393. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3394. echo "$ac_t""yes" 1>&6
  3395. X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  3396. else
  3397. echo "$ac_t""no" 1>&6
  3398. fi
  3399. fi
  3400. # lieder@skyler.mavd.honeywell.com says without -lsocket,
  3401. # socket/setsockopt and other routines are undefined under SCO ODT
  3402. # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
  3403. # on later versions), says simon@lia.di.epfl.ch: it contains
  3404. # gethostby* variants that don't use the nameserver (or something).
  3405. # -lsocket must be given before -lnsl if both are needed.
  3406. # We assume that if connect needs -lnsl, so does gethostbyname.
  3407. echo $ac_n "checking for connect""... $ac_c" 1>&6
  3408. echo "configure:4083: checking for connect" >&5
  3409. cat > conftest.$ac_ext <<EOF
  3410. #line 4086 "configure"
  3411. #include "confdefs.h"
  3412. /* System header to define __stub macros and hopefully few prototypes,
  3413. which can conflict with char connect(); below. */
  3414. #include <assert.h>
  3415. /* Override any gcc2 internal prototype to avoid an error. */
  3416. /* We use char because int might match the return type of a gcc2
  3417. builtin and then its argument prototype would still apply. */
  3418. char connect();
  3419. int main() {
  3420. /* The GNU C library defines this for functions which it implements
  3421. to always fail with ENOSYS. Some functions are actually named
  3422. something starting with __ and the normal name is an alias. */
  3423. #if defined (__stub_connect) || defined (__stub___connect)
  3424. choke me
  3425. #else
  3426. connect();
  3427. #endif
  3428. ; return 0; }
  3429. EOF
  3430. if { (eval echo configure:4109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3431. rm -rf conftest*
  3432. eval "ac_cv_func_connect=yes"
  3433. else
  3434. echo "configure: failed program was:" >&5
  3435. cat conftest.$ac_ext >&5
  3436. rm -rf conftest*
  3437. eval "ac_cv_func_connect=no"
  3438. fi
  3439. rm -f conftest*
  3440. if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  3441. echo "$ac_t""yes" 1>&6
  3442. :
  3443. else
  3444. echo "$ac_t""no" 1>&6
  3445. fi
  3446. if test $ac_cv_func_connect = no; then
  3447. echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
  3448. echo "configure:4129: checking for connect in -lsocket" >&5
  3449. ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
  3450. ac_save_LIBS="$LIBS"
  3451. LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
  3452. cat > conftest.$ac_ext <<EOF
  3453. #line 4135 "configure"
  3454. #include "confdefs.h"
  3455. /* Override any gcc2 internal prototype to avoid an error. */
  3456. /* We use char because int might match the return type of a gcc2
  3457. builtin and then its argument prototype would still apply. */
  3458. char connect();
  3459. int main() {
  3460. connect()
  3461. ; return 0; }
  3462. EOF
  3463. if { (eval echo configure:4146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3464. rm -rf conftest*
  3465. eval "ac_cv_lib_$ac_lib_var=yes"
  3466. else
  3467. echo "configure: failed program was:" >&5
  3468. cat conftest.$ac_ext >&5
  3469. rm -rf conftest*
  3470. eval "ac_cv_lib_$ac_lib_var=no"
  3471. fi
  3472. rm -f conftest*
  3473. LIBS="$ac_save_LIBS"
  3474. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3475. echo "$ac_t""yes" 1>&6
  3476. X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
  3477. else
  3478. echo "$ac_t""no" 1>&6
  3479. fi
  3480. fi
  3481. # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
  3482. echo $ac_n "checking for remove""... $ac_c" 1>&6
  3483. echo "configure:4169: checking for remove" >&5
  3484. cat > conftest.$ac_ext <<EOF
  3485. #line 4172 "configure"
  3486. #include "confdefs.h"
  3487. /* System header to define __stub macros and hopefully few prototypes,
  3488. which can conflict with char remove(); below. */
  3489. #include <assert.h>
  3490. /* Override any gcc2 internal prototype to avoid an error. */
  3491. /* We use char because int might match the return type of a gcc2
  3492. builtin and then its argument prototype would still apply. */
  3493. char remove();
  3494. int main() {
  3495. /* The GNU C library defines this for functions which it implements
  3496. to always fail with ENOSYS. Some functions are actually named
  3497. something starting with __ and the normal name is an alias. */
  3498. #if defined (__stub_remove) || defined (__stub___remove)
  3499. choke me
  3500. #else
  3501. remove();
  3502. #endif
  3503. ; return 0; }
  3504. EOF
  3505. if { (eval echo configure:4195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3506. rm -rf conftest*
  3507. eval "ac_cv_func_remove=yes"
  3508. else
  3509. echo "configure: failed program was:" >&5
  3510. cat conftest.$ac_ext >&5
  3511. rm -rf conftest*
  3512. eval "ac_cv_func_remove=no"
  3513. fi
  3514. rm -f conftest*
  3515. if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  3516. echo "$ac_t""yes" 1>&6
  3517. :
  3518. else
  3519. echo "$ac_t""no" 1>&6
  3520. fi
  3521. if test $ac_cv_func_remove = no; then
  3522. echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
  3523. echo "configure:4215: checking for remove in -lposix" >&5
  3524. ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
  3525. ac_save_LIBS="$LIBS"
  3526. LIBS="-lposix $LIBS"
  3527. cat > conftest.$ac_ext <<EOF
  3528. #line 4221 "configure"
  3529. #include "confdefs.h"
  3530. /* Override any gcc2 internal prototype to avoid an error. */
  3531. /* We use char because int might match the return type of a gcc2
  3532. builtin and then its argument prototype would still apply. */
  3533. char remove();
  3534. int main() {
  3535. remove()
  3536. ; return 0; }
  3537. EOF
  3538. if { (eval echo configure:4232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3539. rm -rf conftest*
  3540. eval "ac_cv_lib_$ac_lib_var=yes"
  3541. else
  3542. echo "configure: failed program was:" >&5
  3543. cat conftest.$ac_ext >&5
  3544. rm -rf conftest*
  3545. eval "ac_cv_lib_$ac_lib_var=no"
  3546. fi
  3547. rm -f conftest*
  3548. LIBS="$ac_save_LIBS"
  3549. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3550. echo "$ac_t""yes" 1>&6
  3551. X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
  3552. else
  3553. echo "$ac_t""no" 1>&6
  3554. fi
  3555. fi
  3556. # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
  3557. echo $ac_n "checking for shmat""... $ac_c" 1>&6
  3558. echo "configure:4255: checking for shmat" >&5
  3559. cat > conftest.$ac_ext <<EOF
  3560. #line 4258 "configure"
  3561. #include "confdefs.h"
  3562. /* System header to define __stub macros and hopefully few prototypes,
  3563. which can conflict with char shmat(); below. */
  3564. #include <assert.h>
  3565. /* Override any gcc2 internal prototype to avoid an error. */
  3566. /* We use char because int might match the return type of a gcc2
  3567. builtin and then its argument prototype would still apply. */
  3568. char shmat();
  3569. int main() {
  3570. /* The GNU C library defines this for functions which it implements
  3571. to always fail with ENOSYS. Some functions are actually named
  3572. something starting with __ and the normal name is an alias. */
  3573. #if defined (__stub_shmat) || defined (__stub___shmat)
  3574. choke me
  3575. #else
  3576. shmat();
  3577. #endif
  3578. ; return 0; }
  3579. EOF
  3580. if { (eval echo configure:4281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3581. rm -rf conftest*
  3582. eval "ac_cv_func_shmat=yes"
  3583. else
  3584. echo "configure: failed program was:" >&5
  3585. cat conftest.$ac_ext >&5
  3586. rm -rf conftest*
  3587. eval "ac_cv_func_shmat=no"
  3588. fi
  3589. rm -f conftest*
  3590. if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  3591. echo "$ac_t""yes" 1>&6
  3592. :
  3593. else
  3594. echo "$ac_t""no" 1>&6
  3595. fi
  3596. if test $ac_cv_func_shmat = no; then
  3597. echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
  3598. echo "configure:4301: checking for shmat in -lipc" >&5
  3599. ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
  3600. ac_save_LIBS="$LIBS"
  3601. LIBS="-lipc $LIBS"
  3602. cat > conftest.$ac_ext <<EOF
  3603. #line 4307 "configure"
  3604. #include "confdefs.h"
  3605. /* Override any gcc2 internal prototype to avoid an error. */
  3606. /* We use char because int might match the return type of a gcc2
  3607. builtin and then its argument prototype would still apply. */
  3608. char shmat();
  3609. int main() {
  3610. shmat()
  3611. ; return 0; }
  3612. EOF
  3613. if { (eval echo configure:4318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3614. rm -rf conftest*
  3615. eval "ac_cv_lib_$ac_lib_var=yes"
  3616. else
  3617. echo "configure: failed program was:" >&5
  3618. cat conftest.$ac_ext >&5
  3619. rm -rf conftest*
  3620. eval "ac_cv_lib_$ac_lib_var=no"
  3621. fi
  3622. rm -f conftest*
  3623. LIBS="$ac_save_LIBS"
  3624. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3625. echo "$ac_t""yes" 1>&6
  3626. X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
  3627. else
  3628. echo "$ac_t""no" 1>&6
  3629. fi
  3630. fi
  3631. fi
  3632. # Check for libraries that X11R6 Xt/Xaw programs need.
  3633. ac_save_LDFLAGS="$LDFLAGS"
  3634. test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  3635. # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  3636. # check for ICE first), but we must link in the order -lSM -lICE or
  3637. # we get undefined symbols. So assume we have SM if we have ICE.
  3638. # These have to be linked with before -lX11, unlike the other
  3639. # libraries we check for below, so use a different variable.
  3640. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  3641. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
  3642. echo "configure:4350: checking for IceConnectionNumber in -lICE" >&5
  3643. ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
  3644. ac_save_LIBS="$LIBS"
  3645. LIBS="-lICE $X_EXTRA_LIBS $LIBS"
  3646. cat > conftest.$ac_ext <<EOF
  3647. #line 4356 "configure"
  3648. #include "confdefs.h"
  3649. /* Override any gcc2 internal prototype to avoid an error. */
  3650. /* We use char because int might match the return type of a gcc2
  3651. builtin and then its argument prototype would still apply. */
  3652. char IceConnectionNumber();
  3653. int main() {
  3654. IceConnectionNumber()
  3655. ; return 0; }
  3656. EOF
  3657. if { (eval echo configure:4367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3658. rm -rf conftest*
  3659. eval "ac_cv_lib_$ac_lib_var=yes"
  3660. else
  3661. echo "configure: failed program was:" >&5
  3662. cat conftest.$ac_ext >&5
  3663. rm -rf conftest*
  3664. eval "ac_cv_lib_$ac_lib_var=no"
  3665. fi
  3666. rm -f conftest*
  3667. LIBS="$ac_save_LIBS"
  3668. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3669. echo "$ac_t""yes" 1>&6
  3670. X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  3671. else
  3672. echo "$ac_t""no" 1>&6
  3673. fi
  3674. LDFLAGS="$ac_save_LDFLAGS"
  3675. fi
  3676. if test "$no_x" != "yes"; then
  3677. USE_X11="1"
  3678. XLIB=-lX11
  3679. XTLIB=-lXt
  3680. fi
  3681. fi
  3682. # Note that some systems (FreeBSD for example) need an extra library for
  3683. # cuserid
  3684. ac_save_libs="$LIBS"
  3685. LIBS=""
  3686. echo $ac_n "checking for library containing cuserid""... $ac_c" 1>&6
  3687. echo "configure:4407: checking for library containing cuserid" >&5
  3688. ac_func_search_save_LIBS="$LIBS"
  3689. ac_cv_search_cuserid="no"
  3690. cat > conftest.$ac_ext <<EOF
  3691. #line 4412 "configure"
  3692. #include "confdefs.h"
  3693. /* Override any gcc2 internal prototype to avoid an error. */
  3694. /* We use char because int might match the return type of a gcc2
  3695. builtin and then its argument prototype would still apply. */
  3696. char cuserid();
  3697. int main() {
  3698. cuserid()
  3699. ; return 0; }
  3700. EOF
  3701. if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3702. rm -rf conftest*
  3703. ac_cv_search_cuserid="none required"
  3704. else
  3705. echo "configure: failed program was:" >&5
  3706. cat conftest.$ac_ext >&5
  3707. fi
  3708. rm -f conftest*
  3709. test "$ac_cv_search_cuserid" = "no" && for i in compat; do
  3710. LIBS="-l$i $ac_func_search_save_LIBS"
  3711. cat > conftest.$ac_ext <<EOF
  3712. #line 4434 "configure"
  3713. #include "confdefs.h"
  3714. /* Override any gcc2 internal prototype to avoid an error. */
  3715. /* We use char because int might match the return type of a gcc2
  3716. builtin and then its argument prototype would still apply. */
  3717. char cuserid();
  3718. int main() {
  3719. cuserid()
  3720. ; return 0; }
  3721. EOF
  3722. if { (eval echo configure:4445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3723. rm -rf conftest*
  3724. ac_cv_search_cuserid="-l$i"
  3725. break
  3726. else
  3727. echo "configure: failed program was:" >&5
  3728. cat conftest.$ac_ext >&5
  3729. fi
  3730. rm -f conftest*
  3731. done
  3732. LIBS="$ac_func_search_save_LIBS"
  3733. echo "$ac_t""$ac_cv_search_cuserid" 1>&6
  3734. if test "$ac_cv_search_cuserid" != "no"; then
  3735. test "$ac_cv_search_cuserid" = "none required" || LIBS="$ac_cv_search_cuserid $LIBS"
  3736. else :
  3737. fi
  3738. DBMIEXTRALIB="$LIBS"
  3739. LIBS="$ac_save_libs"
  3740. # Note: -lxdr -liberty -lws2_32 is for MinGW
  3741. echo $ac_n "checking for xdrmem_create""... $ac_c" 1>&6
  3742. echo "configure:4471: checking for xdrmem_create" >&5
  3743. cat > conftest.$ac_ext <<EOF
  3744. #line 4474 "configure"
  3745. #include "confdefs.h"
  3746. /* System header to define __stub macros and hopefully few prototypes,
  3747. which can conflict with char xdrmem_create(); below. */
  3748. #include <assert.h>
  3749. /* Override any gcc2 internal prototype to avoid an error. */
  3750. /* We use char because int might match the return type of a gcc2
  3751. builtin and then its argument prototype would still apply. */
  3752. char xdrmem_create();
  3753. int main() {
  3754. /* The GNU C library defines this for functions which it implements
  3755. to always fail with ENOSYS. Some functions are actually named
  3756. something starting with __ and the normal name is an alias. */
  3757. #if defined (__stub_xdrmem_create) || defined (__stub___xdrmem_create)
  3758. choke me
  3759. #else
  3760. xdrmem_create();
  3761. #endif
  3762. ; return 0; }
  3763. EOF
  3764. if { (eval echo configure:4497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3765. rm -rf conftest*
  3766. eval "ac_cv_func_xdrmem_create=yes"
  3767. else
  3768. echo "configure: failed program was:" >&5
  3769. cat conftest.$ac_ext >&5
  3770. rm -rf conftest*
  3771. eval "ac_cv_func_xdrmem_create=no"
  3772. fi
  3773. rm -f conftest*
  3774. if eval "test \"`echo '$ac_cv_func_'xdrmem_create`\" = yes"; then
  3775. echo "$ac_t""yes" 1>&6
  3776. XDRLIB=
  3777. else
  3778. echo "$ac_t""no" 1>&6
  3779. echo $ac_n "checking for xdrmem_create in -lsun""... $ac_c" 1>&6
  3780. echo "configure:4515: checking for xdrmem_create in -lsun" >&5
  3781. ac_lib_var=`echo sun'_'xdrmem_create | sed 'y%./+-%__p_%'`
  3782. ac_save_LIBS="$LIBS"
  3783. LIBS="-lsun $LIBS"
  3784. cat > conftest.$ac_ext <<EOF
  3785. #line 4521 "configure"
  3786. #include "confdefs.h"
  3787. /* Override any gcc2 internal prototype to avoid an error. */
  3788. /* We use char because int might match the return type of a gcc2
  3789. builtin and then its argument prototype would still apply. */
  3790. char xdrmem_create();
  3791. int main() {
  3792. xdrmem_create()
  3793. ; return 0; }
  3794. EOF
  3795. if { (eval echo configure:4532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3796. rm -rf conftest*
  3797. eval "ac_cv_lib_$ac_lib_var=yes"
  3798. else
  3799. echo "configure: failed program was:" >&5
  3800. cat conftest.$ac_ext >&5
  3801. rm -rf conftest*
  3802. eval "ac_cv_lib_$ac_lib_var=no"
  3803. fi
  3804. rm -f conftest*
  3805. LIBS="$ac_save_LIBS"
  3806. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3807. echo "$ac_t""yes" 1>&6
  3808. XDRLIB=-lsun
  3809. else
  3810. echo "$ac_t""no" 1>&6
  3811. echo $ac_n "checking for xdrmem_create in -lnsl""... $ac_c" 1>&6
  3812. echo "configure:4551: checking for xdrmem_create in -lnsl" >&5
  3813. ac_lib_var=`echo nsl'_'xdrmem_create | sed 'y%./+-%__p_%'`
  3814. ac_save_LIBS="$LIBS"
  3815. LIBS="-lnsl $LIBS"
  3816. cat > conftest.$ac_ext <<EOF
  3817. #line 4557 "configure"
  3818. #include "confdefs.h"
  3819. /* Override any gcc2 internal prototype to avoid an error. */
  3820. /* We use char because int might match the return type of a gcc2
  3821. builtin and then its argument prototype would still apply. */
  3822. char xdrmem_create();
  3823. int main() {
  3824. xdrmem_create()
  3825. ; return 0; }
  3826. EOF
  3827. if { (eval echo configure:4568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3828. rm -rf conftest*
  3829. eval "ac_cv_lib_$ac_lib_var=yes"
  3830. else
  3831. echo "configure: failed program was:" >&5
  3832. cat conftest.$ac_ext >&5
  3833. rm -rf conftest*
  3834. eval "ac_cv_lib_$ac_lib_var=no"
  3835. fi
  3836. rm -f conftest*
  3837. LIBS="$ac_save_LIBS"
  3838. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3839. echo "$ac_t""yes" 1>&6
  3840. XDRLIB=-lnsl
  3841. else
  3842. echo "$ac_t""no" 1>&6
  3843. echo $ac_n "checking for xdrmem_create in -lrpclib""... $ac_c" 1>&6
  3844. echo "configure:4587: checking for xdrmem_create in -lrpclib" >&5
  3845. ac_lib_var=`echo rpclib'_'xdrmem_create | sed 'y%./+-%__p_%'`
  3846. ac_save_LIBS="$LIBS"
  3847. LIBS="-lrpclib $LIBS"
  3848. cat > conftest.$ac_ext <<EOF
  3849. #line 4593 "configure"
  3850. #include "confdefs.h"
  3851. /* Override any gcc2 internal prototype to avoid an error. */
  3852. /* We use char because int might match the return type of a gcc2
  3853. builtin and then its argument prototype would still apply. */
  3854. char xdrmem_create();
  3855. int main() {
  3856. xdrmem_create()
  3857. ; return 0; }
  3858. EOF
  3859. if { (eval echo configure:4604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3860. rm -rf conftest*
  3861. eval "ac_cv_lib_$ac_lib_var=yes"
  3862. else
  3863. echo "configure: failed program was:" >&5
  3864. cat conftest.$ac_ext >&5
  3865. rm -rf conftest*
  3866. eval "ac_cv_lib_$ac_lib_var=no"
  3867. fi
  3868. rm -f conftest*
  3869. LIBS="$ac_save_LIBS"
  3870. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3871. echo "$ac_t""yes" 1>&6
  3872. XDRLIB=-lrpclib
  3873. else
  3874. echo "$ac_t""no" 1>&6
  3875. echo $ac_n "checking for xdrmem_create in -lxdr""... $ac_c" 1>&6
  3876. echo "configure:4623: checking for xdrmem_create in -lxdr" >&5
  3877. ac_lib_var=`echo xdr'_'xdrmem_create | sed 'y%./+-%__p_%'`
  3878. ac_save_LIBS="$LIBS"
  3879. LIBS="-lxdr -liberty -lws2_32 $LIBS"
  3880. cat > conftest.$ac_ext <<EOF
  3881. #line 4629 "configure"
  3882. #include "confdefs.h"
  3883. /* Override any gcc2 internal prototype to avoid an error. */
  3884. /* We use char because int might match the return type of a gcc2
  3885. builtin and then its argument prototype would still apply. */
  3886. char xdrmem_create();
  3887. int main() {
  3888. xdrmem_create()
  3889. ; return 0; }
  3890. EOF
  3891. if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3892. rm -rf conftest*
  3893. eval "ac_cv_lib_$ac_lib_var=yes"
  3894. else
  3895. echo "configure: failed program was:" >&5
  3896. cat conftest.$ac_ext >&5
  3897. rm -rf conftest*
  3898. eval "ac_cv_lib_$ac_lib_var=no"
  3899. fi
  3900. rm -f conftest*
  3901. LIBS="$ac_save_LIBS"
  3902. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3903. echo "$ac_t""yes" 1>&6
  3904. XDRLIB="-lxdr -liberty -lws2_32"
  3905. else
  3906. echo "$ac_t""no" 1>&6
  3907. { echo "configure: error: *** Unable to locate XDR functions." 1>&2; exit 1; }
  3908. fi
  3909. fi
  3910. fi
  3911. fi
  3912. fi
  3913. for ac_func in asprintf
  3914. do
  3915. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3916. echo "configure:4674: checking for $ac_func" >&5
  3917. cat > conftest.$ac_ext <<EOF
  3918. #line 4677 "configure"
  3919. #include "confdefs.h"
  3920. /* System header to define __stub macros and hopefully few prototypes,
  3921. which can conflict with char $ac_func(); below. */
  3922. #include <assert.h>
  3923. /* Override any gcc2 internal prototype to avoid an error. */
  3924. /* We use char because int might match the return type of a gcc2
  3925. builtin and then its argument prototype would still apply. */
  3926. char $ac_func();
  3927. int main() {
  3928. /* The GNU C library defines this for functions which it implements
  3929. to always fail with ENOSYS. Some functions are actually named
  3930. something starting with __ and the normal name is an alias. */
  3931. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3932. choke me
  3933. #else
  3934. $ac_func();
  3935. #endif
  3936. ; return 0; }
  3937. EOF
  3938. if { (eval echo configure:4700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3939. rm -rf conftest*
  3940. eval "ac_cv_func_$ac_func=yes"
  3941. else
  3942. echo "configure: failed program was:" >&5
  3943. cat conftest.$ac_ext >&5
  3944. rm -rf conftest*
  3945. eval "ac_cv_func_$ac_func=no"
  3946. fi
  3947. rm -f conftest*
  3948. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3949. echo "$ac_t""yes" 1>&6
  3950. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3951. cat >> confdefs.h <<EOF
  3952. #define $ac_tr_func 1
  3953. EOF
  3954. else
  3955. echo "$ac_t""no" 1>&6
  3956. fi
  3957. done
  3958. # Test if mathlib needs -lm flag or is included with libc
  3959. echo $ac_n "checking for atan""... $ac_c" 1>&6
  3960. echo "configure:4727: checking for atan" >&5
  3961. cat > conftest.$ac_ext <<EOF
  3962. #line 4730 "configure"
  3963. #include "confdefs.h"
  3964. /* System header to define __stub macros and hopefully few prototypes,
  3965. which can conflict with char atan(); below. */
  3966. #include <assert.h>
  3967. /* Override any gcc2 internal prototype to avoid an error. */
  3968. /* We use char because int might match the return type of a gcc2
  3969. builtin and then its argument prototype would still apply. */
  3970. char atan();
  3971. int main() {
  3972. /* The GNU C library defines this for functions which it implements
  3973. to always fail with ENOSYS. Some functions are actually named
  3974. something starting with __ and the normal name is an alias. */
  3975. #if defined (__stub_atan) || defined (__stub___atan)
  3976. choke me
  3977. #else
  3978. atan();
  3979. #endif
  3980. ; return 0; }
  3981. EOF
  3982. if { (eval echo configure:4753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3983. rm -rf conftest*
  3984. eval "ac_cv_func_atan=yes"
  3985. else
  3986. echo "configure: failed program was:" >&5
  3987. cat conftest.$ac_ext >&5
  3988. rm -rf conftest*
  3989. eval "ac_cv_func_atan=no"
  3990. fi
  3991. rm -f conftest*
  3992. if eval "test \"`echo '$ac_cv_func_'atan`\" = yes"; then
  3993. echo "$ac_t""yes" 1>&6
  3994. MATHLIB=
  3995. else
  3996. echo "$ac_t""no" 1>&6
  3997. echo $ac_n "checking for atan in -lm""... $ac_c" 1>&6
  3998. echo "configure:4771: checking for atan in -lm" >&5
  3999. ac_lib_var=`echo m'_'atan | sed 'y%./+-%__p_%'`
  4000. ac_save_LIBS="$LIBS"
  4001. LIBS="-lm $LIBS"
  4002. cat > conftest.$ac_ext <<EOF
  4003. #line 4777 "configure"
  4004. #include "confdefs.h"
  4005. /* Override any gcc2 internal prototype to avoid an error. */
  4006. /* We use char because int might match the return type of a gcc2
  4007. builtin and then its argument prototype would still apply. */
  4008. char atan();
  4009. int main() {
  4010. atan()
  4011. ; return 0; }
  4012. EOF
  4013. if { (eval echo configure:4788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4014. rm -rf conftest*
  4015. eval "ac_cv_lib_$ac_lib_var=yes"
  4016. else
  4017. echo "configure: failed program was:" >&5
  4018. cat conftest.$ac_ext >&5
  4019. rm -rf conftest*
  4020. eval "ac_cv_lib_$ac_lib_var=no"
  4021. fi
  4022. rm -f conftest*
  4023. LIBS="$ac_save_LIBS"
  4024. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4025. echo "$ac_t""yes" 1>&6
  4026. MATHLIB=-lm
  4027. else
  4028. echo "$ac_t""no" 1>&6
  4029. { echo "configure: error: *** Failed check for math library." 1>&2; exit 1; }
  4030. fi
  4031. fi
  4032. echo $ac_n "checking for dlsym""... $ac_c" 1>&6
  4033. echo "configure:4815: checking for dlsym" >&5
  4034. cat > conftest.$ac_ext <<EOF
  4035. #line 4818 "configure"
  4036. #include "confdefs.h"
  4037. /* System header to define __stub macros and hopefully few prototypes,
  4038. which can conflict with char dlsym(); below. */
  4039. #include <assert.h>
  4040. /* Override any gcc2 internal prototype to avoid an error. */
  4041. /* We use char because int might match the return type of a gcc2
  4042. builtin and then its argument prototype would still apply. */
  4043. char dlsym();
  4044. int main() {
  4045. /* The GNU C library defines this for functions which it implements
  4046. to always fail with ENOSYS. Some functions are actually named
  4047. something starting with __ and the normal name is an alias. */
  4048. #if defined (__stub_dlsym) || defined (__stub___dlsym)
  4049. choke me
  4050. #else
  4051. dlsym();
  4052. #endif
  4053. ; return 0; }
  4054. EOF
  4055. if { (eval echo configure:4841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4056. rm -rf conftest*
  4057. eval "ac_cv_func_dlsym=yes"
  4058. else
  4059. echo "configure: failed program was:" >&5
  4060. cat conftest.$ac_ext >&5
  4061. rm -rf conftest*
  4062. eval "ac_cv_func_dlsym=no"
  4063. fi
  4064. rm -f conftest*
  4065. if eval "test \"`echo '$ac_cv_func_'dlsym`\" = yes"; then
  4066. echo "$ac_t""yes" 1>&6
  4067. DLLIB=
  4068. else
  4069. echo "$ac_t""no" 1>&6
  4070. echo $ac_n "checking for dlsym in -ldl""... $ac_c" 1>&6
  4071. echo "configure:4859: checking for dlsym in -ldl" >&5
  4072. ac_lib_var=`echo dl'_'dlsym | sed 'y%./+-%__p_%'`
  4073. ac_save_LIBS="$LIBS"
  4074. LIBS="-ldl $LIBS"
  4075. cat > conftest.$ac_ext <<EOF
  4076. #line 4865 "configure"
  4077. #include "confdefs.h"
  4078. /* Override any gcc2 internal prototype to avoid an error. */
  4079. /* We use char because int might match the return type of a gcc2
  4080. builtin and then its argument prototype would still apply. */
  4081. char dlsym();
  4082. int main() {
  4083. dlsym()
  4084. ; return 0; }
  4085. EOF
  4086. if { (eval echo configure:4876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4087. rm -rf conftest*
  4088. eval "ac_cv_lib_$ac_lib_var=yes"
  4089. else
  4090. echo "configure: failed program was:" >&5
  4091. cat conftest.$ac_ext >&5
  4092. rm -rf conftest*
  4093. eval "ac_cv_lib_$ac_lib_var=no"
  4094. fi
  4095. rm -f conftest*
  4096. LIBS="$ac_save_LIBS"
  4097. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4098. echo "$ac_t""yes" 1>&6
  4099. DLLIB=-ldl
  4100. else
  4101. echo "$ac_t""no" 1>&6
  4102. DLLIB=
  4103. fi
  4104. fi
  4105. echo $ac_n "checking for iconv""... $ac_c" 1>&6
  4106. echo "configure:4903: checking for iconv" >&5
  4107. cat > conftest.$ac_ext <<EOF
  4108. #line 4906 "configure"
  4109. #include "confdefs.h"
  4110. /* System header to define __stub macros and hopefully few prototypes,
  4111. which can conflict with char iconv(); below. */
  4112. #include <assert.h>
  4113. /* Override any gcc2 internal prototype to avoid an error. */
  4114. /* We use char because int might match the return type of a gcc2
  4115. builtin and then its argument prototype would still apply. */
  4116. char iconv();
  4117. int main() {
  4118. /* The GNU C library defines this for functions which it implements
  4119. to always fail with ENOSYS. Some functions are actually named
  4120. something starting with __ and the normal name is an alias. */
  4121. #if defined (__stub_iconv) || defined (__stub___iconv)
  4122. choke me
  4123. #else
  4124. iconv();
  4125. #endif
  4126. ; return 0; }
  4127. EOF
  4128. if { (eval echo configure:4929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4129. rm -rf conftest*
  4130. eval "ac_cv_func_iconv=yes"
  4131. else
  4132. echo "configure: failed program was:" >&5
  4133. cat conftest.$ac_ext >&5
  4134. rm -rf conftest*
  4135. eval "ac_cv_func_iconv=no"
  4136. fi
  4137. rm -f conftest*
  4138. if eval "test \"`echo '$ac_cv_func_'iconv`\" = yes"; then
  4139. echo "$ac_t""yes" 1>&6
  4140. ICONVLIB=
  4141. else
  4142. echo "$ac_t""no" 1>&6
  4143. echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
  4144. echo "configure:4947: checking for iconv in -liconv" >&5
  4145. ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
  4146. ac_save_LIBS="$LIBS"
  4147. LIBS="-liconv $LIBS"
  4148. cat > conftest.$ac_ext <<EOF
  4149. #line 4953 "configure"
  4150. #include "confdefs.h"
  4151. /* Override any gcc2 internal prototype to avoid an error. */
  4152. /* We use char because int might match the return type of a gcc2
  4153. builtin and then its argument prototype would still apply. */
  4154. char iconv();
  4155. int main() {
  4156. iconv()
  4157. ; return 0; }
  4158. EOF
  4159. if { (eval echo configure:4964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4160. rm -rf conftest*
  4161. eval "ac_cv_lib_$ac_lib_var=yes"
  4162. else
  4163. echo "configure: failed program was:" >&5
  4164. cat conftest.$ac_ext >&5
  4165. rm -rf conftest*
  4166. eval "ac_cv_lib_$ac_lib_var=no"
  4167. fi
  4168. rm -f conftest*
  4169. LIBS="$ac_save_LIBS"
  4170. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4171. echo "$ac_t""yes" 1>&6
  4172. ICONVLIB=-liconv
  4173. else
  4174. echo "$ac_t""no" 1>&6
  4175. echo $ac_n "checking for iconv in -lgiconv""... $ac_c" 1>&6
  4176. echo "configure:4983: checking for iconv in -lgiconv" >&5
  4177. ac_lib_var=`echo giconv'_'iconv | sed 'y%./+-%__p_%'`
  4178. ac_save_LIBS="$LIBS"
  4179. LIBS="-lgiconv $LIBS"
  4180. cat > conftest.$ac_ext <<EOF
  4181. #line 4989 "configure"
  4182. #include "confdefs.h"
  4183. /* Override any gcc2 internal prototype to avoid an error. */
  4184. /* We use char because int might match the return type of a gcc2
  4185. builtin and then its argument prototype would still apply. */
  4186. char iconv();
  4187. int main() {
  4188. iconv()
  4189. ; return 0; }
  4190. EOF
  4191. if { (eval echo configure:5000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4192. rm -rf conftest*
  4193. eval "ac_cv_lib_$ac_lib_var=yes"
  4194. else
  4195. echo "configure: failed program was:" >&5
  4196. cat conftest.$ac_ext >&5
  4197. rm -rf conftest*
  4198. eval "ac_cv_lib_$ac_lib_var=no"
  4199. fi
  4200. rm -f conftest*
  4201. LIBS="$ac_save_LIBS"
  4202. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4203. echo "$ac_t""yes" 1>&6
  4204. ICONVLIB=-lgiconv
  4205. else
  4206. echo "$ac_t""no" 1>&6
  4207. echo $ac_n "checking for libiconv""... $ac_c" 1>&6
  4208. echo "configure:5019: checking for libiconv" >&5
  4209. cat > conftest.$ac_ext <<EOF
  4210. #line 5022 "configure"
  4211. #include "confdefs.h"
  4212. /* System header to define __stub macros and hopefully few prototypes,
  4213. which can conflict with char libiconv(); below. */
  4214. #include <assert.h>
  4215. /* Override any gcc2 internal prototype to avoid an error. */
  4216. /* We use char because int might match the return type of a gcc2
  4217. builtin and then its argument prototype would still apply. */
  4218. char libiconv();
  4219. int main() {
  4220. /* The GNU C library defines this for functions which it implements
  4221. to always fail with ENOSYS. Some functions are actually named
  4222. something starting with __ and the normal name is an alias. */
  4223. #if defined (__stub_libiconv) || defined (__stub___libiconv)
  4224. choke me
  4225. #else
  4226. libiconv();
  4227. #endif
  4228. ; return 0; }
  4229. EOF
  4230. if { (eval echo configure:5045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4231. rm -rf conftest*
  4232. eval "ac_cv_func_libiconv=yes"
  4233. else
  4234. echo "configure: failed program was:" >&5
  4235. cat conftest.$ac_ext >&5
  4236. rm -rf conftest*
  4237. eval "ac_cv_func_libiconv=no"
  4238. fi
  4239. rm -f conftest*
  4240. if eval "test \"`echo '$ac_cv_func_'libiconv`\" = yes"; then
  4241. echo "$ac_t""yes" 1>&6
  4242. ICONVLIB=
  4243. else
  4244. echo "$ac_t""no" 1>&6
  4245. echo $ac_n "checking for libiconv in -liconv""... $ac_c" 1>&6
  4246. echo "configure:5063: checking for libiconv in -liconv" >&5
  4247. ac_lib_var=`echo iconv'_'libiconv | sed 'y%./+-%__p_%'`
  4248. ac_save_LIBS="$LIBS"
  4249. LIBS="-liconv $LIBS"
  4250. cat > conftest.$ac_ext <<EOF
  4251. #line 5069 "configure"
  4252. #include "confdefs.h"
  4253. /* Override any gcc2 internal prototype to avoid an error. */
  4254. /* We use char because int might match the return type of a gcc2
  4255. builtin and then its argument prototype would still apply. */
  4256. char libiconv();
  4257. int main() {
  4258. libiconv()
  4259. ; return 0; }
  4260. EOF
  4261. if { (eval echo configure:5080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4262. rm -rf conftest*
  4263. eval "ac_cv_lib_$ac_lib_var=yes"
  4264. else
  4265. echo "configure: failed program was:" >&5
  4266. cat conftest.$ac_ext >&5
  4267. rm -rf conftest*
  4268. eval "ac_cv_lib_$ac_lib_var=no"
  4269. fi
  4270. rm -f conftest*
  4271. LIBS="$ac_save_LIBS"
  4272. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4273. echo "$ac_t""yes" 1>&6
  4274. ICONVLIB=-liconv
  4275. else
  4276. echo "$ac_t""no" 1>&6
  4277. echo $ac_n "checking for libiconv in -lgiconv""... $ac_c" 1>&6
  4278. echo "configure:5099: checking for libiconv in -lgiconv" >&5
  4279. ac_lib_var=`echo giconv'_'libiconv | sed 'y%./+-%__p_%'`
  4280. ac_save_LIBS="$LIBS"
  4281. LIBS="-lgiconv $LIBS"
  4282. cat > conftest.$ac_ext <<EOF
  4283. #line 5105 "configure"
  4284. #include "confdefs.h"
  4285. /* Override any gcc2 internal prototype to avoid an error. */
  4286. /* We use char because int might match the return type of a gcc2
  4287. builtin and then its argument prototype would still apply. */
  4288. char libiconv();
  4289. int main() {
  4290. libiconv()
  4291. ; return 0; }
  4292. EOF
  4293. if { (eval echo configure:5116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4294. rm -rf conftest*
  4295. eval "ac_cv_lib_$ac_lib_var=yes"
  4296. else
  4297. echo "configure: failed program was:" >&5
  4298. cat conftest.$ac_ext >&5
  4299. rm -rf conftest*
  4300. eval "ac_cv_lib_$ac_lib_var=no"
  4301. fi
  4302. rm -f conftest*
  4303. LIBS="$ac_save_LIBS"
  4304. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4305. echo "$ac_t""yes" 1>&6
  4306. ICONVLIB=-lgiconv
  4307. else
  4308. echo "$ac_t""no" 1>&6
  4309. echo "configure: warning: *** Unable to locate iconv() function." 1>&2
  4310. ICONVLIB=
  4311. fi
  4312. fi
  4313. fi
  4314. fi
  4315. fi
  4316. fi
  4317. have_socket=1
  4318. echo $ac_n "checking for socket""... $ac_c" 1>&6
  4319. echo "configure:5153: checking for socket" >&5
  4320. cat > conftest.$ac_ext <<EOF
  4321. #line 5156 "configure"
  4322. #include "confdefs.h"
  4323. /* System header to define __stub macros and hopefully few prototypes,
  4324. which can conflict with char socket(); below. */
  4325. #include <assert.h>
  4326. /* Override any gcc2 internal prototype to avoid an error. */
  4327. /* We use char because int might match the return type of a gcc2
  4328. builtin and then its argument prototype would still apply. */
  4329. char socket();
  4330. int main() {
  4331. /* The GNU C library defines this for functions which it implements
  4332. to always fail with ENOSYS. Some functions are actually named
  4333. something starting with __ and the normal name is an alias. */
  4334. #if defined (__stub_socket) || defined (__stub___socket)
  4335. choke me
  4336. #else
  4337. socket();
  4338. #endif
  4339. ; return 0; }
  4340. EOF
  4341. if { (eval echo configure:5179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4342. rm -rf conftest*
  4343. eval "ac_cv_func_socket=yes"
  4344. else
  4345. echo "configure: failed program was:" >&5
  4346. cat conftest.$ac_ext >&5
  4347. rm -rf conftest*
  4348. eval "ac_cv_func_socket=no"
  4349. fi
  4350. rm -f conftest*
  4351. if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
  4352. echo "$ac_t""yes" 1>&6
  4353. SOCKLIB=
  4354. else
  4355. echo "$ac_t""no" 1>&6
  4356. echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
  4357. echo "configure:5197: checking for socket in -lsocket" >&5
  4358. ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
  4359. ac_save_LIBS="$LIBS"
  4360. LIBS="-lsocket $LIBS"
  4361. cat > conftest.$ac_ext <<EOF
  4362. #line 5203 "configure"
  4363. #include "confdefs.h"
  4364. /* Override any gcc2 internal prototype to avoid an error. */
  4365. /* We use char because int might match the return type of a gcc2
  4366. builtin and then its argument prototype would still apply. */
  4367. char socket();
  4368. int main() {
  4369. socket()
  4370. ; return 0; }
  4371. EOF
  4372. if { (eval echo configure:5214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4373. rm -rf conftest*
  4374. eval "ac_cv_lib_$ac_lib_var=yes"
  4375. else
  4376. echo "configure: failed program was:" >&5
  4377. cat conftest.$ac_ext >&5
  4378. rm -rf conftest*
  4379. eval "ac_cv_lib_$ac_lib_var=no"
  4380. fi
  4381. rm -f conftest*
  4382. LIBS="$ac_save_LIBS"
  4383. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4384. echo "$ac_t""yes" 1>&6
  4385. SOCKLIB=-lsocket
  4386. else
  4387. echo "$ac_t""no" 1>&6
  4388. have_socket=0
  4389. echo "configure: warning: *** Unable to locate socket() function." 1>&2
  4390. fi
  4391. fi
  4392. if test "$have_socket" = 1 ; then
  4393. HAVE_SOCKET=1
  4394. cat >> confdefs.h <<\EOF
  4395. #define HAVE_SOCKET 1
  4396. EOF
  4397. else
  4398. HAVE_SOCKET=
  4399. fi
  4400. # Mandatory zlib dependency
  4401. ZLIBLIBPATH=
  4402. ZLIBINCPATH=
  4403. ZLIB=
  4404. # With zlib includes directory
  4405. echo $ac_n "checking for location of zlib includes""... $ac_c" 1>&6
  4406. echo "configure:5262: checking for location of zlib includes" >&5
  4407. case "$with_zlib_includes" in
  4408. y | ye | yes | n | no)
  4409. { echo "configure: error: *** You must supply a directory to --with-zlib-includes." 1>&2; exit 1; }
  4410. ;;
  4411. esac
  4412. echo "$ac_t""$with_zlib_includes" 1>&6
  4413. if test -n "$with_zlib_includes" ; then
  4414. for dir in $with_zlib_includes; do
  4415. if test -d "$dir"; then
  4416. ZLIBINCPATH="$ZLIBINCPATH -I$dir"
  4417. else
  4418. { echo "configure: error: *** zlib includes directory $dir does not exist." 1>&2; exit 1; }
  4419. fi
  4420. done
  4421. fi
  4422. ac_save_cppflags="$CPPFLAGS"
  4423. CPPFLAGS="$ZLIBINCPATH $CPPFLAGS"
  4424. for ac_hdr in zlib.h
  4425. do
  4426. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4427. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4428. echo "configure:5288: checking for $ac_hdr" >&5
  4429. cat > conftest.$ac_ext <<EOF
  4430. #line 5291 "configure"
  4431. #include "confdefs.h"
  4432. #include <$ac_hdr>
  4433. EOF
  4434. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4435. { (eval echo configure:5296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4436. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4437. if test -z "$ac_err"; then
  4438. rm -rf conftest*
  4439. eval "ac_cv_header_$ac_safe=yes"
  4440. else
  4441. echo "$ac_err" >&5
  4442. echo "configure: failed program was:" >&5
  4443. cat conftest.$ac_ext >&5
  4444. rm -rf conftest*
  4445. eval "ac_cv_header_$ac_safe=no"
  4446. fi
  4447. rm -f conftest*
  4448. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4449. echo "$ac_t""yes" 1>&6
  4450. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4451. cat >> confdefs.h <<EOF
  4452. #define $ac_tr_hdr 1
  4453. EOF
  4454. else
  4455. echo "$ac_t""no" 1>&6
  4456. { echo "configure: error: *** Unable to locate zlib includes." 1>&2; exit 1; }
  4457. fi
  4458. done
  4459. CPPFLAGS=$ac_save_cppflags
  4460. # With zlib library directory
  4461. echo $ac_n "checking for location of zlib library""... $ac_c" 1>&6
  4462. echo "configure:5330: checking for location of zlib library" >&5
  4463. case "$with_zlib_libs" in
  4464. y | ye | yes | n | no)
  4465. { echo "configure: error: *** You must supply a directory to --with-zlib-libs." 1>&2; exit 1; }
  4466. ;;
  4467. esac
  4468. echo "$ac_t""$with_zlib_libs" 1>&6
  4469. if test -n "$with_zlib_libs"; then
  4470. for dir in $with_zlib_libs; do
  4471. if test -d "$dir"; then
  4472. ZLIBLIBPATH="$ZLIBLIBPATH -L$dir"
  4473. else
  4474. { echo "configure: error: *** zlib library directory $dir does not exist." 1>&2; exit 1; }
  4475. fi
  4476. done
  4477. fi
  4478. ac_save_ldflags="$LDFLAGS"
  4479. LDFLAGS="$ZLIBLIBPATH $LDFLAGS"
  4480. echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
  4481. echo "configure:5355: checking for deflate in -lz" >&5
  4482. ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
  4483. ac_save_LIBS="$LIBS"
  4484. LIBS="-lz $LIBS"
  4485. cat > conftest.$ac_ext <<EOF
  4486. #line 5361 "configure"
  4487. #include "confdefs.h"
  4488. /* Override any gcc2 internal prototype to avoid an error. */
  4489. /* We use char because int might match the return type of a gcc2
  4490. builtin and then its argument prototype would still apply. */
  4491. char deflate();
  4492. int main() {
  4493. deflate()
  4494. ; return 0; }
  4495. EOF
  4496. if { (eval echo configure:5372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4497. rm -rf conftest*
  4498. eval "ac_cv_lib_$ac_lib_var=yes"
  4499. else
  4500. echo "configure: failed program was:" >&5
  4501. cat conftest.$ac_ext >&5
  4502. rm -rf conftest*
  4503. eval "ac_cv_lib_$ac_lib_var=no"
  4504. fi
  4505. rm -f conftest*
  4506. LIBS="$ac_save_LIBS"
  4507. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4508. echo "$ac_t""yes" 1>&6
  4509. ZLIB="$ZLIB -lz "
  4510. else
  4511. echo "$ac_t""no" 1>&6
  4512. LDFLAGS=${ac_save_ldflags}
  4513. { echo "configure: error: *** Unable to locate zlib library." 1>&2; exit 1; }
  4514. fi
  4515. LDFLAGS=${ac_save_ldflags}
  4516. #
  4517. # Done checking zlib
  4518. # Mandatory PROJ dependency
  4519. PROJINC=
  4520. PROJLIB=
  4521. PROJSHARE=
  4522. # With PROJ includes directory
  4523. echo $ac_n "checking for location of External PROJ.4 includes""... $ac_c" 1>&6
  4524. echo "configure:5420: checking for location of External PROJ.4 includes" >&5
  4525. case "$with_proj_includes" in
  4526. y | ye | yes | n | no)
  4527. { echo "configure: error: *** You must supply a directory to --with-proj-includes." 1>&2; exit 1; }
  4528. ;;
  4529. esac
  4530. echo "$ac_t""$with_proj_includes" 1>&6
  4531. if test -n "$with_proj_includes" ; then
  4532. for dir in $with_proj_includes; do
  4533. if test -d "$dir"; then
  4534. PROJINC="$PROJINC -I$dir"
  4535. else
  4536. { echo "configure: error: *** External PROJ.4 includes directory $dir does not exist." 1>&2; exit 1; }
  4537. fi
  4538. done
  4539. fi
  4540. ac_save_cppflags="$CPPFLAGS"
  4541. CPPFLAGS="$PROJINC $CPPFLAGS"
  4542. for ac_hdr in proj_api.h
  4543. do
  4544. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4545. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4546. echo "configure:5446: checking for $ac_hdr" >&5
  4547. cat > conftest.$ac_ext <<EOF
  4548. #line 5449 "configure"
  4549. #include "confdefs.h"
  4550. #include <$ac_hdr>
  4551. EOF
  4552. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4553. { (eval echo configure:5454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4554. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4555. if test -z "$ac_err"; then
  4556. rm -rf conftest*
  4557. eval "ac_cv_header_$ac_safe=yes"
  4558. else
  4559. echo "$ac_err" >&5
  4560. echo "configure: failed program was:" >&5
  4561. cat conftest.$ac_ext >&5
  4562. rm -rf conftest*
  4563. eval "ac_cv_header_$ac_safe=no"
  4564. fi
  4565. rm -f conftest*
  4566. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4567. echo "$ac_t""yes" 1>&6
  4568. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4569. cat >> confdefs.h <<EOF
  4570. #define $ac_tr_hdr 1
  4571. EOF
  4572. else
  4573. echo "$ac_t""no" 1>&6
  4574. { echo "configure: error: *** Unable to locate External PROJ.4 includes." 1>&2; exit 1; }
  4575. fi
  4576. done
  4577. CPPFLAGS=$ac_save_cppflags
  4578. # PROJ version check
  4579. if test "$cross_compiling" = yes; then
  4580. echo "configure: warning: *** Cannot check PROJ.4 version (cross-compiling)." 1>&2
  4581. else
  4582. echo $ac_n "checking External PROJ.4 version""... $ac_c" 1>&6
  4583. echo "configure:5491: checking External PROJ.4 version" >&5
  4584. ac_save_cppflags="$CPPFLAGS"
  4585. CPPFLAGS="$PROJINC $CPPFLAGS"
  4586. if test "$cross_compiling" = yes; then
  4587. proj_ver=0
  4588. echo "$ac_t""unknown (cross-compiling)" 1>&6
  4589. else
  4590. cat > conftest.$ac_ext <<EOF
  4591. #line 5499 "configure"
  4592. #include "confdefs.h"
  4593. #include <stdio.h>
  4594. #include <proj_api.h>
  4595. int main(void) {
  4596. FILE *fp = fopen("conftestdata","w");
  4597. fprintf(fp, "%d", PJ_VERSION);
  4598. return 0;
  4599. }
  4600. EOF
  4601. if { (eval echo configure:5511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  4602. then
  4603. proj_ver=`cat conftestdata`
  4604. echo "$ac_t""$proj_ver" 1>&6
  4605. else
  4606. echo "configure: failed program was:" >&5
  4607. cat conftest.$ac_ext >&5
  4608. rm -fr conftest*
  4609. { echo "configure: error: *** Could not determine External PROJ.4 version." 1>&2; exit 1; }
  4610. fi
  4611. rm -fr conftest*
  4612. fi
  4613. CPPFLAGS=$ac_save_cppflags
  4614. if test `expr "$proj_ver" \< 446` = 1 ; then
  4615. { echo "configure: error: *** PROJ.4.4.6 or later is required." 1>&2; exit 1; }
  4616. fi
  4617. fi
  4618. # With PROJ library directory
  4619. echo $ac_n "checking for location of External PROJ.4 library""... $ac_c" 1>&6
  4620. echo "configure:5536: checking for location of External PROJ.4 library" >&5
  4621. case "$with_proj_libs" in
  4622. y | ye | yes | n | no)
  4623. { echo "configure: error: *** You must supply a directory to --with-proj-libs." 1>&2; exit 1; }
  4624. ;;
  4625. esac
  4626. echo "$ac_t""$with_proj_libs" 1>&6
  4627. if test -n "$with_proj_libs"; then
  4628. for dir in $with_proj_libs; do
  4629. if test -d "$dir"; then
  4630. PROJLIB="$PROJLIB -L$dir"
  4631. else
  4632. { echo "configure: error: *** External PROJ.4 library directory $dir does not exist." 1>&2; exit 1; }
  4633. fi
  4634. done
  4635. fi
  4636. ac_save_ldflags="$LDFLAGS"
  4637. LDFLAGS="$PROJLIB $LDFLAGS"
  4638. echo $ac_n "checking for pj_get_def in -lproj""... $ac_c" 1>&6
  4639. echo "configure:5561: checking for pj_get_def in -lproj" >&5
  4640. ac_lib_var=`echo proj'_'pj_get_def | sed 'y%./+-%__p_%'`
  4641. ac_save_LIBS="$LIBS"
  4642. LIBS="-lproj $LIBS"
  4643. cat > conftest.$ac_ext <<EOF
  4644. #line 5567 "configure"
  4645. #include "confdefs.h"
  4646. /* Override any gcc2 internal prototype to avoid an error. */
  4647. /* We use char because int might match the return type of a gcc2
  4648. builtin and then its argument prototype would still apply. */
  4649. char pj_get_def();
  4650. int main() {
  4651. pj_get_def()
  4652. ; return 0; }
  4653. EOF
  4654. if { (eval echo configure:5578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4655. rm -rf conftest*
  4656. eval "ac_cv_lib_$ac_lib_var=yes"
  4657. else
  4658. echo "configure: failed program was:" >&5
  4659. cat conftest.$ac_ext >&5
  4660. rm -rf conftest*
  4661. eval "ac_cv_lib_$ac_lib_var=no"
  4662. fi
  4663. rm -f conftest*
  4664. LIBS="$ac_save_LIBS"
  4665. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4666. echo "$ac_t""yes" 1>&6
  4667. PROJLIB="$PROJLIB -lproj "
  4668. else
  4669. echo "$ac_t""no" 1>&6
  4670. LDFLAGS=${ac_save_ldflags}
  4671. { echo "configure: error: *** Unable to locate External PROJ.4 library." 1>&2; exit 1; }
  4672. fi
  4673. LDFLAGS=${ac_save_ldflags}
  4674. # With PROJ share directory
  4675. echo $ac_n "checking for location of External PROJ.4 data files""... $ac_c" 1>&6
  4676. echo "configure:5612: checking for location of External PROJ.4 data files" >&5
  4677. case "$with_proj_share" in
  4678. y | ye | yes | n | no)
  4679. { echo "configure: error: *** You must supply a directory to --with-proj-share." 1>&2; exit 1; }
  4680. ;;
  4681. esac
  4682. echo "$ac_t""$with_proj_share" 1>&6
  4683. if test -n "$with_proj_share" ; then
  4684. if test -d "$with_proj_share"; then
  4685. PROJSHARE="$with_proj_share"
  4686. else
  4687. { echo "configure: error: *** External PROJ.4 data directory $dir does not exist." 1>&2; exit 1; }
  4688. fi
  4689. fi
  4690. if test -z "$PROJSHARE" ; then
  4691. echo "configure: warning: *** External PROJ.4 directory not specified; default will be used" 1>&2
  4692. PROJSHARE=/usr/local/share/proj
  4693. fi
  4694. # LOC_CHECK_SHARE does not work when cross compiling
  4695. if test "$cross_compiling" = "yes" ; then
  4696. echo $ac_n "checking for epsg""... $ac_c" 1>&6
  4697. echo "configure:5636: checking for epsg" >&5
  4698. echo "$ac_t""unknown (cross-compiling)" 1>&6
  4699. else
  4700. ac_safe=`echo "$PROJSHARE/epsg" | sed 'y%./+-%__p_%'`
  4701. echo $ac_n "checking for $PROJSHARE/epsg""... $ac_c" 1>&6
  4702. echo "configure:5643: checking for $PROJSHARE/epsg" >&5
  4703. if test "$cross_compiling" = yes; then
  4704. { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
  4705. else
  4706. if test -r $PROJSHARE/epsg; then
  4707. eval "ac_cv_file_$ac_safe=yes"
  4708. else
  4709. eval "ac_cv_file_$ac_safe=no"
  4710. fi
  4711. fi
  4712. if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
  4713. echo "$ac_t""yes" 1>&6
  4714. :
  4715. else
  4716. echo "$ac_t""no" 1>&6
  4717. echo "configure: warning: *** Unable to locate PROJ data files." 1>&2
  4718. fi
  4719. fi
  4720. # nad2bin needs to be in path for installing datum gridshift files
  4721. # Extract the first word of "nad2bin", so it can be a program name with args.
  4722. set dummy nad2bin; ac_word=$2
  4723. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4724. echo "configure:5675: checking for $ac_word" >&5
  4725. case "$NAD2BIN" in
  4726. /*)
  4727. ac_cv_path_NAD2BIN="$NAD2BIN" # Let the user override the test with a path.
  4728. ;;
  4729. ?:/*)
  4730. ac_cv_path_NAD2BIN="$NAD2BIN" # Let the user override the test with a dos path.
  4731. ;;
  4732. *)
  4733. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  4734. ac_dummy="$PATH"
  4735. for ac_dir in $ac_dummy; do
  4736. test -z "$ac_dir" && ac_dir=.
  4737. if test -f $ac_dir/$ac_word; then
  4738. ac_cv_path_NAD2BIN="$ac_dir/$ac_word"
  4739. break
  4740. fi
  4741. done
  4742. IFS="$ac_save_ifs"
  4743. test -z "$ac_cv_path_NAD2BIN" && ac_cv_path_NAD2BIN="no"
  4744. ;;
  4745. esac
  4746. NAD2BIN="$ac_cv_path_NAD2BIN"
  4747. if test -n "$NAD2BIN"; then
  4748. echo "$ac_t""$NAD2BIN" 1>&6
  4749. else
  4750. echo "$ac_t""no" 1>&6
  4751. fi
  4752. if test "$NAD2BIN" = "no"; then
  4753. { echo "configure: error: *** Unable to locate nad2bin (needs to be in PATH)." 1>&2; exit 1; }
  4754. fi
  4755. # Done checking PROJ
  4756. # Enable regex option
  4757. echo $ac_n "checking whether to use regex""... $ac_c" 1>&6
  4758. echo "configure:5715: checking whether to use regex" >&5
  4759. echo "$ac_t"""$with_regex"" 1>&6
  4760. case "$with_regex" in
  4761. "no") USE_REGEX= ;;
  4762. "yes") USE_REGEX="1" ;;
  4763. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  4764. esac
  4765. REGEXINCPATH=
  4766. REGEXLIBPATH=
  4767. REGEXLIB=
  4768. if test -n "$USE_REGEX"; then
  4769. # With regex includes directory
  4770. echo $ac_n "checking for location of regex includes""... $ac_c" 1>&6
  4771. echo "configure:5735: checking for location of regex includes" >&5
  4772. case "$with_regex_includes" in
  4773. y | ye | yes | n | no)
  4774. { echo "configure: error: *** You must supply a directory to --with-regex-includes." 1>&2; exit 1; }
  4775. ;;
  4776. esac
  4777. echo "$ac_t""$with_regex_includes" 1>&6
  4778. if test -n "$with_regex_includes" ; then
  4779. for dir in $with_regex_includes; do
  4780. if test -d "$dir"; then
  4781. REGEXINCPATH="$REGEXINCPATH -I$dir"
  4782. else
  4783. { echo "configure: error: *** regex includes directory $dir does not exist." 1>&2; exit 1; }
  4784. fi
  4785. done
  4786. fi
  4787. ac_save_cppflags="$CPPFLAGS"
  4788. CPPFLAGS="$REGEXINCPATH $CPPFLAGS"
  4789. for ac_hdr in regex.h
  4790. do
  4791. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4792. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4793. echo "configure:5761: checking for $ac_hdr" >&5
  4794. cat > conftest.$ac_ext <<EOF
  4795. #line 5764 "configure"
  4796. #include "confdefs.h"
  4797. #include <$ac_hdr>
  4798. EOF
  4799. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4800. { (eval echo configure:5769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4801. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4802. if test -z "$ac_err"; then
  4803. rm -rf conftest*
  4804. eval "ac_cv_header_$ac_safe=yes"
  4805. else
  4806. echo "$ac_err" >&5
  4807. echo "configure: failed program was:" >&5
  4808. cat conftest.$ac_ext >&5
  4809. rm -rf conftest*
  4810. eval "ac_cv_header_$ac_safe=no"
  4811. fi
  4812. rm -f conftest*
  4813. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4814. echo "$ac_t""yes" 1>&6
  4815. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4816. cat >> confdefs.h <<EOF
  4817. #define $ac_tr_hdr 1
  4818. EOF
  4819. else
  4820. echo "$ac_t""no" 1>&6
  4821. { echo "configure: error: *** Unable to locate regex includes." 1>&2; exit 1; }
  4822. fi
  4823. done
  4824. CPPFLAGS=$ac_save_cppflags
  4825. # With regex library directory
  4826. echo $ac_n "checking for location of regex library""... $ac_c" 1>&6
  4827. echo "configure:5803: checking for location of regex library" >&5
  4828. case "$with_regex_libs" in
  4829. y | ye | yes | n | no)
  4830. { echo "configure: error: *** You must supply a directory to --with-regex-libs." 1>&2; exit 1; }
  4831. ;;
  4832. esac
  4833. echo "$ac_t""$with_regex_libs" 1>&6
  4834. if test -n "$with_regex_libs"; then
  4835. for dir in $with_regex_libs; do
  4836. if test -d "$dir"; then
  4837. REGEXLIBPATH="$REGEXLIBPATH -L$dir"
  4838. else
  4839. { echo "configure: error: *** regex library directory $dir does not exist." 1>&2; exit 1; }
  4840. fi
  4841. done
  4842. fi
  4843. ac_save_libs="$LIBS"
  4844. ac_save_ldflags="$LDFLAGS"
  4845. LIBS=" $LIBS"
  4846. LDFLAGS=" $LDFLAGS"
  4847. echo $ac_n "checking for regcomp""... $ac_c" 1>&6
  4848. echo "configure:5828: checking for regcomp" >&5
  4849. cat > conftest.$ac_ext <<EOF
  4850. #line 5831 "configure"
  4851. #include "confdefs.h"
  4852. /* System header to define __stub macros and hopefully few prototypes,
  4853. which can conflict with char regcomp(); below. */
  4854. #include <assert.h>
  4855. /* Override any gcc2 internal prototype to avoid an error. */
  4856. /* We use char because int might match the return type of a gcc2
  4857. builtin and then its argument prototype would still apply. */
  4858. char regcomp();
  4859. int main() {
  4860. /* The GNU C library defines this for functions which it implements
  4861. to always fail with ENOSYS. Some functions are actually named
  4862. something starting with __ and the normal name is an alias. */
  4863. #if defined (__stub_regcomp) || defined (__stub___regcomp)
  4864. choke me
  4865. #else
  4866. regcomp();
  4867. #endif
  4868. ; return 0; }
  4869. EOF
  4870. if { (eval echo configure:5854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4871. rm -rf conftest*
  4872. eval "ac_cv_func_regcomp=yes"
  4873. else
  4874. echo "configure: failed program was:" >&5
  4875. cat conftest.$ac_ext >&5
  4876. rm -rf conftest*
  4877. eval "ac_cv_func_regcomp=no"
  4878. fi
  4879. rm -f conftest*
  4880. if eval "test \"`echo '$ac_cv_func_'regcomp`\" = yes"; then
  4881. echo "$ac_t""yes" 1>&6
  4882. REGEXLIB="$REGEXLIB "
  4883. else
  4884. echo "$ac_t""no" 1>&6
  4885. ac_save_ldflags="$LDFLAGS"
  4886. LDFLAGS="$REGEXLIBPATH $LDFLAGS"
  4887. echo $ac_n "checking for regcomp in -lregex""... $ac_c" 1>&6
  4888. echo "configure:5881: checking for regcomp in -lregex" >&5
  4889. ac_lib_var=`echo regex'_'regcomp | sed 'y%./+-%__p_%'`
  4890. ac_save_LIBS="$LIBS"
  4891. LIBS="-lregex $LIBS"
  4892. cat > conftest.$ac_ext <<EOF
  4893. #line 5887 "configure"
  4894. #include "confdefs.h"
  4895. /* Override any gcc2 internal prototype to avoid an error. */
  4896. /* We use char because int might match the return type of a gcc2
  4897. builtin and then its argument prototype would still apply. */
  4898. char regcomp();
  4899. int main() {
  4900. regcomp()
  4901. ; return 0; }
  4902. EOF
  4903. if { (eval echo configure:5898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4904. rm -rf conftest*
  4905. eval "ac_cv_lib_$ac_lib_var=yes"
  4906. else
  4907. echo "configure: failed program was:" >&5
  4908. cat conftest.$ac_ext >&5
  4909. rm -rf conftest*
  4910. eval "ac_cv_lib_$ac_lib_var=no"
  4911. fi
  4912. rm -f conftest*
  4913. LIBS="$ac_save_LIBS"
  4914. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4915. echo "$ac_t""yes" 1>&6
  4916. REGEXLIB="$REGEXLIB -lregex "
  4917. else
  4918. echo "$ac_t""no" 1>&6
  4919. LDFLAGS=${ac_save_ldflags}
  4920. { echo "configure: error: *** Unable to locate regex library." 1>&2; exit 1; }
  4921. fi
  4922. LDFLAGS=${ac_save_ldflags}
  4923. fi
  4924. LIBS=${ac_save_libs}
  4925. LDFLAGS=${ac_save_ldflags}
  4926. fi # $USE_REGEX
  4927. # Done checking regex
  4928. # Enable Readline option
  4929. echo $ac_n "checking whether to use Readline""... $ac_c" 1>&6
  4930. echo "configure:5948: checking whether to use Readline" >&5
  4931. echo "$ac_t"""$with_readline"" 1>&6
  4932. case "$with_readline" in
  4933. "no") USE_READLINE= ;;
  4934. "yes") USE_READLINE="1" ;;
  4935. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  4936. esac
  4937. READLINEINCPATH=
  4938. READLINELIBPATH=
  4939. READLINELIB=
  4940. HISTORYLIB=
  4941. if test -n "$USE_READLINE"; then
  4942. # With Readline includes directory
  4943. echo $ac_n "checking for location of Readline includes""... $ac_c" 1>&6
  4944. echo "configure:5969: checking for location of Readline includes" >&5
  4945. case "$with_readline_includes" in
  4946. y | ye | yes | n | no)
  4947. { echo "configure: error: *** You must supply a directory to --with-readline-includes." 1>&2; exit 1; }
  4948. ;;
  4949. esac
  4950. echo "$ac_t""$with_readline_includes" 1>&6
  4951. if test -n "$with_readline_includes" ; then
  4952. for dir in $with_readline_includes; do
  4953. if test -d "$dir"; then
  4954. READLINEINCPATH="$READLINEINCPATH -I$dir"
  4955. else
  4956. { echo "configure: error: *** Readline includes directory $dir does not exist." 1>&2; exit 1; }
  4957. fi
  4958. done
  4959. fi
  4960. ac_save_cppflags="$CPPFLAGS"
  4961. CPPFLAGS="$READLINEINCPATH $CPPFLAGS"
  4962. for ac_hdr in readline/readline.h
  4963. do
  4964. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4965. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4966. echo "configure:5995: checking for $ac_hdr" >&5
  4967. cat > conftest.$ac_ext <<EOF
  4968. #line 5998 "configure"
  4969. #include "confdefs.h"
  4970. #include <$ac_hdr>
  4971. EOF
  4972. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4973. { (eval echo configure:6003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4974. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4975. if test -z "$ac_err"; then
  4976. rm -rf conftest*
  4977. eval "ac_cv_header_$ac_safe=yes"
  4978. else
  4979. echo "$ac_err" >&5
  4980. echo "configure: failed program was:" >&5
  4981. cat conftest.$ac_ext >&5
  4982. rm -rf conftest*
  4983. eval "ac_cv_header_$ac_safe=no"
  4984. fi
  4985. rm -f conftest*
  4986. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4987. echo "$ac_t""yes" 1>&6
  4988. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4989. cat >> confdefs.h <<EOF
  4990. #define $ac_tr_hdr 1
  4991. EOF
  4992. else
  4993. echo "$ac_t""no" 1>&6
  4994. { echo "configure: error: *** Unable to locate Readline includes." 1>&2; exit 1; }
  4995. fi
  4996. done
  4997. CPPFLAGS=$ac_save_cppflags
  4998. ac_save_cppflags="$CPPFLAGS"
  4999. CPPFLAGS="$READLINEINCPATH $CPPFLAGS"
  5000. for ac_hdr in readline/history.h
  5001. do
  5002. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5003. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5004. echo "configure:6039: checking for $ac_hdr" >&5
  5005. cat > conftest.$ac_ext <<EOF
  5006. #line 6042 "configure"
  5007. #include "confdefs.h"
  5008. #include <$ac_hdr>
  5009. EOF
  5010. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5011. { (eval echo configure:6047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5012. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5013. if test -z "$ac_err"; then
  5014. rm -rf conftest*
  5015. eval "ac_cv_header_$ac_safe=yes"
  5016. else
  5017. echo "$ac_err" >&5
  5018. echo "configure: failed program was:" >&5
  5019. cat conftest.$ac_ext >&5
  5020. rm -rf conftest*
  5021. eval "ac_cv_header_$ac_safe=no"
  5022. fi
  5023. rm -f conftest*
  5024. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5025. echo "$ac_t""yes" 1>&6
  5026. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5027. cat >> confdefs.h <<EOF
  5028. #define $ac_tr_hdr 1
  5029. EOF
  5030. else
  5031. echo "$ac_t""no" 1>&6
  5032. { echo "configure: error: *** Unable to locate Readline includes." 1>&2; exit 1; }
  5033. fi
  5034. done
  5035. CPPFLAGS=$ac_save_cppflags
  5036. # With Readline library directory
  5037. echo $ac_n "checking for location of Readline library""... $ac_c" 1>&6
  5038. echo "configure:6081: checking for location of Readline library" >&5
  5039. case "$with_readline_libs" in
  5040. y | ye | yes | n | no)
  5041. { echo "configure: error: *** You must supply a directory to --with-readline-libs." 1>&2; exit 1; }
  5042. ;;
  5043. esac
  5044. echo "$ac_t""$with_readline_libs" 1>&6
  5045. if test -n "$with_readline_libs"; then
  5046. for dir in $with_readline_libs; do
  5047. if test -d "$dir"; then
  5048. READLINELIBPATH="$READLINELIBPATH -L$dir"
  5049. else
  5050. { echo "configure: error: *** Readline library directory $dir does not exist." 1>&2; exit 1; }
  5051. fi
  5052. done
  5053. fi
  5054. ac_save_ldflags="$LDFLAGS"
  5055. LDFLAGS="$READLINELIBPATH $LDFLAGS"
  5056. echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
  5057. echo "configure:6106: checking for readline in -lreadline" >&5
  5058. ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
  5059. ac_save_LIBS="$LIBS"
  5060. LIBS="-lreadline $LIBS"
  5061. cat > conftest.$ac_ext <<EOF
  5062. #line 6112 "configure"
  5063. #include "confdefs.h"
  5064. /* Override any gcc2 internal prototype to avoid an error. */
  5065. /* We use char because int might match the return type of a gcc2
  5066. builtin and then its argument prototype would still apply. */
  5067. char readline();
  5068. int main() {
  5069. readline()
  5070. ; return 0; }
  5071. EOF
  5072. if { (eval echo configure:6123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5073. rm -rf conftest*
  5074. eval "ac_cv_lib_$ac_lib_var=yes"
  5075. else
  5076. echo "configure: failed program was:" >&5
  5077. cat conftest.$ac_ext >&5
  5078. rm -rf conftest*
  5079. eval "ac_cv_lib_$ac_lib_var=no"
  5080. fi
  5081. rm -f conftest*
  5082. LIBS="$ac_save_LIBS"
  5083. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5084. echo "$ac_t""yes" 1>&6
  5085. READLINELIB="$READLINELIB -lreadline "
  5086. else
  5087. echo "$ac_t""no" 1>&6
  5088. LDFLAGS=${ac_save_ldflags}
  5089. { echo "configure: error: *** Unable to locate Readline library." 1>&2; exit 1; }
  5090. fi
  5091. LDFLAGS=${ac_save_ldflags}
  5092. ac_save_ldflags="$LDFLAGS"
  5093. LDFLAGS="$READLINELIBPATH $LDFLAGS"
  5094. echo $ac_n "checking for add_history in -lhistory""... $ac_c" 1>&6
  5095. echo "configure:6158: checking for add_history in -lhistory" >&5
  5096. ac_lib_var=`echo history'_'add_history | sed 'y%./+-%__p_%'`
  5097. ac_save_LIBS="$LIBS"
  5098. LIBS="-lhistory $LIBS"
  5099. cat > conftest.$ac_ext <<EOF
  5100. #line 6164 "configure"
  5101. #include "confdefs.h"
  5102. /* Override any gcc2 internal prototype to avoid an error. */
  5103. /* We use char because int might match the return type of a gcc2
  5104. builtin and then its argument prototype would still apply. */
  5105. char add_history();
  5106. int main() {
  5107. add_history()
  5108. ; return 0; }
  5109. EOF
  5110. if { (eval echo configure:6175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5111. rm -rf conftest*
  5112. eval "ac_cv_lib_$ac_lib_var=yes"
  5113. else
  5114. echo "configure: failed program was:" >&5
  5115. cat conftest.$ac_ext >&5
  5116. rm -rf conftest*
  5117. eval "ac_cv_lib_$ac_lib_var=no"
  5118. fi
  5119. rm -f conftest*
  5120. LIBS="$ac_save_LIBS"
  5121. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5122. echo "$ac_t""yes" 1>&6
  5123. HISTORYLIB="$HISTORYLIB -lhistory "
  5124. else
  5125. echo "$ac_t""no" 1>&6
  5126. LDFLAGS=${ac_save_ldflags}
  5127. { echo "configure: error: *** Unable to locate History library." 1>&2; exit 1; }
  5128. fi
  5129. LDFLAGS=${ac_save_ldflags}
  5130. fi # $USE_READLINE
  5131. # Done checking Readline
  5132. # Enable JPEG option
  5133. echo $ac_n "checking whether to use JPEG""... $ac_c" 1>&6
  5134. echo "configure:6218: checking whether to use JPEG" >&5
  5135. echo "$ac_t"""$with_jpeg"" 1>&6
  5136. case "$with_jpeg" in
  5137. "no") USE_JPEG= ;;
  5138. "yes") USE_JPEG="1" ;;
  5139. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  5140. esac
  5141. JPEGINCPATH=
  5142. JPEGLIBPATH=
  5143. JPEGLIB=
  5144. if test -n "$USE_JPEG"; then
  5145. # With JPEG includes directory
  5146. echo $ac_n "checking for location of JPEG includes""... $ac_c" 1>&6
  5147. echo "configure:6238: checking for location of JPEG includes" >&5
  5148. case "$with_jpeg_includes" in
  5149. y | ye | yes | n | no)
  5150. { echo "configure: error: *** You must supply a directory to --with-jpeg-includes." 1>&2; exit 1; }
  5151. ;;
  5152. esac
  5153. echo "$ac_t""$with_jpeg_includes" 1>&6
  5154. if test -n "$with_jpeg_includes" ; then
  5155. for dir in $with_jpeg_includes; do
  5156. if test -d "$dir"; then
  5157. JPEGINCPATH="$JPEGINCPATH -I$dir"
  5158. else
  5159. { echo "configure: error: *** JPEG includes directory $dir does not exist." 1>&2; exit 1; }
  5160. fi
  5161. done
  5162. fi
  5163. ac_save_cppflags="$CPPFLAGS"
  5164. CPPFLAGS="$JPEGINCPATH $CPPFLAGS"
  5165. for ac_hdr in jpeglib.h
  5166. do
  5167. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5168. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5169. echo "configure:6264: checking for $ac_hdr" >&5
  5170. cat > conftest.$ac_ext <<EOF
  5171. #line 6267 "configure"
  5172. #include "confdefs.h"
  5173. #include <$ac_hdr>
  5174. EOF
  5175. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5176. { (eval echo configure:6272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5177. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5178. if test -z "$ac_err"; then
  5179. rm -rf conftest*
  5180. eval "ac_cv_header_$ac_safe=yes"
  5181. else
  5182. echo "$ac_err" >&5
  5183. echo "configure: failed program was:" >&5
  5184. cat conftest.$ac_ext >&5
  5185. rm -rf conftest*
  5186. eval "ac_cv_header_$ac_safe=no"
  5187. fi
  5188. rm -f conftest*
  5189. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5190. echo "$ac_t""yes" 1>&6
  5191. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5192. cat >> confdefs.h <<EOF
  5193. #define $ac_tr_hdr 1
  5194. EOF
  5195. else
  5196. echo "$ac_t""no" 1>&6
  5197. { echo "configure: error: *** Unable to locate JPEG includes." 1>&2; exit 1; }
  5198. fi
  5199. done
  5200. CPPFLAGS=$ac_save_cppflags
  5201. # With JPEG library directory
  5202. echo $ac_n "checking for location of JPEG library""... $ac_c" 1>&6
  5203. echo "configure:6306: checking for location of JPEG library" >&5
  5204. case "$with_jpeg_libs" in
  5205. y | ye | yes | n | no)
  5206. { echo "configure: error: *** You must supply a directory to --with-jpeg-libs." 1>&2; exit 1; }
  5207. ;;
  5208. esac
  5209. echo "$ac_t""$with_jpeg_libs" 1>&6
  5210. if test -n "$with_jpeg_libs"; then
  5211. for dir in $with_jpeg_libs; do
  5212. if test -d "$dir"; then
  5213. JPEGLIBPATH="$JPEGLIBPATH -L$dir"
  5214. else
  5215. { echo "configure: error: *** JPEG library directory $dir does not exist." 1>&2; exit 1; }
  5216. fi
  5217. done
  5218. fi
  5219. ac_save_ldflags="$LDFLAGS"
  5220. LDFLAGS="$JPEGLIBPATH $LDFLAGS"
  5221. echo $ac_n "checking for jpeg_start_compress in -ljpeg""... $ac_c" 1>&6
  5222. echo "configure:6333: checking for jpeg_start_compress in -ljpeg" >&5
  5223. ac_lib_var=`echo jpeg'_'jpeg_start_compress | sed 'y%./+-%__p_%'`
  5224. ac_save_LIBS="$LIBS"
  5225. LIBS="-ljpeg $LIBS"
  5226. cat > conftest.$ac_ext <<EOF
  5227. #line 6339 "configure"
  5228. #include "confdefs.h"
  5229. /* Override any gcc2 internal prototype to avoid an error. */
  5230. /* We use char because int might match the return type of a gcc2
  5231. builtin and then its argument prototype would still apply. */
  5232. char jpeg_start_compress();
  5233. int main() {
  5234. jpeg_start_compress()
  5235. ; return 0; }
  5236. EOF
  5237. if { (eval echo configure:6350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5238. rm -rf conftest*
  5239. eval "ac_cv_lib_$ac_lib_var=yes"
  5240. else
  5241. echo "configure: failed program was:" >&5
  5242. cat conftest.$ac_ext >&5
  5243. rm -rf conftest*
  5244. eval "ac_cv_lib_$ac_lib_var=no"
  5245. fi
  5246. rm -f conftest*
  5247. LIBS="$ac_save_LIBS"
  5248. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5249. echo "$ac_t""yes" 1>&6
  5250. JPEGLIB="$JPEGLIB -ljpeg "
  5251. else
  5252. echo "$ac_t""no" 1>&6
  5253. echo $ac_n "checking for jpeg_start_compress in -ljpeg""... $ac_c" 1>&6
  5254. echo "configure:6369: checking for jpeg_start_compress in -ljpeg" >&5
  5255. ac_lib_var=`echo jpeg'_'jpeg_start_compress | sed 'y%./+-%__p_%'`
  5256. ac_save_LIBS="$LIBS"
  5257. LIBS="-ljpeg $ZLIB $LIBS"
  5258. cat > conftest.$ac_ext <<EOF
  5259. #line 6375 "configure"
  5260. #include "confdefs.h"
  5261. /* Override any gcc2 internal prototype to avoid an error. */
  5262. /* We use char because int might match the return type of a gcc2
  5263. builtin and then its argument prototype would still apply. */
  5264. char jpeg_start_compress();
  5265. int main() {
  5266. jpeg_start_compress()
  5267. ; return 0; }
  5268. EOF
  5269. if { (eval echo configure:6386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5270. rm -rf conftest*
  5271. eval "ac_cv_lib_$ac_lib_var=yes"
  5272. else
  5273. echo "configure: failed program was:" >&5
  5274. cat conftest.$ac_ext >&5
  5275. rm -rf conftest*
  5276. eval "ac_cv_lib_$ac_lib_var=no"
  5277. fi
  5278. rm -f conftest*
  5279. LIBS="$ac_save_LIBS"
  5280. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5281. echo "$ac_t""yes" 1>&6
  5282. JPEGLIB="$JPEGLIB -ljpeg $ZLIB"
  5283. else
  5284. echo "$ac_t""no" 1>&6
  5285. LDFLAGS=${ac_save_ldflags}
  5286. { echo "configure: error: *** Unable to locate JPEG library." 1>&2; exit 1; }
  5287. fi
  5288. fi
  5289. LDFLAGS=${ac_save_ldflags}
  5290. fi # $USE_JPEG
  5291. # Done checking JPEG
  5292. # GDAL option
  5293. echo $ac_n "checking whether to use GDAL""... $ac_c" 1>&6
  5294. echo "configure:6435: checking whether to use GDAL" >&5
  5295. GDAL_LIBS=
  5296. GDAL_CFLAGS=
  5297. USE_GDAL=
  5298. USE_OGR=
  5299. if test "`basename xx/$with_gdal`" = "gdal-config" ; then
  5300. GDAL_CONFIG="$with_gdal"
  5301. fi
  5302. if test "$with_gdal" = "no" ; then
  5303. echo "$ac_t""no" 1>&6
  5304. else
  5305. echo "$ac_t""yes" 1>&6
  5306. # Extract the first word of "gdal-config", so it can be a program name with args.
  5307. set dummy gdal-config; ac_word=$2
  5308. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5309. echo "configure:6453: checking for $ac_word" >&5
  5310. case "$GDAL_CONFIG" in
  5311. /*)
  5312. ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a path.
  5313. ;;
  5314. ?:/*)
  5315. ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a dos path.
  5316. ;;
  5317. *)
  5318. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5319. ac_dummy="$PATH"
  5320. for ac_dir in $ac_dummy; do
  5321. test -z "$ac_dir" && ac_dir=.
  5322. if test -f $ac_dir/$ac_word; then
  5323. ac_cv_path_GDAL_CONFIG="$ac_dir/$ac_word"
  5324. break
  5325. fi
  5326. done
  5327. IFS="$ac_save_ifs"
  5328. test -z "$ac_cv_path_GDAL_CONFIG" && ac_cv_path_GDAL_CONFIG="no"
  5329. ;;
  5330. esac
  5331. GDAL_CONFIG="$ac_cv_path_GDAL_CONFIG"
  5332. if test -n "$GDAL_CONFIG"; then
  5333. echo "$ac_t""$GDAL_CONFIG" 1>&6
  5334. else
  5335. echo "$ac_t""no" 1>&6
  5336. fi
  5337. if test "$GDAL_CONFIG" = "no" ; then
  5338. { echo "configure: error: *** couldn't find gdal-config" 1>&2; exit 1; }
  5339. fi
  5340. if test "$GDAL_CONFIG" != "" ; then
  5341. GDAL_LIBS=`"$GDAL_CONFIG" --libs`
  5342. GDAL_DEP_LIBS=`"$GDAL_CONFIG" --dep-libs`
  5343. GDAL_CFLAGS=`"$GDAL_CONFIG" --cflags`
  5344. USE_GDAL=1
  5345. if test `"$GDAL_CONFIG" --ogr-enabled` = "yes" ; then
  5346. cat >> confdefs.h <<\EOF
  5347. #define HAVE_OGR 1
  5348. EOF
  5349. USE_OGR=1
  5350. fi
  5351. fi
  5352. GDAL=
  5353. ac_save_libs="$LIBS"
  5354. ac_save_cflags="$CFLAGS"
  5355. LIBS="$LIBS $GDAL_LIBS"
  5356. CFLAGS="$CFLAGS $GDAL_CFLAGS"
  5357. cat > conftest.$ac_ext <<EOF
  5358. #line 6508 "configure"
  5359. #include "confdefs.h"
  5360. #include <gdal.h>
  5361. int main() {
  5362. GDALOpen("foo", GA_ReadOnly);
  5363. ; return 0; }
  5364. EOF
  5365. if { (eval echo configure:6515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5366. :
  5367. else
  5368. echo "configure: failed program was:" >&5
  5369. cat conftest.$ac_ext >&5
  5370. rm -rf conftest*
  5371. LIBS="$LIBS $GDAL_DEP_LIBS"
  5372. cat > conftest.$ac_ext <<EOF
  5373. #line 6524 "configure"
  5374. #include "confdefs.h"
  5375. #include <gdal.h>
  5376. int main() {
  5377. GDALOpen("foo", GA_ReadOnly);
  5378. ; return 0; }
  5379. EOF
  5380. if { (eval echo configure:6531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5381. rm -rf conftest*
  5382. GDAL_LIBS="$GDAL_LIBS $GDAL_DEP_LIBS"
  5383. else
  5384. echo "configure: failed program was:" >&5
  5385. cat conftest.$ac_ext >&5
  5386. rm -rf conftest*
  5387. { echo "configure: error: *** Unable to locate GDAL library." 1>&2; exit 1; }
  5388. fi
  5389. rm -f conftest*
  5390. fi
  5391. rm -f conftest*
  5392. LIBS=${ac_save_libs}
  5393. CFLAGS=${ac_save_cflags}
  5394. cat >> confdefs.h <<\EOF
  5395. #define HAVE_GDAL 1
  5396. EOF
  5397. fi
  5398. # libLAS option
  5399. echo $ac_n "checking whether to use libLAS""... $ac_c" 1>&6
  5400. echo "configure:6563: checking whether to use libLAS" >&5
  5401. LIBLAS_LIBS=
  5402. LIBLAS_CFLAGS=
  5403. USE_LIBLAS=
  5404. if test "`basename xx/$with_liblas`" = "liblas-config" ; then
  5405. LIBLAS_CONFIG="$with_liblas"
  5406. fi
  5407. if test "$with_liblas" = "no" ; then
  5408. echo "$ac_t""no" 1>&6
  5409. else
  5410. echo "$ac_t""yes" 1>&6
  5411. # Extract the first word of "liblas-config", so it can be a program name with args.
  5412. set dummy liblas-config; ac_word=$2
  5413. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5414. echo "configure:6580: checking for $ac_word" >&5
  5415. case "$LIBLAS_CONFIG" in
  5416. /*)
  5417. ac_cv_path_LIBLAS_CONFIG="$LIBLAS_CONFIG" # Let the user override the test with a path.
  5418. ;;
  5419. ?:/*)
  5420. ac_cv_path_LIBLAS_CONFIG="$LIBLAS_CONFIG" # Let the user override the test with a dos path.
  5421. ;;
  5422. *)
  5423. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5424. ac_dummy="$PATH"
  5425. for ac_dir in $ac_dummy; do
  5426. test -z "$ac_dir" && ac_dir=.
  5427. if test -f $ac_dir/$ac_word; then
  5428. ac_cv_path_LIBLAS_CONFIG="$ac_dir/$ac_word"
  5429. break
  5430. fi
  5431. done
  5432. IFS="$ac_save_ifs"
  5433. test -z "$ac_cv_path_LIBLAS_CONFIG" && ac_cv_path_LIBLAS_CONFIG="no"
  5434. ;;
  5435. esac
  5436. LIBLAS_CONFIG="$ac_cv_path_LIBLAS_CONFIG"
  5437. if test -n "$LIBLAS_CONFIG"; then
  5438. echo "$ac_t""$LIBLAS_CONFIG" 1>&6
  5439. else
  5440. echo "$ac_t""no" 1>&6
  5441. fi
  5442. if test "$LIBLAS_CONFIG" = "no" ; then
  5443. { echo "configure: error: *** couldn't find liblas-config" 1>&2; exit 1; }
  5444. fi
  5445. if test "$LIBLAS_CONFIG" != "" ; then
  5446. LIBLAS_LIBS=`"$LIBLAS_CONFIG" --libs`
  5447. LIBLAS_CFLAGS=`"$LIBLAS_CONFIG" --cflags`
  5448. LIBLAS_INC=`"$LIBLAS_CONFIG" --includes`
  5449. USE_LIBLAS=1
  5450. fi
  5451. LIBLAS=
  5452. ac_save_libs="$LIBS"
  5453. ac_save_cflags="$CFLAGS"
  5454. LIBS="$LIBS $LIBLAS_LIBS"
  5455. CFLAGS="$CFLAGS $LIBLAS_CFLAGS"
  5456. cat > conftest.$ac_ext <<EOF
  5457. #line 6628 "configure"
  5458. #include "confdefs.h"
  5459. #include <liblas/capi/liblas.h>
  5460. int main() {
  5461. LASReader_Create("foo");
  5462. ; return 0; }
  5463. EOF
  5464. if { (eval echo configure:6635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5465. :
  5466. else
  5467. echo "configure: failed program was:" >&5
  5468. cat conftest.$ac_ext >&5
  5469. rm -rf conftest*
  5470. cat > conftest.$ac_ext <<EOF
  5471. #line 6643 "configure"
  5472. #include "confdefs.h"
  5473. #include <liblas/capi/liblas.h>
  5474. int main() {
  5475. LASReader_Create("foo");
  5476. ; return 0; }
  5477. EOF
  5478. if { (eval echo configure:6650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5479. rm -rf conftest*
  5480. LAS_LIBS="$LAS_LIBS"
  5481. else
  5482. echo "configure: failed program was:" >&5
  5483. cat conftest.$ac_ext >&5
  5484. rm -rf conftest*
  5485. { echo "configure: error: *** Unable to locate libLAS library." 1>&2; exit 1; }
  5486. fi
  5487. rm -f conftest*
  5488. fi
  5489. rm -f conftest*
  5490. LIBS=${ac_save_libs}
  5491. CFLAGS=${ac_save_cflags}
  5492. cat >> confdefs.h <<\EOF
  5493. #define HAVE_LIBLAS 1
  5494. EOF
  5495. fi
  5496. # GEOS option
  5497. echo $ac_n "checking whether to use GEOS""... $ac_c" 1>&6
  5498. echo "configure:6682: checking whether to use GEOS" >&5
  5499. GEOS_LIBS=
  5500. GGEOS_CFLAGS=
  5501. USE_GEOS=
  5502. # FIXME: "quote" $with_geos ?
  5503. if test "`basename xx/$with_geos`" = "geos-config" ; then
  5504. GEOS_CONFIG="$with_geos"
  5505. fi
  5506. if test "$with_geos" = "no" ; then
  5507. echo "$ac_t""no" 1>&6
  5508. else
  5509. echo "$ac_t""yes" 1>&6
  5510. # Extract the first word of "geos-config", so it can be a program name with args.
  5511. set dummy geos-config; ac_word=$2
  5512. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5513. echo "configure:6700: checking for $ac_word" >&5
  5514. case "$GEOS_CONFIG" in
  5515. /*)
  5516. ac_cv_path_GEOS_CONFIG="$GEOS_CONFIG" # Let the user override the test with a path.
  5517. ;;
  5518. ?:/*)
  5519. ac_cv_path_GEOS_CONFIG="$GEOS_CONFIG" # Let the user override the test with a dos path.
  5520. ;;
  5521. *)
  5522. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5523. ac_dummy="$PATH"
  5524. for ac_dir in $ac_dummy; do
  5525. test -z "$ac_dir" && ac_dir=.
  5526. if test -f $ac_dir/$ac_word; then
  5527. ac_cv_path_GEOS_CONFIG="$ac_dir/$ac_word"
  5528. break
  5529. fi
  5530. done
  5531. IFS="$ac_save_ifs"
  5532. test -z "$ac_cv_path_GEOS_CONFIG" && ac_cv_path_GEOS_CONFIG="no"
  5533. ;;
  5534. esac
  5535. GEOS_CONFIG="$ac_cv_path_GEOS_CONFIG"
  5536. if test -n "$GEOS_CONFIG"; then
  5537. echo "$ac_t""$GEOS_CONFIG" 1>&6
  5538. else
  5539. echo "$ac_t""no" 1>&6
  5540. fi
  5541. if test "$GEOS_CONFIG" = "no" ; then
  5542. { echo "configure: error: *** couldn't find geos-config" 1>&2; exit 1; }
  5543. fi
  5544. if test "$GEOS_CONFIG" != "" ; then
  5545. GEOS_LIBS=`"$GEOS_CONFIG" --libs`
  5546. GEOS_CFLAGS=`"$GEOS_CONFIG" --cflags`
  5547. USE_GEOS=1
  5548. fi
  5549. ac_save_cppflags="$CPPFLAGS"
  5550. CPPFLAGS="$GEOS_CFLAGS $CPPFLAGS"
  5551. for ac_hdr in geos_c.h
  5552. do
  5553. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5554. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5555. echo "configure:6748: checking for $ac_hdr" >&5
  5556. cat > conftest.$ac_ext <<EOF
  5557. #line 6751 "configure"
  5558. #include "confdefs.h"
  5559. #include <$ac_hdr>
  5560. EOF
  5561. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5562. { (eval echo configure:6756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5563. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5564. if test -z "$ac_err"; then
  5565. rm -rf conftest*
  5566. eval "ac_cv_header_$ac_safe=yes"
  5567. else
  5568. echo "$ac_err" >&5
  5569. echo "configure: failed program was:" >&5
  5570. cat conftest.$ac_ext >&5
  5571. rm -rf conftest*
  5572. eval "ac_cv_header_$ac_safe=no"
  5573. fi
  5574. rm -f conftest*
  5575. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5576. echo "$ac_t""yes" 1>&6
  5577. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5578. cat >> confdefs.h <<EOF
  5579. #define $ac_tr_hdr 1
  5580. EOF
  5581. else
  5582. echo "$ac_t""no" 1>&6
  5583. { echo "configure: error: *** Unable to locate GEOS includes." 1>&2; exit 1; }
  5584. fi
  5585. done
  5586. CPPFLAGS=$ac_save_cppflags
  5587. if test "$MINGW32" = yes ; then
  5588. ac_save_ldflags="$LDFLAGS"
  5589. LDFLAGS="$GEOS_LIBS $LDFLAGS"
  5590. echo $ac_n "checking for initGEOS in -lgeos_c_i""... $ac_c" 1>&6
  5591. echo "configure:6792: checking for initGEOS in -lgeos_c_i" >&5
  5592. ac_lib_var=`echo geos_c_i'_'initGEOS | sed 'y%./+-%__p_%'`
  5593. ac_save_LIBS="$LIBS"
  5594. LIBS="-lgeos_c_i $LIBS"
  5595. cat > conftest.$ac_ext <<EOF
  5596. #line 6798 "configure"
  5597. #include "confdefs.h"
  5598. /* Override any gcc2 internal prototype to avoid an error. */
  5599. /* We use char because int might match the return type of a gcc2
  5600. builtin and then its argument prototype would still apply. */
  5601. char initGEOS();
  5602. int main() {
  5603. initGEOS()
  5604. ; return 0; }
  5605. EOF
  5606. if { (eval echo configure:6809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5607. rm -rf conftest*
  5608. eval "ac_cv_lib_$ac_lib_var=yes"
  5609. else
  5610. echo "configure: failed program was:" >&5
  5611. cat conftest.$ac_ext >&5
  5612. rm -rf conftest*
  5613. eval "ac_cv_lib_$ac_lib_var=no"
  5614. fi
  5615. rm -f conftest*
  5616. LIBS="$ac_save_LIBS"
  5617. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5618. echo "$ac_t""yes" 1>&6
  5619. GEOS_LIBS="$GEOS_LIBS -lgeos_c_i "
  5620. else
  5621. echo "$ac_t""no" 1>&6
  5622. LDFLAGS=${ac_save_ldflags}
  5623. { echo "configure: error: *** Unable to locate GEOS library." 1>&2; exit 1; }
  5624. fi
  5625. LDFLAGS=${ac_save_ldflags}
  5626. else
  5627. ac_save_ldflags="$LDFLAGS"
  5628. LDFLAGS="$GEOS_LIBS $LDFLAGS"
  5629. echo $ac_n "checking for initGEOS in -lgeos_c""... $ac_c" 1>&6
  5630. echo "configure:6845: checking for initGEOS in -lgeos_c" >&5
  5631. ac_lib_var=`echo geos_c'_'initGEOS | sed 'y%./+-%__p_%'`
  5632. ac_save_LIBS="$LIBS"
  5633. LIBS="-lgeos_c $LIBS"
  5634. cat > conftest.$ac_ext <<EOF
  5635. #line 6851 "configure"
  5636. #include "confdefs.h"
  5637. /* Override any gcc2 internal prototype to avoid an error. */
  5638. /* We use char because int might match the return type of a gcc2
  5639. builtin and then its argument prototype would still apply. */
  5640. char initGEOS();
  5641. int main() {
  5642. initGEOS()
  5643. ; return 0; }
  5644. EOF
  5645. if { (eval echo configure:6862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5646. rm -rf conftest*
  5647. eval "ac_cv_lib_$ac_lib_var=yes"
  5648. else
  5649. echo "configure: failed program was:" >&5
  5650. cat conftest.$ac_ext >&5
  5651. rm -rf conftest*
  5652. eval "ac_cv_lib_$ac_lib_var=no"
  5653. fi
  5654. rm -f conftest*
  5655. LIBS="$ac_save_LIBS"
  5656. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5657. echo "$ac_t""yes" 1>&6
  5658. GEOS_LIBS="$GEOS_LIBS -lgeos_c "
  5659. else
  5660. echo "$ac_t""no" 1>&6
  5661. LDFLAGS=${ac_save_ldflags}
  5662. { echo "configure: error: *** Unable to locate GEOS library." 1>&2; exit 1; }
  5663. fi
  5664. LDFLAGS=${ac_save_ldflags}
  5665. fi
  5666. cat >> confdefs.h <<\EOF
  5667. #define HAVE_GEOS 1
  5668. EOF
  5669. fi
  5670. # Enable TIFF option
  5671. echo $ac_n "checking whether to use TIFF""... $ac_c" 1>&6
  5672. echo "configure:6906: checking whether to use TIFF" >&5
  5673. echo "$ac_t"""$with_tiff"" 1>&6
  5674. case "$with_tiff" in
  5675. "no") USE_TIFF= ;;
  5676. "yes") USE_TIFF="1" ;;
  5677. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  5678. esac
  5679. TIFF_INCLUDE_DIRS=
  5680. TIFF_LIBRARY_DIRS=
  5681. TIFFLIB=
  5682. if test -n "$USE_TIFF"; then
  5683. # With TIFF includes directory
  5684. echo $ac_n "checking for location of TIFF includes""... $ac_c" 1>&6
  5685. echo "configure:6926: checking for location of TIFF includes" >&5
  5686. case "$with_tiff_includes" in
  5687. y | ye | yes | n | no)
  5688. { echo "configure: error: *** You must supply a directory to --with-tiff-includes." 1>&2; exit 1; }
  5689. ;;
  5690. esac
  5691. echo "$ac_t""$with_tiff_includes" 1>&6
  5692. if test -n "$with_tiff_includes" ; then
  5693. for dir in $with_tiff_includes; do
  5694. if test -d "$dir"; then
  5695. TIFF_INCLUDE_DIRS="$TIFF_INCLUDE_DIRS -I$dir"
  5696. else
  5697. { echo "configure: error: *** TIFF includes directory $dir does not exist." 1>&2; exit 1; }
  5698. fi
  5699. done
  5700. fi
  5701. ac_save_cppflags="$CPPFLAGS"
  5702. CPPFLAGS="$TIFF_INCLUDE_DIRS $CPPFLAGS"
  5703. for ac_hdr in tiffio.h
  5704. do
  5705. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5706. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5707. echo "configure:6952: checking for $ac_hdr" >&5
  5708. cat > conftest.$ac_ext <<EOF
  5709. #line 6955 "configure"
  5710. #include "confdefs.h"
  5711. #include <$ac_hdr>
  5712. EOF
  5713. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5714. { (eval echo configure:6960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5715. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5716. if test -z "$ac_err"; then
  5717. rm -rf conftest*
  5718. eval "ac_cv_header_$ac_safe=yes"
  5719. else
  5720. echo "$ac_err" >&5
  5721. echo "configure: failed program was:" >&5
  5722. cat conftest.$ac_ext >&5
  5723. rm -rf conftest*
  5724. eval "ac_cv_header_$ac_safe=no"
  5725. fi
  5726. rm -f conftest*
  5727. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5728. echo "$ac_t""yes" 1>&6
  5729. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5730. cat >> confdefs.h <<EOF
  5731. #define $ac_tr_hdr 1
  5732. EOF
  5733. else
  5734. echo "$ac_t""no" 1>&6
  5735. { echo "configure: error: *** Unable to locate TIFF includes." 1>&2; exit 1; }
  5736. fi
  5737. done
  5738. CPPFLAGS=$ac_save_cppflags
  5739. # With TIFF library directory
  5740. echo $ac_n "checking for location of TIFF library""... $ac_c" 1>&6
  5741. echo "configure:6994: checking for location of TIFF library" >&5
  5742. case "$with_tiff_libs" in
  5743. y | ye | yes | n | no)
  5744. { echo "configure: error: *** You must supply a directory to --with-tiff-libs." 1>&2; exit 1; }
  5745. ;;
  5746. esac
  5747. echo "$ac_t""$with_tiff_libs" 1>&6
  5748. if test -n "$with_tiff_libs"; then
  5749. for dir in $with_tiff_libs; do
  5750. if test -d "$dir"; then
  5751. TIFF_LIBRARY_DIRS="$TIFF_LIBRARY_DIRS -L$dir"
  5752. else
  5753. { echo "configure: error: *** TIFF library directory $dir does not exist." 1>&2; exit 1; }
  5754. fi
  5755. done
  5756. fi
  5757. ac_save_ldflags="$LDFLAGS"
  5758. LDFLAGS="$TIFF_LIBRARY_DIRS $LDFLAGS"
  5759. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5760. echo "configure:7025: checking for TIFFOpen in -ltiff" >&5
  5761. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5762. ac_save_LIBS="$LIBS"
  5763. LIBS="-ltiff $LIBS"
  5764. cat > conftest.$ac_ext <<EOF
  5765. #line 7031 "configure"
  5766. #include "confdefs.h"
  5767. /* Override any gcc2 internal prototype to avoid an error. */
  5768. /* We use char because int might match the return type of a gcc2
  5769. builtin and then its argument prototype would still apply. */
  5770. char TIFFOpen();
  5771. int main() {
  5772. TIFFOpen()
  5773. ; return 0; }
  5774. EOF
  5775. if { (eval echo configure:7042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5776. rm -rf conftest*
  5777. eval "ac_cv_lib_$ac_lib_var=yes"
  5778. else
  5779. echo "configure: failed program was:" >&5
  5780. cat conftest.$ac_ext >&5
  5781. rm -rf conftest*
  5782. eval "ac_cv_lib_$ac_lib_var=no"
  5783. fi
  5784. rm -f conftest*
  5785. LIBS="$ac_save_LIBS"
  5786. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5787. echo "$ac_t""yes" 1>&6
  5788. TIFFLIB="$TIFFLIB -ltiff "
  5789. else
  5790. echo "$ac_t""no" 1>&6
  5791. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5792. echo "configure:7061: checking for TIFFOpen in -ltiff" >&5
  5793. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5794. ac_save_LIBS="$LIBS"
  5795. LIBS="-ltiff $MATHLIB $LIBS"
  5796. cat > conftest.$ac_ext <<EOF
  5797. #line 7067 "configure"
  5798. #include "confdefs.h"
  5799. /* Override any gcc2 internal prototype to avoid an error. */
  5800. /* We use char because int might match the return type of a gcc2
  5801. builtin and then its argument prototype would still apply. */
  5802. char TIFFOpen();
  5803. int main() {
  5804. TIFFOpen()
  5805. ; return 0; }
  5806. EOF
  5807. if { (eval echo configure:7078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5808. rm -rf conftest*
  5809. eval "ac_cv_lib_$ac_lib_var=yes"
  5810. else
  5811. echo "configure: failed program was:" >&5
  5812. cat conftest.$ac_ext >&5
  5813. rm -rf conftest*
  5814. eval "ac_cv_lib_$ac_lib_var=no"
  5815. fi
  5816. rm -f conftest*
  5817. LIBS="$ac_save_LIBS"
  5818. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5819. echo "$ac_t""yes" 1>&6
  5820. TIFFLIB="$TIFFLIB -ltiff $MATHLIB"
  5821. else
  5822. echo "$ac_t""no" 1>&6
  5823. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5824. echo "configure:7097: checking for TIFFOpen in -ltiff" >&5
  5825. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5826. ac_save_LIBS="$LIBS"
  5827. LIBS="-ltiff $ZLIB $LIBS"
  5828. cat > conftest.$ac_ext <<EOF
  5829. #line 7103 "configure"
  5830. #include "confdefs.h"
  5831. /* Override any gcc2 internal prototype to avoid an error. */
  5832. /* We use char because int might match the return type of a gcc2
  5833. builtin and then its argument prototype would still apply. */
  5834. char TIFFOpen();
  5835. int main() {
  5836. TIFFOpen()
  5837. ; return 0; }
  5838. EOF
  5839. if { (eval echo configure:7114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5840. rm -rf conftest*
  5841. eval "ac_cv_lib_$ac_lib_var=yes"
  5842. else
  5843. echo "configure: failed program was:" >&5
  5844. cat conftest.$ac_ext >&5
  5845. rm -rf conftest*
  5846. eval "ac_cv_lib_$ac_lib_var=no"
  5847. fi
  5848. rm -f conftest*
  5849. LIBS="$ac_save_LIBS"
  5850. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5851. echo "$ac_t""yes" 1>&6
  5852. TIFFLIB="$TIFFLIB -ltiff $ZLIB"
  5853. else
  5854. echo "$ac_t""no" 1>&6
  5855. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5856. echo "configure:7133: checking for TIFFOpen in -ltiff" >&5
  5857. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5858. ac_save_LIBS="$LIBS"
  5859. LIBS="-ltiff $ZLIB $MATHLIB $LIBS"
  5860. cat > conftest.$ac_ext <<EOF
  5861. #line 7139 "configure"
  5862. #include "confdefs.h"
  5863. /* Override any gcc2 internal prototype to avoid an error. */
  5864. /* We use char because int might match the return type of a gcc2
  5865. builtin and then its argument prototype would still apply. */
  5866. char TIFFOpen();
  5867. int main() {
  5868. TIFFOpen()
  5869. ; return 0; }
  5870. EOF
  5871. if { (eval echo configure:7150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5872. rm -rf conftest*
  5873. eval "ac_cv_lib_$ac_lib_var=yes"
  5874. else
  5875. echo "configure: failed program was:" >&5
  5876. cat conftest.$ac_ext >&5
  5877. rm -rf conftest*
  5878. eval "ac_cv_lib_$ac_lib_var=no"
  5879. fi
  5880. rm -f conftest*
  5881. LIBS="$ac_save_LIBS"
  5882. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5883. echo "$ac_t""yes" 1>&6
  5884. TIFFLIB="$TIFFLIB -ltiff $ZLIB $MATHLIB"
  5885. else
  5886. echo "$ac_t""no" 1>&6
  5887. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5888. echo "configure:7169: checking for TIFFOpen in -ltiff" >&5
  5889. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5890. ac_save_LIBS="$LIBS"
  5891. LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $LIBS"
  5892. cat > conftest.$ac_ext <<EOF
  5893. #line 7175 "configure"
  5894. #include "confdefs.h"
  5895. /* Override any gcc2 internal prototype to avoid an error. */
  5896. /* We use char because int might match the return type of a gcc2
  5897. builtin and then its argument prototype would still apply. */
  5898. char TIFFOpen();
  5899. int main() {
  5900. TIFFOpen()
  5901. ; return 0; }
  5902. EOF
  5903. if { (eval echo configure:7186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5904. rm -rf conftest*
  5905. eval "ac_cv_lib_$ac_lib_var=yes"
  5906. else
  5907. echo "configure: failed program was:" >&5
  5908. cat conftest.$ac_ext >&5
  5909. rm -rf conftest*
  5910. eval "ac_cv_lib_$ac_lib_var=no"
  5911. fi
  5912. rm -f conftest*
  5913. LIBS="$ac_save_LIBS"
  5914. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5915. echo "$ac_t""yes" 1>&6
  5916. TIFFLIB="$TIFFLIB -ltiff $JPEGLIBPATH $JPEGLIB"
  5917. else
  5918. echo "$ac_t""no" 1>&6
  5919. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5920. echo "configure:7205: checking for TIFFOpen in -ltiff" >&5
  5921. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5922. ac_save_LIBS="$LIBS"
  5923. LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $MATHLIB $LIBS"
  5924. cat > conftest.$ac_ext <<EOF
  5925. #line 7211 "configure"
  5926. #include "confdefs.h"
  5927. /* Override any gcc2 internal prototype to avoid an error. */
  5928. /* We use char because int might match the return type of a gcc2
  5929. builtin and then its argument prototype would still apply. */
  5930. char TIFFOpen();
  5931. int main() {
  5932. TIFFOpen()
  5933. ; return 0; }
  5934. EOF
  5935. if { (eval echo configure:7222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5936. rm -rf conftest*
  5937. eval "ac_cv_lib_$ac_lib_var=yes"
  5938. else
  5939. echo "configure: failed program was:" >&5
  5940. cat conftest.$ac_ext >&5
  5941. rm -rf conftest*
  5942. eval "ac_cv_lib_$ac_lib_var=no"
  5943. fi
  5944. rm -f conftest*
  5945. LIBS="$ac_save_LIBS"
  5946. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5947. echo "$ac_t""yes" 1>&6
  5948. TIFFLIB="$TIFFLIB -ltiff $JPEGLIBPATH $JPEGLIB $MATHLIB"
  5949. else
  5950. echo "$ac_t""no" 1>&6
  5951. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5952. echo "configure:7241: checking for TIFFOpen in -ltiff" >&5
  5953. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5954. ac_save_LIBS="$LIBS"
  5955. LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $ZLIB $LIBS"
  5956. cat > conftest.$ac_ext <<EOF
  5957. #line 7247 "configure"
  5958. #include "confdefs.h"
  5959. /* Override any gcc2 internal prototype to avoid an error. */
  5960. /* We use char because int might match the return type of a gcc2
  5961. builtin and then its argument prototype would still apply. */
  5962. char TIFFOpen();
  5963. int main() {
  5964. TIFFOpen()
  5965. ; return 0; }
  5966. EOF
  5967. if { (eval echo configure:7258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5968. rm -rf conftest*
  5969. eval "ac_cv_lib_$ac_lib_var=yes"
  5970. else
  5971. echo "configure: failed program was:" >&5
  5972. cat conftest.$ac_ext >&5
  5973. rm -rf conftest*
  5974. eval "ac_cv_lib_$ac_lib_var=no"
  5975. fi
  5976. rm -f conftest*
  5977. LIBS="$ac_save_LIBS"
  5978. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5979. echo "$ac_t""yes" 1>&6
  5980. TIFFLIB="$TIFFLIB -ltiff $JPEGLIBPATH $JPEGLIB $ZLIB"
  5981. else
  5982. echo "$ac_t""no" 1>&6
  5983. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5984. echo "configure:7277: checking for TIFFOpen in -ltiff" >&5
  5985. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5986. ac_save_LIBS="$LIBS"
  5987. LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $ZLIB $MATHLIB $LIBS"
  5988. cat > conftest.$ac_ext <<EOF
  5989. #line 7283 "configure"
  5990. #include "confdefs.h"
  5991. /* Override any gcc2 internal prototype to avoid an error. */
  5992. /* We use char because int might match the return type of a gcc2
  5993. builtin and then its argument prototype would still apply. */
  5994. char TIFFOpen();
  5995. int main() {
  5996. TIFFOpen()
  5997. ; return 0; }
  5998. EOF
  5999. if { (eval echo configure:7294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6000. rm -rf conftest*
  6001. eval "ac_cv_lib_$ac_lib_var=yes"
  6002. else
  6003. echo "configure: failed program was:" >&5
  6004. cat conftest.$ac_ext >&5
  6005. rm -rf conftest*
  6006. eval "ac_cv_lib_$ac_lib_var=no"
  6007. fi
  6008. rm -f conftest*
  6009. LIBS="$ac_save_LIBS"
  6010. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6011. echo "$ac_t""yes" 1>&6
  6012. TIFFLIB="$TIFFLIB -ltiff $JPEGLIBPATH $JPEGLIB $ZLIB $MATHLIB"
  6013. else
  6014. echo "$ac_t""no" 1>&6
  6015. LDFLAGS=${ac_save_ldflags}
  6016. { echo "configure: error: *** Unable to locate TIFF library." 1>&2; exit 1; }
  6017. fi
  6018. fi
  6019. fi
  6020. fi
  6021. fi
  6022. fi
  6023. fi
  6024. fi
  6025. LDFLAGS=${ac_save_ldflags}
  6026. fi # $USE_TIFF
  6027. # Done checking TIFF
  6028. # Enable PNG option
  6029. echo $ac_n "checking whether to use PNG""... $ac_c" 1>&6
  6030. echo "configure:7392: checking whether to use PNG" >&5
  6031. echo "$ac_t"""$with_png"" 1>&6
  6032. case "$with_png" in
  6033. "no") USE_PNG= ;;
  6034. "yes") USE_PNG="1" ;;
  6035. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6036. esac
  6037. PNGINC=
  6038. PNGLIB=
  6039. if test -n "$USE_PNG"; then
  6040. # With PNG includes directory
  6041. echo $ac_n "checking for location of PNG includes""... $ac_c" 1>&6
  6042. echo "configure:7411: checking for location of PNG includes" >&5
  6043. case "$with_png_includes" in
  6044. y | ye | yes | n | no)
  6045. { echo "configure: error: *** You must supply a directory to --with-png-includes." 1>&2; exit 1; }
  6046. ;;
  6047. esac
  6048. echo "$ac_t""$with_png_includes" 1>&6
  6049. if test -n "$with_png_includes" ; then
  6050. for dir in $with_png_includes; do
  6051. if test -d "$dir"; then
  6052. PNGINC="$PNGINC -I$dir"
  6053. else
  6054. { echo "configure: error: *** PNG includes directory $dir does not exist." 1>&2; exit 1; }
  6055. fi
  6056. done
  6057. fi
  6058. ac_save_cppflags="$CPPFLAGS"
  6059. CPPFLAGS="$PNGINC $CPPFLAGS"
  6060. for ac_hdr in png.h
  6061. do
  6062. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6063. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6064. echo "configure:7437: checking for $ac_hdr" >&5
  6065. cat > conftest.$ac_ext <<EOF
  6066. #line 7440 "configure"
  6067. #include "confdefs.h"
  6068. #include <$ac_hdr>
  6069. EOF
  6070. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6071. { (eval echo configure:7445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6072. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6073. if test -z "$ac_err"; then
  6074. rm -rf conftest*
  6075. eval "ac_cv_header_$ac_safe=yes"
  6076. else
  6077. echo "$ac_err" >&5
  6078. echo "configure: failed program was:" >&5
  6079. cat conftest.$ac_ext >&5
  6080. rm -rf conftest*
  6081. eval "ac_cv_header_$ac_safe=no"
  6082. fi
  6083. rm -f conftest*
  6084. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6085. echo "$ac_t""yes" 1>&6
  6086. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6087. cat >> confdefs.h <<EOF
  6088. #define $ac_tr_hdr 1
  6089. EOF
  6090. else
  6091. echo "$ac_t""no" 1>&6
  6092. { echo "configure: error: *** Unable to locate PNG includes." 1>&2; exit 1; }
  6093. fi
  6094. done
  6095. CPPFLAGS=$ac_save_cppflags
  6096. # With PNG library directory
  6097. echo $ac_n "checking for location of PNG library""... $ac_c" 1>&6
  6098. echo "configure:7479: checking for location of PNG library" >&5
  6099. case "$with_png_libs" in
  6100. y | ye | yes | n | no)
  6101. { echo "configure: error: *** You must supply a directory to --with-png-libs." 1>&2; exit 1; }
  6102. ;;
  6103. esac
  6104. echo "$ac_t""$with_png_libs" 1>&6
  6105. if test -n "$with_png_libs"; then
  6106. for dir in $with_png_libs; do
  6107. if test -d "$dir"; then
  6108. PNGLIB="$PNGLIB -L$dir"
  6109. else
  6110. { echo "configure: error: *** PNG library directory $dir does not exist." 1>&2; exit 1; }
  6111. fi
  6112. done
  6113. fi
  6114. ac_save_ldflags="$LDFLAGS"
  6115. LDFLAGS="$PNGLIB $LDFLAGS"
  6116. echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
  6117. echo "configure:7504: checking for png_read_image in -lpng" >&5
  6118. ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
  6119. ac_save_LIBS="$LIBS"
  6120. LIBS="-lpng $ZLIB $MATHLIB $LIBS"
  6121. cat > conftest.$ac_ext <<EOF
  6122. #line 7510 "configure"
  6123. #include "confdefs.h"
  6124. /* Override any gcc2 internal prototype to avoid an error. */
  6125. /* We use char because int might match the return type of a gcc2
  6126. builtin and then its argument prototype would still apply. */
  6127. char png_read_image();
  6128. int main() {
  6129. png_read_image()
  6130. ; return 0; }
  6131. EOF
  6132. if { (eval echo configure:7521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6133. rm -rf conftest*
  6134. eval "ac_cv_lib_$ac_lib_var=yes"
  6135. else
  6136. echo "configure: failed program was:" >&5
  6137. cat conftest.$ac_ext >&5
  6138. rm -rf conftest*
  6139. eval "ac_cv_lib_$ac_lib_var=no"
  6140. fi
  6141. rm -f conftest*
  6142. LIBS="$ac_save_LIBS"
  6143. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6144. echo "$ac_t""yes" 1>&6
  6145. PNGLIB="$PNGLIB -lpng $ZLIB $MATHLIB"
  6146. else
  6147. echo "$ac_t""no" 1>&6
  6148. LDFLAGS=${ac_save_ldflags}
  6149. { echo "configure: error: *** Unable to locate PNG library." 1>&2; exit 1; }
  6150. fi
  6151. LDFLAGS=${ac_save_ldflags}
  6152. fi # $USE_PNG
  6153. # Done checking PNG
  6154. # Enable PostgreSQL option
  6155. echo $ac_n "checking whether to use PostgreSQL""... $ac_c" 1>&6
  6156. echo "configure:7563: checking whether to use PostgreSQL" >&5
  6157. echo "$ac_t"""$with_postgres"" 1>&6
  6158. case "$with_postgres" in
  6159. "no") USE_POSTGRES= ;;
  6160. "yes") USE_POSTGRES="1" ;;
  6161. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6162. esac
  6163. if test -n "$USE_POSTGRES"; then
  6164. cat >> confdefs.h <<\EOF
  6165. #define HAVE_POSTGRES 1
  6166. EOF
  6167. fi # $USE_POSTGRES
  6168. PQINCPATH=
  6169. PQLIBPATH=
  6170. PQLIB=
  6171. if test -n "$USE_POSTGRES"; then
  6172. # With PostgreSQL includes directory
  6173. echo $ac_n "checking for location of PostgreSQL includes""... $ac_c" 1>&6
  6174. echo "configure:7590: checking for location of PostgreSQL includes" >&5
  6175. case "$with_postgres_includes" in
  6176. y | ye | yes | n | no)
  6177. { echo "configure: error: *** You must supply a directory to --with-postgres-includes." 1>&2; exit 1; }
  6178. ;;
  6179. esac
  6180. echo "$ac_t""$with_postgres_includes" 1>&6
  6181. if test -n "$with_postgres_includes" ; then
  6182. for dir in $with_postgres_includes; do
  6183. if test -d "$dir"; then
  6184. PQINCPATH="$PQINCPATH -I$dir"
  6185. else
  6186. { echo "configure: error: *** PostgreSQL includes directory $dir does not exist." 1>&2; exit 1; }
  6187. fi
  6188. done
  6189. fi
  6190. ac_save_cppflags="$CPPFLAGS"
  6191. CPPFLAGS="$PQINCPATH $CPPFLAGS"
  6192. for ac_hdr in libpq-fe.h
  6193. do
  6194. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6195. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6196. echo "configure:7616: checking for $ac_hdr" >&5
  6197. cat > conftest.$ac_ext <<EOF
  6198. #line 7619 "configure"
  6199. #include "confdefs.h"
  6200. #include <$ac_hdr>
  6201. EOF
  6202. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6203. { (eval echo configure:7624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6204. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6205. if test -z "$ac_err"; then
  6206. rm -rf conftest*
  6207. eval "ac_cv_header_$ac_safe=yes"
  6208. else
  6209. echo "$ac_err" >&5
  6210. echo "configure: failed program was:" >&5
  6211. cat conftest.$ac_ext >&5
  6212. rm -rf conftest*
  6213. eval "ac_cv_header_$ac_safe=no"
  6214. fi
  6215. rm -f conftest*
  6216. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6217. echo "$ac_t""yes" 1>&6
  6218. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6219. cat >> confdefs.h <<EOF
  6220. #define $ac_tr_hdr 1
  6221. EOF
  6222. else
  6223. echo "$ac_t""no" 1>&6
  6224. { echo "configure: error: *** Unable to locate PostgreSQL includes." 1>&2; exit 1; }
  6225. fi
  6226. done
  6227. CPPFLAGS=$ac_save_cppflags
  6228. fi # $USE_POSTGRES
  6229. if test -n "$USE_POSTGRES"; then
  6230. # With PostgreSQL library directory
  6231. echo $ac_n "checking for location of PostgreSQL library""... $ac_c" 1>&6
  6232. echo "configure:7662: checking for location of PostgreSQL library" >&5
  6233. case "$with_postgres_libs" in
  6234. y | ye | yes | n | no)
  6235. { echo "configure: error: *** You must supply a directory to --with-postgres-libs." 1>&2; exit 1; }
  6236. ;;
  6237. esac
  6238. echo "$ac_t""$with_postgres_libs" 1>&6
  6239. if test -n "$with_postgres_libs"; then
  6240. for dir in $with_postgres_libs; do
  6241. if test -d "$dir"; then
  6242. PQLIBPATH="$PQLIBPATH -L$dir"
  6243. else
  6244. { echo "configure: error: *** PostgreSQL library directory $dir does not exist." 1>&2; exit 1; }
  6245. fi
  6246. done
  6247. fi
  6248. ac_save_ldflags="$LDFLAGS"
  6249. LDFLAGS="$PQLIBPATH $LDFLAGS"
  6250. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6251. echo "configure:7691: checking for PQsetdbLogin in -lpq" >&5
  6252. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6253. ac_save_LIBS="$LIBS"
  6254. LIBS="-lpq $LIBS"
  6255. cat > conftest.$ac_ext <<EOF
  6256. #line 7697 "configure"
  6257. #include "confdefs.h"
  6258. /* Override any gcc2 internal prototype to avoid an error. */
  6259. /* We use char because int might match the return type of a gcc2
  6260. builtin and then its argument prototype would still apply. */
  6261. char PQsetdbLogin();
  6262. int main() {
  6263. PQsetdbLogin()
  6264. ; return 0; }
  6265. EOF
  6266. if { (eval echo configure:7708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6267. rm -rf conftest*
  6268. eval "ac_cv_lib_$ac_lib_var=yes"
  6269. else
  6270. echo "configure: failed program was:" >&5
  6271. cat conftest.$ac_ext >&5
  6272. rm -rf conftest*
  6273. eval "ac_cv_lib_$ac_lib_var=no"
  6274. fi
  6275. rm -f conftest*
  6276. LIBS="$ac_save_LIBS"
  6277. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6278. echo "$ac_t""yes" 1>&6
  6279. PQLIB="$PQLIB -lpq "
  6280. else
  6281. echo "$ac_t""no" 1>&6
  6282. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6283. echo "configure:7727: checking for PQsetdbLogin in -lpq" >&5
  6284. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6285. ac_save_LIBS="$LIBS"
  6286. LIBS="-lpq -lssl -lcrypto $LIBS"
  6287. cat > conftest.$ac_ext <<EOF
  6288. #line 7733 "configure"
  6289. #include "confdefs.h"
  6290. /* Override any gcc2 internal prototype to avoid an error. */
  6291. /* We use char because int might match the return type of a gcc2
  6292. builtin and then its argument prototype would still apply. */
  6293. char PQsetdbLogin();
  6294. int main() {
  6295. PQsetdbLogin()
  6296. ; return 0; }
  6297. EOF
  6298. if { (eval echo configure:7744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6299. rm -rf conftest*
  6300. eval "ac_cv_lib_$ac_lib_var=yes"
  6301. else
  6302. echo "configure: failed program was:" >&5
  6303. cat conftest.$ac_ext >&5
  6304. rm -rf conftest*
  6305. eval "ac_cv_lib_$ac_lib_var=no"
  6306. fi
  6307. rm -f conftest*
  6308. LIBS="$ac_save_LIBS"
  6309. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6310. echo "$ac_t""yes" 1>&6
  6311. PQLIB="$PQLIB -lpq -lssl -lcrypto"
  6312. else
  6313. echo "$ac_t""no" 1>&6
  6314. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6315. echo "configure:7763: checking for PQsetdbLogin in -lpq" >&5
  6316. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6317. ac_save_LIBS="$LIBS"
  6318. LIBS="-lpq -lcrypt $LIBS"
  6319. cat > conftest.$ac_ext <<EOF
  6320. #line 7769 "configure"
  6321. #include "confdefs.h"
  6322. /* Override any gcc2 internal prototype to avoid an error. */
  6323. /* We use char because int might match the return type of a gcc2
  6324. builtin and then its argument prototype would still apply. */
  6325. char PQsetdbLogin();
  6326. int main() {
  6327. PQsetdbLogin()
  6328. ; return 0; }
  6329. EOF
  6330. if { (eval echo configure:7780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6331. rm -rf conftest*
  6332. eval "ac_cv_lib_$ac_lib_var=yes"
  6333. else
  6334. echo "configure: failed program was:" >&5
  6335. cat conftest.$ac_ext >&5
  6336. rm -rf conftest*
  6337. eval "ac_cv_lib_$ac_lib_var=no"
  6338. fi
  6339. rm -f conftest*
  6340. LIBS="$ac_save_LIBS"
  6341. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6342. echo "$ac_t""yes" 1>&6
  6343. PQLIB="$PQLIB -lpq -lcrypt"
  6344. else
  6345. echo "$ac_t""no" 1>&6
  6346. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6347. echo "configure:7799: checking for PQsetdbLogin in -lpq" >&5
  6348. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6349. ac_save_LIBS="$LIBS"
  6350. LIBS="-lpq -lcrypt -lssl -lcrypto $LIBS"
  6351. cat > conftest.$ac_ext <<EOF
  6352. #line 7805 "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 PQsetdbLogin();
  6358. int main() {
  6359. PQsetdbLogin()
  6360. ; return 0; }
  6361. EOF
  6362. if { (eval echo configure:7816: \"$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. PQLIB="$PQLIB -lpq -lcrypt -lssl -lcrypto"
  6376. else
  6377. echo "$ac_t""no" 1>&6
  6378. LDFLAGS=${ac_save_ldflags}
  6379. { echo "configure: error: *** Unable to locate PostgreSQL library." 1>&2; exit 1; }
  6380. fi
  6381. fi
  6382. fi
  6383. fi
  6384. LDFLAGS=${ac_save_ldflags}
  6385. ac_save_ldflags="$LDFLAGS"
  6386. LDFLAGS="$LDFLAGS $PQLIBPATH"
  6387. echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
  6388. echo "configure:7873: checking for PQcmdTuples in -lpq" >&5
  6389. ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
  6390. ac_save_LIBS="$LIBS"
  6391. LIBS="-lpq $LIBS"
  6392. cat > conftest.$ac_ext <<EOF
  6393. #line 7879 "configure"
  6394. #include "confdefs.h"
  6395. /* Override any gcc2 internal prototype to avoid an error. */
  6396. /* We use char because int might match the return type of a gcc2
  6397. builtin and then its argument prototype would still apply. */
  6398. char PQcmdTuples();
  6399. int main() {
  6400. PQcmdTuples()
  6401. ; return 0; }
  6402. EOF
  6403. if { (eval echo configure:7890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6404. rm -rf conftest*
  6405. eval "ac_cv_lib_$ac_lib_var=yes"
  6406. else
  6407. echo "configure: failed program was:" >&5
  6408. cat conftest.$ac_ext >&5
  6409. rm -rf conftest*
  6410. eval "ac_cv_lib_$ac_lib_var=no"
  6411. fi
  6412. rm -f conftest*
  6413. LIBS="$ac_save_LIBS"
  6414. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6415. echo "$ac_t""yes" 1>&6
  6416. cat >> confdefs.h <<\EOF
  6417. #define HAVE_PQCMDTUPLES 1
  6418. EOF
  6419. else
  6420. echo "$ac_t""no" 1>&6
  6421. echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
  6422. echo "configure:7912: checking for PQcmdTuples in -lpq" >&5
  6423. ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
  6424. ac_save_LIBS="$LIBS"
  6425. LIBS="-lpq -lcrypt $LIBS"
  6426. cat > conftest.$ac_ext <<EOF
  6427. #line 7918 "configure"
  6428. #include "confdefs.h"
  6429. /* Override any gcc2 internal prototype to avoid an error. */
  6430. /* We use char because int might match the return type of a gcc2
  6431. builtin and then its argument prototype would still apply. */
  6432. char PQcmdTuples();
  6433. int main() {
  6434. PQcmdTuples()
  6435. ; return 0; }
  6436. EOF
  6437. if { (eval echo configure:7929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6438. rm -rf conftest*
  6439. eval "ac_cv_lib_$ac_lib_var=yes"
  6440. else
  6441. echo "configure: failed program was:" >&5
  6442. cat conftest.$ac_ext >&5
  6443. rm -rf conftest*
  6444. eval "ac_cv_lib_$ac_lib_var=no"
  6445. fi
  6446. rm -f conftest*
  6447. LIBS="$ac_save_LIBS"
  6448. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6449. echo "$ac_t""yes" 1>&6
  6450. cat >> confdefs.h <<\EOF
  6451. #define HAVE_PQCMDTUPLES 1
  6452. EOF
  6453. else
  6454. echo "$ac_t""no" 1>&6
  6455. fi
  6456. fi
  6457. LDFLAGS="${ac_save_ldflags}"
  6458. fi # $USE_POSTGRES
  6459. # Done checking PostgreSQL
  6460. # Enable MySQL option
  6461. echo $ac_n "checking whether to use MySQL""... $ac_c" 1>&6
  6462. echo "configure:7972: checking whether to use MySQL" >&5
  6463. echo "$ac_t"""$with_mysql"" 1>&6
  6464. case "$with_mysql" in
  6465. "no") USE_MYSQL= ;;
  6466. "yes") USE_MYSQL="1" ;;
  6467. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6468. esac
  6469. MYSQLINCPATH=
  6470. MYSQLLIBPATH=
  6471. MYSQLLIB=
  6472. if test -n "$USE_MYSQL"; then
  6473. # With MySQL includes directory
  6474. echo $ac_n "checking for location of MySQL includes""... $ac_c" 1>&6
  6475. echo "configure:7992: checking for location of MySQL includes" >&5
  6476. case "$with_mysql_includes" in
  6477. y | ye | yes | n | no)
  6478. { echo "configure: error: *** You must supply a directory to --with-mysql-includes." 1>&2; exit 1; }
  6479. ;;
  6480. esac
  6481. echo "$ac_t""$with_mysql_includes" 1>&6
  6482. if test -n "$with_mysql_includes" ; then
  6483. for dir in $with_mysql_includes; do
  6484. if test -d "$dir"; then
  6485. MYSQLINCPATH="$MYSQLINCPATH -I$dir"
  6486. else
  6487. { echo "configure: error: *** MySQL includes directory $dir does not exist." 1>&2; exit 1; }
  6488. fi
  6489. done
  6490. fi
  6491. ac_save_cppflags="$CPPFLAGS"
  6492. CPPFLAGS="$MYSQLINCPATH $CPPFLAGS"
  6493. for ac_hdr in mysql.h
  6494. do
  6495. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6496. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6497. echo "configure:8018: checking for $ac_hdr" >&5
  6498. cat > conftest.$ac_ext <<EOF
  6499. #line 8021 "configure"
  6500. #include "confdefs.h"
  6501. #include <$ac_hdr>
  6502. EOF
  6503. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6504. { (eval echo configure:8026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6505. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6506. if test -z "$ac_err"; then
  6507. rm -rf conftest*
  6508. eval "ac_cv_header_$ac_safe=yes"
  6509. else
  6510. echo "$ac_err" >&5
  6511. echo "configure: failed program was:" >&5
  6512. cat conftest.$ac_ext >&5
  6513. rm -rf conftest*
  6514. eval "ac_cv_header_$ac_safe=no"
  6515. fi
  6516. rm -f conftest*
  6517. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6518. echo "$ac_t""yes" 1>&6
  6519. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6520. cat >> confdefs.h <<EOF
  6521. #define $ac_tr_hdr 1
  6522. EOF
  6523. else
  6524. echo "$ac_t""no" 1>&6
  6525. { echo "configure: error: *** Unable to locate MySQL includes." 1>&2; exit 1; }
  6526. fi
  6527. done
  6528. CPPFLAGS=$ac_save_cppflags
  6529. fi # $USE_MYSQL
  6530. if test -n "$USE_MYSQL"; then
  6531. # With MySQL library directory
  6532. echo $ac_n "checking for location of MySQL library""... $ac_c" 1>&6
  6533. echo "configure:8063: checking for location of MySQL library" >&5
  6534. case "$with_mysql_libs" in
  6535. y | ye | yes | n | no)
  6536. { echo "configure: error: *** You must supply a directory to --with-mysql-libs." 1>&2; exit 1; }
  6537. ;;
  6538. esac
  6539. echo "$ac_t""$with_mysql_libs" 1>&6
  6540. if test -n "$with_mysql_libs"; then
  6541. for dir in $with_mysql_libs; do
  6542. if test -d "$dir"; then
  6543. MYSQLLIBPATH="$MYSQLLIBPATH -L$dir"
  6544. else
  6545. { echo "configure: error: *** MySQL library directory $dir does not exist." 1>&2; exit 1; }
  6546. fi
  6547. done
  6548. fi
  6549. ac_save_ldflags="$LDFLAGS"
  6550. LDFLAGS="$MYSQLLIBPATH $LDFLAGS"
  6551. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6552. echo "configure:8094: checking for mysql_query in -lmysqlclient" >&5
  6553. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6554. ac_save_LIBS="$LIBS"
  6555. LIBS="-lmysqlclient $LIBS"
  6556. cat > conftest.$ac_ext <<EOF
  6557. #line 8100 "configure"
  6558. #include "confdefs.h"
  6559. /* Override any gcc2 internal prototype to avoid an error. */
  6560. /* We use char because int might match the return type of a gcc2
  6561. builtin and then its argument prototype would still apply. */
  6562. char mysql_query();
  6563. int main() {
  6564. mysql_query()
  6565. ; return 0; }
  6566. EOF
  6567. if { (eval echo configure:8111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6568. rm -rf conftest*
  6569. eval "ac_cv_lib_$ac_lib_var=yes"
  6570. else
  6571. echo "configure: failed program was:" >&5
  6572. cat conftest.$ac_ext >&5
  6573. rm -rf conftest*
  6574. eval "ac_cv_lib_$ac_lib_var=no"
  6575. fi
  6576. rm -f conftest*
  6577. LIBS="$ac_save_LIBS"
  6578. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6579. echo "$ac_t""yes" 1>&6
  6580. MYSQLLIB="$MYSQLLIB -lmysqlclient "
  6581. else
  6582. echo "$ac_t""no" 1>&6
  6583. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6584. echo "configure:8130: checking for mysql_query in -lmysqlclient" >&5
  6585. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6586. ac_save_LIBS="$LIBS"
  6587. LIBS="-lmysqlclient $MATHLIB $LIBS"
  6588. cat > conftest.$ac_ext <<EOF
  6589. #line 8136 "configure"
  6590. #include "confdefs.h"
  6591. /* Override any gcc2 internal prototype to avoid an error. */
  6592. /* We use char because int might match the return type of a gcc2
  6593. builtin and then its argument prototype would still apply. */
  6594. char mysql_query();
  6595. int main() {
  6596. mysql_query()
  6597. ; return 0; }
  6598. EOF
  6599. if { (eval echo configure:8147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6600. rm -rf conftest*
  6601. eval "ac_cv_lib_$ac_lib_var=yes"
  6602. else
  6603. echo "configure: failed program was:" >&5
  6604. cat conftest.$ac_ext >&5
  6605. rm -rf conftest*
  6606. eval "ac_cv_lib_$ac_lib_var=no"
  6607. fi
  6608. rm -f conftest*
  6609. LIBS="$ac_save_LIBS"
  6610. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6611. echo "$ac_t""yes" 1>&6
  6612. MYSQLLIB="$MYSQLLIB -lmysqlclient $MATHLIB"
  6613. else
  6614. echo "$ac_t""no" 1>&6
  6615. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6616. echo "configure:8166: checking for mysql_query in -lmysqlclient" >&5
  6617. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6618. ac_save_LIBS="$LIBS"
  6619. LIBS="-lmysqlclient $SOCKLIB $LIBS"
  6620. cat > conftest.$ac_ext <<EOF
  6621. #line 8172 "configure"
  6622. #include "confdefs.h"
  6623. /* Override any gcc2 internal prototype to avoid an error. */
  6624. /* We use char because int might match the return type of a gcc2
  6625. builtin and then its argument prototype would still apply. */
  6626. char mysql_query();
  6627. int main() {
  6628. mysql_query()
  6629. ; return 0; }
  6630. EOF
  6631. if { (eval echo configure:8183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6632. rm -rf conftest*
  6633. eval "ac_cv_lib_$ac_lib_var=yes"
  6634. else
  6635. echo "configure: failed program was:" >&5
  6636. cat conftest.$ac_ext >&5
  6637. rm -rf conftest*
  6638. eval "ac_cv_lib_$ac_lib_var=no"
  6639. fi
  6640. rm -f conftest*
  6641. LIBS="$ac_save_LIBS"
  6642. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6643. echo "$ac_t""yes" 1>&6
  6644. MYSQLLIB="$MYSQLLIB -lmysqlclient $SOCKLIB"
  6645. else
  6646. echo "$ac_t""no" 1>&6
  6647. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6648. echo "configure:8202: checking for mysql_query in -lmysqlclient" >&5
  6649. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6650. ac_save_LIBS="$LIBS"
  6651. LIBS="-lmysqlclient $SOCKLIB $MATHLIB $LIBS"
  6652. cat > conftest.$ac_ext <<EOF
  6653. #line 8208 "configure"
  6654. #include "confdefs.h"
  6655. /* Override any gcc2 internal prototype to avoid an error. */
  6656. /* We use char because int might match the return type of a gcc2
  6657. builtin and then its argument prototype would still apply. */
  6658. char mysql_query();
  6659. int main() {
  6660. mysql_query()
  6661. ; return 0; }
  6662. EOF
  6663. if { (eval echo configure:8219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6664. rm -rf conftest*
  6665. eval "ac_cv_lib_$ac_lib_var=yes"
  6666. else
  6667. echo "configure: failed program was:" >&5
  6668. cat conftest.$ac_ext >&5
  6669. rm -rf conftest*
  6670. eval "ac_cv_lib_$ac_lib_var=no"
  6671. fi
  6672. rm -f conftest*
  6673. LIBS="$ac_save_LIBS"
  6674. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6675. echo "$ac_t""yes" 1>&6
  6676. MYSQLLIB="$MYSQLLIB -lmysqlclient $SOCKLIB $MATHLIB"
  6677. else
  6678. echo "$ac_t""no" 1>&6
  6679. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6680. echo "configure:8238: checking for mysql_query in -lmysqlclient" >&5
  6681. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6682. ac_save_LIBS="$LIBS"
  6683. LIBS="-lmysqlclient $ZLIB $LIBS"
  6684. cat > conftest.$ac_ext <<EOF
  6685. #line 8244 "configure"
  6686. #include "confdefs.h"
  6687. /* Override any gcc2 internal prototype to avoid an error. */
  6688. /* We use char because int might match the return type of a gcc2
  6689. builtin and then its argument prototype would still apply. */
  6690. char mysql_query();
  6691. int main() {
  6692. mysql_query()
  6693. ; return 0; }
  6694. EOF
  6695. if { (eval echo configure:8255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6696. rm -rf conftest*
  6697. eval "ac_cv_lib_$ac_lib_var=yes"
  6698. else
  6699. echo "configure: failed program was:" >&5
  6700. cat conftest.$ac_ext >&5
  6701. rm -rf conftest*
  6702. eval "ac_cv_lib_$ac_lib_var=no"
  6703. fi
  6704. rm -f conftest*
  6705. LIBS="$ac_save_LIBS"
  6706. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6707. echo "$ac_t""yes" 1>&6
  6708. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB"
  6709. else
  6710. echo "$ac_t""no" 1>&6
  6711. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6712. echo "configure:8274: checking for mysql_query in -lmysqlclient" >&5
  6713. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6714. ac_save_LIBS="$LIBS"
  6715. LIBS="-lmysqlclient $ZLIB $MATHLIB $LIBS"
  6716. cat > conftest.$ac_ext <<EOF
  6717. #line 8280 "configure"
  6718. #include "confdefs.h"
  6719. /* Override any gcc2 internal prototype to avoid an error. */
  6720. /* We use char because int might match the return type of a gcc2
  6721. builtin and then its argument prototype would still apply. */
  6722. char mysql_query();
  6723. int main() {
  6724. mysql_query()
  6725. ; return 0; }
  6726. EOF
  6727. if { (eval echo configure:8291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6728. rm -rf conftest*
  6729. eval "ac_cv_lib_$ac_lib_var=yes"
  6730. else
  6731. echo "configure: failed program was:" >&5
  6732. cat conftest.$ac_ext >&5
  6733. rm -rf conftest*
  6734. eval "ac_cv_lib_$ac_lib_var=no"
  6735. fi
  6736. rm -f conftest*
  6737. LIBS="$ac_save_LIBS"
  6738. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6739. echo "$ac_t""yes" 1>&6
  6740. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $MATHLIB"
  6741. else
  6742. echo "$ac_t""no" 1>&6
  6743. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6744. echo "configure:8310: checking for mysql_query in -lmysqlclient" >&5
  6745. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6746. ac_save_LIBS="$LIBS"
  6747. LIBS="-lmysqlclient $ZLIB $SOCKLIB $LIBS"
  6748. cat > conftest.$ac_ext <<EOF
  6749. #line 8316 "configure"
  6750. #include "confdefs.h"
  6751. /* Override any gcc2 internal prototype to avoid an error. */
  6752. /* We use char because int might match the return type of a gcc2
  6753. builtin and then its argument prototype would still apply. */
  6754. char mysql_query();
  6755. int main() {
  6756. mysql_query()
  6757. ; return 0; }
  6758. EOF
  6759. if { (eval echo configure:8327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6760. rm -rf conftest*
  6761. eval "ac_cv_lib_$ac_lib_var=yes"
  6762. else
  6763. echo "configure: failed program was:" >&5
  6764. cat conftest.$ac_ext >&5
  6765. rm -rf conftest*
  6766. eval "ac_cv_lib_$ac_lib_var=no"
  6767. fi
  6768. rm -f conftest*
  6769. LIBS="$ac_save_LIBS"
  6770. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6771. echo "$ac_t""yes" 1>&6
  6772. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $SOCKLIB"
  6773. else
  6774. echo "$ac_t""no" 1>&6
  6775. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6776. echo "configure:8346: checking for mysql_query in -lmysqlclient" >&5
  6777. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6778. ac_save_LIBS="$LIBS"
  6779. LIBS="-lmysqlclient $ZLIB $SOCKLIB $MATHLIB $LIBS"
  6780. cat > conftest.$ac_ext <<EOF
  6781. #line 8352 "configure"
  6782. #include "confdefs.h"
  6783. /* Override any gcc2 internal prototype to avoid an error. */
  6784. /* We use char because int might match the return type of a gcc2
  6785. builtin and then its argument prototype would still apply. */
  6786. char mysql_query();
  6787. int main() {
  6788. mysql_query()
  6789. ; return 0; }
  6790. EOF
  6791. if { (eval echo configure:8363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6792. rm -rf conftest*
  6793. eval "ac_cv_lib_$ac_lib_var=yes"
  6794. else
  6795. echo "configure: failed program was:" >&5
  6796. cat conftest.$ac_ext >&5
  6797. rm -rf conftest*
  6798. eval "ac_cv_lib_$ac_lib_var=no"
  6799. fi
  6800. rm -f conftest*
  6801. LIBS="$ac_save_LIBS"
  6802. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6803. echo "$ac_t""yes" 1>&6
  6804. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $SOCKLIB $MATHLIB"
  6805. else
  6806. echo "$ac_t""no" 1>&6
  6807. LDFLAGS=${ac_save_ldflags}
  6808. { echo "configure: error: *** Unable to locate MySQL library." 1>&2; exit 1; }
  6809. fi
  6810. fi
  6811. fi
  6812. fi
  6813. fi
  6814. fi
  6815. fi
  6816. fi
  6817. LDFLAGS=${ac_save_ldflags}
  6818. # Check for libmysqld (for embeded version of the driver)
  6819. # Extract the first word of "mysql_config", so it can be a program name with args.
  6820. set dummy mysql_config; ac_word=$2
  6821. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  6822. echo "configure:8453: checking for $ac_word" >&5
  6823. case "$MYSQLD_CONFIG" in
  6824. /*)
  6825. ac_cv_path_MYSQLD_CONFIG="$MYSQLD_CONFIG" # Let the user override the test with a path.
  6826. ;;
  6827. ?:/*)
  6828. ac_cv_path_MYSQLD_CONFIG="$MYSQLD_CONFIG" # Let the user override the test with a dos path.
  6829. ;;
  6830. *)
  6831. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  6832. ac_dummy="$PATH"
  6833. for ac_dir in $ac_dummy; do
  6834. test -z "$ac_dir" && ac_dir=.
  6835. if test -f $ac_dir/$ac_word; then
  6836. ac_cv_path_MYSQLD_CONFIG="$ac_dir/$ac_word"
  6837. break
  6838. fi
  6839. done
  6840. IFS="$ac_save_ifs"
  6841. test -z "$ac_cv_path_MYSQLD_CONFIG" && ac_cv_path_MYSQLD_CONFIG="no"
  6842. ;;
  6843. esac
  6844. MYSQLD_CONFIG="$ac_cv_path_MYSQLD_CONFIG"
  6845. if test -n "$MYSQLD_CONFIG"; then
  6846. echo "$ac_t""$MYSQLD_CONFIG" 1>&6
  6847. else
  6848. echo "$ac_t""no" 1>&6
  6849. fi
  6850. if test "$MYSQLD_CONFIG" = "no" ; then
  6851. { echo "configure: error: *** couldn't find mysql_config" 1>&2; exit 1; }
  6852. fi
  6853. if test "$MYSQLD_CONFIG" != "" ; then
  6854. ac_ext=C
  6855. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  6856. ac_cpp='$CXXCPP $CPPFLAGS'
  6857. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  6858. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  6859. cross_compiling=$ac_cv_prog_cxx_cross
  6860. ac_save_libs="$LIBS"
  6861. MYSQLDLIB=`"$MYSQLD_CONFIG" --libmysqld-libs`
  6862. LIBS="$MYSQLDLIB $LIBS"
  6863. echo $ac_n "checking for mysql_server_init""... $ac_c" 1>&6
  6864. echo "configure:8502: checking for mysql_server_init" >&5
  6865. cat > conftest.$ac_ext <<EOF
  6866. #line 8505 "configure"
  6867. #include "confdefs.h"
  6868. /* System header to define __stub macros and hopefully few prototypes,
  6869. which can conflict with char mysql_server_init(); below. */
  6870. #include <assert.h>
  6871. /* Override any gcc2 internal prototype to avoid an error. */
  6872. #ifdef __cplusplus
  6873. extern "C"
  6874. #endif
  6875. /* We use char because int might match the return type of a gcc2
  6876. builtin and then its argument prototype would still apply. */
  6877. char mysql_server_init();
  6878. int main() {
  6879. /* The GNU C library defines this for functions which it implements
  6880. to always fail with ENOSYS. Some functions are actually named
  6881. something starting with __ and the normal name is an alias. */
  6882. #if defined (__stub_mysql_server_init) || defined (__stub___mysql_server_init)
  6883. choke me
  6884. #else
  6885. mysql_server_init();
  6886. #endif
  6887. ; return 0; }
  6888. EOF
  6889. if { (eval echo configure:8531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6890. rm -rf conftest*
  6891. eval "ac_cv_func_mysql_server_init=yes"
  6892. else
  6893. echo "configure: failed program was:" >&5
  6894. cat conftest.$ac_ext >&5
  6895. rm -rf conftest*
  6896. eval "ac_cv_func_mysql_server_init=no"
  6897. fi
  6898. rm -f conftest*
  6899. if eval "test \"`echo '$ac_cv_func_'mysql_server_init`\" = yes"; then
  6900. echo "$ac_t""yes" 1>&6
  6901. :
  6902. else
  6903. echo "$ac_t""no" 1>&6
  6904. MYSQLDLIB="";
  6905. echo "configure: warning: libmysqld not found" 1>&2
  6906. fi
  6907. LIBS=$ac_save_libs
  6908. ac_ext=c
  6909. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  6910. ac_cpp='$CPP $CPPFLAGS'
  6911. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  6912. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  6913. cross_compiling=$ac_cv_prog_cc_cross
  6914. ac_ext=c
  6915. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  6916. ac_cpp='$CPP $CPPFLAGS'
  6917. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  6918. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  6919. cross_compiling=$ac_cv_prog_cc_cross
  6920. fi
  6921. fi # $USE_MYSQL
  6922. # Done checking MySQL
  6923. # Enable SQLite option
  6924. echo $ac_n "checking whether to use SQLite""... $ac_c" 1>&6
  6925. echo "configure:8583: checking whether to use SQLite" >&5
  6926. echo "$ac_t"""$with_sqlite"" 1>&6
  6927. case "$with_sqlite" in
  6928. "no") USE_SQLITE= ;;
  6929. "yes") USE_SQLITE="1" ;;
  6930. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6931. esac
  6932. SQLITEINCPATH=
  6933. SQLITELIBPATH=
  6934. SQLITELIB=
  6935. if test -n "$USE_SQLITE"; then
  6936. # With SQLite includes directory
  6937. echo $ac_n "checking for location of SQLite includes""... $ac_c" 1>&6
  6938. echo "configure:8603: checking for location of SQLite includes" >&5
  6939. case "$with_sqlite_includes" in
  6940. y | ye | yes | n | no)
  6941. { echo "configure: error: *** You must supply a directory to --with-sqlite-includes." 1>&2; exit 1; }
  6942. ;;
  6943. esac
  6944. echo "$ac_t""$with_sqlite_includes" 1>&6
  6945. if test -n "$with_sqlite_includes" ; then
  6946. for dir in $with_sqlite_includes; do
  6947. if test -d "$dir"; then
  6948. SQLITEINCPATH="$SQLITEINCPATH -I$dir"
  6949. else
  6950. { echo "configure: error: *** SQLite includes directory $dir does not exist." 1>&2; exit 1; }
  6951. fi
  6952. done
  6953. fi
  6954. ac_save_cppflags="$CPPFLAGS"
  6955. CPPFLAGS="$SQLITEINCPATH $CPPFLAGS"
  6956. for ac_hdr in sqlite3.h
  6957. do
  6958. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6959. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6960. echo "configure:8629: checking for $ac_hdr" >&5
  6961. cat > conftest.$ac_ext <<EOF
  6962. #line 8632 "configure"
  6963. #include "confdefs.h"
  6964. #include <$ac_hdr>
  6965. EOF
  6966. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6967. { (eval echo configure:8637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6968. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6969. if test -z "$ac_err"; then
  6970. rm -rf conftest*
  6971. eval "ac_cv_header_$ac_safe=yes"
  6972. else
  6973. echo "$ac_err" >&5
  6974. echo "configure: failed program was:" >&5
  6975. cat conftest.$ac_ext >&5
  6976. rm -rf conftest*
  6977. eval "ac_cv_header_$ac_safe=no"
  6978. fi
  6979. rm -f conftest*
  6980. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6981. echo "$ac_t""yes" 1>&6
  6982. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6983. cat >> confdefs.h <<EOF
  6984. #define $ac_tr_hdr 1
  6985. EOF
  6986. else
  6987. echo "$ac_t""no" 1>&6
  6988. { echo "configure: error: *** Unable to locate SQLite includes." 1>&2; exit 1; }
  6989. fi
  6990. done
  6991. CPPFLAGS=$ac_save_cppflags
  6992. cat >> confdefs.h <<\EOF
  6993. #define HAVE_SQLITE 1
  6994. EOF
  6995. fi # $USE_SQLITE
  6996. if test -n "$USE_SQLITE"; then
  6997. # With SQLite library directory
  6998. echo $ac_n "checking for location of SQLite library""... $ac_c" 1>&6
  6999. echo "configure:8680: checking for location of SQLite library" >&5
  7000. case "$with_sqlite_libs" in
  7001. y | ye | yes | n | no)
  7002. { echo "configure: error: *** You must supply a directory to --with-sqlite-libs." 1>&2; exit 1; }
  7003. ;;
  7004. esac
  7005. echo "$ac_t""$with_sqlite_libs" 1>&6
  7006. if test -n "$with_sqlite_libs"; then
  7007. for dir in $with_sqlite_libs; do
  7008. if test -d "$dir"; then
  7009. SQLITELIBPATH="$SQLITELIBPATH -L$dir"
  7010. else
  7011. { echo "configure: error: *** SQLite library directory $dir does not exist." 1>&2; exit 1; }
  7012. fi
  7013. done
  7014. fi
  7015. ac_save_ldflags="$LDFLAGS"
  7016. LDFLAGS="$SQLITELIBPATH $LDFLAGS"
  7017. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7018. echo "configure:8709: checking for sqlite3_open in -lsqlite3" >&5
  7019. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7020. ac_save_LIBS="$LIBS"
  7021. LIBS="-lsqlite3 $LIBS"
  7022. cat > conftest.$ac_ext <<EOF
  7023. #line 8715 "configure"
  7024. #include "confdefs.h"
  7025. /* Override any gcc2 internal prototype to avoid an error. */
  7026. /* We use char because int might match the return type of a gcc2
  7027. builtin and then its argument prototype would still apply. */
  7028. char sqlite3_open();
  7029. int main() {
  7030. sqlite3_open()
  7031. ; return 0; }
  7032. EOF
  7033. if { (eval echo configure:8726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7034. rm -rf conftest*
  7035. eval "ac_cv_lib_$ac_lib_var=yes"
  7036. else
  7037. echo "configure: failed program was:" >&5
  7038. cat conftest.$ac_ext >&5
  7039. rm -rf conftest*
  7040. eval "ac_cv_lib_$ac_lib_var=no"
  7041. fi
  7042. rm -f conftest*
  7043. LIBS="$ac_save_LIBS"
  7044. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7045. echo "$ac_t""yes" 1>&6
  7046. SQLITELIB="$SQLITELIB -lsqlite3 "
  7047. else
  7048. echo "$ac_t""no" 1>&6
  7049. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7050. echo "configure:8745: checking for sqlite3_open in -lsqlite3" >&5
  7051. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7052. ac_save_LIBS="$LIBS"
  7053. LIBS="-lsqlite3 $DLLIB $LIBS"
  7054. cat > conftest.$ac_ext <<EOF
  7055. #line 8751 "configure"
  7056. #include "confdefs.h"
  7057. /* Override any gcc2 internal prototype to avoid an error. */
  7058. /* We use char because int might match the return type of a gcc2
  7059. builtin and then its argument prototype would still apply. */
  7060. char sqlite3_open();
  7061. int main() {
  7062. sqlite3_open()
  7063. ; return 0; }
  7064. EOF
  7065. if { (eval echo configure:8762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7066. rm -rf conftest*
  7067. eval "ac_cv_lib_$ac_lib_var=yes"
  7068. else
  7069. echo "configure: failed program was:" >&5
  7070. cat conftest.$ac_ext >&5
  7071. rm -rf conftest*
  7072. eval "ac_cv_lib_$ac_lib_var=no"
  7073. fi
  7074. rm -f conftest*
  7075. LIBS="$ac_save_LIBS"
  7076. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7077. echo "$ac_t""yes" 1>&6
  7078. SQLITELIB="$SQLITELIB -lsqlite3 $DLLIB"
  7079. else
  7080. echo "$ac_t""no" 1>&6
  7081. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7082. echo "configure:8781: checking for sqlite3_open in -lsqlite3" >&5
  7083. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7084. ac_save_LIBS="$LIBS"
  7085. LIBS="-lsqlite3 $MATHLIB $LIBS"
  7086. cat > conftest.$ac_ext <<EOF
  7087. #line 8787 "configure"
  7088. #include "confdefs.h"
  7089. /* Override any gcc2 internal prototype to avoid an error. */
  7090. /* We use char because int might match the return type of a gcc2
  7091. builtin and then its argument prototype would still apply. */
  7092. char sqlite3_open();
  7093. int main() {
  7094. sqlite3_open()
  7095. ; return 0; }
  7096. EOF
  7097. if { (eval echo configure:8798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7098. rm -rf conftest*
  7099. eval "ac_cv_lib_$ac_lib_var=yes"
  7100. else
  7101. echo "configure: failed program was:" >&5
  7102. cat conftest.$ac_ext >&5
  7103. rm -rf conftest*
  7104. eval "ac_cv_lib_$ac_lib_var=no"
  7105. fi
  7106. rm -f conftest*
  7107. LIBS="$ac_save_LIBS"
  7108. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7109. echo "$ac_t""yes" 1>&6
  7110. SQLITELIB="$SQLITELIB -lsqlite3 $MATHLIB"
  7111. else
  7112. echo "$ac_t""no" 1>&6
  7113. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7114. echo "configure:8817: checking for sqlite3_open in -lsqlite3" >&5
  7115. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7116. ac_save_LIBS="$LIBS"
  7117. LIBS="-lsqlite3 $MATHLIB $DLLIB $LIBS"
  7118. cat > conftest.$ac_ext <<EOF
  7119. #line 8823 "configure"
  7120. #include "confdefs.h"
  7121. /* Override any gcc2 internal prototype to avoid an error. */
  7122. /* We use char because int might match the return type of a gcc2
  7123. builtin and then its argument prototype would still apply. */
  7124. char sqlite3_open();
  7125. int main() {
  7126. sqlite3_open()
  7127. ; return 0; }
  7128. EOF
  7129. if { (eval echo configure:8834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7130. rm -rf conftest*
  7131. eval "ac_cv_lib_$ac_lib_var=yes"
  7132. else
  7133. echo "configure: failed program was:" >&5
  7134. cat conftest.$ac_ext >&5
  7135. rm -rf conftest*
  7136. eval "ac_cv_lib_$ac_lib_var=no"
  7137. fi
  7138. rm -f conftest*
  7139. LIBS="$ac_save_LIBS"
  7140. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7141. echo "$ac_t""yes" 1>&6
  7142. SQLITELIB="$SQLITELIB -lsqlite3 $MATHLIB $DLLIB"
  7143. else
  7144. echo "$ac_t""no" 1>&6
  7145. LDFLAGS=${ac_save_ldflags}
  7146. { echo "configure: error: *** Unable to locate SQLite library." 1>&2; exit 1; }
  7147. fi
  7148. fi
  7149. fi
  7150. fi
  7151. LDFLAGS=${ac_save_ldflags}
  7152. fi # $USE_SQLITE
  7153. # Done checking SQLite
  7154. # Enable FFMPEG option
  7155. echo $ac_n "checking whether to use FFMPEG""... $ac_c" 1>&6
  7156. echo "configure:8903: checking whether to use FFMPEG" >&5
  7157. echo "$ac_t"""$with_ffmpeg"" 1>&6
  7158. case "$with_ffmpeg" in
  7159. "no") USE_FFMPEG= ;;
  7160. "yes") USE_FFMPEG="1" ;;
  7161. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  7162. esac
  7163. FFMPEGINCPATH=
  7164. FFMPEGLIBPATH=
  7165. FFMPEGLIB=
  7166. if test -n "$USE_FFMPEG"; then
  7167. # With FFMPEG includes directory
  7168. echo $ac_n "checking for location of FFMPEG includes""... $ac_c" 1>&6
  7169. echo "configure:8923: checking for location of FFMPEG includes" >&5
  7170. case "$with_ffmpeg_includes" in
  7171. y | ye | yes | n | no)
  7172. { echo "configure: error: *** You must supply a directory to --with-ffmpeg-includes." 1>&2; exit 1; }
  7173. ;;
  7174. esac
  7175. echo "$ac_t""$with_ffmpeg_includes" 1>&6
  7176. if test -n "$with_ffmpeg_includes" ; then
  7177. for dir in $with_ffmpeg_includes; do
  7178. if test -d "$dir"; then
  7179. FFMPEGINCPATH="$FFMPEGINCPATH -I$dir"
  7180. else
  7181. { echo "configure: error: *** FFMPEG includes directory $dir does not exist." 1>&2; exit 1; }
  7182. fi
  7183. done
  7184. fi
  7185. ac_save_cppflags="$CPPFLAGS"
  7186. CPPFLAGS="$FFMPEGINCPATH $CPPFLAGS"
  7187. for ac_hdr in avcodec.h
  7188. do
  7189. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7190. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7191. echo "configure:8949: checking for $ac_hdr" >&5
  7192. cat > conftest.$ac_ext <<EOF
  7193. #line 8952 "configure"
  7194. #include "confdefs.h"
  7195. #include <$ac_hdr>
  7196. EOF
  7197. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7198. { (eval echo configure:8957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7199. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7200. if test -z "$ac_err"; then
  7201. rm -rf conftest*
  7202. eval "ac_cv_header_$ac_safe=yes"
  7203. else
  7204. echo "$ac_err" >&5
  7205. echo "configure: failed program was:" >&5
  7206. cat conftest.$ac_ext >&5
  7207. rm -rf conftest*
  7208. eval "ac_cv_header_$ac_safe=no"
  7209. fi
  7210. rm -f conftest*
  7211. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7212. echo "$ac_t""yes" 1>&6
  7213. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7214. cat >> confdefs.h <<EOF
  7215. #define $ac_tr_hdr 1
  7216. EOF
  7217. else
  7218. echo "$ac_t""no" 1>&6
  7219. { echo "configure: error: *** Unable to locate FFMPEG includes." 1>&2; exit 1; }
  7220. fi
  7221. done
  7222. CPPFLAGS=$ac_save_cppflags
  7223. ac_save_cppflags="$CPPFLAGS"
  7224. CPPFLAGS="$FFMPEGINCPATH $CPPFLAGS"
  7225. for ac_hdr in avformat.h
  7226. do
  7227. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7228. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7229. echo "configure:8993: checking for $ac_hdr" >&5
  7230. cat > conftest.$ac_ext <<EOF
  7231. #line 8996 "configure"
  7232. #include "confdefs.h"
  7233. #include <$ac_hdr>
  7234. EOF
  7235. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7236. { (eval echo configure:9001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7237. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7238. if test -z "$ac_err"; then
  7239. rm -rf conftest*
  7240. eval "ac_cv_header_$ac_safe=yes"
  7241. else
  7242. echo "$ac_err" >&5
  7243. echo "configure: failed program was:" >&5
  7244. cat conftest.$ac_ext >&5
  7245. rm -rf conftest*
  7246. eval "ac_cv_header_$ac_safe=no"
  7247. fi
  7248. rm -f conftest*
  7249. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7250. echo "$ac_t""yes" 1>&6
  7251. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7252. cat >> confdefs.h <<EOF
  7253. #define $ac_tr_hdr 1
  7254. EOF
  7255. else
  7256. echo "$ac_t""no" 1>&6
  7257. { echo "configure: error: *** Unable to locate FFMPEG includes." 1>&2; exit 1; }
  7258. fi
  7259. done
  7260. CPPFLAGS=$ac_save_cppflags
  7261. ac_save_cppflags="$CPPFLAGS"
  7262. CPPFLAGS="$FFMPEGINCPATH $CPPFLAGS"
  7263. for ac_hdr in swscale.h
  7264. do
  7265. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7266. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7267. echo "configure:9037: checking for $ac_hdr" >&5
  7268. cat > conftest.$ac_ext <<EOF
  7269. #line 9040 "configure"
  7270. #include "confdefs.h"
  7271. #include <$ac_hdr>
  7272. EOF
  7273. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7274. { (eval echo configure:9045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7275. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7276. if test -z "$ac_err"; then
  7277. rm -rf conftest*
  7278. eval "ac_cv_header_$ac_safe=yes"
  7279. else
  7280. echo "$ac_err" >&5
  7281. echo "configure: failed program was:" >&5
  7282. cat conftest.$ac_ext >&5
  7283. rm -rf conftest*
  7284. eval "ac_cv_header_$ac_safe=no"
  7285. fi
  7286. rm -f conftest*
  7287. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7288. echo "$ac_t""yes" 1>&6
  7289. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7290. cat >> confdefs.h <<EOF
  7291. #define $ac_tr_hdr 1
  7292. EOF
  7293. else
  7294. echo "$ac_t""no" 1>&6
  7295. { echo "configure: error: *** Unable to locate FFMPEG includes." 1>&2; exit 1; }
  7296. fi
  7297. done
  7298. CPPFLAGS=$ac_save_cppflags
  7299. cat >> confdefs.h <<\EOF
  7300. #define HAVE_FFMPEG 1
  7301. EOF
  7302. fi # $USE_FFMPEG
  7303. if test -n "$USE_FFMPEG"; then
  7304. # With FFMPEG library directory
  7305. echo $ac_n "checking for location of FFMPEG library""... $ac_c" 1>&6
  7306. echo "configure:9088: checking for location of FFMPEG library" >&5
  7307. case "$with_ffmpeg_libs" in
  7308. y | ye | yes | n | no)
  7309. { echo "configure: error: *** You must supply a directory to --with-ffmpeg-libs." 1>&2; exit 1; }
  7310. ;;
  7311. esac
  7312. echo "$ac_t""$with_ffmpeg_libs" 1>&6
  7313. if test -n "$with_ffmpeg_libs"; then
  7314. for dir in $with_ffmpeg_libs; do
  7315. if test -d "$dir"; then
  7316. FFMPEGLIBPATH="$FFMPEGLIBPATH -L$dir"
  7317. else
  7318. { echo "configure: error: *** FFMPEG library directory $dir does not exist." 1>&2; exit 1; }
  7319. fi
  7320. done
  7321. fi
  7322. ac_save_ldflags="$LDFLAGS"
  7323. LDFLAGS="$FFMPEGLIBPATH $LDFLAGS"
  7324. echo $ac_n "checking for av_free in -lavutil""... $ac_c" 1>&6
  7325. echo "configure:9115: checking for av_free in -lavutil" >&5
  7326. ac_lib_var=`echo avutil'_'av_free | sed 'y%./+-%__p_%'`
  7327. ac_save_LIBS="$LIBS"
  7328. LIBS="-lavutil $LIBS"
  7329. cat > conftest.$ac_ext <<EOF
  7330. #line 9121 "configure"
  7331. #include "confdefs.h"
  7332. /* Override any gcc2 internal prototype to avoid an error. */
  7333. /* We use char because int might match the return type of a gcc2
  7334. builtin and then its argument prototype would still apply. */
  7335. char av_free();
  7336. int main() {
  7337. av_free()
  7338. ; return 0; }
  7339. EOF
  7340. if { (eval echo configure:9132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7341. rm -rf conftest*
  7342. eval "ac_cv_lib_$ac_lib_var=yes"
  7343. else
  7344. echo "configure: failed program was:" >&5
  7345. cat conftest.$ac_ext >&5
  7346. rm -rf conftest*
  7347. eval "ac_cv_lib_$ac_lib_var=no"
  7348. fi
  7349. rm -f conftest*
  7350. LIBS="$ac_save_LIBS"
  7351. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7352. echo "$ac_t""yes" 1>&6
  7353. FFMPEGLIB="$FFMPEGLIB -lavutil "
  7354. else
  7355. echo "$ac_t""no" 1>&6
  7356. echo $ac_n "checking for av_free in -lavutil""... $ac_c" 1>&6
  7357. echo "configure:9151: checking for av_free in -lavutil" >&5
  7358. ac_lib_var=`echo avutil'_'av_free | sed 'y%./+-%__p_%'`
  7359. ac_save_LIBS="$LIBS"
  7360. LIBS="-lavutil $MATHLIB $LIBS"
  7361. cat > conftest.$ac_ext <<EOF
  7362. #line 9157 "configure"
  7363. #include "confdefs.h"
  7364. /* Override any gcc2 internal prototype to avoid an error. */
  7365. /* We use char because int might match the return type of a gcc2
  7366. builtin and then its argument prototype would still apply. */
  7367. char av_free();
  7368. int main() {
  7369. av_free()
  7370. ; return 0; }
  7371. EOF
  7372. if { (eval echo configure:9168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7373. rm -rf conftest*
  7374. eval "ac_cv_lib_$ac_lib_var=yes"
  7375. else
  7376. echo "configure: failed program was:" >&5
  7377. cat conftest.$ac_ext >&5
  7378. rm -rf conftest*
  7379. eval "ac_cv_lib_$ac_lib_var=no"
  7380. fi
  7381. rm -f conftest*
  7382. LIBS="$ac_save_LIBS"
  7383. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7384. echo "$ac_t""yes" 1>&6
  7385. FFMPEGLIB="$FFMPEGLIB -lavutil $MATHLIB"
  7386. else
  7387. echo "$ac_t""no" 1>&6
  7388. LDFLAGS=${ac_save_ldflags}
  7389. { echo "configure: error: *** Unable to locate FFMPEG library." 1>&2; exit 1; }
  7390. fi
  7391. fi
  7392. LDFLAGS=${ac_save_ldflags}
  7393. ac_save_ldflags="$LDFLAGS"
  7394. LDFLAGS="$FFMPEGLIBPATH $LDFLAGS"
  7395. echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6
  7396. echo "configure:9213: checking for avcodec_init in -lavcodec" >&5
  7397. ac_lib_var=`echo avcodec'_'avcodec_init | sed 'y%./+-%__p_%'`
  7398. ac_save_LIBS="$LIBS"
  7399. LIBS="-lavcodec $FFMPEGLIB $LIBS"
  7400. cat > conftest.$ac_ext <<EOF
  7401. #line 9219 "configure"
  7402. #include "confdefs.h"
  7403. /* Override any gcc2 internal prototype to avoid an error. */
  7404. /* We use char because int might match the return type of a gcc2
  7405. builtin and then its argument prototype would still apply. */
  7406. char avcodec_init();
  7407. int main() {
  7408. avcodec_init()
  7409. ; return 0; }
  7410. EOF
  7411. if { (eval echo configure:9230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7412. rm -rf conftest*
  7413. eval "ac_cv_lib_$ac_lib_var=yes"
  7414. else
  7415. echo "configure: failed program was:" >&5
  7416. cat conftest.$ac_ext >&5
  7417. rm -rf conftest*
  7418. eval "ac_cv_lib_$ac_lib_var=no"
  7419. fi
  7420. rm -f conftest*
  7421. LIBS="$ac_save_LIBS"
  7422. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7423. echo "$ac_t""yes" 1>&6
  7424. FFMPEGLIB="$FFMPEGLIB -lavcodec "
  7425. else
  7426. echo "$ac_t""no" 1>&6
  7427. echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6
  7428. echo "configure:9249: checking for avcodec_init in -lavcodec" >&5
  7429. ac_lib_var=`echo avcodec'_'avcodec_init | sed 'y%./+-%__p_%'`
  7430. ac_save_LIBS="$LIBS"
  7431. LIBS="-lavcodec $FFMPEGLIB $MATHLIB $LIBS"
  7432. cat > conftest.$ac_ext <<EOF
  7433. #line 9255 "configure"
  7434. #include "confdefs.h"
  7435. /* Override any gcc2 internal prototype to avoid an error. */
  7436. /* We use char because int might match the return type of a gcc2
  7437. builtin and then its argument prototype would still apply. */
  7438. char avcodec_init();
  7439. int main() {
  7440. avcodec_init()
  7441. ; return 0; }
  7442. EOF
  7443. if { (eval echo configure:9266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7444. rm -rf conftest*
  7445. eval "ac_cv_lib_$ac_lib_var=yes"
  7446. else
  7447. echo "configure: failed program was:" >&5
  7448. cat conftest.$ac_ext >&5
  7449. rm -rf conftest*
  7450. eval "ac_cv_lib_$ac_lib_var=no"
  7451. fi
  7452. rm -f conftest*
  7453. LIBS="$ac_save_LIBS"
  7454. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7455. echo "$ac_t""yes" 1>&6
  7456. FFMPEGLIB="$FFMPEGLIB -lavcodec $MATHLIB"
  7457. else
  7458. echo "$ac_t""no" 1>&6
  7459. LDFLAGS=${ac_save_ldflags}
  7460. { echo "configure: error: *** Unable to locate FFMPEG library." 1>&2; exit 1; }
  7461. fi
  7462. fi
  7463. LDFLAGS=${ac_save_ldflags}
  7464. ac_save_ldflags="$LDFLAGS"
  7465. LDFLAGS="$FFMPEGLIBPATH $LDFLAGS"
  7466. echo $ac_n "checking for av_set_parameters in -lavformat""... $ac_c" 1>&6
  7467. echo "configure:9311: checking for av_set_parameters in -lavformat" >&5
  7468. ac_lib_var=`echo avformat'_'av_set_parameters | sed 'y%./+-%__p_%'`
  7469. ac_save_LIBS="$LIBS"
  7470. LIBS="-lavformat $FFMPEGLIB $LIBS"
  7471. cat > conftest.$ac_ext <<EOF
  7472. #line 9317 "configure"
  7473. #include "confdefs.h"
  7474. /* Override any gcc2 internal prototype to avoid an error. */
  7475. /* We use char because int might match the return type of a gcc2
  7476. builtin and then its argument prototype would still apply. */
  7477. char av_set_parameters();
  7478. int main() {
  7479. av_set_parameters()
  7480. ; return 0; }
  7481. EOF
  7482. if { (eval echo configure:9328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7483. rm -rf conftest*
  7484. eval "ac_cv_lib_$ac_lib_var=yes"
  7485. else
  7486. echo "configure: failed program was:" >&5
  7487. cat conftest.$ac_ext >&5
  7488. rm -rf conftest*
  7489. eval "ac_cv_lib_$ac_lib_var=no"
  7490. fi
  7491. rm -f conftest*
  7492. LIBS="$ac_save_LIBS"
  7493. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7494. echo "$ac_t""yes" 1>&6
  7495. FFMPEGLIB="$FFMPEGLIB -lavformat "
  7496. else
  7497. echo "$ac_t""no" 1>&6
  7498. echo $ac_n "checking for av_set_parameters in -lavformat""... $ac_c" 1>&6
  7499. echo "configure:9347: checking for av_set_parameters in -lavformat" >&5
  7500. ac_lib_var=`echo avformat'_'av_set_parameters | sed 'y%./+-%__p_%'`
  7501. ac_save_LIBS="$LIBS"
  7502. LIBS="-lavformat $FFMPEGLIB $MATHLIB $LIBS"
  7503. cat > conftest.$ac_ext <<EOF
  7504. #line 9353 "configure"
  7505. #include "confdefs.h"
  7506. /* Override any gcc2 internal prototype to avoid an error. */
  7507. /* We use char because int might match the return type of a gcc2
  7508. builtin and then its argument prototype would still apply. */
  7509. char av_set_parameters();
  7510. int main() {
  7511. av_set_parameters()
  7512. ; return 0; }
  7513. EOF
  7514. if { (eval echo configure:9364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7515. rm -rf conftest*
  7516. eval "ac_cv_lib_$ac_lib_var=yes"
  7517. else
  7518. echo "configure: failed program was:" >&5
  7519. cat conftest.$ac_ext >&5
  7520. rm -rf conftest*
  7521. eval "ac_cv_lib_$ac_lib_var=no"
  7522. fi
  7523. rm -f conftest*
  7524. LIBS="$ac_save_LIBS"
  7525. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7526. echo "$ac_t""yes" 1>&6
  7527. FFMPEGLIB="$FFMPEGLIB -lavformat $MATHLIB"
  7528. else
  7529. echo "$ac_t""no" 1>&6
  7530. LDFLAGS=${ac_save_ldflags}
  7531. { echo "configure: error: *** Unable to locate FFMPEG library." 1>&2; exit 1; }
  7532. fi
  7533. fi
  7534. LDFLAGS=${ac_save_ldflags}
  7535. fi # $USE_FFMPEG
  7536. # Done checking FFMPEG
  7537. # Enable OpenGL option
  7538. OPENGLINC=
  7539. OPENGLLIB=
  7540. OPENGLULIB=
  7541. USE_OPENGL=
  7542. OPENGL_X11=
  7543. OPENGL_AQUA=
  7544. OPENGL_WINDOWS=
  7545. echo $ac_n "checking whether to use OpenGL""... $ac_c" 1>&6
  7546. echo "configure:9423: checking whether to use OpenGL" >&5
  7547. echo "$ac_t"""$with_opengl"" 1>&6
  7548. case "$with_opengl" in
  7549. n|no)
  7550. OPENGL_TYPE=none
  7551. ;;
  7552. y|yes|x|x11|glx)
  7553. OPENGL_TYPE=X11
  7554. USE_OPENGL=1
  7555. OPENGL_X11=1
  7556. ;;
  7557. aqua|mac|osx|macosx|agl)
  7558. OPENGL_TYPE=Aqua
  7559. USE_OPENGL=1
  7560. OPENGL_AQUA=1
  7561. ;;
  7562. win|windows|mswin|wgl)
  7563. OPENGL_TYPE=Windows
  7564. USE_OPENGL=1
  7565. OPENGL_WINDOWS=1
  7566. ;;
  7567. *)
  7568. { echo "configure: error: *** Valid arguments for --with-opengl= are yes,no,x11,aqua,windows." 1>&2; exit 1; }
  7569. ;;
  7570. esac
  7571. if test -n "$USE_OPENGL" ; then
  7572. if test "$OPENGL_X11" = 1 ; then
  7573. # With OpenGL includes directory
  7574. echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
  7575. echo "configure:9457: checking for location of OpenGL includes" >&5
  7576. case "$with_opengl_includes" in
  7577. y | ye | yes | n | no)
  7578. { echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
  7579. ;;
  7580. esac
  7581. echo "$ac_t""$with_opengl_includes" 1>&6
  7582. if test -n "$with_opengl_includes" ; then
  7583. for dir in $with_opengl_includes; do
  7584. if test -d "$dir"; then
  7585. OPENGLINC="$OPENGLINC -I$dir"
  7586. else
  7587. { echo "configure: error: *** OpenGL includes directory $dir does not exist." 1>&2; exit 1; }
  7588. fi
  7589. done
  7590. fi
  7591. ac_save_cppflags="$CPPFLAGS"
  7592. CPPFLAGS="$OPENGLINC $X_CFLAGS $CPPFLAGS"
  7593. for ac_hdr in GL/gl.h GL/glu.h
  7594. do
  7595. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7596. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7597. echo "configure:9483: checking for $ac_hdr" >&5
  7598. cat > conftest.$ac_ext <<EOF
  7599. #line 9486 "configure"
  7600. #include "confdefs.h"
  7601. #include <$ac_hdr>
  7602. EOF
  7603. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7604. { (eval echo configure:9491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7605. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7606. if test -z "$ac_err"; then
  7607. rm -rf conftest*
  7608. eval "ac_cv_header_$ac_safe=yes"
  7609. else
  7610. echo "$ac_err" >&5
  7611. echo "configure: failed program was:" >&5
  7612. cat conftest.$ac_ext >&5
  7613. rm -rf conftest*
  7614. eval "ac_cv_header_$ac_safe=no"
  7615. fi
  7616. rm -f conftest*
  7617. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7618. echo "$ac_t""yes" 1>&6
  7619. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7620. cat >> confdefs.h <<EOF
  7621. #define $ac_tr_hdr 1
  7622. EOF
  7623. else
  7624. echo "$ac_t""no" 1>&6
  7625. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  7626. fi
  7627. done
  7628. CPPFLAGS=$ac_save_cppflags
  7629. # With OpenGL library directory
  7630. echo $ac_n "checking for location of OpenGL library""... $ac_c" 1>&6
  7631. echo "configure:9525: checking for location of OpenGL library" >&5
  7632. case "$with_opengl_libs" in
  7633. y | ye | yes | n | no)
  7634. { echo "configure: error: *** You must supply a directory to --with-opengl-libs." 1>&2; exit 1; }
  7635. ;;
  7636. esac
  7637. echo "$ac_t""$with_opengl_libs" 1>&6
  7638. if test -n "$with_opengl_libs"; then
  7639. for dir in $with_opengl_libs; do
  7640. if test -d "$dir"; then
  7641. OPENGL_LIB_PATH="$OPENGL_LIB_PATH -L$dir"
  7642. else
  7643. { echo "configure: error: *** OpenGL library directory $dir does not exist." 1>&2; exit 1; }
  7644. fi
  7645. done
  7646. fi
  7647. ac_save_ldflags="$LDFLAGS"
  7648. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  7649. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7650. echo "configure:9554: checking for glBegin in -lGL" >&5
  7651. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7652. ac_save_LIBS="$LIBS"
  7653. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
  7654. cat > conftest.$ac_ext <<EOF
  7655. #line 9560 "configure"
  7656. #include "confdefs.h"
  7657. /* Override any gcc2 internal prototype to avoid an error. */
  7658. /* We use char because int might match the return type of a gcc2
  7659. builtin and then its argument prototype would still apply. */
  7660. char glBegin();
  7661. int main() {
  7662. glBegin()
  7663. ; return 0; }
  7664. EOF
  7665. if { (eval echo configure:9571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7666. rm -rf conftest*
  7667. eval "ac_cv_lib_$ac_lib_var=yes"
  7668. else
  7669. echo "configure: failed program was:" >&5
  7670. cat conftest.$ac_ext >&5
  7671. rm -rf conftest*
  7672. eval "ac_cv_lib_$ac_lib_var=no"
  7673. fi
  7674. rm -f conftest*
  7675. LIBS="$ac_save_LIBS"
  7676. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7677. echo "$ac_t""yes" 1>&6
  7678. OPENGLLIB="$OPENGLLIB -lGL "
  7679. else
  7680. echo "$ac_t""no" 1>&6
  7681. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7682. echo "configure:9590: checking for glBegin in -lGL" >&5
  7683. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7684. ac_save_LIBS="$LIBS"
  7685. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lXext $LIBS"
  7686. cat > conftest.$ac_ext <<EOF
  7687. #line 9596 "configure"
  7688. #include "confdefs.h"
  7689. /* Override any gcc2 internal prototype to avoid an error. */
  7690. /* We use char because int might match the return type of a gcc2
  7691. builtin and then its argument prototype would still apply. */
  7692. char glBegin();
  7693. int main() {
  7694. glBegin()
  7695. ; return 0; }
  7696. EOF
  7697. if { (eval echo configure:9607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7698. rm -rf conftest*
  7699. eval "ac_cv_lib_$ac_lib_var=yes"
  7700. else
  7701. echo "configure: failed program was:" >&5
  7702. cat conftest.$ac_ext >&5
  7703. rm -rf conftest*
  7704. eval "ac_cv_lib_$ac_lib_var=no"
  7705. fi
  7706. rm -f conftest*
  7707. LIBS="$ac_save_LIBS"
  7708. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7709. echo "$ac_t""yes" 1>&6
  7710. OPENGLLIB="$OPENGLLIB -lGL -lXext"
  7711. else
  7712. echo "$ac_t""no" 1>&6
  7713. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7714. echo "configure:9626: checking for glBegin in -lGL" >&5
  7715. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7716. ac_save_LIBS="$LIBS"
  7717. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lpthread $LIBS"
  7718. cat > conftest.$ac_ext <<EOF
  7719. #line 9632 "configure"
  7720. #include "confdefs.h"
  7721. /* Override any gcc2 internal prototype to avoid an error. */
  7722. /* We use char because int might match the return type of a gcc2
  7723. builtin and then its argument prototype would still apply. */
  7724. char glBegin();
  7725. int main() {
  7726. glBegin()
  7727. ; return 0; }
  7728. EOF
  7729. if { (eval echo configure:9643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7730. rm -rf conftest*
  7731. eval "ac_cv_lib_$ac_lib_var=yes"
  7732. else
  7733. echo "configure: failed program was:" >&5
  7734. cat conftest.$ac_ext >&5
  7735. rm -rf conftest*
  7736. eval "ac_cv_lib_$ac_lib_var=no"
  7737. fi
  7738. rm -f conftest*
  7739. LIBS="$ac_save_LIBS"
  7740. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7741. echo "$ac_t""yes" 1>&6
  7742. OPENGLLIB="$OPENGLLIB -lGL -lpthread"
  7743. else
  7744. echo "$ac_t""no" 1>&6
  7745. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7746. echo "configure:9662: checking for glBegin in -lGL" >&5
  7747. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7748. ac_save_LIBS="$LIBS"
  7749. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lpthread -lXext $LIBS"
  7750. cat > conftest.$ac_ext <<EOF
  7751. #line 9668 "configure"
  7752. #include "confdefs.h"
  7753. /* Override any gcc2 internal prototype to avoid an error. */
  7754. /* We use char because int might match the return type of a gcc2
  7755. builtin and then its argument prototype would still apply. */
  7756. char glBegin();
  7757. int main() {
  7758. glBegin()
  7759. ; return 0; }
  7760. EOF
  7761. if { (eval echo configure:9679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7762. rm -rf conftest*
  7763. eval "ac_cv_lib_$ac_lib_var=yes"
  7764. else
  7765. echo "configure: failed program was:" >&5
  7766. cat conftest.$ac_ext >&5
  7767. rm -rf conftest*
  7768. eval "ac_cv_lib_$ac_lib_var=no"
  7769. fi
  7770. rm -f conftest*
  7771. LIBS="$ac_save_LIBS"
  7772. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7773. echo "$ac_t""yes" 1>&6
  7774. OPENGLLIB="$OPENGLLIB -lGL -lpthread -lXext"
  7775. else
  7776. echo "$ac_t""no" 1>&6
  7777. LDFLAGS=${ac_save_ldflags}
  7778. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  7779. fi
  7780. fi
  7781. fi
  7782. fi
  7783. LDFLAGS=${ac_save_ldflags}
  7784. ac_save_ldflags="$LDFLAGS"
  7785. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  7786. echo $ac_n "checking for gluBeginCurve in -lGLU""... $ac_c" 1>&6
  7787. echo "configure:9741: checking for gluBeginCurve in -lGLU" >&5
  7788. ac_lib_var=`echo GLU'_'gluBeginCurve | sed 'y%./+-%__p_%'`
  7789. ac_save_LIBS="$LIBS"
  7790. LIBS="-lGLU $OPENGLLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
  7791. cat > conftest.$ac_ext <<EOF
  7792. #line 9747 "configure"
  7793. #include "confdefs.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 gluBeginCurve();
  7798. int main() {
  7799. gluBeginCurve()
  7800. ; return 0; }
  7801. EOF
  7802. if { (eval echo configure:9758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7803. rm -rf conftest*
  7804. eval "ac_cv_lib_$ac_lib_var=yes"
  7805. else
  7806. echo "configure: failed program was:" >&5
  7807. cat conftest.$ac_ext >&5
  7808. rm -rf conftest*
  7809. eval "ac_cv_lib_$ac_lib_var=no"
  7810. fi
  7811. rm -f conftest*
  7812. LIBS="$ac_save_LIBS"
  7813. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7814. echo "$ac_t""yes" 1>&6
  7815. OPENGLULIB="$OPENGLULIB -lGLU "
  7816. else
  7817. echo "$ac_t""no" 1>&6
  7818. echo $ac_n "checking for gluBeginCurve in -lGLU""... $ac_c" 1>&6
  7819. echo "configure:9777: checking for gluBeginCurve in -lGLU" >&5
  7820. ac_lib_var=`echo GLU'_'gluBeginCurve | sed 'y%./+-%__p_%'`
  7821. ac_save_LIBS="$LIBS"
  7822. LIBS="-lGLU $OPENGLLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lstdc++ $LIBS"
  7823. cat > conftest.$ac_ext <<EOF
  7824. #line 9783 "configure"
  7825. #include "confdefs.h"
  7826. /* Override any gcc2 internal prototype to avoid an error. */
  7827. /* We use char because int might match the return type of a gcc2
  7828. builtin and then its argument prototype would still apply. */
  7829. char gluBeginCurve();
  7830. int main() {
  7831. gluBeginCurve()
  7832. ; return 0; }
  7833. EOF
  7834. if { (eval echo configure:9794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7835. rm -rf conftest*
  7836. eval "ac_cv_lib_$ac_lib_var=yes"
  7837. else
  7838. echo "configure: failed program was:" >&5
  7839. cat conftest.$ac_ext >&5
  7840. rm -rf conftest*
  7841. eval "ac_cv_lib_$ac_lib_var=no"
  7842. fi
  7843. rm -f conftest*
  7844. LIBS="$ac_save_LIBS"
  7845. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7846. echo "$ac_t""yes" 1>&6
  7847. OPENGLULIB="$OPENGLULIB -lGLU -lstdc++"
  7848. else
  7849. echo "$ac_t""no" 1>&6
  7850. LDFLAGS=${ac_save_ldflags}
  7851. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  7852. fi
  7853. fi
  7854. LDFLAGS=${ac_save_ldflags}
  7855. OPENGLLIB="$OPENGL_LIB_PATH $OPENGLLIB"
  7856. OPENGLULIB="$OPENGL_LIB_PATH $OPENGLULIB"
  7857. ac_save_libs="$LIBS"
  7858. ac_save_ldflags="$LDFLAGS"
  7859. LIBS=" $OPENGLLIB $LIBS"
  7860. LDFLAGS=" $LDFLAGS"
  7861. echo $ac_n "checking for glXCreatePbuffer""... $ac_c" 1>&6
  7862. echo "configure:9841: checking for glXCreatePbuffer" >&5
  7863. cat > conftest.$ac_ext <<EOF
  7864. #line 9844 "configure"
  7865. #include "confdefs.h"
  7866. /* System header to define __stub macros and hopefully few prototypes,
  7867. which can conflict with char glXCreatePbuffer(); below. */
  7868. #include <assert.h>
  7869. /* Override any gcc2 internal prototype to avoid an error. */
  7870. /* We use char because int might match the return type of a gcc2
  7871. builtin and then its argument prototype would still apply. */
  7872. char glXCreatePbuffer();
  7873. int main() {
  7874. /* The GNU C library defines this for functions which it implements
  7875. to always fail with ENOSYS. Some functions are actually named
  7876. something starting with __ and the normal name is an alias. */
  7877. #if defined (__stub_glXCreatePbuffer) || defined (__stub___glXCreatePbuffer)
  7878. choke me
  7879. #else
  7880. glXCreatePbuffer();
  7881. #endif
  7882. ; return 0; }
  7883. EOF
  7884. if { (eval echo configure:9867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7885. rm -rf conftest*
  7886. eval "ac_cv_func_glXCreatePbuffer=yes"
  7887. else
  7888. echo "configure: failed program was:" >&5
  7889. cat conftest.$ac_ext >&5
  7890. rm -rf conftest*
  7891. eval "ac_cv_func_glXCreatePbuffer=no"
  7892. fi
  7893. rm -f conftest*
  7894. if eval "test \"`echo '$ac_cv_func_'glXCreatePbuffer`\" = yes"; then
  7895. echo "$ac_t""yes" 1>&6
  7896. cat >> confdefs.h <<\EOF
  7897. #define HAVE_PBUFFERS 1
  7898. EOF
  7899. else
  7900. echo "$ac_t""no" 1>&6
  7901. { echo "configure: error: *** Unable to locate glXCreatePbuffer." 1>&2; exit 1; }
  7902. fi
  7903. LIBS=${ac_save_libs}
  7904. LDFLAGS=${ac_save_ldflags}
  7905. ac_save_libs="$LIBS"
  7906. ac_save_ldflags="$LDFLAGS"
  7907. LIBS=" $OPENGLLIB $LIBS"
  7908. LDFLAGS=" $LDFLAGS"
  7909. echo $ac_n "checking for glXCreateGLXPixmap""... $ac_c" 1>&6
  7910. echo "configure:9904: checking for glXCreateGLXPixmap" >&5
  7911. cat > conftest.$ac_ext <<EOF
  7912. #line 9907 "configure"
  7913. #include "confdefs.h"
  7914. /* System header to define __stub macros and hopefully few prototypes,
  7915. which can conflict with char glXCreateGLXPixmap(); below. */
  7916. #include <assert.h>
  7917. /* Override any gcc2 internal prototype to avoid an error. */
  7918. /* We use char because int might match the return type of a gcc2
  7919. builtin and then its argument prototype would still apply. */
  7920. char glXCreateGLXPixmap();
  7921. int main() {
  7922. /* The GNU C library defines this for functions which it implements
  7923. to always fail with ENOSYS. Some functions are actually named
  7924. something starting with __ and the normal name is an alias. */
  7925. #if defined (__stub_glXCreateGLXPixmap) || defined (__stub___glXCreateGLXPixmap)
  7926. choke me
  7927. #else
  7928. glXCreateGLXPixmap();
  7929. #endif
  7930. ; return 0; }
  7931. EOF
  7932. if { (eval echo configure:9930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7933. rm -rf conftest*
  7934. eval "ac_cv_func_glXCreateGLXPixmap=yes"
  7935. else
  7936. echo "configure: failed program was:" >&5
  7937. cat conftest.$ac_ext >&5
  7938. rm -rf conftest*
  7939. eval "ac_cv_func_glXCreateGLXPixmap=no"
  7940. fi
  7941. rm -f conftest*
  7942. if eval "test \"`echo '$ac_cv_func_'glXCreateGLXPixmap`\" = yes"; then
  7943. echo "$ac_t""yes" 1>&6
  7944. cat >> confdefs.h <<\EOF
  7945. #define HAVE_PIXMAPS 1
  7946. EOF
  7947. else
  7948. echo "$ac_t""no" 1>&6
  7949. { echo "configure: error: *** Unable to locate glXCreateGLXPixmap." 1>&2; exit 1; }
  7950. fi
  7951. LIBS=${ac_save_libs}
  7952. LDFLAGS=${ac_save_ldflags}
  7953. cat >> confdefs.h <<\EOF
  7954. #define OPENGL_X11 1
  7955. EOF
  7956. fi # $OPENGL_X11
  7957. if test "$OPENGL_AQUA" = 1 ; then
  7958. echo $ac_n "checking for location of OpenGL framework""... $ac_c" 1>&6
  7959. echo "configure:9973: checking for location of OpenGL framework" >&5
  7960. case "$with_opengl_framework" in
  7961. y | ye | yes | n | no)
  7962. { echo "configure: error: *** You must supply a directory to --with-opengl-framework." 1>&2; exit 1; }
  7963. ;;
  7964. esac
  7965. echo "$ac_t""$with_opengl_framework" 1>&6
  7966. if test -n "$with_opengl_framework"; then
  7967. if test -d $with_opengl_framework; then
  7968. OPENGLPATH="$OPENGLPATH -F$with_opengl_framework"
  7969. else
  7970. { echo "configure: error: *** OpenGL framework directory $dir does not exist." 1>&2; exit 1; }
  7971. fi
  7972. fi
  7973. ac_save_cppflags="$CPPFLAGS"
  7974. CPPFLAGS="$OPENGLPATH $CPPFLAGS"
  7975. for ac_hdr in OpenGL/gl.h OpenGL/glu.h
  7976. do
  7977. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7978. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7979. echo "configure:9997: checking for $ac_hdr" >&5
  7980. cat > conftest.$ac_ext <<EOF
  7981. #line 10000 "configure"
  7982. #include "confdefs.h"
  7983. #include <$ac_hdr>
  7984. EOF
  7985. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7986. { (eval echo configure:10005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7987. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7988. if test -z "$ac_err"; then
  7989. rm -rf conftest*
  7990. eval "ac_cv_header_$ac_safe=yes"
  7991. else
  7992. echo "$ac_err" >&5
  7993. echo "configure: failed program was:" >&5
  7994. cat conftest.$ac_ext >&5
  7995. rm -rf conftest*
  7996. eval "ac_cv_header_$ac_safe=no"
  7997. fi
  7998. rm -f conftest*
  7999. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8000. echo "$ac_t""yes" 1>&6
  8001. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8002. cat >> confdefs.h <<EOF
  8003. #define $ac_tr_hdr 1
  8004. EOF
  8005. else
  8006. echo "$ac_t""no" 1>&6
  8007. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  8008. fi
  8009. done
  8010. CPPFLAGS=$ac_save_cppflags
  8011. ac_save_libs="$LIBS"
  8012. ac_save_ldflags="$LDFLAGS"
  8013. LIBS="-framework OpenGL -framework AGL -framework ApplicationServices $LIBS"
  8014. LDFLAGS="$OPENGLPATH $LDFLAGS"
  8015. echo $ac_n "checking for glBegin""... $ac_c" 1>&6
  8016. echo "configure:10041: checking for glBegin" >&5
  8017. cat > conftest.$ac_ext <<EOF
  8018. #line 10044 "configure"
  8019. #include "confdefs.h"
  8020. /* System header to define __stub macros and hopefully few prototypes,
  8021. which can conflict with char glBegin(); below. */
  8022. #include <assert.h>
  8023. /* Override any gcc2 internal prototype to avoid an error. */
  8024. /* We use char because int might match the return type of a gcc2
  8025. builtin and then its argument prototype would still apply. */
  8026. char glBegin();
  8027. int main() {
  8028. /* The GNU C library defines this for functions which it implements
  8029. to always fail with ENOSYS. Some functions are actually named
  8030. something starting with __ and the normal name is an alias. */
  8031. #if defined (__stub_glBegin) || defined (__stub___glBegin)
  8032. choke me
  8033. #else
  8034. glBegin();
  8035. #endif
  8036. ; return 0; }
  8037. EOF
  8038. if { (eval echo configure:10067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8039. rm -rf conftest*
  8040. eval "ac_cv_func_glBegin=yes"
  8041. else
  8042. echo "configure: failed program was:" >&5
  8043. cat conftest.$ac_ext >&5
  8044. rm -rf conftest*
  8045. eval "ac_cv_func_glBegin=no"
  8046. fi
  8047. rm -f conftest*
  8048. if eval "test \"`echo '$ac_cv_func_'glBegin`\" = yes"; then
  8049. echo "$ac_t""yes" 1>&6
  8050. OPENGLLIB="$OPENGLLIB -framework OpenGL -framework AGL -framework ApplicationServices"
  8051. else
  8052. echo "$ac_t""no" 1>&6
  8053. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  8054. fi
  8055. LIBS=${ac_save_libs}
  8056. LDFLAGS=${ac_save_ldflags}
  8057. ac_save_libs="$LIBS"
  8058. ac_save_ldflags="$LDFLAGS"
  8059. LIBS=" $OPENGLLIB $LIBS"
  8060. LDFLAGS="$OPENGLPATH $LDFLAGS"
  8061. echo $ac_n "checking for gluBeginCurve""... $ac_c" 1>&6
  8062. echo "configure:10104: checking for gluBeginCurve" >&5
  8063. cat > conftest.$ac_ext <<EOF
  8064. #line 10107 "configure"
  8065. #include "confdefs.h"
  8066. /* System header to define __stub macros and hopefully few prototypes,
  8067. which can conflict with char gluBeginCurve(); below. */
  8068. #include <assert.h>
  8069. /* Override any gcc2 internal prototype to avoid an error. */
  8070. /* We use char because int might match the return type of a gcc2
  8071. builtin and then its argument prototype would still apply. */
  8072. char gluBeginCurve();
  8073. int main() {
  8074. /* The GNU C library defines this for functions which it implements
  8075. to always fail with ENOSYS. Some functions are actually named
  8076. something starting with __ and the normal name is an alias. */
  8077. #if defined (__stub_gluBeginCurve) || defined (__stub___gluBeginCurve)
  8078. choke me
  8079. #else
  8080. gluBeginCurve();
  8081. #endif
  8082. ; return 0; }
  8083. EOF
  8084. if { (eval echo configure:10130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8085. rm -rf conftest*
  8086. eval "ac_cv_func_gluBeginCurve=yes"
  8087. else
  8088. echo "configure: failed program was:" >&5
  8089. cat conftest.$ac_ext >&5
  8090. rm -rf conftest*
  8091. eval "ac_cv_func_gluBeginCurve=no"
  8092. fi
  8093. rm -f conftest*
  8094. if eval "test \"`echo '$ac_cv_func_'gluBeginCurve`\" = yes"; then
  8095. echo "$ac_t""yes" 1>&6
  8096. OPENGLLIB="$OPENGLLIB "
  8097. else
  8098. echo "$ac_t""no" 1>&6
  8099. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  8100. fi
  8101. LIBS=${ac_save_libs}
  8102. LDFLAGS=${ac_save_ldflags}
  8103. OPENGLINC="$OPENGLPATH"
  8104. OPENGLLIBPATH="$OPENGLPATH"
  8105. cat >> confdefs.h <<\EOF
  8106. #define OPENGL_AQUA 1
  8107. EOF
  8108. fi # $OPENGL_AQUA
  8109. if test "$OPENGL_WINDOWS" = 1 ; then
  8110. # With OpenGL includes directory
  8111. echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
  8112. echo "configure:10178: checking for location of OpenGL includes" >&5
  8113. case "$with_opengl_includes" in
  8114. y | ye | yes | n | no)
  8115. { echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
  8116. ;;
  8117. esac
  8118. echo "$ac_t""$with_opengl_includes" 1>&6
  8119. if test -n "$with_opengl_includes" ; then
  8120. for dir in $with_opengl_includes; do
  8121. if test -d "$dir"; then
  8122. OPENGLINC="$OPENGLINC -I$dir"
  8123. else
  8124. { echo "configure: error: *** OpenGL includes directory $dir does not exist." 1>&2; exit 1; }
  8125. fi
  8126. done
  8127. fi
  8128. ac_save_cppflags="$CPPFLAGS"
  8129. CPPFLAGS="$OPENGLINC $CPPFLAGS"
  8130. for ac_hdr in GL/gl.h GL/glu.h
  8131. do
  8132. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8133. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8134. echo "configure:10204: checking for $ac_hdr" >&5
  8135. cat > conftest.$ac_ext <<EOF
  8136. #line 10207 "configure"
  8137. #include "confdefs.h"
  8138. #include <$ac_hdr>
  8139. EOF
  8140. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8141. { (eval echo configure:10212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8142. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8143. if test -z "$ac_err"; then
  8144. rm -rf conftest*
  8145. eval "ac_cv_header_$ac_safe=yes"
  8146. else
  8147. echo "$ac_err" >&5
  8148. echo "configure: failed program was:" >&5
  8149. cat conftest.$ac_ext >&5
  8150. rm -rf conftest*
  8151. eval "ac_cv_header_$ac_safe=no"
  8152. fi
  8153. rm -f conftest*
  8154. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8155. echo "$ac_t""yes" 1>&6
  8156. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8157. cat >> confdefs.h <<EOF
  8158. #define $ac_tr_hdr 1
  8159. EOF
  8160. else
  8161. echo "$ac_t""no" 1>&6
  8162. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  8163. fi
  8164. done
  8165. CPPFLAGS=$ac_save_cppflags
  8166. # With OpenGL library directory
  8167. echo $ac_n "checking for location of OpenGL library""... $ac_c" 1>&6
  8168. echo "configure:10246: checking for location of OpenGL library" >&5
  8169. case "$with_opengl_libs" in
  8170. y | ye | yes | n | no)
  8171. { echo "configure: error: *** You must supply a directory to --with-opengl-libs." 1>&2; exit 1; }
  8172. ;;
  8173. esac
  8174. echo "$ac_t""$with_opengl_libs" 1>&6
  8175. if test -n "$with_opengl_libs"; then
  8176. for dir in $with_opengl_libs; do
  8177. if test -d "$dir"; then
  8178. OPENGL_LIB_PATH="$OPENGL_LIB_PATH -L$dir"
  8179. else
  8180. { echo "configure: error: *** OpenGL library directory $dir does not exist." 1>&2; exit 1; }
  8181. fi
  8182. done
  8183. fi
  8184. ac_save_cflags="$CFLAGS"
  8185. CFLAGS="$CFLAGS $OPENGLINC"
  8186. ac_save_ldflags="$LDFLAGS"
  8187. ac_save_libs="$LIBS"
  8188. echo $ac_n "checking for OpenGL library""... $ac_c" 1>&6
  8189. echo "configure:10271: checking for OpenGL library" >&5
  8190. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  8191. LIBS="-lopengl32 "
  8192. cat > conftest.$ac_ext <<EOF
  8193. #line 10275 "configure"
  8194. #include "confdefs.h"
  8195. #include <GL/gl.h>
  8196. int main() {
  8197. glEnd();
  8198. ; return 0; }
  8199. EOF
  8200. if { (eval echo configure:10282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8201. rm -rf conftest*
  8202. echo "$ac_t""found" 1>&6
  8203. OPENGLLIB="$OPENGLLIB -lopengl32 "
  8204. else
  8205. echo "configure: failed program was:" >&5
  8206. cat conftest.$ac_ext >&5
  8207. rm -rf conftest*
  8208. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  8209. fi
  8210. rm -f conftest*
  8211. LIBS=${ac_save_libs}
  8212. LDFLAGS=${ac_save_ldflags}
  8213. ac_save_ldflags="$LDFLAGS"
  8214. ac_save_libs="$LIBS"
  8215. echo $ac_n "checking for GLU library""... $ac_c" 1>&6
  8216. echo "configure:10306: checking for GLU library" >&5
  8217. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  8218. LIBS="-lglu32 $OPENGLLIB "
  8219. cat > conftest.$ac_ext <<EOF
  8220. #line 10310 "configure"
  8221. #include "confdefs.h"
  8222. #include <GL/glu.h>
  8223. int main() {
  8224. gluNewQuadric();
  8225. ; return 0; }
  8226. EOF
  8227. if { (eval echo configure:10317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8228. rm -rf conftest*
  8229. echo "$ac_t""found" 1>&6
  8230. OPENGLULIB="$OPENGLULIB -lglu32 "
  8231. else
  8232. echo "configure: failed program was:" >&5
  8233. cat conftest.$ac_ext >&5
  8234. rm -rf conftest*
  8235. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  8236. fi
  8237. rm -f conftest*
  8238. LIBS=${ac_save_libs}
  8239. LDFLAGS=${ac_save_ldflags}
  8240. CFLAGS="${ac_save_cflags}"
  8241. OPENGLLIB="$OPENGL_LIB_PATH $OPENGLLIB"
  8242. OPENGLULIB="$OPENGL_LIB_PATH $OPENGLULIB"
  8243. cat >> confdefs.h <<\EOF
  8244. #define OPENGL_WINDOWS 1
  8245. EOF
  8246. fi # $OPENGL_WINDOWS
  8247. fi # $USE_OPENGL
  8248. # Done checking OpenGL
  8249. # Enable TCLTK option
  8250. echo $ac_n "checking whether to use Tcl/Tk""... $ac_c" 1>&6
  8251. echo "configure:10366: checking whether to use Tcl/Tk" >&5
  8252. echo "$ac_t"""$with_tcltk"" 1>&6
  8253. case "$with_tcltk" in
  8254. "no") USE_TCLTK= ;;
  8255. "yes") USE_TCLTK="1" ;;
  8256. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  8257. esac
  8258. TCLINCDIR=
  8259. TCLTKLIBPATH=
  8260. TCLTKLIBS=
  8261. if test -n "$USE_TCLTK"; then
  8262. # With Tcl/Tk includes directory
  8263. echo $ac_n "checking for location of Tcl/Tk includes""... $ac_c" 1>&6
  8264. echo "configure:10386: checking for location of Tcl/Tk includes" >&5
  8265. case "$with_tcltk_includes" in
  8266. y | ye | yes | n | no)
  8267. { echo "configure: error: *** You must supply a directory to --with-tcltk-includes." 1>&2; exit 1; }
  8268. ;;
  8269. esac
  8270. echo "$ac_t""$with_tcltk_includes" 1>&6
  8271. if test -n "$with_tcltk_includes" ; then
  8272. for dir in $with_tcltk_includes; do
  8273. if test -d "$dir"; then
  8274. TCLINCDIR="$TCLINCDIR -I$dir"
  8275. else
  8276. { echo "configure: error: *** Tcl/Tk includes directory $dir does not exist." 1>&2; exit 1; }
  8277. fi
  8278. done
  8279. fi
  8280. ac_save_cppflags="$CPPFLAGS"
  8281. CPPFLAGS="$TCLINCDIR $CPPFLAGS"
  8282. for ac_hdr in tcl.h
  8283. do
  8284. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8285. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8286. echo "configure:10412: checking for $ac_hdr" >&5
  8287. cat > conftest.$ac_ext <<EOF
  8288. #line 10415 "configure"
  8289. #include "confdefs.h"
  8290. #include <$ac_hdr>
  8291. EOF
  8292. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8293. { (eval echo configure:10420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8294. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8295. if test -z "$ac_err"; then
  8296. rm -rf conftest*
  8297. eval "ac_cv_header_$ac_safe=yes"
  8298. else
  8299. echo "$ac_err" >&5
  8300. echo "configure: failed program was:" >&5
  8301. cat conftest.$ac_ext >&5
  8302. rm -rf conftest*
  8303. eval "ac_cv_header_$ac_safe=no"
  8304. fi
  8305. rm -f conftest*
  8306. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8307. echo "$ac_t""yes" 1>&6
  8308. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8309. cat >> confdefs.h <<EOF
  8310. #define $ac_tr_hdr 1
  8311. EOF
  8312. else
  8313. echo "$ac_t""no" 1>&6
  8314. { echo "configure: error: *** Unable to locate Tcl includes." 1>&2; exit 1; }
  8315. fi
  8316. done
  8317. CPPFLAGS=$ac_save_cppflags
  8318. ac_save_cppflags="$CPPFLAGS"
  8319. CPPFLAGS="$TCLINCDIR $X_CFLAGS $CPPFLAGS"
  8320. for ac_hdr in tk.h
  8321. do
  8322. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8323. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8324. echo "configure:10457: checking for $ac_hdr" >&5
  8325. cat > conftest.$ac_ext <<EOF
  8326. #line 10460 "configure"
  8327. #include "confdefs.h"
  8328. #include <$ac_hdr>
  8329. EOF
  8330. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8331. { (eval echo configure:10465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8332. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8333. if test -z "$ac_err"; then
  8334. rm -rf conftest*
  8335. eval "ac_cv_header_$ac_safe=yes"
  8336. else
  8337. echo "$ac_err" >&5
  8338. echo "configure: failed program was:" >&5
  8339. cat conftest.$ac_ext >&5
  8340. rm -rf conftest*
  8341. eval "ac_cv_header_$ac_safe=no"
  8342. fi
  8343. rm -f conftest*
  8344. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8345. echo "$ac_t""yes" 1>&6
  8346. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8347. cat >> confdefs.h <<EOF
  8348. #define $ac_tr_hdr 1
  8349. EOF
  8350. else
  8351. echo "$ac_t""no" 1>&6
  8352. { echo "configure: error: *** Unable to locate Tk includes." 1>&2; exit 1; }
  8353. fi
  8354. done
  8355. CPPFLAGS=$ac_save_cppflags
  8356. # Tcl/Tk version checks
  8357. echo $ac_n "checking Tcl version""... $ac_c" 1>&6
  8358. echo "configure:10499: checking Tcl version" >&5
  8359. ac_save_cppflags="$CPPFLAGS"
  8360. CPPFLAGS="$TCLINCDIR $CPPFLAGS"
  8361. if test "$cross_compiling" = yes; then
  8362. tcl_ver=UNKNOWN
  8363. echo "$ac_t""unknown (cross-compiling)" 1>&6
  8364. else
  8365. cat > conftest.$ac_ext <<EOF
  8366. #line 10507 "configure"
  8367. #include "confdefs.h"
  8368. #include <stdio.h>
  8369. #include <tcl.h>
  8370. int main(void) {
  8371. FILE *fp = fopen("conftestdata","w");
  8372. fputs(TCL_VERSION, fp);
  8373. return 0;
  8374. }
  8375. EOF
  8376. if { (eval echo configure:10519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  8377. then
  8378. tcl_ver=`cat conftestdata`
  8379. echo "$ac_t""$tcl_ver" 1>&6
  8380. else
  8381. echo "configure: failed program was:" >&5
  8382. cat conftest.$ac_ext >&5
  8383. rm -fr conftest*
  8384. { echo "configure: error: *** Could not determine Tcl version." 1>&2; exit 1; }
  8385. fi
  8386. rm -fr conftest*
  8387. fi
  8388. CPPFLAGS=$ac_save_cppflags
  8389. echo $ac_n "checking Tk version""... $ac_c" 1>&6
  8390. echo "configure:10537: checking Tk version" >&5
  8391. ac_save_cppflags="$CPPFLAGS"
  8392. CPPFLAGS="$TCLINCDIR $X_CFLAGS $CPPFLAGS"
  8393. if test "$cross_compiling" = yes; then
  8394. tk_ver=UNKNOWN
  8395. echo "$ac_t""unknown (cross-compiling)" 1>&6
  8396. else
  8397. cat > conftest.$ac_ext <<EOF
  8398. #line 10545 "configure"
  8399. #include "confdefs.h"
  8400. #include <stdio.h>
  8401. #include <tk.h>
  8402. int main(void) {
  8403. FILE *fp = fopen("conftestdata","w");
  8404. fputs(TK_VERSION, fp);
  8405. return 0;
  8406. }
  8407. EOF
  8408. if { (eval echo configure:10557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  8409. then
  8410. tk_ver=`cat conftestdata`
  8411. echo "$ac_t""$tk_ver" 1>&6
  8412. else
  8413. echo "configure: failed program was:" >&5
  8414. cat conftest.$ac_ext >&5
  8415. rm -fr conftest*
  8416. { echo "configure: error: *** Could not determine Tk version." 1>&2; exit 1; }
  8417. fi
  8418. rm -fr conftest*
  8419. fi
  8420. CPPFLAGS=$ac_save_cppflags
  8421. if test "$tcl_ver" = "$tk_ver" ; then
  8422. tcltk_ver="$tcl_ver"
  8423. else
  8424. { echo "configure: error: *** Tcl/Tk version mismatch." 1>&2; exit 1; }
  8425. fi
  8426. # FreeBSD and CygWin don't have a "dot" between major/minor version number
  8427. tcltk_ver2=`echo "$tcltk_ver" | sed 's/\.//g'`
  8428. # With Tcl/Tk library directory
  8429. echo $ac_n "checking for location of Tcl/Tk library""... $ac_c" 1>&6
  8430. echo "configure:10586: checking for location of Tcl/Tk library" >&5
  8431. case "$with_tcltk_libs" in
  8432. y | ye | yes | n | no)
  8433. { echo "configure: error: *** You must supply a directory to --with-tcltk-libs." 1>&2; exit 1; }
  8434. ;;
  8435. esac
  8436. echo "$ac_t""$with_tcltk_libs" 1>&6
  8437. if test -n "$with_tcltk_libs"; then
  8438. for dir in $with_tcltk_libs; do
  8439. if test -d "$dir"; then
  8440. TCLTKLIBPATH="$TCLTKLIBPATH -L$dir"
  8441. else
  8442. { echo "configure: error: *** Tcl/Tk library directory $dir does not exist." 1>&2; exit 1; }
  8443. fi
  8444. done
  8445. fi
  8446. TCLLIB=
  8447. TKLIB=
  8448. MACOSX_ARCHS_TCLTK=
  8449. # Can't test tcl/tk libs on 64bit OSX Aqua for now
  8450. # assume that if OpenGL Aqua, then user specifies TclTk Aqua
  8451. if test "$OPENGL_AQUA" = 1 ; then
  8452. save_CFLAGS="$CFLAGS"
  8453. CFLAGS="`echo \"$CFLAGS\" | sed -E 's/-arch +x86_64//g' | sed -E 's/-arch +ppc64//g'`"
  8454. save_LDFLAGS="$LDFLAGS"
  8455. LDFLAGS="`echo \"$LDFLAGS\" | sed -E 's/-arch +x86_64//g' | sed -E 's/-arch +ppc64//g'`"
  8456. fi
  8457. ac_save_ldflags="$LDFLAGS"
  8458. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  8459. echo $ac_n "checking for Tcl_Init in -ltcl""... $ac_c" 1>&6
  8460. echo "configure:10626: checking for Tcl_Init in -ltcl" >&5
  8461. ac_lib_var=`echo tcl'_'Tcl_Init | sed 'y%./+-%__p_%'`
  8462. ac_save_LIBS="$LIBS"
  8463. LIBS="-ltcl $MATHLIB $LIBS"
  8464. cat > conftest.$ac_ext <<EOF
  8465. #line 10632 "configure"
  8466. #include "confdefs.h"
  8467. /* Override any gcc2 internal prototype to avoid an error. */
  8468. /* We use char because int might match the return type of a gcc2
  8469. builtin and then its argument prototype would still apply. */
  8470. char Tcl_Init();
  8471. int main() {
  8472. Tcl_Init()
  8473. ; return 0; }
  8474. EOF
  8475. if { (eval echo configure:10643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8476. rm -rf conftest*
  8477. eval "ac_cv_lib_$ac_lib_var=yes"
  8478. else
  8479. echo "configure: failed program was:" >&5
  8480. cat conftest.$ac_ext >&5
  8481. rm -rf conftest*
  8482. eval "ac_cv_lib_$ac_lib_var=no"
  8483. fi
  8484. rm -f conftest*
  8485. LIBS="$ac_save_LIBS"
  8486. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8487. echo "$ac_t""yes" 1>&6
  8488. TCLLIB="$TCLLIB -ltcl $MATHLIB"
  8489. else
  8490. echo "$ac_t""no" 1>&6
  8491. echo $ac_n "checking for Tcl_Init in -ltcl""... $ac_c" 1>&6
  8492. echo "configure:10662: checking for Tcl_Init in -ltcl" >&5
  8493. ac_lib_var=`echo tcl'_'Tcl_Init | sed 'y%./+-%__p_%'`
  8494. ac_save_LIBS="$LIBS"
  8495. LIBS="-ltcl $MATHLIB $DLLIB $LIBS"
  8496. cat > conftest.$ac_ext <<EOF
  8497. #line 10668 "configure"
  8498. #include "confdefs.h"
  8499. /* Override any gcc2 internal prototype to avoid an error. */
  8500. /* We use char because int might match the return type of a gcc2
  8501. builtin and then its argument prototype would still apply. */
  8502. char Tcl_Init();
  8503. int main() {
  8504. Tcl_Init()
  8505. ; return 0; }
  8506. EOF
  8507. if { (eval echo configure:10679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8508. rm -rf conftest*
  8509. eval "ac_cv_lib_$ac_lib_var=yes"
  8510. else
  8511. echo "configure: failed program was:" >&5
  8512. cat conftest.$ac_ext >&5
  8513. rm -rf conftest*
  8514. eval "ac_cv_lib_$ac_lib_var=no"
  8515. fi
  8516. rm -f conftest*
  8517. LIBS="$ac_save_LIBS"
  8518. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8519. echo "$ac_t""yes" 1>&6
  8520. TCLLIB="$TCLLIB -ltcl $MATHLIB $DLLIB"
  8521. else
  8522. echo "$ac_t""no" 1>&6
  8523. LDFLAGS=${ac_save_ldflags}
  8524. ac_save_ldflags="$LDFLAGS"
  8525. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  8526. echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver""... $ac_c" 1>&6
  8527. echo "configure:10706: checking for Tcl_Init in -ltcl$tcltk_ver" >&5
  8528. ac_lib_var=`echo tcl$tcltk_ver'_'Tcl_Init | sed 'y%./+-%__p_%'`
  8529. ac_save_LIBS="$LIBS"
  8530. LIBS="-ltcl$tcltk_ver $MATHLIB $LIBS"
  8531. cat > conftest.$ac_ext <<EOF
  8532. #line 10712 "configure"
  8533. #include "confdefs.h"
  8534. /* Override any gcc2 internal prototype to avoid an error. */
  8535. /* We use char because int might match the return type of a gcc2
  8536. builtin and then its argument prototype would still apply. */
  8537. char Tcl_Init();
  8538. int main() {
  8539. Tcl_Init()
  8540. ; return 0; }
  8541. EOF
  8542. if { (eval echo configure:10723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8543. rm -rf conftest*
  8544. eval "ac_cv_lib_$ac_lib_var=yes"
  8545. else
  8546. echo "configure: failed program was:" >&5
  8547. cat conftest.$ac_ext >&5
  8548. rm -rf conftest*
  8549. eval "ac_cv_lib_$ac_lib_var=no"
  8550. fi
  8551. rm -f conftest*
  8552. LIBS="$ac_save_LIBS"
  8553. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8554. echo "$ac_t""yes" 1>&6
  8555. TCLLIB="$TCLLIB -ltcl$tcltk_ver $MATHLIB"
  8556. else
  8557. echo "$ac_t""no" 1>&6
  8558. echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver""... $ac_c" 1>&6
  8559. echo "configure:10742: checking for Tcl_Init in -ltcl$tcltk_ver" >&5
  8560. ac_lib_var=`echo tcl$tcltk_ver'_'Tcl_Init | sed 'y%./+-%__p_%'`
  8561. ac_save_LIBS="$LIBS"
  8562. LIBS="-ltcl$tcltk_ver $MATHLIB $DLLIB $LIBS"
  8563. cat > conftest.$ac_ext <<EOF
  8564. #line 10748 "configure"
  8565. #include "confdefs.h"
  8566. /* Override any gcc2 internal prototype to avoid an error. */
  8567. /* We use char because int might match the return type of a gcc2
  8568. builtin and then its argument prototype would still apply. */
  8569. char Tcl_Init();
  8570. int main() {
  8571. Tcl_Init()
  8572. ; return 0; }
  8573. EOF
  8574. if { (eval echo configure:10759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8575. rm -rf conftest*
  8576. eval "ac_cv_lib_$ac_lib_var=yes"
  8577. else
  8578. echo "configure: failed program was:" >&5
  8579. cat conftest.$ac_ext >&5
  8580. rm -rf conftest*
  8581. eval "ac_cv_lib_$ac_lib_var=no"
  8582. fi
  8583. rm -f conftest*
  8584. LIBS="$ac_save_LIBS"
  8585. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8586. echo "$ac_t""yes" 1>&6
  8587. TCLLIB="$TCLLIB -ltcl$tcltk_ver $MATHLIB $DLLIB"
  8588. else
  8589. echo "$ac_t""no" 1>&6
  8590. LDFLAGS=${ac_save_ldflags}
  8591. ac_save_ldflags="$LDFLAGS"
  8592. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  8593. echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver2""... $ac_c" 1>&6
  8594. echo "configure:10786: checking for Tcl_Init in -ltcl$tcltk_ver2" >&5
  8595. ac_lib_var=`echo tcl$tcltk_ver2'_'Tcl_Init | sed 'y%./+-%__p_%'`
  8596. ac_save_LIBS="$LIBS"
  8597. LIBS="-ltcl$tcltk_ver2 $MATHLIB $LIBS"
  8598. cat > conftest.$ac_ext <<EOF
  8599. #line 10792 "configure"
  8600. #include "confdefs.h"
  8601. /* Override any gcc2 internal prototype to avoid an error. */
  8602. /* We use char because int might match the return type of a gcc2
  8603. builtin and then its argument prototype would still apply. */
  8604. char Tcl_Init();
  8605. int main() {
  8606. Tcl_Init()
  8607. ; return 0; }
  8608. EOF
  8609. if { (eval echo configure:10803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8610. rm -rf conftest*
  8611. eval "ac_cv_lib_$ac_lib_var=yes"
  8612. else
  8613. echo "configure: failed program was:" >&5
  8614. cat conftest.$ac_ext >&5
  8615. rm -rf conftest*
  8616. eval "ac_cv_lib_$ac_lib_var=no"
  8617. fi
  8618. rm -f conftest*
  8619. LIBS="$ac_save_LIBS"
  8620. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8621. echo "$ac_t""yes" 1>&6
  8622. TCLLIB="$TCLLIB -ltcl$tcltk_ver2 $MATHLIB"
  8623. else
  8624. echo "$ac_t""no" 1>&6
  8625. echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver2""... $ac_c" 1>&6
  8626. echo "configure:10822: checking for Tcl_Init in -ltcl$tcltk_ver2" >&5
  8627. ac_lib_var=`echo tcl$tcltk_ver2'_'Tcl_Init | sed 'y%./+-%__p_%'`
  8628. ac_save_LIBS="$LIBS"
  8629. LIBS="-ltcl$tcltk_ver2 $MATHLIB $DLLIB $LIBS"
  8630. cat > conftest.$ac_ext <<EOF
  8631. #line 10828 "configure"
  8632. #include "confdefs.h"
  8633. /* Override any gcc2 internal prototype to avoid an error. */
  8634. /* We use char because int might match the return type of a gcc2
  8635. builtin and then its argument prototype would still apply. */
  8636. char Tcl_Init();
  8637. int main() {
  8638. Tcl_Init()
  8639. ; return 0; }
  8640. EOF
  8641. if { (eval echo configure:10839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8642. rm -rf conftest*
  8643. eval "ac_cv_lib_$ac_lib_var=yes"
  8644. else
  8645. echo "configure: failed program was:" >&5
  8646. cat conftest.$ac_ext >&5
  8647. rm -rf conftest*
  8648. eval "ac_cv_lib_$ac_lib_var=no"
  8649. fi
  8650. rm -f conftest*
  8651. LIBS="$ac_save_LIBS"
  8652. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8653. echo "$ac_t""yes" 1>&6
  8654. TCLLIB="$TCLLIB -ltcl$tcltk_ver2 $MATHLIB $DLLIB"
  8655. else
  8656. echo "$ac_t""no" 1>&6
  8657. LDFLAGS=${ac_save_ldflags}
  8658. { echo "configure: error: *** Unable to locate Tcl library." 1>&2; exit 1; }
  8659. fi
  8660. fi
  8661. LDFLAGS=${ac_save_ldflags}
  8662. fi
  8663. fi
  8664. LDFLAGS=${ac_save_ldflags}
  8665. fi
  8666. fi
  8667. LDFLAGS=${ac_save_ldflags}
  8668. ac_save_ldflags="$LDFLAGS"
  8669. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  8670. echo $ac_n "checking for Tk_MainWindow in -ltk""... $ac_c" 1>&6
  8671. echo "configure:10917: checking for Tk_MainWindow in -ltk" >&5
  8672. ac_lib_var=`echo tk'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  8673. ac_save_LIBS="$LIBS"
  8674. LIBS="-ltk $TCLLIB $MATHLIB $LIBS"
  8675. cat > conftest.$ac_ext <<EOF
  8676. #line 10923 "configure"
  8677. #include "confdefs.h"
  8678. /* Override any gcc2 internal prototype to avoid an error. */
  8679. /* We use char because int might match the return type of a gcc2
  8680. builtin and then its argument prototype would still apply. */
  8681. char Tk_MainWindow();
  8682. int main() {
  8683. Tk_MainWindow()
  8684. ; return 0; }
  8685. EOF
  8686. if { (eval echo configure:10934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8687. rm -rf conftest*
  8688. eval "ac_cv_lib_$ac_lib_var=yes"
  8689. else
  8690. echo "configure: failed program was:" >&5
  8691. cat conftest.$ac_ext >&5
  8692. rm -rf conftest*
  8693. eval "ac_cv_lib_$ac_lib_var=no"
  8694. fi
  8695. rm -f conftest*
  8696. LIBS="$ac_save_LIBS"
  8697. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8698. echo "$ac_t""yes" 1>&6
  8699. TKLIB="$TKLIB -ltk $MATHLIB"
  8700. else
  8701. echo "$ac_t""no" 1>&6
  8702. echo $ac_n "checking for Tk_MainWindow in -ltk""... $ac_c" 1>&6
  8703. echo "configure:10953: checking for Tk_MainWindow in -ltk" >&5
  8704. ac_lib_var=`echo tk'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  8705. ac_save_LIBS="$LIBS"
  8706. LIBS="-ltk $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
  8707. cat > conftest.$ac_ext <<EOF
  8708. #line 10959 "configure"
  8709. #include "confdefs.h"
  8710. /* Override any gcc2 internal prototype to avoid an error. */
  8711. /* We use char because int might match the return type of a gcc2
  8712. builtin and then its argument prototype would still apply. */
  8713. char Tk_MainWindow();
  8714. int main() {
  8715. Tk_MainWindow()
  8716. ; return 0; }
  8717. EOF
  8718. if { (eval echo configure:10970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8719. rm -rf conftest*
  8720. eval "ac_cv_lib_$ac_lib_var=yes"
  8721. else
  8722. echo "configure: failed program was:" >&5
  8723. cat conftest.$ac_ext >&5
  8724. rm -rf conftest*
  8725. eval "ac_cv_lib_$ac_lib_var=no"
  8726. fi
  8727. rm -f conftest*
  8728. LIBS="$ac_save_LIBS"
  8729. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8730. echo "$ac_t""yes" 1>&6
  8731. TKLIB="$TKLIB -ltk $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
  8732. else
  8733. echo "$ac_t""no" 1>&6
  8734. LDFLAGS=${ac_save_ldflags}
  8735. ac_save_ldflags="$LDFLAGS"
  8736. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  8737. echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver""... $ac_c" 1>&6
  8738. echo "configure:10997: checking for Tk_MainWindow in -ltk$tcltk_ver" >&5
  8739. ac_lib_var=`echo tk$tcltk_ver'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  8740. ac_save_LIBS="$LIBS"
  8741. LIBS="-ltk$tcltk_ver $TCLLIB $MATHLIB $LIBS"
  8742. cat > conftest.$ac_ext <<EOF
  8743. #line 11003 "configure"
  8744. #include "confdefs.h"
  8745. /* Override any gcc2 internal prototype to avoid an error. */
  8746. /* We use char because int might match the return type of a gcc2
  8747. builtin and then its argument prototype would still apply. */
  8748. char Tk_MainWindow();
  8749. int main() {
  8750. Tk_MainWindow()
  8751. ; return 0; }
  8752. EOF
  8753. if { (eval echo configure:11014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8754. rm -rf conftest*
  8755. eval "ac_cv_lib_$ac_lib_var=yes"
  8756. else
  8757. echo "configure: failed program was:" >&5
  8758. cat conftest.$ac_ext >&5
  8759. rm -rf conftest*
  8760. eval "ac_cv_lib_$ac_lib_var=no"
  8761. fi
  8762. rm -f conftest*
  8763. LIBS="$ac_save_LIBS"
  8764. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8765. echo "$ac_t""yes" 1>&6
  8766. TKLIB="$TKLIB -ltk$tcltk_ver $MATHLIB"
  8767. else
  8768. echo "$ac_t""no" 1>&6
  8769. echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver""... $ac_c" 1>&6
  8770. echo "configure:11033: checking for Tk_MainWindow in -ltk$tcltk_ver" >&5
  8771. ac_lib_var=`echo tk$tcltk_ver'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  8772. ac_save_LIBS="$LIBS"
  8773. LIBS="-ltk$tcltk_ver $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
  8774. cat > conftest.$ac_ext <<EOF
  8775. #line 11039 "configure"
  8776. #include "confdefs.h"
  8777. /* Override any gcc2 internal prototype to avoid an error. */
  8778. /* We use char because int might match the return type of a gcc2
  8779. builtin and then its argument prototype would still apply. */
  8780. char Tk_MainWindow();
  8781. int main() {
  8782. Tk_MainWindow()
  8783. ; return 0; }
  8784. EOF
  8785. if { (eval echo configure:11050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8786. rm -rf conftest*
  8787. eval "ac_cv_lib_$ac_lib_var=yes"
  8788. else
  8789. echo "configure: failed program was:" >&5
  8790. cat conftest.$ac_ext >&5
  8791. rm -rf conftest*
  8792. eval "ac_cv_lib_$ac_lib_var=no"
  8793. fi
  8794. rm -f conftest*
  8795. LIBS="$ac_save_LIBS"
  8796. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8797. echo "$ac_t""yes" 1>&6
  8798. TKLIB="$TKLIB -ltk$tcltk_ver $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
  8799. else
  8800. echo "$ac_t""no" 1>&6
  8801. LDFLAGS=${ac_save_ldflags}
  8802. ac_save_ldflags="$LDFLAGS"
  8803. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  8804. echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver2""... $ac_c" 1>&6
  8805. echo "configure:11077: checking for Tk_MainWindow in -ltk$tcltk_ver2" >&5
  8806. ac_lib_var=`echo tk$tcltk_ver2'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  8807. ac_save_LIBS="$LIBS"
  8808. LIBS="-ltk$tcltk_ver2 $TCLLIB $MATHLIB $LIBS"
  8809. cat > conftest.$ac_ext <<EOF
  8810. #line 11083 "configure"
  8811. #include "confdefs.h"
  8812. /* Override any gcc2 internal prototype to avoid an error. */
  8813. /* We use char because int might match the return type of a gcc2
  8814. builtin and then its argument prototype would still apply. */
  8815. char Tk_MainWindow();
  8816. int main() {
  8817. Tk_MainWindow()
  8818. ; return 0; }
  8819. EOF
  8820. if { (eval echo configure:11094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8821. rm -rf conftest*
  8822. eval "ac_cv_lib_$ac_lib_var=yes"
  8823. else
  8824. echo "configure: failed program was:" >&5
  8825. cat conftest.$ac_ext >&5
  8826. rm -rf conftest*
  8827. eval "ac_cv_lib_$ac_lib_var=no"
  8828. fi
  8829. rm -f conftest*
  8830. LIBS="$ac_save_LIBS"
  8831. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8832. echo "$ac_t""yes" 1>&6
  8833. TKLIB="$TKLIB -ltk$tcltk_ver2 $MATHLIB"
  8834. else
  8835. echo "$ac_t""no" 1>&6
  8836. echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver2""... $ac_c" 1>&6
  8837. echo "configure:11113: checking for Tk_MainWindow in -ltk$tcltk_ver2" >&5
  8838. ac_lib_var=`echo tk$tcltk_ver2'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  8839. ac_save_LIBS="$LIBS"
  8840. LIBS="-ltk$tcltk_ver2 $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
  8841. cat > conftest.$ac_ext <<EOF
  8842. #line 11119 "configure"
  8843. #include "confdefs.h"
  8844. /* Override any gcc2 internal prototype to avoid an error. */
  8845. /* We use char because int might match the return type of a gcc2
  8846. builtin and then its argument prototype would still apply. */
  8847. char Tk_MainWindow();
  8848. int main() {
  8849. Tk_MainWindow()
  8850. ; return 0; }
  8851. EOF
  8852. if { (eval echo configure:11130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8853. rm -rf conftest*
  8854. eval "ac_cv_lib_$ac_lib_var=yes"
  8855. else
  8856. echo "configure: failed program was:" >&5
  8857. cat conftest.$ac_ext >&5
  8858. rm -rf conftest*
  8859. eval "ac_cv_lib_$ac_lib_var=no"
  8860. fi
  8861. rm -f conftest*
  8862. LIBS="$ac_save_LIBS"
  8863. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8864. echo "$ac_t""yes" 1>&6
  8865. TKLIB="$TKLIB -ltk$tcltk_ver2 $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
  8866. else
  8867. echo "$ac_t""no" 1>&6
  8868. LDFLAGS=${ac_save_ldflags}
  8869. { echo "configure: error: *** Unable to locate Tk library." 1>&2; exit 1; }
  8870. fi
  8871. fi
  8872. LDFLAGS=${ac_save_ldflags}
  8873. fi
  8874. fi
  8875. LDFLAGS=${ac_save_ldflags}
  8876. fi
  8877. fi
  8878. LDFLAGS=${ac_save_ldflags}
  8879. # restore CFLAGS/LDLFAGS from Aqua 64bit strip
  8880. # only Tcl/Tk-based makefiles will strip 64bit out during compile
  8881. if test "$OPENGL_AQUA" = 1 ; then
  8882. CFLAGS="$save_CFLAGS"
  8883. LDFLAGS="$save_LDFLAGS"
  8884. fi
  8885. TCLTKLIBS="$TKLIB $TCLLIB"
  8886. # check for available OSX archs in TclTk
  8887. if test -n "$MACOSX_ARCHS" ; then
  8888. save_LDFLAGS="$LDFLAGS"
  8889. LDFLAGS=
  8890. save_CFLAGS="$CFLAGS"
  8891. CFLAGS=
  8892. tlib=`echo "$TCLLIB" | sed -e 's/-l//' -e 's/^ *//' -e 's/ *$//'`
  8893. for a in i386 ppc x86_64 ppc64
  8894. do
  8895. # add only if in MACOSX_ARCHS
  8896. echo $ac_n "checking for Tcl_Init in -l$tlib""... $ac_c" 1>&6
  8897. echo "configure:11220: checking for Tcl_Init in -l$tlib" >&5
  8898. ac_lib_var=`echo $tlib'_'Tcl_Init | sed 'y%./+-%__p_%'`
  8899. ac_save_LIBS="$LIBS"
  8900. LIBS="-l$tlib -arch $a $MACOSX_SDK $TCLTKLIBPATH $LIBS"
  8901. cat > conftest.$ac_ext <<EOF
  8902. #line 11226 "configure"
  8903. #include "confdefs.h"
  8904. /* Override any gcc2 internal prototype to avoid an error. */
  8905. /* We use char because int might match the return type of a gcc2
  8906. builtin and then its argument prototype would still apply. */
  8907. char Tcl_Init();
  8908. int main() {
  8909. Tcl_Init()
  8910. ; return 0; }
  8911. EOF
  8912. if { (eval echo configure:11237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8913. rm -rf conftest*
  8914. eval "ac_cv_lib_$ac_lib_var=yes"
  8915. else
  8916. echo "configure: failed program was:" >&5
  8917. cat conftest.$ac_ext >&5
  8918. rm -rf conftest*
  8919. eval "ac_cv_lib_$ac_lib_var=no"
  8920. fi
  8921. rm -f conftest*
  8922. LIBS="$ac_save_LIBS"
  8923. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8924. echo "$ac_t""yes" 1>&6
  8925. if test -n "`echo "$MACOSX_ARCHS" | grep $a`" ; then
  8926. MACOSX_ARCHS_TCLTK="$MACOSX_ARCHS_TCLTK -arch $a"
  8927. fi
  8928. else
  8929. echo "$ac_t""no" 1>&6
  8930. fi
  8931. done
  8932. LDFLAGS="$save_LDFLAGS"
  8933. CFLAGS="$save_CFLAGS"
  8934. fi
  8935. cat >> confdefs.h <<\EOF
  8936. #define HAVE_TCLTK 1
  8937. EOF
  8938. fi # $USE_TCLTK
  8939. TKINCDIR=$TCLINCDIR
  8940. # Done checking Tcl/Tk
  8941. # Enable ODBC option
  8942. echo $ac_n "checking whether to use ODBC""... $ac_c" 1>&6
  8943. echo "configure:11287: checking whether to use ODBC" >&5
  8944. echo "$ac_t"""$with_odbc"" 1>&6
  8945. case "$with_odbc" in
  8946. "no") USE_ODBC= ;;
  8947. "yes") USE_ODBC="1" ;;
  8948. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  8949. esac
  8950. ODBCINC=
  8951. ODBCLIB=
  8952. if test -n "$USE_ODBC"; then
  8953. # With ODBC includes directory
  8954. echo $ac_n "checking for location of ODBC includes""... $ac_c" 1>&6
  8955. echo "configure:11306: checking for location of ODBC includes" >&5
  8956. case "$with_odbc_includes" in
  8957. y | ye | yes | n | no)
  8958. { echo "configure: error: *** You must supply a directory to --with-odbc-includes." 1>&2; exit 1; }
  8959. ;;
  8960. esac
  8961. echo "$ac_t""$with_odbc_includes" 1>&6
  8962. if test -n "$with_odbc_includes" ; then
  8963. for dir in $with_odbc_includes; do
  8964. if test -d "$dir"; then
  8965. ODBCINC="$ODBCINC -I$dir"
  8966. else
  8967. { echo "configure: error: *** ODBC includes directory $dir does not exist." 1>&2; exit 1; }
  8968. fi
  8969. done
  8970. fi
  8971. ac_save_cppflags="$CPPFLAGS"
  8972. CPPFLAGS="$ODBCINC $CPPFLAGS"
  8973. for ac_hdr in sql.h
  8974. do
  8975. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8976. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8977. echo "configure:11332: checking for $ac_hdr" >&5
  8978. cat > conftest.$ac_ext <<EOF
  8979. #line 11335 "configure"
  8980. #include "confdefs.h"
  8981. #include <$ac_hdr>
  8982. EOF
  8983. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8984. { (eval echo configure:11340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8985. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8986. if test -z "$ac_err"; then
  8987. rm -rf conftest*
  8988. eval "ac_cv_header_$ac_safe=yes"
  8989. else
  8990. echo "$ac_err" >&5
  8991. echo "configure: failed program was:" >&5
  8992. cat conftest.$ac_ext >&5
  8993. rm -rf conftest*
  8994. eval "ac_cv_header_$ac_safe=no"
  8995. fi
  8996. rm -f conftest*
  8997. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8998. echo "$ac_t""yes" 1>&6
  8999. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9000. cat >> confdefs.h <<EOF
  9001. #define $ac_tr_hdr 1
  9002. EOF
  9003. else
  9004. echo "$ac_t""no" 1>&6
  9005. { echo "configure: error: *** Unable to locate ODBC includes." 1>&2; exit 1; }
  9006. fi
  9007. done
  9008. CPPFLAGS=$ac_save_cppflags
  9009. # With ODBC library directory
  9010. echo $ac_n "checking for location of ODBC library""... $ac_c" 1>&6
  9011. echo "configure:11374: checking for location of ODBC library" >&5
  9012. case "$with_odbc_libs" in
  9013. y | ye | yes | n | no)
  9014. { echo "configure: error: *** You must supply a directory to --with-odbc-libs." 1>&2; exit 1; }
  9015. ;;
  9016. esac
  9017. echo "$ac_t""$with_odbc_libs" 1>&6
  9018. if test -n "$with_odbc_libs"; then
  9019. for dir in $with_odbc_libs; do
  9020. if test -d "$dir"; then
  9021. ODBCLIB="$ODBCLIB -L$dir"
  9022. else
  9023. { echo "configure: error: *** ODBC library directory $dir does not exist." 1>&2; exit 1; }
  9024. fi
  9025. done
  9026. fi
  9027. ac_save_ldflags="$LDFLAGS"
  9028. LDFLAGS="$ODBCLIB $LDFLAGS"
  9029. echo $ac_n "checking for SQLConnect in -lodbc""... $ac_c" 1>&6
  9030. echo "configure:11399: checking for SQLConnect in -lodbc" >&5
  9031. ac_lib_var=`echo odbc'_'SQLConnect | sed 'y%./+-%__p_%'`
  9032. ac_save_LIBS="$LIBS"
  9033. LIBS="-lodbc $ICONVLIB $LIBS"
  9034. cat > conftest.$ac_ext <<EOF
  9035. #line 11405 "configure"
  9036. #include "confdefs.h"
  9037. /* Override any gcc2 internal prototype to avoid an error. */
  9038. /* We use char because int might match the return type of a gcc2
  9039. builtin and then its argument prototype would still apply. */
  9040. char SQLConnect();
  9041. int main() {
  9042. SQLConnect()
  9043. ; return 0; }
  9044. EOF
  9045. if { (eval echo configure:11416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9046. rm -rf conftest*
  9047. eval "ac_cv_lib_$ac_lib_var=yes"
  9048. else
  9049. echo "configure: failed program was:" >&5
  9050. cat conftest.$ac_ext >&5
  9051. rm -rf conftest*
  9052. eval "ac_cv_lib_$ac_lib_var=no"
  9053. fi
  9054. rm -f conftest*
  9055. LIBS="$ac_save_LIBS"
  9056. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9057. echo "$ac_t""yes" 1>&6
  9058. ODBCLIB="$ODBCLIB -lodbc "
  9059. else
  9060. echo "$ac_t""no" 1>&6
  9061. LDFLAGS=${ac_save_ldflags}
  9062. ac_save_ldflags="$LDFLAGS"
  9063. LDFLAGS="$ODBCLIB $LDFLAGS"
  9064. echo $ac_n "checking for SQLConnect in -liodbc""... $ac_c" 1>&6
  9065. echo "configure:11441: checking for SQLConnect in -liodbc" >&5
  9066. ac_lib_var=`echo iodbc'_'SQLConnect | sed 'y%./+-%__p_%'`
  9067. ac_save_LIBS="$LIBS"
  9068. LIBS="-liodbc $LIBS"
  9069. cat > conftest.$ac_ext <<EOF
  9070. #line 11447 "configure"
  9071. #include "confdefs.h"
  9072. /* Override any gcc2 internal prototype to avoid an error. */
  9073. /* We use char because int might match the return type of a gcc2
  9074. builtin and then its argument prototype would still apply. */
  9075. char SQLConnect();
  9076. int main() {
  9077. SQLConnect()
  9078. ; return 0; }
  9079. EOF
  9080. if { (eval echo configure:11458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9081. rm -rf conftest*
  9082. eval "ac_cv_lib_$ac_lib_var=yes"
  9083. else
  9084. echo "configure: failed program was:" >&5
  9085. cat conftest.$ac_ext >&5
  9086. rm -rf conftest*
  9087. eval "ac_cv_lib_$ac_lib_var=no"
  9088. fi
  9089. rm -f conftest*
  9090. LIBS="$ac_save_LIBS"
  9091. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9092. echo "$ac_t""yes" 1>&6
  9093. ODBCLIB="$ODBCLIB -liodbc "
  9094. else
  9095. echo "$ac_t""no" 1>&6
  9096. LDFLAGS=${ac_save_ldflags}
  9097. ac_save_cflags="$CFLAGS"
  9098. CFLAGS="$CFLAGS $ODBCINC"
  9099. ac_save_ldflags="$LDFLAGS"
  9100. ac_save_libs="$LIBS"
  9101. echo $ac_n "checking for ODBC library""... $ac_c" 1>&6
  9102. echo "configure:11483: checking for ODBC library" >&5
  9103. LDFLAGS="$ODBCLIB $LDFLAGS"
  9104. LIBS="-lodbc32 "
  9105. cat > conftest.$ac_ext <<EOF
  9106. #line 11487 "configure"
  9107. #include "confdefs.h"
  9108. #include <windows.h>
  9109. #include <sql.h>
  9110. int main() {
  9111. SQLAllocEnv((SQLHENV *)0);
  9112. ; return 0; }
  9113. EOF
  9114. if { (eval echo configure:11495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9115. rm -rf conftest*
  9116. echo "$ac_t""found" 1>&6
  9117. ODBCLIB="$ODBCLIB -lodbc32 "
  9118. else
  9119. echo "configure: failed program was:" >&5
  9120. cat conftest.$ac_ext >&5
  9121. rm -rf conftest*
  9122. { echo "configure: error: *** Unable to locate ODBC library." 1>&2; exit 1; }
  9123. fi
  9124. rm -f conftest*
  9125. LIBS=${ac_save_libs}
  9126. LDFLAGS=${ac_save_ldflags}
  9127. CFLAGS="${ac_save_cflags}"
  9128. fi
  9129. LDFLAGS=${ac_save_ldflags}
  9130. fi
  9131. LDFLAGS=${ac_save_ldflags}
  9132. fi # $USE_ODBC
  9133. # Done checking ODBC
  9134. # Enable FFTW option
  9135. echo $ac_n "checking whether to use FFTW""... $ac_c" 1>&6
  9136. echo "configure:11544: checking whether to use FFTW" >&5
  9137. echo "$ac_t"""$with_fftw"" 1>&6
  9138. case "$with_fftw" in
  9139. "no") USE_FFTW= ;;
  9140. "yes") USE_FFTW="1" ;;
  9141. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9142. esac
  9143. FFTWINC=
  9144. FFTWLIB=
  9145. if test -n "$USE_FFTW"; then
  9146. # With FFTW includes directory
  9147. echo $ac_n "checking for location of FFTW includes""... $ac_c" 1>&6
  9148. echo "configure:11563: checking for location of FFTW includes" >&5
  9149. case "$with_fftw_includes" in
  9150. y | ye | yes | n | no)
  9151. { echo "configure: error: *** You must supply a directory to --with-fftw-includes." 1>&2; exit 1; }
  9152. ;;
  9153. esac
  9154. echo "$ac_t""$with_fftw_includes" 1>&6
  9155. if test -n "$with_fftw_includes" ; then
  9156. for dir in $with_fftw_includes; do
  9157. if test -d "$dir"; then
  9158. FFTWINC="$FFTWINC -I$dir"
  9159. else
  9160. { echo "configure: error: *** FFTW includes directory $dir does not exist." 1>&2; exit 1; }
  9161. fi
  9162. done
  9163. fi
  9164. ac_save_cppflags="$CPPFLAGS"
  9165. CPPFLAGS="$FFTWINC $CPPFLAGS"
  9166. for ac_hdr in fftw3.h
  9167. do
  9168. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9169. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9170. echo "configure:11589: checking for $ac_hdr" >&5
  9171. cat > conftest.$ac_ext <<EOF
  9172. #line 11592 "configure"
  9173. #include "confdefs.h"
  9174. #include <$ac_hdr>
  9175. EOF
  9176. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9177. { (eval echo configure:11597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9178. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9179. if test -z "$ac_err"; then
  9180. rm -rf conftest*
  9181. eval "ac_cv_header_$ac_safe=yes"
  9182. else
  9183. echo "$ac_err" >&5
  9184. echo "configure: failed program was:" >&5
  9185. cat conftest.$ac_ext >&5
  9186. rm -rf conftest*
  9187. eval "ac_cv_header_$ac_safe=no"
  9188. fi
  9189. rm -f conftest*
  9190. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9191. echo "$ac_t""yes" 1>&6
  9192. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9193. cat >> confdefs.h <<EOF
  9194. #define $ac_tr_hdr 1
  9195. EOF
  9196. else
  9197. echo "$ac_t""no" 1>&6
  9198. ac_save_cppflags="$CPPFLAGS"
  9199. CPPFLAGS=" $CPPFLAGS"
  9200. for ac_hdr in fftw.h
  9201. do
  9202. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9203. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9204. echo "configure:11625: checking for $ac_hdr" >&5
  9205. cat > conftest.$ac_ext <<EOF
  9206. #line 11628 "configure"
  9207. #include "confdefs.h"
  9208. #include <$ac_hdr>
  9209. EOF
  9210. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9211. { (eval echo configure:11633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9212. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9213. if test -z "$ac_err"; then
  9214. rm -rf conftest*
  9215. eval "ac_cv_header_$ac_safe=yes"
  9216. else
  9217. echo "$ac_err" >&5
  9218. echo "configure: failed program was:" >&5
  9219. cat conftest.$ac_ext >&5
  9220. rm -rf conftest*
  9221. eval "ac_cv_header_$ac_safe=no"
  9222. fi
  9223. rm -f conftest*
  9224. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9225. echo "$ac_t""yes" 1>&6
  9226. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9227. cat >> confdefs.h <<EOF
  9228. #define $ac_tr_hdr 1
  9229. EOF
  9230. else
  9231. echo "$ac_t""no" 1>&6
  9232. ac_save_cppflags="$CPPFLAGS"
  9233. CPPFLAGS=" $CPPFLAGS"
  9234. for ac_hdr in dfftw.h
  9235. do
  9236. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9237. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9238. echo "configure:11661: checking for $ac_hdr" >&5
  9239. cat > conftest.$ac_ext <<EOF
  9240. #line 11664 "configure"
  9241. #include "confdefs.h"
  9242. #include <$ac_hdr>
  9243. EOF
  9244. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9245. { (eval echo configure:11669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9246. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9247. if test -z "$ac_err"; then
  9248. rm -rf conftest*
  9249. eval "ac_cv_header_$ac_safe=yes"
  9250. else
  9251. echo "$ac_err" >&5
  9252. echo "configure: failed program was:" >&5
  9253. cat conftest.$ac_ext >&5
  9254. rm -rf conftest*
  9255. eval "ac_cv_header_$ac_safe=no"
  9256. fi
  9257. rm -f conftest*
  9258. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9259. echo "$ac_t""yes" 1>&6
  9260. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9261. cat >> confdefs.h <<EOF
  9262. #define $ac_tr_hdr 1
  9263. EOF
  9264. else
  9265. echo "$ac_t""no" 1>&6
  9266. { echo "configure: error: *** Unable to locate FFTW includes." 1>&2; exit 1; }
  9267. fi
  9268. done
  9269. CPPFLAGS=$ac_save_cppflags
  9270. fi
  9271. done
  9272. CPPFLAGS=$ac_save_cppflags
  9273. fi
  9274. done
  9275. CPPFLAGS=$ac_save_cppflags
  9276. # With FFTW library directory
  9277. echo $ac_n "checking for location of FFTW library""... $ac_c" 1>&6
  9278. echo "configure:11715: checking for location of FFTW library" >&5
  9279. case "$with_fftw_libs" in
  9280. y | ye | yes | n | no)
  9281. { echo "configure: error: *** You must supply a directory to --with-fftw-libs." 1>&2; exit 1; }
  9282. ;;
  9283. esac
  9284. echo "$ac_t""$with_fftw_libs" 1>&6
  9285. if test -n "$with_fftw_libs"; then
  9286. for dir in $with_fftw_libs; do
  9287. if test -d "$dir"; then
  9288. FFTWLIB="$FFTWLIB -L$dir"
  9289. else
  9290. { echo "configure: error: *** FFTW library directory $dir does not exist." 1>&2; exit 1; }
  9291. fi
  9292. done
  9293. fi
  9294. ac_save_ldflags="$LDFLAGS"
  9295. LDFLAGS="$FFTWLIB $LDFLAGS"
  9296. echo $ac_n "checking for fftw_execute in -lfftw3""... $ac_c" 1>&6
  9297. echo "configure:11740: checking for fftw_execute in -lfftw3" >&5
  9298. ac_lib_var=`echo fftw3'_'fftw_execute | sed 'y%./+-%__p_%'`
  9299. ac_save_LIBS="$LIBS"
  9300. LIBS="-lfftw3 $MATHLIB $LIBS"
  9301. cat > conftest.$ac_ext <<EOF
  9302. #line 11746 "configure"
  9303. #include "confdefs.h"
  9304. /* Override any gcc2 internal prototype to avoid an error. */
  9305. /* We use char because int might match the return type of a gcc2
  9306. builtin and then its argument prototype would still apply. */
  9307. char fftw_execute();
  9308. int main() {
  9309. fftw_execute()
  9310. ; return 0; }
  9311. EOF
  9312. if { (eval echo configure:11757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9313. rm -rf conftest*
  9314. eval "ac_cv_lib_$ac_lib_var=yes"
  9315. else
  9316. echo "configure: failed program was:" >&5
  9317. cat conftest.$ac_ext >&5
  9318. rm -rf conftest*
  9319. eval "ac_cv_lib_$ac_lib_var=no"
  9320. fi
  9321. rm -f conftest*
  9322. LIBS="$ac_save_LIBS"
  9323. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9324. echo "$ac_t""yes" 1>&6
  9325. FFTWLIB="$FFTWLIB -lfftw3 $MATHLIB"
  9326. else
  9327. echo "$ac_t""no" 1>&6
  9328. LDFLAGS=${ac_save_ldflags}
  9329. ac_save_ldflags="$LDFLAGS"
  9330. LDFLAGS="$FFTWLIB $LDFLAGS"
  9331. echo $ac_n "checking for fftwnd_one in -lfftw""... $ac_c" 1>&6
  9332. echo "configure:11782: checking for fftwnd_one in -lfftw" >&5
  9333. ac_lib_var=`echo fftw'_'fftwnd_one | sed 'y%./+-%__p_%'`
  9334. ac_save_LIBS="$LIBS"
  9335. LIBS="-lfftw $MATHLIB $LIBS"
  9336. cat > conftest.$ac_ext <<EOF
  9337. #line 11788 "configure"
  9338. #include "confdefs.h"
  9339. /* Override any gcc2 internal prototype to avoid an error. */
  9340. /* We use char because int might match the return type of a gcc2
  9341. builtin and then its argument prototype would still apply. */
  9342. char fftwnd_one();
  9343. int main() {
  9344. fftwnd_one()
  9345. ; return 0; }
  9346. EOF
  9347. if { (eval echo configure:11799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9348. rm -rf conftest*
  9349. eval "ac_cv_lib_$ac_lib_var=yes"
  9350. else
  9351. echo "configure: failed program was:" >&5
  9352. cat conftest.$ac_ext >&5
  9353. rm -rf conftest*
  9354. eval "ac_cv_lib_$ac_lib_var=no"
  9355. fi
  9356. rm -f conftest*
  9357. LIBS="$ac_save_LIBS"
  9358. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9359. echo "$ac_t""yes" 1>&6
  9360. FFTWLIB="$FFTWLIB -lfftw $MATHLIB"
  9361. else
  9362. echo "$ac_t""no" 1>&6
  9363. LDFLAGS=${ac_save_ldflags}
  9364. ac_save_ldflags="$LDFLAGS"
  9365. LDFLAGS="$FFTWLIB $LDFLAGS"
  9366. echo $ac_n "checking for fftwnd_one in -ldfftw""... $ac_c" 1>&6
  9367. echo "configure:11824: checking for fftwnd_one in -ldfftw" >&5
  9368. ac_lib_var=`echo dfftw'_'fftwnd_one | sed 'y%./+-%__p_%'`
  9369. ac_save_LIBS="$LIBS"
  9370. LIBS="-ldfftw $MATHLIB $LIBS"
  9371. cat > conftest.$ac_ext <<EOF
  9372. #line 11830 "configure"
  9373. #include "confdefs.h"
  9374. /* Override any gcc2 internal prototype to avoid an error. */
  9375. /* We use char because int might match the return type of a gcc2
  9376. builtin and then its argument prototype would still apply. */
  9377. char fftwnd_one();
  9378. int main() {
  9379. fftwnd_one()
  9380. ; return 0; }
  9381. EOF
  9382. if { (eval echo configure:11841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9383. rm -rf conftest*
  9384. eval "ac_cv_lib_$ac_lib_var=yes"
  9385. else
  9386. echo "configure: failed program was:" >&5
  9387. cat conftest.$ac_ext >&5
  9388. rm -rf conftest*
  9389. eval "ac_cv_lib_$ac_lib_var=no"
  9390. fi
  9391. rm -f conftest*
  9392. LIBS="$ac_save_LIBS"
  9393. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9394. echo "$ac_t""yes" 1>&6
  9395. FFTWLIB="$FFTWLIB -ldfftw $MATHLIB"
  9396. else
  9397. echo "$ac_t""no" 1>&6
  9398. LDFLAGS=${ac_save_ldflags}
  9399. { echo "configure: error: *** Unable to locate FFTW library." 1>&2; exit 1; }
  9400. fi
  9401. LDFLAGS=${ac_save_ldflags}
  9402. fi
  9403. LDFLAGS=${ac_save_ldflags}
  9404. fi
  9405. LDFLAGS=${ac_save_ldflags}
  9406. fi # $USE_FFTW
  9407. # Done checking FFTW
  9408. # Enable BLAS option
  9409. echo $ac_n "checking whether to use BLAS""... $ac_c" 1>&6
  9410. echo "configure:11898: checking whether to use BLAS" >&5
  9411. echo "$ac_t"""$with_blas"" 1>&6
  9412. case "$with_blas" in
  9413. "no") USE_BLAS= ;;
  9414. "yes") USE_BLAS="1" ;;
  9415. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9416. esac
  9417. BLASLIB=
  9418. BLASINC=
  9419. if test -n "$USE_BLAS"; then
  9420. # With BLAS includes directory
  9421. # BLAS doesn't have includes (FORTRAN library)
  9422. # With BLAS library directory
  9423. echo $ac_n "checking for location of BLAS includes""... $ac_c" 1>&6
  9424. echo "configure:11919: checking for location of BLAS includes" >&5
  9425. case "$with_blas_includes" in
  9426. y | ye | yes | n | no)
  9427. { echo "configure: error: *** You must supply a directory to --with-blas-includes." 1>&2; exit 1; }
  9428. ;;
  9429. esac
  9430. echo "$ac_t""$with_blas_includes" 1>&6
  9431. if test -n "$with_blas_includes" ; then
  9432. for dir in $with_blas_includes; do
  9433. if test -d "$dir"; then
  9434. BLASINC="$BLASINC -I$dir"
  9435. else
  9436. { echo "configure: error: *** BLAS includes directory $dir does not exist." 1>&2; exit 1; }
  9437. fi
  9438. done
  9439. fi
  9440. echo $ac_n "checking for location of BLAS library""... $ac_c" 1>&6
  9441. echo "configure:11939: checking for location of BLAS library" >&5
  9442. case "$with_blas_libs" in
  9443. y | ye | yes | n | no)
  9444. { echo "configure: error: *** You must supply a directory to --with-blas-libs." 1>&2; exit 1; }
  9445. ;;
  9446. esac
  9447. echo "$ac_t""$with_blas_libs" 1>&6
  9448. if test -n "$with_blas_libs"; then
  9449. for dir in $with_blas_libs; do
  9450. if test -d "$dir"; then
  9451. BLASLIB="$BLASLIB -L$dir"
  9452. else
  9453. { echo "configure: error: *** BLAS library directory $dir does not exist." 1>&2; exit 1; }
  9454. fi
  9455. done
  9456. fi
  9457. # See if cblas.h exists (CBLAS,ATLAS,others)
  9458. save_CPPFLAGS="$CPPFLAGS"
  9459. CPPFLAGS="$BLASINC $CPPFLAGS"
  9460. for ac_hdr in cblas.h
  9461. do
  9462. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9463. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9464. echo "configure:11965: checking for $ac_hdr" >&5
  9465. cat > conftest.$ac_ext <<EOF
  9466. #line 11968 "configure"
  9467. #include "confdefs.h"
  9468. #include <$ac_hdr>
  9469. EOF
  9470. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9471. { (eval echo configure:11973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9472. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9473. if test -z "$ac_err"; then
  9474. rm -rf conftest*
  9475. eval "ac_cv_header_$ac_safe=yes"
  9476. else
  9477. echo "$ac_err" >&5
  9478. echo "configure: failed program was:" >&5
  9479. cat conftest.$ac_ext >&5
  9480. rm -rf conftest*
  9481. eval "ac_cv_header_$ac_safe=no"
  9482. fi
  9483. rm -f conftest*
  9484. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9485. echo "$ac_t""yes" 1>&6
  9486. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9487. cat >> confdefs.h <<EOF
  9488. #define $ac_tr_hdr 1
  9489. EOF
  9490. else
  9491. echo "$ac_t""no" 1>&6
  9492. fi
  9493. done
  9494. CPPFLAGS="$save_CPPFLAGS"
  9495. ac_save_ldflags="$LDFLAGS"
  9496. LDFLAGS="$BLASLIB $LDFLAGS"
  9497. echo $ac_n "checking for dnrm2_ in -lblas""... $ac_c" 1>&6
  9498. echo "configure:12008: checking for dnrm2_ in -lblas" >&5
  9499. ac_lib_var=`echo blas'_'dnrm2_ | sed 'y%./+-%__p_%'`
  9500. ac_save_LIBS="$LIBS"
  9501. LIBS="-lblas $MATHLIB $LIBS"
  9502. cat > conftest.$ac_ext <<EOF
  9503. #line 12014 "configure"
  9504. #include "confdefs.h"
  9505. /* Override any gcc2 internal prototype to avoid an error. */
  9506. /* We use char because int might match the return type of a gcc2
  9507. builtin and then its argument prototype would still apply. */
  9508. char dnrm2_();
  9509. int main() {
  9510. dnrm2_()
  9511. ; return 0; }
  9512. EOF
  9513. if { (eval echo configure:12025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9514. rm -rf conftest*
  9515. eval "ac_cv_lib_$ac_lib_var=yes"
  9516. else
  9517. echo "configure: failed program was:" >&5
  9518. cat conftest.$ac_ext >&5
  9519. rm -rf conftest*
  9520. eval "ac_cv_lib_$ac_lib_var=no"
  9521. fi
  9522. rm -f conftest*
  9523. LIBS="$ac_save_LIBS"
  9524. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9525. echo "$ac_t""yes" 1>&6
  9526. BLASLIB="$BLASLIB -lblas "
  9527. else
  9528. echo "$ac_t""no" 1>&6
  9529. echo $ac_n "checking for dnrm2_ in -lblas""... $ac_c" 1>&6
  9530. echo "configure:12044: checking for dnrm2_ in -lblas" >&5
  9531. ac_lib_var=`echo blas'_'dnrm2_ | sed 'y%./+-%__p_%'`
  9532. ac_save_LIBS="$LIBS"
  9533. LIBS="-lblas $MATHLIB -lg2c $LIBS"
  9534. cat > conftest.$ac_ext <<EOF
  9535. #line 12050 "configure"
  9536. #include "confdefs.h"
  9537. /* Override any gcc2 internal prototype to avoid an error. */
  9538. /* We use char because int might match the return type of a gcc2
  9539. builtin and then its argument prototype would still apply. */
  9540. char dnrm2_();
  9541. int main() {
  9542. dnrm2_()
  9543. ; return 0; }
  9544. EOF
  9545. if { (eval echo configure:12061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9546. rm -rf conftest*
  9547. eval "ac_cv_lib_$ac_lib_var=yes"
  9548. else
  9549. echo "configure: failed program was:" >&5
  9550. cat conftest.$ac_ext >&5
  9551. rm -rf conftest*
  9552. eval "ac_cv_lib_$ac_lib_var=no"
  9553. fi
  9554. rm -f conftest*
  9555. LIBS="$ac_save_LIBS"
  9556. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9557. echo "$ac_t""yes" 1>&6
  9558. BLASLIB="$BLASLIB -lblas -lg2c"
  9559. else
  9560. echo "$ac_t""no" 1>&6
  9561. LDFLAGS=${ac_save_ldflags}
  9562. { echo "configure: error: *** Unable to locate BLAS library." 1>&2; exit 1; }
  9563. fi
  9564. fi
  9565. LDFLAGS=${ac_save_ldflags}
  9566. blas_ok=no
  9567. # Check for ATLAS
  9568. save_LDFLAGS="$LDFLAGS"
  9569. LDFLAGS="$BLASLIB $LDFLAGS"
  9570. echo $ac_n "checking for ATL_xerbla in -latlas""... $ac_c" 1>&6
  9571. echo "configure:12105: checking for ATL_xerbla in -latlas" >&5
  9572. ac_lib_var=`echo atlas'_'ATL_xerbla | sed 'y%./+-%__p_%'`
  9573. ac_save_LIBS="$LIBS"
  9574. LIBS="-latlas $LIBS"
  9575. cat > conftest.$ac_ext <<EOF
  9576. #line 12111 "configure"
  9577. #include "confdefs.h"
  9578. /* Override any gcc2 internal prototype to avoid an error. */
  9579. /* We use char because int might match the return type of a gcc2
  9580. builtin and then its argument prototype would still apply. */
  9581. char ATL_xerbla();
  9582. int main() {
  9583. ATL_xerbla()
  9584. ; return 0; }
  9585. EOF
  9586. if { (eval echo configure:12122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9587. rm -rf conftest*
  9588. eval "ac_cv_lib_$ac_lib_var=yes"
  9589. else
  9590. echo "configure: failed program was:" >&5
  9591. cat conftest.$ac_ext >&5
  9592. rm -rf conftest*
  9593. eval "ac_cv_lib_$ac_lib_var=no"
  9594. fi
  9595. rm -f conftest*
  9596. LIBS="$ac_save_LIBS"
  9597. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9598. echo "$ac_t""yes" 1>&6
  9599. echo $ac_n "checking for sgemm_ in -lf77blas""... $ac_c" 1>&6
  9600. echo "configure:12137: checking for sgemm_ in -lf77blas" >&5
  9601. ac_lib_var=`echo f77blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  9602. ac_save_LIBS="$LIBS"
  9603. LIBS="-lf77blas -latlas $LIBS"
  9604. cat > conftest.$ac_ext <<EOF
  9605. #line 12143 "configure"
  9606. #include "confdefs.h"
  9607. /* Override any gcc2 internal prototype to avoid an error. */
  9608. /* We use char because int might match the return type of a gcc2
  9609. builtin and then its argument prototype would still apply. */
  9610. char sgemm_();
  9611. int main() {
  9612. sgemm_()
  9613. ; return 0; }
  9614. EOF
  9615. if { (eval echo configure:12154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9616. rm -rf conftest*
  9617. eval "ac_cv_lib_$ac_lib_var=yes"
  9618. else
  9619. echo "configure: failed program was:" >&5
  9620. cat conftest.$ac_ext >&5
  9621. rm -rf conftest*
  9622. eval "ac_cv_lib_$ac_lib_var=no"
  9623. fi
  9624. rm -f conftest*
  9625. LIBS="$ac_save_LIBS"
  9626. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9627. echo "$ac_t""yes" 1>&6
  9628. echo $ac_n "checking for cblas_dgemm in -lcblas""... $ac_c" 1>&6
  9629. echo "configure:12169: checking for cblas_dgemm in -lcblas" >&5
  9630. ac_lib_var=`echo cblas'_'cblas_dgemm | sed 'y%./+-%__p_%'`
  9631. ac_save_LIBS="$LIBS"
  9632. LIBS="-lcblas -lf77blas -latlas $LIBS"
  9633. cat > conftest.$ac_ext <<EOF
  9634. #line 12175 "configure"
  9635. #include "confdefs.h"
  9636. /* Override any gcc2 internal prototype to avoid an error. */
  9637. /* We use char because int might match the return type of a gcc2
  9638. builtin and then its argument prototype would still apply. */
  9639. char cblas_dgemm();
  9640. int main() {
  9641. cblas_dgemm()
  9642. ; return 0; }
  9643. EOF
  9644. if { (eval echo configure:12186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9645. rm -rf conftest*
  9646. eval "ac_cv_lib_$ac_lib_var=yes"
  9647. else
  9648. echo "configure: failed program was:" >&5
  9649. cat conftest.$ac_ext >&5
  9650. rm -rf conftest*
  9651. eval "ac_cv_lib_$ac_lib_var=no"
  9652. fi
  9653. rm -f conftest*
  9654. LIBS="$ac_save_LIBS"
  9655. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9656. echo "$ac_t""yes" 1>&6
  9657. blas_ok=yes; BLASLIB="-lcblas -lf77blas -latlas"
  9658. else
  9659. echo "$ac_t""no" 1>&6
  9660. fi
  9661. else
  9662. echo "$ac_t""no" 1>&6
  9663. fi
  9664. else
  9665. echo "$ac_t""no" 1>&6
  9666. fi
  9667. LDFLAGS="$save_LDFLAGS"
  9668. # Do we have ATLAS?
  9669. if test $blas_ok = yes; then
  9670. cat >> confdefs.h <<\EOF
  9671. #define HAVE_LIBATLAS 1
  9672. EOF
  9673. fi
  9674. # BLAS in Apple vecLib framework? (Mac OS-X)
  9675. # not dependent on APP build
  9676. #if test -n "$MACOSX_APP"; then
  9677. if test $blas_ok = no; then
  9678. vlib_flags="-framework vecLib"
  9679. save_LIBS="$LIBS"
  9680. LIBS="$vlib_flags $LIBS"
  9681. echo $ac_n "checking for sgemm in $vlib_flags""... $ac_c" 1>&6
  9682. echo "configure:12232: checking for sgemm in $vlib_flags" >&5
  9683. cat > conftest.$ac_ext <<EOF
  9684. #line 12234 "configure"
  9685. #include "confdefs.h"
  9686. int main() {
  9687. sgemm
  9688. ; return 0; }
  9689. EOF
  9690. if { (eval echo configure:12241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9691. rm -rf conftest*
  9692. blas_ok=yes; BLASLIB="$vlib_flags"
  9693. else
  9694. echo "configure: failed program was:" >&5
  9695. cat conftest.$ac_ext >&5
  9696. rm -rf conftest*
  9697. BLASLIB=""
  9698. fi
  9699. rm -f conftest*
  9700. echo "$ac_t""$blas_ok" 1>&6
  9701. LIBS="$save_LIBS"
  9702. fi
  9703. #fi # $MACOSX_APP
  9704. # BLAS in PhiPACK libraries? (requires generic BLAS, too)
  9705. if test $blas_ok = no; then
  9706. echo $ac_n "checking for sgemm_ in -lblas""... $ac_c" 1>&6
  9707. echo "configure:12259: checking for sgemm_ in -lblas" >&5
  9708. ac_lib_var=`echo blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  9709. ac_save_LIBS="$LIBS"
  9710. LIBS="-lblas $LIBS"
  9711. cat > conftest.$ac_ext <<EOF
  9712. #line 12265 "configure"
  9713. #include "confdefs.h"
  9714. /* Override any gcc2 internal prototype to avoid an error. */
  9715. /* We use char because int might match the return type of a gcc2
  9716. builtin and then its argument prototype would still apply. */
  9717. char sgemm_();
  9718. int main() {
  9719. sgemm_()
  9720. ; return 0; }
  9721. EOF
  9722. if { (eval echo configure:12276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9723. rm -rf conftest*
  9724. eval "ac_cv_lib_$ac_lib_var=yes"
  9725. else
  9726. echo "configure: failed program was:" >&5
  9727. cat conftest.$ac_ext >&5
  9728. rm -rf conftest*
  9729. eval "ac_cv_lib_$ac_lib_var=no"
  9730. fi
  9731. rm -f conftest*
  9732. LIBS="$ac_save_LIBS"
  9733. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9734. echo "$ac_t""yes" 1>&6
  9735. echo $ac_n "checking for dgemm_ in -ldgemm""... $ac_c" 1>&6
  9736. echo "configure:12291: checking for dgemm_ in -ldgemm" >&5
  9737. ac_lib_var=`echo dgemm'_'dgemm_ | sed 'y%./+-%__p_%'`
  9738. ac_save_LIBS="$LIBS"
  9739. LIBS="-ldgemm -lblas $LIBS"
  9740. cat > conftest.$ac_ext <<EOF
  9741. #line 12297 "configure"
  9742. #include "confdefs.h"
  9743. /* Override any gcc2 internal prototype to avoid an error. */
  9744. /* We use char because int might match the return type of a gcc2
  9745. builtin and then its argument prototype would still apply. */
  9746. char dgemm_();
  9747. int main() {
  9748. dgemm_()
  9749. ; return 0; }
  9750. EOF
  9751. if { (eval echo configure:12308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9752. rm -rf conftest*
  9753. eval "ac_cv_lib_$ac_lib_var=yes"
  9754. else
  9755. echo "configure: failed program was:" >&5
  9756. cat conftest.$ac_ext >&5
  9757. rm -rf conftest*
  9758. eval "ac_cv_lib_$ac_lib_var=no"
  9759. fi
  9760. rm -f conftest*
  9761. LIBS="$ac_save_LIBS"
  9762. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9763. echo "$ac_t""yes" 1>&6
  9764. echo $ac_n "checking for sgemm_ in -lsgemm""... $ac_c" 1>&6
  9765. echo "configure:12323: checking for sgemm_ in -lsgemm" >&5
  9766. ac_lib_var=`echo sgemm'_'sgemm_ | sed 'y%./+-%__p_%'`
  9767. ac_save_LIBS="$LIBS"
  9768. LIBS="-lsgemm -lblas $LIBS"
  9769. cat > conftest.$ac_ext <<EOF
  9770. #line 12329 "configure"
  9771. #include "confdefs.h"
  9772. /* Override any gcc2 internal prototype to avoid an error. */
  9773. /* We use char because int might match the return type of a gcc2
  9774. builtin and then its argument prototype would still apply. */
  9775. char sgemm_();
  9776. int main() {
  9777. sgemm_()
  9778. ; return 0; }
  9779. EOF
  9780. if { (eval echo configure:12340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9781. rm -rf conftest*
  9782. eval "ac_cv_lib_$ac_lib_var=yes"
  9783. else
  9784. echo "configure: failed program was:" >&5
  9785. cat conftest.$ac_ext >&5
  9786. rm -rf conftest*
  9787. eval "ac_cv_lib_$ac_lib_var=no"
  9788. fi
  9789. rm -f conftest*
  9790. LIBS="$ac_save_LIBS"
  9791. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9792. echo "$ac_t""yes" 1>&6
  9793. blas_ok=yes; BLASLIB="-lsgemm -ldgemm -lblas"
  9794. else
  9795. echo "$ac_t""no" 1>&6
  9796. fi
  9797. else
  9798. echo "$ac_t""no" 1>&6
  9799. fi
  9800. else
  9801. echo "$ac_t""no" 1>&6
  9802. fi
  9803. fi
  9804. # BLAS in Sun Performance library?
  9805. if test $blas_ok = no; then
  9806. if test "x$GCC" != xyes; then # only works with Sun CC
  9807. echo $ac_n "checking for acosp in -lsunmath""... $ac_c" 1>&6
  9808. echo "configure:12374: checking for acosp in -lsunmath" >&5
  9809. ac_lib_var=`echo sunmath'_'acosp | sed 'y%./+-%__p_%'`
  9810. ac_save_LIBS="$LIBS"
  9811. LIBS="-lsunmath $LIBS"
  9812. cat > conftest.$ac_ext <<EOF
  9813. #line 12380 "configure"
  9814. #include "confdefs.h"
  9815. /* Override any gcc2 internal prototype to avoid an error. */
  9816. /* We use char because int might match the return type of a gcc2
  9817. builtin and then its argument prototype would still apply. */
  9818. char acosp();
  9819. int main() {
  9820. acosp()
  9821. ; return 0; }
  9822. EOF
  9823. if { (eval echo configure:12391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9824. rm -rf conftest*
  9825. eval "ac_cv_lib_$ac_lib_var=yes"
  9826. else
  9827. echo "configure: failed program was:" >&5
  9828. cat conftest.$ac_ext >&5
  9829. rm -rf conftest*
  9830. eval "ac_cv_lib_$ac_lib_var=no"
  9831. fi
  9832. rm -f conftest*
  9833. LIBS="$ac_save_LIBS"
  9834. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9835. echo "$ac_t""yes" 1>&6
  9836. echo $ac_n "checking for sgemm_ in -lsunperf""... $ac_c" 1>&6
  9837. echo "configure:12406: checking for sgemm_ in -lsunperf" >&5
  9838. ac_lib_var=`echo sunperf'_'sgemm_ | sed 'y%./+-%__p_%'`
  9839. ac_save_LIBS="$LIBS"
  9840. LIBS="-lsunperf -lsunmath $LIBS"
  9841. cat > conftest.$ac_ext <<EOF
  9842. #line 12412 "configure"
  9843. #include "confdefs.h"
  9844. /* Override any gcc2 internal prototype to avoid an error. */
  9845. /* We use char because int might match the return type of a gcc2
  9846. builtin and then its argument prototype would still apply. */
  9847. char sgemm_();
  9848. int main() {
  9849. sgemm_()
  9850. ; return 0; }
  9851. EOF
  9852. if { (eval echo configure:12423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9853. rm -rf conftest*
  9854. eval "ac_cv_lib_$ac_lib_var=yes"
  9855. else
  9856. echo "configure: failed program was:" >&5
  9857. cat conftest.$ac_ext >&5
  9858. rm -rf conftest*
  9859. eval "ac_cv_lib_$ac_lib_var=no"
  9860. fi
  9861. rm -f conftest*
  9862. LIBS="$ac_save_LIBS"
  9863. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9864. echo "$ac_t""yes" 1>&6
  9865. blas_ok=yes; BLASLIB="-xlic_lib=sunperf -lsunmath"
  9866. else
  9867. echo "$ac_t""no" 1>&6
  9868. fi
  9869. else
  9870. echo "$ac_t""no" 1>&6
  9871. fi
  9872. fi
  9873. fi
  9874. # Generic BLAS library
  9875. if test $blas_ok = no; then
  9876. echo $ac_n "checking for sgemm_ in -lblas""... $ac_c" 1>&6
  9877. echo "configure:12453: checking for sgemm_ in -lblas" >&5
  9878. ac_lib_var=`echo blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  9879. ac_save_LIBS="$LIBS"
  9880. LIBS="-lblas $LIBS"
  9881. cat > conftest.$ac_ext <<EOF
  9882. #line 12459 "configure"
  9883. #include "confdefs.h"
  9884. /* Override any gcc2 internal prototype to avoid an error. */
  9885. /* We use char because int might match the return type of a gcc2
  9886. builtin and then its argument prototype would still apply. */
  9887. char sgemm_();
  9888. int main() {
  9889. sgemm_()
  9890. ; return 0; }
  9891. EOF
  9892. if { (eval echo configure:12470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9893. rm -rf conftest*
  9894. eval "ac_cv_lib_$ac_lib_var=yes"
  9895. else
  9896. echo "configure: failed program was:" >&5
  9897. cat conftest.$ac_ext >&5
  9898. rm -rf conftest*
  9899. eval "ac_cv_lib_$ac_lib_var=no"
  9900. fi
  9901. rm -f conftest*
  9902. LIBS="$ac_save_LIBS"
  9903. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9904. echo "$ac_t""yes" 1>&6
  9905. blas_ok=yes; BLASLIB="-lblas"
  9906. else
  9907. echo "$ac_t""no" 1>&6
  9908. fi
  9909. fi
  9910. if test $blas_ok = yes; then
  9911. cat >> confdefs.h <<\EOF
  9912. #define HAVE_LIBBLAS 1
  9913. EOF
  9914. fi
  9915. fi # $USE_BLAS
  9916. # Done checking BLAS
  9917. # Enable LAPACK option
  9918. echo $ac_n "checking whether to use LAPACK""... $ac_c" 1>&6
  9919. echo "configure:12509: checking whether to use LAPACK" >&5
  9920. echo "$ac_t"""$with_lapack"" 1>&6
  9921. case "$with_lapack" in
  9922. "no") USE_LAPACK= ;;
  9923. "yes") USE_LAPACK="1" ;;
  9924. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9925. esac
  9926. LAPACKLIB=
  9927. LAPACKINC=
  9928. # LAPACK is useless without BLAS
  9929. if test -n "$USE_BLAS"; then
  9930. if test -n "$USE_LAPACK"; then
  9931. # With LAPACK includes directory
  9932. # LAPACK doesn't have includes (FORTRAN library)
  9933. # With LAPACK library directory
  9934. lapack_ok=no
  9935. echo $ac_n "checking for location of LAPACK includes""... $ac_c" 1>&6
  9936. echo "configure:12534: checking for location of LAPACK includes" >&5
  9937. case "$with_lapack_includes" in
  9938. y | ye | yes | n | no)
  9939. { echo "configure: error: *** You must supply a directory to --with-lapack-includes." 1>&2; exit 1; }
  9940. ;;
  9941. esac
  9942. echo "$ac_t""$with_lapack_includes" 1>&6
  9943. if test -n "$with_lapack_includes" ; then
  9944. for dir in $with_lapack_includes; do
  9945. if test -d "$dir"; then
  9946. LAPACKINC="$LAPACKINC -I$dir"
  9947. else
  9948. { echo "configure: error: *** LAPACK includes directory $dir does not exist." 1>&2; exit 1; }
  9949. fi
  9950. done
  9951. fi
  9952. echo $ac_n "checking for location of LAPACK library""... $ac_c" 1>&6
  9953. echo "configure:12554: checking for location of LAPACK library" >&5
  9954. case "$with_lapack_libs" in
  9955. y | ye | yes | n | no)
  9956. { echo "configure: error: *** You must supply a directory to --with-lapack-libs." 1>&2; exit 1; }
  9957. ;;
  9958. esac
  9959. echo "$ac_t""$with_lapack_libs" 1>&6
  9960. if test -n "$with_lapack_libs"; then
  9961. for dir in $with_lapack_libs; do
  9962. if test -d "$dir"; then
  9963. LAPACKLIB="$LAPACKLIB -L$dir"
  9964. else
  9965. { echo "configure: error: *** LAPACK library directory $dir does not exist." 1>&2; exit 1; }
  9966. fi
  9967. done
  9968. fi
  9969. # See if clapack.h exists (ATLAS)
  9970. save_CPPFLAGS="$CPPFLAGS"
  9971. CPPFLAGS="$LAPACKINC $CPPFLAGS"
  9972. for ac_hdr in clapack.h
  9973. do
  9974. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9975. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9976. echo "configure:12580: checking for $ac_hdr" >&5
  9977. cat > conftest.$ac_ext <<EOF
  9978. #line 12583 "configure"
  9979. #include "confdefs.h"
  9980. #include <$ac_hdr>
  9981. EOF
  9982. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9983. { (eval echo configure:12588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9984. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9985. if test -z "$ac_err"; then
  9986. rm -rf conftest*
  9987. eval "ac_cv_header_$ac_safe=yes"
  9988. else
  9989. echo "$ac_err" >&5
  9990. echo "configure: failed program was:" >&5
  9991. cat conftest.$ac_ext >&5
  9992. rm -rf conftest*
  9993. eval "ac_cv_header_$ac_safe=no"
  9994. fi
  9995. rm -f conftest*
  9996. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9997. echo "$ac_t""yes" 1>&6
  9998. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9999. cat >> confdefs.h <<EOF
  10000. #define $ac_tr_hdr 1
  10001. EOF
  10002. else
  10003. echo "$ac_t""no" 1>&6
  10004. fi
  10005. done
  10006. CPPFLAGS="$save_CPPFLAGS"
  10007. # LAPACK linked to by default?
  10008. if test lapack_ok=no; then
  10009. save_LIBS="$LIBS"; LIBS="$LIBS $BLASLIB $MATHLIB $FLIBS"
  10010. save_LDFLAGS="$LDFLAGS"; LDFLAGS="$LAPACKLIB $LDFLAGS"
  10011. echo $ac_n "checking for dsegv_""... $ac_c" 1>&6
  10012. echo "configure:12620: checking for dsegv_" >&5
  10013. cat > conftest.$ac_ext <<EOF
  10014. #line 12623 "configure"
  10015. #include "confdefs.h"
  10016. /* System header to define __stub macros and hopefully few prototypes,
  10017. which can conflict with char dsegv_(); below. */
  10018. #include <assert.h>
  10019. /* Override any gcc2 internal prototype to avoid an error. */
  10020. /* We use char because int might match the return type of a gcc2
  10021. builtin and then its argument prototype would still apply. */
  10022. char dsegv_();
  10023. int main() {
  10024. /* The GNU C library defines this for functions which it implements
  10025. to always fail with ENOSYS. Some functions are actually named
  10026. something starting with __ and the normal name is an alias. */
  10027. #if defined (__stub_dsegv_) || defined (__stub___dsegv_)
  10028. choke me
  10029. #else
  10030. dsegv_();
  10031. #endif
  10032. ; return 0; }
  10033. EOF
  10034. if { (eval echo configure:12646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10035. rm -rf conftest*
  10036. eval "ac_cv_func_dsegv_=yes"
  10037. else
  10038. echo "configure: failed program was:" >&5
  10039. cat conftest.$ac_ext >&5
  10040. rm -rf conftest*
  10041. eval "ac_cv_func_dsegv_=no"
  10042. fi
  10043. rm -f conftest*
  10044. if eval "test \"`echo '$ac_cv_func_'dsegv_`\" = yes"; then
  10045. echo "$ac_t""yes" 1>&6
  10046. lapack_ok=yes
  10047. else
  10048. echo "$ac_t""no" 1>&6
  10049. fi
  10050. LIBS="$save_LIBS"
  10051. LDFLAGS="$save_LDFLAGS"
  10052. fi
  10053. # Generic LAPACK library?
  10054. if test $lapack_ok = no; then
  10055. save_libs="$LIBS"; LIBS="$BLASLIB $MATHLIB $LIBS"
  10056. save_LDFLAGS="$LDFLAGS"; LDFLAGS="$LAPACKLIB $LDFLAGS"
  10057. echo $ac_n "checking for desgv_ in -llapack""... $ac_c" 1>&6
  10058. echo "configure:12673: checking for desgv_ in -llapack" >&5
  10059. ac_lib_var=`echo lapack'_'desgv_ | sed 'y%./+-%__p_%'`
  10060. ac_save_LIBS="$LIBS"
  10061. LIBS="-llapack $FLIBS $LIBS"
  10062. cat > conftest.$ac_ext <<EOF
  10063. #line 12679 "configure"
  10064. #include "confdefs.h"
  10065. /* Override any gcc2 internal prototype to avoid an error. */
  10066. /* We use char because int might match the return type of a gcc2
  10067. builtin and then its argument prototype would still apply. */
  10068. char desgv_();
  10069. int main() {
  10070. desgv_()
  10071. ; return 0; }
  10072. EOF
  10073. if { (eval echo configure:12690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10074. rm -rf conftest*
  10075. eval "ac_cv_lib_$ac_lib_var=yes"
  10076. else
  10077. echo "configure: failed program was:" >&5
  10078. cat conftest.$ac_ext >&5
  10079. rm -rf conftest*
  10080. eval "ac_cv_lib_$ac_lib_var=no"
  10081. fi
  10082. rm -f conftest*
  10083. LIBS="$ac_save_LIBS"
  10084. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10085. echo "$ac_t""yes" 1>&6
  10086. lapack_ok=yes; LAPACKLIB="-llapack"
  10087. else
  10088. echo "$ac_t""no" 1>&6
  10089. fi
  10090. LIBS="$save_LIBS"
  10091. LDFLAGS="$save_LDFLAGS"
  10092. fi
  10093. if test $lapack_ok = no; then
  10094. ac_save_ldflags="$LDFLAGS"
  10095. LDFLAGS="$LAPACKLIB $LDFLAGS"
  10096. echo $ac_n "checking for dgesv_ in -llapack""... $ac_c" 1>&6
  10097. echo "configure:12722: checking for dgesv_ in -llapack" >&5
  10098. ac_lib_var=`echo lapack'_'dgesv_ | sed 'y%./+-%__p_%'`
  10099. ac_save_LIBS="$LIBS"
  10100. LIBS="-llapack $BLASLIB $MATHLIB $LIBS"
  10101. cat > conftest.$ac_ext <<EOF
  10102. #line 12728 "configure"
  10103. #include "confdefs.h"
  10104. /* Override any gcc2 internal prototype to avoid an error. */
  10105. /* We use char because int might match the return type of a gcc2
  10106. builtin and then its argument prototype would still apply. */
  10107. char dgesv_();
  10108. int main() {
  10109. dgesv_()
  10110. ; return 0; }
  10111. EOF
  10112. if { (eval echo configure:12739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10113. rm -rf conftest*
  10114. eval "ac_cv_lib_$ac_lib_var=yes"
  10115. else
  10116. echo "configure: failed program was:" >&5
  10117. cat conftest.$ac_ext >&5
  10118. rm -rf conftest*
  10119. eval "ac_cv_lib_$ac_lib_var=no"
  10120. fi
  10121. rm -f conftest*
  10122. LIBS="$ac_save_LIBS"
  10123. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10124. echo "$ac_t""yes" 1>&6
  10125. LAPACKLIB="$LAPACKLIB -llapack "
  10126. else
  10127. echo "$ac_t""no" 1>&6
  10128. echo $ac_n "checking for dgesv_ in -llapack""... $ac_c" 1>&6
  10129. echo "configure:12758: checking for dgesv_ in -llapack" >&5
  10130. ac_lib_var=`echo lapack'_'dgesv_ | sed 'y%./+-%__p_%'`
  10131. ac_save_LIBS="$LIBS"
  10132. LIBS="-llapack $BLASLIB $MATHLIB -lg2c $LIBS"
  10133. cat > conftest.$ac_ext <<EOF
  10134. #line 12764 "configure"
  10135. #include "confdefs.h"
  10136. /* Override any gcc2 internal prototype to avoid an error. */
  10137. /* We use char because int might match the return type of a gcc2
  10138. builtin and then its argument prototype would still apply. */
  10139. char dgesv_();
  10140. int main() {
  10141. dgesv_()
  10142. ; return 0; }
  10143. EOF
  10144. if { (eval echo configure:12775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10145. rm -rf conftest*
  10146. eval "ac_cv_lib_$ac_lib_var=yes"
  10147. else
  10148. echo "configure: failed program was:" >&5
  10149. cat conftest.$ac_ext >&5
  10150. rm -rf conftest*
  10151. eval "ac_cv_lib_$ac_lib_var=no"
  10152. fi
  10153. rm -f conftest*
  10154. LIBS="$ac_save_LIBS"
  10155. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10156. echo "$ac_t""yes" 1>&6
  10157. LAPACKLIB="$LAPACKLIB -llapack -lg2c"
  10158. else
  10159. echo "$ac_t""no" 1>&6
  10160. LDFLAGS=${ac_save_ldflags}
  10161. { echo "configure: error: *** Unable to locate LAPACK library." 1>&2; exit 1; }
  10162. fi
  10163. fi
  10164. LDFLAGS=${ac_save_ldflags}
  10165. fi
  10166. cat >> confdefs.h <<\EOF
  10167. #define HAVE_LIBLAPACK 1
  10168. EOF
  10169. fi # $USE_LAPACK
  10170. fi # $USE_BLAS
  10171. # Done checking LAPACK
  10172. # Enable Cairo display driver option
  10173. echo $ac_n "checking whether to use Cairo""... $ac_c" 1>&6
  10174. echo "configure:12831: checking whether to use Cairo" >&5
  10175. echo "$ac_t"""$with_cairo"" 1>&6
  10176. case "$with_cairo" in
  10177. "no") USE_CAIRO= ;;
  10178. "yes") USE_CAIRO="1" ;;
  10179. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10180. esac
  10181. CAIROINC=
  10182. CAIROLIB=
  10183. if test -n "$USE_CAIRO"; then
  10184. cairo="cairo"
  10185. pkgs="cairo-ft cairo-fc cairo-pdf cairo-ps cairo-svg"
  10186. if test -n "$USE_X11"; then
  10187. pkgs="$pkgs cairo-xlib cairo-xlib-xrender"
  10188. fi
  10189. for pkg in $pkgs ; do
  10190. if pkg-config --exists $pkg ; then
  10191. cairo="$cairo $pkg"
  10192. fi
  10193. done
  10194. # With Cairo includes directory
  10195. #FIXME: somehow quote dirs with spaces in $cairo ?
  10196. CAIROINC=`pkg-config --cflags $cairo`
  10197. echo $ac_n "checking for location of cairo includes""... $ac_c" 1>&6
  10198. echo "configure:12863: checking for location of cairo includes" >&5
  10199. case "$with_cairo_includes" in
  10200. y | ye | yes | n | no)
  10201. { echo "configure: error: *** You must supply a directory to --with-cairo-includes." 1>&2; exit 1; }
  10202. ;;
  10203. esac
  10204. echo "$ac_t""$with_cairo_includes" 1>&6
  10205. if test -n "$with_cairo_includes" ; then
  10206. for dir in $with_cairo_includes; do
  10207. if test -d "$dir"; then
  10208. CAIROINC="$CAIROINC -I$dir"
  10209. else
  10210. { echo "configure: error: *** cairo includes directory $dir does not exist." 1>&2; exit 1; }
  10211. fi
  10212. done
  10213. fi
  10214. ac_save_cppflags="$CPPFLAGS"
  10215. CPPFLAGS="$CAIROINC $CPPFLAGS"
  10216. for ac_hdr in cairo.h
  10217. do
  10218. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10219. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10220. echo "configure:12889: checking for $ac_hdr" >&5
  10221. cat > conftest.$ac_ext <<EOF
  10222. #line 12892 "configure"
  10223. #include "confdefs.h"
  10224. #include <$ac_hdr>
  10225. EOF
  10226. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10227. { (eval echo configure:12897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10228. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10229. if test -z "$ac_err"; then
  10230. rm -rf conftest*
  10231. eval "ac_cv_header_$ac_safe=yes"
  10232. else
  10233. echo "$ac_err" >&5
  10234. echo "configure: failed program was:" >&5
  10235. cat conftest.$ac_ext >&5
  10236. rm -rf conftest*
  10237. eval "ac_cv_header_$ac_safe=no"
  10238. fi
  10239. rm -f conftest*
  10240. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10241. echo "$ac_t""yes" 1>&6
  10242. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10243. cat >> confdefs.h <<EOF
  10244. #define $ac_tr_hdr 1
  10245. EOF
  10246. else
  10247. echo "$ac_t""no" 1>&6
  10248. { echo "configure: error: *** Unable to locate Cairo includes." 1>&2; exit 1; }
  10249. fi
  10250. done
  10251. CPPFLAGS=$ac_save_cppflags
  10252. # With Cairo library directory
  10253. CAIROLIB=`pkg-config --libs $cairo`
  10254. echo $ac_n "checking for location of cairo library""... $ac_c" 1>&6
  10255. echo "configure:12933: checking for location of cairo library" >&5
  10256. case "$with_cairo_libs" in
  10257. y | ye | yes | n | no)
  10258. { echo "configure: error: *** You must supply a directory to --with-cairo-libs." 1>&2; exit 1; }
  10259. ;;
  10260. esac
  10261. echo "$ac_t""$with_cairo_libs" 1>&6
  10262. if test -n "$with_cairo_libs"; then
  10263. for dir in $with_cairo_libs; do
  10264. if test -d "$dir"; then
  10265. CAIROLIB="$CAIROLIB -L$dir"
  10266. else
  10267. { echo "configure: error: *** cairo library directory $dir does not exist." 1>&2; exit 1; }
  10268. fi
  10269. done
  10270. fi
  10271. echo $ac_n "checking for cairo linking flags""... $ac_c" 1>&6
  10272. echo "configure:12953: checking for cairo linking flags" >&5
  10273. case "$with_cairo_ldflags" in
  10274. y | ye | yes | n | no)
  10275. { echo "configure: error: *** You must supply a directory to --with-cairo-ldflags." 1>&2; exit 1; }
  10276. ;;
  10277. esac
  10278. echo "$ac_t""$with_cairo_ldflags" 1>&6
  10279. CAIROLIB="$CAIROLIB $with_cairo_ldflags"
  10280. ac_save_libs="$LIBS"
  10281. ac_save_ldflags="$LDFLAGS"
  10282. LIBS=" $CAIROLIB $LIBS"
  10283. LDFLAGS=" $LDFLAGS"
  10284. echo $ac_n "checking for cairo_create""... $ac_c" 1>&6
  10285. echo "configure:12969: checking for cairo_create" >&5
  10286. cat > conftest.$ac_ext <<EOF
  10287. #line 12972 "configure"
  10288. #include "confdefs.h"
  10289. /* System header to define __stub macros and hopefully few prototypes,
  10290. which can conflict with char cairo_create(); below. */
  10291. #include <assert.h>
  10292. /* Override any gcc2 internal prototype to avoid an error. */
  10293. /* We use char because int might match the return type of a gcc2
  10294. builtin and then its argument prototype would still apply. */
  10295. char cairo_create();
  10296. int main() {
  10297. /* The GNU C library defines this for functions which it implements
  10298. to always fail with ENOSYS. Some functions are actually named
  10299. something starting with __ and the normal name is an alias. */
  10300. #if defined (__stub_cairo_create) || defined (__stub___cairo_create)
  10301. choke me
  10302. #else
  10303. cairo_create();
  10304. #endif
  10305. ; return 0; }
  10306. EOF
  10307. if { (eval echo configure:12995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10308. rm -rf conftest*
  10309. eval "ac_cv_func_cairo_create=yes"
  10310. else
  10311. echo "configure: failed program was:" >&5
  10312. cat conftest.$ac_ext >&5
  10313. rm -rf conftest*
  10314. eval "ac_cv_func_cairo_create=no"
  10315. fi
  10316. rm -f conftest*
  10317. if eval "test \"`echo '$ac_cv_func_'cairo_create`\" = yes"; then
  10318. echo "$ac_t""yes" 1>&6
  10319. :
  10320. else
  10321. echo "$ac_t""no" 1>&6
  10322. { echo "configure: error: *** Unable to locate cairo_create." 1>&2; exit 1; }
  10323. fi
  10324. LIBS=${ac_save_libs}
  10325. LDFLAGS=${ac_save_ldflags}
  10326. ac_save_libs="$LIBS"
  10327. ac_save_ldflags="$LDFLAGS"
  10328. LIBS=" $CAIROLIB $LIBS"
  10329. LDFLAGS=" $LDFLAGS"
  10330. echo $ac_n "checking for cairo_xlib_surface_create_with_xrender_format""... $ac_c" 1>&6
  10331. echo "configure:13029: checking for cairo_xlib_surface_create_with_xrender_format" >&5
  10332. cat > conftest.$ac_ext <<EOF
  10333. #line 13032 "configure"
  10334. #include "confdefs.h"
  10335. /* System header to define __stub macros and hopefully few prototypes,
  10336. which can conflict with char cairo_xlib_surface_create_with_xrender_format(); below. */
  10337. #include <assert.h>
  10338. /* Override any gcc2 internal prototype to avoid an error. */
  10339. /* We use char because int might match the return type of a gcc2
  10340. builtin and then its argument prototype would still apply. */
  10341. char cairo_xlib_surface_create_with_xrender_format();
  10342. int main() {
  10343. /* The GNU C library defines this for functions which it implements
  10344. to always fail with ENOSYS. Some functions are actually named
  10345. something starting with __ and the normal name is an alias. */
  10346. #if defined (__stub_cairo_xlib_surface_create_with_xrender_format) || defined (__stub___cairo_xlib_surface_create_with_xrender_format)
  10347. choke me
  10348. #else
  10349. cairo_xlib_surface_create_with_xrender_format();
  10350. #endif
  10351. ; return 0; }
  10352. EOF
  10353. if { (eval echo configure:13055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10354. rm -rf conftest*
  10355. eval "ac_cv_func_cairo_xlib_surface_create_with_xrender_format=yes"
  10356. else
  10357. echo "configure: failed program was:" >&5
  10358. cat conftest.$ac_ext >&5
  10359. rm -rf conftest*
  10360. eval "ac_cv_func_cairo_xlib_surface_create_with_xrender_format=no"
  10361. fi
  10362. rm -f conftest*
  10363. if eval "test \"`echo '$ac_cv_func_'cairo_xlib_surface_create_with_xrender_format`\" = yes"; then
  10364. echo "$ac_t""yes" 1>&6
  10365. CAIRO_HAS_XRENDER=1
  10366. else
  10367. echo "$ac_t""no" 1>&6
  10368. CAIRO_HAS_XRENDER=
  10369. fi
  10370. LIBS=${ac_save_libs}
  10371. LDFLAGS=${ac_save_ldflags}
  10372. ac_save_libs="$LIBS"
  10373. ac_save_ldflags="$LDFLAGS"
  10374. LIBS=" $CAIROLIB $LIBS"
  10375. LDFLAGS=" $LDFLAGS"
  10376. echo $ac_n "checking for cairo_xlib_surface_get_xrender_format""... $ac_c" 1>&6
  10377. echo "configure:13088: checking for cairo_xlib_surface_get_xrender_format" >&5
  10378. cat > conftest.$ac_ext <<EOF
  10379. #line 13091 "configure"
  10380. #include "confdefs.h"
  10381. /* System header to define __stub macros and hopefully few prototypes,
  10382. which can conflict with char cairo_xlib_surface_get_xrender_format(); below. */
  10383. #include <assert.h>
  10384. /* Override any gcc2 internal prototype to avoid an error. */
  10385. /* We use char because int might match the return type of a gcc2
  10386. builtin and then its argument prototype would still apply. */
  10387. char cairo_xlib_surface_get_xrender_format();
  10388. int main() {
  10389. /* The GNU C library defines this for functions which it implements
  10390. to always fail with ENOSYS. Some functions are actually named
  10391. something starting with __ and the normal name is an alias. */
  10392. #if defined (__stub_cairo_xlib_surface_get_xrender_format) || defined (__stub___cairo_xlib_surface_get_xrender_format)
  10393. choke me
  10394. #else
  10395. cairo_xlib_surface_get_xrender_format();
  10396. #endif
  10397. ; return 0; }
  10398. EOF
  10399. if { (eval echo configure:13114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10400. rm -rf conftest*
  10401. eval "ac_cv_func_cairo_xlib_surface_get_xrender_format=yes"
  10402. else
  10403. echo "configure: failed program was:" >&5
  10404. cat conftest.$ac_ext >&5
  10405. rm -rf conftest*
  10406. eval "ac_cv_func_cairo_xlib_surface_get_xrender_format=no"
  10407. fi
  10408. rm -f conftest*
  10409. if eval "test \"`echo '$ac_cv_func_'cairo_xlib_surface_get_xrender_format`\" = yes"; then
  10410. echo "$ac_t""yes" 1>&6
  10411. CAIRO_HAS_XRENDER_SURFACE=1
  10412. else
  10413. echo "$ac_t""no" 1>&6
  10414. CAIRO_HAS_XRENDER_SURFACE=
  10415. fi
  10416. LIBS=${ac_save_libs}
  10417. LDFLAGS=${ac_save_ldflags}
  10418. CAIROLIB="$CAIROLIB $CAIROLDFLAGS"
  10419. fi # $USE_CAIRO
  10420. # Done checking Cairo
  10421. # Enable FreeType option
  10422. echo $ac_n "checking whether to use FreeType""... $ac_c" 1>&6
  10423. echo "configure:13156: checking whether to use FreeType" >&5
  10424. echo "$ac_t"""$with_freetype"" 1>&6
  10425. case "$with_freetype" in
  10426. "no") USE_FREETYPE= ;;
  10427. "yes") USE_FREETYPE="1" ;;
  10428. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10429. esac
  10430. FTINC=
  10431. FTLIB=
  10432. if test -n "$USE_FREETYPE"; then
  10433. # With FreeType includes directory
  10434. echo $ac_n "checking for location of FreeType includes""... $ac_c" 1>&6
  10435. echo "configure:13175: checking for location of FreeType includes" >&5
  10436. case "$with_freetype_includes" in
  10437. y | ye | yes | n | no)
  10438. { echo "configure: error: *** You must supply a directory to --with-freetype-includes." 1>&2; exit 1; }
  10439. ;;
  10440. esac
  10441. echo "$ac_t""$with_freetype_includes" 1>&6
  10442. if test -n "$with_freetype_includes" ; then
  10443. for dir in $with_freetype_includes; do
  10444. if test -d "$dir"; then
  10445. FTINC="$FTINC -I$dir"
  10446. else
  10447. { echo "configure: error: *** FreeType includes directory $dir does not exist." 1>&2; exit 1; }
  10448. fi
  10449. done
  10450. fi
  10451. ac_save_cppflags="$CPPFLAGS"
  10452. CPPFLAGS="$FTINC $CPPFLAGS"
  10453. for ac_hdr in ft2build.h
  10454. do
  10455. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10456. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10457. echo "configure:13201: checking for $ac_hdr" >&5
  10458. cat > conftest.$ac_ext <<EOF
  10459. #line 13204 "configure"
  10460. #include "confdefs.h"
  10461. #include <$ac_hdr>
  10462. EOF
  10463. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10464. { (eval echo configure:13209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10465. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10466. if test -z "$ac_err"; then
  10467. rm -rf conftest*
  10468. eval "ac_cv_header_$ac_safe=yes"
  10469. else
  10470. echo "$ac_err" >&5
  10471. echo "configure: failed program was:" >&5
  10472. cat conftest.$ac_ext >&5
  10473. rm -rf conftest*
  10474. eval "ac_cv_header_$ac_safe=no"
  10475. fi
  10476. rm -f conftest*
  10477. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10478. echo "$ac_t""yes" 1>&6
  10479. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10480. cat >> confdefs.h <<EOF
  10481. #define $ac_tr_hdr 1
  10482. EOF
  10483. else
  10484. echo "$ac_t""no" 1>&6
  10485. { echo "configure: error: *** Unable to locate FreeType includes." 1>&2; exit 1; }
  10486. fi
  10487. done
  10488. CPPFLAGS=$ac_save_cppflags
  10489. # With FreeType library directory
  10490. echo $ac_n "checking for location of FreeType library""... $ac_c" 1>&6
  10491. echo "configure:13243: checking for location of FreeType library" >&5
  10492. case "$with_freetype_libs" in
  10493. y | ye | yes | n | no)
  10494. { echo "configure: error: *** You must supply a directory to --with-freetype-libs." 1>&2; exit 1; }
  10495. ;;
  10496. esac
  10497. echo "$ac_t""$with_freetype_libs" 1>&6
  10498. if test -n "$with_freetype_libs"; then
  10499. for dir in $with_freetype_libs; do
  10500. if test -d "$dir"; then
  10501. FTLIB="$FTLIB -L$dir"
  10502. else
  10503. { echo "configure: error: *** FreeType library directory $dir does not exist." 1>&2; exit 1; }
  10504. fi
  10505. done
  10506. fi
  10507. ac_save_ldflags="$LDFLAGS"
  10508. LDFLAGS="$FTLIB $LDFLAGS"
  10509. echo $ac_n "checking for FT_Init_FreeType in -lfreetype""... $ac_c" 1>&6
  10510. echo "configure:13268: checking for FT_Init_FreeType in -lfreetype" >&5
  10511. ac_lib_var=`echo freetype'_'FT_Init_FreeType | sed 'y%./+-%__p_%'`
  10512. ac_save_LIBS="$LIBS"
  10513. LIBS="-lfreetype $LIBS"
  10514. cat > conftest.$ac_ext <<EOF
  10515. #line 13274 "configure"
  10516. #include "confdefs.h"
  10517. /* Override any gcc2 internal prototype to avoid an error. */
  10518. /* We use char because int might match the return type of a gcc2
  10519. builtin and then its argument prototype would still apply. */
  10520. char FT_Init_FreeType();
  10521. int main() {
  10522. FT_Init_FreeType()
  10523. ; return 0; }
  10524. EOF
  10525. if { (eval echo configure:13285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10526. rm -rf conftest*
  10527. eval "ac_cv_lib_$ac_lib_var=yes"
  10528. else
  10529. echo "configure: failed program was:" >&5
  10530. cat conftest.$ac_ext >&5
  10531. rm -rf conftest*
  10532. eval "ac_cv_lib_$ac_lib_var=no"
  10533. fi
  10534. rm -f conftest*
  10535. LIBS="$ac_save_LIBS"
  10536. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10537. echo "$ac_t""yes" 1>&6
  10538. FTLIB="$FTLIB -lfreetype "
  10539. else
  10540. echo "$ac_t""no" 1>&6
  10541. LDFLAGS=${ac_save_ldflags}
  10542. { echo "configure: error: *** Unable to locate FreeType library." 1>&2; exit 1; }
  10543. fi
  10544. LDFLAGS=${ac_save_ldflags}
  10545. fi # $USE_FREETYPE
  10546. # Done checking FreeType
  10547. # Enable NLS option
  10548. echo $ac_n "checking whether to use NLS""... $ac_c" 1>&6
  10549. echo "configure:13326: checking whether to use NLS" >&5
  10550. echo "$ac_t"""$with_nls"" 1>&6
  10551. case "$with_nls" in
  10552. "no") USE_NLS= ;;
  10553. "yes") USE_NLS="1" ;;
  10554. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10555. esac
  10556. INTLLIB=
  10557. HAVE_NLS=
  10558. if test -n "${USE_NLS}" ; then
  10559. cat >> confdefs.h <<\EOF
  10560. #define USE_NLS 1
  10561. EOF
  10562. echo $ac_n "checking for gettext""... $ac_c" 1>&6
  10563. echo "configure:13346: checking for gettext" >&5
  10564. cat > conftest.$ac_ext <<EOF
  10565. #line 13349 "configure"
  10566. #include "confdefs.h"
  10567. /* System header to define __stub macros and hopefully few prototypes,
  10568. which can conflict with char gettext(); below. */
  10569. #include <assert.h>
  10570. /* Override any gcc2 internal prototype to avoid an error. */
  10571. /* We use char because int might match the return type of a gcc2
  10572. builtin and then its argument prototype would still apply. */
  10573. char gettext();
  10574. int main() {
  10575. /* The GNU C library defines this for functions which it implements
  10576. to always fail with ENOSYS. Some functions are actually named
  10577. something starting with __ and the normal name is an alias. */
  10578. #if defined (__stub_gettext) || defined (__stub___gettext)
  10579. choke me
  10580. #else
  10581. gettext();
  10582. #endif
  10583. ; return 0; }
  10584. EOF
  10585. if { (eval echo configure:13372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10586. rm -rf conftest*
  10587. eval "ac_cv_func_gettext=yes"
  10588. else
  10589. echo "configure: failed program was:" >&5
  10590. cat conftest.$ac_ext >&5
  10591. rm -rf conftest*
  10592. eval "ac_cv_func_gettext=no"
  10593. fi
  10594. rm -f conftest*
  10595. if eval "test \"`echo '$ac_cv_func_'gettext`\" = yes"; then
  10596. echo "$ac_t""yes" 1>&6
  10597. INTLLIB=
  10598. else
  10599. echo "$ac_t""no" 1>&6
  10600. echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
  10601. echo "configure:13390: checking for gettext in -lintl" >&5
  10602. ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
  10603. ac_save_LIBS="$LIBS"
  10604. LIBS="-lintl $LIBS"
  10605. cat > conftest.$ac_ext <<EOF
  10606. #line 13396 "configure"
  10607. #include "confdefs.h"
  10608. /* Override any gcc2 internal prototype to avoid an error. */
  10609. /* We use char because int might match the return type of a gcc2
  10610. builtin and then its argument prototype would still apply. */
  10611. char gettext();
  10612. int main() {
  10613. gettext()
  10614. ; return 0; }
  10615. EOF
  10616. if { (eval echo configure:13407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10617. rm -rf conftest*
  10618. eval "ac_cv_lib_$ac_lib_var=yes"
  10619. else
  10620. echo "configure: failed program was:" >&5
  10621. cat conftest.$ac_ext >&5
  10622. rm -rf conftest*
  10623. eval "ac_cv_lib_$ac_lib_var=no"
  10624. fi
  10625. rm -f conftest*
  10626. LIBS="$ac_save_LIBS"
  10627. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10628. echo "$ac_t""yes" 1>&6
  10629. INTLLIB=-lintl
  10630. else
  10631. echo "$ac_t""no" 1>&6
  10632. { echo "configure: error: *** Unable to locate gettext() function." 1>&2; exit 1; }
  10633. fi
  10634. fi
  10635. HAVE_NLS=1
  10636. fi
  10637. # Enable C++ option
  10638. echo $ac_n "checking whether to use C++""... $ac_c" 1>&6
  10639. echo "configure:13442: checking whether to use C++" >&5
  10640. echo "$ac_t"""$with_cxx"" 1>&6
  10641. case "$with_cxx" in
  10642. "no") USE_CXX= ;;
  10643. "yes") USE_CXX="1" ;;
  10644. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10645. esac
  10646. if test -n "$USE_CXX"; then
  10647. for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
  10648. do
  10649. # Extract the first word of "$ac_prog", so it can be a program name with args.
  10650. set dummy $ac_prog; ac_word=$2
  10651. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  10652. echo "configure:13458: checking for $ac_word" >&5
  10653. if test -n "$CXX"; then
  10654. ac_cv_prog_CXX="$CXX" # Let the user override the test.
  10655. else
  10656. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  10657. ac_dummy="$PATH"
  10658. for ac_dir in $ac_dummy; do
  10659. test -z "$ac_dir" && ac_dir=.
  10660. if test -f $ac_dir/$ac_word; then
  10661. ac_cv_prog_CXX="$ac_prog"
  10662. break
  10663. fi
  10664. done
  10665. IFS="$ac_save_ifs"
  10666. fi
  10667. CXX="$ac_cv_prog_CXX"
  10668. if test -n "$CXX"; then
  10669. echo "$ac_t""$CXX" 1>&6
  10670. else
  10671. echo "$ac_t""no" 1>&6
  10672. fi
  10673. test -n "$CXX" && break
  10674. done
  10675. test -n "$CXX" || CXX="gcc"
  10676. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  10677. echo "configure:13487: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
  10678. ac_ext=C
  10679. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  10680. ac_cpp='$CXXCPP $CPPFLAGS'
  10681. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  10682. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  10683. cross_compiling=$ac_cv_prog_cxx_cross
  10684. cat > conftest.$ac_ext << EOF
  10685. #line 13498 "configure"
  10686. #include "confdefs.h"
  10687. int main(){return(0);}
  10688. EOF
  10689. if { (eval echo configure:13503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10690. ac_cv_prog_cxx_works=yes
  10691. # If we can't run a trivial program, we are probably using a cross compiler.
  10692. if (./conftest; exit) 2>/dev/null; then
  10693. ac_cv_prog_cxx_cross=no
  10694. else
  10695. ac_cv_prog_cxx_cross=yes
  10696. fi
  10697. else
  10698. echo "configure: failed program was:" >&5
  10699. cat conftest.$ac_ext >&5
  10700. ac_cv_prog_cxx_works=no
  10701. fi
  10702. rm -fr conftest*
  10703. ac_ext=c
  10704. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  10705. ac_cpp='$CPP $CPPFLAGS'
  10706. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  10707. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  10708. cross_compiling=$ac_cv_prog_cc_cross
  10709. echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
  10710. if test $ac_cv_prog_cxx_works = no; then
  10711. { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
  10712. fi
  10713. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  10714. echo "configure:13529: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
  10715. echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
  10716. cross_compiling=$ac_cv_prog_cxx_cross
  10717. echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
  10718. echo "configure:13534: checking whether we are using GNU C++" >&5
  10719. cat > conftest.C <<EOF
  10720. #ifdef __GNUC__
  10721. yes;
  10722. #endif
  10723. EOF
  10724. if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:13541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  10725. ac_cv_prog_gxx=yes
  10726. else
  10727. ac_cv_prog_gxx=no
  10728. fi
  10729. echo "$ac_t""$ac_cv_prog_gxx" 1>&6
  10730. if test $ac_cv_prog_gxx = yes; then
  10731. GXX=yes
  10732. else
  10733. GXX=
  10734. fi
  10735. ac_test_CXXFLAGS="${CXXFLAGS+set}"
  10736. ac_save_CXXFLAGS="$CXXFLAGS"
  10737. CXXFLAGS=
  10738. echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
  10739. echo "configure:13559: checking whether ${CXX-g++} accepts -g" >&5
  10740. echo 'void f(){}' > conftest.cc
  10741. if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  10742. ac_cv_prog_cxx_g=yes
  10743. else
  10744. ac_cv_prog_cxx_g=no
  10745. fi
  10746. rm -f conftest*
  10747. echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
  10748. if test "$ac_test_CXXFLAGS" = set; then
  10749. CXXFLAGS="$ac_save_CXXFLAGS"
  10750. elif test $ac_cv_prog_cxx_g = yes; then
  10751. if test "$GXX" = yes; then
  10752. CXXFLAGS="-g -O2"
  10753. else
  10754. CXXFLAGS="-g"
  10755. fi
  10756. else
  10757. if test "$GXX" = yes; then
  10758. CXXFLAGS="-O2"
  10759. else
  10760. CXXFLAGS=
  10761. fi
  10762. fi
  10763. else
  10764. CXX=
  10765. CXXFLAGS=
  10766. fi
  10767. # Done checking C++
  10768. # Enable openDWG option
  10769. echo $ac_n "checking whether to use openDWG""... $ac_c" 1>&6
  10770. echo "configure:13600: checking whether to use openDWG" >&5
  10771. echo "$ac_t"""$with_opendwg"" 1>&6
  10772. case "$with_opendwg" in
  10773. "no") USE_OPENDWG= ;;
  10774. "yes") USE_OPENDWG="1" ;;
  10775. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10776. esac
  10777. OPENDWGINCPATH=
  10778. OPENDWGLIBPATH=
  10779. OPENDWGLIB=
  10780. if test -n "${USE_OPENDWG}"; then
  10781. # With OPENDWG includes directory
  10782. echo $ac_n "checking for location of openDGW includes""... $ac_c" 1>&6
  10783. echo "configure:13620: checking for location of openDGW includes" >&5
  10784. case "$with_opendwg_includes" in
  10785. y | ye | yes | n | no)
  10786. { echo "configure: error: *** You must supply a directory to --with-opendwg-includes." 1>&2; exit 1; }
  10787. ;;
  10788. esac
  10789. echo "$ac_t""$with_opendwg_includes" 1>&6
  10790. if test -n "$with_opendwg_includes" ; then
  10791. for dir in $with_opendwg_includes; do
  10792. if test -d "$dir"; then
  10793. OPENDWGINCPATH="$OPENDWGINCPATH -I$dir"
  10794. else
  10795. { echo "configure: error: *** openDGW includes directory $dir does not exist." 1>&2; exit 1; }
  10796. fi
  10797. done
  10798. fi
  10799. ac_save_cppflags="$CPPFLAGS"
  10800. CPPFLAGS="$OPENDWGINCPATH $CPPFLAGS"
  10801. for ac_hdr in ad2.h
  10802. do
  10803. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10804. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10805. echo "configure:13646: checking for $ac_hdr" >&5
  10806. cat > conftest.$ac_ext <<EOF
  10807. #line 13649 "configure"
  10808. #include "confdefs.h"
  10809. #include <$ac_hdr>
  10810. EOF
  10811. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10812. { (eval echo configure:13654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10813. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10814. if test -z "$ac_err"; then
  10815. rm -rf conftest*
  10816. eval "ac_cv_header_$ac_safe=yes"
  10817. else
  10818. echo "$ac_err" >&5
  10819. echo "configure: failed program was:" >&5
  10820. cat conftest.$ac_ext >&5
  10821. rm -rf conftest*
  10822. eval "ac_cv_header_$ac_safe=no"
  10823. fi
  10824. rm -f conftest*
  10825. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10826. echo "$ac_t""yes" 1>&6
  10827. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10828. cat >> confdefs.h <<EOF
  10829. #define $ac_tr_hdr 1
  10830. EOF
  10831. else
  10832. echo "$ac_t""no" 1>&6
  10833. { echo "configure: error: *** Unable to locate openDWG includes." 1>&2; exit 1; }
  10834. fi
  10835. done
  10836. CPPFLAGS=$ac_save_cppflags
  10837. # With OPENDWG library directory
  10838. echo $ac_n "checking for location of openDWG library""... $ac_c" 1>&6
  10839. echo "configure:13688: checking for location of openDWG library" >&5
  10840. case "$with_opendwg_libs" in
  10841. y | ye | yes | n | no)
  10842. { echo "configure: error: *** You must supply a directory to --with-opendwg-libs." 1>&2; exit 1; }
  10843. ;;
  10844. esac
  10845. echo "$ac_t""$with_opendwg_libs" 1>&6
  10846. if test -n "$with_opendwg_libs"; then
  10847. for dir in $with_opendwg_libs; do
  10848. if test -d "$dir"; then
  10849. OPENDWGLIBPATH="$OPENDWGLIBPATH -L$dir"
  10850. else
  10851. { echo "configure: error: *** openDWG library directory $dir does not exist." 1>&2; exit 1; }
  10852. fi
  10853. done
  10854. fi
  10855. #search for ad2.a, ad3.a ... in openDWG toolkit directory:
  10856. #FIX ME how to program this test??
  10857. #LOC_CHECK_LIBS(ad?.a,adSeekLayer,openDWG,$OPENDWGLIBPATH,OPENDWGLIB,,)
  10858. #
  10859. #for now hack (but working):
  10860. TRUEOPENDWGLIBPATH=`echo "$OPENDWGLIBPATH" | cut -b3-`
  10861. adlib=`ls -1 "$TRUEOPENDWGLIBPATH"/ad?.a | tail -1`
  10862. OPENDWGLIB="$adlib"
  10863. fi # $USE_OPENDWG
  10864. # Done checking OPENDWG
  10865. # Enable pthread option
  10866. echo $ac_n "checking whether to use POSIX threads""... $ac_c" 1>&6
  10867. echo "configure:13729: checking whether to use POSIX threads" >&5
  10868. echo "$ac_t"""$with_pthread"" 1>&6
  10869. case "$with_pthread" in
  10870. "no") USE_PTHREAD= ;;
  10871. "yes") USE_PTHREAD="1" ;;
  10872. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10873. esac
  10874. PTHREADINCPATH=
  10875. PTHREADLIBPATH=
  10876. PTHREADLIB=
  10877. if test -n "$USE_PTHREAD"; then
  10878. # With pthread includes directory
  10879. echo $ac_n "checking for location of POSIX threads includes""... $ac_c" 1>&6
  10880. echo "configure:13749: checking for location of POSIX threads includes" >&5
  10881. case "$with_pthread_includes" in
  10882. y | ye | yes | n | no)
  10883. { echo "configure: error: *** You must supply a directory to --with-pthread-includes." 1>&2; exit 1; }
  10884. ;;
  10885. esac
  10886. echo "$ac_t""$with_pthread_includes" 1>&6
  10887. if test -n "$with_pthread_includes" ; then
  10888. for dir in $with_pthread_includes; do
  10889. if test -d "$dir"; then
  10890. PTHREADINCPATH="$PTHREADINCPATH -I$dir"
  10891. else
  10892. { echo "configure: error: *** POSIX threads includes directory $dir does not exist." 1>&2; exit 1; }
  10893. fi
  10894. done
  10895. fi
  10896. ac_save_cppflags="$CPPFLAGS"
  10897. CPPFLAGS="$PTHREADINCPATH $CPPFLAGS"
  10898. for ac_hdr in pthread.h
  10899. do
  10900. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10901. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10902. echo "configure:13775: checking for $ac_hdr" >&5
  10903. cat > conftest.$ac_ext <<EOF
  10904. #line 13778 "configure"
  10905. #include "confdefs.h"
  10906. #include <$ac_hdr>
  10907. EOF
  10908. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10909. { (eval echo configure:13783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10910. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10911. if test -z "$ac_err"; then
  10912. rm -rf conftest*
  10913. eval "ac_cv_header_$ac_safe=yes"
  10914. else
  10915. echo "$ac_err" >&5
  10916. echo "configure: failed program was:" >&5
  10917. cat conftest.$ac_ext >&5
  10918. rm -rf conftest*
  10919. eval "ac_cv_header_$ac_safe=no"
  10920. fi
  10921. rm -f conftest*
  10922. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10923. echo "$ac_t""yes" 1>&6
  10924. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10925. cat >> confdefs.h <<EOF
  10926. #define $ac_tr_hdr 1
  10927. EOF
  10928. else
  10929. echo "$ac_t""no" 1>&6
  10930. { echo "configure: error: *** Unable to locate POSIX threads includes." 1>&2; exit 1; }
  10931. fi
  10932. done
  10933. CPPFLAGS=$ac_save_cppflags
  10934. # With pthread library directory
  10935. echo $ac_n "checking for location of POSIX threads library""... $ac_c" 1>&6
  10936. echo "configure:13817: checking for location of POSIX threads library" >&5
  10937. case "$with_pthread_libs" in
  10938. y | ye | yes | n | no)
  10939. { echo "configure: error: *** You must supply a directory to --with-pthread-libs." 1>&2; exit 1; }
  10940. ;;
  10941. esac
  10942. echo "$ac_t""$with_pthread_libs" 1>&6
  10943. if test -n "$with_pthread_libs"; then
  10944. for dir in $with_pthread_libs; do
  10945. if test -d "$dir"; then
  10946. PTHREADLIBPATH="$PTHREADLIBPATH -L$dir"
  10947. else
  10948. { echo "configure: error: *** POSIX threads library directory $dir does not exist." 1>&2; exit 1; }
  10949. fi
  10950. done
  10951. fi
  10952. ac_save_libs="$LIBS"
  10953. ac_save_ldflags="$LDFLAGS"
  10954. LIBS=" $LIBS"
  10955. LDFLAGS=" $LDFLAGS"
  10956. echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
  10957. echo "configure:13842: checking for pthread_create" >&5
  10958. cat > conftest.$ac_ext <<EOF
  10959. #line 13845 "configure"
  10960. #include "confdefs.h"
  10961. /* System header to define __stub macros and hopefully few prototypes,
  10962. which can conflict with char pthread_create(); below. */
  10963. #include <assert.h>
  10964. /* Override any gcc2 internal prototype to avoid an error. */
  10965. /* We use char because int might match the return type of a gcc2
  10966. builtin and then its argument prototype would still apply. */
  10967. char pthread_create();
  10968. int main() {
  10969. /* The GNU C library defines this for functions which it implements
  10970. to always fail with ENOSYS. Some functions are actually named
  10971. something starting with __ and the normal name is an alias. */
  10972. #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
  10973. choke me
  10974. #else
  10975. pthread_create();
  10976. #endif
  10977. ; return 0; }
  10978. EOF
  10979. if { (eval echo configure:13868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10980. rm -rf conftest*
  10981. eval "ac_cv_func_pthread_create=yes"
  10982. else
  10983. echo "configure: failed program was:" >&5
  10984. cat conftest.$ac_ext >&5
  10985. rm -rf conftest*
  10986. eval "ac_cv_func_pthread_create=no"
  10987. fi
  10988. rm -f conftest*
  10989. if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
  10990. echo "$ac_t""yes" 1>&6
  10991. PTHREADLIB="$PTHREADLIB "
  10992. else
  10993. echo "$ac_t""no" 1>&6
  10994. ac_save_ldflags="$LDFLAGS"
  10995. LDFLAGS="$PTHREADLIBPATH $LDFLAGS"
  10996. echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
  10997. echo "configure:13895: checking for pthread_create in -lpthread" >&5
  10998. ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
  10999. ac_save_LIBS="$LIBS"
  11000. LIBS="-lpthread $LIBS"
  11001. cat > conftest.$ac_ext <<EOF
  11002. #line 13901 "configure"
  11003. #include "confdefs.h"
  11004. /* Override any gcc2 internal prototype to avoid an error. */
  11005. /* We use char because int might match the return type of a gcc2
  11006. builtin and then its argument prototype would still apply. */
  11007. char pthread_create();
  11008. int main() {
  11009. pthread_create()
  11010. ; return 0; }
  11011. EOF
  11012. if { (eval echo configure:13912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11013. rm -rf conftest*
  11014. eval "ac_cv_lib_$ac_lib_var=yes"
  11015. else
  11016. echo "configure: failed program was:" >&5
  11017. cat conftest.$ac_ext >&5
  11018. rm -rf conftest*
  11019. eval "ac_cv_lib_$ac_lib_var=no"
  11020. fi
  11021. rm -f conftest*
  11022. LIBS="$ac_save_LIBS"
  11023. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  11024. echo "$ac_t""yes" 1>&6
  11025. PTHREADLIB="$PTHREADLIB -lpthread "
  11026. else
  11027. echo "$ac_t""no" 1>&6
  11028. LDFLAGS=${ac_save_ldflags}
  11029. { echo "configure: error: *** Unable to locate POSIX threads library." 1>&2; exit 1; }
  11030. fi
  11031. LDFLAGS=${ac_save_ldflags}
  11032. fi
  11033. LIBS=${ac_save_libs}
  11034. LDFLAGS=${ac_save_ldflags}
  11035. fi # $USE_PTHREAD
  11036. # Done checking pthread
  11037. # Enable OpenMP option
  11038. echo $ac_n "checking whether to use OpenMP""... $ac_c" 1>&6
  11039. echo "configure:13962: checking whether to use OpenMP" >&5
  11040. echo "$ac_t"""$with_openmp"" 1>&6
  11041. case "$with_openmp" in
  11042. "no") USE_OPENMP= ;;
  11043. "yes") USE_OPENMP="1" ;;
  11044. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  11045. esac
  11046. OMPINCPATH=
  11047. OMPLIBPATH=
  11048. OMPLIB=
  11049. OMPCFLAGS=
  11050. if test -n "$USE_OPENMP"; then
  11051. # With OpenMP includes directory
  11052. echo $ac_n "checking for location of OpenMP includes""... $ac_c" 1>&6
  11053. echo "configure:13983: checking for location of OpenMP includes" >&5
  11054. case "$with_openmp_includes" in
  11055. y | ye | yes | n | no)
  11056. { echo "configure: error: *** You must supply a directory to --with-openmp-includes." 1>&2; exit 1; }
  11057. ;;
  11058. esac
  11059. echo "$ac_t""$with_openmp_includes" 1>&6
  11060. if test -n "$with_openmp_includes" ; then
  11061. for dir in $with_openmp_includes; do
  11062. if test -d "$dir"; then
  11063. OMPINCPATH="$OMPINCPATH -I$dir"
  11064. else
  11065. { echo "configure: error: *** OpenMP includes directory $dir does not exist." 1>&2; exit 1; }
  11066. fi
  11067. done
  11068. fi
  11069. ac_save_cppflags="$CPPFLAGS"
  11070. CPPFLAGS="$OMPINCPATH $CPPFLAGS"
  11071. for ac_hdr in omp.h
  11072. do
  11073. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  11074. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  11075. echo "configure:14009: checking for $ac_hdr" >&5
  11076. cat > conftest.$ac_ext <<EOF
  11077. #line 14012 "configure"
  11078. #include "confdefs.h"
  11079. #include <$ac_hdr>
  11080. EOF
  11081. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  11082. { (eval echo configure:14017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  11083. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  11084. if test -z "$ac_err"; then
  11085. rm -rf conftest*
  11086. eval "ac_cv_header_$ac_safe=yes"
  11087. else
  11088. echo "$ac_err" >&5
  11089. echo "configure: failed program was:" >&5
  11090. cat conftest.$ac_ext >&5
  11091. rm -rf conftest*
  11092. eval "ac_cv_header_$ac_safe=no"
  11093. fi
  11094. rm -f conftest*
  11095. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  11096. echo "$ac_t""yes" 1>&6
  11097. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  11098. cat >> confdefs.h <<EOF
  11099. #define $ac_tr_hdr 1
  11100. EOF
  11101. else
  11102. echo "$ac_t""no" 1>&6
  11103. { echo "configure: error: *** Unable to locate OpenMP includes." 1>&2; exit 1; }
  11104. fi
  11105. done
  11106. CPPFLAGS=$ac_save_cppflags
  11107. # With OpenMP library directory
  11108. # GCC et al.: -lgomp
  11109. # Solaris cc: -lmtsk
  11110. # AIX xlc: -lxlsmp
  11111. # SGI IRIX 6.5 MIPSpro C/C++: -lmp
  11112. echo $ac_n "checking for location of OpenMP library""... $ac_c" 1>&6
  11113. echo "configure:14055: checking for location of OpenMP library" >&5
  11114. case "$with_gomp_libs" in
  11115. y | ye | yes | n | no)
  11116. { echo "configure: error: *** You must supply a directory to --with-gomp-libs." 1>&2; exit 1; }
  11117. ;;
  11118. esac
  11119. echo "$ac_t""$with_gomp_libs" 1>&6
  11120. if test -n "$with_gomp_libs"; then
  11121. for dir in $with_gomp_libs; do
  11122. if test -d "$dir"; then
  11123. OMPLIBPATH="$OMPLIBPATH -L$dir"
  11124. else
  11125. { echo "configure: error: *** OpenMP library directory $dir does not exist." 1>&2; exit 1; }
  11126. fi
  11127. done
  11128. fi
  11129. ac_save_libs="$LIBS"
  11130. ac_save_ldflags="$LDFLAGS"
  11131. LIBS=" $LIBS"
  11132. LDFLAGS=" $LDFLAGS"
  11133. echo $ac_n "checking for GOMP_parallel_start""... $ac_c" 1>&6
  11134. echo "configure:14080: checking for GOMP_parallel_start" >&5
  11135. cat > conftest.$ac_ext <<EOF
  11136. #line 14083 "configure"
  11137. #include "confdefs.h"
  11138. /* System header to define __stub macros and hopefully few prototypes,
  11139. which can conflict with char GOMP_parallel_start(); below. */
  11140. #include <assert.h>
  11141. /* Override any gcc2 internal prototype to avoid an error. */
  11142. /* We use char because int might match the return type of a gcc2
  11143. builtin and then its argument prototype would still apply. */
  11144. char GOMP_parallel_start();
  11145. int main() {
  11146. /* The GNU C library defines this for functions which it implements
  11147. to always fail with ENOSYS. Some functions are actually named
  11148. something starting with __ and the normal name is an alias. */
  11149. #if defined (__stub_GOMP_parallel_start) || defined (__stub___GOMP_parallel_start)
  11150. choke me
  11151. #else
  11152. GOMP_parallel_start();
  11153. #endif
  11154. ; return 0; }
  11155. EOF
  11156. if { (eval echo configure:14106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11157. rm -rf conftest*
  11158. eval "ac_cv_func_GOMP_parallel_start=yes"
  11159. else
  11160. echo "configure: failed program was:" >&5
  11161. cat conftest.$ac_ext >&5
  11162. rm -rf conftest*
  11163. eval "ac_cv_func_GOMP_parallel_start=no"
  11164. fi
  11165. rm -f conftest*
  11166. if eval "test \"`echo '$ac_cv_func_'GOMP_parallel_start`\" = yes"; then
  11167. echo "$ac_t""yes" 1>&6
  11168. OMPLIB="$OMPLIB "
  11169. else
  11170. echo "$ac_t""no" 1>&6
  11171. ac_save_ldflags="$LDFLAGS"
  11172. LDFLAGS="$OMPLIBPATH $LDFLAGS"
  11173. echo $ac_n "checking for GOMP_parallel_start in -lgomp""... $ac_c" 1>&6
  11174. echo "configure:14133: checking for GOMP_parallel_start in -lgomp" >&5
  11175. ac_lib_var=`echo gomp'_'GOMP_parallel_start | sed 'y%./+-%__p_%'`
  11176. ac_save_LIBS="$LIBS"
  11177. LIBS="-lgomp $LIBS"
  11178. cat > conftest.$ac_ext <<EOF
  11179. #line 14139 "configure"
  11180. #include "confdefs.h"
  11181. /* Override any gcc2 internal prototype to avoid an error. */
  11182. /* We use char because int might match the return type of a gcc2
  11183. builtin and then its argument prototype would still apply. */
  11184. char GOMP_parallel_start();
  11185. int main() {
  11186. GOMP_parallel_start()
  11187. ; return 0; }
  11188. EOF
  11189. if { (eval echo configure:14150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11190. rm -rf conftest*
  11191. eval "ac_cv_lib_$ac_lib_var=yes"
  11192. else
  11193. echo "configure: failed program was:" >&5
  11194. cat conftest.$ac_ext >&5
  11195. rm -rf conftest*
  11196. eval "ac_cv_lib_$ac_lib_var=no"
  11197. fi
  11198. rm -f conftest*
  11199. LIBS="$ac_save_LIBS"
  11200. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  11201. echo "$ac_t""yes" 1>&6
  11202. OMPLIB="$OMPLIB -lgomp "
  11203. else
  11204. echo "$ac_t""no" 1>&6
  11205. LDFLAGS=${ac_save_ldflags}
  11206. { echo "configure: error: *** Unable to locate OpenMP library." 1>&2; exit 1; }
  11207. fi
  11208. LDFLAGS=${ac_save_ldflags}
  11209. fi
  11210. LIBS=${ac_save_libs}
  11211. LDFLAGS=${ac_save_ldflags}
  11212. # compiler dependent
  11213. #if test ${CC} = "gcc" ; then
  11214. if test x$GCC = xyes ; then
  11215. # GNU C compiler (>= 4.2.1)
  11216. OMPCFLAGS=-fopenmp
  11217. elif test ${CC} = "icc" ; then
  11218. # Intel compiler
  11219. OMPCFLAGS=-openmp
  11220. elif test ${CC} = "opencc" ; then
  11221. # AMD's x86 Open64 compiler
  11222. OMPCFLAGS=-mp
  11223. elif test ${CC} = "pgcc" ; then
  11224. # Portland Group's compiler
  11225. OMPCFLAGS=-mp
  11226. # ... anybody else?
  11227. fi
  11228. # try to build a test program with "$CC $OMPCLFAGS" to confirm it works
  11229. #...how?
  11230. #echo "int main() {return 0;}" > test.c
  11231. #$CC $OMPCLFAGS test.c -o test
  11232. fi # $USE_OPENMP
  11233. # Done checking OpenMP
  11234. # Enable LFS (from cdr-tools)
  11235. # Check whether --enable-largefile or --disable-largefile was given.
  11236. if test "${enable_largefile+set}" = set; then
  11237. enableval="$enable_largefile"
  11238. :
  11239. fi
  11240. if test "$enable_largefile" = yes; then
  11241. echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6
  11242. echo "configure:14229: checking for special C compiler options needed for large files" >&5
  11243. ac_cv_sys_largefile_CC=no
  11244. largefile_cc_opt=""
  11245. if test "$GCC" != yes; then
  11246. # IRIX 6.2 and later do not support large files by default,
  11247. # so use the C compiler's -n32 option if that helps.
  11248. cat > conftest.$ac_ext <<EOF
  11249. #line 14237 "configure"
  11250. #include "confdefs.h"
  11251. #include <sys/types.h>
  11252. /* Check that off_t can represent 2**63 - 1 correctly.
  11253. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11254. since some C++ compilers masquerading as C compilers
  11255. incorrectly reject 9223372036854775807. */
  11256. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11257. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11258. && LARGE_OFF_T % 2147483647 == 1)
  11259. ? 1 : -1];
  11260. int main() {
  11261. ; return 0; }
  11262. EOF
  11263. if { (eval echo configure:14253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11264. :
  11265. else
  11266. echo "configure: failed program was:" >&5
  11267. cat conftest.$ac_ext >&5
  11268. rm -rf conftest*
  11269. ac_save_CC="${CC-cc}"
  11270. CC="$CC -n32"
  11271. cat > conftest.$ac_ext <<EOF
  11272. #line 14262 "configure"
  11273. #include "confdefs.h"
  11274. #include <sys/types.h>
  11275. /* Check that off_t can represent 2**63 - 1 correctly.
  11276. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11277. since some C++ compilers masquerading as C compilers
  11278. incorrectly reject 9223372036854775807. */
  11279. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11280. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11281. && LARGE_OFF_T % 2147483647 == 1)
  11282. ? 1 : -1];
  11283. int main() {
  11284. ; return 0; }
  11285. EOF
  11286. if { (eval echo configure:14278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11287. rm -rf conftest*
  11288. ac_cv_sys_largefile_CC=' -n32'
  11289. else
  11290. echo "configure: failed program was:" >&5
  11291. cat conftest.$ac_ext >&5
  11292. fi
  11293. rm -f conftest*
  11294. CC="$ac_save_CC"
  11295. fi
  11296. rm -f conftest*
  11297. fi
  11298. echo "$ac_t""$ac_cv_sys_largefile_CC" 1>&6
  11299. if test "$ac_cv_sys_largefile_CC" != no; then
  11300. CC="$CC$ac_cv_sys_largefile_CC"
  11301. largefile_cc_opt="$ac_cv_sys_largefile_CC"
  11302. fi
  11303. echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6
  11304. echo "configure:14298: checking for _FILE_OFFSET_BITS value needed for large files" >&5
  11305. ac_cv_sys_file_offset_bits=no
  11306. cat > conftest.$ac_ext <<EOF
  11307. #line 14302 "configure"
  11308. #include "confdefs.h"
  11309. #include <sys/types.h>
  11310. /* Check that off_t can represent 2**63 - 1 correctly.
  11311. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11312. since some C++ compilers masquerading as C compilers
  11313. incorrectly reject 9223372036854775807. */
  11314. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11315. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11316. && LARGE_OFF_T % 2147483647 == 1)
  11317. ? 1 : -1];
  11318. int main() {
  11319. ; return 0; }
  11320. EOF
  11321. if { (eval echo configure:14318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11322. :
  11323. else
  11324. echo "configure: failed program was:" >&5
  11325. cat conftest.$ac_ext >&5
  11326. rm -rf conftest*
  11327. cat > conftest.$ac_ext <<EOF
  11328. #line 14325 "configure"
  11329. #include "confdefs.h"
  11330. #define _FILE_OFFSET_BITS 64
  11331. #include <sys/types.h>
  11332. /* Check that off_t can represent 2**63 - 1 correctly.
  11333. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11334. since some C++ compilers masquerading as C compilers
  11335. incorrectly reject 9223372036854775807. */
  11336. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11337. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11338. && LARGE_OFF_T % 2147483647 == 1)
  11339. ? 1 : -1];
  11340. int main() {
  11341. ; return 0; }
  11342. EOF
  11343. if { (eval echo configure:14343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11344. rm -rf conftest*
  11345. ac_cv_sys_file_offset_bits=64
  11346. else
  11347. echo "configure: failed program was:" >&5
  11348. cat conftest.$ac_ext >&5
  11349. fi
  11350. rm -f conftest*
  11351. fi
  11352. rm -f conftest*
  11353. echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
  11354. if test "$ac_cv_sys_file_offset_bits" != no; then
  11355. cat >> confdefs.h <<EOF
  11356. #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
  11357. EOF
  11358. fi
  11359. echo $ac_n "checking for _LARGE_FILES value needed for large files""... $ac_c" 1>&6
  11360. echo "configure:14362: checking for _LARGE_FILES value needed for large files" >&5
  11361. ac_cv_sys_large_files=no
  11362. cat > conftest.$ac_ext <<EOF
  11363. #line 14366 "configure"
  11364. #include "confdefs.h"
  11365. #include <sys/types.h>
  11366. /* Check that off_t can represent 2**63 - 1 correctly.
  11367. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11368. since some C++ compilers masquerading as C compilers
  11369. incorrectly reject 9223372036854775807. */
  11370. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11371. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11372. && LARGE_OFF_T % 2147483647 == 1)
  11373. ? 1 : -1];
  11374. int main() {
  11375. ; return 0; }
  11376. EOF
  11377. if { (eval echo configure:14382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11378. :
  11379. else
  11380. echo "configure: failed program was:" >&5
  11381. cat conftest.$ac_ext >&5
  11382. rm -rf conftest*
  11383. cat > conftest.$ac_ext <<EOF
  11384. #line 14389 "configure"
  11385. #include "confdefs.h"
  11386. #define _LARGE_FILES 1
  11387. #include <sys/types.h>
  11388. /* Check that off_t can represent 2**63 - 1 correctly.
  11389. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11390. since some C++ compilers masquerading as C compilers
  11391. incorrectly reject 9223372036854775807. */
  11392. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11393. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11394. && LARGE_OFF_T % 2147483647 == 1)
  11395. ? 1 : -1];
  11396. int main() {
  11397. ; return 0; }
  11398. EOF
  11399. if { (eval echo configure:14407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11400. rm -rf conftest*
  11401. ac_cv_sys_large_files=1
  11402. else
  11403. echo "configure: failed program was:" >&5
  11404. cat conftest.$ac_ext >&5
  11405. fi
  11406. rm -f conftest*
  11407. fi
  11408. rm -f conftest*
  11409. echo "$ac_t""$ac_cv_sys_large_files" 1>&6
  11410. if test "$ac_cv_sys_large_files" != no; then
  11411. cat >> confdefs.h <<EOF
  11412. #define _LARGE_FILES $ac_cv_sys_large_files
  11413. EOF
  11414. fi
  11415. echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
  11416. echo "configure:14426: checking for _LARGEFILE_SOURCE value needed for large files" >&5
  11417. ac_cv_sys_largefile_source=no
  11418. cat > conftest.$ac_ext <<EOF
  11419. #line 14430 "configure"
  11420. #include "confdefs.h"
  11421. #include <stdio.h>
  11422. int main() {
  11423. return !fseeko;
  11424. ; return 0; }
  11425. EOF
  11426. if { (eval echo configure:14437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11427. :
  11428. else
  11429. echo "configure: failed program was:" >&5
  11430. cat conftest.$ac_ext >&5
  11431. rm -rf conftest*
  11432. cat > conftest.$ac_ext <<EOF
  11433. #line 14444 "configure"
  11434. #include "confdefs.h"
  11435. #define _LARGEFILE_SOURCE 1
  11436. #include <stdio.h>
  11437. int main() {
  11438. return !fseeko;
  11439. ; return 0; }
  11440. EOF
  11441. if { (eval echo configure:14453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11442. rm -rf conftest*
  11443. ac_cv_sys_largefile_source=1
  11444. else
  11445. echo "configure: failed program was:" >&5
  11446. cat conftest.$ac_ext >&5
  11447. fi
  11448. rm -f conftest*
  11449. fi
  11450. rm -f conftest*
  11451. echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
  11452. if test "$ac_cv_sys_largefile_source" != no; then
  11453. cat >> confdefs.h <<EOF
  11454. #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
  11455. EOF
  11456. fi
  11457. fi
  11458. echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
  11459. echo "configure:14474: checking for _LARGEFILE_SOURCE value needed for large files" >&5
  11460. ac_cv_sys_largefile_source=no
  11461. cat > conftest.$ac_ext <<EOF
  11462. #line 14478 "configure"
  11463. #include "confdefs.h"
  11464. #include <stdio.h>
  11465. int main() {
  11466. return !fseeko;
  11467. ; return 0; }
  11468. EOF
  11469. if { (eval echo configure:14485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11470. :
  11471. else
  11472. echo "configure: failed program was:" >&5
  11473. cat conftest.$ac_ext >&5
  11474. rm -rf conftest*
  11475. cat > conftest.$ac_ext <<EOF
  11476. #line 14492 "configure"
  11477. #include "confdefs.h"
  11478. #define _LARGEFILE_SOURCE 1
  11479. #include <stdio.h>
  11480. int main() {
  11481. return !fseeko;
  11482. ; return 0; }
  11483. EOF
  11484. if { (eval echo configure:14501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11485. rm -rf conftest*
  11486. ac_cv_sys_largefile_source=1
  11487. else
  11488. echo "configure: failed program was:" >&5
  11489. cat conftest.$ac_ext >&5
  11490. fi
  11491. rm -f conftest*
  11492. fi
  11493. rm -f conftest*
  11494. echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
  11495. if test "$ac_cv_sys_largefile_source" != no; then
  11496. cat >> confdefs.h <<EOF
  11497. #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
  11498. EOF
  11499. fi
  11500. # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
  11501. # in glibc 2.1.3, but that breaks too many other things.
  11502. # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
  11503. echo $ac_n "checking for fseeko""... $ac_c" 1>&6
  11504. echo "configure:14524: checking for fseeko" >&5
  11505. ac_cv_func_fseeko=no
  11506. cat > conftest.$ac_ext <<EOF
  11507. #line 14528 "configure"
  11508. #include "confdefs.h"
  11509. #include <stdio.h>
  11510. int main() {
  11511. return fseeko && fseeko (stdin, 0, 0);
  11512. ; return 0; }
  11513. EOF
  11514. if { (eval echo configure:14535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11515. rm -rf conftest*
  11516. ac_cv_func_fseeko=yes
  11517. else
  11518. echo "configure: failed program was:" >&5
  11519. cat conftest.$ac_ext >&5
  11520. fi
  11521. rm -f conftest*
  11522. echo "$ac_t""$ac_cv_func_fseeko" 1>&6
  11523. if test $ac_cv_func_fseeko != no; then
  11524. cat >> confdefs.h <<\EOF
  11525. #define HAVE_FSEEKO 1
  11526. EOF
  11527. fi
  11528. echo $ac_n "checking if system supports Large Files at all""... $ac_c" 1>&6
  11529. echo "configure:14552: checking if system supports Large Files at all" >&5
  11530. cat > conftest.$ac_ext <<EOF
  11531. #line 14555 "configure"
  11532. #include "confdefs.h"
  11533. #include <stdio.h>
  11534. #include <sys/types.h>
  11535. int main() {
  11536. /*
  11537. * Check that off_t can represent 2**63 - 1 correctly.
  11538. * We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11539. * since some C++ compilers masquerading as C compilers
  11540. * incorrectly reject 9223372036854775807.
  11541. *
  11542. * For MinGW, off64_t should be used and __MSVCRT_VERSION__ >= 0x0601
  11543. * (msvcrt.dll version 6.10 or higher) is needed for _fstat64 and _stat64.
  11544. */
  11545. #ifdef __MINGW32__
  11546. # define LARGE_OFF_T (((off64_t) 1 << 62) - 1 + ((off64_t) 1 << 62))
  11547. #else
  11548. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11549. #endif
  11550. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11551. && LARGE_OFF_T % 2147483647 == 1)
  11552. ? 1 : -1];
  11553. #ifdef __MINGW32__
  11554. return !fseeko64;
  11555. return !ftello64;
  11556. #else
  11557. return !fseeko;
  11558. return !ftello;
  11559. #endif
  11560. ; return 0; }
  11561. EOF
  11562. if { (eval echo configure:14587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11563. rm -rf conftest*
  11564. ac_cv_largefiles=yes
  11565. else
  11566. echo "configure: failed program was:" >&5
  11567. cat conftest.$ac_ext >&5
  11568. rm -rf conftest*
  11569. ac_cv_largefiles=no
  11570. fi
  11571. rm -f conftest*
  11572. echo "$ac_t""$ac_cv_largefiles" 1>&6
  11573. if test $ac_cv_largefiles = yes; then
  11574. cat >> confdefs.h <<\EOF
  11575. #define HAVE_LARGEFILES 1
  11576. EOF
  11577. fi
  11578. USE_LARGEFILES=
  11579. if test $ac_cv_largefiles = yes; then
  11580. USE_LARGEFILES=1
  11581. fi
  11582. # Done large file support
  11583. # Enable wxWidgets support (for wxGUI)
  11584. echo $ac_n "checking whether to use wxWidgets""... $ac_c" 1>&6
  11585. echo "configure:14616: checking whether to use wxWidgets" >&5
  11586. WXVERSION=
  11587. WXWIDGETSCXXFLAGS=
  11588. WXWIDGETSCPPFLAGS=
  11589. WXWIDGETSLIB=
  11590. USE_WXWIDGETS=
  11591. MACOSX_ARCHS_WXPYTHON=
  11592. if test "$with_wxwidgets" = "no" ; then
  11593. echo "$ac_t""no" 1>&6
  11594. else
  11595. echo "$ac_t""yes" 1>&6
  11596. USE_WXWIDGETS="1"
  11597. if test "$with_wxwidgets" != "yes" ; then
  11598. WX_CONFIG="$with_wxwidgets"
  11599. fi
  11600. # Extract the first word of "wx-config", so it can be a program name with args.
  11601. set dummy wx-config; ac_word=$2
  11602. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  11603. echo "configure:14637: checking for $ac_word" >&5
  11604. case "$WX_CONFIG" in
  11605. /*)
  11606. ac_cv_path_WX_CONFIG="$WX_CONFIG" # Let the user override the test with a path.
  11607. ;;
  11608. ?:/*)
  11609. ac_cv_path_WX_CONFIG="$WX_CONFIG" # Let the user override the test with a dos path.
  11610. ;;
  11611. *)
  11612. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  11613. ac_dummy="$PATH"
  11614. for ac_dir in $ac_dummy; do
  11615. test -z "$ac_dir" && ac_dir=.
  11616. if test -f $ac_dir/$ac_word; then
  11617. ac_cv_path_WX_CONFIG="$ac_dir/$ac_word"
  11618. break
  11619. fi
  11620. done
  11621. IFS="$ac_save_ifs"
  11622. test -z "$ac_cv_path_WX_CONFIG" && ac_cv_path_WX_CONFIG="no"
  11623. ;;
  11624. esac
  11625. WX_CONFIG="$ac_cv_path_WX_CONFIG"
  11626. if test -n "$WX_CONFIG"; then
  11627. echo "$ac_t""$WX_CONFIG" 1>&6
  11628. else
  11629. echo "$ac_t""no" 1>&6
  11630. fi
  11631. if test "$WX_CONFIG" = "no" ; then
  11632. { echo "configure: error: *** couldn't find wx-config
  11633. wxWidgets must be installed on your system.
  11634. Please check that wx-config is in path, the directory
  11635. where wxWidgets libraries are installed (returned by
  11636. 'wx-config --libs' or 'wx-config --static --libs' command)
  11637. is in LD_LIBRARY_PATH or equivalent variable and
  11638. wxWidgets version is 2.8.1 or above." 1>&2; exit 1; }
  11639. fi
  11640. # Check wxWidgets version
  11641. REQWX="2.8.1"
  11642. echo $ac_n "checking wxWidgets version""... $ac_c" 1>&6
  11643. echo "configure:14685: checking wxWidgets version" >&5
  11644. if WXVERSION=`"$WX_CONFIG" --version`; then
  11645. echo "$ac_t""$WXVERSION" 1>&6
  11646. else
  11647. echo "$ac_t""not found" 1>&6
  11648. { echo "configure: error: wxWidgets is required." 1>&2; exit 1; }
  11649. fi
  11650. if test `expr "$WXVERSION" \< "$REQWX"` = 1 ; then
  11651. { echo "configure: error: *** wxWidgets "$REQWX" or later is required." 1>&2; exit 1; }
  11652. fi
  11653. # With wxWidgets includes directory
  11654. WXWIDGETSCXXFLAGS=`"$WX_CONFIG" --cxxflags`
  11655. WXWIDGETSCPPFLAGS=`"$WX_CONFIG" --cppflags`
  11656. ac_save_cppflags="$CPPFLAGS"
  11657. CPPFLAGS="$WXWIDGETSCPPFLAGS $CPPFLAGS"
  11658. for ac_hdr in wx/wxprec.h
  11659. do
  11660. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  11661. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  11662. echo "configure:14708: checking for $ac_hdr" >&5
  11663. cat > conftest.$ac_ext <<EOF
  11664. #line 14711 "configure"
  11665. #include "confdefs.h"
  11666. #include <$ac_hdr>
  11667. EOF
  11668. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  11669. { (eval echo configure:14716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  11670. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  11671. if test -z "$ac_err"; then
  11672. rm -rf conftest*
  11673. eval "ac_cv_header_$ac_safe=yes"
  11674. else
  11675. echo "$ac_err" >&5
  11676. echo "configure: failed program was:" >&5
  11677. cat conftest.$ac_ext >&5
  11678. rm -rf conftest*
  11679. eval "ac_cv_header_$ac_safe=no"
  11680. fi
  11681. rm -f conftest*
  11682. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  11683. echo "$ac_t""yes" 1>&6
  11684. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  11685. cat >> confdefs.h <<EOF
  11686. #define $ac_tr_hdr 1
  11687. EOF
  11688. else
  11689. echo "$ac_t""no" 1>&6
  11690. { echo "configure: error: *** Unable to locate wxWidgets includes." 1>&2; exit 1; }
  11691. fi
  11692. done
  11693. CPPFLAGS=$ac_save_cppflags
  11694. # With wxWidgets library directory
  11695. WXWIDGETSLIB=`"$WX_CONFIG" --libs`
  11696. # shouldn't have arch flags in C/LD flags on OSX
  11697. for a in i386 ppc x86_64 ppc64
  11698. do
  11699. WXWIDGETSCXXFLAGS=`echo "$WXWIDGETSCXXFLAGS" | sed "s/-arch *$a//g"`
  11700. WXWIDGETSCPPFLAGS=`echo "$WXWIDGETSCPPFLAGS" | sed "s/-arch *$a//g"`
  11701. WXWIDGETSLIB=`echo "$WXWIDGETSLIB" | sed "s/-arch *$a//g"`
  11702. done
  11703. # check for available OSX archs in wxPython
  11704. if test -n "$MACOSX_ARCHS" ; then
  11705. wxver=`"$WX_CONFIG" --version`
  11706. wxlib=`"$WX_CONFIG" --prefix`/lib/lib`"$WX_CONFIG" --basename`-`echo "$wxver" | cut -d . -f1,2`.dylib
  11707. wxlibinfo=`file "$wxlib"`
  11708. for a in i386 ppc x86_64 ppc64
  11709. do
  11710. # add only if in MACOSX_ARCHS
  11711. if test -n "`echo \"$wxlibinfo\" | grep \"library $a\"`" ; then
  11712. if test -n "`echo \"$MACOSX_ARCHS\" | grep $a`" ; then
  11713. MACOSX_ARCHS_WXPYTHON="$MACOSX_ARCHS_WXPYTHON -arch $a"
  11714. fi
  11715. fi
  11716. done
  11717. fi
  11718. fi # $USE_WXWIDGETS
  11719. # Done checking wxWidgets
  11720. USE_TERMIO=
  11721. STRIPFLAG=
  11722. GRASS_HOME="${DSTDIR}"
  11723. trap '' 1 2 15
  11724. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  11725. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  11726. # Let make expand exec_prefix.
  11727. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  11728. # Any assignment to VPATH causes Sun make to only execute
  11729. # the first set of double-colon rules, so remove it if not needed.
  11730. # If there is a colon in the path, we need to keep it.
  11731. if test "x$srcdir" = x.; then
  11732. ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
  11733. fi
  11734. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  11735. DEFS=-DHAVE_CONFIG_H
  11736. # Without the "./", some shells look in PATH for config.status.
  11737. : ${CONFIG_STATUS=./config.status}
  11738. echo creating $CONFIG_STATUS
  11739. rm -f $CONFIG_STATUS
  11740. cat > $CONFIG_STATUS <<EOF
  11741. #! /bin/sh
  11742. # Generated automatically by configure.
  11743. # Run this file to recreate the current configuration.
  11744. # This directory was configured as follows,
  11745. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  11746. #
  11747. # $0 $ac_configure_args
  11748. #
  11749. # Compiler output produced by configure, useful for debugging
  11750. # configure, is in ./config.log if it exists.
  11751. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  11752. for ac_option
  11753. do
  11754. case "\$ac_option" in
  11755. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  11756. echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  11757. exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  11758. -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  11759. echo "$CONFIG_STATUS generated by autoconf version 2.13"
  11760. exit 0 ;;
  11761. -help | --help | --hel | --he | --h)
  11762. echo "\$ac_cs_usage"; exit 0 ;;
  11763. *) echo "\$ac_cs_usage"; exit 1 ;;
  11764. esac
  11765. done
  11766. ac_given_srcdir=$srcdir
  11767. ac_given_INSTALL="$INSTALL"
  11768. 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
  11769. EOF
  11770. cat >> $CONFIG_STATUS <<EOF
  11771. # Protect against being on the right side of a sed subst in config.status.
  11772. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  11773. s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  11774. $ac_vpsub
  11775. $extrasub
  11776. s%@SHELL@%$SHELL%g
  11777. s%@CFLAGS@%$CFLAGS%g
  11778. s%@CPPFLAGS@%$CPPFLAGS%g
  11779. s%@CXXFLAGS@%$CXXFLAGS%g
  11780. s%@FFLAGS@%$FFLAGS%g
  11781. s%@DEFS@%$DEFS%g
  11782. s%@LDFLAGS@%$LDFLAGS%g
  11783. s%@LIBS@%$LIBS%g
  11784. s%@exec_prefix@%$exec_prefix%g
  11785. s%@prefix@%$prefix%g
  11786. s%@program_transform_name@%$program_transform_name%g
  11787. s%@bindir@%$bindir%g
  11788. s%@sbindir@%$sbindir%g
  11789. s%@libexecdir@%$libexecdir%g
  11790. s%@datadir@%$datadir%g
  11791. s%@sysconfdir@%$sysconfdir%g
  11792. s%@sharedstatedir@%$sharedstatedir%g
  11793. s%@localstatedir@%$localstatedir%g
  11794. s%@libdir@%$libdir%g
  11795. s%@includedir@%$includedir%g
  11796. s%@oldincludedir@%$oldincludedir%g
  11797. s%@infodir@%$infodir%g
  11798. s%@mandir@%$mandir%g
  11799. s%@host@%$host%g
  11800. s%@host_alias@%$host_alias%g
  11801. s%@host_cpu@%$host_cpu%g
  11802. s%@host_vendor@%$host_vendor%g
  11803. s%@host_os@%$host_os%g
  11804. s%@CC@%$CC%g
  11805. s%@EXEEXT@%$EXEEXT%g
  11806. s%@MINGW32@%$MINGW32%g
  11807. s%@BINDIR@%$BINDIR%g
  11808. s%@pwd@%$pwd%g
  11809. s%@SRCDIR@%$SRCDIR%g
  11810. s%@DSTDIR@%$DSTDIR%g
  11811. s%@ARCH@%$ARCH%g
  11812. s%@GISBASE@%$GISBASE%g
  11813. s%@GRASS_BIN@%$GRASS_BIN%g
  11814. s%@SVN_VERSION@%$SVN_VERSION%g
  11815. s%@GRASS_VERSION_FILE@%$GRASS_VERSION_FILE%g
  11816. s%@GRASS_VERSION_MAJOR@%$GRASS_VERSION_MAJOR%g
  11817. s%@GRASS_VERSION_MINOR@%$GRASS_VERSION_MINOR%g
  11818. s%@GRASS_VERSION_RELEASE@%$GRASS_VERSION_RELEASE%g
  11819. s%@GRASS_VERSION_NUMBER@%$GRASS_VERSION_NUMBER%g
  11820. s%@GRASS_VERSION_DATE@%$GRASS_VERSION_DATE%g
  11821. s%@GRASS_VERSION_SVN@%$GRASS_VERSION_SVN%g
  11822. s%@NAME_VER@%$NAME_VER%g
  11823. s%@LIB_VER@%$LIB_VER%g
  11824. s%@MACOSX_APP@%$MACOSX_APP%g
  11825. s%@MACOSX_ARCHS@%$MACOSX_ARCHS%g
  11826. s%@MACOSX_SDK@%$MACOSX_SDK%g
  11827. s%@INSTDIR@%$INSTDIR%g
  11828. s%@GRASS_LIBRARY_TYPE@%$GRASS_LIBRARY_TYPE%g
  11829. s%@PLAT_OBJS@%$PLAT_OBJS%g
  11830. s%@CC_SEARCH_FLAGS@%$CC_SEARCH_FLAGS%g
  11831. s%@LD_SEARCH_FLAGS@%$LD_SEARCH_FLAGS%g
  11832. s%@LD_LIBRARY_PATH_VAR@%$LD_LIBRARY_PATH_VAR%g
  11833. s%@SHLIB_LD@%$SHLIB_LD%g
  11834. s%@SHLIB_LD_FLAGS@%$SHLIB_LD_FLAGS%g
  11835. s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
  11836. s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
  11837. s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
  11838. s%@STLIB_LD@%$STLIB_LD%g
  11839. s%@STLIB_SUFFIX@%$STLIB_SUFFIX%g
  11840. s%@INCLUDE_DIRS@%$INCLUDE_DIRS%g
  11841. s%@LIBRARY_DIRS@%$LIBRARY_DIRS%g
  11842. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  11843. s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
  11844. s%@INSTALL_DATA@%$INSTALL_DATA%g
  11845. s%@LEX@%$LEX%g
  11846. s%@LEXLIB@%$LEXLIB%g
  11847. s%@LEXPATH@%$LEXPATH%g
  11848. s%@YACC@%$YACC%g
  11849. s%@YACCPATH@%$YACCPATH%g
  11850. s%@RANLIB@%$RANLIB%g
  11851. s%@AR@%$AR%g
  11852. s%@ENV@%$ENV%g
  11853. s%@PERL@%$PERL%g
  11854. s%@CPP@%$CPP%g
  11855. s%@CROSS_COMPILING@%$CROSS_COMPILING%g
  11856. s%@X_CFLAGS@%$X_CFLAGS%g
  11857. s%@X_LIBS@%$X_LIBS%g
  11858. s%@X_PRE_LIBS@%$X_PRE_LIBS%g
  11859. s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
  11860. s%@XLIB@%$XLIB%g
  11861. s%@XTLIB@%$XTLIB%g
  11862. s%@USE_X11@%$USE_X11%g
  11863. s%@DBMIEXTRALIB@%$DBMIEXTRALIB%g
  11864. s%@XDRLIB@%$XDRLIB%g
  11865. s%@HAVE_ASPRINTF@%$HAVE_ASPRINTF%g
  11866. s%@MATHLIB@%$MATHLIB%g
  11867. s%@DLLIB@%$DLLIB%g
  11868. s%@ICONVLIB@%$ICONVLIB%g
  11869. s%@SOCKLIB@%$SOCKLIB%g
  11870. s%@HAVE_SOCKET@%$HAVE_SOCKET%g
  11871. s%@ZLIBINCPATH@%$ZLIBINCPATH%g
  11872. s%@ZLIBLIBPATH@%$ZLIBLIBPATH%g
  11873. s%@ZLIB@%$ZLIB%g
  11874. s%@PROJINC@%$PROJINC%g
  11875. s%@PROJLIB@%$PROJLIB%g
  11876. s%@PROJSHARE@%$PROJSHARE%g
  11877. s%@NAD2BIN@%$NAD2BIN%g
  11878. s%@REGEXINCPATH@%$REGEXINCPATH%g
  11879. s%@REGEXLIBPATH@%$REGEXLIBPATH%g
  11880. s%@REGEXLIB@%$REGEXLIB%g
  11881. s%@USE_REGEX@%$USE_REGEX%g
  11882. s%@READLINEINCPATH@%$READLINEINCPATH%g
  11883. s%@READLINELIBPATH@%$READLINELIBPATH%g
  11884. s%@READLINELIB@%$READLINELIB%g
  11885. s%@HISTORYLIB@%$HISTORYLIB%g
  11886. s%@JPEGINCPATH@%$JPEGINCPATH%g
  11887. s%@JPEGLIBPATH@%$JPEGLIBPATH%g
  11888. s%@JPEGLIB@%$JPEGLIB%g
  11889. s%@GDAL_CONFIG@%$GDAL_CONFIG%g
  11890. s%@GDAL_LIBS@%$GDAL_LIBS%g
  11891. s%@GDAL_CFLAGS@%$GDAL_CFLAGS%g
  11892. s%@USE_GDAL@%$USE_GDAL%g
  11893. s%@USE_OGR@%$USE_OGR%g
  11894. s%@LIBLAS_CONFIG@%$LIBLAS_CONFIG%g
  11895. s%@LIBLAS_LIBS@%$LIBLAS_LIBS%g
  11896. s%@LIBLAS_CFLAGS@%$LIBLAS_CFLAGS%g
  11897. s%@LIBLAS_INC@%$LIBLAS_INC%g
  11898. s%@USE_LIBLAS@%$USE_LIBLAS%g
  11899. s%@GEOS_CONFIG@%$GEOS_CONFIG%g
  11900. s%@GEOS_LIBS@%$GEOS_LIBS%g
  11901. s%@GEOS_CFLAGS@%$GEOS_CFLAGS%g
  11902. s%@USE_GEOS@%$USE_GEOS%g
  11903. s%@TIFF_INCLUDE_DIRS@%$TIFF_INCLUDE_DIRS%g
  11904. s%@TIFF_LIBRARY_DIRS@%$TIFF_LIBRARY_DIRS%g
  11905. s%@TIFFLIB@%$TIFFLIB%g
  11906. s%@PNGINC@%$PNGINC%g
  11907. s%@PNGLIB@%$PNGLIB%g
  11908. s%@USE_PNG@%$USE_PNG%g
  11909. s%@USE_POSTGRES@%$USE_POSTGRES%g
  11910. s%@PQINCPATH@%$PQINCPATH%g
  11911. s%@PQLIBPATH@%$PQLIBPATH%g
  11912. s%@PQLIB@%$PQLIB%g
  11913. s%@MYSQLD_CONFIG@%$MYSQLD_CONFIG%g
  11914. s%@USE_MYSQL@%$USE_MYSQL%g
  11915. s%@MYSQLINCPATH@%$MYSQLINCPATH%g
  11916. s%@MYSQLLIBPATH@%$MYSQLLIBPATH%g
  11917. s%@MYSQLLIB@%$MYSQLLIB%g
  11918. s%@MYSQLDLIB@%$MYSQLDLIB%g
  11919. s%@USE_SQLITE@%$USE_SQLITE%g
  11920. s%@SQLITEINCPATH@%$SQLITEINCPATH%g
  11921. s%@SQLITELIBPATH@%$SQLITELIBPATH%g
  11922. s%@SQLITELIB@%$SQLITELIB%g
  11923. s%@USE_FFMPEG@%$USE_FFMPEG%g
  11924. s%@FFMPEGINCPATH@%$FFMPEGINCPATH%g
  11925. s%@FFMPEGLIBPATH@%$FFMPEGLIBPATH%g
  11926. s%@FFMPEGLIB@%$FFMPEGLIB%g
  11927. s%@USE_OPENGL@%$USE_OPENGL%g
  11928. s%@OPENGL_X11@%$OPENGL_X11%g
  11929. s%@OPENGL_AQUA@%$OPENGL_AQUA%g
  11930. s%@OPENGL_WINDOWS@%$OPENGL_WINDOWS%g
  11931. s%@OPENGLINC@%$OPENGLINC%g
  11932. s%@OPENGLLIB@%$OPENGLLIB%g
  11933. s%@OPENGLULIB@%$OPENGLULIB%g
  11934. s%@USE_TCLTK@%$USE_TCLTK%g
  11935. s%@TCLINCDIR@%$TCLINCDIR%g
  11936. s%@TKINCDIR@%$TKINCDIR%g
  11937. s%@TCLTKLIBPATH@%$TCLTKLIBPATH%g
  11938. s%@TCLTKLIBS@%$TCLTKLIBS%g
  11939. s%@MACOSX_ARCHS_TCLTK@%$MACOSX_ARCHS_TCLTK%g
  11940. s%@ODBCINC@%$ODBCINC%g
  11941. s%@ODBCLIB@%$ODBCLIB%g
  11942. s%@FFTWINC@%$FFTWINC%g
  11943. s%@FFTWLIB@%$FFTWLIB%g
  11944. s%@BLASLIB@%$BLASLIB%g
  11945. s%@BLASINC@%$BLASINC%g
  11946. s%@LAPACKLIB@%$LAPACKLIB%g
  11947. s%@LAPACKINC@%$LAPACKINC%g
  11948. s%@CAIRO_HAS_XRENDER@%$CAIRO_HAS_XRENDER%g
  11949. s%@CAIRO_HAS_XRENDER_SURFACE@%$CAIRO_HAS_XRENDER_SURFACE%g
  11950. s%@CAIROINC@%$CAIROINC%g
  11951. s%@CAIROLIB@%$CAIROLIB%g
  11952. s%@USE_CAIRO@%$USE_CAIRO%g
  11953. s%@FTINC@%$FTINC%g
  11954. s%@FTLIB@%$FTLIB%g
  11955. s%@INTLLIB@%$INTLLIB%g
  11956. s%@HAVE_NLS@%$HAVE_NLS%g
  11957. s%@CXX@%$CXX%g
  11958. s%@OPENDWGINCPATH@%$OPENDWGINCPATH%g
  11959. s%@OPENDWGLIBPATH@%$OPENDWGLIBPATH%g
  11960. s%@OPENDWGLIB@%$OPENDWGLIB%g
  11961. s%@USE_OPENDWG@%$USE_OPENDWG%g
  11962. s%@PTHREADINCPATH@%$PTHREADINCPATH%g
  11963. s%@PTHREADLIBPATH@%$PTHREADLIBPATH%g
  11964. s%@PTHREADLIB@%$PTHREADLIB%g
  11965. s%@USE_PTHREAD@%$USE_PTHREAD%g
  11966. s%@OMPINCPATH@%$OMPINCPATH%g
  11967. s%@OMPLIBPATH@%$OMPLIBPATH%g
  11968. s%@OMPLIB@%$OMPLIB%g
  11969. s%@OMPCFLAGS@%$OMPCFLAGS%g
  11970. s%@USE_OPENMP@%$USE_OPENMP%g
  11971. s%@USE_LARGEFILES@%$USE_LARGEFILES%g
  11972. s%@WX_CONFIG@%$WX_CONFIG%g
  11973. s%@WXVERSION@%$WXVERSION%g
  11974. s%@WXWIDGETSCXXFLAGS@%$WXWIDGETSCXXFLAGS%g
  11975. s%@WXWIDGETSCPPFLAGS@%$WXWIDGETSCPPFLAGS%g
  11976. s%@WXWIDGETSLIB@%$WXWIDGETSLIB%g
  11977. s%@USE_WXWIDGETS@%$USE_WXWIDGETS%g
  11978. s%@MACOSX_ARCHS_WXPYTHON@%$MACOSX_ARCHS_WXPYTHON%g
  11979. s%@USE_TERMIO@%$USE_TERMIO%g
  11980. s%@STRIPFLAG@%$STRIPFLAG%g
  11981. s%@GRASS_HOME@%$GRASS_HOME%g
  11982. CEOF
  11983. EOF
  11984. cat >> $CONFIG_STATUS <<\EOF
  11985. # Split the substitutions into bite-sized pieces for seds with
  11986. # small command number limits, like on Digital OSF/1 and HP-UX.
  11987. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  11988. ac_file=1 # Number of current file.
  11989. ac_beg=1 # First line for current file.
  11990. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  11991. ac_more_lines=:
  11992. ac_sed_cmds=""
  11993. while $ac_more_lines; do
  11994. if test $ac_beg -gt 1; then
  11995. sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  11996. else
  11997. sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  11998. fi
  11999. if test ! -s conftest.s$ac_file; then
  12000. ac_more_lines=false
  12001. rm -f conftest.s$ac_file
  12002. else
  12003. if test -z "$ac_sed_cmds"; then
  12004. ac_sed_cmds="sed -f conftest.s$ac_file"
  12005. else
  12006. ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  12007. fi
  12008. ac_file=`expr $ac_file + 1`
  12009. ac_beg=$ac_end
  12010. ac_end=`expr $ac_end + $ac_max_sed_cmds`
  12011. fi
  12012. done
  12013. if test -z "$ac_sed_cmds"; then
  12014. ac_sed_cmds=cat
  12015. fi
  12016. EOF
  12017. cat >> $CONFIG_STATUS <<EOF
  12018. CONFIG_FILES=\${CONFIG_FILES-"include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex include/version.h grass.pc"}
  12019. EOF
  12020. cat >> $CONFIG_STATUS <<\EOF
  12021. for ac_file in .. $CONFIG_FILES; 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. # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  12029. # Remove last slash and all that follows it. Not all systems have dirname.
  12030. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  12031. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  12032. # The file is in a subdirectory.
  12033. test ! -d "$ac_dir" && mkdir "$ac_dir"
  12034. ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  12035. # A "../" for each directory in $ac_dir_suffix.
  12036. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  12037. else
  12038. ac_dir_suffix= ac_dots=
  12039. fi
  12040. case "$ac_given_srcdir" in
  12041. .) srcdir=.
  12042. if test -z "$ac_dots"; then top_srcdir=.
  12043. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  12044. /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  12045. *) # Relative path.
  12046. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  12047. top_srcdir="$ac_dots$ac_given_srcdir" ;;
  12048. esac
  12049. case "$ac_given_INSTALL" in
  12050. [/$]*) INSTALL="$ac_given_INSTALL" ;;
  12051. *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  12052. esac
  12053. echo creating "$ac_file"
  12054. rm -f "$ac_file"
  12055. configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  12056. case "$ac_file" in
  12057. *Makefile*) ac_comsub="1i\\
  12058. # $configure_input" ;;
  12059. *) ac_comsub= ;;
  12060. esac
  12061. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  12062. sed -e "$ac_comsub
  12063. s%@configure_input@%$configure_input%g
  12064. s%@srcdir@%$srcdir%g
  12065. s%@top_srcdir@%$top_srcdir%g
  12066. s%@INSTALL@%$INSTALL%g
  12067. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  12068. fi; done
  12069. rm -f conftest.s*
  12070. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  12071. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  12072. #
  12073. # ac_d sets the value in "#define NAME VALUE" lines.
  12074. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
  12075. ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
  12076. ac_dC='\3'
  12077. ac_dD='%g'
  12078. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  12079. ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  12080. ac_uB='\([ ]\)%\1#\2define\3'
  12081. ac_uC=' '
  12082. ac_uD='\4%g'
  12083. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  12084. ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  12085. ac_eB='$%\1#\2define\3'
  12086. ac_eC=' '
  12087. ac_eD='%g'
  12088. if test "${CONFIG_HEADERS+set}" != set; then
  12089. EOF
  12090. cat >> $CONFIG_STATUS <<EOF
  12091. CONFIG_HEADERS="include/config.h"
  12092. EOF
  12093. cat >> $CONFIG_STATUS <<\EOF
  12094. fi
  12095. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  12096. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  12097. case "$ac_file" in
  12098. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  12099. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  12100. *) ac_file_in="${ac_file}.in" ;;
  12101. esac
  12102. echo creating $ac_file
  12103. rm -f conftest.frag conftest.in conftest.out
  12104. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  12105. cat $ac_file_inputs > conftest.in
  12106. EOF
  12107. # Transform confdefs.h into a sed script conftest.vals that substitutes
  12108. # the proper values into config.h.in to produce config.h. And first:
  12109. # Protect against being on the right side of a sed subst in config.status.
  12110. # Protect against being in an unquoted here document in config.status.
  12111. rm -f conftest.vals
  12112. cat > conftest.hdr <<\EOF
  12113. s/[\\&%]/\\&/g
  12114. s%[\\$`]%\\&%g
  12115. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  12116. s%ac_d%ac_u%gp
  12117. s%ac_u%ac_e%gp
  12118. EOF
  12119. sed -n -f conftest.hdr confdefs.h > conftest.vals
  12120. rm -f conftest.hdr
  12121. # This sed command replaces #undef with comments. This is necessary, for
  12122. # example, in the case of _POSIX_SOURCE, which is predefined and required
  12123. # on some systems where configure will not decide to define it.
  12124. cat >> conftest.vals <<\EOF
  12125. s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  12126. EOF
  12127. # Break up conftest.vals because some shells have a limit on
  12128. # the size of here documents, and old seds have small limits too.
  12129. rm -f conftest.tail
  12130. while :
  12131. do
  12132. ac_lines=`grep -c . conftest.vals`
  12133. # grep -c gives empty output for an empty file on some AIX systems.
  12134. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  12135. # Write a limited-size here document to conftest.frag.
  12136. echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  12137. sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  12138. echo 'CEOF
  12139. sed -f conftest.frag conftest.in > conftest.out
  12140. rm -f conftest.in
  12141. mv conftest.out conftest.in
  12142. ' >> $CONFIG_STATUS
  12143. sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  12144. rm -f conftest.vals
  12145. mv conftest.tail conftest.vals
  12146. done
  12147. rm -f conftest.vals
  12148. cat >> $CONFIG_STATUS <<\EOF
  12149. rm -f conftest.frag conftest.h
  12150. echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
  12151. cat conftest.in >> conftest.h
  12152. rm -f conftest.in
  12153. if cmp -s $ac_file conftest.h 2>/dev/null; then
  12154. echo "$ac_file is unchanged"
  12155. rm -f conftest.h
  12156. else
  12157. # Remove last slash and all that follows it. Not all systems have dirname.
  12158. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  12159. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  12160. # The file is in a subdirectory.
  12161. test ! -d "$ac_dir" && mkdir "$ac_dir"
  12162. fi
  12163. rm -f $ac_file
  12164. mv conftest.h $ac_file
  12165. fi
  12166. fi; done
  12167. EOF
  12168. cat >> $CONFIG_STATUS <<EOF
  12169. EOF
  12170. cat >> $CONFIG_STATUS <<\EOF
  12171. exit 0
  12172. EOF
  12173. chmod +x $CONFIG_STATUS
  12174. rm -fr confdefs* $ac_clean_files
  12175. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  12176. echo "Copying config.status to config.status.${ARCH}"
  12177. cp -f config.status config.status.${ARCH}
  12178. # Display configuration status
  12179. USE_TOGL=
  12180. if test -n "${USE_TCLTK}" -a -n "${USE_OPENGL}" ; then
  12181. USE_TOGL="1"
  12182. fi
  12183. echo ""
  12184. echo "GRASS is now configured for: ${host}"
  12185. echo ""
  12186. echo " Source directory: ${SRCDIR}"
  12187. echo " Build directory: ${DSTDIR}"
  12188. echo " Installation directory: ${INSTDIR}"
  12189. echo " Startup script in directory: ${bindir}"
  12190. echo " C compiler: ${CC} ${CFLAGS}"
  12191. echo " C++ compiler: ${CXX} ${CXXFLAGS}"
  12192. #LOC_MSG([ FORTRAN compiler: ${F77} ${FFLAGS}])
  12193. echo " Building shared libraries: ${shared_ok}"
  12194. echo " OpenGL platform: ${OPENGL_TYPE}"
  12195. echo ""
  12196. echo " MacOSX application: `if test -n "${MACOSX_APP}" ; then echo yes ; else echo no ; fi`"
  12197. echo " MacOSX architectures: ${MACOSX_ARCHS}"
  12198. echo " MacOSX SDK: ${MACOSX_SDK}"
  12199. echo ""
  12200. echo " Tcl/Tk NVIZ: `if test -n "${USE_TOGL}" ; then echo yes ; else echo no ; fi`"
  12201. echo ""
  12202. echo " BLAS support: `if test -n "${USE_BLAS}" ; then echo yes ; else echo no ; fi`"
  12203. echo " C++ support: `if test -n "${USE_CXX}" ; then echo yes ; else echo no ; fi`"
  12204. echo " Cairo support: `if test -n "${USE_CAIRO}" ; then echo yes ; else echo no ; fi`"
  12205. echo " DWG support: `if test -n "${USE_OPENDWG}" ; then echo yes ; else echo no ; fi`"
  12206. echo " FFMPEG support: `if test -n "${USE_FFMPEG}" ; then echo yes ; else echo no ; fi`"
  12207. echo " FFTW support: `if test -n "${USE_FFTW}" ; then echo yes ; else echo no ; fi`"
  12208. echo " FreeType support: `if test -n "${USE_FREETYPE}" ; then echo yes ; else echo no ; fi`"
  12209. echo " GDAL support: `if test -n "${USE_GDAL}" ; then echo yes ; else echo no ; fi`"
  12210. echo " GEOS support: `if test -n "${USE_GEOS}" ; then echo yes ; else echo no ; fi`"
  12211. echo " JPEG support: `if test -n "${USE_JPEG}" ; then echo yes ; else echo no ; fi`"
  12212. echo " LAPACK support: `if test -n "${USE_LAPACK}" ; then echo yes ; else echo no ; fi`"
  12213. echo " Large File support (LFS): `if test -n "${USE_LARGEFILES}" ; then echo yes ; else echo no ; fi`"
  12214. echo " libLAS support: `if test -n "${USE_LIBLAS}" ; then echo yes ; else echo no ; fi`"
  12215. echo " MySQL support: `if test -n "${USE_MYSQL}" ; then echo yes ; else echo no ; fi`"
  12216. echo " NLS support: `if test -n "${USE_NLS}" ; then echo yes ; else echo no ; fi`"
  12217. echo " ODBC support: `if test -n "${USE_ODBC}" ; then echo yes ; else echo no ; fi`"
  12218. echo " OGR support: `if test -n "${USE_OGR}" ; then echo yes ; else echo no ; fi`"
  12219. echo " OpenGL support: `if test -n "${USE_OPENGL}" ; then echo yes ; else echo no ; fi`"
  12220. echo " OpenMP support: `if test -n "${USE_OPENMP}" ; then echo yes ; else echo no ; fi`"
  12221. echo " PNG support: `if test -n "${USE_PNG}" ; then echo yes ; else echo no ; fi`"
  12222. echo " POSIX thread support: `if test -n "${USE_PTHREAD}" ; then echo yes ; else echo no ; fi`"
  12223. echo " PostgreSQL support: `if test -n "${USE_POSTGRES}" ; then echo yes ; else echo no ; fi`"
  12224. echo " Readline support: `if test -n "${USE_READLINE}" ; then echo yes ; else echo no ; fi`"
  12225. echo " Regex support: `if test -n "${USE_REGEX}" ; then echo yes ; else echo no ; fi`"
  12226. echo " SQLite support: `if test -n "${USE_SQLITE}" ; then echo yes ; else echo no ; fi`"
  12227. echo " TIFF support: `if test -n "${USE_TIFF}" ; then echo yes ; else echo no ; fi`"
  12228. echo " Tcl/Tk support: `if test -n "${USE_TCLTK}" ; then echo yes ; else echo no ; fi`"
  12229. echo " wxWidgets support: `if test -n "${USE_WXWIDGETS}" ; then echo yes ; else echo no ; fi`"
  12230. echo " X11 support: `if test -n "${USE_X11}" ; then echo yes ; else echo no ; fi`"
  12231. echo ""