configure 393 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413
  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. fi
  1166. # Check for MacOSX App
  1167. # Check whether --enable-macosx-app or --disable-macosx-app was given.
  1168. if test "${enable_macosx_app+set}" = set; then
  1169. enableval="$enable_macosx_app"
  1170. :
  1171. else
  1172. enable_macosx_app=no
  1173. fi
  1174. echo $ac_n "checking for MacOSX App""... $ac_c" 1>&6
  1175. echo "configure:1351: checking for MacOSX App" >&5
  1176. case "$enable_macosx_app" in
  1177. yes) MACOSX_APP=1 ;;
  1178. no) MACOSX_APP= ;;
  1179. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  1180. esac
  1181. echo "$ac_t"""$enable_macosx_app"" 1>&6
  1182. # Check for MacOSX archs
  1183. echo $ac_n "checking for MacOSX architectures""... $ac_c" 1>&6
  1184. echo "configure:1363: checking for MacOSX architectures" >&5
  1185. MACOSX_ARCHS=
  1186. if test -z "$with_macosx_archs" ; then
  1187. echo "$ac_t""no" 1>&6
  1188. else
  1189. for a in $with_macosx_archs
  1190. do
  1191. # check if valid arch?
  1192. case "$a" in
  1193. i386|ppc|x86_64|ppc64)
  1194. MACOSX_ARCHS="$MACOSX_ARCHS -arch $a"
  1195. ;;
  1196. esac
  1197. done
  1198. echo "$ac_t""$MACOSX_ARCHS" 1>&6
  1199. LDFLAGS="$LDFLAGS $MACOSX_ARCHS"
  1200. CFLAGS="$CFLAGS $MACOSX_ARCHS"
  1201. CXXFLAGS="$CXXFLAGS $MACOSX_ARCHS"
  1202. fi
  1203. # Done checking MacOSX archs
  1204. # Check for MacOSX SDK
  1205. echo $ac_n "checking for MacOSX SDK""... $ac_c" 1>&6
  1206. echo "configure:1392: checking for MacOSX SDK" >&5
  1207. MACOSX_SDK=
  1208. if test -z "$with_macosx_sdk" ; then
  1209. echo "$ac_t""no" 1>&6
  1210. else
  1211. ac_safe=`echo "$with_macosx_sdk/SDKSettings.plist" | sed 'y%./+-%__p_%'`
  1212. echo $ac_n "checking for $with_macosx_sdk/SDKSettings.plist""... $ac_c" 1>&6
  1213. echo "configure:1402: checking for $with_macosx_sdk/SDKSettings.plist" >&5
  1214. if test "$cross_compiling" = yes; then
  1215. { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
  1216. else
  1217. if test -r $with_macosx_sdk/SDKSettings.plist; then
  1218. eval "ac_cv_file_$ac_safe=yes"
  1219. else
  1220. eval "ac_cv_file_$ac_safe=no"
  1221. fi
  1222. fi
  1223. if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
  1224. echo "$ac_t""yes" 1>&6
  1225. MACOSX_SDK="-isysroot $with_macosx_sdk"
  1226. else
  1227. echo "$ac_t""no" 1>&6
  1228. { echo "configure: error: *** specified SDK does not exist or is not a SDK" 1>&2; exit 1; }
  1229. fi
  1230. LDFLAGS="$LDFLAGS $MACOSX_SDK"
  1231. CFLAGS="$CFLAGS $MACOSX_SDK"
  1232. CXXFLAGS="$CXXFLAGS $MACOSX_SDK"
  1233. fi
  1234. # Done checking MacOSX SDK
  1235. # Set INST_DIR
  1236. if test -n "$MACOSX_APP" ; then
  1237. INSTDIR='${prefix}'"/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.app/Contents/MacOS"
  1238. else
  1239. INSTDIR='${prefix}'"/grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}"
  1240. fi
  1241. # Get flags for building shared libraries
  1242. echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
  1243. echo "configure:1446: checking how to build libraries" >&5
  1244. # Check whether --enable-shared or --disable-shared was given.
  1245. if test "${enable_shared+set}" = set; then
  1246. enableval="$enable_shared"
  1247. shared_ok=$enableval
  1248. else
  1249. shared_ok=yes
  1250. fi
  1251. if test "${enable_shared+set}" = set; then
  1252. enableval="$enable_shared"
  1253. shared_ok=$enableval
  1254. else
  1255. shared_ok=yes
  1256. fi
  1257. if test "$shared_ok" = "yes" ; then
  1258. echo "$ac_t""shared" 1>&6
  1259. SHARED_BUILD=1
  1260. GRASS_LIB_PREFIX='$(SHLIB_PREFIX)'
  1261. GRASS_LIB_SUFFIX='$(SHLIB_SUFFIX)'
  1262. GRASS_LIBRARY_TYPE='shlib'
  1263. else
  1264. echo "$ac_t""static" 1>&6
  1265. SHARED_BUILD=0
  1266. cat >> confdefs.h <<\EOF
  1267. #define STATIC_BUILD 1
  1268. EOF
  1269. GRASS_LIB_PREFIX='$(STLIB_PREFIX)'
  1270. GRASS_LIB_SUFFIX='$(STLIB_SUFFIX)'
  1271. GRASS_LIBRARY_TYPE='stlib'
  1272. fi
  1273. ac_save_ldflags="$LDFLAGS"
  1274. SHLIB_CFLAGS=""
  1275. SHLIB_LD_FLAGS=""
  1276. SHLIB_LD_LIBS=""
  1277. SHLIB_SUFFIX=""
  1278. SHLIB_LD=""
  1279. STLIB_LD='${AR} cr'
  1280. STLIB_SUFFIX='.a'
  1281. LDFLAGS=""
  1282. CC_SEARCH_FLAGS=""
  1283. LD_SEARCH_FLAGS=""
  1284. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1285. PLAT_OBJS=""
  1286. case $host in
  1287. *-linux-*)
  1288. SHLIB_CFLAGS="-fPIC"
  1289. SHLIB_LD_FLAGS=""
  1290. SHLIB_LD_LIBS='${LIBS}'
  1291. SHLIB_SUFFIX=".so"
  1292. SHLIB_LD="${CC} -shared"
  1293. LDFLAGS="-Wl,--export-dynamic"
  1294. CC_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
  1295. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1296. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1297. ;;
  1298. *-pc-cygwin)
  1299. SHLIB_LD_LIBS='${LIBS}'
  1300. SHLIB_SUFFIX=".dll"
  1301. SHLIB_LD="${CC} -shared"
  1302. LDFLAGS="-Wl,--export-dynamic"
  1303. LD_LIBRARY_PATH_VAR="PATH"
  1304. ;;
  1305. *-pc-mingw32)
  1306. SHLIB_LD_LIBS='${LIBS}'
  1307. SHLIB_SUFFIX=".dll"
  1308. SHLIB_LD="${CC} -shared"
  1309. LDFLAGS="-Wl,--export-dynamic,--enable-runtime-pseudo-reloc"
  1310. LD_LIBRARY_PATH_VAR="PATH"
  1311. ;;
  1312. *-apple-darwin*)
  1313. SHLIB_CFLAGS="-fno-common"
  1314. SHLIB_LD_LIBS='${LIBS}'
  1315. SHLIB_SUFFIX=".dylib"
  1316. 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}"
  1317. LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
  1318. ;;
  1319. *-sun-solaris*)
  1320. # Note: If _REENTRANT isn't defined, then Solaris
  1321. # won't define thread-safe library routines.
  1322. cat >> confdefs.h <<\EOF
  1323. #define _REENTRANT 1
  1324. EOF
  1325. cat >> confdefs.h <<\EOF
  1326. #define _POSIX_PTHREAD_SEMANTICS 1
  1327. EOF
  1328. # Note: need the LIBS below, otherwise Tk won't find Tcl's
  1329. # symbols when dynamically loaded into tclsh.
  1330. if test "$GCC" = "yes" ; then
  1331. SHLIB_CFLAGS="-fPIC"
  1332. SHLIB_LD="$CC -shared"
  1333. CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  1334. else
  1335. SHLIB_CFLAGS="-KPIC"
  1336. SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  1337. CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  1338. fi
  1339. SHLIB_SUFFIX=".so"
  1340. SHLIB_LD_LIBS='${LIBS}'
  1341. LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1342. LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1343. ;;
  1344. *)
  1345. { echo "configure: error: ***Unknown platform: $host***" 1>&2; exit 1; }
  1346. ;;
  1347. esac
  1348. LDFLAGS="${ac_save_ldflags} $LDFLAGS"
  1349. # Enable options
  1350. # Check whether --enable-w11 or --disable-w11 was given.
  1351. if test "${enable_w11+set}" = set; then
  1352. enableval="$enable_w11"
  1353. :
  1354. else
  1355. enable_w11=no
  1356. fi
  1357. # With options
  1358. # Check whether --with-cxx or --without-cxx was given.
  1359. if test "${with_cxx+set}" = set; then
  1360. withval="$with_cxx"
  1361. :
  1362. else
  1363. with_cxx=yes
  1364. fi
  1365. #LOC_ARG_WITH(g77, GNU Fortran 77, no)
  1366. # Check whether --with-macosx-archs or --without-macosx-archs was given.
  1367. if test "${with_macosx_archs+set}" = set; then
  1368. withval="$with_macosx_archs"
  1369. :
  1370. else
  1371. with_macosx_archs="no"
  1372. fi
  1373. # Check whether --with-macosx-sdk or --without-macosx-sdk was given.
  1374. if test "${with_macosx_sdk+set}" = set; then
  1375. withval="$with_macosx_sdk"
  1376. :
  1377. else
  1378. with_macosx_sdk="no"
  1379. fi
  1380. # Check whether --with-jpeg or --without-jpeg was given.
  1381. if test "${with_jpeg+set}" = set; then
  1382. withval="$with_jpeg"
  1383. :
  1384. else
  1385. with_jpeg=yes
  1386. fi
  1387. # Check whether --with-tiff or --without-tiff was given.
  1388. if test "${with_tiff+set}" = set; then
  1389. withval="$with_tiff"
  1390. :
  1391. else
  1392. with_tiff=yes
  1393. fi
  1394. # Check whether --with-png or --without-png was given.
  1395. if test "${with_png+set}" = set; then
  1396. withval="$with_png"
  1397. :
  1398. else
  1399. with_png=yes
  1400. fi
  1401. # Check whether --with-tcltk or --without-tcltk was given.
  1402. if test "${with_tcltk+set}" = set; then
  1403. withval="$with_tcltk"
  1404. :
  1405. else
  1406. with_tcltk=yes
  1407. fi
  1408. # Check whether --with-postgres or --without-postgres was given.
  1409. if test "${with_postgres+set}" = set; then
  1410. withval="$with_postgres"
  1411. :
  1412. else
  1413. with_postgres=no
  1414. fi
  1415. # Check whether --with-mysql or --without-mysql was given.
  1416. if test "${with_mysql+set}" = set; then
  1417. withval="$with_mysql"
  1418. :
  1419. else
  1420. with_mysql=no
  1421. fi
  1422. # Check whether --with-sqlite or --without-sqlite was given.
  1423. if test "${with_sqlite+set}" = set; then
  1424. withval="$with_sqlite"
  1425. :
  1426. else
  1427. with_sqlite=no
  1428. fi
  1429. # Check whether --with-ffmpeg or --without-ffmpeg was given.
  1430. if test "${with_ffmpeg+set}" = set; then
  1431. withval="$with_ffmpeg"
  1432. :
  1433. else
  1434. with_ffmpeg=no
  1435. fi
  1436. # Check whether --with-opengl or --without-opengl was given.
  1437. if test "${with_opengl+set}" = set; then
  1438. withval="$with_opengl"
  1439. :
  1440. else
  1441. with_opengl=yes
  1442. fi
  1443. # Check whether --with-odbc or --without-odbc was given.
  1444. if test "${with_odbc+set}" = set; then
  1445. withval="$with_odbc"
  1446. :
  1447. else
  1448. with_odbc=no
  1449. fi
  1450. # Check whether --with-fftw or --without-fftw was given.
  1451. if test "${with_fftw+set}" = set; then
  1452. withval="$with_fftw"
  1453. :
  1454. else
  1455. with_fftw=yes
  1456. fi
  1457. # Check whether --with-blas or --without-blas was given.
  1458. if test "${with_blas+set}" = set; then
  1459. withval="$with_blas"
  1460. :
  1461. else
  1462. with_blas=no
  1463. fi
  1464. # Check whether --with-lapack or --without-lapack was given.
  1465. if test "${with_lapack+set}" = set; then
  1466. withval="$with_lapack"
  1467. :
  1468. else
  1469. with_lapack=no
  1470. fi
  1471. # Check whether --with-cairo or --without-cairo was given.
  1472. if test "${with_cairo+set}" = set; then
  1473. withval="$with_cairo"
  1474. :
  1475. else
  1476. with_cairo=yes
  1477. fi
  1478. # Check whether --with-freetype or --without-freetype was given.
  1479. if test "${with_freetype+set}" = set; then
  1480. withval="$with_freetype"
  1481. :
  1482. else
  1483. with_freetype=yes
  1484. fi
  1485. # Check whether --with-nls or --without-nls was given.
  1486. if test "${with_nls+set}" = set; then
  1487. withval="$with_nls"
  1488. :
  1489. else
  1490. with_nls=no
  1491. fi
  1492. # Check whether --with-readline or --without-readline was given.
  1493. if test "${with_readline+set}" = set; then
  1494. withval="$with_readline"
  1495. :
  1496. else
  1497. with_readline=no
  1498. fi
  1499. # Check whether --with-opendwg or --without-opendwg was given.
  1500. if test "${with_opendwg+set}" = set; then
  1501. withval="$with_opendwg"
  1502. :
  1503. else
  1504. with_opendwg=no
  1505. fi
  1506. # Check whether --with-regex or --without-regex was given.
  1507. if test "${with_regex+set}" = set; then
  1508. withval="$with_regex"
  1509. :
  1510. else
  1511. with_regex=yes
  1512. fi
  1513. # Check whether --with-pthread or --without-pthread was given.
  1514. if test "${with_pthread+set}" = set; then
  1515. withval="$with_pthread"
  1516. :
  1517. else
  1518. with_pthread=no
  1519. fi
  1520. # Check whether --with-openmp or --without-openmp was given.
  1521. if test "${with_openmp+set}" = set; then
  1522. withval="$with_openmp"
  1523. :
  1524. else
  1525. with_openmp=no
  1526. fi
  1527. # Check whether --with-gdal or --without-gdal was given.
  1528. if test "${with_gdal+set}" = set; then
  1529. withval="$with_gdal"
  1530. :
  1531. fi
  1532. # Check whether --with-liblas or --without-liblas was given.
  1533. if test "${with_liblas+set}" = set; then
  1534. withval="$with_liblas"
  1535. :
  1536. else
  1537. with_liblas="no"
  1538. fi
  1539. # Check whether --with-wxwidgets or --without-wxwidgets was given.
  1540. if test "${with_wxwidgets+set}" = set; then
  1541. withval="$with_wxwidgets"
  1542. :
  1543. else
  1544. with_wxwidgets="no"
  1545. fi
  1546. # With includes and libs options
  1547. # Check whether --with-geos or --without-geos was given.
  1548. if test "${with_geos+set}" = set; then
  1549. withval="$with_geos"
  1550. :
  1551. else
  1552. with_geos="no"
  1553. fi
  1554. # Check whether --with-includes or --without-includes was given.
  1555. if test "${with_includes+set}" = set; then
  1556. withval="$with_includes"
  1557. :
  1558. fi
  1559. # Check whether --with-libs or --without-libs was given.
  1560. if test "${with_libs+set}" = set; then
  1561. withval="$with_libs"
  1562. :
  1563. fi
  1564. # Check whether --with-zlib-includes or --without-zlib-includes was given.
  1565. if test "${with_zlib_includes+set}" = set; then
  1566. withval="$with_zlib_includes"
  1567. :
  1568. fi
  1569. # Check whether --with-zlib-libs or --without-zlib-libs was given.
  1570. if test "${with_zlib_libs+set}" = set; then
  1571. withval="$with_zlib_libs"
  1572. :
  1573. fi
  1574. # Check whether --with-readline-includes or --without-readline-includes was given.
  1575. if test "${with_readline_includes+set}" = set; then
  1576. withval="$with_readline_includes"
  1577. :
  1578. fi
  1579. # Check whether --with-readline-libs or --without-readline-libs was given.
  1580. if test "${with_readline_libs+set}" = set; then
  1581. withval="$with_readline_libs"
  1582. :
  1583. fi
  1584. # Check whether --with-jpeg-includes or --without-jpeg-includes was given.
  1585. if test "${with_jpeg_includes+set}" = set; then
  1586. withval="$with_jpeg_includes"
  1587. :
  1588. fi
  1589. # Check whether --with-jpeg-libs or --without-jpeg-libs was given.
  1590. if test "${with_jpeg_libs+set}" = set; then
  1591. withval="$with_jpeg_libs"
  1592. :
  1593. fi
  1594. # Check whether --with-tiff-includes or --without-tiff-includes was given.
  1595. if test "${with_tiff_includes+set}" = set; then
  1596. withval="$with_tiff_includes"
  1597. :
  1598. fi
  1599. # Check whether --with-tiff-libs or --without-tiff-libs was given.
  1600. if test "${with_tiff_libs+set}" = set; then
  1601. withval="$with_tiff_libs"
  1602. :
  1603. fi
  1604. # Check whether --with-png-includes or --without-png-includes was given.
  1605. if test "${with_png_includes+set}" = set; then
  1606. withval="$with_png_includes"
  1607. :
  1608. fi
  1609. # Check whether --with-png-libs or --without-png-libs was given.
  1610. if test "${with_png_libs+set}" = set; then
  1611. withval="$with_png_libs"
  1612. :
  1613. fi
  1614. # Check whether --with-tcltk-includes or --without-tcltk-includes was given.
  1615. if test "${with_tcltk_includes+set}" = set; then
  1616. withval="$with_tcltk_includes"
  1617. :
  1618. fi
  1619. # Check whether --with-tcltk-libs or --without-tcltk-libs was given.
  1620. if test "${with_tcltk_libs+set}" = set; then
  1621. withval="$with_tcltk_libs"
  1622. :
  1623. fi
  1624. # Check whether --with-postgres-includes or --without-postgres-includes was given.
  1625. if test "${with_postgres_includes+set}" = set; then
  1626. withval="$with_postgres_includes"
  1627. :
  1628. fi
  1629. # Check whether --with-postgres-libs or --without-postgres-libs was given.
  1630. if test "${with_postgres_libs+set}" = set; then
  1631. withval="$with_postgres_libs"
  1632. :
  1633. fi
  1634. # Check whether --with-mysql-includes or --without-mysql-includes was given.
  1635. if test "${with_mysql_includes+set}" = set; then
  1636. withval="$with_mysql_includes"
  1637. :
  1638. fi
  1639. # Check whether --with-mysql-libs or --without-mysql-libs was given.
  1640. if test "${with_mysql_libs+set}" = set; then
  1641. withval="$with_mysql_libs"
  1642. :
  1643. fi
  1644. # Check whether --with-sqlite-includes or --without-sqlite-includes was given.
  1645. if test "${with_sqlite_includes+set}" = set; then
  1646. withval="$with_sqlite_includes"
  1647. :
  1648. fi
  1649. # Check whether --with-sqlite-libs or --without-sqlite-libs was given.
  1650. if test "${with_sqlite_libs+set}" = set; then
  1651. withval="$with_sqlite_libs"
  1652. :
  1653. fi
  1654. # Check whether --with-ffmpeg-includes or --without-ffmpeg-includes was given.
  1655. if test "${with_ffmpeg_includes+set}" = set; then
  1656. withval="$with_ffmpeg_includes"
  1657. :
  1658. fi
  1659. # Check whether --with-ffmpeg-libs or --without-ffmpeg-libs was given.
  1660. if test "${with_ffmpeg_libs+set}" = set; then
  1661. withval="$with_ffmpeg_libs"
  1662. :
  1663. fi
  1664. # Check whether --with-opengl-includes or --without-opengl-includes was given.
  1665. if test "${with_opengl_includes+set}" = set; then
  1666. withval="$with_opengl_includes"
  1667. :
  1668. fi
  1669. # Check whether --with-opengl-libs or --without-opengl-libs was given.
  1670. if test "${with_opengl_libs+set}" = set; then
  1671. withval="$with_opengl_libs"
  1672. :
  1673. fi
  1674. # Check whether --with-opengl-framework or --without-opengl-framework was given.
  1675. if test "${with_opengl_framework+set}" = set; then
  1676. withval="$with_opengl_framework"
  1677. :
  1678. fi
  1679. # Check whether --with-odbc-includes or --without-odbc-includes was given.
  1680. if test "${with_odbc_includes+set}" = set; then
  1681. withval="$with_odbc_includes"
  1682. :
  1683. fi
  1684. # Check whether --with-odbc-libs or --without-odbc-libs was given.
  1685. if test "${with_odbc_libs+set}" = set; then
  1686. withval="$with_odbc_libs"
  1687. :
  1688. fi
  1689. # Check whether --with-fftw-includes or --without-fftw-includes was given.
  1690. if test "${with_fftw_includes+set}" = set; then
  1691. withval="$with_fftw_includes"
  1692. :
  1693. fi
  1694. # Check whether --with-fftw-libs or --without-fftw-libs was given.
  1695. if test "${with_fftw_libs+set}" = set; then
  1696. withval="$with_fftw_libs"
  1697. :
  1698. fi
  1699. # Check whether --with-blas-includes or --without-blas-includes was given.
  1700. if test "${with_blas_includes+set}" = set; then
  1701. withval="$with_blas_includes"
  1702. :
  1703. fi
  1704. # Check whether --with-blas-libs or --without-blas-libs was given.
  1705. if test "${with_blas_libs+set}" = set; then
  1706. withval="$with_blas_libs"
  1707. :
  1708. fi
  1709. # Check whether --with-lapack-includes or --without-lapack-includes was given.
  1710. if test "${with_lapack_includes+set}" = set; then
  1711. withval="$with_lapack_includes"
  1712. :
  1713. fi
  1714. # Check whether --with-lapack-libs or --without-lapack-libs was given.
  1715. if test "${with_lapack_libs+set}" = set; then
  1716. withval="$with_lapack_libs"
  1717. :
  1718. fi
  1719. # Check whether --with-cairo-includes or --without-cairo-includes was given.
  1720. if test "${with_cairo_includes+set}" = set; then
  1721. withval="$with_cairo_includes"
  1722. :
  1723. fi
  1724. # Check whether --with-cairo-libs or --without-cairo-libs was given.
  1725. if test "${with_cairo_libs+set}" = set; then
  1726. withval="$with_cairo_libs"
  1727. :
  1728. fi
  1729. # Check whether --with-cairo-ldflags or --without-cairo-ldflags was given.
  1730. if test "${with_cairo_ldflags+set}" = set; then
  1731. withval="$with_cairo_ldflags"
  1732. :
  1733. fi
  1734. # Check whether --with-freetype-includes or --without-freetype-includes was given.
  1735. if test "${with_freetype_includes+set}" = set; then
  1736. withval="$with_freetype_includes"
  1737. :
  1738. fi
  1739. # Check whether --with-freetype-libs or --without-freetype-libs was given.
  1740. if test "${with_freetype_libs+set}" = set; then
  1741. withval="$with_freetype_libs"
  1742. :
  1743. fi
  1744. # Check whether --with-proj-includes or --without-proj-includes was given.
  1745. if test "${with_proj_includes+set}" = set; then
  1746. withval="$with_proj_includes"
  1747. :
  1748. fi
  1749. # Check whether --with-proj-libs or --without-proj-libs was given.
  1750. if test "${with_proj_libs+set}" = set; then
  1751. withval="$with_proj_libs"
  1752. :
  1753. fi
  1754. # Check whether --with-proj-share or --without-proj-share was given.
  1755. if test "${with_proj_share+set}" = set; then
  1756. withval="$with_proj_share"
  1757. :
  1758. fi
  1759. # Check whether --with-opendwg-includes or --without-opendwg-includes was given.
  1760. if test "${with_opendwg_includes+set}" = set; then
  1761. withval="$with_opendwg_includes"
  1762. :
  1763. fi
  1764. # Check whether --with-opendwg-libs or --without-opendwg-libs was given.
  1765. if test "${with_opendwg_libs+set}" = set; then
  1766. withval="$with_opendwg_libs"
  1767. :
  1768. fi
  1769. # Check whether --with-regex-includes or --without-regex-includes was given.
  1770. if test "${with_regex_includes+set}" = set; then
  1771. withval="$with_regex_includes"
  1772. :
  1773. fi
  1774. # Check whether --with-regex-libs or --without-regex-libs was given.
  1775. if test "${with_regex_libs+set}" = set; then
  1776. withval="$with_regex_libs"
  1777. :
  1778. fi
  1779. # Check whether --with-pthread-includes or --without-pthread-includes was given.
  1780. if test "${with_pthread_includes+set}" = set; then
  1781. withval="$with_pthread_includes"
  1782. :
  1783. fi
  1784. # Check whether --with-pthread-libs or --without-pthread-libs was given.
  1785. if test "${with_pthread_libs+set}" = set; then
  1786. withval="$with_pthread_libs"
  1787. :
  1788. fi
  1789. # Check whether --with-openmp-includes or --without-openmp-includes was given.
  1790. if test "${with_openmp_includes+set}" = set; then
  1791. withval="$with_openmp_includes"
  1792. :
  1793. fi
  1794. # Check whether --with-openmp-libs or --without-openmp-libs was given.
  1795. if test "${with_openmp_libs+set}" = set; then
  1796. withval="$with_openmp_libs"
  1797. :
  1798. fi
  1799. # Put this early on so CPPFLAGS and LDFLAGS have any additional dirs
  1800. # With includes option
  1801. # Handle Fortran compiler choice
  1802. #LOC_CHECK_USE(g77, GNU Fortran 77, USE_G77)
  1803. # Done checking fortran
  1804. echo $ac_n "checking for additional include dirs""... $ac_c" 1>&6
  1805. echo "configure:2291: checking for additional include dirs" >&5
  1806. case "$with_includes" in
  1807. y | ye | yes | n | no)
  1808. { echo "configure: error: *** You must supply a directory to list --with-includes." 1>&2; exit 1; }
  1809. ;;
  1810. esac
  1811. echo "$ac_t""$with_includes" 1>&6
  1812. if test -n "$with_includes"; then
  1813. for dir in $with_includes; do
  1814. if test -d "$dir"; then
  1815. INCLUDE_DIRS="$INCLUDE_DIRS -I$dir"
  1816. else
  1817. { echo "configure: error: *** Include directory $dir does not exist." 1>&2; exit 1; }
  1818. fi
  1819. done
  1820. CPPFLAGS="$CPPFLAGS $INCLUDE_DIRS"
  1821. fi
  1822. # With libs option
  1823. echo $ac_n "checking for additional library dirs""... $ac_c" 1>&6
  1824. echo "configure:2314: checking for additional library dirs" >&5
  1825. case "$with_libs" in
  1826. y | ye | yes | n | no)
  1827. { echo "configure: error: *** You must supply a directory list to --with-libs." 1>&2; exit 1; }
  1828. ;;
  1829. esac
  1830. echo "$ac_t""$with_libs" 1>&6
  1831. if test -n "$with_libs"; then
  1832. for dir in $with_libs; do
  1833. if test -d "$dir"; then
  1834. LIBRARY_DIRS="$LIBRARY_DIRS -L$dir"
  1835. else
  1836. { echo "configure: error: *** Library directory $dir does not exist." 1>&2; exit 1; }
  1837. fi
  1838. done
  1839. LDFLAGS="$LDFLAGS $LIBRARY_DIRS"
  1840. fi
  1841. # Programs and standard headers, libraries, functions
  1842. # Find a good install program. We prefer a C program (faster),
  1843. # so one script is as good as another. But avoid the broken or
  1844. # incompatible versions:
  1845. # SysV /etc/install, /usr/sbin/install
  1846. # SunOS /usr/etc/install
  1847. # IRIX /sbin/install
  1848. # AIX /bin/install
  1849. # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  1850. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  1851. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  1852. # ./install, which can be erroneously created by make from ./install.sh.
  1853. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  1854. echo "configure:2348: checking for a BSD compatible install" >&5
  1855. if test -z "$INSTALL"; then
  1856. IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
  1857. for ac_dir in $PATH; do
  1858. # Account for people who put trailing slashes in PATH elements.
  1859. case "$ac_dir/" in
  1860. /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  1861. *)
  1862. # OSF1 and SCO ODT 3.0 have their own names for install.
  1863. # Don't use installbsd from OSF since it installs stuff as root
  1864. # by default.
  1865. for ac_prog in ginstall scoinst install; do
  1866. if test -f $ac_dir/$ac_prog; then
  1867. if test $ac_prog = install &&
  1868. grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  1869. # AIX install. It has an incompatible calling convention.
  1870. :
  1871. else
  1872. ac_cv_path_install="$ac_dir/$ac_prog -c"
  1873. break 2
  1874. fi
  1875. fi
  1876. done
  1877. ;;
  1878. esac
  1879. done
  1880. IFS="$ac_save_IFS"
  1881. if test "${ac_cv_path_install+set}" = set; then
  1882. INSTALL="$ac_cv_path_install"
  1883. else
  1884. # As a last resort, use the slow shell script. We don't cache a
  1885. # path for INSTALL within a source directory, because that will
  1886. # break other packages using the cache if that directory is
  1887. # removed, or if the path is relative.
  1888. INSTALL="$ac_install_sh"
  1889. fi
  1890. fi
  1891. echo "$ac_t""$INSTALL" 1>&6
  1892. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  1893. # It thinks the first close brace ends the variable substitution.
  1894. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  1895. test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  1896. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  1897. # Extract the first word of "flex", so it can be a program name with args.
  1898. set dummy flex; ac_word=$2
  1899. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1900. echo "configure:2401: checking for $ac_word" >&5
  1901. if test -n "$LEX"; then
  1902. ac_cv_prog_LEX="$LEX" # Let the user override the test.
  1903. else
  1904. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1905. ac_dummy="$PATH"
  1906. for ac_dir in $ac_dummy; do
  1907. test -z "$ac_dir" && ac_dir=.
  1908. if test -f $ac_dir/$ac_word; then
  1909. ac_cv_prog_LEX="flex"
  1910. break
  1911. fi
  1912. done
  1913. IFS="$ac_save_ifs"
  1914. test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
  1915. fi
  1916. LEX="$ac_cv_prog_LEX"
  1917. if test -n "$LEX"; then
  1918. echo "$ac_t""$LEX" 1>&6
  1919. else
  1920. echo "$ac_t""no" 1>&6
  1921. fi
  1922. if test -z "$LEXLIB"
  1923. then
  1924. case "$LEX" in
  1925. flex*) ac_lib=fl ;;
  1926. *) ac_lib=l ;;
  1927. esac
  1928. echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
  1929. echo "configure:2432: checking for yywrap in -l$ac_lib" >&5
  1930. ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
  1931. ac_save_LIBS="$LIBS"
  1932. LIBS="-l$ac_lib $LIBS"
  1933. cat > conftest.$ac_ext <<EOF
  1934. #line 2438 "configure"
  1935. #include "confdefs.h"
  1936. /* Override any gcc2 internal prototype to avoid an error. */
  1937. /* We use char because int might match the return type of a gcc2
  1938. builtin and then its argument prototype would still apply. */
  1939. char yywrap();
  1940. int main() {
  1941. yywrap()
  1942. ; return 0; }
  1943. EOF
  1944. if { (eval echo configure:2449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1945. rm -rf conftest*
  1946. eval "ac_cv_lib_$ac_lib_var=yes"
  1947. else
  1948. echo "configure: failed program was:" >&5
  1949. cat conftest.$ac_ext >&5
  1950. rm -rf conftest*
  1951. eval "ac_cv_lib_$ac_lib_var=no"
  1952. fi
  1953. rm -f conftest*
  1954. LIBS="$ac_save_LIBS"
  1955. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1956. echo "$ac_t""yes" 1>&6
  1957. LEXLIB="-l$ac_lib"
  1958. else
  1959. echo "$ac_t""no" 1>&6
  1960. fi
  1961. fi
  1962. if test "$LEX" = "lex"; then
  1963. # Extract the first word of "lex", so it can be a program name with args.
  1964. set dummy lex; ac_word=$2
  1965. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1966. echo "configure:2474: checking for $ac_word" >&5
  1967. case "$LEXPATH" in
  1968. /*)
  1969. ac_cv_path_LEXPATH="$LEXPATH" # Let the user override the test with a path.
  1970. ;;
  1971. ?:/*)
  1972. ac_cv_path_LEXPATH="$LEXPATH" # Let the user override the test with a dos path.
  1973. ;;
  1974. *)
  1975. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1976. ac_dummy="$PATH"
  1977. for ac_dir in $ac_dummy; do
  1978. test -z "$ac_dir" && ac_dir=.
  1979. if test -f $ac_dir/$ac_word; then
  1980. ac_cv_path_LEXPATH="$ac_dir/$ac_word"
  1981. break
  1982. fi
  1983. done
  1984. IFS="$ac_save_ifs"
  1985. test -z "$ac_cv_path_LEXPATH" && ac_cv_path_LEXPATH="no"
  1986. ;;
  1987. esac
  1988. LEXPATH="$ac_cv_path_LEXPATH"
  1989. if test -n "$LEXPATH"; then
  1990. echo "$ac_t""$LEXPATH" 1>&6
  1991. else
  1992. echo "$ac_t""no" 1>&6
  1993. fi
  1994. if test "$LEXPATH" = "no"; then
  1995. { echo "configure: error: *** Unable to locate lex." 1>&2; exit 1; }
  1996. fi
  1997. fi
  1998. for ac_prog in 'bison -y' byacc
  1999. do
  2000. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2001. set dummy $ac_prog; ac_word=$2
  2002. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2003. echo "configure:2514: checking for $ac_word" >&5
  2004. if test -n "$YACC"; then
  2005. ac_cv_prog_YACC="$YACC" # Let the user override the test.
  2006. else
  2007. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2008. ac_dummy="$PATH"
  2009. for ac_dir in $ac_dummy; do
  2010. test -z "$ac_dir" && ac_dir=.
  2011. if test -f $ac_dir/$ac_word; then
  2012. ac_cv_prog_YACC="$ac_prog"
  2013. break
  2014. fi
  2015. done
  2016. IFS="$ac_save_ifs"
  2017. fi
  2018. YACC="$ac_cv_prog_YACC"
  2019. if test -n "$YACC"; then
  2020. echo "$ac_t""$YACC" 1>&6
  2021. else
  2022. echo "$ac_t""no" 1>&6
  2023. fi
  2024. test -n "$YACC" && break
  2025. done
  2026. test -n "$YACC" || YACC="yacc"
  2027. if test "$YACC" = "yacc"; then
  2028. # Extract the first word of "yacc", so it can be a program name with args.
  2029. set dummy yacc; ac_word=$2
  2030. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2031. echo "configure:2545: checking for $ac_word" >&5
  2032. case "$YACCPATH" in
  2033. /*)
  2034. ac_cv_path_YACCPATH="$YACCPATH" # Let the user override the test with a path.
  2035. ;;
  2036. ?:/*)
  2037. ac_cv_path_YACCPATH="$YACCPATH" # Let the user override the test with a dos path.
  2038. ;;
  2039. *)
  2040. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2041. ac_dummy="$PATH"
  2042. for ac_dir in $ac_dummy; do
  2043. test -z "$ac_dir" && ac_dir=.
  2044. if test -f $ac_dir/$ac_word; then
  2045. ac_cv_path_YACCPATH="$ac_dir/$ac_word"
  2046. break
  2047. fi
  2048. done
  2049. IFS="$ac_save_ifs"
  2050. test -z "$ac_cv_path_YACCPATH" && ac_cv_path_YACCPATH="no"
  2051. ;;
  2052. esac
  2053. YACCPATH="$ac_cv_path_YACCPATH"
  2054. if test -n "$YACCPATH"; then
  2055. echo "$ac_t""$YACCPATH" 1>&6
  2056. else
  2057. echo "$ac_t""no" 1>&6
  2058. fi
  2059. if test "$YACCPATH" = "no"; then
  2060. { echo "configure: error: *** Unable to locate yacc." 1>&2; exit 1; }
  2061. fi
  2062. fi
  2063. # Extract the first word of "ranlib", so it can be a program name with args.
  2064. set dummy ranlib; ac_word=$2
  2065. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2066. echo "configure:2583: checking for $ac_word" >&5
  2067. if test -n "$RANLIB"; then
  2068. ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  2069. else
  2070. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2071. ac_dummy="$PATH"
  2072. for ac_dir in $ac_dummy; do
  2073. test -z "$ac_dir" && ac_dir=.
  2074. if test -f $ac_dir/$ac_word; then
  2075. ac_cv_prog_RANLIB="ranlib"
  2076. break
  2077. fi
  2078. done
  2079. IFS="$ac_save_ifs"
  2080. test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  2081. fi
  2082. RANLIB="$ac_cv_prog_RANLIB"
  2083. if test -n "$RANLIB"; then
  2084. echo "$ac_t""$RANLIB" 1>&6
  2085. else
  2086. echo "$ac_t""no" 1>&6
  2087. fi
  2088. for ac_prog in ar
  2089. do
  2090. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2091. set dummy $ac_prog; ac_word=$2
  2092. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2093. echo "configure:2612: checking for $ac_word" >&5
  2094. if test -n "$AR"; then
  2095. ac_cv_prog_AR="$AR" # Let the user override the test.
  2096. else
  2097. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2098. ac_dummy="$PATH"
  2099. for ac_dir in $ac_dummy; do
  2100. test -z "$ac_dir" && ac_dir=.
  2101. if test -f $ac_dir/$ac_word; then
  2102. ac_cv_prog_AR="$ac_prog"
  2103. break
  2104. fi
  2105. done
  2106. IFS="$ac_save_ifs"
  2107. fi
  2108. AR="$ac_cv_prog_AR"
  2109. if test -n "$AR"; then
  2110. echo "$ac_t""$AR" 1>&6
  2111. else
  2112. echo "$ac_t""no" 1>&6
  2113. fi
  2114. test -n "$AR" && break
  2115. done
  2116. for ac_prog in env
  2117. do
  2118. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2119. set dummy $ac_prog; ac_word=$2
  2120. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2121. echo "configure:2643: checking for $ac_word" >&5
  2122. if test -n "$ENV"; then
  2123. ac_cv_prog_ENV="$ENV" # Let the user override the test.
  2124. else
  2125. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2126. ac_dummy="$PATH"
  2127. for ac_dir in $ac_dummy; do
  2128. test -z "$ac_dir" && ac_dir=.
  2129. if test -f $ac_dir/$ac_word; then
  2130. ac_cv_prog_ENV="$ac_prog"
  2131. break
  2132. fi
  2133. done
  2134. IFS="$ac_save_ifs"
  2135. fi
  2136. ENV="$ac_cv_prog_ENV"
  2137. if test -n "$ENV"; then
  2138. echo "$ac_t""$ENV" 1>&6
  2139. else
  2140. echo "$ac_t""no" 1>&6
  2141. fi
  2142. test -n "$ENV" && break
  2143. done
  2144. # Extract the first word of "perl", so it can be a program name with args.
  2145. set dummy perl; ac_word=$2
  2146. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2147. echo "configure:2672: checking for $ac_word" >&5
  2148. case "$PERL" in
  2149. /*)
  2150. ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
  2151. ;;
  2152. ?:/*)
  2153. ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
  2154. ;;
  2155. *)
  2156. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2157. ac_dummy="$PATH"
  2158. for ac_dir in $ac_dummy; do
  2159. test -z "$ac_dir" && ac_dir=.
  2160. if test -f $ac_dir/$ac_word; then
  2161. ac_cv_path_PERL="$ac_dir/$ac_word"
  2162. break
  2163. fi
  2164. done
  2165. IFS="$ac_save_ifs"
  2166. test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no"
  2167. ;;
  2168. esac
  2169. PERL="$ac_cv_path_PERL"
  2170. if test -n "$PERL"; then
  2171. echo "$ac_t""$PERL" 1>&6
  2172. else
  2173. echo "$ac_t""no" 1>&6
  2174. fi
  2175. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  2176. echo "configure:2703: checking how to run the C preprocessor" >&5
  2177. # On Suns, sometimes $CPP names a directory.
  2178. if test -n "$CPP" && test -d "$CPP"; then
  2179. CPP=
  2180. fi
  2181. if test -z "$CPP"; then
  2182. # This must be in double quotes, not single quotes, because CPP may get
  2183. # substituted into the Makefile and "${CC-cc}" will confuse make.
  2184. CPP="${CC-cc} -E"
  2185. # On the NeXT, cc -E runs the code through the compiler's parser,
  2186. # not just through cpp.
  2187. cat > conftest.$ac_ext <<EOF
  2188. #line 2716 "configure"
  2189. #include "confdefs.h"
  2190. #include <assert.h>
  2191. Syntax Error
  2192. EOF
  2193. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2194. { (eval echo configure:2722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2195. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2196. if test -z "$ac_err"; then
  2197. :
  2198. else
  2199. echo "$ac_err" >&5
  2200. echo "configure: failed program was:" >&5
  2201. cat conftest.$ac_ext >&5
  2202. rm -rf conftest*
  2203. CPP="${CC-cc} -E -traditional-cpp"
  2204. cat > conftest.$ac_ext <<EOF
  2205. #line 2733 "configure"
  2206. #include "confdefs.h"
  2207. #include <assert.h>
  2208. Syntax Error
  2209. EOF
  2210. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2211. { (eval echo configure:2739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2212. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2213. if test -z "$ac_err"; then
  2214. :
  2215. else
  2216. echo "$ac_err" >&5
  2217. echo "configure: failed program was:" >&5
  2218. cat conftest.$ac_ext >&5
  2219. rm -rf conftest*
  2220. CPP="${CC-cc} -nologo -E"
  2221. cat > conftest.$ac_ext <<EOF
  2222. #line 2750 "configure"
  2223. #include "confdefs.h"
  2224. #include <assert.h>
  2225. Syntax Error
  2226. EOF
  2227. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2228. { (eval echo configure:2756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2229. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2230. if test -z "$ac_err"; then
  2231. :
  2232. else
  2233. echo "$ac_err" >&5
  2234. echo "configure: failed program was:" >&5
  2235. cat conftest.$ac_ext >&5
  2236. rm -rf conftest*
  2237. CPP=/lib/cpp
  2238. fi
  2239. rm -f conftest*
  2240. fi
  2241. rm -f conftest*
  2242. fi
  2243. rm -f conftest*
  2244. ac_cv_prog_CPP="$CPP"
  2245. CPP="$ac_cv_prog_CPP"
  2246. else
  2247. ac_cv_prog_CPP="$CPP"
  2248. fi
  2249. echo "$ac_t""$CPP" 1>&6
  2250. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  2251. echo "configure:2780: checking for ANSI C header files" >&5
  2252. cat > conftest.$ac_ext <<EOF
  2253. #line 2783 "configure"
  2254. #include "confdefs.h"
  2255. #include <stdlib.h>
  2256. #include <stdarg.h>
  2257. #include <string.h>
  2258. #include <float.h>
  2259. EOF
  2260. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2261. { (eval echo configure:2791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2262. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2263. if test -z "$ac_err"; then
  2264. rm -rf conftest*
  2265. ac_cv_header_stdc=yes
  2266. else
  2267. echo "$ac_err" >&5
  2268. echo "configure: failed program was:" >&5
  2269. cat conftest.$ac_ext >&5
  2270. rm -rf conftest*
  2271. ac_cv_header_stdc=no
  2272. fi
  2273. rm -f conftest*
  2274. if test $ac_cv_header_stdc = yes; then
  2275. # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  2276. cat > conftest.$ac_ext <<EOF
  2277. #line 2808 "configure"
  2278. #include "confdefs.h"
  2279. #include <string.h>
  2280. EOF
  2281. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2282. egrep "memchr" >/dev/null 2>&1; then
  2283. :
  2284. else
  2285. rm -rf conftest*
  2286. ac_cv_header_stdc=no
  2287. fi
  2288. rm -f conftest*
  2289. fi
  2290. if test $ac_cv_header_stdc = yes; then
  2291. # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  2292. cat > conftest.$ac_ext <<EOF
  2293. #line 2826 "configure"
  2294. #include "confdefs.h"
  2295. #include <stdlib.h>
  2296. EOF
  2297. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2298. egrep "free" >/dev/null 2>&1; then
  2299. :
  2300. else
  2301. rm -rf conftest*
  2302. ac_cv_header_stdc=no
  2303. fi
  2304. rm -f conftest*
  2305. fi
  2306. if test $ac_cv_header_stdc = yes; then
  2307. # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  2308. if test "$cross_compiling" = yes; then
  2309. :
  2310. else
  2311. cat > conftest.$ac_ext <<EOF
  2312. #line 2847 "configure"
  2313. #include "confdefs.h"
  2314. #include <ctype.h>
  2315. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  2316. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  2317. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  2318. int main () { int i; for (i = 0; i < 256; i++)
  2319. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  2320. exit (0); }
  2321. EOF
  2322. if { (eval echo configure:2858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2323. then
  2324. :
  2325. else
  2326. echo "configure: failed program was:" >&5
  2327. cat conftest.$ac_ext >&5
  2328. rm -fr conftest*
  2329. ac_cv_header_stdc=no
  2330. fi
  2331. rm -fr conftest*
  2332. fi
  2333. fi
  2334. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  2335. if test $ac_cv_header_stdc = yes; then
  2336. cat >> confdefs.h <<\EOF
  2337. #define STDC_HEADERS 1
  2338. EOF
  2339. fi
  2340. #AC_CHECK_HEADERS(curses.h limits.h termio.h termios.h unistd.h values.h)
  2341. for ac_hdr in limits.h termio.h termios.h unistd.h values.h f2c.h g2c.h
  2342. do
  2343. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2344. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2345. echo "configure:2885: checking for $ac_hdr" >&5
  2346. cat > conftest.$ac_ext <<EOF
  2347. #line 2888 "configure"
  2348. #include "confdefs.h"
  2349. #include <$ac_hdr>
  2350. EOF
  2351. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2352. { (eval echo configure:2893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2353. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2354. if test -z "$ac_err"; then
  2355. rm -rf conftest*
  2356. eval "ac_cv_header_$ac_safe=yes"
  2357. else
  2358. echo "$ac_err" >&5
  2359. echo "configure: failed program was:" >&5
  2360. cat conftest.$ac_ext >&5
  2361. rm -rf conftest*
  2362. eval "ac_cv_header_$ac_safe=no"
  2363. fi
  2364. rm -f conftest*
  2365. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2366. echo "$ac_t""yes" 1>&6
  2367. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2368. cat >> confdefs.h <<EOF
  2369. #define $ac_tr_hdr 1
  2370. EOF
  2371. else
  2372. echo "$ac_t""no" 1>&6
  2373. fi
  2374. done
  2375. for ac_hdr in sys/ioctl.h sys/mtio.h sys/resource.h sys/time.h
  2376. do
  2377. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2378. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2379. echo "configure:2922: checking for $ac_hdr" >&5
  2380. cat > conftest.$ac_ext <<EOF
  2381. #line 2925 "configure"
  2382. #include "confdefs.h"
  2383. #include <$ac_hdr>
  2384. EOF
  2385. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2386. { (eval echo configure:2930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2387. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2388. if test -z "$ac_err"; then
  2389. rm -rf conftest*
  2390. eval "ac_cv_header_$ac_safe=yes"
  2391. else
  2392. echo "$ac_err" >&5
  2393. echo "configure: failed program was:" >&5
  2394. cat conftest.$ac_ext >&5
  2395. rm -rf conftest*
  2396. eval "ac_cv_header_$ac_safe=no"
  2397. fi
  2398. rm -f conftest*
  2399. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2400. echo "$ac_t""yes" 1>&6
  2401. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2402. cat >> confdefs.h <<EOF
  2403. #define $ac_tr_hdr 1
  2404. EOF
  2405. else
  2406. echo "$ac_t""no" 1>&6
  2407. fi
  2408. done
  2409. for ac_hdr in sys/timeb.h sys/types.h sys/utsname.h
  2410. do
  2411. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2412. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2413. echo "configure:2959: checking for $ac_hdr" >&5
  2414. cat > conftest.$ac_ext <<EOF
  2415. #line 2962 "configure"
  2416. #include "confdefs.h"
  2417. #include <$ac_hdr>
  2418. EOF
  2419. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2420. { (eval echo configure:2967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2421. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2422. if test -z "$ac_err"; then
  2423. rm -rf conftest*
  2424. eval "ac_cv_header_$ac_safe=yes"
  2425. else
  2426. echo "$ac_err" >&5
  2427. echo "configure: failed program was:" >&5
  2428. cat conftest.$ac_ext >&5
  2429. rm -rf conftest*
  2430. eval "ac_cv_header_$ac_safe=no"
  2431. fi
  2432. rm -f conftest*
  2433. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2434. echo "$ac_t""yes" 1>&6
  2435. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2436. cat >> confdefs.h <<EOF
  2437. #define $ac_tr_hdr 1
  2438. EOF
  2439. else
  2440. echo "$ac_t""no" 1>&6
  2441. fi
  2442. done
  2443. for ac_hdr in libintl.h iconv.h
  2444. do
  2445. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2446. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2447. echo "configure:2996: checking for $ac_hdr" >&5
  2448. cat > conftest.$ac_ext <<EOF
  2449. #line 2999 "configure"
  2450. #include "confdefs.h"
  2451. #include <$ac_hdr>
  2452. EOF
  2453. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2454. { (eval echo configure:3004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2455. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2456. if test -z "$ac_err"; then
  2457. rm -rf conftest*
  2458. eval "ac_cv_header_$ac_safe=yes"
  2459. else
  2460. echo "$ac_err" >&5
  2461. echo "configure: failed program was:" >&5
  2462. cat conftest.$ac_ext >&5
  2463. rm -rf conftest*
  2464. eval "ac_cv_header_$ac_safe=no"
  2465. fi
  2466. rm -f conftest*
  2467. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2468. echo "$ac_t""yes" 1>&6
  2469. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2470. cat >> confdefs.h <<EOF
  2471. #define $ac_tr_hdr 1
  2472. EOF
  2473. else
  2474. echo "$ac_t""no" 1>&6
  2475. fi
  2476. done
  2477. for ac_hdr in langinfo.h
  2478. do
  2479. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2480. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2481. echo "configure:3033: checking for $ac_hdr" >&5
  2482. cat > conftest.$ac_ext <<EOF
  2483. #line 3036 "configure"
  2484. #include "confdefs.h"
  2485. #include <$ac_hdr>
  2486. EOF
  2487. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2488. { (eval echo configure:3041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2489. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2490. if test -z "$ac_err"; then
  2491. rm -rf conftest*
  2492. eval "ac_cv_header_$ac_safe=yes"
  2493. else
  2494. echo "$ac_err" >&5
  2495. echo "configure: failed program was:" >&5
  2496. cat conftest.$ac_ext >&5
  2497. rm -rf conftest*
  2498. eval "ac_cv_header_$ac_safe=no"
  2499. fi
  2500. rm -f conftest*
  2501. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2502. echo "$ac_t""yes" 1>&6
  2503. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2504. cat >> confdefs.h <<EOF
  2505. #define $ac_tr_hdr 1
  2506. EOF
  2507. else
  2508. echo "$ac_t""no" 1>&6
  2509. fi
  2510. done
  2511. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  2512. echo "configure:3067: checking whether time.h and sys/time.h may both be included" >&5
  2513. cat > conftest.$ac_ext <<EOF
  2514. #line 3070 "configure"
  2515. #include "confdefs.h"
  2516. #include <sys/types.h>
  2517. #include <sys/time.h>
  2518. #include <time.h>
  2519. int main() {
  2520. struct tm *tp;
  2521. ; return 0; }
  2522. EOF
  2523. if { (eval echo configure:3079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2524. rm -rf conftest*
  2525. ac_cv_header_time=yes
  2526. else
  2527. echo "configure: failed program was:" >&5
  2528. cat conftest.$ac_ext >&5
  2529. rm -rf conftest*
  2530. ac_cv_header_time=no
  2531. fi
  2532. rm -f conftest*
  2533. echo "$ac_t""$ac_cv_header_time" 1>&6
  2534. if test $ac_cv_header_time = yes; then
  2535. cat >> confdefs.h <<\EOF
  2536. #define TIME_WITH_SYS_TIME 1
  2537. EOF
  2538. fi
  2539. echo $ac_n "checking for off_t""... $ac_c" 1>&6
  2540. echo "configure:3099: checking for off_t" >&5
  2541. cat > conftest.$ac_ext <<EOF
  2542. #line 3102 "configure"
  2543. #include "confdefs.h"
  2544. #include <sys/types.h>
  2545. #if STDC_HEADERS
  2546. #include <stdlib.h>
  2547. #include <stddef.h>
  2548. #endif
  2549. EOF
  2550. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2551. egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  2552. rm -rf conftest*
  2553. ac_cv_type_off_t=yes
  2554. else
  2555. rm -rf conftest*
  2556. ac_cv_type_off_t=no
  2557. fi
  2558. rm -f conftest*
  2559. echo "$ac_t""$ac_cv_type_off_t" 1>&6
  2560. if test $ac_cv_type_off_t = no; then
  2561. cat >> confdefs.h <<\EOF
  2562. #define off_t long
  2563. EOF
  2564. fi
  2565. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  2566. echo "configure:3129: checking for uid_t in sys/types.h" >&5
  2567. cat > conftest.$ac_ext <<EOF
  2568. #line 3132 "configure"
  2569. #include "confdefs.h"
  2570. #include <sys/types.h>
  2571. EOF
  2572. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2573. egrep "uid_t" >/dev/null 2>&1; then
  2574. rm -rf conftest*
  2575. ac_cv_type_uid_t=yes
  2576. else
  2577. rm -rf conftest*
  2578. ac_cv_type_uid_t=no
  2579. fi
  2580. rm -f conftest*
  2581. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  2582. if test $ac_cv_type_uid_t = no; then
  2583. cat >> confdefs.h <<\EOF
  2584. #define uid_t int
  2585. EOF
  2586. cat >> confdefs.h <<\EOF
  2587. #define gid_t int
  2588. EOF
  2589. fi
  2590. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  2591. echo "configure:3160: checking return type of signal handlers" >&5
  2592. cat > conftest.$ac_ext <<EOF
  2593. #line 3163 "configure"
  2594. #include "confdefs.h"
  2595. #include <sys/types.h>
  2596. #include <signal.h>
  2597. #ifdef signal
  2598. #undef signal
  2599. #endif
  2600. #ifdef __cplusplus
  2601. extern "C" void (*signal (int, void (*)(int)))(int);
  2602. #else
  2603. void (*signal ()) ();
  2604. #endif
  2605. int main() {
  2606. int i;
  2607. ; return 0; }
  2608. EOF
  2609. if { (eval echo configure:3180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2610. rm -rf conftest*
  2611. ac_cv_type_signal=void
  2612. else
  2613. echo "configure: failed program was:" >&5
  2614. cat conftest.$ac_ext >&5
  2615. rm -rf conftest*
  2616. ac_cv_type_signal=int
  2617. fi
  2618. rm -f conftest*
  2619. echo "$ac_t""$ac_cv_type_signal" 1>&6
  2620. cat >> confdefs.h <<EOF
  2621. #define RETSIGTYPE $ac_cv_type_signal
  2622. EOF
  2623. echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
  2624. echo "configure:3198: checking for Cygwin environment" >&5
  2625. cat > conftest.$ac_ext <<EOF
  2626. #line 3201 "configure"
  2627. #include "confdefs.h"
  2628. int main() {
  2629. #ifndef __CYGWIN__
  2630. #define __CYGWIN__ __CYGWIN32__
  2631. #endif
  2632. return __CYGWIN__;
  2633. ; return 0; }
  2634. EOF
  2635. if { (eval echo configure:3212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2636. rm -rf conftest*
  2637. ac_cv_cygwin=yes
  2638. else
  2639. echo "configure: failed program was:" >&5
  2640. cat conftest.$ac_ext >&5
  2641. rm -rf conftest*
  2642. ac_cv_cygwin=no
  2643. fi
  2644. rm -f conftest*
  2645. rm -f conftest*
  2646. echo "$ac_t""$ac_cv_cygwin" 1>&6
  2647. CYGWIN=
  2648. test "$ac_cv_cygwin" = yes && CYGWIN=yes
  2649. for ac_func in ftime gethostname gettimeofday lseek nice time uname
  2650. do
  2651. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2652. echo "configure:3230: checking for $ac_func" >&5
  2653. cat > conftest.$ac_ext <<EOF
  2654. #line 3233 "configure"
  2655. #include "confdefs.h"
  2656. /* System header to define __stub macros and hopefully few prototypes,
  2657. which can conflict with char $ac_func(); below. */
  2658. #include <assert.h>
  2659. /* Override any gcc2 internal prototype to avoid an error. */
  2660. /* We use char because int might match the return type of a gcc2
  2661. builtin and then its argument prototype would still apply. */
  2662. char $ac_func();
  2663. int main() {
  2664. /* The GNU C library defines this for functions which it implements
  2665. to always fail with ENOSYS. Some functions are actually named
  2666. something starting with __ and the normal name is an alias. */
  2667. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2668. choke me
  2669. #else
  2670. $ac_func();
  2671. #endif
  2672. ; return 0; }
  2673. EOF
  2674. if { (eval echo configure:3256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2675. rm -rf conftest*
  2676. eval "ac_cv_func_$ac_func=yes"
  2677. else
  2678. echo "configure: failed program was:" >&5
  2679. cat conftest.$ac_ext >&5
  2680. rm -rf conftest*
  2681. eval "ac_cv_func_$ac_func=no"
  2682. fi
  2683. rm -f conftest*
  2684. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2685. echo "$ac_t""yes" 1>&6
  2686. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2687. cat >> confdefs.h <<EOF
  2688. #define $ac_tr_func 1
  2689. EOF
  2690. else
  2691. echo "$ac_t""no" 1>&6
  2692. fi
  2693. done
  2694. for ac_func in seteuid setpriority setreuid setruid
  2695. do
  2696. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2697. echo "configure:3282: checking for $ac_func" >&5
  2698. cat > conftest.$ac_ext <<EOF
  2699. #line 3285 "configure"
  2700. #include "confdefs.h"
  2701. /* System header to define __stub macros and hopefully few prototypes,
  2702. which can conflict with char $ac_func(); below. */
  2703. #include <assert.h>
  2704. /* Override any gcc2 internal prototype to avoid an error. */
  2705. /* We use char because int might match the return type of a gcc2
  2706. builtin and then its argument prototype would still apply. */
  2707. char $ac_func();
  2708. int main() {
  2709. /* The GNU C library defines this for functions which it implements
  2710. to always fail with ENOSYS. Some functions are actually named
  2711. something starting with __ and the normal name is an alias. */
  2712. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2713. choke me
  2714. #else
  2715. $ac_func();
  2716. #endif
  2717. ; return 0; }
  2718. EOF
  2719. if { (eval echo configure:3308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2720. rm -rf conftest*
  2721. eval "ac_cv_func_$ac_func=yes"
  2722. else
  2723. echo "configure: failed program was:" >&5
  2724. cat conftest.$ac_ext >&5
  2725. rm -rf conftest*
  2726. eval "ac_cv_func_$ac_func=no"
  2727. fi
  2728. rm -f conftest*
  2729. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2730. echo "$ac_t""yes" 1>&6
  2731. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2732. cat >> confdefs.h <<EOF
  2733. #define $ac_tr_func 1
  2734. EOF
  2735. else
  2736. echo "$ac_t""no" 1>&6
  2737. fi
  2738. done
  2739. for ac_func in drand48
  2740. do
  2741. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2742. echo "configure:3334: checking for $ac_func" >&5
  2743. cat > conftest.$ac_ext <<EOF
  2744. #line 3337 "configure"
  2745. #include "confdefs.h"
  2746. /* System header to define __stub macros and hopefully few prototypes,
  2747. which can conflict with char $ac_func(); below. */
  2748. #include <assert.h>
  2749. /* Override any gcc2 internal prototype to avoid an error. */
  2750. /* We use char because int might match the return type of a gcc2
  2751. builtin and then its argument prototype would still apply. */
  2752. char $ac_func();
  2753. int main() {
  2754. /* The GNU C library defines this for functions which it implements
  2755. to always fail with ENOSYS. Some functions are actually named
  2756. something starting with __ and the normal name is an alias. */
  2757. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2758. choke me
  2759. #else
  2760. $ac_func();
  2761. #endif
  2762. ; return 0; }
  2763. EOF
  2764. if { (eval echo configure:3360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2765. rm -rf conftest*
  2766. eval "ac_cv_func_$ac_func=yes"
  2767. else
  2768. echo "configure: failed program was:" >&5
  2769. cat conftest.$ac_ext >&5
  2770. rm -rf conftest*
  2771. eval "ac_cv_func_$ac_func=no"
  2772. fi
  2773. rm -f conftest*
  2774. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2775. echo "$ac_t""yes" 1>&6
  2776. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2777. cat >> confdefs.h <<EOF
  2778. #define $ac_tr_func 1
  2779. EOF
  2780. else
  2781. echo "$ac_t""no" 1>&6
  2782. fi
  2783. done
  2784. for ac_func in putenv setenv
  2785. do
  2786. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2787. echo "configure:3386: checking for $ac_func" >&5
  2788. cat > conftest.$ac_ext <<EOF
  2789. #line 3389 "configure"
  2790. #include "confdefs.h"
  2791. /* System header to define __stub macros and hopefully few prototypes,
  2792. which can conflict with char $ac_func(); below. */
  2793. #include <assert.h>
  2794. /* Override any gcc2 internal prototype to avoid an error. */
  2795. /* We use char because int might match the return type of a gcc2
  2796. builtin and then its argument prototype would still apply. */
  2797. char $ac_func();
  2798. int main() {
  2799. /* The GNU C library defines this for functions which it implements
  2800. to always fail with ENOSYS. Some functions are actually named
  2801. something starting with __ and the normal name is an alias. */
  2802. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2803. choke me
  2804. #else
  2805. $ac_func();
  2806. #endif
  2807. ; return 0; }
  2808. EOF
  2809. if { (eval echo configure:3412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2810. rm -rf conftest*
  2811. eval "ac_cv_func_$ac_func=yes"
  2812. else
  2813. echo "configure: failed program was:" >&5
  2814. cat conftest.$ac_ext >&5
  2815. rm -rf conftest*
  2816. eval "ac_cv_func_$ac_func=no"
  2817. fi
  2818. rm -f conftest*
  2819. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2820. echo "$ac_t""yes" 1>&6
  2821. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2822. cat >> confdefs.h <<EOF
  2823. #define $ac_tr_func 1
  2824. EOF
  2825. else
  2826. echo "$ac_t""no" 1>&6
  2827. fi
  2828. done
  2829. for ac_func in nanosleep
  2830. do
  2831. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2832. echo "configure:3438: checking for $ac_func" >&5
  2833. cat > conftest.$ac_ext <<EOF
  2834. #line 3441 "configure"
  2835. #include "confdefs.h"
  2836. /* System header to define __stub macros and hopefully few prototypes,
  2837. which can conflict with char $ac_func(); below. */
  2838. #include <assert.h>
  2839. /* Override any gcc2 internal prototype to avoid an error. */
  2840. /* We use char because int might match the return type of a gcc2
  2841. builtin and then its argument prototype would still apply. */
  2842. char $ac_func();
  2843. int main() {
  2844. /* The GNU C library defines this for functions which it implements
  2845. to always fail with ENOSYS. Some functions are actually named
  2846. something starting with __ and the normal name is an alias. */
  2847. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2848. choke me
  2849. #else
  2850. $ac_func();
  2851. #endif
  2852. ; return 0; }
  2853. EOF
  2854. if { (eval echo configure:3464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2855. rm -rf conftest*
  2856. eval "ac_cv_func_$ac_func=yes"
  2857. else
  2858. echo "configure: failed program was:" >&5
  2859. cat conftest.$ac_ext >&5
  2860. rm -rf conftest*
  2861. eval "ac_cv_func_$ac_func=no"
  2862. fi
  2863. rm -f conftest*
  2864. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2865. echo "$ac_t""yes" 1>&6
  2866. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2867. cat >> confdefs.h <<EOF
  2868. #define $ac_tr_func 1
  2869. EOF
  2870. else
  2871. echo "$ac_t""no" 1>&6
  2872. fi
  2873. done
  2874. if test "$cross_compiling" != "yes" ; then
  2875. echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
  2876. echo "configure:3489: checking whether setpgrp takes no argument" >&5
  2877. if test "$cross_compiling" = yes; then
  2878. { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
  2879. else
  2880. cat > conftest.$ac_ext <<EOF
  2881. #line 3495 "configure"
  2882. #include "confdefs.h"
  2883. #ifdef HAVE_UNISTD_H
  2884. #include <unistd.h>
  2885. #endif
  2886. /*
  2887. * If this system has a BSD-style setpgrp, which takes arguments, exit
  2888. * successfully.
  2889. */
  2890. main()
  2891. {
  2892. if (setpgrp(1,1) == -1)
  2893. exit(0);
  2894. else
  2895. exit(1);
  2896. }
  2897. EOF
  2898. if { (eval echo configure:3515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2899. then
  2900. ac_cv_func_setpgrp_void=no
  2901. else
  2902. echo "configure: failed program was:" >&5
  2903. cat conftest.$ac_ext >&5
  2904. rm -fr conftest*
  2905. ac_cv_func_setpgrp_void=yes
  2906. fi
  2907. rm -fr conftest*
  2908. fi
  2909. echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
  2910. if test $ac_cv_func_setpgrp_void = yes; then
  2911. cat >> confdefs.h <<\EOF
  2912. #define SETPGRP_VOID 1
  2913. EOF
  2914. fi
  2915. else
  2916. CROSS_COMPILING=1
  2917. fi
  2918. echo $ac_n "checking for long long int""... $ac_c" 1>&6
  2919. echo "configure:3543: checking for long long int" >&5
  2920. cat > conftest.$ac_ext <<EOF
  2921. #line 3545 "configure"
  2922. #include "confdefs.h"
  2923. int main() {
  2924. long long int x;
  2925. ; return 0; }
  2926. EOF
  2927. if { (eval echo configure:3552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2928. rm -rf conftest*
  2929. echo "$ac_t""yes" 1>&6
  2930. cat >> confdefs.h <<\EOF
  2931. #define HAVE_LONG_LONG_INT 1
  2932. EOF
  2933. else
  2934. echo "configure: failed program was:" >&5
  2935. cat conftest.$ac_ext >&5
  2936. rm -rf conftest*
  2937. echo "$ac_t""no" 1>&6
  2938. fi
  2939. rm -f conftest*
  2940. echo $ac_n "checking for W11""... $ac_c" 1>&6
  2941. echo "configure:3572: checking for W11" >&5
  2942. case "$enable_w11" in
  2943. yes|no) echo "$ac_t"""$enable_w11"" 1>&6 ;;
  2944. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  2945. esac
  2946. USE_X11=
  2947. USE_W11=
  2948. XLIB=
  2949. XTLIB=
  2950. if test "$enable_w11" = "yes" ; then
  2951. X_CFLAGS=-I${SRCDIR}/display/drivers/windows/libW11
  2952. X_LIBS='-L$(LIBDIR)'
  2953. USE_W11="1"
  2954. USE_X11="1"
  2955. XLIB=-lX11
  2956. CFLAGS="$CFLAGS -D__W98__"
  2957. else
  2958. # If we find X, set shell vars x_includes and x_libraries to the
  2959. # paths, otherwise set no_x=yes.
  2960. # Uses ac_ vars as temps to allow command line to override cache and checks.
  2961. # --without-x overrides everything else, but does not touch the cache.
  2962. echo $ac_n "checking for X""... $ac_c" 1>&6
  2963. echo "configure:3600: checking for X" >&5
  2964. # Check whether --with-x or --without-x was given.
  2965. if test "${with_x+set}" = set; then
  2966. withval="$with_x"
  2967. :
  2968. fi
  2969. # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
  2970. if test "x$with_x" = xno; then
  2971. # The user explicitly disabled X.
  2972. have_x=disabled
  2973. else
  2974. if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  2975. # Both variables are already set.
  2976. have_x=yes
  2977. else
  2978. # One or both of the vars are not set, and there is no cached value.
  2979. ac_x_includes=NO ac_x_libraries=NO
  2980. rm -fr conftestdir
  2981. if mkdir conftestdir; then
  2982. cd conftestdir
  2983. # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  2984. cat > Imakefile <<'EOF'
  2985. acfindx:
  2986. @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  2987. EOF
  2988. if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  2989. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  2990. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  2991. # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  2992. for ac_extension in a so sl; do
  2993. if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  2994. test -f $ac_im_libdir/libX11.$ac_extension; then
  2995. ac_im_usrlibdir=$ac_im_libdir; break
  2996. fi
  2997. done
  2998. # Screen out bogus values from the imake configuration. They are
  2999. # bogus both because they are the default anyway, and because
  3000. # using them would break gcc on systems where it needs fixed includes.
  3001. case "$ac_im_incroot" in
  3002. /usr/include) ;;
  3003. *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  3004. esac
  3005. case "$ac_im_usrlibdir" in
  3006. /usr/lib | /lib) ;;
  3007. *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  3008. esac
  3009. fi
  3010. cd ..
  3011. rm -fr conftestdir
  3012. fi
  3013. if test "$ac_x_includes" = NO; then
  3014. # Guess where to find include files, by looking for this one X11 .h file.
  3015. test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  3016. # First, try using that file with no special directory specified.
  3017. cat > conftest.$ac_ext <<EOF
  3018. #line 3660 "configure"
  3019. #include "confdefs.h"
  3020. #include <$x_direct_test_include>
  3021. EOF
  3022. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3023. { (eval echo configure:3665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3024. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3025. if test -z "$ac_err"; then
  3026. rm -rf conftest*
  3027. # We can compile using X headers with no special include directory.
  3028. ac_x_includes=
  3029. else
  3030. echo "$ac_err" >&5
  3031. echo "configure: failed program was:" >&5
  3032. cat conftest.$ac_ext >&5
  3033. rm -rf conftest*
  3034. # Look for the header file in a standard set of common directories.
  3035. # Check X11 before X11Rn because it is often a symlink to the current release.
  3036. for ac_dir in \
  3037. /usr/X11/include \
  3038. /usr/X11R6/include \
  3039. /usr/X11R5/include \
  3040. /usr/X11R4/include \
  3041. \
  3042. /usr/include/X11 \
  3043. /usr/include/X11R6 \
  3044. /usr/include/X11R5 \
  3045. /usr/include/X11R4 \
  3046. \
  3047. /usr/local/X11/include \
  3048. /usr/local/X11R6/include \
  3049. /usr/local/X11R5/include \
  3050. /usr/local/X11R4/include \
  3051. \
  3052. /usr/local/include/X11 \
  3053. /usr/local/include/X11R6 \
  3054. /usr/local/include/X11R5 \
  3055. /usr/local/include/X11R4 \
  3056. \
  3057. /usr/X386/include \
  3058. /usr/x386/include \
  3059. /usr/XFree86/include/X11 \
  3060. \
  3061. /usr/include \
  3062. /usr/local/include \
  3063. /usr/unsupported/include \
  3064. /usr/athena/include \
  3065. /usr/local/x11r5/include \
  3066. /usr/lpp/Xamples/include \
  3067. \
  3068. /usr/openwin/include \
  3069. /usr/openwin/share/include \
  3070. ; \
  3071. do
  3072. if test -r "$ac_dir/$x_direct_test_include"; then
  3073. ac_x_includes=$ac_dir
  3074. break
  3075. fi
  3076. done
  3077. fi
  3078. rm -f conftest*
  3079. fi # $ac_x_includes = NO
  3080. if test "$ac_x_libraries" = NO; then
  3081. # Check for the libraries.
  3082. test -z "$x_direct_test_library" && x_direct_test_library=Xt
  3083. test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  3084. # See if we find them without any special options.
  3085. # Don't add to $LIBS permanently.
  3086. ac_save_LIBS="$LIBS"
  3087. LIBS="-l$x_direct_test_library $LIBS"
  3088. cat > conftest.$ac_ext <<EOF
  3089. #line 3734 "configure"
  3090. #include "confdefs.h"
  3091. int main() {
  3092. ${x_direct_test_function}()
  3093. ; return 0; }
  3094. EOF
  3095. if { (eval echo configure:3741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3096. rm -rf conftest*
  3097. LIBS="$ac_save_LIBS"
  3098. # We can link X programs with no special library path.
  3099. ac_x_libraries=
  3100. else
  3101. echo "configure: failed program was:" >&5
  3102. cat conftest.$ac_ext >&5
  3103. rm -rf conftest*
  3104. LIBS="$ac_save_LIBS"
  3105. # First see if replacing the include by lib works.
  3106. # Check X11 before X11Rn because it is often a symlink to the current release.
  3107. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  3108. /usr/X11/lib \
  3109. /usr/X11R6/lib \
  3110. /usr/X11R5/lib \
  3111. /usr/X11R4/lib \
  3112. \
  3113. /usr/lib/X11 \
  3114. /usr/lib/X11R6 \
  3115. /usr/lib/X11R5 \
  3116. /usr/lib/X11R4 \
  3117. \
  3118. /usr/local/X11/lib \
  3119. /usr/local/X11R6/lib \
  3120. /usr/local/X11R5/lib \
  3121. /usr/local/X11R4/lib \
  3122. \
  3123. /usr/local/lib/X11 \
  3124. /usr/local/lib/X11R6 \
  3125. /usr/local/lib/X11R5 \
  3126. /usr/local/lib/X11R4 \
  3127. \
  3128. /usr/X386/lib \
  3129. /usr/x386/lib \
  3130. /usr/XFree86/lib/X11 \
  3131. \
  3132. /usr/lib \
  3133. /usr/local/lib \
  3134. /usr/unsupported/lib \
  3135. /usr/athena/lib \
  3136. /usr/local/x11r5/lib \
  3137. /usr/lpp/Xamples/lib \
  3138. /lib/usr/lib/X11 \
  3139. \
  3140. /usr/openwin/lib \
  3141. /usr/openwin/share/lib \
  3142. ; \
  3143. do
  3144. for ac_extension in a so sl; do
  3145. if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  3146. ac_x_libraries=$ac_dir
  3147. break 2
  3148. fi
  3149. done
  3150. done
  3151. fi
  3152. rm -f conftest*
  3153. fi # $ac_x_libraries = NO
  3154. if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  3155. # Didn't find X anywhere. Cache the known absence of X.
  3156. ac_cv_have_x="have_x=no"
  3157. else
  3158. # Record where we found X for the cache.
  3159. ac_cv_have_x="have_x=yes \
  3160. ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  3161. fi
  3162. fi
  3163. eval "$ac_cv_have_x"
  3164. fi # $with_x != no
  3165. if test "$have_x" != yes; then
  3166. echo "$ac_t""$have_x" 1>&6
  3167. no_x=yes
  3168. else
  3169. # If each of the values was on the command line, it overrides each guess.
  3170. test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  3171. test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  3172. # Update the cache value to reflect the command line values.
  3173. ac_cv_have_x="have_x=yes \
  3174. ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  3175. echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  3176. fi
  3177. if test "$no_x" = yes; then
  3178. # Not all programs may use this symbol, but it does not hurt to define it.
  3179. cat >> confdefs.h <<\EOF
  3180. #define X_DISPLAY_MISSING 1
  3181. EOF
  3182. X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
  3183. else
  3184. if test -n "$x_includes"; then
  3185. X_CFLAGS="$X_CFLAGS -I$x_includes"
  3186. fi
  3187. # It would also be nice to do this for all -L options, not just this one.
  3188. if test -n "$x_libraries"; then
  3189. X_LIBS="$X_LIBS -L$x_libraries"
  3190. # For Solaris; some versions of Sun CC require a space after -R and
  3191. # others require no space. Words are not sufficient . . . .
  3192. case "`(uname -sr) 2>/dev/null`" in
  3193. "SunOS 5"*)
  3194. echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
  3195. echo "configure:3846: checking whether -R must be followed by a space" >&5
  3196. ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
  3197. cat > conftest.$ac_ext <<EOF
  3198. #line 3849 "configure"
  3199. #include "confdefs.h"
  3200. int main() {
  3201. ; return 0; }
  3202. EOF
  3203. if { (eval echo configure:3856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3204. rm -rf conftest*
  3205. ac_R_nospace=yes
  3206. else
  3207. echo "configure: failed program was:" >&5
  3208. cat conftest.$ac_ext >&5
  3209. rm -rf conftest*
  3210. ac_R_nospace=no
  3211. fi
  3212. rm -f conftest*
  3213. if test $ac_R_nospace = yes; then
  3214. echo "$ac_t""no" 1>&6
  3215. X_LIBS="$X_LIBS -R$x_libraries"
  3216. else
  3217. LIBS="$ac_xsave_LIBS -R $x_libraries"
  3218. cat > conftest.$ac_ext <<EOF
  3219. #line 3872 "configure"
  3220. #include "confdefs.h"
  3221. int main() {
  3222. ; return 0; }
  3223. EOF
  3224. if { (eval echo configure:3879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3225. rm -rf conftest*
  3226. ac_R_space=yes
  3227. else
  3228. echo "configure: failed program was:" >&5
  3229. cat conftest.$ac_ext >&5
  3230. rm -rf conftest*
  3231. ac_R_space=no
  3232. fi
  3233. rm -f conftest*
  3234. if test $ac_R_space = yes; then
  3235. echo "$ac_t""yes" 1>&6
  3236. X_LIBS="$X_LIBS -R $x_libraries"
  3237. else
  3238. echo "$ac_t""neither works" 1>&6
  3239. fi
  3240. fi
  3241. LIBS="$ac_xsave_LIBS"
  3242. esac
  3243. fi
  3244. # Check for system-dependent libraries X programs must link with.
  3245. # Do this before checking for the system-independent R6 libraries
  3246. # (-lICE), since we may need -lsocket or whatever for X linking.
  3247. if test "$ISC" = yes; then
  3248. X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  3249. else
  3250. # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
  3251. # libraries were built with DECnet support. And karl@cs.umb.edu says
  3252. # the Alpha needs dnet_stub (dnet does not exist).
  3253. echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
  3254. echo "configure:3911: checking for dnet_ntoa in -ldnet" >&5
  3255. ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  3256. ac_save_LIBS="$LIBS"
  3257. LIBS="-ldnet $LIBS"
  3258. cat > conftest.$ac_ext <<EOF
  3259. #line 3917 "configure"
  3260. #include "confdefs.h"
  3261. /* Override any gcc2 internal prototype to avoid an error. */
  3262. /* We use char because int might match the return type of a gcc2
  3263. builtin and then its argument prototype would still apply. */
  3264. char dnet_ntoa();
  3265. int main() {
  3266. dnet_ntoa()
  3267. ; return 0; }
  3268. EOF
  3269. if { (eval echo configure:3928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3270. rm -rf conftest*
  3271. eval "ac_cv_lib_$ac_lib_var=yes"
  3272. else
  3273. echo "configure: failed program was:" >&5
  3274. cat conftest.$ac_ext >&5
  3275. rm -rf conftest*
  3276. eval "ac_cv_lib_$ac_lib_var=no"
  3277. fi
  3278. rm -f conftest*
  3279. LIBS="$ac_save_LIBS"
  3280. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3281. echo "$ac_t""yes" 1>&6
  3282. X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  3283. else
  3284. echo "$ac_t""no" 1>&6
  3285. fi
  3286. if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  3287. echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
  3288. echo "configure:3949: checking for dnet_ntoa in -ldnet_stub" >&5
  3289. ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  3290. ac_save_LIBS="$LIBS"
  3291. LIBS="-ldnet_stub $LIBS"
  3292. cat > conftest.$ac_ext <<EOF
  3293. #line 3955 "configure"
  3294. #include "confdefs.h"
  3295. /* Override any gcc2 internal prototype to avoid an error. */
  3296. /* We use char because int might match the return type of a gcc2
  3297. builtin and then its argument prototype would still apply. */
  3298. char dnet_ntoa();
  3299. int main() {
  3300. dnet_ntoa()
  3301. ; return 0; }
  3302. EOF
  3303. if { (eval echo configure:3966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3304. rm -rf conftest*
  3305. eval "ac_cv_lib_$ac_lib_var=yes"
  3306. else
  3307. echo "configure: failed program was:" >&5
  3308. cat conftest.$ac_ext >&5
  3309. rm -rf conftest*
  3310. eval "ac_cv_lib_$ac_lib_var=no"
  3311. fi
  3312. rm -f conftest*
  3313. LIBS="$ac_save_LIBS"
  3314. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3315. echo "$ac_t""yes" 1>&6
  3316. X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  3317. else
  3318. echo "$ac_t""no" 1>&6
  3319. fi
  3320. fi
  3321. # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
  3322. # to get the SysV transport functions.
  3323. # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
  3324. # needs -lnsl.
  3325. # The nsl library prevents programs from opening the X display
  3326. # on Irix 5.2, according to dickey@clark.net.
  3327. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  3328. echo "configure:3994: checking for gethostbyname" >&5
  3329. cat > conftest.$ac_ext <<EOF
  3330. #line 3997 "configure"
  3331. #include "confdefs.h"
  3332. /* System header to define __stub macros and hopefully few prototypes,
  3333. which can conflict with char gethostbyname(); below. */
  3334. #include <assert.h>
  3335. /* Override any gcc2 internal prototype to avoid an error. */
  3336. /* We use char because int might match the return type of a gcc2
  3337. builtin and then its argument prototype would still apply. */
  3338. char gethostbyname();
  3339. int main() {
  3340. /* The GNU C library defines this for functions which it implements
  3341. to always fail with ENOSYS. Some functions are actually named
  3342. something starting with __ and the normal name is an alias. */
  3343. #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  3344. choke me
  3345. #else
  3346. gethostbyname();
  3347. #endif
  3348. ; return 0; }
  3349. EOF
  3350. if { (eval echo configure:4020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3351. rm -rf conftest*
  3352. eval "ac_cv_func_gethostbyname=yes"
  3353. else
  3354. echo "configure: failed program was:" >&5
  3355. cat conftest.$ac_ext >&5
  3356. rm -rf conftest*
  3357. eval "ac_cv_func_gethostbyname=no"
  3358. fi
  3359. rm -f conftest*
  3360. if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  3361. echo "$ac_t""yes" 1>&6
  3362. :
  3363. else
  3364. echo "$ac_t""no" 1>&6
  3365. fi
  3366. if test $ac_cv_func_gethostbyname = no; then
  3367. echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
  3368. echo "configure:4040: checking for gethostbyname in -lnsl" >&5
  3369. ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
  3370. ac_save_LIBS="$LIBS"
  3371. LIBS="-lnsl $LIBS"
  3372. cat > conftest.$ac_ext <<EOF
  3373. #line 4046 "configure"
  3374. #include "confdefs.h"
  3375. /* Override any gcc2 internal prototype to avoid an error. */
  3376. /* We use char because int might match the return type of a gcc2
  3377. builtin and then its argument prototype would still apply. */
  3378. char gethostbyname();
  3379. int main() {
  3380. gethostbyname()
  3381. ; return 0; }
  3382. EOF
  3383. if { (eval echo configure:4057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3384. rm -rf conftest*
  3385. eval "ac_cv_lib_$ac_lib_var=yes"
  3386. else
  3387. echo "configure: failed program was:" >&5
  3388. cat conftest.$ac_ext >&5
  3389. rm -rf conftest*
  3390. eval "ac_cv_lib_$ac_lib_var=no"
  3391. fi
  3392. rm -f conftest*
  3393. LIBS="$ac_save_LIBS"
  3394. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3395. echo "$ac_t""yes" 1>&6
  3396. X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  3397. else
  3398. echo "$ac_t""no" 1>&6
  3399. fi
  3400. fi
  3401. # lieder@skyler.mavd.honeywell.com says without -lsocket,
  3402. # socket/setsockopt and other routines are undefined under SCO ODT
  3403. # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
  3404. # on later versions), says simon@lia.di.epfl.ch: it contains
  3405. # gethostby* variants that don't use the nameserver (or something).
  3406. # -lsocket must be given before -lnsl if both are needed.
  3407. # We assume that if connect needs -lnsl, so does gethostbyname.
  3408. echo $ac_n "checking for connect""... $ac_c" 1>&6
  3409. echo "configure:4086: checking for connect" >&5
  3410. cat > conftest.$ac_ext <<EOF
  3411. #line 4089 "configure"
  3412. #include "confdefs.h"
  3413. /* System header to define __stub macros and hopefully few prototypes,
  3414. which can conflict with char connect(); below. */
  3415. #include <assert.h>
  3416. /* Override any gcc2 internal prototype to avoid an error. */
  3417. /* We use char because int might match the return type of a gcc2
  3418. builtin and then its argument prototype would still apply. */
  3419. char connect();
  3420. int main() {
  3421. /* The GNU C library defines this for functions which it implements
  3422. to always fail with ENOSYS. Some functions are actually named
  3423. something starting with __ and the normal name is an alias. */
  3424. #if defined (__stub_connect) || defined (__stub___connect)
  3425. choke me
  3426. #else
  3427. connect();
  3428. #endif
  3429. ; return 0; }
  3430. EOF
  3431. if { (eval echo configure:4112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3432. rm -rf conftest*
  3433. eval "ac_cv_func_connect=yes"
  3434. else
  3435. echo "configure: failed program was:" >&5
  3436. cat conftest.$ac_ext >&5
  3437. rm -rf conftest*
  3438. eval "ac_cv_func_connect=no"
  3439. fi
  3440. rm -f conftest*
  3441. if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  3442. echo "$ac_t""yes" 1>&6
  3443. :
  3444. else
  3445. echo "$ac_t""no" 1>&6
  3446. fi
  3447. if test $ac_cv_func_connect = no; then
  3448. echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
  3449. echo "configure:4132: checking for connect in -lsocket" >&5
  3450. ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
  3451. ac_save_LIBS="$LIBS"
  3452. LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
  3453. cat > conftest.$ac_ext <<EOF
  3454. #line 4138 "configure"
  3455. #include "confdefs.h"
  3456. /* Override any gcc2 internal prototype to avoid an error. */
  3457. /* We use char because int might match the return type of a gcc2
  3458. builtin and then its argument prototype would still apply. */
  3459. char connect();
  3460. int main() {
  3461. connect()
  3462. ; return 0; }
  3463. EOF
  3464. if { (eval echo configure:4149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3465. rm -rf conftest*
  3466. eval "ac_cv_lib_$ac_lib_var=yes"
  3467. else
  3468. echo "configure: failed program was:" >&5
  3469. cat conftest.$ac_ext >&5
  3470. rm -rf conftest*
  3471. eval "ac_cv_lib_$ac_lib_var=no"
  3472. fi
  3473. rm -f conftest*
  3474. LIBS="$ac_save_LIBS"
  3475. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3476. echo "$ac_t""yes" 1>&6
  3477. X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
  3478. else
  3479. echo "$ac_t""no" 1>&6
  3480. fi
  3481. fi
  3482. # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
  3483. echo $ac_n "checking for remove""... $ac_c" 1>&6
  3484. echo "configure:4172: checking for remove" >&5
  3485. cat > conftest.$ac_ext <<EOF
  3486. #line 4175 "configure"
  3487. #include "confdefs.h"
  3488. /* System header to define __stub macros and hopefully few prototypes,
  3489. which can conflict with char remove(); below. */
  3490. #include <assert.h>
  3491. /* Override any gcc2 internal prototype to avoid an error. */
  3492. /* We use char because int might match the return type of a gcc2
  3493. builtin and then its argument prototype would still apply. */
  3494. char remove();
  3495. int main() {
  3496. /* The GNU C library defines this for functions which it implements
  3497. to always fail with ENOSYS. Some functions are actually named
  3498. something starting with __ and the normal name is an alias. */
  3499. #if defined (__stub_remove) || defined (__stub___remove)
  3500. choke me
  3501. #else
  3502. remove();
  3503. #endif
  3504. ; return 0; }
  3505. EOF
  3506. if { (eval echo configure:4198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3507. rm -rf conftest*
  3508. eval "ac_cv_func_remove=yes"
  3509. else
  3510. echo "configure: failed program was:" >&5
  3511. cat conftest.$ac_ext >&5
  3512. rm -rf conftest*
  3513. eval "ac_cv_func_remove=no"
  3514. fi
  3515. rm -f conftest*
  3516. if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  3517. echo "$ac_t""yes" 1>&6
  3518. :
  3519. else
  3520. echo "$ac_t""no" 1>&6
  3521. fi
  3522. if test $ac_cv_func_remove = no; then
  3523. echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
  3524. echo "configure:4218: checking for remove in -lposix" >&5
  3525. ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
  3526. ac_save_LIBS="$LIBS"
  3527. LIBS="-lposix $LIBS"
  3528. cat > conftest.$ac_ext <<EOF
  3529. #line 4224 "configure"
  3530. #include "confdefs.h"
  3531. /* Override any gcc2 internal prototype to avoid an error. */
  3532. /* We use char because int might match the return type of a gcc2
  3533. builtin and then its argument prototype would still apply. */
  3534. char remove();
  3535. int main() {
  3536. remove()
  3537. ; return 0; }
  3538. EOF
  3539. if { (eval echo configure:4235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3540. rm -rf conftest*
  3541. eval "ac_cv_lib_$ac_lib_var=yes"
  3542. else
  3543. echo "configure: failed program was:" >&5
  3544. cat conftest.$ac_ext >&5
  3545. rm -rf conftest*
  3546. eval "ac_cv_lib_$ac_lib_var=no"
  3547. fi
  3548. rm -f conftest*
  3549. LIBS="$ac_save_LIBS"
  3550. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3551. echo "$ac_t""yes" 1>&6
  3552. X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
  3553. else
  3554. echo "$ac_t""no" 1>&6
  3555. fi
  3556. fi
  3557. # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
  3558. echo $ac_n "checking for shmat""... $ac_c" 1>&6
  3559. echo "configure:4258: checking for shmat" >&5
  3560. cat > conftest.$ac_ext <<EOF
  3561. #line 4261 "configure"
  3562. #include "confdefs.h"
  3563. /* System header to define __stub macros and hopefully few prototypes,
  3564. which can conflict with char shmat(); below. */
  3565. #include <assert.h>
  3566. /* Override any gcc2 internal prototype to avoid an error. */
  3567. /* We use char because int might match the return type of a gcc2
  3568. builtin and then its argument prototype would still apply. */
  3569. char shmat();
  3570. int main() {
  3571. /* The GNU C library defines this for functions which it implements
  3572. to always fail with ENOSYS. Some functions are actually named
  3573. something starting with __ and the normal name is an alias. */
  3574. #if defined (__stub_shmat) || defined (__stub___shmat)
  3575. choke me
  3576. #else
  3577. shmat();
  3578. #endif
  3579. ; return 0; }
  3580. EOF
  3581. if { (eval echo configure:4284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3582. rm -rf conftest*
  3583. eval "ac_cv_func_shmat=yes"
  3584. else
  3585. echo "configure: failed program was:" >&5
  3586. cat conftest.$ac_ext >&5
  3587. rm -rf conftest*
  3588. eval "ac_cv_func_shmat=no"
  3589. fi
  3590. rm -f conftest*
  3591. if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  3592. echo "$ac_t""yes" 1>&6
  3593. :
  3594. else
  3595. echo "$ac_t""no" 1>&6
  3596. fi
  3597. if test $ac_cv_func_shmat = no; then
  3598. echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
  3599. echo "configure:4304: checking for shmat in -lipc" >&5
  3600. ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
  3601. ac_save_LIBS="$LIBS"
  3602. LIBS="-lipc $LIBS"
  3603. cat > conftest.$ac_ext <<EOF
  3604. #line 4310 "configure"
  3605. #include "confdefs.h"
  3606. /* Override any gcc2 internal prototype to avoid an error. */
  3607. /* We use char because int might match the return type of a gcc2
  3608. builtin and then its argument prototype would still apply. */
  3609. char shmat();
  3610. int main() {
  3611. shmat()
  3612. ; return 0; }
  3613. EOF
  3614. if { (eval echo configure:4321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3615. rm -rf conftest*
  3616. eval "ac_cv_lib_$ac_lib_var=yes"
  3617. else
  3618. echo "configure: failed program was:" >&5
  3619. cat conftest.$ac_ext >&5
  3620. rm -rf conftest*
  3621. eval "ac_cv_lib_$ac_lib_var=no"
  3622. fi
  3623. rm -f conftest*
  3624. LIBS="$ac_save_LIBS"
  3625. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3626. echo "$ac_t""yes" 1>&6
  3627. X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
  3628. else
  3629. echo "$ac_t""no" 1>&6
  3630. fi
  3631. fi
  3632. fi
  3633. # Check for libraries that X11R6 Xt/Xaw programs need.
  3634. ac_save_LDFLAGS="$LDFLAGS"
  3635. test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  3636. # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  3637. # check for ICE first), but we must link in the order -lSM -lICE or
  3638. # we get undefined symbols. So assume we have SM if we have ICE.
  3639. # These have to be linked with before -lX11, unlike the other
  3640. # libraries we check for below, so use a different variable.
  3641. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  3642. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
  3643. echo "configure:4353: checking for IceConnectionNumber in -lICE" >&5
  3644. ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
  3645. ac_save_LIBS="$LIBS"
  3646. LIBS="-lICE $X_EXTRA_LIBS $LIBS"
  3647. cat > conftest.$ac_ext <<EOF
  3648. #line 4359 "configure"
  3649. #include "confdefs.h"
  3650. /* Override any gcc2 internal prototype to avoid an error. */
  3651. /* We use char because int might match the return type of a gcc2
  3652. builtin and then its argument prototype would still apply. */
  3653. char IceConnectionNumber();
  3654. int main() {
  3655. IceConnectionNumber()
  3656. ; return 0; }
  3657. EOF
  3658. if { (eval echo configure:4370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3659. rm -rf conftest*
  3660. eval "ac_cv_lib_$ac_lib_var=yes"
  3661. else
  3662. echo "configure: failed program was:" >&5
  3663. cat conftest.$ac_ext >&5
  3664. rm -rf conftest*
  3665. eval "ac_cv_lib_$ac_lib_var=no"
  3666. fi
  3667. rm -f conftest*
  3668. LIBS="$ac_save_LIBS"
  3669. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3670. echo "$ac_t""yes" 1>&6
  3671. X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  3672. else
  3673. echo "$ac_t""no" 1>&6
  3674. fi
  3675. LDFLAGS="$ac_save_LDFLAGS"
  3676. fi
  3677. if test "$no_x" != "yes"; then
  3678. USE_X11="1"
  3679. XLIB=-lX11
  3680. XTLIB=-lXt
  3681. fi
  3682. fi
  3683. # Note that some systems (FreeBSD for example) need an extra library for
  3684. # cuserid
  3685. ac_save_libs="$LIBS"
  3686. LIBS=""
  3687. echo $ac_n "checking for library containing cuserid""... $ac_c" 1>&6
  3688. echo "configure:4410: checking for library containing cuserid" >&5
  3689. ac_func_search_save_LIBS="$LIBS"
  3690. ac_cv_search_cuserid="no"
  3691. cat > conftest.$ac_ext <<EOF
  3692. #line 4415 "configure"
  3693. #include "confdefs.h"
  3694. /* Override any gcc2 internal prototype to avoid an error. */
  3695. /* We use char because int might match the return type of a gcc2
  3696. builtin and then its argument prototype would still apply. */
  3697. char cuserid();
  3698. int main() {
  3699. cuserid()
  3700. ; return 0; }
  3701. EOF
  3702. if { (eval echo configure:4426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3703. rm -rf conftest*
  3704. ac_cv_search_cuserid="none required"
  3705. else
  3706. echo "configure: failed program was:" >&5
  3707. cat conftest.$ac_ext >&5
  3708. fi
  3709. rm -f conftest*
  3710. test "$ac_cv_search_cuserid" = "no" && for i in compat; do
  3711. LIBS="-l$i $ac_func_search_save_LIBS"
  3712. cat > conftest.$ac_ext <<EOF
  3713. #line 4437 "configure"
  3714. #include "confdefs.h"
  3715. /* Override any gcc2 internal prototype to avoid an error. */
  3716. /* We use char because int might match the return type of a gcc2
  3717. builtin and then its argument prototype would still apply. */
  3718. char cuserid();
  3719. int main() {
  3720. cuserid()
  3721. ; return 0; }
  3722. EOF
  3723. if { (eval echo configure:4448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3724. rm -rf conftest*
  3725. ac_cv_search_cuserid="-l$i"
  3726. break
  3727. else
  3728. echo "configure: failed program was:" >&5
  3729. cat conftest.$ac_ext >&5
  3730. fi
  3731. rm -f conftest*
  3732. done
  3733. LIBS="$ac_func_search_save_LIBS"
  3734. echo "$ac_t""$ac_cv_search_cuserid" 1>&6
  3735. if test "$ac_cv_search_cuserid" != "no"; then
  3736. test "$ac_cv_search_cuserid" = "none required" || LIBS="$ac_cv_search_cuserid $LIBS"
  3737. else :
  3738. fi
  3739. DBMIEXTRALIB="$LIBS"
  3740. LIBS="$ac_save_libs"
  3741. # Note: -lxdr -liberty -lws2_32 is for MinGW
  3742. echo $ac_n "checking for xdrmem_create""... $ac_c" 1>&6
  3743. echo "configure:4474: checking for xdrmem_create" >&5
  3744. cat > conftest.$ac_ext <<EOF
  3745. #line 4477 "configure"
  3746. #include "confdefs.h"
  3747. /* System header to define __stub macros and hopefully few prototypes,
  3748. which can conflict with char xdrmem_create(); below. */
  3749. #include <assert.h>
  3750. /* Override any gcc2 internal prototype to avoid an error. */
  3751. /* We use char because int might match the return type of a gcc2
  3752. builtin and then its argument prototype would still apply. */
  3753. char xdrmem_create();
  3754. int main() {
  3755. /* The GNU C library defines this for functions which it implements
  3756. to always fail with ENOSYS. Some functions are actually named
  3757. something starting with __ and the normal name is an alias. */
  3758. #if defined (__stub_xdrmem_create) || defined (__stub___xdrmem_create)
  3759. choke me
  3760. #else
  3761. xdrmem_create();
  3762. #endif
  3763. ; return 0; }
  3764. EOF
  3765. if { (eval echo configure:4500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3766. rm -rf conftest*
  3767. eval "ac_cv_func_xdrmem_create=yes"
  3768. else
  3769. echo "configure: failed program was:" >&5
  3770. cat conftest.$ac_ext >&5
  3771. rm -rf conftest*
  3772. eval "ac_cv_func_xdrmem_create=no"
  3773. fi
  3774. rm -f conftest*
  3775. if eval "test \"`echo '$ac_cv_func_'xdrmem_create`\" = yes"; then
  3776. echo "$ac_t""yes" 1>&6
  3777. XDRLIB=
  3778. else
  3779. echo "$ac_t""no" 1>&6
  3780. echo $ac_n "checking for xdrmem_create in -lsun""... $ac_c" 1>&6
  3781. echo "configure:4518: checking for xdrmem_create in -lsun" >&5
  3782. ac_lib_var=`echo sun'_'xdrmem_create | sed 'y%./+-%__p_%'`
  3783. ac_save_LIBS="$LIBS"
  3784. LIBS="-lsun $LIBS"
  3785. cat > conftest.$ac_ext <<EOF
  3786. #line 4524 "configure"
  3787. #include "confdefs.h"
  3788. /* Override any gcc2 internal prototype to avoid an error. */
  3789. /* We use char because int might match the return type of a gcc2
  3790. builtin and then its argument prototype would still apply. */
  3791. char xdrmem_create();
  3792. int main() {
  3793. xdrmem_create()
  3794. ; return 0; }
  3795. EOF
  3796. if { (eval echo configure:4535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3797. rm -rf conftest*
  3798. eval "ac_cv_lib_$ac_lib_var=yes"
  3799. else
  3800. echo "configure: failed program was:" >&5
  3801. cat conftest.$ac_ext >&5
  3802. rm -rf conftest*
  3803. eval "ac_cv_lib_$ac_lib_var=no"
  3804. fi
  3805. rm -f conftest*
  3806. LIBS="$ac_save_LIBS"
  3807. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3808. echo "$ac_t""yes" 1>&6
  3809. XDRLIB=-lsun
  3810. else
  3811. echo "$ac_t""no" 1>&6
  3812. echo $ac_n "checking for xdrmem_create in -lnsl""... $ac_c" 1>&6
  3813. echo "configure:4554: checking for xdrmem_create in -lnsl" >&5
  3814. ac_lib_var=`echo nsl'_'xdrmem_create | sed 'y%./+-%__p_%'`
  3815. ac_save_LIBS="$LIBS"
  3816. LIBS="-lnsl $LIBS"
  3817. cat > conftest.$ac_ext <<EOF
  3818. #line 4560 "configure"
  3819. #include "confdefs.h"
  3820. /* Override any gcc2 internal prototype to avoid an error. */
  3821. /* We use char because int might match the return type of a gcc2
  3822. builtin and then its argument prototype would still apply. */
  3823. char xdrmem_create();
  3824. int main() {
  3825. xdrmem_create()
  3826. ; return 0; }
  3827. EOF
  3828. if { (eval echo configure:4571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3829. rm -rf conftest*
  3830. eval "ac_cv_lib_$ac_lib_var=yes"
  3831. else
  3832. echo "configure: failed program was:" >&5
  3833. cat conftest.$ac_ext >&5
  3834. rm -rf conftest*
  3835. eval "ac_cv_lib_$ac_lib_var=no"
  3836. fi
  3837. rm -f conftest*
  3838. LIBS="$ac_save_LIBS"
  3839. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3840. echo "$ac_t""yes" 1>&6
  3841. XDRLIB=-lnsl
  3842. else
  3843. echo "$ac_t""no" 1>&6
  3844. echo $ac_n "checking for xdrmem_create in -lrpclib""... $ac_c" 1>&6
  3845. echo "configure:4590: checking for xdrmem_create in -lrpclib" >&5
  3846. ac_lib_var=`echo rpclib'_'xdrmem_create | sed 'y%./+-%__p_%'`
  3847. ac_save_LIBS="$LIBS"
  3848. LIBS="-lrpclib $LIBS"
  3849. cat > conftest.$ac_ext <<EOF
  3850. #line 4596 "configure"
  3851. #include "confdefs.h"
  3852. /* Override any gcc2 internal prototype to avoid an error. */
  3853. /* We use char because int might match the return type of a gcc2
  3854. builtin and then its argument prototype would still apply. */
  3855. char xdrmem_create();
  3856. int main() {
  3857. xdrmem_create()
  3858. ; return 0; }
  3859. EOF
  3860. if { (eval echo configure:4607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3861. rm -rf conftest*
  3862. eval "ac_cv_lib_$ac_lib_var=yes"
  3863. else
  3864. echo "configure: failed program was:" >&5
  3865. cat conftest.$ac_ext >&5
  3866. rm -rf conftest*
  3867. eval "ac_cv_lib_$ac_lib_var=no"
  3868. fi
  3869. rm -f conftest*
  3870. LIBS="$ac_save_LIBS"
  3871. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3872. echo "$ac_t""yes" 1>&6
  3873. XDRLIB=-lrpclib
  3874. else
  3875. echo "$ac_t""no" 1>&6
  3876. echo $ac_n "checking for xdrmem_create in -lxdr""... $ac_c" 1>&6
  3877. echo "configure:4626: checking for xdrmem_create in -lxdr" >&5
  3878. ac_lib_var=`echo xdr'_'xdrmem_create | sed 'y%./+-%__p_%'`
  3879. ac_save_LIBS="$LIBS"
  3880. LIBS="-lxdr -liberty -lws2_32 $LIBS"
  3881. cat > conftest.$ac_ext <<EOF
  3882. #line 4632 "configure"
  3883. #include "confdefs.h"
  3884. /* Override any gcc2 internal prototype to avoid an error. */
  3885. /* We use char because int might match the return type of a gcc2
  3886. builtin and then its argument prototype would still apply. */
  3887. char xdrmem_create();
  3888. int main() {
  3889. xdrmem_create()
  3890. ; return 0; }
  3891. EOF
  3892. if { (eval echo configure:4643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3893. rm -rf conftest*
  3894. eval "ac_cv_lib_$ac_lib_var=yes"
  3895. else
  3896. echo "configure: failed program was:" >&5
  3897. cat conftest.$ac_ext >&5
  3898. rm -rf conftest*
  3899. eval "ac_cv_lib_$ac_lib_var=no"
  3900. fi
  3901. rm -f conftest*
  3902. LIBS="$ac_save_LIBS"
  3903. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3904. echo "$ac_t""yes" 1>&6
  3905. XDRLIB="-lxdr -liberty -lws2_32"
  3906. else
  3907. echo "$ac_t""no" 1>&6
  3908. { echo "configure: error: *** Unable to locate XDR functions." 1>&2; exit 1; }
  3909. fi
  3910. fi
  3911. fi
  3912. fi
  3913. fi
  3914. for ac_func in asprintf
  3915. do
  3916. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3917. echo "configure:4677: checking for $ac_func" >&5
  3918. cat > conftest.$ac_ext <<EOF
  3919. #line 4680 "configure"
  3920. #include "confdefs.h"
  3921. /* System header to define __stub macros and hopefully few prototypes,
  3922. which can conflict with char $ac_func(); below. */
  3923. #include <assert.h>
  3924. /* Override any gcc2 internal prototype to avoid an error. */
  3925. /* We use char because int might match the return type of a gcc2
  3926. builtin and then its argument prototype would still apply. */
  3927. char $ac_func();
  3928. int main() {
  3929. /* The GNU C library defines this for functions which it implements
  3930. to always fail with ENOSYS. Some functions are actually named
  3931. something starting with __ and the normal name is an alias. */
  3932. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3933. choke me
  3934. #else
  3935. $ac_func();
  3936. #endif
  3937. ; return 0; }
  3938. EOF
  3939. if { (eval echo configure:4703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3940. rm -rf conftest*
  3941. eval "ac_cv_func_$ac_func=yes"
  3942. else
  3943. echo "configure: failed program was:" >&5
  3944. cat conftest.$ac_ext >&5
  3945. rm -rf conftest*
  3946. eval "ac_cv_func_$ac_func=no"
  3947. fi
  3948. rm -f conftest*
  3949. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3950. echo "$ac_t""yes" 1>&6
  3951. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3952. cat >> confdefs.h <<EOF
  3953. #define $ac_tr_func 1
  3954. EOF
  3955. else
  3956. echo "$ac_t""no" 1>&6
  3957. fi
  3958. done
  3959. # Test if mathlib needs -lm flag or is included with libc
  3960. echo $ac_n "checking for atan""... $ac_c" 1>&6
  3961. echo "configure:4730: checking for atan" >&5
  3962. cat > conftest.$ac_ext <<EOF
  3963. #line 4733 "configure"
  3964. #include "confdefs.h"
  3965. /* System header to define __stub macros and hopefully few prototypes,
  3966. which can conflict with char atan(); below. */
  3967. #include <assert.h>
  3968. /* Override any gcc2 internal prototype to avoid an error. */
  3969. /* We use char because int might match the return type of a gcc2
  3970. builtin and then its argument prototype would still apply. */
  3971. char atan();
  3972. int main() {
  3973. /* The GNU C library defines this for functions which it implements
  3974. to always fail with ENOSYS. Some functions are actually named
  3975. something starting with __ and the normal name is an alias. */
  3976. #if defined (__stub_atan) || defined (__stub___atan)
  3977. choke me
  3978. #else
  3979. atan();
  3980. #endif
  3981. ; return 0; }
  3982. EOF
  3983. if { (eval echo configure:4756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3984. rm -rf conftest*
  3985. eval "ac_cv_func_atan=yes"
  3986. else
  3987. echo "configure: failed program was:" >&5
  3988. cat conftest.$ac_ext >&5
  3989. rm -rf conftest*
  3990. eval "ac_cv_func_atan=no"
  3991. fi
  3992. rm -f conftest*
  3993. if eval "test \"`echo '$ac_cv_func_'atan`\" = yes"; then
  3994. echo "$ac_t""yes" 1>&6
  3995. MATHLIB=
  3996. else
  3997. echo "$ac_t""no" 1>&6
  3998. echo $ac_n "checking for atan in -lm""... $ac_c" 1>&6
  3999. echo "configure:4774: checking for atan in -lm" >&5
  4000. ac_lib_var=`echo m'_'atan | sed 'y%./+-%__p_%'`
  4001. ac_save_LIBS="$LIBS"
  4002. LIBS="-lm $LIBS"
  4003. cat > conftest.$ac_ext <<EOF
  4004. #line 4780 "configure"
  4005. #include "confdefs.h"
  4006. /* Override any gcc2 internal prototype to avoid an error. */
  4007. /* We use char because int might match the return type of a gcc2
  4008. builtin and then its argument prototype would still apply. */
  4009. char atan();
  4010. int main() {
  4011. atan()
  4012. ; return 0; }
  4013. EOF
  4014. if { (eval echo configure:4791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4015. rm -rf conftest*
  4016. eval "ac_cv_lib_$ac_lib_var=yes"
  4017. else
  4018. echo "configure: failed program was:" >&5
  4019. cat conftest.$ac_ext >&5
  4020. rm -rf conftest*
  4021. eval "ac_cv_lib_$ac_lib_var=no"
  4022. fi
  4023. rm -f conftest*
  4024. LIBS="$ac_save_LIBS"
  4025. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4026. echo "$ac_t""yes" 1>&6
  4027. MATHLIB=-lm
  4028. else
  4029. echo "$ac_t""no" 1>&6
  4030. { echo "configure: error: *** Failed check for math library." 1>&2; exit 1; }
  4031. fi
  4032. fi
  4033. echo $ac_n "checking for dlsym""... $ac_c" 1>&6
  4034. echo "configure:4818: checking for dlsym" >&5
  4035. cat > conftest.$ac_ext <<EOF
  4036. #line 4821 "configure"
  4037. #include "confdefs.h"
  4038. /* System header to define __stub macros and hopefully few prototypes,
  4039. which can conflict with char dlsym(); below. */
  4040. #include <assert.h>
  4041. /* Override any gcc2 internal prototype to avoid an error. */
  4042. /* We use char because int might match the return type of a gcc2
  4043. builtin and then its argument prototype would still apply. */
  4044. char dlsym();
  4045. int main() {
  4046. /* The GNU C library defines this for functions which it implements
  4047. to always fail with ENOSYS. Some functions are actually named
  4048. something starting with __ and the normal name is an alias. */
  4049. #if defined (__stub_dlsym) || defined (__stub___dlsym)
  4050. choke me
  4051. #else
  4052. dlsym();
  4053. #endif
  4054. ; return 0; }
  4055. EOF
  4056. if { (eval echo configure:4844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4057. rm -rf conftest*
  4058. eval "ac_cv_func_dlsym=yes"
  4059. else
  4060. echo "configure: failed program was:" >&5
  4061. cat conftest.$ac_ext >&5
  4062. rm -rf conftest*
  4063. eval "ac_cv_func_dlsym=no"
  4064. fi
  4065. rm -f conftest*
  4066. if eval "test \"`echo '$ac_cv_func_'dlsym`\" = yes"; then
  4067. echo "$ac_t""yes" 1>&6
  4068. DLLIB=
  4069. else
  4070. echo "$ac_t""no" 1>&6
  4071. echo $ac_n "checking for dlsym in -ldl""... $ac_c" 1>&6
  4072. echo "configure:4862: checking for dlsym in -ldl" >&5
  4073. ac_lib_var=`echo dl'_'dlsym | sed 'y%./+-%__p_%'`
  4074. ac_save_LIBS="$LIBS"
  4075. LIBS="-ldl $LIBS"
  4076. cat > conftest.$ac_ext <<EOF
  4077. #line 4868 "configure"
  4078. #include "confdefs.h"
  4079. /* Override any gcc2 internal prototype to avoid an error. */
  4080. /* We use char because int might match the return type of a gcc2
  4081. builtin and then its argument prototype would still apply. */
  4082. char dlsym();
  4083. int main() {
  4084. dlsym()
  4085. ; return 0; }
  4086. EOF
  4087. if { (eval echo configure:4879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4088. rm -rf conftest*
  4089. eval "ac_cv_lib_$ac_lib_var=yes"
  4090. else
  4091. echo "configure: failed program was:" >&5
  4092. cat conftest.$ac_ext >&5
  4093. rm -rf conftest*
  4094. eval "ac_cv_lib_$ac_lib_var=no"
  4095. fi
  4096. rm -f conftest*
  4097. LIBS="$ac_save_LIBS"
  4098. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4099. echo "$ac_t""yes" 1>&6
  4100. DLLIB=-ldl
  4101. else
  4102. echo "$ac_t""no" 1>&6
  4103. DLLIB=
  4104. fi
  4105. fi
  4106. echo $ac_n "checking for iconv""... $ac_c" 1>&6
  4107. echo "configure:4906: checking for iconv" >&5
  4108. cat > conftest.$ac_ext <<EOF
  4109. #line 4909 "configure"
  4110. #include "confdefs.h"
  4111. /* System header to define __stub macros and hopefully few prototypes,
  4112. which can conflict with char iconv(); below. */
  4113. #include <assert.h>
  4114. /* Override any gcc2 internal prototype to avoid an error. */
  4115. /* We use char because int might match the return type of a gcc2
  4116. builtin and then its argument prototype would still apply. */
  4117. char iconv();
  4118. int main() {
  4119. /* The GNU C library defines this for functions which it implements
  4120. to always fail with ENOSYS. Some functions are actually named
  4121. something starting with __ and the normal name is an alias. */
  4122. #if defined (__stub_iconv) || defined (__stub___iconv)
  4123. choke me
  4124. #else
  4125. iconv();
  4126. #endif
  4127. ; return 0; }
  4128. EOF
  4129. if { (eval echo configure:4932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4130. rm -rf conftest*
  4131. eval "ac_cv_func_iconv=yes"
  4132. else
  4133. echo "configure: failed program was:" >&5
  4134. cat conftest.$ac_ext >&5
  4135. rm -rf conftest*
  4136. eval "ac_cv_func_iconv=no"
  4137. fi
  4138. rm -f conftest*
  4139. if eval "test \"`echo '$ac_cv_func_'iconv`\" = yes"; then
  4140. echo "$ac_t""yes" 1>&6
  4141. ICONVLIB=
  4142. else
  4143. echo "$ac_t""no" 1>&6
  4144. echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
  4145. echo "configure:4950: checking for iconv in -liconv" >&5
  4146. ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
  4147. ac_save_LIBS="$LIBS"
  4148. LIBS="-liconv $LIBS"
  4149. cat > conftest.$ac_ext <<EOF
  4150. #line 4956 "configure"
  4151. #include "confdefs.h"
  4152. /* Override any gcc2 internal prototype to avoid an error. */
  4153. /* We use char because int might match the return type of a gcc2
  4154. builtin and then its argument prototype would still apply. */
  4155. char iconv();
  4156. int main() {
  4157. iconv()
  4158. ; return 0; }
  4159. EOF
  4160. if { (eval echo configure:4967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4161. rm -rf conftest*
  4162. eval "ac_cv_lib_$ac_lib_var=yes"
  4163. else
  4164. echo "configure: failed program was:" >&5
  4165. cat conftest.$ac_ext >&5
  4166. rm -rf conftest*
  4167. eval "ac_cv_lib_$ac_lib_var=no"
  4168. fi
  4169. rm -f conftest*
  4170. LIBS="$ac_save_LIBS"
  4171. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4172. echo "$ac_t""yes" 1>&6
  4173. ICONVLIB=-liconv
  4174. else
  4175. echo "$ac_t""no" 1>&6
  4176. echo $ac_n "checking for iconv in -lgiconv""... $ac_c" 1>&6
  4177. echo "configure:4986: checking for iconv in -lgiconv" >&5
  4178. ac_lib_var=`echo giconv'_'iconv | sed 'y%./+-%__p_%'`
  4179. ac_save_LIBS="$LIBS"
  4180. LIBS="-lgiconv $LIBS"
  4181. cat > conftest.$ac_ext <<EOF
  4182. #line 4992 "configure"
  4183. #include "confdefs.h"
  4184. /* Override any gcc2 internal prototype to avoid an error. */
  4185. /* We use char because int might match the return type of a gcc2
  4186. builtin and then its argument prototype would still apply. */
  4187. char iconv();
  4188. int main() {
  4189. iconv()
  4190. ; return 0; }
  4191. EOF
  4192. if { (eval echo configure:5003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4193. rm -rf conftest*
  4194. eval "ac_cv_lib_$ac_lib_var=yes"
  4195. else
  4196. echo "configure: failed program was:" >&5
  4197. cat conftest.$ac_ext >&5
  4198. rm -rf conftest*
  4199. eval "ac_cv_lib_$ac_lib_var=no"
  4200. fi
  4201. rm -f conftest*
  4202. LIBS="$ac_save_LIBS"
  4203. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4204. echo "$ac_t""yes" 1>&6
  4205. ICONVLIB=-lgiconv
  4206. else
  4207. echo "$ac_t""no" 1>&6
  4208. echo $ac_n "checking for libiconv""... $ac_c" 1>&6
  4209. echo "configure:5022: checking for libiconv" >&5
  4210. cat > conftest.$ac_ext <<EOF
  4211. #line 5025 "configure"
  4212. #include "confdefs.h"
  4213. /* System header to define __stub macros and hopefully few prototypes,
  4214. which can conflict with char libiconv(); below. */
  4215. #include <assert.h>
  4216. /* Override any gcc2 internal prototype to avoid an error. */
  4217. /* We use char because int might match the return type of a gcc2
  4218. builtin and then its argument prototype would still apply. */
  4219. char libiconv();
  4220. int main() {
  4221. /* The GNU C library defines this for functions which it implements
  4222. to always fail with ENOSYS. Some functions are actually named
  4223. something starting with __ and the normal name is an alias. */
  4224. #if defined (__stub_libiconv) || defined (__stub___libiconv)
  4225. choke me
  4226. #else
  4227. libiconv();
  4228. #endif
  4229. ; return 0; }
  4230. EOF
  4231. if { (eval echo configure:5048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4232. rm -rf conftest*
  4233. eval "ac_cv_func_libiconv=yes"
  4234. else
  4235. echo "configure: failed program was:" >&5
  4236. cat conftest.$ac_ext >&5
  4237. rm -rf conftest*
  4238. eval "ac_cv_func_libiconv=no"
  4239. fi
  4240. rm -f conftest*
  4241. if eval "test \"`echo '$ac_cv_func_'libiconv`\" = yes"; then
  4242. echo "$ac_t""yes" 1>&6
  4243. ICONVLIB=
  4244. else
  4245. echo "$ac_t""no" 1>&6
  4246. echo $ac_n "checking for libiconv in -liconv""... $ac_c" 1>&6
  4247. echo "configure:5066: checking for libiconv in -liconv" >&5
  4248. ac_lib_var=`echo iconv'_'libiconv | sed 'y%./+-%__p_%'`
  4249. ac_save_LIBS="$LIBS"
  4250. LIBS="-liconv $LIBS"
  4251. cat > conftest.$ac_ext <<EOF
  4252. #line 5072 "configure"
  4253. #include "confdefs.h"
  4254. /* Override any gcc2 internal prototype to avoid an error. */
  4255. /* We use char because int might match the return type of a gcc2
  4256. builtin and then its argument prototype would still apply. */
  4257. char libiconv();
  4258. int main() {
  4259. libiconv()
  4260. ; return 0; }
  4261. EOF
  4262. if { (eval echo configure:5083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4263. rm -rf conftest*
  4264. eval "ac_cv_lib_$ac_lib_var=yes"
  4265. else
  4266. echo "configure: failed program was:" >&5
  4267. cat conftest.$ac_ext >&5
  4268. rm -rf conftest*
  4269. eval "ac_cv_lib_$ac_lib_var=no"
  4270. fi
  4271. rm -f conftest*
  4272. LIBS="$ac_save_LIBS"
  4273. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4274. echo "$ac_t""yes" 1>&6
  4275. ICONVLIB=-liconv
  4276. else
  4277. echo "$ac_t""no" 1>&6
  4278. echo $ac_n "checking for libiconv in -lgiconv""... $ac_c" 1>&6
  4279. echo "configure:5102: checking for libiconv in -lgiconv" >&5
  4280. ac_lib_var=`echo giconv'_'libiconv | sed 'y%./+-%__p_%'`
  4281. ac_save_LIBS="$LIBS"
  4282. LIBS="-lgiconv $LIBS"
  4283. cat > conftest.$ac_ext <<EOF
  4284. #line 5108 "configure"
  4285. #include "confdefs.h"
  4286. /* Override any gcc2 internal prototype to avoid an error. */
  4287. /* We use char because int might match the return type of a gcc2
  4288. builtin and then its argument prototype would still apply. */
  4289. char libiconv();
  4290. int main() {
  4291. libiconv()
  4292. ; return 0; }
  4293. EOF
  4294. if { (eval echo configure:5119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4295. rm -rf conftest*
  4296. eval "ac_cv_lib_$ac_lib_var=yes"
  4297. else
  4298. echo "configure: failed program was:" >&5
  4299. cat conftest.$ac_ext >&5
  4300. rm -rf conftest*
  4301. eval "ac_cv_lib_$ac_lib_var=no"
  4302. fi
  4303. rm -f conftest*
  4304. LIBS="$ac_save_LIBS"
  4305. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4306. echo "$ac_t""yes" 1>&6
  4307. ICONVLIB=-lgiconv
  4308. else
  4309. echo "$ac_t""no" 1>&6
  4310. echo "configure: warning: *** Unable to locate iconv() function." 1>&2
  4311. ICONVLIB=
  4312. fi
  4313. fi
  4314. fi
  4315. fi
  4316. fi
  4317. fi
  4318. have_socket=1
  4319. echo $ac_n "checking for socket""... $ac_c" 1>&6
  4320. echo "configure:5156: checking for socket" >&5
  4321. cat > conftest.$ac_ext <<EOF
  4322. #line 5159 "configure"
  4323. #include "confdefs.h"
  4324. /* System header to define __stub macros and hopefully few prototypes,
  4325. which can conflict with char socket(); below. */
  4326. #include <assert.h>
  4327. /* Override any gcc2 internal prototype to avoid an error. */
  4328. /* We use char because int might match the return type of a gcc2
  4329. builtin and then its argument prototype would still apply. */
  4330. char socket();
  4331. int main() {
  4332. /* The GNU C library defines this for functions which it implements
  4333. to always fail with ENOSYS. Some functions are actually named
  4334. something starting with __ and the normal name is an alias. */
  4335. #if defined (__stub_socket) || defined (__stub___socket)
  4336. choke me
  4337. #else
  4338. socket();
  4339. #endif
  4340. ; return 0; }
  4341. EOF
  4342. if { (eval echo configure:5182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4343. rm -rf conftest*
  4344. eval "ac_cv_func_socket=yes"
  4345. else
  4346. echo "configure: failed program was:" >&5
  4347. cat conftest.$ac_ext >&5
  4348. rm -rf conftest*
  4349. eval "ac_cv_func_socket=no"
  4350. fi
  4351. rm -f conftest*
  4352. if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
  4353. echo "$ac_t""yes" 1>&6
  4354. SOCKLIB=
  4355. else
  4356. echo "$ac_t""no" 1>&6
  4357. echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
  4358. echo "configure:5200: checking for socket in -lsocket" >&5
  4359. ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
  4360. ac_save_LIBS="$LIBS"
  4361. LIBS="-lsocket $LIBS"
  4362. cat > conftest.$ac_ext <<EOF
  4363. #line 5206 "configure"
  4364. #include "confdefs.h"
  4365. /* Override any gcc2 internal prototype to avoid an error. */
  4366. /* We use char because int might match the return type of a gcc2
  4367. builtin and then its argument prototype would still apply. */
  4368. char socket();
  4369. int main() {
  4370. socket()
  4371. ; return 0; }
  4372. EOF
  4373. if { (eval echo configure:5217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4374. rm -rf conftest*
  4375. eval "ac_cv_lib_$ac_lib_var=yes"
  4376. else
  4377. echo "configure: failed program was:" >&5
  4378. cat conftest.$ac_ext >&5
  4379. rm -rf conftest*
  4380. eval "ac_cv_lib_$ac_lib_var=no"
  4381. fi
  4382. rm -f conftest*
  4383. LIBS="$ac_save_LIBS"
  4384. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4385. echo "$ac_t""yes" 1>&6
  4386. SOCKLIB=-lsocket
  4387. else
  4388. echo "$ac_t""no" 1>&6
  4389. have_socket=0
  4390. echo "configure: warning: *** Unable to locate socket() function." 1>&2
  4391. fi
  4392. fi
  4393. if test "$have_socket" = 1 ; then
  4394. HAVE_SOCKET=1
  4395. cat >> confdefs.h <<\EOF
  4396. #define HAVE_SOCKET 1
  4397. EOF
  4398. else
  4399. HAVE_SOCKET=
  4400. fi
  4401. # Mandatory zlib dependency
  4402. ZLIBLIBPATH=
  4403. ZLIBINCPATH=
  4404. ZLIB=
  4405. # With zlib includes directory
  4406. echo $ac_n "checking for location of zlib includes""... $ac_c" 1>&6
  4407. echo "configure:5265: checking for location of zlib includes" >&5
  4408. case "$with_zlib_includes" in
  4409. y | ye | yes | n | no)
  4410. { echo "configure: error: *** You must supply a directory to --with-zlib-includes." 1>&2; exit 1; }
  4411. ;;
  4412. esac
  4413. echo "$ac_t""$with_zlib_includes" 1>&6
  4414. if test -n "$with_zlib_includes" ; then
  4415. for dir in $with_zlib_includes; do
  4416. if test -d "$dir"; then
  4417. ZLIBINCPATH="$ZLIBINCPATH -I$dir"
  4418. else
  4419. { echo "configure: error: *** zlib includes directory $dir does not exist." 1>&2; exit 1; }
  4420. fi
  4421. done
  4422. fi
  4423. ac_save_cppflags="$CPPFLAGS"
  4424. CPPFLAGS="$ZLIBINCPATH $CPPFLAGS"
  4425. for ac_hdr in zlib.h
  4426. do
  4427. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4428. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4429. echo "configure:5291: checking for $ac_hdr" >&5
  4430. cat > conftest.$ac_ext <<EOF
  4431. #line 5294 "configure"
  4432. #include "confdefs.h"
  4433. #include <$ac_hdr>
  4434. EOF
  4435. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4436. { (eval echo configure:5299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4437. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4438. if test -z "$ac_err"; then
  4439. rm -rf conftest*
  4440. eval "ac_cv_header_$ac_safe=yes"
  4441. else
  4442. echo "$ac_err" >&5
  4443. echo "configure: failed program was:" >&5
  4444. cat conftest.$ac_ext >&5
  4445. rm -rf conftest*
  4446. eval "ac_cv_header_$ac_safe=no"
  4447. fi
  4448. rm -f conftest*
  4449. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4450. echo "$ac_t""yes" 1>&6
  4451. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4452. cat >> confdefs.h <<EOF
  4453. #define $ac_tr_hdr 1
  4454. EOF
  4455. else
  4456. echo "$ac_t""no" 1>&6
  4457. { echo "configure: error: *** Unable to locate zlib includes." 1>&2; exit 1; }
  4458. fi
  4459. done
  4460. CPPFLAGS=$ac_save_cppflags
  4461. # With zlib library directory
  4462. echo $ac_n "checking for location of zlib library""... $ac_c" 1>&6
  4463. echo "configure:5333: checking for location of zlib library" >&5
  4464. case "$with_zlib_libs" in
  4465. y | ye | yes | n | no)
  4466. { echo "configure: error: *** You must supply a directory to --with-zlib-libs." 1>&2; exit 1; }
  4467. ;;
  4468. esac
  4469. echo "$ac_t""$with_zlib_libs" 1>&6
  4470. if test -n "$with_zlib_libs"; then
  4471. for dir in $with_zlib_libs; do
  4472. if test -d "$dir"; then
  4473. ZLIBLIBPATH="$ZLIBLIBPATH -L$dir"
  4474. else
  4475. { echo "configure: error: *** zlib library directory $dir does not exist." 1>&2; exit 1; }
  4476. fi
  4477. done
  4478. fi
  4479. ac_save_ldflags="$LDFLAGS"
  4480. LDFLAGS="$ZLIBLIBPATH $LDFLAGS"
  4481. echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
  4482. echo "configure:5358: checking for deflate in -lz" >&5
  4483. ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
  4484. ac_save_LIBS="$LIBS"
  4485. LIBS="-lz $LIBS"
  4486. cat > conftest.$ac_ext <<EOF
  4487. #line 5364 "configure"
  4488. #include "confdefs.h"
  4489. /* Override any gcc2 internal prototype to avoid an error. */
  4490. /* We use char because int might match the return type of a gcc2
  4491. builtin and then its argument prototype would still apply. */
  4492. char deflate();
  4493. int main() {
  4494. deflate()
  4495. ; return 0; }
  4496. EOF
  4497. if { (eval echo configure:5375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4498. rm -rf conftest*
  4499. eval "ac_cv_lib_$ac_lib_var=yes"
  4500. else
  4501. echo "configure: failed program was:" >&5
  4502. cat conftest.$ac_ext >&5
  4503. rm -rf conftest*
  4504. eval "ac_cv_lib_$ac_lib_var=no"
  4505. fi
  4506. rm -f conftest*
  4507. LIBS="$ac_save_LIBS"
  4508. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4509. echo "$ac_t""yes" 1>&6
  4510. ZLIB="$ZLIB -lz "
  4511. else
  4512. echo "$ac_t""no" 1>&6
  4513. LDFLAGS=${ac_save_ldflags}
  4514. { echo "configure: error: *** Unable to locate zlib library." 1>&2; exit 1; }
  4515. fi
  4516. LDFLAGS=${ac_save_ldflags}
  4517. #
  4518. # Done checking zlib
  4519. # Mandatory PROJ dependency
  4520. PROJINC=
  4521. PROJLIB=
  4522. PROJSHARE=
  4523. # With PROJ includes directory
  4524. echo $ac_n "checking for location of External PROJ.4 includes""... $ac_c" 1>&6
  4525. echo "configure:5423: checking for location of External PROJ.4 includes" >&5
  4526. case "$with_proj_includes" in
  4527. y | ye | yes | n | no)
  4528. { echo "configure: error: *** You must supply a directory to --with-proj-includes." 1>&2; exit 1; }
  4529. ;;
  4530. esac
  4531. echo "$ac_t""$with_proj_includes" 1>&6
  4532. if test -n "$with_proj_includes" ; then
  4533. for dir in $with_proj_includes; do
  4534. if test -d "$dir"; then
  4535. PROJINC="$PROJINC -I$dir"
  4536. else
  4537. { echo "configure: error: *** External PROJ.4 includes directory $dir does not exist." 1>&2; exit 1; }
  4538. fi
  4539. done
  4540. fi
  4541. ac_save_cppflags="$CPPFLAGS"
  4542. CPPFLAGS="$PROJINC $CPPFLAGS"
  4543. for ac_hdr in proj_api.h
  4544. do
  4545. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4546. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4547. echo "configure:5449: checking for $ac_hdr" >&5
  4548. cat > conftest.$ac_ext <<EOF
  4549. #line 5452 "configure"
  4550. #include "confdefs.h"
  4551. #include <$ac_hdr>
  4552. EOF
  4553. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4554. { (eval echo configure:5457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4555. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4556. if test -z "$ac_err"; then
  4557. rm -rf conftest*
  4558. eval "ac_cv_header_$ac_safe=yes"
  4559. else
  4560. echo "$ac_err" >&5
  4561. echo "configure: failed program was:" >&5
  4562. cat conftest.$ac_ext >&5
  4563. rm -rf conftest*
  4564. eval "ac_cv_header_$ac_safe=no"
  4565. fi
  4566. rm -f conftest*
  4567. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4568. echo "$ac_t""yes" 1>&6
  4569. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4570. cat >> confdefs.h <<EOF
  4571. #define $ac_tr_hdr 1
  4572. EOF
  4573. else
  4574. echo "$ac_t""no" 1>&6
  4575. { echo "configure: error: *** Unable to locate External PROJ.4 includes." 1>&2; exit 1; }
  4576. fi
  4577. done
  4578. CPPFLAGS=$ac_save_cppflags
  4579. # PROJ version check
  4580. if test "$cross_compiling" = yes; then
  4581. echo "configure: warning: *** Cannot check PROJ.4 version (cross-compiling)." 1>&2
  4582. else
  4583. echo $ac_n "checking External PROJ.4 version""... $ac_c" 1>&6
  4584. echo "configure:5494: checking External PROJ.4 version" >&5
  4585. ac_save_cppflags="$CPPFLAGS"
  4586. CPPFLAGS="$PROJINC $CPPFLAGS"
  4587. if test "$cross_compiling" = yes; then
  4588. proj_ver=0
  4589. echo "$ac_t""unknown (cross-compiling)" 1>&6
  4590. else
  4591. cat > conftest.$ac_ext <<EOF
  4592. #line 5502 "configure"
  4593. #include "confdefs.h"
  4594. #include <stdio.h>
  4595. #include <proj_api.h>
  4596. int main(void) {
  4597. FILE *fp = fopen("conftestdata","w");
  4598. fprintf(fp, "%d", PJ_VERSION);
  4599. return 0;
  4600. }
  4601. EOF
  4602. if { (eval echo configure:5514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  4603. then
  4604. proj_ver=`cat conftestdata`
  4605. echo "$ac_t""$proj_ver" 1>&6
  4606. else
  4607. echo "configure: failed program was:" >&5
  4608. cat conftest.$ac_ext >&5
  4609. rm -fr conftest*
  4610. { echo "configure: error: *** Could not determine External PROJ.4 version." 1>&2; exit 1; }
  4611. fi
  4612. rm -fr conftest*
  4613. fi
  4614. CPPFLAGS=$ac_save_cppflags
  4615. if test `expr "$proj_ver" \< 446` = 1 ; then
  4616. { echo "configure: error: *** PROJ.4.4.6 or later is required." 1>&2; exit 1; }
  4617. fi
  4618. fi
  4619. # With PROJ library directory
  4620. echo $ac_n "checking for location of External PROJ.4 library""... $ac_c" 1>&6
  4621. echo "configure:5539: checking for location of External PROJ.4 library" >&5
  4622. case "$with_proj_libs" in
  4623. y | ye | yes | n | no)
  4624. { echo "configure: error: *** You must supply a directory to --with-proj-libs." 1>&2; exit 1; }
  4625. ;;
  4626. esac
  4627. echo "$ac_t""$with_proj_libs" 1>&6
  4628. if test -n "$with_proj_libs"; then
  4629. for dir in $with_proj_libs; do
  4630. if test -d "$dir"; then
  4631. PROJLIB="$PROJLIB -L$dir"
  4632. else
  4633. { echo "configure: error: *** External PROJ.4 library directory $dir does not exist." 1>&2; exit 1; }
  4634. fi
  4635. done
  4636. fi
  4637. ac_save_ldflags="$LDFLAGS"
  4638. LDFLAGS="$PROJLIB $LDFLAGS"
  4639. echo $ac_n "checking for pj_get_def in -lproj""... $ac_c" 1>&6
  4640. echo "configure:5564: checking for pj_get_def in -lproj" >&5
  4641. ac_lib_var=`echo proj'_'pj_get_def | sed 'y%./+-%__p_%'`
  4642. ac_save_LIBS="$LIBS"
  4643. LIBS="-lproj $LIBS"
  4644. cat > conftest.$ac_ext <<EOF
  4645. #line 5570 "configure"
  4646. #include "confdefs.h"
  4647. /* Override any gcc2 internal prototype to avoid an error. */
  4648. /* We use char because int might match the return type of a gcc2
  4649. builtin and then its argument prototype would still apply. */
  4650. char pj_get_def();
  4651. int main() {
  4652. pj_get_def()
  4653. ; return 0; }
  4654. EOF
  4655. if { (eval echo configure:5581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4656. rm -rf conftest*
  4657. eval "ac_cv_lib_$ac_lib_var=yes"
  4658. else
  4659. echo "configure: failed program was:" >&5
  4660. cat conftest.$ac_ext >&5
  4661. rm -rf conftest*
  4662. eval "ac_cv_lib_$ac_lib_var=no"
  4663. fi
  4664. rm -f conftest*
  4665. LIBS="$ac_save_LIBS"
  4666. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4667. echo "$ac_t""yes" 1>&6
  4668. PROJLIB="$PROJLIB -lproj "
  4669. else
  4670. echo "$ac_t""no" 1>&6
  4671. LDFLAGS=${ac_save_ldflags}
  4672. { echo "configure: error: *** Unable to locate External PROJ.4 library." 1>&2; exit 1; }
  4673. fi
  4674. LDFLAGS=${ac_save_ldflags}
  4675. # With PROJ share directory
  4676. echo $ac_n "checking for location of External PROJ.4 data files""... $ac_c" 1>&6
  4677. echo "configure:5615: checking for location of External PROJ.4 data files" >&5
  4678. case "$with_proj_share" in
  4679. y | ye | yes | n | no)
  4680. { echo "configure: error: *** You must supply a directory to --with-proj-share." 1>&2; exit 1; }
  4681. ;;
  4682. esac
  4683. echo "$ac_t""$with_proj_share" 1>&6
  4684. if test -n "$with_proj_share" ; then
  4685. if test -d "$with_proj_share"; then
  4686. PROJSHARE="$with_proj_share"
  4687. else
  4688. { echo "configure: error: *** External PROJ.4 data directory $dir does not exist." 1>&2; exit 1; }
  4689. fi
  4690. fi
  4691. if test -z "$PROJSHARE" ; then
  4692. echo "configure: warning: *** External PROJ.4 directory not specified; default will be used" 1>&2
  4693. PROJSHARE=/usr/local/share/proj
  4694. fi
  4695. # LOC_CHECK_SHARE does not work when cross compiling
  4696. if test "$cross_compiling" = "yes" ; then
  4697. echo $ac_n "checking for epsg""... $ac_c" 1>&6
  4698. echo "configure:5639: checking for epsg" >&5
  4699. echo "$ac_t""unknown (cross-compiling)" 1>&6
  4700. else
  4701. ac_safe=`echo "$PROJSHARE/epsg" | sed 'y%./+-%__p_%'`
  4702. echo $ac_n "checking for $PROJSHARE/epsg""... $ac_c" 1>&6
  4703. echo "configure:5646: checking for $PROJSHARE/epsg" >&5
  4704. if test "$cross_compiling" = yes; then
  4705. { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
  4706. else
  4707. if test -r $PROJSHARE/epsg; then
  4708. eval "ac_cv_file_$ac_safe=yes"
  4709. else
  4710. eval "ac_cv_file_$ac_safe=no"
  4711. fi
  4712. fi
  4713. if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
  4714. echo "$ac_t""yes" 1>&6
  4715. :
  4716. else
  4717. echo "$ac_t""no" 1>&6
  4718. echo "configure: warning: *** Unable to locate PROJ data files." 1>&2
  4719. fi
  4720. fi
  4721. # nad2bin needs to be in path for installing datum gridshift files
  4722. # Extract the first word of "nad2bin", so it can be a program name with args.
  4723. set dummy nad2bin; ac_word=$2
  4724. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4725. echo "configure:5678: checking for $ac_word" >&5
  4726. case "$NAD2BIN" in
  4727. /*)
  4728. ac_cv_path_NAD2BIN="$NAD2BIN" # Let the user override the test with a path.
  4729. ;;
  4730. ?:/*)
  4731. ac_cv_path_NAD2BIN="$NAD2BIN" # Let the user override the test with a dos path.
  4732. ;;
  4733. *)
  4734. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  4735. ac_dummy="$PATH"
  4736. for ac_dir in $ac_dummy; do
  4737. test -z "$ac_dir" && ac_dir=.
  4738. if test -f $ac_dir/$ac_word; then
  4739. ac_cv_path_NAD2BIN="$ac_dir/$ac_word"
  4740. break
  4741. fi
  4742. done
  4743. IFS="$ac_save_ifs"
  4744. test -z "$ac_cv_path_NAD2BIN" && ac_cv_path_NAD2BIN="no"
  4745. ;;
  4746. esac
  4747. NAD2BIN="$ac_cv_path_NAD2BIN"
  4748. if test -n "$NAD2BIN"; then
  4749. echo "$ac_t""$NAD2BIN" 1>&6
  4750. else
  4751. echo "$ac_t""no" 1>&6
  4752. fi
  4753. if test "$NAD2BIN" = "no"; then
  4754. { echo "configure: error: *** Unable to locate nad2bin (needs to be in PATH)." 1>&2; exit 1; }
  4755. fi
  4756. # Done checking PROJ
  4757. # Enable regex option
  4758. echo $ac_n "checking whether to use regex""... $ac_c" 1>&6
  4759. echo "configure:5718: checking whether to use regex" >&5
  4760. echo "$ac_t"""$with_regex"" 1>&6
  4761. case "$with_regex" in
  4762. "no") USE_REGEX= ;;
  4763. "yes") USE_REGEX="1" ;;
  4764. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  4765. esac
  4766. REGEXINCPATH=
  4767. REGEXLIBPATH=
  4768. REGEXLIB=
  4769. if test -n "$USE_REGEX"; then
  4770. # With regex includes directory
  4771. echo $ac_n "checking for location of regex includes""... $ac_c" 1>&6
  4772. echo "configure:5738: checking for location of regex includes" >&5
  4773. case "$with_regex_includes" in
  4774. y | ye | yes | n | no)
  4775. { echo "configure: error: *** You must supply a directory to --with-regex-includes." 1>&2; exit 1; }
  4776. ;;
  4777. esac
  4778. echo "$ac_t""$with_regex_includes" 1>&6
  4779. if test -n "$with_regex_includes" ; then
  4780. for dir in $with_regex_includes; do
  4781. if test -d "$dir"; then
  4782. REGEXINCPATH="$REGEXINCPATH -I$dir"
  4783. else
  4784. { echo "configure: error: *** regex includes directory $dir does not exist." 1>&2; exit 1; }
  4785. fi
  4786. done
  4787. fi
  4788. ac_save_cppflags="$CPPFLAGS"
  4789. CPPFLAGS="$REGEXINCPATH $CPPFLAGS"
  4790. for ac_hdr in regex.h
  4791. do
  4792. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4793. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4794. echo "configure:5764: checking for $ac_hdr" >&5
  4795. cat > conftest.$ac_ext <<EOF
  4796. #line 5767 "configure"
  4797. #include "confdefs.h"
  4798. #include <$ac_hdr>
  4799. EOF
  4800. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4801. { (eval echo configure:5772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4802. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4803. if test -z "$ac_err"; then
  4804. rm -rf conftest*
  4805. eval "ac_cv_header_$ac_safe=yes"
  4806. else
  4807. echo "$ac_err" >&5
  4808. echo "configure: failed program was:" >&5
  4809. cat conftest.$ac_ext >&5
  4810. rm -rf conftest*
  4811. eval "ac_cv_header_$ac_safe=no"
  4812. fi
  4813. rm -f conftest*
  4814. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4815. echo "$ac_t""yes" 1>&6
  4816. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4817. cat >> confdefs.h <<EOF
  4818. #define $ac_tr_hdr 1
  4819. EOF
  4820. else
  4821. echo "$ac_t""no" 1>&6
  4822. { echo "configure: error: *** Unable to locate regex includes." 1>&2; exit 1; }
  4823. fi
  4824. done
  4825. CPPFLAGS=$ac_save_cppflags
  4826. # With regex library directory
  4827. echo $ac_n "checking for location of regex library""... $ac_c" 1>&6
  4828. echo "configure:5806: checking for location of regex library" >&5
  4829. case "$with_regex_libs" in
  4830. y | ye | yes | n | no)
  4831. { echo "configure: error: *** You must supply a directory to --with-regex-libs." 1>&2; exit 1; }
  4832. ;;
  4833. esac
  4834. echo "$ac_t""$with_regex_libs" 1>&6
  4835. if test -n "$with_regex_libs"; then
  4836. for dir in $with_regex_libs; do
  4837. if test -d "$dir"; then
  4838. REGEXLIBPATH="$REGEXLIBPATH -L$dir"
  4839. else
  4840. { echo "configure: error: *** regex library directory $dir does not exist." 1>&2; exit 1; }
  4841. fi
  4842. done
  4843. fi
  4844. ac_save_libs="$LIBS"
  4845. ac_save_ldflags="$LDFLAGS"
  4846. LIBS=" $LIBS"
  4847. LDFLAGS=" $LDFLAGS"
  4848. echo $ac_n "checking for regcomp""... $ac_c" 1>&6
  4849. echo "configure:5831: checking for regcomp" >&5
  4850. cat > conftest.$ac_ext <<EOF
  4851. #line 5834 "configure"
  4852. #include "confdefs.h"
  4853. /* System header to define __stub macros and hopefully few prototypes,
  4854. which can conflict with char regcomp(); below. */
  4855. #include <assert.h>
  4856. /* Override any gcc2 internal prototype to avoid an error. */
  4857. /* We use char because int might match the return type of a gcc2
  4858. builtin and then its argument prototype would still apply. */
  4859. char regcomp();
  4860. int main() {
  4861. /* The GNU C library defines this for functions which it implements
  4862. to always fail with ENOSYS. Some functions are actually named
  4863. something starting with __ and the normal name is an alias. */
  4864. #if defined (__stub_regcomp) || defined (__stub___regcomp)
  4865. choke me
  4866. #else
  4867. regcomp();
  4868. #endif
  4869. ; return 0; }
  4870. EOF
  4871. if { (eval echo configure:5857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4872. rm -rf conftest*
  4873. eval "ac_cv_func_regcomp=yes"
  4874. else
  4875. echo "configure: failed program was:" >&5
  4876. cat conftest.$ac_ext >&5
  4877. rm -rf conftest*
  4878. eval "ac_cv_func_regcomp=no"
  4879. fi
  4880. rm -f conftest*
  4881. if eval "test \"`echo '$ac_cv_func_'regcomp`\" = yes"; then
  4882. echo "$ac_t""yes" 1>&6
  4883. REGEXLIB="$REGEXLIB "
  4884. else
  4885. echo "$ac_t""no" 1>&6
  4886. ac_save_ldflags="$LDFLAGS"
  4887. LDFLAGS="$REGEXLIBPATH $LDFLAGS"
  4888. echo $ac_n "checking for regcomp in -lregex""... $ac_c" 1>&6
  4889. echo "configure:5884: checking for regcomp in -lregex" >&5
  4890. ac_lib_var=`echo regex'_'regcomp | sed 'y%./+-%__p_%'`
  4891. ac_save_LIBS="$LIBS"
  4892. LIBS="-lregex $LIBS"
  4893. cat > conftest.$ac_ext <<EOF
  4894. #line 5890 "configure"
  4895. #include "confdefs.h"
  4896. /* Override any gcc2 internal prototype to avoid an error. */
  4897. /* We use char because int might match the return type of a gcc2
  4898. builtin and then its argument prototype would still apply. */
  4899. char regcomp();
  4900. int main() {
  4901. regcomp()
  4902. ; return 0; }
  4903. EOF
  4904. if { (eval echo configure:5901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4905. rm -rf conftest*
  4906. eval "ac_cv_lib_$ac_lib_var=yes"
  4907. else
  4908. echo "configure: failed program was:" >&5
  4909. cat conftest.$ac_ext >&5
  4910. rm -rf conftest*
  4911. eval "ac_cv_lib_$ac_lib_var=no"
  4912. fi
  4913. rm -f conftest*
  4914. LIBS="$ac_save_LIBS"
  4915. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4916. echo "$ac_t""yes" 1>&6
  4917. REGEXLIB="$REGEXLIB -lregex "
  4918. else
  4919. echo "$ac_t""no" 1>&6
  4920. LDFLAGS=${ac_save_ldflags}
  4921. { echo "configure: error: *** Unable to locate regex library." 1>&2; exit 1; }
  4922. fi
  4923. LDFLAGS=${ac_save_ldflags}
  4924. fi
  4925. LIBS=${ac_save_libs}
  4926. LDFLAGS=${ac_save_ldflags}
  4927. fi # $USE_REGEX
  4928. # Done checking regex
  4929. # Enable Readline option
  4930. echo $ac_n "checking whether to use Readline""... $ac_c" 1>&6
  4931. echo "configure:5951: checking whether to use Readline" >&5
  4932. echo "$ac_t"""$with_readline"" 1>&6
  4933. case "$with_readline" in
  4934. "no") USE_READLINE= ;;
  4935. "yes") USE_READLINE="1" ;;
  4936. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  4937. esac
  4938. READLINEINCPATH=
  4939. READLINELIBPATH=
  4940. READLINELIB=
  4941. HISTORYLIB=
  4942. if test -n "$USE_READLINE"; then
  4943. # With Readline includes directory
  4944. echo $ac_n "checking for location of Readline includes""... $ac_c" 1>&6
  4945. echo "configure:5972: checking for location of Readline includes" >&5
  4946. case "$with_readline_includes" in
  4947. y | ye | yes | n | no)
  4948. { echo "configure: error: *** You must supply a directory to --with-readline-includes." 1>&2; exit 1; }
  4949. ;;
  4950. esac
  4951. echo "$ac_t""$with_readline_includes" 1>&6
  4952. if test -n "$with_readline_includes" ; then
  4953. for dir in $with_readline_includes; do
  4954. if test -d "$dir"; then
  4955. READLINEINCPATH="$READLINEINCPATH -I$dir"
  4956. else
  4957. { echo "configure: error: *** Readline includes directory $dir does not exist." 1>&2; exit 1; }
  4958. fi
  4959. done
  4960. fi
  4961. ac_save_cppflags="$CPPFLAGS"
  4962. CPPFLAGS="$READLINEINCPATH $CPPFLAGS"
  4963. for ac_hdr in readline/readline.h
  4964. do
  4965. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4966. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4967. echo "configure:5998: checking for $ac_hdr" >&5
  4968. cat > conftest.$ac_ext <<EOF
  4969. #line 6001 "configure"
  4970. #include "confdefs.h"
  4971. #include <$ac_hdr>
  4972. EOF
  4973. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4974. { (eval echo configure:6006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4975. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4976. if test -z "$ac_err"; then
  4977. rm -rf conftest*
  4978. eval "ac_cv_header_$ac_safe=yes"
  4979. else
  4980. echo "$ac_err" >&5
  4981. echo "configure: failed program was:" >&5
  4982. cat conftest.$ac_ext >&5
  4983. rm -rf conftest*
  4984. eval "ac_cv_header_$ac_safe=no"
  4985. fi
  4986. rm -f conftest*
  4987. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4988. echo "$ac_t""yes" 1>&6
  4989. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4990. cat >> confdefs.h <<EOF
  4991. #define $ac_tr_hdr 1
  4992. EOF
  4993. else
  4994. echo "$ac_t""no" 1>&6
  4995. { echo "configure: error: *** Unable to locate Readline includes." 1>&2; exit 1; }
  4996. fi
  4997. done
  4998. CPPFLAGS=$ac_save_cppflags
  4999. ac_save_cppflags="$CPPFLAGS"
  5000. CPPFLAGS="$READLINEINCPATH $CPPFLAGS"
  5001. for ac_hdr in readline/history.h
  5002. do
  5003. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5004. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5005. echo "configure:6042: checking for $ac_hdr" >&5
  5006. cat > conftest.$ac_ext <<EOF
  5007. #line 6045 "configure"
  5008. #include "confdefs.h"
  5009. #include <$ac_hdr>
  5010. EOF
  5011. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5012. { (eval echo configure:6050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5013. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5014. if test -z "$ac_err"; then
  5015. rm -rf conftest*
  5016. eval "ac_cv_header_$ac_safe=yes"
  5017. else
  5018. echo "$ac_err" >&5
  5019. echo "configure: failed program was:" >&5
  5020. cat conftest.$ac_ext >&5
  5021. rm -rf conftest*
  5022. eval "ac_cv_header_$ac_safe=no"
  5023. fi
  5024. rm -f conftest*
  5025. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5026. echo "$ac_t""yes" 1>&6
  5027. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5028. cat >> confdefs.h <<EOF
  5029. #define $ac_tr_hdr 1
  5030. EOF
  5031. else
  5032. echo "$ac_t""no" 1>&6
  5033. { echo "configure: error: *** Unable to locate Readline includes." 1>&2; exit 1; }
  5034. fi
  5035. done
  5036. CPPFLAGS=$ac_save_cppflags
  5037. # With Readline library directory
  5038. echo $ac_n "checking for location of Readline library""... $ac_c" 1>&6
  5039. echo "configure:6084: checking for location of Readline library" >&5
  5040. case "$with_readline_libs" in
  5041. y | ye | yes | n | no)
  5042. { echo "configure: error: *** You must supply a directory to --with-readline-libs." 1>&2; exit 1; }
  5043. ;;
  5044. esac
  5045. echo "$ac_t""$with_readline_libs" 1>&6
  5046. if test -n "$with_readline_libs"; then
  5047. for dir in $with_readline_libs; do
  5048. if test -d "$dir"; then
  5049. READLINELIBPATH="$READLINELIBPATH -L$dir"
  5050. else
  5051. { echo "configure: error: *** Readline library directory $dir does not exist." 1>&2; exit 1; }
  5052. fi
  5053. done
  5054. fi
  5055. ac_save_ldflags="$LDFLAGS"
  5056. LDFLAGS="$READLINELIBPATH $LDFLAGS"
  5057. echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
  5058. echo "configure:6109: checking for readline in -lreadline" >&5
  5059. ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
  5060. ac_save_LIBS="$LIBS"
  5061. LIBS="-lreadline $LIBS"
  5062. cat > conftest.$ac_ext <<EOF
  5063. #line 6115 "configure"
  5064. #include "confdefs.h"
  5065. /* Override any gcc2 internal prototype to avoid an error. */
  5066. /* We use char because int might match the return type of a gcc2
  5067. builtin and then its argument prototype would still apply. */
  5068. char readline();
  5069. int main() {
  5070. readline()
  5071. ; return 0; }
  5072. EOF
  5073. if { (eval echo configure:6126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5074. rm -rf conftest*
  5075. eval "ac_cv_lib_$ac_lib_var=yes"
  5076. else
  5077. echo "configure: failed program was:" >&5
  5078. cat conftest.$ac_ext >&5
  5079. rm -rf conftest*
  5080. eval "ac_cv_lib_$ac_lib_var=no"
  5081. fi
  5082. rm -f conftest*
  5083. LIBS="$ac_save_LIBS"
  5084. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5085. echo "$ac_t""yes" 1>&6
  5086. READLINELIB="$READLINELIB -lreadline "
  5087. else
  5088. echo "$ac_t""no" 1>&6
  5089. LDFLAGS=${ac_save_ldflags}
  5090. { echo "configure: error: *** Unable to locate Readline library." 1>&2; exit 1; }
  5091. fi
  5092. LDFLAGS=${ac_save_ldflags}
  5093. ac_save_ldflags="$LDFLAGS"
  5094. LDFLAGS="$READLINELIBPATH $LDFLAGS"
  5095. echo $ac_n "checking for add_history in -lhistory""... $ac_c" 1>&6
  5096. echo "configure:6161: checking for add_history in -lhistory" >&5
  5097. ac_lib_var=`echo history'_'add_history | sed 'y%./+-%__p_%'`
  5098. ac_save_LIBS="$LIBS"
  5099. LIBS="-lhistory $LIBS"
  5100. cat > conftest.$ac_ext <<EOF
  5101. #line 6167 "configure"
  5102. #include "confdefs.h"
  5103. /* Override any gcc2 internal prototype to avoid an error. */
  5104. /* We use char because int might match the return type of a gcc2
  5105. builtin and then its argument prototype would still apply. */
  5106. char add_history();
  5107. int main() {
  5108. add_history()
  5109. ; return 0; }
  5110. EOF
  5111. if { (eval echo configure:6178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5112. rm -rf conftest*
  5113. eval "ac_cv_lib_$ac_lib_var=yes"
  5114. else
  5115. echo "configure: failed program was:" >&5
  5116. cat conftest.$ac_ext >&5
  5117. rm -rf conftest*
  5118. eval "ac_cv_lib_$ac_lib_var=no"
  5119. fi
  5120. rm -f conftest*
  5121. LIBS="$ac_save_LIBS"
  5122. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5123. echo "$ac_t""yes" 1>&6
  5124. HISTORYLIB="$HISTORYLIB -lhistory "
  5125. else
  5126. echo "$ac_t""no" 1>&6
  5127. LDFLAGS=${ac_save_ldflags}
  5128. { echo "configure: error: *** Unable to locate History library." 1>&2; exit 1; }
  5129. fi
  5130. LDFLAGS=${ac_save_ldflags}
  5131. fi # $USE_READLINE
  5132. # Done checking Readline
  5133. # Enable JPEG option
  5134. echo $ac_n "checking whether to use JPEG""... $ac_c" 1>&6
  5135. echo "configure:6221: checking whether to use JPEG" >&5
  5136. echo "$ac_t"""$with_jpeg"" 1>&6
  5137. case "$with_jpeg" in
  5138. "no") USE_JPEG= ;;
  5139. "yes") USE_JPEG="1" ;;
  5140. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  5141. esac
  5142. JPEGINCPATH=
  5143. JPEGLIBPATH=
  5144. JPEGLIB=
  5145. if test -n "$USE_JPEG"; then
  5146. # With JPEG includes directory
  5147. echo $ac_n "checking for location of JPEG includes""... $ac_c" 1>&6
  5148. echo "configure:6241: checking for location of JPEG includes" >&5
  5149. case "$with_jpeg_includes" in
  5150. y | ye | yes | n | no)
  5151. { echo "configure: error: *** You must supply a directory to --with-jpeg-includes." 1>&2; exit 1; }
  5152. ;;
  5153. esac
  5154. echo "$ac_t""$with_jpeg_includes" 1>&6
  5155. if test -n "$with_jpeg_includes" ; then
  5156. for dir in $with_jpeg_includes; do
  5157. if test -d "$dir"; then
  5158. JPEGINCPATH="$JPEGINCPATH -I$dir"
  5159. else
  5160. { echo "configure: error: *** JPEG includes directory $dir does not exist." 1>&2; exit 1; }
  5161. fi
  5162. done
  5163. fi
  5164. ac_save_cppflags="$CPPFLAGS"
  5165. CPPFLAGS="$JPEGINCPATH $CPPFLAGS"
  5166. for ac_hdr in jpeglib.h
  5167. do
  5168. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5169. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5170. echo "configure:6267: checking for $ac_hdr" >&5
  5171. cat > conftest.$ac_ext <<EOF
  5172. #line 6270 "configure"
  5173. #include "confdefs.h"
  5174. #include <$ac_hdr>
  5175. EOF
  5176. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5177. { (eval echo configure:6275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5178. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5179. if test -z "$ac_err"; then
  5180. rm -rf conftest*
  5181. eval "ac_cv_header_$ac_safe=yes"
  5182. else
  5183. echo "$ac_err" >&5
  5184. echo "configure: failed program was:" >&5
  5185. cat conftest.$ac_ext >&5
  5186. rm -rf conftest*
  5187. eval "ac_cv_header_$ac_safe=no"
  5188. fi
  5189. rm -f conftest*
  5190. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5191. echo "$ac_t""yes" 1>&6
  5192. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5193. cat >> confdefs.h <<EOF
  5194. #define $ac_tr_hdr 1
  5195. EOF
  5196. else
  5197. echo "$ac_t""no" 1>&6
  5198. { echo "configure: error: *** Unable to locate JPEG includes." 1>&2; exit 1; }
  5199. fi
  5200. done
  5201. CPPFLAGS=$ac_save_cppflags
  5202. # With JPEG library directory
  5203. echo $ac_n "checking for location of JPEG library""... $ac_c" 1>&6
  5204. echo "configure:6309: checking for location of JPEG library" >&5
  5205. case "$with_jpeg_libs" in
  5206. y | ye | yes | n | no)
  5207. { echo "configure: error: *** You must supply a directory to --with-jpeg-libs." 1>&2; exit 1; }
  5208. ;;
  5209. esac
  5210. echo "$ac_t""$with_jpeg_libs" 1>&6
  5211. if test -n "$with_jpeg_libs"; then
  5212. for dir in $with_jpeg_libs; do
  5213. if test -d "$dir"; then
  5214. JPEGLIBPATH="$JPEGLIBPATH -L$dir"
  5215. else
  5216. { echo "configure: error: *** JPEG library directory $dir does not exist." 1>&2; exit 1; }
  5217. fi
  5218. done
  5219. fi
  5220. ac_save_ldflags="$LDFLAGS"
  5221. LDFLAGS="$JPEGLIBPATH $LDFLAGS"
  5222. echo $ac_n "checking for jpeg_start_compress in -ljpeg""... $ac_c" 1>&6
  5223. echo "configure:6336: checking for jpeg_start_compress in -ljpeg" >&5
  5224. ac_lib_var=`echo jpeg'_'jpeg_start_compress | sed 'y%./+-%__p_%'`
  5225. ac_save_LIBS="$LIBS"
  5226. LIBS="-ljpeg $LIBS"
  5227. cat > conftest.$ac_ext <<EOF
  5228. #line 6342 "configure"
  5229. #include "confdefs.h"
  5230. /* Override any gcc2 internal prototype to avoid an error. */
  5231. /* We use char because int might match the return type of a gcc2
  5232. builtin and then its argument prototype would still apply. */
  5233. char jpeg_start_compress();
  5234. int main() {
  5235. jpeg_start_compress()
  5236. ; return 0; }
  5237. EOF
  5238. if { (eval echo configure:6353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5239. rm -rf conftest*
  5240. eval "ac_cv_lib_$ac_lib_var=yes"
  5241. else
  5242. echo "configure: failed program was:" >&5
  5243. cat conftest.$ac_ext >&5
  5244. rm -rf conftest*
  5245. eval "ac_cv_lib_$ac_lib_var=no"
  5246. fi
  5247. rm -f conftest*
  5248. LIBS="$ac_save_LIBS"
  5249. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5250. echo "$ac_t""yes" 1>&6
  5251. JPEGLIB="$JPEGLIB -ljpeg "
  5252. else
  5253. echo "$ac_t""no" 1>&6
  5254. echo $ac_n "checking for jpeg_start_compress in -ljpeg""... $ac_c" 1>&6
  5255. echo "configure:6372: checking for jpeg_start_compress in -ljpeg" >&5
  5256. ac_lib_var=`echo jpeg'_'jpeg_start_compress | sed 'y%./+-%__p_%'`
  5257. ac_save_LIBS="$LIBS"
  5258. LIBS="-ljpeg $ZLIB $LIBS"
  5259. cat > conftest.$ac_ext <<EOF
  5260. #line 6378 "configure"
  5261. #include "confdefs.h"
  5262. /* Override any gcc2 internal prototype to avoid an error. */
  5263. /* We use char because int might match the return type of a gcc2
  5264. builtin and then its argument prototype would still apply. */
  5265. char jpeg_start_compress();
  5266. int main() {
  5267. jpeg_start_compress()
  5268. ; return 0; }
  5269. EOF
  5270. if { (eval echo configure:6389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5271. rm -rf conftest*
  5272. eval "ac_cv_lib_$ac_lib_var=yes"
  5273. else
  5274. echo "configure: failed program was:" >&5
  5275. cat conftest.$ac_ext >&5
  5276. rm -rf conftest*
  5277. eval "ac_cv_lib_$ac_lib_var=no"
  5278. fi
  5279. rm -f conftest*
  5280. LIBS="$ac_save_LIBS"
  5281. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5282. echo "$ac_t""yes" 1>&6
  5283. JPEGLIB="$JPEGLIB -ljpeg $ZLIB"
  5284. else
  5285. echo "$ac_t""no" 1>&6
  5286. LDFLAGS=${ac_save_ldflags}
  5287. { echo "configure: error: *** Unable to locate JPEG library." 1>&2; exit 1; }
  5288. fi
  5289. fi
  5290. LDFLAGS=${ac_save_ldflags}
  5291. fi # $USE_JPEG
  5292. # Done checking JPEG
  5293. # GDAL option
  5294. echo $ac_n "checking whether to use GDAL""... $ac_c" 1>&6
  5295. echo "configure:6438: checking whether to use GDAL" >&5
  5296. GDAL_LIBS=
  5297. GDAL_CFLAGS=
  5298. USE_GDAL=
  5299. USE_OGR=
  5300. if test "`basename xx/$with_gdal`" = "gdal-config" ; then
  5301. GDAL_CONFIG="$with_gdal"
  5302. fi
  5303. if test "$with_gdal" = "no" ; then
  5304. echo "$ac_t""no" 1>&6
  5305. else
  5306. echo "$ac_t""yes" 1>&6
  5307. # Extract the first word of "gdal-config", so it can be a program name with args.
  5308. set dummy gdal-config; ac_word=$2
  5309. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5310. echo "configure:6456: checking for $ac_word" >&5
  5311. case "$GDAL_CONFIG" in
  5312. /*)
  5313. ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a path.
  5314. ;;
  5315. ?:/*)
  5316. ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a dos path.
  5317. ;;
  5318. *)
  5319. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5320. ac_dummy="$PATH"
  5321. for ac_dir in $ac_dummy; do
  5322. test -z "$ac_dir" && ac_dir=.
  5323. if test -f $ac_dir/$ac_word; then
  5324. ac_cv_path_GDAL_CONFIG="$ac_dir/$ac_word"
  5325. break
  5326. fi
  5327. done
  5328. IFS="$ac_save_ifs"
  5329. test -z "$ac_cv_path_GDAL_CONFIG" && ac_cv_path_GDAL_CONFIG="no"
  5330. ;;
  5331. esac
  5332. GDAL_CONFIG="$ac_cv_path_GDAL_CONFIG"
  5333. if test -n "$GDAL_CONFIG"; then
  5334. echo "$ac_t""$GDAL_CONFIG" 1>&6
  5335. else
  5336. echo "$ac_t""no" 1>&6
  5337. fi
  5338. if test "$GDAL_CONFIG" = "no" ; then
  5339. { echo "configure: error: *** couldn't find gdal-config" 1>&2; exit 1; }
  5340. fi
  5341. if test "$GDAL_CONFIG" != "" ; then
  5342. GDAL_LIBS=`"$GDAL_CONFIG" --libs`
  5343. GDAL_DEP_LIBS=`"$GDAL_CONFIG" --dep-libs`
  5344. GDAL_CFLAGS=`"$GDAL_CONFIG" --cflags`
  5345. USE_GDAL=1
  5346. if test `"$GDAL_CONFIG" --ogr-enabled` = "yes" ; then
  5347. cat >> confdefs.h <<\EOF
  5348. #define HAVE_OGR 1
  5349. EOF
  5350. USE_OGR=1
  5351. fi
  5352. fi
  5353. GDAL=
  5354. ac_save_libs="$LIBS"
  5355. ac_save_cflags="$CFLAGS"
  5356. LIBS="$LIBS $GDAL_LIBS"
  5357. CFLAGS="$CFLAGS $GDAL_CFLAGS"
  5358. cat > conftest.$ac_ext <<EOF
  5359. #line 6511 "configure"
  5360. #include "confdefs.h"
  5361. #include <gdal.h>
  5362. int main() {
  5363. GDALOpen("foo", GA_ReadOnly);
  5364. ; return 0; }
  5365. EOF
  5366. if { (eval echo configure:6518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5367. :
  5368. else
  5369. echo "configure: failed program was:" >&5
  5370. cat conftest.$ac_ext >&5
  5371. rm -rf conftest*
  5372. LIBS="$LIBS $GDAL_DEP_LIBS"
  5373. cat > conftest.$ac_ext <<EOF
  5374. #line 6527 "configure"
  5375. #include "confdefs.h"
  5376. #include <gdal.h>
  5377. int main() {
  5378. GDALOpen("foo", GA_ReadOnly);
  5379. ; return 0; }
  5380. EOF
  5381. if { (eval echo configure:6534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5382. rm -rf conftest*
  5383. GDAL_LIBS="$GDAL_LIBS $GDAL_DEP_LIBS"
  5384. else
  5385. echo "configure: failed program was:" >&5
  5386. cat conftest.$ac_ext >&5
  5387. rm -rf conftest*
  5388. { echo "configure: error: *** Unable to locate GDAL library." 1>&2; exit 1; }
  5389. fi
  5390. rm -f conftest*
  5391. fi
  5392. rm -f conftest*
  5393. LIBS=${ac_save_libs}
  5394. CFLAGS=${ac_save_cflags}
  5395. cat >> confdefs.h <<\EOF
  5396. #define HAVE_GDAL 1
  5397. EOF
  5398. fi
  5399. # libLAS option
  5400. echo $ac_n "checking whether to use libLAS""... $ac_c" 1>&6
  5401. echo "configure:6566: checking whether to use libLAS" >&5
  5402. LIBLAS_LIBS=
  5403. LIBLAS_CFLAGS=
  5404. USE_LIBLAS=
  5405. if test "`basename xx/$with_liblas`" = "liblas-config" ; then
  5406. LIBLAS_CONFIG="$with_liblas"
  5407. fi
  5408. if test "$with_liblas" = "no" ; then
  5409. echo "$ac_t""no" 1>&6
  5410. else
  5411. echo "$ac_t""yes" 1>&6
  5412. # Extract the first word of "liblas-config", so it can be a program name with args.
  5413. set dummy liblas-config; ac_word=$2
  5414. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5415. echo "configure:6583: checking for $ac_word" >&5
  5416. case "$LIBLAS_CONFIG" in
  5417. /*)
  5418. ac_cv_path_LIBLAS_CONFIG="$LIBLAS_CONFIG" # Let the user override the test with a path.
  5419. ;;
  5420. ?:/*)
  5421. ac_cv_path_LIBLAS_CONFIG="$LIBLAS_CONFIG" # Let the user override the test with a dos path.
  5422. ;;
  5423. *)
  5424. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5425. ac_dummy="$PATH"
  5426. for ac_dir in $ac_dummy; do
  5427. test -z "$ac_dir" && ac_dir=.
  5428. if test -f $ac_dir/$ac_word; then
  5429. ac_cv_path_LIBLAS_CONFIG="$ac_dir/$ac_word"
  5430. break
  5431. fi
  5432. done
  5433. IFS="$ac_save_ifs"
  5434. test -z "$ac_cv_path_LIBLAS_CONFIG" && ac_cv_path_LIBLAS_CONFIG="no"
  5435. ;;
  5436. esac
  5437. LIBLAS_CONFIG="$ac_cv_path_LIBLAS_CONFIG"
  5438. if test -n "$LIBLAS_CONFIG"; then
  5439. echo "$ac_t""$LIBLAS_CONFIG" 1>&6
  5440. else
  5441. echo "$ac_t""no" 1>&6
  5442. fi
  5443. if test "$LIBLAS_CONFIG" = "no" ; then
  5444. { echo "configure: error: *** couldn't find liblas-config" 1>&2; exit 1; }
  5445. fi
  5446. if test "$LIBLAS_CONFIG" != "" ; then
  5447. LIBLAS_LIBS=`"$LIBLAS_CONFIG" --libs`
  5448. LIBLAS_CFLAGS=`"$LIBLAS_CONFIG" --cflags`
  5449. LIBLAS_INC=`"$LIBLAS_CONFIG" --includes`
  5450. USE_LIBLAS=1
  5451. fi
  5452. LIBLAS=
  5453. ac_save_libs="$LIBS"
  5454. ac_save_cflags="$CFLAGS"
  5455. LIBS="$LIBS $LIBLAS_LIBS"
  5456. CFLAGS="$CFLAGS $LIBLAS_CFLAGS"
  5457. cat > conftest.$ac_ext <<EOF
  5458. #line 6631 "configure"
  5459. #include "confdefs.h"
  5460. #include <liblas/capi/liblas.h>
  5461. int main() {
  5462. LASReader_Create("foo");
  5463. ; return 0; }
  5464. EOF
  5465. if { (eval echo configure:6638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5466. :
  5467. else
  5468. echo "configure: failed program was:" >&5
  5469. cat conftest.$ac_ext >&5
  5470. rm -rf conftest*
  5471. cat > conftest.$ac_ext <<EOF
  5472. #line 6646 "configure"
  5473. #include "confdefs.h"
  5474. #include <liblas/capi/liblas.h>
  5475. int main() {
  5476. LASReader_Create("foo");
  5477. ; return 0; }
  5478. EOF
  5479. if { (eval echo configure:6653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5480. rm -rf conftest*
  5481. LAS_LIBS="$LAS_LIBS"
  5482. else
  5483. echo "configure: failed program was:" >&5
  5484. cat conftest.$ac_ext >&5
  5485. rm -rf conftest*
  5486. { echo "configure: error: *** Unable to locate libLAS library." 1>&2; exit 1; }
  5487. fi
  5488. rm -f conftest*
  5489. fi
  5490. rm -f conftest*
  5491. LIBS=${ac_save_libs}
  5492. CFLAGS=${ac_save_cflags}
  5493. cat >> confdefs.h <<\EOF
  5494. #define HAVE_LIBLAS 1
  5495. EOF
  5496. fi
  5497. # GEOS option
  5498. echo $ac_n "checking whether to use GEOS""... $ac_c" 1>&6
  5499. echo "configure:6685: checking whether to use GEOS" >&5
  5500. GEOS_LIBS=
  5501. GGEOS_CFLAGS=
  5502. USE_GEOS=
  5503. # FIXME: "quote" $with_geos ?
  5504. if test "`basename xx/$with_geos`" = "geos-config" ; then
  5505. GEOS_CONFIG="$with_geos"
  5506. fi
  5507. if test "$with_geos" = "no" ; then
  5508. echo "$ac_t""no" 1>&6
  5509. else
  5510. echo "$ac_t""yes" 1>&6
  5511. # Extract the first word of "geos-config", so it can be a program name with args.
  5512. set dummy geos-config; ac_word=$2
  5513. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5514. echo "configure:6703: checking for $ac_word" >&5
  5515. case "$GEOS_CONFIG" in
  5516. /*)
  5517. ac_cv_path_GEOS_CONFIG="$GEOS_CONFIG" # Let the user override the test with a path.
  5518. ;;
  5519. ?:/*)
  5520. ac_cv_path_GEOS_CONFIG="$GEOS_CONFIG" # Let the user override the test with a dos path.
  5521. ;;
  5522. *)
  5523. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  5524. ac_dummy="$PATH"
  5525. for ac_dir in $ac_dummy; do
  5526. test -z "$ac_dir" && ac_dir=.
  5527. if test -f $ac_dir/$ac_word; then
  5528. ac_cv_path_GEOS_CONFIG="$ac_dir/$ac_word"
  5529. break
  5530. fi
  5531. done
  5532. IFS="$ac_save_ifs"
  5533. test -z "$ac_cv_path_GEOS_CONFIG" && ac_cv_path_GEOS_CONFIG="no"
  5534. ;;
  5535. esac
  5536. GEOS_CONFIG="$ac_cv_path_GEOS_CONFIG"
  5537. if test -n "$GEOS_CONFIG"; then
  5538. echo "$ac_t""$GEOS_CONFIG" 1>&6
  5539. else
  5540. echo "$ac_t""no" 1>&6
  5541. fi
  5542. if test "$GEOS_CONFIG" = "no" ; then
  5543. { echo "configure: error: *** couldn't find geos-config" 1>&2; exit 1; }
  5544. fi
  5545. if test "$GEOS_CONFIG" != "" ; then
  5546. GEOS_LIBS=`"$GEOS_CONFIG" --libs`
  5547. GEOS_CFLAGS=`"$GEOS_CONFIG" --cflags`
  5548. USE_GEOS=1
  5549. fi
  5550. ac_save_cppflags="$CPPFLAGS"
  5551. CPPFLAGS="$GEOS_CFLAGS $CPPFLAGS"
  5552. for ac_hdr in geos_c.h
  5553. do
  5554. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5555. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5556. echo "configure:6751: checking for $ac_hdr" >&5
  5557. cat > conftest.$ac_ext <<EOF
  5558. #line 6754 "configure"
  5559. #include "confdefs.h"
  5560. #include <$ac_hdr>
  5561. EOF
  5562. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5563. { (eval echo configure:6759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5564. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5565. if test -z "$ac_err"; then
  5566. rm -rf conftest*
  5567. eval "ac_cv_header_$ac_safe=yes"
  5568. else
  5569. echo "$ac_err" >&5
  5570. echo "configure: failed program was:" >&5
  5571. cat conftest.$ac_ext >&5
  5572. rm -rf conftest*
  5573. eval "ac_cv_header_$ac_safe=no"
  5574. fi
  5575. rm -f conftest*
  5576. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5577. echo "$ac_t""yes" 1>&6
  5578. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5579. cat >> confdefs.h <<EOF
  5580. #define $ac_tr_hdr 1
  5581. EOF
  5582. else
  5583. echo "$ac_t""no" 1>&6
  5584. { echo "configure: error: *** Unable to locate GEOS includes." 1>&2; exit 1; }
  5585. fi
  5586. done
  5587. CPPFLAGS=$ac_save_cppflags
  5588. if test "$MINGW32" = yes ; then
  5589. ac_save_ldflags="$LDFLAGS"
  5590. LDFLAGS="$GEOS_LIBS $LDFLAGS"
  5591. echo $ac_n "checking for initGEOS in -lgeos_c_i""... $ac_c" 1>&6
  5592. echo "configure:6795: checking for initGEOS in -lgeos_c_i" >&5
  5593. ac_lib_var=`echo geos_c_i'_'initGEOS | sed 'y%./+-%__p_%'`
  5594. ac_save_LIBS="$LIBS"
  5595. LIBS="-lgeos_c_i $LIBS"
  5596. cat > conftest.$ac_ext <<EOF
  5597. #line 6801 "configure"
  5598. #include "confdefs.h"
  5599. /* Override any gcc2 internal prototype to avoid an error. */
  5600. /* We use char because int might match the return type of a gcc2
  5601. builtin and then its argument prototype would still apply. */
  5602. char initGEOS();
  5603. int main() {
  5604. initGEOS()
  5605. ; return 0; }
  5606. EOF
  5607. if { (eval echo configure:6812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5608. rm -rf conftest*
  5609. eval "ac_cv_lib_$ac_lib_var=yes"
  5610. else
  5611. echo "configure: failed program was:" >&5
  5612. cat conftest.$ac_ext >&5
  5613. rm -rf conftest*
  5614. eval "ac_cv_lib_$ac_lib_var=no"
  5615. fi
  5616. rm -f conftest*
  5617. LIBS="$ac_save_LIBS"
  5618. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5619. echo "$ac_t""yes" 1>&6
  5620. GEOS_LIBS="$GEOS_LIBS -lgeos_c_i "
  5621. else
  5622. echo "$ac_t""no" 1>&6
  5623. LDFLAGS=${ac_save_ldflags}
  5624. { echo "configure: error: *** Unable to locate GEOS library." 1>&2; exit 1; }
  5625. fi
  5626. LDFLAGS=${ac_save_ldflags}
  5627. else
  5628. ac_save_ldflags="$LDFLAGS"
  5629. LDFLAGS="$GEOS_LIBS $LDFLAGS"
  5630. echo $ac_n "checking for initGEOS in -lgeos_c""... $ac_c" 1>&6
  5631. echo "configure:6848: checking for initGEOS in -lgeos_c" >&5
  5632. ac_lib_var=`echo geos_c'_'initGEOS | sed 'y%./+-%__p_%'`
  5633. ac_save_LIBS="$LIBS"
  5634. LIBS="-lgeos_c $LIBS"
  5635. cat > conftest.$ac_ext <<EOF
  5636. #line 6854 "configure"
  5637. #include "confdefs.h"
  5638. /* Override any gcc2 internal prototype to avoid an error. */
  5639. /* We use char because int might match the return type of a gcc2
  5640. builtin and then its argument prototype would still apply. */
  5641. char initGEOS();
  5642. int main() {
  5643. initGEOS()
  5644. ; return 0; }
  5645. EOF
  5646. if { (eval echo configure:6865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5647. rm -rf conftest*
  5648. eval "ac_cv_lib_$ac_lib_var=yes"
  5649. else
  5650. echo "configure: failed program was:" >&5
  5651. cat conftest.$ac_ext >&5
  5652. rm -rf conftest*
  5653. eval "ac_cv_lib_$ac_lib_var=no"
  5654. fi
  5655. rm -f conftest*
  5656. LIBS="$ac_save_LIBS"
  5657. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5658. echo "$ac_t""yes" 1>&6
  5659. GEOS_LIBS="$GEOS_LIBS -lgeos_c "
  5660. else
  5661. echo "$ac_t""no" 1>&6
  5662. LDFLAGS=${ac_save_ldflags}
  5663. { echo "configure: error: *** Unable to locate GEOS library." 1>&2; exit 1; }
  5664. fi
  5665. LDFLAGS=${ac_save_ldflags}
  5666. fi
  5667. cat >> confdefs.h <<\EOF
  5668. #define HAVE_GEOS 1
  5669. EOF
  5670. fi
  5671. # Enable TIFF option
  5672. echo $ac_n "checking whether to use TIFF""... $ac_c" 1>&6
  5673. echo "configure:6909: checking whether to use TIFF" >&5
  5674. echo "$ac_t"""$with_tiff"" 1>&6
  5675. case "$with_tiff" in
  5676. "no") USE_TIFF= ;;
  5677. "yes") USE_TIFF="1" ;;
  5678. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  5679. esac
  5680. TIFF_INCLUDE_DIRS=
  5681. TIFF_LIBRARY_DIRS=
  5682. TIFFLIB=
  5683. if test -n "$USE_TIFF"; then
  5684. # With TIFF includes directory
  5685. echo $ac_n "checking for location of TIFF includes""... $ac_c" 1>&6
  5686. echo "configure:6929: checking for location of TIFF includes" >&5
  5687. case "$with_tiff_includes" in
  5688. y | ye | yes | n | no)
  5689. { echo "configure: error: *** You must supply a directory to --with-tiff-includes." 1>&2; exit 1; }
  5690. ;;
  5691. esac
  5692. echo "$ac_t""$with_tiff_includes" 1>&6
  5693. if test -n "$with_tiff_includes" ; then
  5694. for dir in $with_tiff_includes; do
  5695. if test -d "$dir"; then
  5696. TIFF_INCLUDE_DIRS="$TIFF_INCLUDE_DIRS -I$dir"
  5697. else
  5698. { echo "configure: error: *** TIFF includes directory $dir does not exist." 1>&2; exit 1; }
  5699. fi
  5700. done
  5701. fi
  5702. ac_save_cppflags="$CPPFLAGS"
  5703. CPPFLAGS="$TIFF_INCLUDE_DIRS $CPPFLAGS"
  5704. for ac_hdr in tiffio.h
  5705. do
  5706. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5707. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5708. echo "configure:6955: checking for $ac_hdr" >&5
  5709. cat > conftest.$ac_ext <<EOF
  5710. #line 6958 "configure"
  5711. #include "confdefs.h"
  5712. #include <$ac_hdr>
  5713. EOF
  5714. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5715. { (eval echo configure:6963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5716. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5717. if test -z "$ac_err"; then
  5718. rm -rf conftest*
  5719. eval "ac_cv_header_$ac_safe=yes"
  5720. else
  5721. echo "$ac_err" >&5
  5722. echo "configure: failed program was:" >&5
  5723. cat conftest.$ac_ext >&5
  5724. rm -rf conftest*
  5725. eval "ac_cv_header_$ac_safe=no"
  5726. fi
  5727. rm -f conftest*
  5728. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5729. echo "$ac_t""yes" 1>&6
  5730. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5731. cat >> confdefs.h <<EOF
  5732. #define $ac_tr_hdr 1
  5733. EOF
  5734. else
  5735. echo "$ac_t""no" 1>&6
  5736. { echo "configure: error: *** Unable to locate TIFF includes." 1>&2; exit 1; }
  5737. fi
  5738. done
  5739. CPPFLAGS=$ac_save_cppflags
  5740. # With TIFF library directory
  5741. echo $ac_n "checking for location of TIFF library""... $ac_c" 1>&6
  5742. echo "configure:6997: checking for location of TIFF library" >&5
  5743. case "$with_tiff_libs" in
  5744. y | ye | yes | n | no)
  5745. { echo "configure: error: *** You must supply a directory to --with-tiff-libs." 1>&2; exit 1; }
  5746. ;;
  5747. esac
  5748. echo "$ac_t""$with_tiff_libs" 1>&6
  5749. if test -n "$with_tiff_libs"; then
  5750. for dir in $with_tiff_libs; do
  5751. if test -d "$dir"; then
  5752. TIFF_LIBRARY_DIRS="$TIFF_LIBRARY_DIRS -L$dir"
  5753. else
  5754. { echo "configure: error: *** TIFF library directory $dir does not exist." 1>&2; exit 1; }
  5755. fi
  5756. done
  5757. fi
  5758. ac_save_ldflags="$LDFLAGS"
  5759. LDFLAGS="$TIFF_LIBRARY_DIRS $LDFLAGS"
  5760. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5761. echo "configure:7028: checking for TIFFOpen in -ltiff" >&5
  5762. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5763. ac_save_LIBS="$LIBS"
  5764. LIBS="-ltiff $LIBS"
  5765. cat > conftest.$ac_ext <<EOF
  5766. #line 7034 "configure"
  5767. #include "confdefs.h"
  5768. /* Override any gcc2 internal prototype to avoid an error. */
  5769. /* We use char because int might match the return type of a gcc2
  5770. builtin and then its argument prototype would still apply. */
  5771. char TIFFOpen();
  5772. int main() {
  5773. TIFFOpen()
  5774. ; return 0; }
  5775. EOF
  5776. if { (eval echo configure:7045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5777. rm -rf conftest*
  5778. eval "ac_cv_lib_$ac_lib_var=yes"
  5779. else
  5780. echo "configure: failed program was:" >&5
  5781. cat conftest.$ac_ext >&5
  5782. rm -rf conftest*
  5783. eval "ac_cv_lib_$ac_lib_var=no"
  5784. fi
  5785. rm -f conftest*
  5786. LIBS="$ac_save_LIBS"
  5787. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5788. echo "$ac_t""yes" 1>&6
  5789. TIFFLIB="$TIFFLIB -ltiff "
  5790. else
  5791. echo "$ac_t""no" 1>&6
  5792. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5793. echo "configure:7064: checking for TIFFOpen in -ltiff" >&5
  5794. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5795. ac_save_LIBS="$LIBS"
  5796. LIBS="-ltiff $MATHLIB $LIBS"
  5797. cat > conftest.$ac_ext <<EOF
  5798. #line 7070 "configure"
  5799. #include "confdefs.h"
  5800. /* Override any gcc2 internal prototype to avoid an error. */
  5801. /* We use char because int might match the return type of a gcc2
  5802. builtin and then its argument prototype would still apply. */
  5803. char TIFFOpen();
  5804. int main() {
  5805. TIFFOpen()
  5806. ; return 0; }
  5807. EOF
  5808. if { (eval echo configure:7081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5809. rm -rf conftest*
  5810. eval "ac_cv_lib_$ac_lib_var=yes"
  5811. else
  5812. echo "configure: failed program was:" >&5
  5813. cat conftest.$ac_ext >&5
  5814. rm -rf conftest*
  5815. eval "ac_cv_lib_$ac_lib_var=no"
  5816. fi
  5817. rm -f conftest*
  5818. LIBS="$ac_save_LIBS"
  5819. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5820. echo "$ac_t""yes" 1>&6
  5821. TIFFLIB="$TIFFLIB -ltiff $MATHLIB"
  5822. else
  5823. echo "$ac_t""no" 1>&6
  5824. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5825. echo "configure:7100: checking for TIFFOpen in -ltiff" >&5
  5826. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5827. ac_save_LIBS="$LIBS"
  5828. LIBS="-ltiff $ZLIB $LIBS"
  5829. cat > conftest.$ac_ext <<EOF
  5830. #line 7106 "configure"
  5831. #include "confdefs.h"
  5832. /* Override any gcc2 internal prototype to avoid an error. */
  5833. /* We use char because int might match the return type of a gcc2
  5834. builtin and then its argument prototype would still apply. */
  5835. char TIFFOpen();
  5836. int main() {
  5837. TIFFOpen()
  5838. ; return 0; }
  5839. EOF
  5840. if { (eval echo configure:7117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5841. rm -rf conftest*
  5842. eval "ac_cv_lib_$ac_lib_var=yes"
  5843. else
  5844. echo "configure: failed program was:" >&5
  5845. cat conftest.$ac_ext >&5
  5846. rm -rf conftest*
  5847. eval "ac_cv_lib_$ac_lib_var=no"
  5848. fi
  5849. rm -f conftest*
  5850. LIBS="$ac_save_LIBS"
  5851. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5852. echo "$ac_t""yes" 1>&6
  5853. TIFFLIB="$TIFFLIB -ltiff $ZLIB"
  5854. else
  5855. echo "$ac_t""no" 1>&6
  5856. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5857. echo "configure:7136: checking for TIFFOpen in -ltiff" >&5
  5858. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5859. ac_save_LIBS="$LIBS"
  5860. LIBS="-ltiff $ZLIB $MATHLIB $LIBS"
  5861. cat > conftest.$ac_ext <<EOF
  5862. #line 7142 "configure"
  5863. #include "confdefs.h"
  5864. /* Override any gcc2 internal prototype to avoid an error. */
  5865. /* We use char because int might match the return type of a gcc2
  5866. builtin and then its argument prototype would still apply. */
  5867. char TIFFOpen();
  5868. int main() {
  5869. TIFFOpen()
  5870. ; return 0; }
  5871. EOF
  5872. if { (eval echo configure:7153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5873. rm -rf conftest*
  5874. eval "ac_cv_lib_$ac_lib_var=yes"
  5875. else
  5876. echo "configure: failed program was:" >&5
  5877. cat conftest.$ac_ext >&5
  5878. rm -rf conftest*
  5879. eval "ac_cv_lib_$ac_lib_var=no"
  5880. fi
  5881. rm -f conftest*
  5882. LIBS="$ac_save_LIBS"
  5883. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5884. echo "$ac_t""yes" 1>&6
  5885. TIFFLIB="$TIFFLIB -ltiff $ZLIB $MATHLIB"
  5886. else
  5887. echo "$ac_t""no" 1>&6
  5888. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5889. echo "configure:7172: checking for TIFFOpen in -ltiff" >&5
  5890. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5891. ac_save_LIBS="$LIBS"
  5892. LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $LIBS"
  5893. cat > conftest.$ac_ext <<EOF
  5894. #line 7178 "configure"
  5895. #include "confdefs.h"
  5896. /* Override any gcc2 internal prototype to avoid an error. */
  5897. /* We use char because int might match the return type of a gcc2
  5898. builtin and then its argument prototype would still apply. */
  5899. char TIFFOpen();
  5900. int main() {
  5901. TIFFOpen()
  5902. ; return 0; }
  5903. EOF
  5904. if { (eval echo configure:7189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5905. rm -rf conftest*
  5906. eval "ac_cv_lib_$ac_lib_var=yes"
  5907. else
  5908. echo "configure: failed program was:" >&5
  5909. cat conftest.$ac_ext >&5
  5910. rm -rf conftest*
  5911. eval "ac_cv_lib_$ac_lib_var=no"
  5912. fi
  5913. rm -f conftest*
  5914. LIBS="$ac_save_LIBS"
  5915. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5916. echo "$ac_t""yes" 1>&6
  5917. TIFFLIB="$TIFFLIB -ltiff $JPEGLIBPATH $JPEGLIB"
  5918. else
  5919. echo "$ac_t""no" 1>&6
  5920. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5921. echo "configure:7208: checking for TIFFOpen in -ltiff" >&5
  5922. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5923. ac_save_LIBS="$LIBS"
  5924. LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $MATHLIB $LIBS"
  5925. cat > conftest.$ac_ext <<EOF
  5926. #line 7214 "configure"
  5927. #include "confdefs.h"
  5928. /* Override any gcc2 internal prototype to avoid an error. */
  5929. /* We use char because int might match the return type of a gcc2
  5930. builtin and then its argument prototype would still apply. */
  5931. char TIFFOpen();
  5932. int main() {
  5933. TIFFOpen()
  5934. ; return 0; }
  5935. EOF
  5936. if { (eval echo configure:7225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5937. rm -rf conftest*
  5938. eval "ac_cv_lib_$ac_lib_var=yes"
  5939. else
  5940. echo "configure: failed program was:" >&5
  5941. cat conftest.$ac_ext >&5
  5942. rm -rf conftest*
  5943. eval "ac_cv_lib_$ac_lib_var=no"
  5944. fi
  5945. rm -f conftest*
  5946. LIBS="$ac_save_LIBS"
  5947. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5948. echo "$ac_t""yes" 1>&6
  5949. TIFFLIB="$TIFFLIB -ltiff $JPEGLIBPATH $JPEGLIB $MATHLIB"
  5950. else
  5951. echo "$ac_t""no" 1>&6
  5952. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5953. echo "configure:7244: checking for TIFFOpen in -ltiff" >&5
  5954. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5955. ac_save_LIBS="$LIBS"
  5956. LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $ZLIB $LIBS"
  5957. cat > conftest.$ac_ext <<EOF
  5958. #line 7250 "configure"
  5959. #include "confdefs.h"
  5960. /* Override any gcc2 internal prototype to avoid an error. */
  5961. /* We use char because int might match the return type of a gcc2
  5962. builtin and then its argument prototype would still apply. */
  5963. char TIFFOpen();
  5964. int main() {
  5965. TIFFOpen()
  5966. ; return 0; }
  5967. EOF
  5968. if { (eval echo configure:7261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5969. rm -rf conftest*
  5970. eval "ac_cv_lib_$ac_lib_var=yes"
  5971. else
  5972. echo "configure: failed program was:" >&5
  5973. cat conftest.$ac_ext >&5
  5974. rm -rf conftest*
  5975. eval "ac_cv_lib_$ac_lib_var=no"
  5976. fi
  5977. rm -f conftest*
  5978. LIBS="$ac_save_LIBS"
  5979. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5980. echo "$ac_t""yes" 1>&6
  5981. TIFFLIB="$TIFFLIB -ltiff $JPEGLIBPATH $JPEGLIB $ZLIB"
  5982. else
  5983. echo "$ac_t""no" 1>&6
  5984. echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
  5985. echo "configure:7280: checking for TIFFOpen in -ltiff" >&5
  5986. ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
  5987. ac_save_LIBS="$LIBS"
  5988. LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $ZLIB $MATHLIB $LIBS"
  5989. cat > conftest.$ac_ext <<EOF
  5990. #line 7286 "configure"
  5991. #include "confdefs.h"
  5992. /* Override any gcc2 internal prototype to avoid an error. */
  5993. /* We use char because int might match the return type of a gcc2
  5994. builtin and then its argument prototype would still apply. */
  5995. char TIFFOpen();
  5996. int main() {
  5997. TIFFOpen()
  5998. ; return 0; }
  5999. EOF
  6000. if { (eval echo configure:7297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6001. rm -rf conftest*
  6002. eval "ac_cv_lib_$ac_lib_var=yes"
  6003. else
  6004. echo "configure: failed program was:" >&5
  6005. cat conftest.$ac_ext >&5
  6006. rm -rf conftest*
  6007. eval "ac_cv_lib_$ac_lib_var=no"
  6008. fi
  6009. rm -f conftest*
  6010. LIBS="$ac_save_LIBS"
  6011. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6012. echo "$ac_t""yes" 1>&6
  6013. TIFFLIB="$TIFFLIB -ltiff $JPEGLIBPATH $JPEGLIB $ZLIB $MATHLIB"
  6014. else
  6015. echo "$ac_t""no" 1>&6
  6016. LDFLAGS=${ac_save_ldflags}
  6017. { echo "configure: error: *** Unable to locate TIFF library." 1>&2; exit 1; }
  6018. fi
  6019. fi
  6020. fi
  6021. fi
  6022. fi
  6023. fi
  6024. fi
  6025. fi
  6026. LDFLAGS=${ac_save_ldflags}
  6027. fi # $USE_TIFF
  6028. # Done checking TIFF
  6029. # Enable PNG option
  6030. echo $ac_n "checking whether to use PNG""... $ac_c" 1>&6
  6031. echo "configure:7395: checking whether to use PNG" >&5
  6032. echo "$ac_t"""$with_png"" 1>&6
  6033. case "$with_png" in
  6034. "no") USE_PNG= ;;
  6035. "yes") USE_PNG="1" ;;
  6036. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6037. esac
  6038. PNGINC=
  6039. PNGLIB=
  6040. if test -n "$USE_PNG"; then
  6041. # With PNG includes directory
  6042. echo $ac_n "checking for location of PNG includes""... $ac_c" 1>&6
  6043. echo "configure:7414: checking for location of PNG includes" >&5
  6044. case "$with_png_includes" in
  6045. y | ye | yes | n | no)
  6046. { echo "configure: error: *** You must supply a directory to --with-png-includes." 1>&2; exit 1; }
  6047. ;;
  6048. esac
  6049. echo "$ac_t""$with_png_includes" 1>&6
  6050. if test -n "$with_png_includes" ; then
  6051. for dir in $with_png_includes; do
  6052. if test -d "$dir"; then
  6053. PNGINC="$PNGINC -I$dir"
  6054. else
  6055. { echo "configure: error: *** PNG includes directory $dir does not exist." 1>&2; exit 1; }
  6056. fi
  6057. done
  6058. fi
  6059. ac_save_cppflags="$CPPFLAGS"
  6060. CPPFLAGS="$PNGINC $CPPFLAGS"
  6061. for ac_hdr in png.h
  6062. do
  6063. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6064. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6065. echo "configure:7440: checking for $ac_hdr" >&5
  6066. cat > conftest.$ac_ext <<EOF
  6067. #line 7443 "configure"
  6068. #include "confdefs.h"
  6069. #include <$ac_hdr>
  6070. EOF
  6071. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6072. { (eval echo configure:7448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6073. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6074. if test -z "$ac_err"; then
  6075. rm -rf conftest*
  6076. eval "ac_cv_header_$ac_safe=yes"
  6077. else
  6078. echo "$ac_err" >&5
  6079. echo "configure: failed program was:" >&5
  6080. cat conftest.$ac_ext >&5
  6081. rm -rf conftest*
  6082. eval "ac_cv_header_$ac_safe=no"
  6083. fi
  6084. rm -f conftest*
  6085. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6086. echo "$ac_t""yes" 1>&6
  6087. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6088. cat >> confdefs.h <<EOF
  6089. #define $ac_tr_hdr 1
  6090. EOF
  6091. else
  6092. echo "$ac_t""no" 1>&6
  6093. { echo "configure: error: *** Unable to locate PNG includes." 1>&2; exit 1; }
  6094. fi
  6095. done
  6096. CPPFLAGS=$ac_save_cppflags
  6097. # With PNG library directory
  6098. echo $ac_n "checking for location of PNG library""... $ac_c" 1>&6
  6099. echo "configure:7482: checking for location of PNG library" >&5
  6100. case "$with_png_libs" in
  6101. y | ye | yes | n | no)
  6102. { echo "configure: error: *** You must supply a directory to --with-png-libs." 1>&2; exit 1; }
  6103. ;;
  6104. esac
  6105. echo "$ac_t""$with_png_libs" 1>&6
  6106. if test -n "$with_png_libs"; then
  6107. for dir in $with_png_libs; do
  6108. if test -d "$dir"; then
  6109. PNGLIB="$PNGLIB -L$dir"
  6110. else
  6111. { echo "configure: error: *** PNG library directory $dir does not exist." 1>&2; exit 1; }
  6112. fi
  6113. done
  6114. fi
  6115. ac_save_ldflags="$LDFLAGS"
  6116. LDFLAGS="$PNGLIB $LDFLAGS"
  6117. echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
  6118. echo "configure:7507: checking for png_read_image in -lpng" >&5
  6119. ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
  6120. ac_save_LIBS="$LIBS"
  6121. LIBS="-lpng $ZLIB $MATHLIB $LIBS"
  6122. cat > conftest.$ac_ext <<EOF
  6123. #line 7513 "configure"
  6124. #include "confdefs.h"
  6125. /* Override any gcc2 internal prototype to avoid an error. */
  6126. /* We use char because int might match the return type of a gcc2
  6127. builtin and then its argument prototype would still apply. */
  6128. char png_read_image();
  6129. int main() {
  6130. png_read_image()
  6131. ; return 0; }
  6132. EOF
  6133. if { (eval echo configure:7524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6134. rm -rf conftest*
  6135. eval "ac_cv_lib_$ac_lib_var=yes"
  6136. else
  6137. echo "configure: failed program was:" >&5
  6138. cat conftest.$ac_ext >&5
  6139. rm -rf conftest*
  6140. eval "ac_cv_lib_$ac_lib_var=no"
  6141. fi
  6142. rm -f conftest*
  6143. LIBS="$ac_save_LIBS"
  6144. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6145. echo "$ac_t""yes" 1>&6
  6146. PNGLIB="$PNGLIB -lpng $ZLIB $MATHLIB"
  6147. else
  6148. echo "$ac_t""no" 1>&6
  6149. LDFLAGS=${ac_save_ldflags}
  6150. { echo "configure: error: *** Unable to locate PNG library." 1>&2; exit 1; }
  6151. fi
  6152. LDFLAGS=${ac_save_ldflags}
  6153. fi # $USE_PNG
  6154. # Done checking PNG
  6155. # Enable PostgreSQL option
  6156. echo $ac_n "checking whether to use PostgreSQL""... $ac_c" 1>&6
  6157. echo "configure:7566: checking whether to use PostgreSQL" >&5
  6158. echo "$ac_t"""$with_postgres"" 1>&6
  6159. case "$with_postgres" in
  6160. "no") USE_POSTGRES= ;;
  6161. "yes") USE_POSTGRES="1" ;;
  6162. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6163. esac
  6164. if test -n "$USE_POSTGRES"; then
  6165. cat >> confdefs.h <<\EOF
  6166. #define HAVE_POSTGRES 1
  6167. EOF
  6168. fi # $USE_POSTGRES
  6169. PQINCPATH=
  6170. PQLIBPATH=
  6171. PQLIB=
  6172. if test -n "$USE_POSTGRES"; then
  6173. # With PostgreSQL includes directory
  6174. echo $ac_n "checking for location of PostgreSQL includes""... $ac_c" 1>&6
  6175. echo "configure:7593: checking for location of PostgreSQL includes" >&5
  6176. case "$with_postgres_includes" in
  6177. y | ye | yes | n | no)
  6178. { echo "configure: error: *** You must supply a directory to --with-postgres-includes." 1>&2; exit 1; }
  6179. ;;
  6180. esac
  6181. echo "$ac_t""$with_postgres_includes" 1>&6
  6182. if test -n "$with_postgres_includes" ; then
  6183. for dir in $with_postgres_includes; do
  6184. if test -d "$dir"; then
  6185. PQINCPATH="$PQINCPATH -I$dir"
  6186. else
  6187. { echo "configure: error: *** PostgreSQL includes directory $dir does not exist." 1>&2; exit 1; }
  6188. fi
  6189. done
  6190. fi
  6191. ac_save_cppflags="$CPPFLAGS"
  6192. CPPFLAGS="$PQINCPATH $CPPFLAGS"
  6193. for ac_hdr in libpq-fe.h
  6194. do
  6195. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6196. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6197. echo "configure:7619: checking for $ac_hdr" >&5
  6198. cat > conftest.$ac_ext <<EOF
  6199. #line 7622 "configure"
  6200. #include "confdefs.h"
  6201. #include <$ac_hdr>
  6202. EOF
  6203. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6204. { (eval echo configure:7627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6205. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6206. if test -z "$ac_err"; then
  6207. rm -rf conftest*
  6208. eval "ac_cv_header_$ac_safe=yes"
  6209. else
  6210. echo "$ac_err" >&5
  6211. echo "configure: failed program was:" >&5
  6212. cat conftest.$ac_ext >&5
  6213. rm -rf conftest*
  6214. eval "ac_cv_header_$ac_safe=no"
  6215. fi
  6216. rm -f conftest*
  6217. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6218. echo "$ac_t""yes" 1>&6
  6219. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6220. cat >> confdefs.h <<EOF
  6221. #define $ac_tr_hdr 1
  6222. EOF
  6223. else
  6224. echo "$ac_t""no" 1>&6
  6225. { echo "configure: error: *** Unable to locate PostgreSQL includes." 1>&2; exit 1; }
  6226. fi
  6227. done
  6228. CPPFLAGS=$ac_save_cppflags
  6229. fi # $USE_POSTGRES
  6230. if test -n "$USE_POSTGRES"; then
  6231. # With PostgreSQL library directory
  6232. echo $ac_n "checking for location of PostgreSQL library""... $ac_c" 1>&6
  6233. echo "configure:7665: checking for location of PostgreSQL library" >&5
  6234. case "$with_postgres_libs" in
  6235. y | ye | yes | n | no)
  6236. { echo "configure: error: *** You must supply a directory to --with-postgres-libs." 1>&2; exit 1; }
  6237. ;;
  6238. esac
  6239. echo "$ac_t""$with_postgres_libs" 1>&6
  6240. if test -n "$with_postgres_libs"; then
  6241. for dir in $with_postgres_libs; do
  6242. if test -d "$dir"; then
  6243. PQLIBPATH="$PQLIBPATH -L$dir"
  6244. else
  6245. { echo "configure: error: *** PostgreSQL library directory $dir does not exist." 1>&2; exit 1; }
  6246. fi
  6247. done
  6248. fi
  6249. ac_save_ldflags="$LDFLAGS"
  6250. LDFLAGS="$PQLIBPATH $LDFLAGS"
  6251. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6252. echo "configure:7694: checking for PQsetdbLogin in -lpq" >&5
  6253. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6254. ac_save_LIBS="$LIBS"
  6255. LIBS="-lpq $LIBS"
  6256. cat > conftest.$ac_ext <<EOF
  6257. #line 7700 "configure"
  6258. #include "confdefs.h"
  6259. /* Override any gcc2 internal prototype to avoid an error. */
  6260. /* We use char because int might match the return type of a gcc2
  6261. builtin and then its argument prototype would still apply. */
  6262. char PQsetdbLogin();
  6263. int main() {
  6264. PQsetdbLogin()
  6265. ; return 0; }
  6266. EOF
  6267. if { (eval echo configure:7711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6268. rm -rf conftest*
  6269. eval "ac_cv_lib_$ac_lib_var=yes"
  6270. else
  6271. echo "configure: failed program was:" >&5
  6272. cat conftest.$ac_ext >&5
  6273. rm -rf conftest*
  6274. eval "ac_cv_lib_$ac_lib_var=no"
  6275. fi
  6276. rm -f conftest*
  6277. LIBS="$ac_save_LIBS"
  6278. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6279. echo "$ac_t""yes" 1>&6
  6280. PQLIB="$PQLIB -lpq "
  6281. else
  6282. echo "$ac_t""no" 1>&6
  6283. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6284. echo "configure:7730: checking for PQsetdbLogin in -lpq" >&5
  6285. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6286. ac_save_LIBS="$LIBS"
  6287. LIBS="-lpq -lssl -lcrypto $LIBS"
  6288. cat > conftest.$ac_ext <<EOF
  6289. #line 7736 "configure"
  6290. #include "confdefs.h"
  6291. /* Override any gcc2 internal prototype to avoid an error. */
  6292. /* We use char because int might match the return type of a gcc2
  6293. builtin and then its argument prototype would still apply. */
  6294. char PQsetdbLogin();
  6295. int main() {
  6296. PQsetdbLogin()
  6297. ; return 0; }
  6298. EOF
  6299. if { (eval echo configure:7747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6300. rm -rf conftest*
  6301. eval "ac_cv_lib_$ac_lib_var=yes"
  6302. else
  6303. echo "configure: failed program was:" >&5
  6304. cat conftest.$ac_ext >&5
  6305. rm -rf conftest*
  6306. eval "ac_cv_lib_$ac_lib_var=no"
  6307. fi
  6308. rm -f conftest*
  6309. LIBS="$ac_save_LIBS"
  6310. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6311. echo "$ac_t""yes" 1>&6
  6312. PQLIB="$PQLIB -lpq -lssl -lcrypto"
  6313. else
  6314. echo "$ac_t""no" 1>&6
  6315. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6316. echo "configure:7766: checking for PQsetdbLogin in -lpq" >&5
  6317. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6318. ac_save_LIBS="$LIBS"
  6319. LIBS="-lpq -lcrypt $LIBS"
  6320. cat > conftest.$ac_ext <<EOF
  6321. #line 7772 "configure"
  6322. #include "confdefs.h"
  6323. /* Override any gcc2 internal prototype to avoid an error. */
  6324. /* We use char because int might match the return type of a gcc2
  6325. builtin and then its argument prototype would still apply. */
  6326. char PQsetdbLogin();
  6327. int main() {
  6328. PQsetdbLogin()
  6329. ; return 0; }
  6330. EOF
  6331. if { (eval echo configure:7783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6332. rm -rf conftest*
  6333. eval "ac_cv_lib_$ac_lib_var=yes"
  6334. else
  6335. echo "configure: failed program was:" >&5
  6336. cat conftest.$ac_ext >&5
  6337. rm -rf conftest*
  6338. eval "ac_cv_lib_$ac_lib_var=no"
  6339. fi
  6340. rm -f conftest*
  6341. LIBS="$ac_save_LIBS"
  6342. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6343. echo "$ac_t""yes" 1>&6
  6344. PQLIB="$PQLIB -lpq -lcrypt"
  6345. else
  6346. echo "$ac_t""no" 1>&6
  6347. echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
  6348. echo "configure:7802: checking for PQsetdbLogin in -lpq" >&5
  6349. ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
  6350. ac_save_LIBS="$LIBS"
  6351. LIBS="-lpq -lcrypt -lssl -lcrypto $LIBS"
  6352. cat > conftest.$ac_ext <<EOF
  6353. #line 7808 "configure"
  6354. #include "confdefs.h"
  6355. /* Override any gcc2 internal prototype to avoid an error. */
  6356. /* We use char because int might match the return type of a gcc2
  6357. builtin and then its argument prototype would still apply. */
  6358. char PQsetdbLogin();
  6359. int main() {
  6360. PQsetdbLogin()
  6361. ; return 0; }
  6362. EOF
  6363. if { (eval echo configure:7819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6364. rm -rf conftest*
  6365. eval "ac_cv_lib_$ac_lib_var=yes"
  6366. else
  6367. echo "configure: failed program was:" >&5
  6368. cat conftest.$ac_ext >&5
  6369. rm -rf conftest*
  6370. eval "ac_cv_lib_$ac_lib_var=no"
  6371. fi
  6372. rm -f conftest*
  6373. LIBS="$ac_save_LIBS"
  6374. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6375. echo "$ac_t""yes" 1>&6
  6376. PQLIB="$PQLIB -lpq -lcrypt -lssl -lcrypto"
  6377. else
  6378. echo "$ac_t""no" 1>&6
  6379. LDFLAGS=${ac_save_ldflags}
  6380. { echo "configure: error: *** Unable to locate PostgreSQL library." 1>&2; exit 1; }
  6381. fi
  6382. fi
  6383. fi
  6384. fi
  6385. LDFLAGS=${ac_save_ldflags}
  6386. ac_save_ldflags="$LDFLAGS"
  6387. LDFLAGS="$LDFLAGS $PQLIBPATH"
  6388. echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
  6389. echo "configure:7876: checking for PQcmdTuples in -lpq" >&5
  6390. ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
  6391. ac_save_LIBS="$LIBS"
  6392. LIBS="-lpq $LIBS"
  6393. cat > conftest.$ac_ext <<EOF
  6394. #line 7882 "configure"
  6395. #include "confdefs.h"
  6396. /* Override any gcc2 internal prototype to avoid an error. */
  6397. /* We use char because int might match the return type of a gcc2
  6398. builtin and then its argument prototype would still apply. */
  6399. char PQcmdTuples();
  6400. int main() {
  6401. PQcmdTuples()
  6402. ; return 0; }
  6403. EOF
  6404. if { (eval echo configure:7893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6405. rm -rf conftest*
  6406. eval "ac_cv_lib_$ac_lib_var=yes"
  6407. else
  6408. echo "configure: failed program was:" >&5
  6409. cat conftest.$ac_ext >&5
  6410. rm -rf conftest*
  6411. eval "ac_cv_lib_$ac_lib_var=no"
  6412. fi
  6413. rm -f conftest*
  6414. LIBS="$ac_save_LIBS"
  6415. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6416. echo "$ac_t""yes" 1>&6
  6417. cat >> confdefs.h <<\EOF
  6418. #define HAVE_PQCMDTUPLES 1
  6419. EOF
  6420. else
  6421. echo "$ac_t""no" 1>&6
  6422. echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
  6423. echo "configure:7915: checking for PQcmdTuples in -lpq" >&5
  6424. ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
  6425. ac_save_LIBS="$LIBS"
  6426. LIBS="-lpq -lcrypt $LIBS"
  6427. cat > conftest.$ac_ext <<EOF
  6428. #line 7921 "configure"
  6429. #include "confdefs.h"
  6430. /* Override any gcc2 internal prototype to avoid an error. */
  6431. /* We use char because int might match the return type of a gcc2
  6432. builtin and then its argument prototype would still apply. */
  6433. char PQcmdTuples();
  6434. int main() {
  6435. PQcmdTuples()
  6436. ; return 0; }
  6437. EOF
  6438. if { (eval echo configure:7932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6439. rm -rf conftest*
  6440. eval "ac_cv_lib_$ac_lib_var=yes"
  6441. else
  6442. echo "configure: failed program was:" >&5
  6443. cat conftest.$ac_ext >&5
  6444. rm -rf conftest*
  6445. eval "ac_cv_lib_$ac_lib_var=no"
  6446. fi
  6447. rm -f conftest*
  6448. LIBS="$ac_save_LIBS"
  6449. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6450. echo "$ac_t""yes" 1>&6
  6451. cat >> confdefs.h <<\EOF
  6452. #define HAVE_PQCMDTUPLES 1
  6453. EOF
  6454. else
  6455. echo "$ac_t""no" 1>&6
  6456. fi
  6457. fi
  6458. LDFLAGS="${ac_save_ldflags}"
  6459. fi # $USE_POSTGRES
  6460. # Done checking PostgreSQL
  6461. # Enable MySQL option
  6462. echo $ac_n "checking whether to use MySQL""... $ac_c" 1>&6
  6463. echo "configure:7975: checking whether to use MySQL" >&5
  6464. echo "$ac_t"""$with_mysql"" 1>&6
  6465. case "$with_mysql" in
  6466. "no") USE_MYSQL= ;;
  6467. "yes") USE_MYSQL="1" ;;
  6468. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6469. esac
  6470. MYSQLINCPATH=
  6471. MYSQLLIBPATH=
  6472. MYSQLLIB=
  6473. if test -n "$USE_MYSQL"; then
  6474. # With MySQL includes directory
  6475. echo $ac_n "checking for location of MySQL includes""... $ac_c" 1>&6
  6476. echo "configure:7995: checking for location of MySQL includes" >&5
  6477. case "$with_mysql_includes" in
  6478. y | ye | yes | n | no)
  6479. { echo "configure: error: *** You must supply a directory to --with-mysql-includes." 1>&2; exit 1; }
  6480. ;;
  6481. esac
  6482. echo "$ac_t""$with_mysql_includes" 1>&6
  6483. if test -n "$with_mysql_includes" ; then
  6484. for dir in $with_mysql_includes; do
  6485. if test -d "$dir"; then
  6486. MYSQLINCPATH="$MYSQLINCPATH -I$dir"
  6487. else
  6488. { echo "configure: error: *** MySQL includes directory $dir does not exist." 1>&2; exit 1; }
  6489. fi
  6490. done
  6491. fi
  6492. ac_save_cppflags="$CPPFLAGS"
  6493. CPPFLAGS="$MYSQLINCPATH $CPPFLAGS"
  6494. for ac_hdr in mysql.h
  6495. do
  6496. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6497. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6498. echo "configure:8021: checking for $ac_hdr" >&5
  6499. cat > conftest.$ac_ext <<EOF
  6500. #line 8024 "configure"
  6501. #include "confdefs.h"
  6502. #include <$ac_hdr>
  6503. EOF
  6504. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6505. { (eval echo configure:8029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6506. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6507. if test -z "$ac_err"; then
  6508. rm -rf conftest*
  6509. eval "ac_cv_header_$ac_safe=yes"
  6510. else
  6511. echo "$ac_err" >&5
  6512. echo "configure: failed program was:" >&5
  6513. cat conftest.$ac_ext >&5
  6514. rm -rf conftest*
  6515. eval "ac_cv_header_$ac_safe=no"
  6516. fi
  6517. rm -f conftest*
  6518. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6519. echo "$ac_t""yes" 1>&6
  6520. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6521. cat >> confdefs.h <<EOF
  6522. #define $ac_tr_hdr 1
  6523. EOF
  6524. else
  6525. echo "$ac_t""no" 1>&6
  6526. { echo "configure: error: *** Unable to locate MySQL includes." 1>&2; exit 1; }
  6527. fi
  6528. done
  6529. CPPFLAGS=$ac_save_cppflags
  6530. fi # $USE_MYSQL
  6531. if test -n "$USE_MYSQL"; then
  6532. # With MySQL library directory
  6533. echo $ac_n "checking for location of MySQL library""... $ac_c" 1>&6
  6534. echo "configure:8066: checking for location of MySQL library" >&5
  6535. case "$with_mysql_libs" in
  6536. y | ye | yes | n | no)
  6537. { echo "configure: error: *** You must supply a directory to --with-mysql-libs." 1>&2; exit 1; }
  6538. ;;
  6539. esac
  6540. echo "$ac_t""$with_mysql_libs" 1>&6
  6541. if test -n "$with_mysql_libs"; then
  6542. for dir in $with_mysql_libs; do
  6543. if test -d "$dir"; then
  6544. MYSQLLIBPATH="$MYSQLLIBPATH -L$dir"
  6545. else
  6546. { echo "configure: error: *** MySQL library directory $dir does not exist." 1>&2; exit 1; }
  6547. fi
  6548. done
  6549. fi
  6550. ac_save_ldflags="$LDFLAGS"
  6551. LDFLAGS="$MYSQLLIBPATH $LDFLAGS"
  6552. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6553. echo "configure:8097: checking for mysql_query in -lmysqlclient" >&5
  6554. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6555. ac_save_LIBS="$LIBS"
  6556. LIBS="-lmysqlclient $LIBS"
  6557. cat > conftest.$ac_ext <<EOF
  6558. #line 8103 "configure"
  6559. #include "confdefs.h"
  6560. /* Override any gcc2 internal prototype to avoid an error. */
  6561. /* We use char because int might match the return type of a gcc2
  6562. builtin and then its argument prototype would still apply. */
  6563. char mysql_query();
  6564. int main() {
  6565. mysql_query()
  6566. ; return 0; }
  6567. EOF
  6568. if { (eval echo configure:8114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6569. rm -rf conftest*
  6570. eval "ac_cv_lib_$ac_lib_var=yes"
  6571. else
  6572. echo "configure: failed program was:" >&5
  6573. cat conftest.$ac_ext >&5
  6574. rm -rf conftest*
  6575. eval "ac_cv_lib_$ac_lib_var=no"
  6576. fi
  6577. rm -f conftest*
  6578. LIBS="$ac_save_LIBS"
  6579. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6580. echo "$ac_t""yes" 1>&6
  6581. MYSQLLIB="$MYSQLLIB -lmysqlclient "
  6582. else
  6583. echo "$ac_t""no" 1>&6
  6584. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6585. echo "configure:8133: checking for mysql_query in -lmysqlclient" >&5
  6586. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6587. ac_save_LIBS="$LIBS"
  6588. LIBS="-lmysqlclient $MATHLIB $LIBS"
  6589. cat > conftest.$ac_ext <<EOF
  6590. #line 8139 "configure"
  6591. #include "confdefs.h"
  6592. /* Override any gcc2 internal prototype to avoid an error. */
  6593. /* We use char because int might match the return type of a gcc2
  6594. builtin and then its argument prototype would still apply. */
  6595. char mysql_query();
  6596. int main() {
  6597. mysql_query()
  6598. ; return 0; }
  6599. EOF
  6600. if { (eval echo configure:8150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6601. rm -rf conftest*
  6602. eval "ac_cv_lib_$ac_lib_var=yes"
  6603. else
  6604. echo "configure: failed program was:" >&5
  6605. cat conftest.$ac_ext >&5
  6606. rm -rf conftest*
  6607. eval "ac_cv_lib_$ac_lib_var=no"
  6608. fi
  6609. rm -f conftest*
  6610. LIBS="$ac_save_LIBS"
  6611. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6612. echo "$ac_t""yes" 1>&6
  6613. MYSQLLIB="$MYSQLLIB -lmysqlclient $MATHLIB"
  6614. else
  6615. echo "$ac_t""no" 1>&6
  6616. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6617. echo "configure:8169: checking for mysql_query in -lmysqlclient" >&5
  6618. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6619. ac_save_LIBS="$LIBS"
  6620. LIBS="-lmysqlclient $SOCKLIB $LIBS"
  6621. cat > conftest.$ac_ext <<EOF
  6622. #line 8175 "configure"
  6623. #include "confdefs.h"
  6624. /* Override any gcc2 internal prototype to avoid an error. */
  6625. /* We use char because int might match the return type of a gcc2
  6626. builtin and then its argument prototype would still apply. */
  6627. char mysql_query();
  6628. int main() {
  6629. mysql_query()
  6630. ; return 0; }
  6631. EOF
  6632. if { (eval echo configure:8186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6633. rm -rf conftest*
  6634. eval "ac_cv_lib_$ac_lib_var=yes"
  6635. else
  6636. echo "configure: failed program was:" >&5
  6637. cat conftest.$ac_ext >&5
  6638. rm -rf conftest*
  6639. eval "ac_cv_lib_$ac_lib_var=no"
  6640. fi
  6641. rm -f conftest*
  6642. LIBS="$ac_save_LIBS"
  6643. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6644. echo "$ac_t""yes" 1>&6
  6645. MYSQLLIB="$MYSQLLIB -lmysqlclient $SOCKLIB"
  6646. else
  6647. echo "$ac_t""no" 1>&6
  6648. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6649. echo "configure:8205: checking for mysql_query in -lmysqlclient" >&5
  6650. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6651. ac_save_LIBS="$LIBS"
  6652. LIBS="-lmysqlclient $SOCKLIB $MATHLIB $LIBS"
  6653. cat > conftest.$ac_ext <<EOF
  6654. #line 8211 "configure"
  6655. #include "confdefs.h"
  6656. /* Override any gcc2 internal prototype to avoid an error. */
  6657. /* We use char because int might match the return type of a gcc2
  6658. builtin and then its argument prototype would still apply. */
  6659. char mysql_query();
  6660. int main() {
  6661. mysql_query()
  6662. ; return 0; }
  6663. EOF
  6664. if { (eval echo configure:8222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6665. rm -rf conftest*
  6666. eval "ac_cv_lib_$ac_lib_var=yes"
  6667. else
  6668. echo "configure: failed program was:" >&5
  6669. cat conftest.$ac_ext >&5
  6670. rm -rf conftest*
  6671. eval "ac_cv_lib_$ac_lib_var=no"
  6672. fi
  6673. rm -f conftest*
  6674. LIBS="$ac_save_LIBS"
  6675. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6676. echo "$ac_t""yes" 1>&6
  6677. MYSQLLIB="$MYSQLLIB -lmysqlclient $SOCKLIB $MATHLIB"
  6678. else
  6679. echo "$ac_t""no" 1>&6
  6680. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6681. echo "configure:8241: checking for mysql_query in -lmysqlclient" >&5
  6682. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6683. ac_save_LIBS="$LIBS"
  6684. LIBS="-lmysqlclient $ZLIB $LIBS"
  6685. cat > conftest.$ac_ext <<EOF
  6686. #line 8247 "configure"
  6687. #include "confdefs.h"
  6688. /* Override any gcc2 internal prototype to avoid an error. */
  6689. /* We use char because int might match the return type of a gcc2
  6690. builtin and then its argument prototype would still apply. */
  6691. char mysql_query();
  6692. int main() {
  6693. mysql_query()
  6694. ; return 0; }
  6695. EOF
  6696. if { (eval echo configure:8258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6697. rm -rf conftest*
  6698. eval "ac_cv_lib_$ac_lib_var=yes"
  6699. else
  6700. echo "configure: failed program was:" >&5
  6701. cat conftest.$ac_ext >&5
  6702. rm -rf conftest*
  6703. eval "ac_cv_lib_$ac_lib_var=no"
  6704. fi
  6705. rm -f conftest*
  6706. LIBS="$ac_save_LIBS"
  6707. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6708. echo "$ac_t""yes" 1>&6
  6709. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB"
  6710. else
  6711. echo "$ac_t""no" 1>&6
  6712. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6713. echo "configure:8277: checking for mysql_query in -lmysqlclient" >&5
  6714. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6715. ac_save_LIBS="$LIBS"
  6716. LIBS="-lmysqlclient $ZLIB $MATHLIB $LIBS"
  6717. cat > conftest.$ac_ext <<EOF
  6718. #line 8283 "configure"
  6719. #include "confdefs.h"
  6720. /* Override any gcc2 internal prototype to avoid an error. */
  6721. /* We use char because int might match the return type of a gcc2
  6722. builtin and then its argument prototype would still apply. */
  6723. char mysql_query();
  6724. int main() {
  6725. mysql_query()
  6726. ; return 0; }
  6727. EOF
  6728. if { (eval echo configure:8294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6729. rm -rf conftest*
  6730. eval "ac_cv_lib_$ac_lib_var=yes"
  6731. else
  6732. echo "configure: failed program was:" >&5
  6733. cat conftest.$ac_ext >&5
  6734. rm -rf conftest*
  6735. eval "ac_cv_lib_$ac_lib_var=no"
  6736. fi
  6737. rm -f conftest*
  6738. LIBS="$ac_save_LIBS"
  6739. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6740. echo "$ac_t""yes" 1>&6
  6741. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $MATHLIB"
  6742. else
  6743. echo "$ac_t""no" 1>&6
  6744. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6745. echo "configure:8313: checking for mysql_query in -lmysqlclient" >&5
  6746. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6747. ac_save_LIBS="$LIBS"
  6748. LIBS="-lmysqlclient $ZLIB $SOCKLIB $LIBS"
  6749. cat > conftest.$ac_ext <<EOF
  6750. #line 8319 "configure"
  6751. #include "confdefs.h"
  6752. /* Override any gcc2 internal prototype to avoid an error. */
  6753. /* We use char because int might match the return type of a gcc2
  6754. builtin and then its argument prototype would still apply. */
  6755. char mysql_query();
  6756. int main() {
  6757. mysql_query()
  6758. ; return 0; }
  6759. EOF
  6760. if { (eval echo configure:8330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6761. rm -rf conftest*
  6762. eval "ac_cv_lib_$ac_lib_var=yes"
  6763. else
  6764. echo "configure: failed program was:" >&5
  6765. cat conftest.$ac_ext >&5
  6766. rm -rf conftest*
  6767. eval "ac_cv_lib_$ac_lib_var=no"
  6768. fi
  6769. rm -f conftest*
  6770. LIBS="$ac_save_LIBS"
  6771. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6772. echo "$ac_t""yes" 1>&6
  6773. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $SOCKLIB"
  6774. else
  6775. echo "$ac_t""no" 1>&6
  6776. echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
  6777. echo "configure:8349: checking for mysql_query in -lmysqlclient" >&5
  6778. ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
  6779. ac_save_LIBS="$LIBS"
  6780. LIBS="-lmysqlclient $ZLIB $SOCKLIB $MATHLIB $LIBS"
  6781. cat > conftest.$ac_ext <<EOF
  6782. #line 8355 "configure"
  6783. #include "confdefs.h"
  6784. /* Override any gcc2 internal prototype to avoid an error. */
  6785. /* We use char because int might match the return type of a gcc2
  6786. builtin and then its argument prototype would still apply. */
  6787. char mysql_query();
  6788. int main() {
  6789. mysql_query()
  6790. ; return 0; }
  6791. EOF
  6792. if { (eval echo configure:8366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6793. rm -rf conftest*
  6794. eval "ac_cv_lib_$ac_lib_var=yes"
  6795. else
  6796. echo "configure: failed program was:" >&5
  6797. cat conftest.$ac_ext >&5
  6798. rm -rf conftest*
  6799. eval "ac_cv_lib_$ac_lib_var=no"
  6800. fi
  6801. rm -f conftest*
  6802. LIBS="$ac_save_LIBS"
  6803. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6804. echo "$ac_t""yes" 1>&6
  6805. MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $SOCKLIB $MATHLIB"
  6806. else
  6807. echo "$ac_t""no" 1>&6
  6808. LDFLAGS=${ac_save_ldflags}
  6809. { echo "configure: error: *** Unable to locate MySQL library." 1>&2; exit 1; }
  6810. fi
  6811. fi
  6812. fi
  6813. fi
  6814. fi
  6815. fi
  6816. fi
  6817. fi
  6818. LDFLAGS=${ac_save_ldflags}
  6819. # Check for libmysqld (for embeded version of the driver)
  6820. # Extract the first word of "mysql_config", so it can be a program name with args.
  6821. set dummy mysql_config; ac_word=$2
  6822. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  6823. echo "configure:8456: checking for $ac_word" >&5
  6824. case "$MYSQLD_CONFIG" in
  6825. /*)
  6826. ac_cv_path_MYSQLD_CONFIG="$MYSQLD_CONFIG" # Let the user override the test with a path.
  6827. ;;
  6828. ?:/*)
  6829. ac_cv_path_MYSQLD_CONFIG="$MYSQLD_CONFIG" # Let the user override the test with a dos path.
  6830. ;;
  6831. *)
  6832. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  6833. ac_dummy="$PATH"
  6834. for ac_dir in $ac_dummy; do
  6835. test -z "$ac_dir" && ac_dir=.
  6836. if test -f $ac_dir/$ac_word; then
  6837. ac_cv_path_MYSQLD_CONFIG="$ac_dir/$ac_word"
  6838. break
  6839. fi
  6840. done
  6841. IFS="$ac_save_ifs"
  6842. test -z "$ac_cv_path_MYSQLD_CONFIG" && ac_cv_path_MYSQLD_CONFIG="no"
  6843. ;;
  6844. esac
  6845. MYSQLD_CONFIG="$ac_cv_path_MYSQLD_CONFIG"
  6846. if test -n "$MYSQLD_CONFIG"; then
  6847. echo "$ac_t""$MYSQLD_CONFIG" 1>&6
  6848. else
  6849. echo "$ac_t""no" 1>&6
  6850. fi
  6851. if test "$MYSQLD_CONFIG" = "no" ; then
  6852. { echo "configure: error: *** couldn't find mysql_config" 1>&2; exit 1; }
  6853. fi
  6854. if test "$MYSQLD_CONFIG" != "" ; then
  6855. ac_ext=C
  6856. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  6857. ac_cpp='$CXXCPP $CPPFLAGS'
  6858. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  6859. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  6860. cross_compiling=$ac_cv_prog_cxx_cross
  6861. ac_save_libs="$LIBS"
  6862. MYSQLDLIB=`"$MYSQLD_CONFIG" --libmysqld-libs`
  6863. LIBS="$MYSQLDLIB $LIBS"
  6864. echo $ac_n "checking for mysql_server_init""... $ac_c" 1>&6
  6865. echo "configure:8505: checking for mysql_server_init" >&5
  6866. cat > conftest.$ac_ext <<EOF
  6867. #line 8508 "configure"
  6868. #include "confdefs.h"
  6869. /* System header to define __stub macros and hopefully few prototypes,
  6870. which can conflict with char mysql_server_init(); below. */
  6871. #include <assert.h>
  6872. /* Override any gcc2 internal prototype to avoid an error. */
  6873. #ifdef __cplusplus
  6874. extern "C"
  6875. #endif
  6876. /* We use char because int might match the return type of a gcc2
  6877. builtin and then its argument prototype would still apply. */
  6878. char mysql_server_init();
  6879. int main() {
  6880. /* The GNU C library defines this for functions which it implements
  6881. to always fail with ENOSYS. Some functions are actually named
  6882. something starting with __ and the normal name is an alias. */
  6883. #if defined (__stub_mysql_server_init) || defined (__stub___mysql_server_init)
  6884. choke me
  6885. #else
  6886. mysql_server_init();
  6887. #endif
  6888. ; return 0; }
  6889. EOF
  6890. if { (eval echo configure:8534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6891. rm -rf conftest*
  6892. eval "ac_cv_func_mysql_server_init=yes"
  6893. else
  6894. echo "configure: failed program was:" >&5
  6895. cat conftest.$ac_ext >&5
  6896. rm -rf conftest*
  6897. eval "ac_cv_func_mysql_server_init=no"
  6898. fi
  6899. rm -f conftest*
  6900. if eval "test \"`echo '$ac_cv_func_'mysql_server_init`\" = yes"; then
  6901. echo "$ac_t""yes" 1>&6
  6902. :
  6903. else
  6904. echo "$ac_t""no" 1>&6
  6905. MYSQLDLIB="";
  6906. echo "configure: warning: libmysqld not found" 1>&2
  6907. fi
  6908. LIBS=$ac_save_libs
  6909. ac_ext=c
  6910. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  6911. ac_cpp='$CPP $CPPFLAGS'
  6912. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  6913. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  6914. cross_compiling=$ac_cv_prog_cc_cross
  6915. ac_ext=c
  6916. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  6917. ac_cpp='$CPP $CPPFLAGS'
  6918. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  6919. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  6920. cross_compiling=$ac_cv_prog_cc_cross
  6921. fi
  6922. fi # $USE_MYSQL
  6923. # Done checking MySQL
  6924. # Enable SQLite option
  6925. echo $ac_n "checking whether to use SQLite""... $ac_c" 1>&6
  6926. echo "configure:8586: checking whether to use SQLite" >&5
  6927. echo "$ac_t"""$with_sqlite"" 1>&6
  6928. case "$with_sqlite" in
  6929. "no") USE_SQLITE= ;;
  6930. "yes") USE_SQLITE="1" ;;
  6931. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  6932. esac
  6933. SQLITEINCPATH=
  6934. SQLITELIBPATH=
  6935. SQLITELIB=
  6936. if test -n "$USE_SQLITE"; then
  6937. # With SQLite includes directory
  6938. echo $ac_n "checking for location of SQLite includes""... $ac_c" 1>&6
  6939. echo "configure:8606: checking for location of SQLite includes" >&5
  6940. case "$with_sqlite_includes" in
  6941. y | ye | yes | n | no)
  6942. { echo "configure: error: *** You must supply a directory to --with-sqlite-includes." 1>&2; exit 1; }
  6943. ;;
  6944. esac
  6945. echo "$ac_t""$with_sqlite_includes" 1>&6
  6946. if test -n "$with_sqlite_includes" ; then
  6947. for dir in $with_sqlite_includes; do
  6948. if test -d "$dir"; then
  6949. SQLITEINCPATH="$SQLITEINCPATH -I$dir"
  6950. else
  6951. { echo "configure: error: *** SQLite includes directory $dir does not exist." 1>&2; exit 1; }
  6952. fi
  6953. done
  6954. fi
  6955. ac_save_cppflags="$CPPFLAGS"
  6956. CPPFLAGS="$SQLITEINCPATH $CPPFLAGS"
  6957. for ac_hdr in sqlite3.h
  6958. do
  6959. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6960. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6961. echo "configure:8632: checking for $ac_hdr" >&5
  6962. cat > conftest.$ac_ext <<EOF
  6963. #line 8635 "configure"
  6964. #include "confdefs.h"
  6965. #include <$ac_hdr>
  6966. EOF
  6967. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6968. { (eval echo configure:8640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6969. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6970. if test -z "$ac_err"; then
  6971. rm -rf conftest*
  6972. eval "ac_cv_header_$ac_safe=yes"
  6973. else
  6974. echo "$ac_err" >&5
  6975. echo "configure: failed program was:" >&5
  6976. cat conftest.$ac_ext >&5
  6977. rm -rf conftest*
  6978. eval "ac_cv_header_$ac_safe=no"
  6979. fi
  6980. rm -f conftest*
  6981. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6982. echo "$ac_t""yes" 1>&6
  6983. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6984. cat >> confdefs.h <<EOF
  6985. #define $ac_tr_hdr 1
  6986. EOF
  6987. else
  6988. echo "$ac_t""no" 1>&6
  6989. { echo "configure: error: *** Unable to locate SQLite includes." 1>&2; exit 1; }
  6990. fi
  6991. done
  6992. CPPFLAGS=$ac_save_cppflags
  6993. cat >> confdefs.h <<\EOF
  6994. #define HAVE_SQLITE 1
  6995. EOF
  6996. fi # $USE_SQLITE
  6997. if test -n "$USE_SQLITE"; then
  6998. # With SQLite library directory
  6999. echo $ac_n "checking for location of SQLite library""... $ac_c" 1>&6
  7000. echo "configure:8683: checking for location of SQLite library" >&5
  7001. case "$with_sqlite_libs" in
  7002. y | ye | yes | n | no)
  7003. { echo "configure: error: *** You must supply a directory to --with-sqlite-libs." 1>&2; exit 1; }
  7004. ;;
  7005. esac
  7006. echo "$ac_t""$with_sqlite_libs" 1>&6
  7007. if test -n "$with_sqlite_libs"; then
  7008. for dir in $with_sqlite_libs; do
  7009. if test -d "$dir"; then
  7010. SQLITELIBPATH="$SQLITELIBPATH -L$dir"
  7011. else
  7012. { echo "configure: error: *** SQLite library directory $dir does not exist." 1>&2; exit 1; }
  7013. fi
  7014. done
  7015. fi
  7016. ac_save_ldflags="$LDFLAGS"
  7017. LDFLAGS="$SQLITELIBPATH $LDFLAGS"
  7018. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7019. echo "configure:8712: checking for sqlite3_open in -lsqlite3" >&5
  7020. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7021. ac_save_LIBS="$LIBS"
  7022. LIBS="-lsqlite3 $LIBS"
  7023. cat > conftest.$ac_ext <<EOF
  7024. #line 8718 "configure"
  7025. #include "confdefs.h"
  7026. /* Override any gcc2 internal prototype to avoid an error. */
  7027. /* We use char because int might match the return type of a gcc2
  7028. builtin and then its argument prototype would still apply. */
  7029. char sqlite3_open();
  7030. int main() {
  7031. sqlite3_open()
  7032. ; return 0; }
  7033. EOF
  7034. if { (eval echo configure:8729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7035. rm -rf conftest*
  7036. eval "ac_cv_lib_$ac_lib_var=yes"
  7037. else
  7038. echo "configure: failed program was:" >&5
  7039. cat conftest.$ac_ext >&5
  7040. rm -rf conftest*
  7041. eval "ac_cv_lib_$ac_lib_var=no"
  7042. fi
  7043. rm -f conftest*
  7044. LIBS="$ac_save_LIBS"
  7045. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7046. echo "$ac_t""yes" 1>&6
  7047. SQLITELIB="$SQLITELIB -lsqlite3 "
  7048. else
  7049. echo "$ac_t""no" 1>&6
  7050. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7051. echo "configure:8748: checking for sqlite3_open in -lsqlite3" >&5
  7052. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7053. ac_save_LIBS="$LIBS"
  7054. LIBS="-lsqlite3 $DLLIB $LIBS"
  7055. cat > conftest.$ac_ext <<EOF
  7056. #line 8754 "configure"
  7057. #include "confdefs.h"
  7058. /* Override any gcc2 internal prototype to avoid an error. */
  7059. /* We use char because int might match the return type of a gcc2
  7060. builtin and then its argument prototype would still apply. */
  7061. char sqlite3_open();
  7062. int main() {
  7063. sqlite3_open()
  7064. ; return 0; }
  7065. EOF
  7066. if { (eval echo configure:8765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7067. rm -rf conftest*
  7068. eval "ac_cv_lib_$ac_lib_var=yes"
  7069. else
  7070. echo "configure: failed program was:" >&5
  7071. cat conftest.$ac_ext >&5
  7072. rm -rf conftest*
  7073. eval "ac_cv_lib_$ac_lib_var=no"
  7074. fi
  7075. rm -f conftest*
  7076. LIBS="$ac_save_LIBS"
  7077. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7078. echo "$ac_t""yes" 1>&6
  7079. SQLITELIB="$SQLITELIB -lsqlite3 $DLLIB"
  7080. else
  7081. echo "$ac_t""no" 1>&6
  7082. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7083. echo "configure:8784: checking for sqlite3_open in -lsqlite3" >&5
  7084. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7085. ac_save_LIBS="$LIBS"
  7086. LIBS="-lsqlite3 $MATHLIB $LIBS"
  7087. cat > conftest.$ac_ext <<EOF
  7088. #line 8790 "configure"
  7089. #include "confdefs.h"
  7090. /* Override any gcc2 internal prototype to avoid an error. */
  7091. /* We use char because int might match the return type of a gcc2
  7092. builtin and then its argument prototype would still apply. */
  7093. char sqlite3_open();
  7094. int main() {
  7095. sqlite3_open()
  7096. ; return 0; }
  7097. EOF
  7098. if { (eval echo configure:8801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7099. rm -rf conftest*
  7100. eval "ac_cv_lib_$ac_lib_var=yes"
  7101. else
  7102. echo "configure: failed program was:" >&5
  7103. cat conftest.$ac_ext >&5
  7104. rm -rf conftest*
  7105. eval "ac_cv_lib_$ac_lib_var=no"
  7106. fi
  7107. rm -f conftest*
  7108. LIBS="$ac_save_LIBS"
  7109. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7110. echo "$ac_t""yes" 1>&6
  7111. SQLITELIB="$SQLITELIB -lsqlite3 $MATHLIB"
  7112. else
  7113. echo "$ac_t""no" 1>&6
  7114. echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
  7115. echo "configure:8820: checking for sqlite3_open in -lsqlite3" >&5
  7116. ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
  7117. ac_save_LIBS="$LIBS"
  7118. LIBS="-lsqlite3 $MATHLIB $DLLIB $LIBS"
  7119. cat > conftest.$ac_ext <<EOF
  7120. #line 8826 "configure"
  7121. #include "confdefs.h"
  7122. /* Override any gcc2 internal prototype to avoid an error. */
  7123. /* We use char because int might match the return type of a gcc2
  7124. builtin and then its argument prototype would still apply. */
  7125. char sqlite3_open();
  7126. int main() {
  7127. sqlite3_open()
  7128. ; return 0; }
  7129. EOF
  7130. if { (eval echo configure:8837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7131. rm -rf conftest*
  7132. eval "ac_cv_lib_$ac_lib_var=yes"
  7133. else
  7134. echo "configure: failed program was:" >&5
  7135. cat conftest.$ac_ext >&5
  7136. rm -rf conftest*
  7137. eval "ac_cv_lib_$ac_lib_var=no"
  7138. fi
  7139. rm -f conftest*
  7140. LIBS="$ac_save_LIBS"
  7141. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7142. echo "$ac_t""yes" 1>&6
  7143. SQLITELIB="$SQLITELIB -lsqlite3 $MATHLIB $DLLIB"
  7144. else
  7145. echo "$ac_t""no" 1>&6
  7146. LDFLAGS=${ac_save_ldflags}
  7147. { echo "configure: error: *** Unable to locate SQLite library." 1>&2; exit 1; }
  7148. fi
  7149. fi
  7150. fi
  7151. fi
  7152. LDFLAGS=${ac_save_ldflags}
  7153. fi # $USE_SQLITE
  7154. # Done checking SQLite
  7155. # Enable FFMPEG option
  7156. echo $ac_n "checking whether to use FFMPEG""... $ac_c" 1>&6
  7157. echo "configure:8906: checking whether to use FFMPEG" >&5
  7158. echo "$ac_t"""$with_ffmpeg"" 1>&6
  7159. case "$with_ffmpeg" in
  7160. "no") USE_FFMPEG= ;;
  7161. "yes") USE_FFMPEG="1" ;;
  7162. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  7163. esac
  7164. FFMPEGINCPATH=
  7165. FFMPEGLIBPATH=
  7166. FFMPEGLIB=
  7167. if test -n "$USE_FFMPEG"; then
  7168. # With FFMPEG includes directory
  7169. echo $ac_n "checking for location of FFMPEG includes""... $ac_c" 1>&6
  7170. echo "configure:8926: checking for location of FFMPEG includes" >&5
  7171. case "$with_ffmpeg_includes" in
  7172. y | ye | yes | n | no)
  7173. { echo "configure: error: *** You must supply a directory to --with-ffmpeg-includes." 1>&2; exit 1; }
  7174. ;;
  7175. esac
  7176. echo "$ac_t""$with_ffmpeg_includes" 1>&6
  7177. if test -n "$with_ffmpeg_includes" ; then
  7178. for dir in $with_ffmpeg_includes; do
  7179. if test -d "$dir"; then
  7180. FFMPEGINCPATH="$FFMPEGINCPATH -I$dir"
  7181. else
  7182. { echo "configure: error: *** FFMPEG includes directory $dir does not exist." 1>&2; exit 1; }
  7183. fi
  7184. done
  7185. fi
  7186. ac_save_cppflags="$CPPFLAGS"
  7187. CPPFLAGS="$FFMPEGINCPATH $CPPFLAGS"
  7188. for ac_hdr in avcodec.h
  7189. do
  7190. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7191. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7192. echo "configure:8952: checking for $ac_hdr" >&5
  7193. cat > conftest.$ac_ext <<EOF
  7194. #line 8955 "configure"
  7195. #include "confdefs.h"
  7196. #include <$ac_hdr>
  7197. EOF
  7198. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7199. { (eval echo configure:8960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7200. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7201. if test -z "$ac_err"; then
  7202. rm -rf conftest*
  7203. eval "ac_cv_header_$ac_safe=yes"
  7204. else
  7205. echo "$ac_err" >&5
  7206. echo "configure: failed program was:" >&5
  7207. cat conftest.$ac_ext >&5
  7208. rm -rf conftest*
  7209. eval "ac_cv_header_$ac_safe=no"
  7210. fi
  7211. rm -f conftest*
  7212. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7213. echo "$ac_t""yes" 1>&6
  7214. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7215. cat >> confdefs.h <<EOF
  7216. #define $ac_tr_hdr 1
  7217. EOF
  7218. else
  7219. echo "$ac_t""no" 1>&6
  7220. { echo "configure: error: *** Unable to locate FFMPEG includes." 1>&2; exit 1; }
  7221. fi
  7222. done
  7223. CPPFLAGS=$ac_save_cppflags
  7224. ac_save_cppflags="$CPPFLAGS"
  7225. CPPFLAGS="$FFMPEGINCPATH $CPPFLAGS"
  7226. for ac_hdr in avformat.h
  7227. do
  7228. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7229. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7230. echo "configure:8996: checking for $ac_hdr" >&5
  7231. cat > conftest.$ac_ext <<EOF
  7232. #line 8999 "configure"
  7233. #include "confdefs.h"
  7234. #include <$ac_hdr>
  7235. EOF
  7236. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7237. { (eval echo configure:9004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7238. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7239. if test -z "$ac_err"; then
  7240. rm -rf conftest*
  7241. eval "ac_cv_header_$ac_safe=yes"
  7242. else
  7243. echo "$ac_err" >&5
  7244. echo "configure: failed program was:" >&5
  7245. cat conftest.$ac_ext >&5
  7246. rm -rf conftest*
  7247. eval "ac_cv_header_$ac_safe=no"
  7248. fi
  7249. rm -f conftest*
  7250. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7251. echo "$ac_t""yes" 1>&6
  7252. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7253. cat >> confdefs.h <<EOF
  7254. #define $ac_tr_hdr 1
  7255. EOF
  7256. else
  7257. echo "$ac_t""no" 1>&6
  7258. { echo "configure: error: *** Unable to locate FFMPEG includes." 1>&2; exit 1; }
  7259. fi
  7260. done
  7261. CPPFLAGS=$ac_save_cppflags
  7262. ac_save_cppflags="$CPPFLAGS"
  7263. CPPFLAGS="$FFMPEGINCPATH $CPPFLAGS"
  7264. for ac_hdr in swscale.h
  7265. do
  7266. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7267. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7268. echo "configure:9040: checking for $ac_hdr" >&5
  7269. cat > conftest.$ac_ext <<EOF
  7270. #line 9043 "configure"
  7271. #include "confdefs.h"
  7272. #include <$ac_hdr>
  7273. EOF
  7274. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7275. { (eval echo configure:9048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7276. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7277. if test -z "$ac_err"; then
  7278. rm -rf conftest*
  7279. eval "ac_cv_header_$ac_safe=yes"
  7280. else
  7281. echo "$ac_err" >&5
  7282. echo "configure: failed program was:" >&5
  7283. cat conftest.$ac_ext >&5
  7284. rm -rf conftest*
  7285. eval "ac_cv_header_$ac_safe=no"
  7286. fi
  7287. rm -f conftest*
  7288. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7289. echo "$ac_t""yes" 1>&6
  7290. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7291. cat >> confdefs.h <<EOF
  7292. #define $ac_tr_hdr 1
  7293. EOF
  7294. else
  7295. echo "$ac_t""no" 1>&6
  7296. { echo "configure: error: *** Unable to locate FFMPEG includes." 1>&2; exit 1; }
  7297. fi
  7298. done
  7299. CPPFLAGS=$ac_save_cppflags
  7300. cat >> confdefs.h <<\EOF
  7301. #define HAVE_FFMPEG 1
  7302. EOF
  7303. fi # $USE_FFMPEG
  7304. if test -n "$USE_FFMPEG"; then
  7305. # With FFMPEG library directory
  7306. echo $ac_n "checking for location of FFMPEG library""... $ac_c" 1>&6
  7307. echo "configure:9091: checking for location of FFMPEG library" >&5
  7308. case "$with_ffmpeg_libs" in
  7309. y | ye | yes | n | no)
  7310. { echo "configure: error: *** You must supply a directory to --with-ffmpeg-libs." 1>&2; exit 1; }
  7311. ;;
  7312. esac
  7313. echo "$ac_t""$with_ffmpeg_libs" 1>&6
  7314. if test -n "$with_ffmpeg_libs"; then
  7315. for dir in $with_ffmpeg_libs; do
  7316. if test -d "$dir"; then
  7317. FFMPEGLIBPATH="$FFMPEGLIBPATH -L$dir"
  7318. else
  7319. { echo "configure: error: *** FFMPEG library directory $dir does not exist." 1>&2; exit 1; }
  7320. fi
  7321. done
  7322. fi
  7323. ac_save_ldflags="$LDFLAGS"
  7324. LDFLAGS="$FFMPEGLIBPATH $LDFLAGS"
  7325. echo $ac_n "checking for av_free in -lavutil""... $ac_c" 1>&6
  7326. echo "configure:9118: checking for av_free in -lavutil" >&5
  7327. ac_lib_var=`echo avutil'_'av_free | sed 'y%./+-%__p_%'`
  7328. ac_save_LIBS="$LIBS"
  7329. LIBS="-lavutil $LIBS"
  7330. cat > conftest.$ac_ext <<EOF
  7331. #line 9124 "configure"
  7332. #include "confdefs.h"
  7333. /* Override any gcc2 internal prototype to avoid an error. */
  7334. /* We use char because int might match the return type of a gcc2
  7335. builtin and then its argument prototype would still apply. */
  7336. char av_free();
  7337. int main() {
  7338. av_free()
  7339. ; return 0; }
  7340. EOF
  7341. if { (eval echo configure:9135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7342. rm -rf conftest*
  7343. eval "ac_cv_lib_$ac_lib_var=yes"
  7344. else
  7345. echo "configure: failed program was:" >&5
  7346. cat conftest.$ac_ext >&5
  7347. rm -rf conftest*
  7348. eval "ac_cv_lib_$ac_lib_var=no"
  7349. fi
  7350. rm -f conftest*
  7351. LIBS="$ac_save_LIBS"
  7352. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7353. echo "$ac_t""yes" 1>&6
  7354. FFMPEGLIB="$FFMPEGLIB -lavutil "
  7355. else
  7356. echo "$ac_t""no" 1>&6
  7357. echo $ac_n "checking for av_free in -lavutil""... $ac_c" 1>&6
  7358. echo "configure:9154: checking for av_free in -lavutil" >&5
  7359. ac_lib_var=`echo avutil'_'av_free | sed 'y%./+-%__p_%'`
  7360. ac_save_LIBS="$LIBS"
  7361. LIBS="-lavutil $MATHLIB $LIBS"
  7362. cat > conftest.$ac_ext <<EOF
  7363. #line 9160 "configure"
  7364. #include "confdefs.h"
  7365. /* Override any gcc2 internal prototype to avoid an error. */
  7366. /* We use char because int might match the return type of a gcc2
  7367. builtin and then its argument prototype would still apply. */
  7368. char av_free();
  7369. int main() {
  7370. av_free()
  7371. ; return 0; }
  7372. EOF
  7373. if { (eval echo configure:9171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7374. rm -rf conftest*
  7375. eval "ac_cv_lib_$ac_lib_var=yes"
  7376. else
  7377. echo "configure: failed program was:" >&5
  7378. cat conftest.$ac_ext >&5
  7379. rm -rf conftest*
  7380. eval "ac_cv_lib_$ac_lib_var=no"
  7381. fi
  7382. rm -f conftest*
  7383. LIBS="$ac_save_LIBS"
  7384. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7385. echo "$ac_t""yes" 1>&6
  7386. FFMPEGLIB="$FFMPEGLIB -lavutil $MATHLIB"
  7387. else
  7388. echo "$ac_t""no" 1>&6
  7389. LDFLAGS=${ac_save_ldflags}
  7390. { echo "configure: error: *** Unable to locate FFMPEG library." 1>&2; exit 1; }
  7391. fi
  7392. fi
  7393. LDFLAGS=${ac_save_ldflags}
  7394. ac_save_ldflags="$LDFLAGS"
  7395. LDFLAGS="$FFMPEGLIBPATH $LDFLAGS"
  7396. echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6
  7397. echo "configure:9216: checking for avcodec_init in -lavcodec" >&5
  7398. ac_lib_var=`echo avcodec'_'avcodec_init | sed 'y%./+-%__p_%'`
  7399. ac_save_LIBS="$LIBS"
  7400. LIBS="-lavcodec $FFMPEGLIB $LIBS"
  7401. cat > conftest.$ac_ext <<EOF
  7402. #line 9222 "configure"
  7403. #include "confdefs.h"
  7404. /* Override any gcc2 internal prototype to avoid an error. */
  7405. /* We use char because int might match the return type of a gcc2
  7406. builtin and then its argument prototype would still apply. */
  7407. char avcodec_init();
  7408. int main() {
  7409. avcodec_init()
  7410. ; return 0; }
  7411. EOF
  7412. if { (eval echo configure:9233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7413. rm -rf conftest*
  7414. eval "ac_cv_lib_$ac_lib_var=yes"
  7415. else
  7416. echo "configure: failed program was:" >&5
  7417. cat conftest.$ac_ext >&5
  7418. rm -rf conftest*
  7419. eval "ac_cv_lib_$ac_lib_var=no"
  7420. fi
  7421. rm -f conftest*
  7422. LIBS="$ac_save_LIBS"
  7423. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7424. echo "$ac_t""yes" 1>&6
  7425. FFMPEGLIB="$FFMPEGLIB -lavcodec "
  7426. else
  7427. echo "$ac_t""no" 1>&6
  7428. echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6
  7429. echo "configure:9252: checking for avcodec_init in -lavcodec" >&5
  7430. ac_lib_var=`echo avcodec'_'avcodec_init | sed 'y%./+-%__p_%'`
  7431. ac_save_LIBS="$LIBS"
  7432. LIBS="-lavcodec $FFMPEGLIB $MATHLIB $LIBS"
  7433. cat > conftest.$ac_ext <<EOF
  7434. #line 9258 "configure"
  7435. #include "confdefs.h"
  7436. /* Override any gcc2 internal prototype to avoid an error. */
  7437. /* We use char because int might match the return type of a gcc2
  7438. builtin and then its argument prototype would still apply. */
  7439. char avcodec_init();
  7440. int main() {
  7441. avcodec_init()
  7442. ; return 0; }
  7443. EOF
  7444. if { (eval echo configure:9269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7445. rm -rf conftest*
  7446. eval "ac_cv_lib_$ac_lib_var=yes"
  7447. else
  7448. echo "configure: failed program was:" >&5
  7449. cat conftest.$ac_ext >&5
  7450. rm -rf conftest*
  7451. eval "ac_cv_lib_$ac_lib_var=no"
  7452. fi
  7453. rm -f conftest*
  7454. LIBS="$ac_save_LIBS"
  7455. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7456. echo "$ac_t""yes" 1>&6
  7457. FFMPEGLIB="$FFMPEGLIB -lavcodec $MATHLIB"
  7458. else
  7459. echo "$ac_t""no" 1>&6
  7460. LDFLAGS=${ac_save_ldflags}
  7461. { echo "configure: error: *** Unable to locate FFMPEG library." 1>&2; exit 1; }
  7462. fi
  7463. fi
  7464. LDFLAGS=${ac_save_ldflags}
  7465. ac_save_ldflags="$LDFLAGS"
  7466. LDFLAGS="$FFMPEGLIBPATH $LDFLAGS"
  7467. echo $ac_n "checking for av_set_parameters in -lavformat""... $ac_c" 1>&6
  7468. echo "configure:9314: checking for av_set_parameters in -lavformat" >&5
  7469. ac_lib_var=`echo avformat'_'av_set_parameters | sed 'y%./+-%__p_%'`
  7470. ac_save_LIBS="$LIBS"
  7471. LIBS="-lavformat $FFMPEGLIB $LIBS"
  7472. cat > conftest.$ac_ext <<EOF
  7473. #line 9320 "configure"
  7474. #include "confdefs.h"
  7475. /* Override any gcc2 internal prototype to avoid an error. */
  7476. /* We use char because int might match the return type of a gcc2
  7477. builtin and then its argument prototype would still apply. */
  7478. char av_set_parameters();
  7479. int main() {
  7480. av_set_parameters()
  7481. ; return 0; }
  7482. EOF
  7483. if { (eval echo configure:9331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7484. rm -rf conftest*
  7485. eval "ac_cv_lib_$ac_lib_var=yes"
  7486. else
  7487. echo "configure: failed program was:" >&5
  7488. cat conftest.$ac_ext >&5
  7489. rm -rf conftest*
  7490. eval "ac_cv_lib_$ac_lib_var=no"
  7491. fi
  7492. rm -f conftest*
  7493. LIBS="$ac_save_LIBS"
  7494. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7495. echo "$ac_t""yes" 1>&6
  7496. FFMPEGLIB="$FFMPEGLIB -lavformat "
  7497. else
  7498. echo "$ac_t""no" 1>&6
  7499. echo $ac_n "checking for av_set_parameters in -lavformat""... $ac_c" 1>&6
  7500. echo "configure:9350: checking for av_set_parameters in -lavformat" >&5
  7501. ac_lib_var=`echo avformat'_'av_set_parameters | sed 'y%./+-%__p_%'`
  7502. ac_save_LIBS="$LIBS"
  7503. LIBS="-lavformat $FFMPEGLIB $MATHLIB $LIBS"
  7504. cat > conftest.$ac_ext <<EOF
  7505. #line 9356 "configure"
  7506. #include "confdefs.h"
  7507. /* Override any gcc2 internal prototype to avoid an error. */
  7508. /* We use char because int might match the return type of a gcc2
  7509. builtin and then its argument prototype would still apply. */
  7510. char av_set_parameters();
  7511. int main() {
  7512. av_set_parameters()
  7513. ; return 0; }
  7514. EOF
  7515. if { (eval echo configure:9367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7516. rm -rf conftest*
  7517. eval "ac_cv_lib_$ac_lib_var=yes"
  7518. else
  7519. echo "configure: failed program was:" >&5
  7520. cat conftest.$ac_ext >&5
  7521. rm -rf conftest*
  7522. eval "ac_cv_lib_$ac_lib_var=no"
  7523. fi
  7524. rm -f conftest*
  7525. LIBS="$ac_save_LIBS"
  7526. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7527. echo "$ac_t""yes" 1>&6
  7528. FFMPEGLIB="$FFMPEGLIB -lavformat $MATHLIB"
  7529. else
  7530. echo "$ac_t""no" 1>&6
  7531. LDFLAGS=${ac_save_ldflags}
  7532. { echo "configure: error: *** Unable to locate FFMPEG library." 1>&2; exit 1; }
  7533. fi
  7534. fi
  7535. LDFLAGS=${ac_save_ldflags}
  7536. fi # $USE_FFMPEG
  7537. # Done checking FFMPEG
  7538. # Enable OpenGL option
  7539. OPENGLINC=
  7540. OPENGLLIB=
  7541. OPENGLULIB=
  7542. USE_OPENGL=
  7543. OPENGL_X11=
  7544. OPENGL_AQUA=
  7545. OPENGL_WINDOWS=
  7546. echo $ac_n "checking whether to use OpenGL""... $ac_c" 1>&6
  7547. echo "configure:9426: checking whether to use OpenGL" >&5
  7548. echo "$ac_t"""$with_opengl"" 1>&6
  7549. case "$with_opengl" in
  7550. n|no)
  7551. OPENGL_TYPE=none
  7552. ;;
  7553. y|yes|x|x11|glx)
  7554. OPENGL_TYPE=X11
  7555. USE_OPENGL=1
  7556. OPENGL_X11=1
  7557. ;;
  7558. aqua|mac|osx|macosx|agl)
  7559. OPENGL_TYPE=Aqua
  7560. USE_OPENGL=1
  7561. OPENGL_AQUA=1
  7562. ;;
  7563. win|windows|mswin|wgl)
  7564. OPENGL_TYPE=Windows
  7565. USE_OPENGL=1
  7566. OPENGL_WINDOWS=1
  7567. ;;
  7568. *)
  7569. { echo "configure: error: *** Valid arguments for --with-opengl= are yes,no,x11,aqua,windows." 1>&2; exit 1; }
  7570. ;;
  7571. esac
  7572. if test -n "$USE_OPENGL" ; then
  7573. if test "$OPENGL_X11" = 1 ; then
  7574. # With OpenGL includes directory
  7575. echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
  7576. echo "configure:9460: checking for location of OpenGL includes" >&5
  7577. case "$with_opengl_includes" in
  7578. y | ye | yes | n | no)
  7579. { echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
  7580. ;;
  7581. esac
  7582. echo "$ac_t""$with_opengl_includes" 1>&6
  7583. if test -n "$with_opengl_includes" ; then
  7584. for dir in $with_opengl_includes; do
  7585. if test -d "$dir"; then
  7586. OPENGLINC="$OPENGLINC -I$dir"
  7587. else
  7588. { echo "configure: error: *** OpenGL includes directory $dir does not exist." 1>&2; exit 1; }
  7589. fi
  7590. done
  7591. fi
  7592. ac_save_cppflags="$CPPFLAGS"
  7593. CPPFLAGS="$OPENGLINC $X_CFLAGS $CPPFLAGS"
  7594. for ac_hdr in GL/gl.h GL/glu.h
  7595. do
  7596. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7597. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7598. echo "configure:9486: checking for $ac_hdr" >&5
  7599. cat > conftest.$ac_ext <<EOF
  7600. #line 9489 "configure"
  7601. #include "confdefs.h"
  7602. #include <$ac_hdr>
  7603. EOF
  7604. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7605. { (eval echo configure:9494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7606. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7607. if test -z "$ac_err"; then
  7608. rm -rf conftest*
  7609. eval "ac_cv_header_$ac_safe=yes"
  7610. else
  7611. echo "$ac_err" >&5
  7612. echo "configure: failed program was:" >&5
  7613. cat conftest.$ac_ext >&5
  7614. rm -rf conftest*
  7615. eval "ac_cv_header_$ac_safe=no"
  7616. fi
  7617. rm -f conftest*
  7618. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  7619. echo "$ac_t""yes" 1>&6
  7620. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  7621. cat >> confdefs.h <<EOF
  7622. #define $ac_tr_hdr 1
  7623. EOF
  7624. else
  7625. echo "$ac_t""no" 1>&6
  7626. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  7627. fi
  7628. done
  7629. CPPFLAGS=$ac_save_cppflags
  7630. # With OpenGL library directory
  7631. echo $ac_n "checking for location of OpenGL library""... $ac_c" 1>&6
  7632. echo "configure:9528: checking for location of OpenGL library" >&5
  7633. case "$with_opengl_libs" in
  7634. y | ye | yes | n | no)
  7635. { echo "configure: error: *** You must supply a directory to --with-opengl-libs." 1>&2; exit 1; }
  7636. ;;
  7637. esac
  7638. echo "$ac_t""$with_opengl_libs" 1>&6
  7639. if test -n "$with_opengl_libs"; then
  7640. for dir in $with_opengl_libs; do
  7641. if test -d "$dir"; then
  7642. OPENGL_LIB_PATH="$OPENGL_LIB_PATH -L$dir"
  7643. else
  7644. { echo "configure: error: *** OpenGL library directory $dir does not exist." 1>&2; exit 1; }
  7645. fi
  7646. done
  7647. fi
  7648. ac_save_ldflags="$LDFLAGS"
  7649. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  7650. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7651. echo "configure:9557: checking for glBegin in -lGL" >&5
  7652. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7653. ac_save_LIBS="$LIBS"
  7654. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
  7655. cat > conftest.$ac_ext <<EOF
  7656. #line 9563 "configure"
  7657. #include "confdefs.h"
  7658. /* Override any gcc2 internal prototype to avoid an error. */
  7659. /* We use char because int might match the return type of a gcc2
  7660. builtin and then its argument prototype would still apply. */
  7661. char glBegin();
  7662. int main() {
  7663. glBegin()
  7664. ; return 0; }
  7665. EOF
  7666. if { (eval echo configure:9574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7667. rm -rf conftest*
  7668. eval "ac_cv_lib_$ac_lib_var=yes"
  7669. else
  7670. echo "configure: failed program was:" >&5
  7671. cat conftest.$ac_ext >&5
  7672. rm -rf conftest*
  7673. eval "ac_cv_lib_$ac_lib_var=no"
  7674. fi
  7675. rm -f conftest*
  7676. LIBS="$ac_save_LIBS"
  7677. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7678. echo "$ac_t""yes" 1>&6
  7679. OPENGLLIB="$OPENGLLIB -lGL "
  7680. else
  7681. echo "$ac_t""no" 1>&6
  7682. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7683. echo "configure:9593: checking for glBegin in -lGL" >&5
  7684. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7685. ac_save_LIBS="$LIBS"
  7686. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lXext $LIBS"
  7687. cat > conftest.$ac_ext <<EOF
  7688. #line 9599 "configure"
  7689. #include "confdefs.h"
  7690. /* Override any gcc2 internal prototype to avoid an error. */
  7691. /* We use char because int might match the return type of a gcc2
  7692. builtin and then its argument prototype would still apply. */
  7693. char glBegin();
  7694. int main() {
  7695. glBegin()
  7696. ; return 0; }
  7697. EOF
  7698. if { (eval echo configure:9610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7699. rm -rf conftest*
  7700. eval "ac_cv_lib_$ac_lib_var=yes"
  7701. else
  7702. echo "configure: failed program was:" >&5
  7703. cat conftest.$ac_ext >&5
  7704. rm -rf conftest*
  7705. eval "ac_cv_lib_$ac_lib_var=no"
  7706. fi
  7707. rm -f conftest*
  7708. LIBS="$ac_save_LIBS"
  7709. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7710. echo "$ac_t""yes" 1>&6
  7711. OPENGLLIB="$OPENGLLIB -lGL -lXext"
  7712. else
  7713. echo "$ac_t""no" 1>&6
  7714. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7715. echo "configure:9629: checking for glBegin in -lGL" >&5
  7716. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7717. ac_save_LIBS="$LIBS"
  7718. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lpthread $LIBS"
  7719. cat > conftest.$ac_ext <<EOF
  7720. #line 9635 "configure"
  7721. #include "confdefs.h"
  7722. /* Override any gcc2 internal prototype to avoid an error. */
  7723. /* We use char because int might match the return type of a gcc2
  7724. builtin and then its argument prototype would still apply. */
  7725. char glBegin();
  7726. int main() {
  7727. glBegin()
  7728. ; return 0; }
  7729. EOF
  7730. if { (eval echo configure:9646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7731. rm -rf conftest*
  7732. eval "ac_cv_lib_$ac_lib_var=yes"
  7733. else
  7734. echo "configure: failed program was:" >&5
  7735. cat conftest.$ac_ext >&5
  7736. rm -rf conftest*
  7737. eval "ac_cv_lib_$ac_lib_var=no"
  7738. fi
  7739. rm -f conftest*
  7740. LIBS="$ac_save_LIBS"
  7741. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7742. echo "$ac_t""yes" 1>&6
  7743. OPENGLLIB="$OPENGLLIB -lGL -lpthread"
  7744. else
  7745. echo "$ac_t""no" 1>&6
  7746. echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
  7747. echo "configure:9665: checking for glBegin in -lGL" >&5
  7748. ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
  7749. ac_save_LIBS="$LIBS"
  7750. LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lpthread -lXext $LIBS"
  7751. cat > conftest.$ac_ext <<EOF
  7752. #line 9671 "configure"
  7753. #include "confdefs.h"
  7754. /* Override any gcc2 internal prototype to avoid an error. */
  7755. /* We use char because int might match the return type of a gcc2
  7756. builtin and then its argument prototype would still apply. */
  7757. char glBegin();
  7758. int main() {
  7759. glBegin()
  7760. ; return 0; }
  7761. EOF
  7762. if { (eval echo configure:9682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7763. rm -rf conftest*
  7764. eval "ac_cv_lib_$ac_lib_var=yes"
  7765. else
  7766. echo "configure: failed program was:" >&5
  7767. cat conftest.$ac_ext >&5
  7768. rm -rf conftest*
  7769. eval "ac_cv_lib_$ac_lib_var=no"
  7770. fi
  7771. rm -f conftest*
  7772. LIBS="$ac_save_LIBS"
  7773. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7774. echo "$ac_t""yes" 1>&6
  7775. OPENGLLIB="$OPENGLLIB -lGL -lpthread -lXext"
  7776. else
  7777. echo "$ac_t""no" 1>&6
  7778. LDFLAGS=${ac_save_ldflags}
  7779. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  7780. fi
  7781. fi
  7782. fi
  7783. fi
  7784. LDFLAGS=${ac_save_ldflags}
  7785. ac_save_ldflags="$LDFLAGS"
  7786. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  7787. echo $ac_n "checking for gluBeginCurve in -lGLU""... $ac_c" 1>&6
  7788. echo "configure:9744: checking for gluBeginCurve in -lGLU" >&5
  7789. ac_lib_var=`echo GLU'_'gluBeginCurve | sed 'y%./+-%__p_%'`
  7790. ac_save_LIBS="$LIBS"
  7791. LIBS="-lGLU $OPENGLLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
  7792. cat > conftest.$ac_ext <<EOF
  7793. #line 9750 "configure"
  7794. #include "confdefs.h"
  7795. /* Override any gcc2 internal prototype to avoid an error. */
  7796. /* We use char because int might match the return type of a gcc2
  7797. builtin and then its argument prototype would still apply. */
  7798. char gluBeginCurve();
  7799. int main() {
  7800. gluBeginCurve()
  7801. ; return 0; }
  7802. EOF
  7803. if { (eval echo configure:9761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7804. rm -rf conftest*
  7805. eval "ac_cv_lib_$ac_lib_var=yes"
  7806. else
  7807. echo "configure: failed program was:" >&5
  7808. cat conftest.$ac_ext >&5
  7809. rm -rf conftest*
  7810. eval "ac_cv_lib_$ac_lib_var=no"
  7811. fi
  7812. rm -f conftest*
  7813. LIBS="$ac_save_LIBS"
  7814. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7815. echo "$ac_t""yes" 1>&6
  7816. OPENGLULIB="$OPENGLULIB -lGLU "
  7817. else
  7818. echo "$ac_t""no" 1>&6
  7819. echo $ac_n "checking for gluBeginCurve in -lGLU""... $ac_c" 1>&6
  7820. echo "configure:9780: checking for gluBeginCurve in -lGLU" >&5
  7821. ac_lib_var=`echo GLU'_'gluBeginCurve | sed 'y%./+-%__p_%'`
  7822. ac_save_LIBS="$LIBS"
  7823. LIBS="-lGLU $OPENGLLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lstdc++ $LIBS"
  7824. cat > conftest.$ac_ext <<EOF
  7825. #line 9786 "configure"
  7826. #include "confdefs.h"
  7827. /* Override any gcc2 internal prototype to avoid an error. */
  7828. /* We use char because int might match the return type of a gcc2
  7829. builtin and then its argument prototype would still apply. */
  7830. char gluBeginCurve();
  7831. int main() {
  7832. gluBeginCurve()
  7833. ; return 0; }
  7834. EOF
  7835. if { (eval echo configure:9797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7836. rm -rf conftest*
  7837. eval "ac_cv_lib_$ac_lib_var=yes"
  7838. else
  7839. echo "configure: failed program was:" >&5
  7840. cat conftest.$ac_ext >&5
  7841. rm -rf conftest*
  7842. eval "ac_cv_lib_$ac_lib_var=no"
  7843. fi
  7844. rm -f conftest*
  7845. LIBS="$ac_save_LIBS"
  7846. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7847. echo "$ac_t""yes" 1>&6
  7848. OPENGLULIB="$OPENGLULIB -lGLU -lstdc++"
  7849. else
  7850. echo "$ac_t""no" 1>&6
  7851. LDFLAGS=${ac_save_ldflags}
  7852. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  7853. fi
  7854. fi
  7855. LDFLAGS=${ac_save_ldflags}
  7856. OPENGLLIB="$OPENGL_LIB_PATH $OPENGLLIB"
  7857. OPENGLULIB="$OPENGL_LIB_PATH $OPENGLULIB"
  7858. ac_save_libs="$LIBS"
  7859. ac_save_ldflags="$LDFLAGS"
  7860. LIBS=" $OPENGLLIB $LIBS"
  7861. LDFLAGS=" $LDFLAGS"
  7862. echo $ac_n "checking for glXCreatePbuffer""... $ac_c" 1>&6
  7863. echo "configure:9844: checking for glXCreatePbuffer" >&5
  7864. cat > conftest.$ac_ext <<EOF
  7865. #line 9847 "configure"
  7866. #include "confdefs.h"
  7867. /* System header to define __stub macros and hopefully few prototypes,
  7868. which can conflict with char glXCreatePbuffer(); below. */
  7869. #include <assert.h>
  7870. /* Override any gcc2 internal prototype to avoid an error. */
  7871. /* We use char because int might match the return type of a gcc2
  7872. builtin and then its argument prototype would still apply. */
  7873. char glXCreatePbuffer();
  7874. int main() {
  7875. /* The GNU C library defines this for functions which it implements
  7876. to always fail with ENOSYS. Some functions are actually named
  7877. something starting with __ and the normal name is an alias. */
  7878. #if defined (__stub_glXCreatePbuffer) || defined (__stub___glXCreatePbuffer)
  7879. choke me
  7880. #else
  7881. glXCreatePbuffer();
  7882. #endif
  7883. ; return 0; }
  7884. EOF
  7885. if { (eval echo configure:9870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7886. rm -rf conftest*
  7887. eval "ac_cv_func_glXCreatePbuffer=yes"
  7888. else
  7889. echo "configure: failed program was:" >&5
  7890. cat conftest.$ac_ext >&5
  7891. rm -rf conftest*
  7892. eval "ac_cv_func_glXCreatePbuffer=no"
  7893. fi
  7894. rm -f conftest*
  7895. if eval "test \"`echo '$ac_cv_func_'glXCreatePbuffer`\" = yes"; then
  7896. echo "$ac_t""yes" 1>&6
  7897. cat >> confdefs.h <<\EOF
  7898. #define HAVE_PBUFFERS 1
  7899. EOF
  7900. else
  7901. echo "$ac_t""no" 1>&6
  7902. { echo "configure: error: *** Unable to locate glXCreatePbuffer." 1>&2; exit 1; }
  7903. fi
  7904. LIBS=${ac_save_libs}
  7905. LDFLAGS=${ac_save_ldflags}
  7906. ac_save_libs="$LIBS"
  7907. ac_save_ldflags="$LDFLAGS"
  7908. LIBS=" $OPENGLLIB $LIBS"
  7909. LDFLAGS=" $LDFLAGS"
  7910. echo $ac_n "checking for glXCreateGLXPixmap""... $ac_c" 1>&6
  7911. echo "configure:9907: checking for glXCreateGLXPixmap" >&5
  7912. cat > conftest.$ac_ext <<EOF
  7913. #line 9910 "configure"
  7914. #include "confdefs.h"
  7915. /* System header to define __stub macros and hopefully few prototypes,
  7916. which can conflict with char glXCreateGLXPixmap(); below. */
  7917. #include <assert.h>
  7918. /* Override any gcc2 internal prototype to avoid an error. */
  7919. /* We use char because int might match the return type of a gcc2
  7920. builtin and then its argument prototype would still apply. */
  7921. char glXCreateGLXPixmap();
  7922. int main() {
  7923. /* The GNU C library defines this for functions which it implements
  7924. to always fail with ENOSYS. Some functions are actually named
  7925. something starting with __ and the normal name is an alias. */
  7926. #if defined (__stub_glXCreateGLXPixmap) || defined (__stub___glXCreateGLXPixmap)
  7927. choke me
  7928. #else
  7929. glXCreateGLXPixmap();
  7930. #endif
  7931. ; return 0; }
  7932. EOF
  7933. if { (eval echo configure:9933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7934. rm -rf conftest*
  7935. eval "ac_cv_func_glXCreateGLXPixmap=yes"
  7936. else
  7937. echo "configure: failed program was:" >&5
  7938. cat conftest.$ac_ext >&5
  7939. rm -rf conftest*
  7940. eval "ac_cv_func_glXCreateGLXPixmap=no"
  7941. fi
  7942. rm -f conftest*
  7943. if eval "test \"`echo '$ac_cv_func_'glXCreateGLXPixmap`\" = yes"; then
  7944. echo "$ac_t""yes" 1>&6
  7945. cat >> confdefs.h <<\EOF
  7946. #define HAVE_PIXMAPS 1
  7947. EOF
  7948. else
  7949. echo "$ac_t""no" 1>&6
  7950. { echo "configure: error: *** Unable to locate glXCreateGLXPixmap." 1>&2; exit 1; }
  7951. fi
  7952. LIBS=${ac_save_libs}
  7953. LDFLAGS=${ac_save_ldflags}
  7954. cat >> confdefs.h <<\EOF
  7955. #define OPENGL_X11 1
  7956. EOF
  7957. fi # $OPENGL_X11
  7958. if test "$OPENGL_AQUA" = 1 ; then
  7959. echo $ac_n "checking for location of OpenGL framework""... $ac_c" 1>&6
  7960. echo "configure:9976: checking for location of OpenGL framework" >&5
  7961. case "$with_opengl_framework" in
  7962. y | ye | yes | n | no)
  7963. { echo "configure: error: *** You must supply a directory to --with-opengl-framework." 1>&2; exit 1; }
  7964. ;;
  7965. esac
  7966. echo "$ac_t""$with_opengl_framework" 1>&6
  7967. if test -n "$with_opengl_framework"; then
  7968. if test -d $with_opengl_framework; then
  7969. OPENGLPATH="$OPENGLPATH -F$with_opengl_framework"
  7970. else
  7971. { echo "configure: error: *** OpenGL framework directory $dir does not exist." 1>&2; exit 1; }
  7972. fi
  7973. fi
  7974. ac_save_cppflags="$CPPFLAGS"
  7975. CPPFLAGS="$OPENGLPATH $CPPFLAGS"
  7976. for ac_hdr in OpenGL/gl.h OpenGL/glu.h
  7977. do
  7978. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7979. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7980. echo "configure:10000: checking for $ac_hdr" >&5
  7981. cat > conftest.$ac_ext <<EOF
  7982. #line 10003 "configure"
  7983. #include "confdefs.h"
  7984. #include <$ac_hdr>
  7985. EOF
  7986. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7987. { (eval echo configure:10008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7988. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7989. if test -z "$ac_err"; then
  7990. rm -rf conftest*
  7991. eval "ac_cv_header_$ac_safe=yes"
  7992. else
  7993. echo "$ac_err" >&5
  7994. echo "configure: failed program was:" >&5
  7995. cat conftest.$ac_ext >&5
  7996. rm -rf conftest*
  7997. eval "ac_cv_header_$ac_safe=no"
  7998. fi
  7999. rm -f conftest*
  8000. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8001. echo "$ac_t""yes" 1>&6
  8002. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8003. cat >> confdefs.h <<EOF
  8004. #define $ac_tr_hdr 1
  8005. EOF
  8006. else
  8007. echo "$ac_t""no" 1>&6
  8008. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  8009. fi
  8010. done
  8011. CPPFLAGS=$ac_save_cppflags
  8012. ac_save_libs="$LIBS"
  8013. ac_save_ldflags="$LDFLAGS"
  8014. LIBS="-framework OpenGL -framework AGL -framework ApplicationServices $LIBS"
  8015. LDFLAGS="$OPENGLPATH $LDFLAGS"
  8016. echo $ac_n "checking for glBegin""... $ac_c" 1>&6
  8017. echo "configure:10044: checking for glBegin" >&5
  8018. cat > conftest.$ac_ext <<EOF
  8019. #line 10047 "configure"
  8020. #include "confdefs.h"
  8021. /* System header to define __stub macros and hopefully few prototypes,
  8022. which can conflict with char glBegin(); below. */
  8023. #include <assert.h>
  8024. /* Override any gcc2 internal prototype to avoid an error. */
  8025. /* We use char because int might match the return type of a gcc2
  8026. builtin and then its argument prototype would still apply. */
  8027. char glBegin();
  8028. int main() {
  8029. /* The GNU C library defines this for functions which it implements
  8030. to always fail with ENOSYS. Some functions are actually named
  8031. something starting with __ and the normal name is an alias. */
  8032. #if defined (__stub_glBegin) || defined (__stub___glBegin)
  8033. choke me
  8034. #else
  8035. glBegin();
  8036. #endif
  8037. ; return 0; }
  8038. EOF
  8039. if { (eval echo configure:10070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8040. rm -rf conftest*
  8041. eval "ac_cv_func_glBegin=yes"
  8042. else
  8043. echo "configure: failed program was:" >&5
  8044. cat conftest.$ac_ext >&5
  8045. rm -rf conftest*
  8046. eval "ac_cv_func_glBegin=no"
  8047. fi
  8048. rm -f conftest*
  8049. if eval "test \"`echo '$ac_cv_func_'glBegin`\" = yes"; then
  8050. echo "$ac_t""yes" 1>&6
  8051. OPENGLLIB="$OPENGLLIB -framework OpenGL -framework AGL -framework ApplicationServices"
  8052. else
  8053. echo "$ac_t""no" 1>&6
  8054. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  8055. fi
  8056. LIBS=${ac_save_libs}
  8057. LDFLAGS=${ac_save_ldflags}
  8058. ac_save_libs="$LIBS"
  8059. ac_save_ldflags="$LDFLAGS"
  8060. LIBS=" $OPENGLLIB $LIBS"
  8061. LDFLAGS="$OPENGLPATH $LDFLAGS"
  8062. echo $ac_n "checking for gluBeginCurve""... $ac_c" 1>&6
  8063. echo "configure:10107: checking for gluBeginCurve" >&5
  8064. cat > conftest.$ac_ext <<EOF
  8065. #line 10110 "configure"
  8066. #include "confdefs.h"
  8067. /* System header to define __stub macros and hopefully few prototypes,
  8068. which can conflict with char gluBeginCurve(); below. */
  8069. #include <assert.h>
  8070. /* Override any gcc2 internal prototype to avoid an error. */
  8071. /* We use char because int might match the return type of a gcc2
  8072. builtin and then its argument prototype would still apply. */
  8073. char gluBeginCurve();
  8074. int main() {
  8075. /* The GNU C library defines this for functions which it implements
  8076. to always fail with ENOSYS. Some functions are actually named
  8077. something starting with __ and the normal name is an alias. */
  8078. #if defined (__stub_gluBeginCurve) || defined (__stub___gluBeginCurve)
  8079. choke me
  8080. #else
  8081. gluBeginCurve();
  8082. #endif
  8083. ; return 0; }
  8084. EOF
  8085. if { (eval echo configure:10133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8086. rm -rf conftest*
  8087. eval "ac_cv_func_gluBeginCurve=yes"
  8088. else
  8089. echo "configure: failed program was:" >&5
  8090. cat conftest.$ac_ext >&5
  8091. rm -rf conftest*
  8092. eval "ac_cv_func_gluBeginCurve=no"
  8093. fi
  8094. rm -f conftest*
  8095. if eval "test \"`echo '$ac_cv_func_'gluBeginCurve`\" = yes"; then
  8096. echo "$ac_t""yes" 1>&6
  8097. OPENGLLIB="$OPENGLLIB "
  8098. else
  8099. echo "$ac_t""no" 1>&6
  8100. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  8101. fi
  8102. LIBS=${ac_save_libs}
  8103. LDFLAGS=${ac_save_ldflags}
  8104. OPENGLINC="$OPENGLPATH"
  8105. OPENGLLIBPATH="$OPENGLPATH"
  8106. cat >> confdefs.h <<\EOF
  8107. #define OPENGL_AQUA 1
  8108. EOF
  8109. fi # $OPENGL_AQUA
  8110. if test "$OPENGL_WINDOWS" = 1 ; then
  8111. # With OpenGL includes directory
  8112. echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
  8113. echo "configure:10181: checking for location of OpenGL includes" >&5
  8114. case "$with_opengl_includes" in
  8115. y | ye | yes | n | no)
  8116. { echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
  8117. ;;
  8118. esac
  8119. echo "$ac_t""$with_opengl_includes" 1>&6
  8120. if test -n "$with_opengl_includes" ; then
  8121. for dir in $with_opengl_includes; do
  8122. if test -d "$dir"; then
  8123. OPENGLINC="$OPENGLINC -I$dir"
  8124. else
  8125. { echo "configure: error: *** OpenGL includes directory $dir does not exist." 1>&2; exit 1; }
  8126. fi
  8127. done
  8128. fi
  8129. ac_save_cppflags="$CPPFLAGS"
  8130. CPPFLAGS="$OPENGLINC $CPPFLAGS"
  8131. for ac_hdr in GL/gl.h GL/glu.h
  8132. do
  8133. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8134. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8135. echo "configure:10207: checking for $ac_hdr" >&5
  8136. cat > conftest.$ac_ext <<EOF
  8137. #line 10210 "configure"
  8138. #include "confdefs.h"
  8139. #include <$ac_hdr>
  8140. EOF
  8141. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8142. { (eval echo configure:10215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8143. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8144. if test -z "$ac_err"; then
  8145. rm -rf conftest*
  8146. eval "ac_cv_header_$ac_safe=yes"
  8147. else
  8148. echo "$ac_err" >&5
  8149. echo "configure: failed program was:" >&5
  8150. cat conftest.$ac_ext >&5
  8151. rm -rf conftest*
  8152. eval "ac_cv_header_$ac_safe=no"
  8153. fi
  8154. rm -f conftest*
  8155. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8156. echo "$ac_t""yes" 1>&6
  8157. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8158. cat >> confdefs.h <<EOF
  8159. #define $ac_tr_hdr 1
  8160. EOF
  8161. else
  8162. echo "$ac_t""no" 1>&6
  8163. { echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
  8164. fi
  8165. done
  8166. CPPFLAGS=$ac_save_cppflags
  8167. # With OpenGL library directory
  8168. echo $ac_n "checking for location of OpenGL library""... $ac_c" 1>&6
  8169. echo "configure:10249: checking for location of OpenGL library" >&5
  8170. case "$with_opengl_libs" in
  8171. y | ye | yes | n | no)
  8172. { echo "configure: error: *** You must supply a directory to --with-opengl-libs." 1>&2; exit 1; }
  8173. ;;
  8174. esac
  8175. echo "$ac_t""$with_opengl_libs" 1>&6
  8176. if test -n "$with_opengl_libs"; then
  8177. for dir in $with_opengl_libs; do
  8178. if test -d "$dir"; then
  8179. OPENGL_LIB_PATH="$OPENGL_LIB_PATH -L$dir"
  8180. else
  8181. { echo "configure: error: *** OpenGL library directory $dir does not exist." 1>&2; exit 1; }
  8182. fi
  8183. done
  8184. fi
  8185. ac_save_cflags="$CFLAGS"
  8186. CFLAGS="$CFLAGS $OPENGLINC"
  8187. ac_save_ldflags="$LDFLAGS"
  8188. ac_save_libs="$LIBS"
  8189. echo $ac_n "checking for OpenGL library""... $ac_c" 1>&6
  8190. echo "configure:10274: checking for OpenGL library" >&5
  8191. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  8192. LIBS="-lopengl32 "
  8193. cat > conftest.$ac_ext <<EOF
  8194. #line 10278 "configure"
  8195. #include "confdefs.h"
  8196. #include <GL/gl.h>
  8197. int main() {
  8198. glEnd();
  8199. ; return 0; }
  8200. EOF
  8201. if { (eval echo configure:10285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8202. rm -rf conftest*
  8203. echo "$ac_t""found" 1>&6
  8204. OPENGLLIB="$OPENGLLIB -lopengl32 "
  8205. else
  8206. echo "configure: failed program was:" >&5
  8207. cat conftest.$ac_ext >&5
  8208. rm -rf conftest*
  8209. { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
  8210. fi
  8211. rm -f conftest*
  8212. LIBS=${ac_save_libs}
  8213. LDFLAGS=${ac_save_ldflags}
  8214. ac_save_ldflags="$LDFLAGS"
  8215. ac_save_libs="$LIBS"
  8216. echo $ac_n "checking for GLU library""... $ac_c" 1>&6
  8217. echo "configure:10309: checking for GLU library" >&5
  8218. LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
  8219. LIBS="-lglu32 $OPENGLLIB "
  8220. cat > conftest.$ac_ext <<EOF
  8221. #line 10313 "configure"
  8222. #include "confdefs.h"
  8223. #include <GL/glu.h>
  8224. int main() {
  8225. gluNewQuadric();
  8226. ; return 0; }
  8227. EOF
  8228. if { (eval echo configure:10320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8229. rm -rf conftest*
  8230. echo "$ac_t""found" 1>&6
  8231. OPENGLULIB="$OPENGLULIB -lglu32 "
  8232. else
  8233. echo "configure: failed program was:" >&5
  8234. cat conftest.$ac_ext >&5
  8235. rm -rf conftest*
  8236. { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
  8237. fi
  8238. rm -f conftest*
  8239. LIBS=${ac_save_libs}
  8240. LDFLAGS=${ac_save_ldflags}
  8241. CFLAGS="${ac_save_cflags}"
  8242. OPENGLLIB="$OPENGL_LIB_PATH $OPENGLLIB"
  8243. OPENGLULIB="$OPENGL_LIB_PATH $OPENGLULIB"
  8244. cat >> confdefs.h <<\EOF
  8245. #define OPENGL_WINDOWS 1
  8246. EOF
  8247. fi # $OPENGL_WINDOWS
  8248. fi # $USE_OPENGL
  8249. # Done checking OpenGL
  8250. # Enable TCLTK option
  8251. echo $ac_n "checking whether to use Tcl/Tk""... $ac_c" 1>&6
  8252. echo "configure:10369: checking whether to use Tcl/Tk" >&5
  8253. echo "$ac_t"""$with_tcltk"" 1>&6
  8254. case "$with_tcltk" in
  8255. "no") USE_TCLTK= ;;
  8256. "yes") USE_TCLTK="1" ;;
  8257. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  8258. esac
  8259. TCLINCDIR=
  8260. TCLTKLIBPATH=
  8261. TCLTKLIBS=
  8262. if test -n "$USE_TCLTK"; then
  8263. # With Tcl/Tk includes directory
  8264. echo $ac_n "checking for location of Tcl/Tk includes""... $ac_c" 1>&6
  8265. echo "configure:10389: checking for location of Tcl/Tk includes" >&5
  8266. case "$with_tcltk_includes" in
  8267. y | ye | yes | n | no)
  8268. { echo "configure: error: *** You must supply a directory to --with-tcltk-includes." 1>&2; exit 1; }
  8269. ;;
  8270. esac
  8271. echo "$ac_t""$with_tcltk_includes" 1>&6
  8272. if test -n "$with_tcltk_includes" ; then
  8273. for dir in $with_tcltk_includes; do
  8274. if test -d "$dir"; then
  8275. TCLINCDIR="$TCLINCDIR -I$dir"
  8276. else
  8277. { echo "configure: error: *** Tcl/Tk includes directory $dir does not exist." 1>&2; exit 1; }
  8278. fi
  8279. done
  8280. fi
  8281. ac_save_cppflags="$CPPFLAGS"
  8282. CPPFLAGS="$TCLINCDIR $CPPFLAGS"
  8283. for ac_hdr in tcl.h
  8284. do
  8285. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8286. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8287. echo "configure:10415: checking for $ac_hdr" >&5
  8288. cat > conftest.$ac_ext <<EOF
  8289. #line 10418 "configure"
  8290. #include "confdefs.h"
  8291. #include <$ac_hdr>
  8292. EOF
  8293. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8294. { (eval echo configure:10423: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8295. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8296. if test -z "$ac_err"; then
  8297. rm -rf conftest*
  8298. eval "ac_cv_header_$ac_safe=yes"
  8299. else
  8300. echo "$ac_err" >&5
  8301. echo "configure: failed program was:" >&5
  8302. cat conftest.$ac_ext >&5
  8303. rm -rf conftest*
  8304. eval "ac_cv_header_$ac_safe=no"
  8305. fi
  8306. rm -f conftest*
  8307. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8308. echo "$ac_t""yes" 1>&6
  8309. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8310. cat >> confdefs.h <<EOF
  8311. #define $ac_tr_hdr 1
  8312. EOF
  8313. else
  8314. echo "$ac_t""no" 1>&6
  8315. { echo "configure: error: *** Unable to locate Tcl includes." 1>&2; exit 1; }
  8316. fi
  8317. done
  8318. CPPFLAGS=$ac_save_cppflags
  8319. ac_save_cppflags="$CPPFLAGS"
  8320. CPPFLAGS="$TCLINCDIR $X_CFLAGS $CPPFLAGS"
  8321. for ac_hdr in tk.h
  8322. do
  8323. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8324. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8325. echo "configure:10460: checking for $ac_hdr" >&5
  8326. cat > conftest.$ac_ext <<EOF
  8327. #line 10463 "configure"
  8328. #include "confdefs.h"
  8329. #include <$ac_hdr>
  8330. EOF
  8331. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8332. { (eval echo configure:10468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8333. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8334. if test -z "$ac_err"; then
  8335. rm -rf conftest*
  8336. eval "ac_cv_header_$ac_safe=yes"
  8337. else
  8338. echo "$ac_err" >&5
  8339. echo "configure: failed program was:" >&5
  8340. cat conftest.$ac_ext >&5
  8341. rm -rf conftest*
  8342. eval "ac_cv_header_$ac_safe=no"
  8343. fi
  8344. rm -f conftest*
  8345. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8346. echo "$ac_t""yes" 1>&6
  8347. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8348. cat >> confdefs.h <<EOF
  8349. #define $ac_tr_hdr 1
  8350. EOF
  8351. else
  8352. echo "$ac_t""no" 1>&6
  8353. { echo "configure: error: *** Unable to locate Tk includes." 1>&2; exit 1; }
  8354. fi
  8355. done
  8356. CPPFLAGS=$ac_save_cppflags
  8357. # Tcl/Tk version checks
  8358. echo $ac_n "checking Tcl version""... $ac_c" 1>&6
  8359. echo "configure:10502: checking Tcl version" >&5
  8360. ac_save_cppflags="$CPPFLAGS"
  8361. CPPFLAGS="$TCLINCDIR $CPPFLAGS"
  8362. if test "$cross_compiling" = yes; then
  8363. tcl_ver=UNKNOWN
  8364. echo "$ac_t""unknown (cross-compiling)" 1>&6
  8365. else
  8366. cat > conftest.$ac_ext <<EOF
  8367. #line 10510 "configure"
  8368. #include "confdefs.h"
  8369. #include <stdio.h>
  8370. #include <tcl.h>
  8371. int main(void) {
  8372. FILE *fp = fopen("conftestdata","w");
  8373. fputs(TCL_VERSION, fp);
  8374. return 0;
  8375. }
  8376. EOF
  8377. if { (eval echo configure:10522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  8378. then
  8379. tcl_ver=`cat conftestdata`
  8380. echo "$ac_t""$tcl_ver" 1>&6
  8381. else
  8382. echo "configure: failed program was:" >&5
  8383. cat conftest.$ac_ext >&5
  8384. rm -fr conftest*
  8385. { echo "configure: error: *** Could not determine Tcl version." 1>&2; exit 1; }
  8386. fi
  8387. rm -fr conftest*
  8388. fi
  8389. CPPFLAGS=$ac_save_cppflags
  8390. echo $ac_n "checking Tk version""... $ac_c" 1>&6
  8391. echo "configure:10540: checking Tk version" >&5
  8392. ac_save_cppflags="$CPPFLAGS"
  8393. CPPFLAGS="$TCLINCDIR $X_CFLAGS $CPPFLAGS"
  8394. if test "$cross_compiling" = yes; then
  8395. tk_ver=UNKNOWN
  8396. echo "$ac_t""unknown (cross-compiling)" 1>&6
  8397. else
  8398. cat > conftest.$ac_ext <<EOF
  8399. #line 10548 "configure"
  8400. #include "confdefs.h"
  8401. #include <stdio.h>
  8402. #include <tk.h>
  8403. int main(void) {
  8404. FILE *fp = fopen("conftestdata","w");
  8405. fputs(TK_VERSION, fp);
  8406. return 0;
  8407. }
  8408. EOF
  8409. if { (eval echo configure:10560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  8410. then
  8411. tk_ver=`cat conftestdata`
  8412. echo "$ac_t""$tk_ver" 1>&6
  8413. else
  8414. echo "configure: failed program was:" >&5
  8415. cat conftest.$ac_ext >&5
  8416. rm -fr conftest*
  8417. { echo "configure: error: *** Could not determine Tk version." 1>&2; exit 1; }
  8418. fi
  8419. rm -fr conftest*
  8420. fi
  8421. CPPFLAGS=$ac_save_cppflags
  8422. if test "$tcl_ver" = "$tk_ver" ; then
  8423. tcltk_ver="$tcl_ver"
  8424. else
  8425. { echo "configure: error: *** Tcl/Tk version mismatch." 1>&2; exit 1; }
  8426. fi
  8427. # FreeBSD and CygWin don't have a "dot" between major/minor version number
  8428. tcltk_ver2=`echo "$tcltk_ver" | sed 's/\.//g'`
  8429. # With Tcl/Tk library directory
  8430. echo $ac_n "checking for location of Tcl/Tk library""... $ac_c" 1>&6
  8431. echo "configure:10589: checking for location of Tcl/Tk library" >&5
  8432. case "$with_tcltk_libs" in
  8433. y | ye | yes | n | no)
  8434. { echo "configure: error: *** You must supply a directory to --with-tcltk-libs." 1>&2; exit 1; }
  8435. ;;
  8436. esac
  8437. echo "$ac_t""$with_tcltk_libs" 1>&6
  8438. if test -n "$with_tcltk_libs"; then
  8439. for dir in $with_tcltk_libs; do
  8440. if test -d "$dir"; then
  8441. TCLTKLIBPATH="$TCLTKLIBPATH -L$dir"
  8442. else
  8443. { echo "configure: error: *** Tcl/Tk library directory $dir does not exist." 1>&2; exit 1; }
  8444. fi
  8445. done
  8446. fi
  8447. TCLLIB=
  8448. TKLIB=
  8449. MACOSX_ARCHS_TCLTK=
  8450. # Can't test tcl/tk libs on 64bit OSX Aqua for now
  8451. # assume that if OpenGL Aqua, then user specifies TclTk Aqua
  8452. if test "$OPENGL_AQUA" = 1 ; then
  8453. save_CFLAGS="$CFLAGS"
  8454. CFLAGS="`echo \"$CFLAGS\" | sed -E 's/-arch +x86_64//g' | sed -E 's/-arch +ppc64//g'`"
  8455. save_LDFLAGS="$LDFLAGS"
  8456. LDFLAGS="`echo \"$LDFLAGS\" | sed -E 's/-arch +x86_64//g' | sed -E 's/-arch +ppc64//g'`"
  8457. fi
  8458. ac_save_ldflags="$LDFLAGS"
  8459. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  8460. echo $ac_n "checking for Tcl_Init in -ltcl""... $ac_c" 1>&6
  8461. echo "configure:10629: checking for Tcl_Init in -ltcl" >&5
  8462. ac_lib_var=`echo tcl'_'Tcl_Init | sed 'y%./+-%__p_%'`
  8463. ac_save_LIBS="$LIBS"
  8464. LIBS="-ltcl $MATHLIB $LIBS"
  8465. cat > conftest.$ac_ext <<EOF
  8466. #line 10635 "configure"
  8467. #include "confdefs.h"
  8468. /* Override any gcc2 internal prototype to avoid an error. */
  8469. /* We use char because int might match the return type of a gcc2
  8470. builtin and then its argument prototype would still apply. */
  8471. char Tcl_Init();
  8472. int main() {
  8473. Tcl_Init()
  8474. ; return 0; }
  8475. EOF
  8476. if { (eval echo configure:10646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8477. rm -rf conftest*
  8478. eval "ac_cv_lib_$ac_lib_var=yes"
  8479. else
  8480. echo "configure: failed program was:" >&5
  8481. cat conftest.$ac_ext >&5
  8482. rm -rf conftest*
  8483. eval "ac_cv_lib_$ac_lib_var=no"
  8484. fi
  8485. rm -f conftest*
  8486. LIBS="$ac_save_LIBS"
  8487. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8488. echo "$ac_t""yes" 1>&6
  8489. TCLLIB="$TCLLIB -ltcl $MATHLIB"
  8490. else
  8491. echo "$ac_t""no" 1>&6
  8492. echo $ac_n "checking for Tcl_Init in -ltcl""... $ac_c" 1>&6
  8493. echo "configure:10665: checking for Tcl_Init in -ltcl" >&5
  8494. ac_lib_var=`echo tcl'_'Tcl_Init | sed 'y%./+-%__p_%'`
  8495. ac_save_LIBS="$LIBS"
  8496. LIBS="-ltcl $MATHLIB $DLLIB $LIBS"
  8497. cat > conftest.$ac_ext <<EOF
  8498. #line 10671 "configure"
  8499. #include "confdefs.h"
  8500. /* Override any gcc2 internal prototype to avoid an error. */
  8501. /* We use char because int might match the return type of a gcc2
  8502. builtin and then its argument prototype would still apply. */
  8503. char Tcl_Init();
  8504. int main() {
  8505. Tcl_Init()
  8506. ; return 0; }
  8507. EOF
  8508. if { (eval echo configure:10682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8509. rm -rf conftest*
  8510. eval "ac_cv_lib_$ac_lib_var=yes"
  8511. else
  8512. echo "configure: failed program was:" >&5
  8513. cat conftest.$ac_ext >&5
  8514. rm -rf conftest*
  8515. eval "ac_cv_lib_$ac_lib_var=no"
  8516. fi
  8517. rm -f conftest*
  8518. LIBS="$ac_save_LIBS"
  8519. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8520. echo "$ac_t""yes" 1>&6
  8521. TCLLIB="$TCLLIB -ltcl $MATHLIB $DLLIB"
  8522. else
  8523. echo "$ac_t""no" 1>&6
  8524. LDFLAGS=${ac_save_ldflags}
  8525. ac_save_ldflags="$LDFLAGS"
  8526. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  8527. echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver""... $ac_c" 1>&6
  8528. echo "configure:10709: checking for Tcl_Init in -ltcl$tcltk_ver" >&5
  8529. ac_lib_var=`echo tcl$tcltk_ver'_'Tcl_Init | sed 'y%./+-%__p_%'`
  8530. ac_save_LIBS="$LIBS"
  8531. LIBS="-ltcl$tcltk_ver $MATHLIB $LIBS"
  8532. cat > conftest.$ac_ext <<EOF
  8533. #line 10715 "configure"
  8534. #include "confdefs.h"
  8535. /* Override any gcc2 internal prototype to avoid an error. */
  8536. /* We use char because int might match the return type of a gcc2
  8537. builtin and then its argument prototype would still apply. */
  8538. char Tcl_Init();
  8539. int main() {
  8540. Tcl_Init()
  8541. ; return 0; }
  8542. EOF
  8543. if { (eval echo configure:10726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8544. rm -rf conftest*
  8545. eval "ac_cv_lib_$ac_lib_var=yes"
  8546. else
  8547. echo "configure: failed program was:" >&5
  8548. cat conftest.$ac_ext >&5
  8549. rm -rf conftest*
  8550. eval "ac_cv_lib_$ac_lib_var=no"
  8551. fi
  8552. rm -f conftest*
  8553. LIBS="$ac_save_LIBS"
  8554. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8555. echo "$ac_t""yes" 1>&6
  8556. TCLLIB="$TCLLIB -ltcl$tcltk_ver $MATHLIB"
  8557. else
  8558. echo "$ac_t""no" 1>&6
  8559. echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver""... $ac_c" 1>&6
  8560. echo "configure:10745: checking for Tcl_Init in -ltcl$tcltk_ver" >&5
  8561. ac_lib_var=`echo tcl$tcltk_ver'_'Tcl_Init | sed 'y%./+-%__p_%'`
  8562. ac_save_LIBS="$LIBS"
  8563. LIBS="-ltcl$tcltk_ver $MATHLIB $DLLIB $LIBS"
  8564. cat > conftest.$ac_ext <<EOF
  8565. #line 10751 "configure"
  8566. #include "confdefs.h"
  8567. /* Override any gcc2 internal prototype to avoid an error. */
  8568. /* We use char because int might match the return type of a gcc2
  8569. builtin and then its argument prototype would still apply. */
  8570. char Tcl_Init();
  8571. int main() {
  8572. Tcl_Init()
  8573. ; return 0; }
  8574. EOF
  8575. if { (eval echo configure:10762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8576. rm -rf conftest*
  8577. eval "ac_cv_lib_$ac_lib_var=yes"
  8578. else
  8579. echo "configure: failed program was:" >&5
  8580. cat conftest.$ac_ext >&5
  8581. rm -rf conftest*
  8582. eval "ac_cv_lib_$ac_lib_var=no"
  8583. fi
  8584. rm -f conftest*
  8585. LIBS="$ac_save_LIBS"
  8586. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8587. echo "$ac_t""yes" 1>&6
  8588. TCLLIB="$TCLLIB -ltcl$tcltk_ver $MATHLIB $DLLIB"
  8589. else
  8590. echo "$ac_t""no" 1>&6
  8591. LDFLAGS=${ac_save_ldflags}
  8592. ac_save_ldflags="$LDFLAGS"
  8593. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  8594. echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver2""... $ac_c" 1>&6
  8595. echo "configure:10789: checking for Tcl_Init in -ltcl$tcltk_ver2" >&5
  8596. ac_lib_var=`echo tcl$tcltk_ver2'_'Tcl_Init | sed 'y%./+-%__p_%'`
  8597. ac_save_LIBS="$LIBS"
  8598. LIBS="-ltcl$tcltk_ver2 $MATHLIB $LIBS"
  8599. cat > conftest.$ac_ext <<EOF
  8600. #line 10795 "configure"
  8601. #include "confdefs.h"
  8602. /* Override any gcc2 internal prototype to avoid an error. */
  8603. /* We use char because int might match the return type of a gcc2
  8604. builtin and then its argument prototype would still apply. */
  8605. char Tcl_Init();
  8606. int main() {
  8607. Tcl_Init()
  8608. ; return 0; }
  8609. EOF
  8610. if { (eval echo configure:10806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8611. rm -rf conftest*
  8612. eval "ac_cv_lib_$ac_lib_var=yes"
  8613. else
  8614. echo "configure: failed program was:" >&5
  8615. cat conftest.$ac_ext >&5
  8616. rm -rf conftest*
  8617. eval "ac_cv_lib_$ac_lib_var=no"
  8618. fi
  8619. rm -f conftest*
  8620. LIBS="$ac_save_LIBS"
  8621. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8622. echo "$ac_t""yes" 1>&6
  8623. TCLLIB="$TCLLIB -ltcl$tcltk_ver2 $MATHLIB"
  8624. else
  8625. echo "$ac_t""no" 1>&6
  8626. echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver2""... $ac_c" 1>&6
  8627. echo "configure:10825: checking for Tcl_Init in -ltcl$tcltk_ver2" >&5
  8628. ac_lib_var=`echo tcl$tcltk_ver2'_'Tcl_Init | sed 'y%./+-%__p_%'`
  8629. ac_save_LIBS="$LIBS"
  8630. LIBS="-ltcl$tcltk_ver2 $MATHLIB $DLLIB $LIBS"
  8631. cat > conftest.$ac_ext <<EOF
  8632. #line 10831 "configure"
  8633. #include "confdefs.h"
  8634. /* Override any gcc2 internal prototype to avoid an error. */
  8635. /* We use char because int might match the return type of a gcc2
  8636. builtin and then its argument prototype would still apply. */
  8637. char Tcl_Init();
  8638. int main() {
  8639. Tcl_Init()
  8640. ; return 0; }
  8641. EOF
  8642. if { (eval echo configure:10842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8643. rm -rf conftest*
  8644. eval "ac_cv_lib_$ac_lib_var=yes"
  8645. else
  8646. echo "configure: failed program was:" >&5
  8647. cat conftest.$ac_ext >&5
  8648. rm -rf conftest*
  8649. eval "ac_cv_lib_$ac_lib_var=no"
  8650. fi
  8651. rm -f conftest*
  8652. LIBS="$ac_save_LIBS"
  8653. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8654. echo "$ac_t""yes" 1>&6
  8655. TCLLIB="$TCLLIB -ltcl$tcltk_ver2 $MATHLIB $DLLIB"
  8656. else
  8657. echo "$ac_t""no" 1>&6
  8658. LDFLAGS=${ac_save_ldflags}
  8659. { echo "configure: error: *** Unable to locate Tcl library." 1>&2; exit 1; }
  8660. fi
  8661. fi
  8662. LDFLAGS=${ac_save_ldflags}
  8663. fi
  8664. fi
  8665. LDFLAGS=${ac_save_ldflags}
  8666. fi
  8667. fi
  8668. LDFLAGS=${ac_save_ldflags}
  8669. ac_save_ldflags="$LDFLAGS"
  8670. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  8671. echo $ac_n "checking for Tk_MainWindow in -ltk""... $ac_c" 1>&6
  8672. echo "configure:10920: checking for Tk_MainWindow in -ltk" >&5
  8673. ac_lib_var=`echo tk'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  8674. ac_save_LIBS="$LIBS"
  8675. LIBS="-ltk $TCLLIB $MATHLIB $LIBS"
  8676. cat > conftest.$ac_ext <<EOF
  8677. #line 10926 "configure"
  8678. #include "confdefs.h"
  8679. /* Override any gcc2 internal prototype to avoid an error. */
  8680. /* We use char because int might match the return type of a gcc2
  8681. builtin and then its argument prototype would still apply. */
  8682. char Tk_MainWindow();
  8683. int main() {
  8684. Tk_MainWindow()
  8685. ; return 0; }
  8686. EOF
  8687. if { (eval echo configure:10937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8688. rm -rf conftest*
  8689. eval "ac_cv_lib_$ac_lib_var=yes"
  8690. else
  8691. echo "configure: failed program was:" >&5
  8692. cat conftest.$ac_ext >&5
  8693. rm -rf conftest*
  8694. eval "ac_cv_lib_$ac_lib_var=no"
  8695. fi
  8696. rm -f conftest*
  8697. LIBS="$ac_save_LIBS"
  8698. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8699. echo "$ac_t""yes" 1>&6
  8700. TKLIB="$TKLIB -ltk $MATHLIB"
  8701. else
  8702. echo "$ac_t""no" 1>&6
  8703. echo $ac_n "checking for Tk_MainWindow in -ltk""... $ac_c" 1>&6
  8704. echo "configure:10956: checking for Tk_MainWindow in -ltk" >&5
  8705. ac_lib_var=`echo tk'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  8706. ac_save_LIBS="$LIBS"
  8707. LIBS="-ltk $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
  8708. cat > conftest.$ac_ext <<EOF
  8709. #line 10962 "configure"
  8710. #include "confdefs.h"
  8711. /* Override any gcc2 internal prototype to avoid an error. */
  8712. /* We use char because int might match the return type of a gcc2
  8713. builtin and then its argument prototype would still apply. */
  8714. char Tk_MainWindow();
  8715. int main() {
  8716. Tk_MainWindow()
  8717. ; return 0; }
  8718. EOF
  8719. if { (eval echo configure:10973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8720. rm -rf conftest*
  8721. eval "ac_cv_lib_$ac_lib_var=yes"
  8722. else
  8723. echo "configure: failed program was:" >&5
  8724. cat conftest.$ac_ext >&5
  8725. rm -rf conftest*
  8726. eval "ac_cv_lib_$ac_lib_var=no"
  8727. fi
  8728. rm -f conftest*
  8729. LIBS="$ac_save_LIBS"
  8730. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8731. echo "$ac_t""yes" 1>&6
  8732. TKLIB="$TKLIB -ltk $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
  8733. else
  8734. echo "$ac_t""no" 1>&6
  8735. LDFLAGS=${ac_save_ldflags}
  8736. ac_save_ldflags="$LDFLAGS"
  8737. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  8738. echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver""... $ac_c" 1>&6
  8739. echo "configure:11000: checking for Tk_MainWindow in -ltk$tcltk_ver" >&5
  8740. ac_lib_var=`echo tk$tcltk_ver'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  8741. ac_save_LIBS="$LIBS"
  8742. LIBS="-ltk$tcltk_ver $TCLLIB $MATHLIB $LIBS"
  8743. cat > conftest.$ac_ext <<EOF
  8744. #line 11006 "configure"
  8745. #include "confdefs.h"
  8746. /* Override any gcc2 internal prototype to avoid an error. */
  8747. /* We use char because int might match the return type of a gcc2
  8748. builtin and then its argument prototype would still apply. */
  8749. char Tk_MainWindow();
  8750. int main() {
  8751. Tk_MainWindow()
  8752. ; return 0; }
  8753. EOF
  8754. if { (eval echo configure:11017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8755. rm -rf conftest*
  8756. eval "ac_cv_lib_$ac_lib_var=yes"
  8757. else
  8758. echo "configure: failed program was:" >&5
  8759. cat conftest.$ac_ext >&5
  8760. rm -rf conftest*
  8761. eval "ac_cv_lib_$ac_lib_var=no"
  8762. fi
  8763. rm -f conftest*
  8764. LIBS="$ac_save_LIBS"
  8765. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8766. echo "$ac_t""yes" 1>&6
  8767. TKLIB="$TKLIB -ltk$tcltk_ver $MATHLIB"
  8768. else
  8769. echo "$ac_t""no" 1>&6
  8770. echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver""... $ac_c" 1>&6
  8771. echo "configure:11036: checking for Tk_MainWindow in -ltk$tcltk_ver" >&5
  8772. ac_lib_var=`echo tk$tcltk_ver'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  8773. ac_save_LIBS="$LIBS"
  8774. LIBS="-ltk$tcltk_ver $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
  8775. cat > conftest.$ac_ext <<EOF
  8776. #line 11042 "configure"
  8777. #include "confdefs.h"
  8778. /* Override any gcc2 internal prototype to avoid an error. */
  8779. /* We use char because int might match the return type of a gcc2
  8780. builtin and then its argument prototype would still apply. */
  8781. char Tk_MainWindow();
  8782. int main() {
  8783. Tk_MainWindow()
  8784. ; return 0; }
  8785. EOF
  8786. if { (eval echo configure:11053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8787. rm -rf conftest*
  8788. eval "ac_cv_lib_$ac_lib_var=yes"
  8789. else
  8790. echo "configure: failed program was:" >&5
  8791. cat conftest.$ac_ext >&5
  8792. rm -rf conftest*
  8793. eval "ac_cv_lib_$ac_lib_var=no"
  8794. fi
  8795. rm -f conftest*
  8796. LIBS="$ac_save_LIBS"
  8797. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8798. echo "$ac_t""yes" 1>&6
  8799. TKLIB="$TKLIB -ltk$tcltk_ver $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
  8800. else
  8801. echo "$ac_t""no" 1>&6
  8802. LDFLAGS=${ac_save_ldflags}
  8803. ac_save_ldflags="$LDFLAGS"
  8804. LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
  8805. echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver2""... $ac_c" 1>&6
  8806. echo "configure:11080: checking for Tk_MainWindow in -ltk$tcltk_ver2" >&5
  8807. ac_lib_var=`echo tk$tcltk_ver2'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  8808. ac_save_LIBS="$LIBS"
  8809. LIBS="-ltk$tcltk_ver2 $TCLLIB $MATHLIB $LIBS"
  8810. cat > conftest.$ac_ext <<EOF
  8811. #line 11086 "configure"
  8812. #include "confdefs.h"
  8813. /* Override any gcc2 internal prototype to avoid an error. */
  8814. /* We use char because int might match the return type of a gcc2
  8815. builtin and then its argument prototype would still apply. */
  8816. char Tk_MainWindow();
  8817. int main() {
  8818. Tk_MainWindow()
  8819. ; return 0; }
  8820. EOF
  8821. if { (eval echo configure:11097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8822. rm -rf conftest*
  8823. eval "ac_cv_lib_$ac_lib_var=yes"
  8824. else
  8825. echo "configure: failed program was:" >&5
  8826. cat conftest.$ac_ext >&5
  8827. rm -rf conftest*
  8828. eval "ac_cv_lib_$ac_lib_var=no"
  8829. fi
  8830. rm -f conftest*
  8831. LIBS="$ac_save_LIBS"
  8832. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8833. echo "$ac_t""yes" 1>&6
  8834. TKLIB="$TKLIB -ltk$tcltk_ver2 $MATHLIB"
  8835. else
  8836. echo "$ac_t""no" 1>&6
  8837. echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver2""... $ac_c" 1>&6
  8838. echo "configure:11116: checking for Tk_MainWindow in -ltk$tcltk_ver2" >&5
  8839. ac_lib_var=`echo tk$tcltk_ver2'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
  8840. ac_save_LIBS="$LIBS"
  8841. LIBS="-ltk$tcltk_ver2 $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
  8842. cat > conftest.$ac_ext <<EOF
  8843. #line 11122 "configure"
  8844. #include "confdefs.h"
  8845. /* Override any gcc2 internal prototype to avoid an error. */
  8846. /* We use char because int might match the return type of a gcc2
  8847. builtin and then its argument prototype would still apply. */
  8848. char Tk_MainWindow();
  8849. int main() {
  8850. Tk_MainWindow()
  8851. ; return 0; }
  8852. EOF
  8853. if { (eval echo configure:11133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8854. rm -rf conftest*
  8855. eval "ac_cv_lib_$ac_lib_var=yes"
  8856. else
  8857. echo "configure: failed program was:" >&5
  8858. cat conftest.$ac_ext >&5
  8859. rm -rf conftest*
  8860. eval "ac_cv_lib_$ac_lib_var=no"
  8861. fi
  8862. rm -f conftest*
  8863. LIBS="$ac_save_LIBS"
  8864. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8865. echo "$ac_t""yes" 1>&6
  8866. TKLIB="$TKLIB -ltk$tcltk_ver2 $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
  8867. else
  8868. echo "$ac_t""no" 1>&6
  8869. LDFLAGS=${ac_save_ldflags}
  8870. { echo "configure: error: *** Unable to locate Tk library." 1>&2; exit 1; }
  8871. fi
  8872. fi
  8873. LDFLAGS=${ac_save_ldflags}
  8874. fi
  8875. fi
  8876. LDFLAGS=${ac_save_ldflags}
  8877. fi
  8878. fi
  8879. LDFLAGS=${ac_save_ldflags}
  8880. # restore CFLAGS/LDLFAGS from Aqua 64bit strip
  8881. # only Tcl/Tk-based makefiles will strip 64bit out during compile
  8882. if test "$OPENGL_AQUA" = 1 ; then
  8883. CFLAGS="$save_CFLAGS"
  8884. LDFLAGS="$save_LDFLAGS"
  8885. fi
  8886. TCLTKLIBS="$TKLIB $TCLLIB"
  8887. # check for available OSX archs in TclTk
  8888. if test -n "$MACOSX_ARCHS" ; then
  8889. save_LDFLAGS="$LDFLAGS"
  8890. LDFLAGS=
  8891. save_CFLAGS="$CFLAGS"
  8892. CFLAGS=
  8893. tlib=`echo "$TCLLIB" | sed -e 's/-l//' -e 's/^ *//' -e 's/ *$//'`
  8894. for a in i386 ppc x86_64 ppc64
  8895. do
  8896. # add only if in MACOSX_ARCHS
  8897. echo $ac_n "checking for Tcl_Init in -l$tlib""... $ac_c" 1>&6
  8898. echo "configure:11223: checking for Tcl_Init in -l$tlib" >&5
  8899. ac_lib_var=`echo $tlib'_'Tcl_Init | sed 'y%./+-%__p_%'`
  8900. ac_save_LIBS="$LIBS"
  8901. LIBS="-l$tlib -arch $a $MACOSX_SDK $TCLTKLIBPATH $LIBS"
  8902. cat > conftest.$ac_ext <<EOF
  8903. #line 11229 "configure"
  8904. #include "confdefs.h"
  8905. /* Override any gcc2 internal prototype to avoid an error. */
  8906. /* We use char because int might match the return type of a gcc2
  8907. builtin and then its argument prototype would still apply. */
  8908. char Tcl_Init();
  8909. int main() {
  8910. Tcl_Init()
  8911. ; return 0; }
  8912. EOF
  8913. if { (eval echo configure:11240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8914. rm -rf conftest*
  8915. eval "ac_cv_lib_$ac_lib_var=yes"
  8916. else
  8917. echo "configure: failed program was:" >&5
  8918. cat conftest.$ac_ext >&5
  8919. rm -rf conftest*
  8920. eval "ac_cv_lib_$ac_lib_var=no"
  8921. fi
  8922. rm -f conftest*
  8923. LIBS="$ac_save_LIBS"
  8924. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8925. echo "$ac_t""yes" 1>&6
  8926. if test -n "`echo "$MACOSX_ARCHS" | grep $a`" ; then
  8927. MACOSX_ARCHS_TCLTK="$MACOSX_ARCHS_TCLTK -arch $a"
  8928. fi
  8929. else
  8930. echo "$ac_t""no" 1>&6
  8931. fi
  8932. done
  8933. LDFLAGS="$save_LDFLAGS"
  8934. CFLAGS="$save_CFLAGS"
  8935. fi
  8936. cat >> confdefs.h <<\EOF
  8937. #define HAVE_TCLTK 1
  8938. EOF
  8939. fi # $USE_TCLTK
  8940. TKINCDIR=$TCLINCDIR
  8941. # Done checking Tcl/Tk
  8942. # Enable ODBC option
  8943. echo $ac_n "checking whether to use ODBC""... $ac_c" 1>&6
  8944. echo "configure:11290: checking whether to use ODBC" >&5
  8945. echo "$ac_t"""$with_odbc"" 1>&6
  8946. case "$with_odbc" in
  8947. "no") USE_ODBC= ;;
  8948. "yes") USE_ODBC="1" ;;
  8949. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  8950. esac
  8951. ODBCINC=
  8952. ODBCLIB=
  8953. if test -n "$USE_ODBC"; then
  8954. # With ODBC includes directory
  8955. echo $ac_n "checking for location of ODBC includes""... $ac_c" 1>&6
  8956. echo "configure:11309: checking for location of ODBC includes" >&5
  8957. case "$with_odbc_includes" in
  8958. y | ye | yes | n | no)
  8959. { echo "configure: error: *** You must supply a directory to --with-odbc-includes." 1>&2; exit 1; }
  8960. ;;
  8961. esac
  8962. echo "$ac_t""$with_odbc_includes" 1>&6
  8963. if test -n "$with_odbc_includes" ; then
  8964. for dir in $with_odbc_includes; do
  8965. if test -d "$dir"; then
  8966. ODBCINC="$ODBCINC -I$dir"
  8967. else
  8968. { echo "configure: error: *** ODBC includes directory $dir does not exist." 1>&2; exit 1; }
  8969. fi
  8970. done
  8971. fi
  8972. ac_save_cppflags="$CPPFLAGS"
  8973. CPPFLAGS="$ODBCINC $CPPFLAGS"
  8974. for ac_hdr in sql.h
  8975. do
  8976. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8977. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8978. echo "configure:11335: checking for $ac_hdr" >&5
  8979. cat > conftest.$ac_ext <<EOF
  8980. #line 11338 "configure"
  8981. #include "confdefs.h"
  8982. #include <$ac_hdr>
  8983. EOF
  8984. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8985. { (eval echo configure:11343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8986. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8987. if test -z "$ac_err"; then
  8988. rm -rf conftest*
  8989. eval "ac_cv_header_$ac_safe=yes"
  8990. else
  8991. echo "$ac_err" >&5
  8992. echo "configure: failed program was:" >&5
  8993. cat conftest.$ac_ext >&5
  8994. rm -rf conftest*
  8995. eval "ac_cv_header_$ac_safe=no"
  8996. fi
  8997. rm -f conftest*
  8998. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8999. echo "$ac_t""yes" 1>&6
  9000. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9001. cat >> confdefs.h <<EOF
  9002. #define $ac_tr_hdr 1
  9003. EOF
  9004. else
  9005. echo "$ac_t""no" 1>&6
  9006. { echo "configure: error: *** Unable to locate ODBC includes." 1>&2; exit 1; }
  9007. fi
  9008. done
  9009. CPPFLAGS=$ac_save_cppflags
  9010. # With ODBC library directory
  9011. echo $ac_n "checking for location of ODBC library""... $ac_c" 1>&6
  9012. echo "configure:11377: checking for location of ODBC library" >&5
  9013. case "$with_odbc_libs" in
  9014. y | ye | yes | n | no)
  9015. { echo "configure: error: *** You must supply a directory to --with-odbc-libs." 1>&2; exit 1; }
  9016. ;;
  9017. esac
  9018. echo "$ac_t""$with_odbc_libs" 1>&6
  9019. if test -n "$with_odbc_libs"; then
  9020. for dir in $with_odbc_libs; do
  9021. if test -d "$dir"; then
  9022. ODBCLIB="$ODBCLIB -L$dir"
  9023. else
  9024. { echo "configure: error: *** ODBC library directory $dir does not exist." 1>&2; exit 1; }
  9025. fi
  9026. done
  9027. fi
  9028. ac_save_ldflags="$LDFLAGS"
  9029. LDFLAGS="$ODBCLIB $LDFLAGS"
  9030. echo $ac_n "checking for SQLConnect in -lodbc""... $ac_c" 1>&6
  9031. echo "configure:11402: checking for SQLConnect in -lodbc" >&5
  9032. ac_lib_var=`echo odbc'_'SQLConnect | sed 'y%./+-%__p_%'`
  9033. ac_save_LIBS="$LIBS"
  9034. LIBS="-lodbc $ICONVLIB $LIBS"
  9035. cat > conftest.$ac_ext <<EOF
  9036. #line 11408 "configure"
  9037. #include "confdefs.h"
  9038. /* Override any gcc2 internal prototype to avoid an error. */
  9039. /* We use char because int might match the return type of a gcc2
  9040. builtin and then its argument prototype would still apply. */
  9041. char SQLConnect();
  9042. int main() {
  9043. SQLConnect()
  9044. ; return 0; }
  9045. EOF
  9046. if { (eval echo configure:11419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9047. rm -rf conftest*
  9048. eval "ac_cv_lib_$ac_lib_var=yes"
  9049. else
  9050. echo "configure: failed program was:" >&5
  9051. cat conftest.$ac_ext >&5
  9052. rm -rf conftest*
  9053. eval "ac_cv_lib_$ac_lib_var=no"
  9054. fi
  9055. rm -f conftest*
  9056. LIBS="$ac_save_LIBS"
  9057. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9058. echo "$ac_t""yes" 1>&6
  9059. ODBCLIB="$ODBCLIB -lodbc "
  9060. else
  9061. echo "$ac_t""no" 1>&6
  9062. LDFLAGS=${ac_save_ldflags}
  9063. ac_save_ldflags="$LDFLAGS"
  9064. LDFLAGS="$ODBCLIB $LDFLAGS"
  9065. echo $ac_n "checking for SQLConnect in -liodbc""... $ac_c" 1>&6
  9066. echo "configure:11444: checking for SQLConnect in -liodbc" >&5
  9067. ac_lib_var=`echo iodbc'_'SQLConnect | sed 'y%./+-%__p_%'`
  9068. ac_save_LIBS="$LIBS"
  9069. LIBS="-liodbc $LIBS"
  9070. cat > conftest.$ac_ext <<EOF
  9071. #line 11450 "configure"
  9072. #include "confdefs.h"
  9073. /* Override any gcc2 internal prototype to avoid an error. */
  9074. /* We use char because int might match the return type of a gcc2
  9075. builtin and then its argument prototype would still apply. */
  9076. char SQLConnect();
  9077. int main() {
  9078. SQLConnect()
  9079. ; return 0; }
  9080. EOF
  9081. if { (eval echo configure:11461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9082. rm -rf conftest*
  9083. eval "ac_cv_lib_$ac_lib_var=yes"
  9084. else
  9085. echo "configure: failed program was:" >&5
  9086. cat conftest.$ac_ext >&5
  9087. rm -rf conftest*
  9088. eval "ac_cv_lib_$ac_lib_var=no"
  9089. fi
  9090. rm -f conftest*
  9091. LIBS="$ac_save_LIBS"
  9092. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9093. echo "$ac_t""yes" 1>&6
  9094. ODBCLIB="$ODBCLIB -liodbc "
  9095. else
  9096. echo "$ac_t""no" 1>&6
  9097. LDFLAGS=${ac_save_ldflags}
  9098. ac_save_cflags="$CFLAGS"
  9099. CFLAGS="$CFLAGS $ODBCINC"
  9100. ac_save_ldflags="$LDFLAGS"
  9101. ac_save_libs="$LIBS"
  9102. echo $ac_n "checking for ODBC library""... $ac_c" 1>&6
  9103. echo "configure:11486: checking for ODBC library" >&5
  9104. LDFLAGS="$ODBCLIB $LDFLAGS"
  9105. LIBS="-lodbc32 "
  9106. cat > conftest.$ac_ext <<EOF
  9107. #line 11490 "configure"
  9108. #include "confdefs.h"
  9109. #include <windows.h>
  9110. #include <sql.h>
  9111. int main() {
  9112. SQLAllocEnv((SQLHENV *)0);
  9113. ; return 0; }
  9114. EOF
  9115. if { (eval echo configure:11498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9116. rm -rf conftest*
  9117. echo "$ac_t""found" 1>&6
  9118. ODBCLIB="$ODBCLIB -lodbc32 "
  9119. else
  9120. echo "configure: failed program was:" >&5
  9121. cat conftest.$ac_ext >&5
  9122. rm -rf conftest*
  9123. { echo "configure: error: *** Unable to locate ODBC library." 1>&2; exit 1; }
  9124. fi
  9125. rm -f conftest*
  9126. LIBS=${ac_save_libs}
  9127. LDFLAGS=${ac_save_ldflags}
  9128. CFLAGS="${ac_save_cflags}"
  9129. fi
  9130. LDFLAGS=${ac_save_ldflags}
  9131. fi
  9132. LDFLAGS=${ac_save_ldflags}
  9133. fi # $USE_ODBC
  9134. # Done checking ODBC
  9135. # Enable FFTW option
  9136. echo $ac_n "checking whether to use FFTW""... $ac_c" 1>&6
  9137. echo "configure:11547: checking whether to use FFTW" >&5
  9138. echo "$ac_t"""$with_fftw"" 1>&6
  9139. case "$with_fftw" in
  9140. "no") USE_FFTW= ;;
  9141. "yes") USE_FFTW="1" ;;
  9142. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9143. esac
  9144. FFTWINC=
  9145. FFTWLIB=
  9146. if test -n "$USE_FFTW"; then
  9147. # With FFTW includes directory
  9148. echo $ac_n "checking for location of FFTW includes""... $ac_c" 1>&6
  9149. echo "configure:11566: checking for location of FFTW includes" >&5
  9150. case "$with_fftw_includes" in
  9151. y | ye | yes | n | no)
  9152. { echo "configure: error: *** You must supply a directory to --with-fftw-includes." 1>&2; exit 1; }
  9153. ;;
  9154. esac
  9155. echo "$ac_t""$with_fftw_includes" 1>&6
  9156. if test -n "$with_fftw_includes" ; then
  9157. for dir in $with_fftw_includes; do
  9158. if test -d "$dir"; then
  9159. FFTWINC="$FFTWINC -I$dir"
  9160. else
  9161. { echo "configure: error: *** FFTW includes directory $dir does not exist." 1>&2; exit 1; }
  9162. fi
  9163. done
  9164. fi
  9165. ac_save_cppflags="$CPPFLAGS"
  9166. CPPFLAGS="$FFTWINC $CPPFLAGS"
  9167. for ac_hdr in fftw3.h
  9168. do
  9169. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9170. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9171. echo "configure:11592: checking for $ac_hdr" >&5
  9172. cat > conftest.$ac_ext <<EOF
  9173. #line 11595 "configure"
  9174. #include "confdefs.h"
  9175. #include <$ac_hdr>
  9176. EOF
  9177. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9178. { (eval echo configure:11600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9179. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9180. if test -z "$ac_err"; then
  9181. rm -rf conftest*
  9182. eval "ac_cv_header_$ac_safe=yes"
  9183. else
  9184. echo "$ac_err" >&5
  9185. echo "configure: failed program was:" >&5
  9186. cat conftest.$ac_ext >&5
  9187. rm -rf conftest*
  9188. eval "ac_cv_header_$ac_safe=no"
  9189. fi
  9190. rm -f conftest*
  9191. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9192. echo "$ac_t""yes" 1>&6
  9193. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9194. cat >> confdefs.h <<EOF
  9195. #define $ac_tr_hdr 1
  9196. EOF
  9197. else
  9198. echo "$ac_t""no" 1>&6
  9199. ac_save_cppflags="$CPPFLAGS"
  9200. CPPFLAGS=" $CPPFLAGS"
  9201. for ac_hdr in fftw.h
  9202. do
  9203. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9204. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9205. echo "configure:11628: checking for $ac_hdr" >&5
  9206. cat > conftest.$ac_ext <<EOF
  9207. #line 11631 "configure"
  9208. #include "confdefs.h"
  9209. #include <$ac_hdr>
  9210. EOF
  9211. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9212. { (eval echo configure:11636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9213. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9214. if test -z "$ac_err"; then
  9215. rm -rf conftest*
  9216. eval "ac_cv_header_$ac_safe=yes"
  9217. else
  9218. echo "$ac_err" >&5
  9219. echo "configure: failed program was:" >&5
  9220. cat conftest.$ac_ext >&5
  9221. rm -rf conftest*
  9222. eval "ac_cv_header_$ac_safe=no"
  9223. fi
  9224. rm -f conftest*
  9225. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9226. echo "$ac_t""yes" 1>&6
  9227. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9228. cat >> confdefs.h <<EOF
  9229. #define $ac_tr_hdr 1
  9230. EOF
  9231. else
  9232. echo "$ac_t""no" 1>&6
  9233. ac_save_cppflags="$CPPFLAGS"
  9234. CPPFLAGS=" $CPPFLAGS"
  9235. for ac_hdr in dfftw.h
  9236. do
  9237. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9238. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9239. echo "configure:11664: checking for $ac_hdr" >&5
  9240. cat > conftest.$ac_ext <<EOF
  9241. #line 11667 "configure"
  9242. #include "confdefs.h"
  9243. #include <$ac_hdr>
  9244. EOF
  9245. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9246. { (eval echo configure:11672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9247. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9248. if test -z "$ac_err"; then
  9249. rm -rf conftest*
  9250. eval "ac_cv_header_$ac_safe=yes"
  9251. else
  9252. echo "$ac_err" >&5
  9253. echo "configure: failed program was:" >&5
  9254. cat conftest.$ac_ext >&5
  9255. rm -rf conftest*
  9256. eval "ac_cv_header_$ac_safe=no"
  9257. fi
  9258. rm -f conftest*
  9259. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9260. echo "$ac_t""yes" 1>&6
  9261. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9262. cat >> confdefs.h <<EOF
  9263. #define $ac_tr_hdr 1
  9264. EOF
  9265. else
  9266. echo "$ac_t""no" 1>&6
  9267. { echo "configure: error: *** Unable to locate FFTW includes." 1>&2; exit 1; }
  9268. fi
  9269. done
  9270. CPPFLAGS=$ac_save_cppflags
  9271. fi
  9272. done
  9273. CPPFLAGS=$ac_save_cppflags
  9274. fi
  9275. done
  9276. CPPFLAGS=$ac_save_cppflags
  9277. # With FFTW library directory
  9278. echo $ac_n "checking for location of FFTW library""... $ac_c" 1>&6
  9279. echo "configure:11718: checking for location of FFTW library" >&5
  9280. case "$with_fftw_libs" in
  9281. y | ye | yes | n | no)
  9282. { echo "configure: error: *** You must supply a directory to --with-fftw-libs." 1>&2; exit 1; }
  9283. ;;
  9284. esac
  9285. echo "$ac_t""$with_fftw_libs" 1>&6
  9286. if test -n "$with_fftw_libs"; then
  9287. for dir in $with_fftw_libs; do
  9288. if test -d "$dir"; then
  9289. FFTWLIB="$FFTWLIB -L$dir"
  9290. else
  9291. { echo "configure: error: *** FFTW library directory $dir does not exist." 1>&2; exit 1; }
  9292. fi
  9293. done
  9294. fi
  9295. ac_save_ldflags="$LDFLAGS"
  9296. LDFLAGS="$FFTWLIB $LDFLAGS"
  9297. echo $ac_n "checking for fftw_execute in -lfftw3""... $ac_c" 1>&6
  9298. echo "configure:11743: checking for fftw_execute in -lfftw3" >&5
  9299. ac_lib_var=`echo fftw3'_'fftw_execute | sed 'y%./+-%__p_%'`
  9300. ac_save_LIBS="$LIBS"
  9301. LIBS="-lfftw3 $MATHLIB $LIBS"
  9302. cat > conftest.$ac_ext <<EOF
  9303. #line 11749 "configure"
  9304. #include "confdefs.h"
  9305. /* Override any gcc2 internal prototype to avoid an error. */
  9306. /* We use char because int might match the return type of a gcc2
  9307. builtin and then its argument prototype would still apply. */
  9308. char fftw_execute();
  9309. int main() {
  9310. fftw_execute()
  9311. ; return 0; }
  9312. EOF
  9313. if { (eval echo configure:11760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9314. rm -rf conftest*
  9315. eval "ac_cv_lib_$ac_lib_var=yes"
  9316. else
  9317. echo "configure: failed program was:" >&5
  9318. cat conftest.$ac_ext >&5
  9319. rm -rf conftest*
  9320. eval "ac_cv_lib_$ac_lib_var=no"
  9321. fi
  9322. rm -f conftest*
  9323. LIBS="$ac_save_LIBS"
  9324. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9325. echo "$ac_t""yes" 1>&6
  9326. FFTWLIB="$FFTWLIB -lfftw3 $MATHLIB"
  9327. else
  9328. echo "$ac_t""no" 1>&6
  9329. LDFLAGS=${ac_save_ldflags}
  9330. ac_save_ldflags="$LDFLAGS"
  9331. LDFLAGS="$FFTWLIB $LDFLAGS"
  9332. echo $ac_n "checking for fftwnd_one in -lfftw""... $ac_c" 1>&6
  9333. echo "configure:11785: checking for fftwnd_one in -lfftw" >&5
  9334. ac_lib_var=`echo fftw'_'fftwnd_one | sed 'y%./+-%__p_%'`
  9335. ac_save_LIBS="$LIBS"
  9336. LIBS="-lfftw $MATHLIB $LIBS"
  9337. cat > conftest.$ac_ext <<EOF
  9338. #line 11791 "configure"
  9339. #include "confdefs.h"
  9340. /* Override any gcc2 internal prototype to avoid an error. */
  9341. /* We use char because int might match the return type of a gcc2
  9342. builtin and then its argument prototype would still apply. */
  9343. char fftwnd_one();
  9344. int main() {
  9345. fftwnd_one()
  9346. ; return 0; }
  9347. EOF
  9348. if { (eval echo configure:11802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9349. rm -rf conftest*
  9350. eval "ac_cv_lib_$ac_lib_var=yes"
  9351. else
  9352. echo "configure: failed program was:" >&5
  9353. cat conftest.$ac_ext >&5
  9354. rm -rf conftest*
  9355. eval "ac_cv_lib_$ac_lib_var=no"
  9356. fi
  9357. rm -f conftest*
  9358. LIBS="$ac_save_LIBS"
  9359. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9360. echo "$ac_t""yes" 1>&6
  9361. FFTWLIB="$FFTWLIB -lfftw $MATHLIB"
  9362. else
  9363. echo "$ac_t""no" 1>&6
  9364. LDFLAGS=${ac_save_ldflags}
  9365. ac_save_ldflags="$LDFLAGS"
  9366. LDFLAGS="$FFTWLIB $LDFLAGS"
  9367. echo $ac_n "checking for fftwnd_one in -ldfftw""... $ac_c" 1>&6
  9368. echo "configure:11827: checking for fftwnd_one in -ldfftw" >&5
  9369. ac_lib_var=`echo dfftw'_'fftwnd_one | sed 'y%./+-%__p_%'`
  9370. ac_save_LIBS="$LIBS"
  9371. LIBS="-ldfftw $MATHLIB $LIBS"
  9372. cat > conftest.$ac_ext <<EOF
  9373. #line 11833 "configure"
  9374. #include "confdefs.h"
  9375. /* Override any gcc2 internal prototype to avoid an error. */
  9376. /* We use char because int might match the return type of a gcc2
  9377. builtin and then its argument prototype would still apply. */
  9378. char fftwnd_one();
  9379. int main() {
  9380. fftwnd_one()
  9381. ; return 0; }
  9382. EOF
  9383. if { (eval echo configure:11844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9384. rm -rf conftest*
  9385. eval "ac_cv_lib_$ac_lib_var=yes"
  9386. else
  9387. echo "configure: failed program was:" >&5
  9388. cat conftest.$ac_ext >&5
  9389. rm -rf conftest*
  9390. eval "ac_cv_lib_$ac_lib_var=no"
  9391. fi
  9392. rm -f conftest*
  9393. LIBS="$ac_save_LIBS"
  9394. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9395. echo "$ac_t""yes" 1>&6
  9396. FFTWLIB="$FFTWLIB -ldfftw $MATHLIB"
  9397. else
  9398. echo "$ac_t""no" 1>&6
  9399. LDFLAGS=${ac_save_ldflags}
  9400. { echo "configure: error: *** Unable to locate FFTW library." 1>&2; exit 1; }
  9401. fi
  9402. LDFLAGS=${ac_save_ldflags}
  9403. fi
  9404. LDFLAGS=${ac_save_ldflags}
  9405. fi
  9406. LDFLAGS=${ac_save_ldflags}
  9407. fi # $USE_FFTW
  9408. # Done checking FFTW
  9409. # Enable BLAS option
  9410. echo $ac_n "checking whether to use BLAS""... $ac_c" 1>&6
  9411. echo "configure:11901: checking whether to use BLAS" >&5
  9412. echo "$ac_t"""$with_blas"" 1>&6
  9413. case "$with_blas" in
  9414. "no") USE_BLAS= ;;
  9415. "yes") USE_BLAS="1" ;;
  9416. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9417. esac
  9418. BLASLIB=
  9419. BLASINC=
  9420. if test -n "$USE_BLAS"; then
  9421. # With BLAS includes directory
  9422. # BLAS doesn't have includes (FORTRAN library)
  9423. # With BLAS library directory
  9424. echo $ac_n "checking for location of BLAS includes""... $ac_c" 1>&6
  9425. echo "configure:11922: checking for location of BLAS includes" >&5
  9426. case "$with_blas_includes" in
  9427. y | ye | yes | n | no)
  9428. { echo "configure: error: *** You must supply a directory to --with-blas-includes." 1>&2; exit 1; }
  9429. ;;
  9430. esac
  9431. echo "$ac_t""$with_blas_includes" 1>&6
  9432. if test -n "$with_blas_includes" ; then
  9433. for dir in $with_blas_includes; do
  9434. if test -d "$dir"; then
  9435. BLASINC="$BLASINC -I$dir"
  9436. else
  9437. { echo "configure: error: *** BLAS includes directory $dir does not exist." 1>&2; exit 1; }
  9438. fi
  9439. done
  9440. fi
  9441. echo $ac_n "checking for location of BLAS library""... $ac_c" 1>&6
  9442. echo "configure:11942: checking for location of BLAS library" >&5
  9443. case "$with_blas_libs" in
  9444. y | ye | yes | n | no)
  9445. { echo "configure: error: *** You must supply a directory to --with-blas-libs." 1>&2; exit 1; }
  9446. ;;
  9447. esac
  9448. echo "$ac_t""$with_blas_libs" 1>&6
  9449. if test -n "$with_blas_libs"; then
  9450. for dir in $with_blas_libs; do
  9451. if test -d "$dir"; then
  9452. BLASLIB="$BLASLIB -L$dir"
  9453. else
  9454. { echo "configure: error: *** BLAS library directory $dir does not exist." 1>&2; exit 1; }
  9455. fi
  9456. done
  9457. fi
  9458. # See if cblas.h exists (CBLAS,ATLAS,others)
  9459. save_CPPFLAGS="$CPPFLAGS"
  9460. CPPFLAGS="$BLASINC $CPPFLAGS"
  9461. for ac_hdr in cblas.h
  9462. do
  9463. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9464. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9465. echo "configure:11968: checking for $ac_hdr" >&5
  9466. cat > conftest.$ac_ext <<EOF
  9467. #line 11971 "configure"
  9468. #include "confdefs.h"
  9469. #include <$ac_hdr>
  9470. EOF
  9471. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9472. { (eval echo configure:11976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9473. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9474. if test -z "$ac_err"; then
  9475. rm -rf conftest*
  9476. eval "ac_cv_header_$ac_safe=yes"
  9477. else
  9478. echo "$ac_err" >&5
  9479. echo "configure: failed program was:" >&5
  9480. cat conftest.$ac_ext >&5
  9481. rm -rf conftest*
  9482. eval "ac_cv_header_$ac_safe=no"
  9483. fi
  9484. rm -f conftest*
  9485. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9486. echo "$ac_t""yes" 1>&6
  9487. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  9488. cat >> confdefs.h <<EOF
  9489. #define $ac_tr_hdr 1
  9490. EOF
  9491. else
  9492. echo "$ac_t""no" 1>&6
  9493. fi
  9494. done
  9495. CPPFLAGS="$save_CPPFLAGS"
  9496. ac_save_ldflags="$LDFLAGS"
  9497. LDFLAGS="$BLASLIB $LDFLAGS"
  9498. echo $ac_n "checking for dnrm2_ in -lblas""... $ac_c" 1>&6
  9499. echo "configure:12011: checking for dnrm2_ in -lblas" >&5
  9500. ac_lib_var=`echo blas'_'dnrm2_ | sed 'y%./+-%__p_%'`
  9501. ac_save_LIBS="$LIBS"
  9502. LIBS="-lblas $MATHLIB $LIBS"
  9503. cat > conftest.$ac_ext <<EOF
  9504. #line 12017 "configure"
  9505. #include "confdefs.h"
  9506. /* Override any gcc2 internal prototype to avoid an error. */
  9507. /* We use char because int might match the return type of a gcc2
  9508. builtin and then its argument prototype would still apply. */
  9509. char dnrm2_();
  9510. int main() {
  9511. dnrm2_()
  9512. ; return 0; }
  9513. EOF
  9514. if { (eval echo configure:12028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9515. rm -rf conftest*
  9516. eval "ac_cv_lib_$ac_lib_var=yes"
  9517. else
  9518. echo "configure: failed program was:" >&5
  9519. cat conftest.$ac_ext >&5
  9520. rm -rf conftest*
  9521. eval "ac_cv_lib_$ac_lib_var=no"
  9522. fi
  9523. rm -f conftest*
  9524. LIBS="$ac_save_LIBS"
  9525. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9526. echo "$ac_t""yes" 1>&6
  9527. BLASLIB="$BLASLIB -lblas "
  9528. else
  9529. echo "$ac_t""no" 1>&6
  9530. echo $ac_n "checking for dnrm2_ in -lblas""... $ac_c" 1>&6
  9531. echo "configure:12047: checking for dnrm2_ in -lblas" >&5
  9532. ac_lib_var=`echo blas'_'dnrm2_ | sed 'y%./+-%__p_%'`
  9533. ac_save_LIBS="$LIBS"
  9534. LIBS="-lblas $MATHLIB -lg2c $LIBS"
  9535. cat > conftest.$ac_ext <<EOF
  9536. #line 12053 "configure"
  9537. #include "confdefs.h"
  9538. /* Override any gcc2 internal prototype to avoid an error. */
  9539. /* We use char because int might match the return type of a gcc2
  9540. builtin and then its argument prototype would still apply. */
  9541. char dnrm2_();
  9542. int main() {
  9543. dnrm2_()
  9544. ; return 0; }
  9545. EOF
  9546. if { (eval echo configure:12064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9547. rm -rf conftest*
  9548. eval "ac_cv_lib_$ac_lib_var=yes"
  9549. else
  9550. echo "configure: failed program was:" >&5
  9551. cat conftest.$ac_ext >&5
  9552. rm -rf conftest*
  9553. eval "ac_cv_lib_$ac_lib_var=no"
  9554. fi
  9555. rm -f conftest*
  9556. LIBS="$ac_save_LIBS"
  9557. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9558. echo "$ac_t""yes" 1>&6
  9559. BLASLIB="$BLASLIB -lblas -lg2c"
  9560. else
  9561. echo "$ac_t""no" 1>&6
  9562. LDFLAGS=${ac_save_ldflags}
  9563. { echo "configure: error: *** Unable to locate BLAS library." 1>&2; exit 1; }
  9564. fi
  9565. fi
  9566. LDFLAGS=${ac_save_ldflags}
  9567. blas_ok=no
  9568. # Check for ATLAS
  9569. save_LDFLAGS="$LDFLAGS"
  9570. LDFLAGS="$BLASLIB $LDFLAGS"
  9571. echo $ac_n "checking for ATL_xerbla in -latlas""... $ac_c" 1>&6
  9572. echo "configure:12108: checking for ATL_xerbla in -latlas" >&5
  9573. ac_lib_var=`echo atlas'_'ATL_xerbla | sed 'y%./+-%__p_%'`
  9574. ac_save_LIBS="$LIBS"
  9575. LIBS="-latlas $LIBS"
  9576. cat > conftest.$ac_ext <<EOF
  9577. #line 12114 "configure"
  9578. #include "confdefs.h"
  9579. /* Override any gcc2 internal prototype to avoid an error. */
  9580. /* We use char because int might match the return type of a gcc2
  9581. builtin and then its argument prototype would still apply. */
  9582. char ATL_xerbla();
  9583. int main() {
  9584. ATL_xerbla()
  9585. ; return 0; }
  9586. EOF
  9587. if { (eval echo configure:12125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9588. rm -rf conftest*
  9589. eval "ac_cv_lib_$ac_lib_var=yes"
  9590. else
  9591. echo "configure: failed program was:" >&5
  9592. cat conftest.$ac_ext >&5
  9593. rm -rf conftest*
  9594. eval "ac_cv_lib_$ac_lib_var=no"
  9595. fi
  9596. rm -f conftest*
  9597. LIBS="$ac_save_LIBS"
  9598. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9599. echo "$ac_t""yes" 1>&6
  9600. echo $ac_n "checking for sgemm_ in -lf77blas""... $ac_c" 1>&6
  9601. echo "configure:12140: checking for sgemm_ in -lf77blas" >&5
  9602. ac_lib_var=`echo f77blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  9603. ac_save_LIBS="$LIBS"
  9604. LIBS="-lf77blas -latlas $LIBS"
  9605. cat > conftest.$ac_ext <<EOF
  9606. #line 12146 "configure"
  9607. #include "confdefs.h"
  9608. /* Override any gcc2 internal prototype to avoid an error. */
  9609. /* We use char because int might match the return type of a gcc2
  9610. builtin and then its argument prototype would still apply. */
  9611. char sgemm_();
  9612. int main() {
  9613. sgemm_()
  9614. ; return 0; }
  9615. EOF
  9616. if { (eval echo configure:12157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9617. rm -rf conftest*
  9618. eval "ac_cv_lib_$ac_lib_var=yes"
  9619. else
  9620. echo "configure: failed program was:" >&5
  9621. cat conftest.$ac_ext >&5
  9622. rm -rf conftest*
  9623. eval "ac_cv_lib_$ac_lib_var=no"
  9624. fi
  9625. rm -f conftest*
  9626. LIBS="$ac_save_LIBS"
  9627. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9628. echo "$ac_t""yes" 1>&6
  9629. echo $ac_n "checking for cblas_dgemm in -lcblas""... $ac_c" 1>&6
  9630. echo "configure:12172: checking for cblas_dgemm in -lcblas" >&5
  9631. ac_lib_var=`echo cblas'_'cblas_dgemm | sed 'y%./+-%__p_%'`
  9632. ac_save_LIBS="$LIBS"
  9633. LIBS="-lcblas -lf77blas -latlas $LIBS"
  9634. cat > conftest.$ac_ext <<EOF
  9635. #line 12178 "configure"
  9636. #include "confdefs.h"
  9637. /* Override any gcc2 internal prototype to avoid an error. */
  9638. /* We use char because int might match the return type of a gcc2
  9639. builtin and then its argument prototype would still apply. */
  9640. char cblas_dgemm();
  9641. int main() {
  9642. cblas_dgemm()
  9643. ; return 0; }
  9644. EOF
  9645. if { (eval echo configure:12189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9646. rm -rf conftest*
  9647. eval "ac_cv_lib_$ac_lib_var=yes"
  9648. else
  9649. echo "configure: failed program was:" >&5
  9650. cat conftest.$ac_ext >&5
  9651. rm -rf conftest*
  9652. eval "ac_cv_lib_$ac_lib_var=no"
  9653. fi
  9654. rm -f conftest*
  9655. LIBS="$ac_save_LIBS"
  9656. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9657. echo "$ac_t""yes" 1>&6
  9658. blas_ok=yes; BLASLIB="-lcblas -lf77blas -latlas"
  9659. else
  9660. echo "$ac_t""no" 1>&6
  9661. fi
  9662. else
  9663. echo "$ac_t""no" 1>&6
  9664. fi
  9665. else
  9666. echo "$ac_t""no" 1>&6
  9667. fi
  9668. LDFLAGS="$save_LDFLAGS"
  9669. # Do we have ATLAS?
  9670. if test $blas_ok = yes; then
  9671. cat >> confdefs.h <<\EOF
  9672. #define HAVE_LIBATLAS 1
  9673. EOF
  9674. fi
  9675. # BLAS in Apple vecLib framework? (Mac OS-X)
  9676. # not dependent on APP build
  9677. #if test -n "$MACOSX_APP"; then
  9678. if test $blas_ok = no; then
  9679. vlib_flags="-framework vecLib"
  9680. save_LIBS="$LIBS"
  9681. LIBS="$vlib_flags $LIBS"
  9682. echo $ac_n "checking for sgemm in $vlib_flags""... $ac_c" 1>&6
  9683. echo "configure:12235: checking for sgemm in $vlib_flags" >&5
  9684. cat > conftest.$ac_ext <<EOF
  9685. #line 12237 "configure"
  9686. #include "confdefs.h"
  9687. int main() {
  9688. sgemm
  9689. ; return 0; }
  9690. EOF
  9691. if { (eval echo configure:12244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9692. rm -rf conftest*
  9693. blas_ok=yes; BLASLIB="$vlib_flags"
  9694. else
  9695. echo "configure: failed program was:" >&5
  9696. cat conftest.$ac_ext >&5
  9697. rm -rf conftest*
  9698. BLASLIB=""
  9699. fi
  9700. rm -f conftest*
  9701. echo "$ac_t""$blas_ok" 1>&6
  9702. LIBS="$save_LIBS"
  9703. fi
  9704. #fi # $MACOSX_APP
  9705. # BLAS in PhiPACK libraries? (requires generic BLAS, too)
  9706. if test $blas_ok = no; then
  9707. echo $ac_n "checking for sgemm_ in -lblas""... $ac_c" 1>&6
  9708. echo "configure:12262: checking for sgemm_ in -lblas" >&5
  9709. ac_lib_var=`echo blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  9710. ac_save_LIBS="$LIBS"
  9711. LIBS="-lblas $LIBS"
  9712. cat > conftest.$ac_ext <<EOF
  9713. #line 12268 "configure"
  9714. #include "confdefs.h"
  9715. /* Override any gcc2 internal prototype to avoid an error. */
  9716. /* We use char because int might match the return type of a gcc2
  9717. builtin and then its argument prototype would still apply. */
  9718. char sgemm_();
  9719. int main() {
  9720. sgemm_()
  9721. ; return 0; }
  9722. EOF
  9723. if { (eval echo configure:12279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9724. rm -rf conftest*
  9725. eval "ac_cv_lib_$ac_lib_var=yes"
  9726. else
  9727. echo "configure: failed program was:" >&5
  9728. cat conftest.$ac_ext >&5
  9729. rm -rf conftest*
  9730. eval "ac_cv_lib_$ac_lib_var=no"
  9731. fi
  9732. rm -f conftest*
  9733. LIBS="$ac_save_LIBS"
  9734. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9735. echo "$ac_t""yes" 1>&6
  9736. echo $ac_n "checking for dgemm_ in -ldgemm""... $ac_c" 1>&6
  9737. echo "configure:12294: checking for dgemm_ in -ldgemm" >&5
  9738. ac_lib_var=`echo dgemm'_'dgemm_ | sed 'y%./+-%__p_%'`
  9739. ac_save_LIBS="$LIBS"
  9740. LIBS="-ldgemm -lblas $LIBS"
  9741. cat > conftest.$ac_ext <<EOF
  9742. #line 12300 "configure"
  9743. #include "confdefs.h"
  9744. /* Override any gcc2 internal prototype to avoid an error. */
  9745. /* We use char because int might match the return type of a gcc2
  9746. builtin and then its argument prototype would still apply. */
  9747. char dgemm_();
  9748. int main() {
  9749. dgemm_()
  9750. ; return 0; }
  9751. EOF
  9752. if { (eval echo configure:12311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9753. rm -rf conftest*
  9754. eval "ac_cv_lib_$ac_lib_var=yes"
  9755. else
  9756. echo "configure: failed program was:" >&5
  9757. cat conftest.$ac_ext >&5
  9758. rm -rf conftest*
  9759. eval "ac_cv_lib_$ac_lib_var=no"
  9760. fi
  9761. rm -f conftest*
  9762. LIBS="$ac_save_LIBS"
  9763. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9764. echo "$ac_t""yes" 1>&6
  9765. echo $ac_n "checking for sgemm_ in -lsgemm""... $ac_c" 1>&6
  9766. echo "configure:12326: checking for sgemm_ in -lsgemm" >&5
  9767. ac_lib_var=`echo sgemm'_'sgemm_ | sed 'y%./+-%__p_%'`
  9768. ac_save_LIBS="$LIBS"
  9769. LIBS="-lsgemm -lblas $LIBS"
  9770. cat > conftest.$ac_ext <<EOF
  9771. #line 12332 "configure"
  9772. #include "confdefs.h"
  9773. /* Override any gcc2 internal prototype to avoid an error. */
  9774. /* We use char because int might match the return type of a gcc2
  9775. builtin and then its argument prototype would still apply. */
  9776. char sgemm_();
  9777. int main() {
  9778. sgemm_()
  9779. ; return 0; }
  9780. EOF
  9781. if { (eval echo configure:12343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9782. rm -rf conftest*
  9783. eval "ac_cv_lib_$ac_lib_var=yes"
  9784. else
  9785. echo "configure: failed program was:" >&5
  9786. cat conftest.$ac_ext >&5
  9787. rm -rf conftest*
  9788. eval "ac_cv_lib_$ac_lib_var=no"
  9789. fi
  9790. rm -f conftest*
  9791. LIBS="$ac_save_LIBS"
  9792. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9793. echo "$ac_t""yes" 1>&6
  9794. blas_ok=yes; BLASLIB="-lsgemm -ldgemm -lblas"
  9795. else
  9796. echo "$ac_t""no" 1>&6
  9797. fi
  9798. else
  9799. echo "$ac_t""no" 1>&6
  9800. fi
  9801. else
  9802. echo "$ac_t""no" 1>&6
  9803. fi
  9804. fi
  9805. # BLAS in Sun Performance library?
  9806. if test $blas_ok = no; then
  9807. if test "x$GCC" != xyes; then # only works with Sun CC
  9808. echo $ac_n "checking for acosp in -lsunmath""... $ac_c" 1>&6
  9809. echo "configure:12377: checking for acosp in -lsunmath" >&5
  9810. ac_lib_var=`echo sunmath'_'acosp | sed 'y%./+-%__p_%'`
  9811. ac_save_LIBS="$LIBS"
  9812. LIBS="-lsunmath $LIBS"
  9813. cat > conftest.$ac_ext <<EOF
  9814. #line 12383 "configure"
  9815. #include "confdefs.h"
  9816. /* Override any gcc2 internal prototype to avoid an error. */
  9817. /* We use char because int might match the return type of a gcc2
  9818. builtin and then its argument prototype would still apply. */
  9819. char acosp();
  9820. int main() {
  9821. acosp()
  9822. ; return 0; }
  9823. EOF
  9824. if { (eval echo configure:12394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9825. rm -rf conftest*
  9826. eval "ac_cv_lib_$ac_lib_var=yes"
  9827. else
  9828. echo "configure: failed program was:" >&5
  9829. cat conftest.$ac_ext >&5
  9830. rm -rf conftest*
  9831. eval "ac_cv_lib_$ac_lib_var=no"
  9832. fi
  9833. rm -f conftest*
  9834. LIBS="$ac_save_LIBS"
  9835. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9836. echo "$ac_t""yes" 1>&6
  9837. echo $ac_n "checking for sgemm_ in -lsunperf""... $ac_c" 1>&6
  9838. echo "configure:12409: checking for sgemm_ in -lsunperf" >&5
  9839. ac_lib_var=`echo sunperf'_'sgemm_ | sed 'y%./+-%__p_%'`
  9840. ac_save_LIBS="$LIBS"
  9841. LIBS="-lsunperf -lsunmath $LIBS"
  9842. cat > conftest.$ac_ext <<EOF
  9843. #line 12415 "configure"
  9844. #include "confdefs.h"
  9845. /* Override any gcc2 internal prototype to avoid an error. */
  9846. /* We use char because int might match the return type of a gcc2
  9847. builtin and then its argument prototype would still apply. */
  9848. char sgemm_();
  9849. int main() {
  9850. sgemm_()
  9851. ; return 0; }
  9852. EOF
  9853. if { (eval echo configure:12426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9854. rm -rf conftest*
  9855. eval "ac_cv_lib_$ac_lib_var=yes"
  9856. else
  9857. echo "configure: failed program was:" >&5
  9858. cat conftest.$ac_ext >&5
  9859. rm -rf conftest*
  9860. eval "ac_cv_lib_$ac_lib_var=no"
  9861. fi
  9862. rm -f conftest*
  9863. LIBS="$ac_save_LIBS"
  9864. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9865. echo "$ac_t""yes" 1>&6
  9866. blas_ok=yes; BLASLIB="-xlic_lib=sunperf -lsunmath"
  9867. else
  9868. echo "$ac_t""no" 1>&6
  9869. fi
  9870. else
  9871. echo "$ac_t""no" 1>&6
  9872. fi
  9873. fi
  9874. fi
  9875. # Generic BLAS library
  9876. if test $blas_ok = no; then
  9877. echo $ac_n "checking for sgemm_ in -lblas""... $ac_c" 1>&6
  9878. echo "configure:12456: checking for sgemm_ in -lblas" >&5
  9879. ac_lib_var=`echo blas'_'sgemm_ | sed 'y%./+-%__p_%'`
  9880. ac_save_LIBS="$LIBS"
  9881. LIBS="-lblas $LIBS"
  9882. cat > conftest.$ac_ext <<EOF
  9883. #line 12462 "configure"
  9884. #include "confdefs.h"
  9885. /* Override any gcc2 internal prototype to avoid an error. */
  9886. /* We use char because int might match the return type of a gcc2
  9887. builtin and then its argument prototype would still apply. */
  9888. char sgemm_();
  9889. int main() {
  9890. sgemm_()
  9891. ; return 0; }
  9892. EOF
  9893. if { (eval echo configure:12473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9894. rm -rf conftest*
  9895. eval "ac_cv_lib_$ac_lib_var=yes"
  9896. else
  9897. echo "configure: failed program was:" >&5
  9898. cat conftest.$ac_ext >&5
  9899. rm -rf conftest*
  9900. eval "ac_cv_lib_$ac_lib_var=no"
  9901. fi
  9902. rm -f conftest*
  9903. LIBS="$ac_save_LIBS"
  9904. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9905. echo "$ac_t""yes" 1>&6
  9906. blas_ok=yes; BLASLIB="-lblas"
  9907. else
  9908. echo "$ac_t""no" 1>&6
  9909. fi
  9910. fi
  9911. if test $blas_ok = yes; then
  9912. cat >> confdefs.h <<\EOF
  9913. #define HAVE_LIBBLAS 1
  9914. EOF
  9915. fi
  9916. fi # $USE_BLAS
  9917. # Done checking BLAS
  9918. # Enable LAPACK option
  9919. echo $ac_n "checking whether to use LAPACK""... $ac_c" 1>&6
  9920. echo "configure:12512: checking whether to use LAPACK" >&5
  9921. echo "$ac_t"""$with_lapack"" 1>&6
  9922. case "$with_lapack" in
  9923. "no") USE_LAPACK= ;;
  9924. "yes") USE_LAPACK="1" ;;
  9925. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  9926. esac
  9927. LAPACKLIB=
  9928. LAPACKINC=
  9929. # LAPACK is useless without BLAS
  9930. if test -n "$USE_BLAS"; then
  9931. if test -n "$USE_LAPACK"; then
  9932. # With LAPACK includes directory
  9933. # LAPACK doesn't have includes (FORTRAN library)
  9934. # With LAPACK library directory
  9935. lapack_ok=no
  9936. echo $ac_n "checking for location of LAPACK includes""... $ac_c" 1>&6
  9937. echo "configure:12537: checking for location of LAPACK includes" >&5
  9938. case "$with_lapack_includes" in
  9939. y | ye | yes | n | no)
  9940. { echo "configure: error: *** You must supply a directory to --with-lapack-includes." 1>&2; exit 1; }
  9941. ;;
  9942. esac
  9943. echo "$ac_t""$with_lapack_includes" 1>&6
  9944. if test -n "$with_lapack_includes" ; then
  9945. for dir in $with_lapack_includes; do
  9946. if test -d "$dir"; then
  9947. LAPACKINC="$LAPACKINC -I$dir"
  9948. else
  9949. { echo "configure: error: *** LAPACK includes directory $dir does not exist." 1>&2; exit 1; }
  9950. fi
  9951. done
  9952. fi
  9953. echo $ac_n "checking for location of LAPACK library""... $ac_c" 1>&6
  9954. echo "configure:12557: checking for location of LAPACK library" >&5
  9955. case "$with_lapack_libs" in
  9956. y | ye | yes | n | no)
  9957. { echo "configure: error: *** You must supply a directory to --with-lapack-libs." 1>&2; exit 1; }
  9958. ;;
  9959. esac
  9960. echo "$ac_t""$with_lapack_libs" 1>&6
  9961. if test -n "$with_lapack_libs"; then
  9962. for dir in $with_lapack_libs; do
  9963. if test -d "$dir"; then
  9964. LAPACKLIB="$LAPACKLIB -L$dir"
  9965. else
  9966. { echo "configure: error: *** LAPACK library directory $dir does not exist." 1>&2; exit 1; }
  9967. fi
  9968. done
  9969. fi
  9970. # See if clapack.h exists (ATLAS)
  9971. save_CPPFLAGS="$CPPFLAGS"
  9972. CPPFLAGS="$LAPACKINC $CPPFLAGS"
  9973. for ac_hdr in clapack.h
  9974. do
  9975. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  9976. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  9977. echo "configure:12583: checking for $ac_hdr" >&5
  9978. cat > conftest.$ac_ext <<EOF
  9979. #line 12586 "configure"
  9980. #include "confdefs.h"
  9981. #include <$ac_hdr>
  9982. EOF
  9983. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  9984. { (eval echo configure:12591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  9985. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  9986. if test -z "$ac_err"; then
  9987. rm -rf conftest*
  9988. eval "ac_cv_header_$ac_safe=yes"
  9989. else
  9990. echo "$ac_err" >&5
  9991. echo "configure: failed program was:" >&5
  9992. cat conftest.$ac_ext >&5
  9993. rm -rf conftest*
  9994. eval "ac_cv_header_$ac_safe=no"
  9995. fi
  9996. rm -f conftest*
  9997. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  9998. echo "$ac_t""yes" 1>&6
  9999. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10000. cat >> confdefs.h <<EOF
  10001. #define $ac_tr_hdr 1
  10002. EOF
  10003. else
  10004. echo "$ac_t""no" 1>&6
  10005. fi
  10006. done
  10007. CPPFLAGS="$save_CPPFLAGS"
  10008. # LAPACK linked to by default?
  10009. if test lapack_ok=no; then
  10010. save_LIBS="$LIBS"; LIBS="$LIBS $BLASLIB $MATHLIB $FLIBS"
  10011. save_LDFLAGS="$LDFLAGS"; LDFLAGS="$LAPACKLIB $LDFLAGS"
  10012. echo $ac_n "checking for dsegv_""... $ac_c" 1>&6
  10013. echo "configure:12623: checking for dsegv_" >&5
  10014. cat > conftest.$ac_ext <<EOF
  10015. #line 12626 "configure"
  10016. #include "confdefs.h"
  10017. /* System header to define __stub macros and hopefully few prototypes,
  10018. which can conflict with char dsegv_(); below. */
  10019. #include <assert.h>
  10020. /* Override any gcc2 internal prototype to avoid an error. */
  10021. /* We use char because int might match the return type of a gcc2
  10022. builtin and then its argument prototype would still apply. */
  10023. char dsegv_();
  10024. int main() {
  10025. /* The GNU C library defines this for functions which it implements
  10026. to always fail with ENOSYS. Some functions are actually named
  10027. something starting with __ and the normal name is an alias. */
  10028. #if defined (__stub_dsegv_) || defined (__stub___dsegv_)
  10029. choke me
  10030. #else
  10031. dsegv_();
  10032. #endif
  10033. ; return 0; }
  10034. EOF
  10035. if { (eval echo configure:12649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10036. rm -rf conftest*
  10037. eval "ac_cv_func_dsegv_=yes"
  10038. else
  10039. echo "configure: failed program was:" >&5
  10040. cat conftest.$ac_ext >&5
  10041. rm -rf conftest*
  10042. eval "ac_cv_func_dsegv_=no"
  10043. fi
  10044. rm -f conftest*
  10045. if eval "test \"`echo '$ac_cv_func_'dsegv_`\" = yes"; then
  10046. echo "$ac_t""yes" 1>&6
  10047. lapack_ok=yes
  10048. else
  10049. echo "$ac_t""no" 1>&6
  10050. fi
  10051. LIBS="$save_LIBS"
  10052. LDFLAGS="$save_LDFLAGS"
  10053. fi
  10054. # Generic LAPACK library?
  10055. if test $lapack_ok = no; then
  10056. save_libs="$LIBS"; LIBS="$BLASLIB $MATHLIB $LIBS"
  10057. save_LDFLAGS="$LDFLAGS"; LDFLAGS="$LAPACKLIB $LDFLAGS"
  10058. echo $ac_n "checking for desgv_ in -llapack""... $ac_c" 1>&6
  10059. echo "configure:12676: checking for desgv_ in -llapack" >&5
  10060. ac_lib_var=`echo lapack'_'desgv_ | sed 'y%./+-%__p_%'`
  10061. ac_save_LIBS="$LIBS"
  10062. LIBS="-llapack $FLIBS $LIBS"
  10063. cat > conftest.$ac_ext <<EOF
  10064. #line 12682 "configure"
  10065. #include "confdefs.h"
  10066. /* Override any gcc2 internal prototype to avoid an error. */
  10067. /* We use char because int might match the return type of a gcc2
  10068. builtin and then its argument prototype would still apply. */
  10069. char desgv_();
  10070. int main() {
  10071. desgv_()
  10072. ; return 0; }
  10073. EOF
  10074. if { (eval echo configure:12693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10075. rm -rf conftest*
  10076. eval "ac_cv_lib_$ac_lib_var=yes"
  10077. else
  10078. echo "configure: failed program was:" >&5
  10079. cat conftest.$ac_ext >&5
  10080. rm -rf conftest*
  10081. eval "ac_cv_lib_$ac_lib_var=no"
  10082. fi
  10083. rm -f conftest*
  10084. LIBS="$ac_save_LIBS"
  10085. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10086. echo "$ac_t""yes" 1>&6
  10087. lapack_ok=yes; LAPACKLIB="-llapack"
  10088. else
  10089. echo "$ac_t""no" 1>&6
  10090. fi
  10091. LIBS="$save_LIBS"
  10092. LDFLAGS="$save_LDFLAGS"
  10093. fi
  10094. if test $lapack_ok = no; then
  10095. ac_save_ldflags="$LDFLAGS"
  10096. LDFLAGS="$LAPACKLIB $LDFLAGS"
  10097. echo $ac_n "checking for dgesv_ in -llapack""... $ac_c" 1>&6
  10098. echo "configure:12725: checking for dgesv_ in -llapack" >&5
  10099. ac_lib_var=`echo lapack'_'dgesv_ | sed 'y%./+-%__p_%'`
  10100. ac_save_LIBS="$LIBS"
  10101. LIBS="-llapack $BLASLIB $MATHLIB $LIBS"
  10102. cat > conftest.$ac_ext <<EOF
  10103. #line 12731 "configure"
  10104. #include "confdefs.h"
  10105. /* Override any gcc2 internal prototype to avoid an error. */
  10106. /* We use char because int might match the return type of a gcc2
  10107. builtin and then its argument prototype would still apply. */
  10108. char dgesv_();
  10109. int main() {
  10110. dgesv_()
  10111. ; return 0; }
  10112. EOF
  10113. if { (eval echo configure:12742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10114. rm -rf conftest*
  10115. eval "ac_cv_lib_$ac_lib_var=yes"
  10116. else
  10117. echo "configure: failed program was:" >&5
  10118. cat conftest.$ac_ext >&5
  10119. rm -rf conftest*
  10120. eval "ac_cv_lib_$ac_lib_var=no"
  10121. fi
  10122. rm -f conftest*
  10123. LIBS="$ac_save_LIBS"
  10124. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10125. echo "$ac_t""yes" 1>&6
  10126. LAPACKLIB="$LAPACKLIB -llapack "
  10127. else
  10128. echo "$ac_t""no" 1>&6
  10129. echo $ac_n "checking for dgesv_ in -llapack""... $ac_c" 1>&6
  10130. echo "configure:12761: checking for dgesv_ in -llapack" >&5
  10131. ac_lib_var=`echo lapack'_'dgesv_ | sed 'y%./+-%__p_%'`
  10132. ac_save_LIBS="$LIBS"
  10133. LIBS="-llapack $BLASLIB $MATHLIB -lg2c $LIBS"
  10134. cat > conftest.$ac_ext <<EOF
  10135. #line 12767 "configure"
  10136. #include "confdefs.h"
  10137. /* Override any gcc2 internal prototype to avoid an error. */
  10138. /* We use char because int might match the return type of a gcc2
  10139. builtin and then its argument prototype would still apply. */
  10140. char dgesv_();
  10141. int main() {
  10142. dgesv_()
  10143. ; return 0; }
  10144. EOF
  10145. if { (eval echo configure:12778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10146. rm -rf conftest*
  10147. eval "ac_cv_lib_$ac_lib_var=yes"
  10148. else
  10149. echo "configure: failed program was:" >&5
  10150. cat conftest.$ac_ext >&5
  10151. rm -rf conftest*
  10152. eval "ac_cv_lib_$ac_lib_var=no"
  10153. fi
  10154. rm -f conftest*
  10155. LIBS="$ac_save_LIBS"
  10156. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10157. echo "$ac_t""yes" 1>&6
  10158. LAPACKLIB="$LAPACKLIB -llapack -lg2c"
  10159. else
  10160. echo "$ac_t""no" 1>&6
  10161. LDFLAGS=${ac_save_ldflags}
  10162. { echo "configure: error: *** Unable to locate LAPACK library." 1>&2; exit 1; }
  10163. fi
  10164. fi
  10165. LDFLAGS=${ac_save_ldflags}
  10166. fi
  10167. cat >> confdefs.h <<\EOF
  10168. #define HAVE_LIBLAPACK 1
  10169. EOF
  10170. fi # $USE_LAPACK
  10171. fi # $USE_BLAS
  10172. # Done checking LAPACK
  10173. # Enable Cairo display driver option
  10174. echo $ac_n "checking whether to use Cairo""... $ac_c" 1>&6
  10175. echo "configure:12834: checking whether to use Cairo" >&5
  10176. echo "$ac_t"""$with_cairo"" 1>&6
  10177. case "$with_cairo" in
  10178. "no") USE_CAIRO= ;;
  10179. "yes") USE_CAIRO="1" ;;
  10180. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10181. esac
  10182. CAIROINC=
  10183. CAIROLIB=
  10184. if test -n "$USE_CAIRO"; then
  10185. cairo="cairo"
  10186. pkgs="cairo-ft cairo-fc cairo-pdf cairo-ps cairo-svg"
  10187. if test -n "$USE_X11"; then
  10188. pkgs="$pkgs cairo-xlib cairo-xlib-xrender"
  10189. fi
  10190. for pkg in $pkgs ; do
  10191. if pkg-config --exists $pkg ; then
  10192. cairo="$cairo $pkg"
  10193. fi
  10194. done
  10195. # With Cairo includes directory
  10196. #FIXME: somehow quote dirs with spaces in $cairo ?
  10197. CAIROINC=`pkg-config --cflags $cairo`
  10198. echo $ac_n "checking for location of cairo includes""... $ac_c" 1>&6
  10199. echo "configure:12866: checking for location of cairo includes" >&5
  10200. case "$with_cairo_includes" in
  10201. y | ye | yes | n | no)
  10202. { echo "configure: error: *** You must supply a directory to --with-cairo-includes." 1>&2; exit 1; }
  10203. ;;
  10204. esac
  10205. echo "$ac_t""$with_cairo_includes" 1>&6
  10206. if test -n "$with_cairo_includes" ; then
  10207. for dir in $with_cairo_includes; do
  10208. if test -d "$dir"; then
  10209. CAIROINC="$CAIROINC -I$dir"
  10210. else
  10211. { echo "configure: error: *** cairo includes directory $dir does not exist." 1>&2; exit 1; }
  10212. fi
  10213. done
  10214. fi
  10215. ac_save_cppflags="$CPPFLAGS"
  10216. CPPFLAGS="$CAIROINC $CPPFLAGS"
  10217. for ac_hdr in cairo.h
  10218. do
  10219. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10220. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10221. echo "configure:12892: checking for $ac_hdr" >&5
  10222. cat > conftest.$ac_ext <<EOF
  10223. #line 12895 "configure"
  10224. #include "confdefs.h"
  10225. #include <$ac_hdr>
  10226. EOF
  10227. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10228. { (eval echo configure:12900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10229. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10230. if test -z "$ac_err"; then
  10231. rm -rf conftest*
  10232. eval "ac_cv_header_$ac_safe=yes"
  10233. else
  10234. echo "$ac_err" >&5
  10235. echo "configure: failed program was:" >&5
  10236. cat conftest.$ac_ext >&5
  10237. rm -rf conftest*
  10238. eval "ac_cv_header_$ac_safe=no"
  10239. fi
  10240. rm -f conftest*
  10241. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10242. echo "$ac_t""yes" 1>&6
  10243. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10244. cat >> confdefs.h <<EOF
  10245. #define $ac_tr_hdr 1
  10246. EOF
  10247. else
  10248. echo "$ac_t""no" 1>&6
  10249. { echo "configure: error: *** Unable to locate Cairo includes." 1>&2; exit 1; }
  10250. fi
  10251. done
  10252. CPPFLAGS=$ac_save_cppflags
  10253. # With Cairo library directory
  10254. CAIROLIB=`pkg-config --libs $cairo`
  10255. echo $ac_n "checking for location of cairo library""... $ac_c" 1>&6
  10256. echo "configure:12936: checking for location of cairo library" >&5
  10257. case "$with_cairo_libs" in
  10258. y | ye | yes | n | no)
  10259. { echo "configure: error: *** You must supply a directory to --with-cairo-libs." 1>&2; exit 1; }
  10260. ;;
  10261. esac
  10262. echo "$ac_t""$with_cairo_libs" 1>&6
  10263. if test -n "$with_cairo_libs"; then
  10264. for dir in $with_cairo_libs; do
  10265. if test -d "$dir"; then
  10266. CAIROLIB="$CAIROLIB -L$dir"
  10267. else
  10268. { echo "configure: error: *** cairo library directory $dir does not exist." 1>&2; exit 1; }
  10269. fi
  10270. done
  10271. fi
  10272. echo $ac_n "checking for cairo linking flags""... $ac_c" 1>&6
  10273. echo "configure:12956: checking for cairo linking flags" >&5
  10274. case "$with_cairo_ldflags" in
  10275. y | ye | yes | n | no)
  10276. { echo "configure: error: *** You must supply a directory to --with-cairo-ldflags." 1>&2; exit 1; }
  10277. ;;
  10278. esac
  10279. echo "$ac_t""$with_cairo_ldflags" 1>&6
  10280. CAIROLIB="$CAIROLIB $with_cairo_ldflags"
  10281. ac_save_libs="$LIBS"
  10282. ac_save_ldflags="$LDFLAGS"
  10283. LIBS=" $CAIROLIB $LIBS"
  10284. LDFLAGS=" $LDFLAGS"
  10285. echo $ac_n "checking for cairo_create""... $ac_c" 1>&6
  10286. echo "configure:12972: checking for cairo_create" >&5
  10287. cat > conftest.$ac_ext <<EOF
  10288. #line 12975 "configure"
  10289. #include "confdefs.h"
  10290. /* System header to define __stub macros and hopefully few prototypes,
  10291. which can conflict with char cairo_create(); below. */
  10292. #include <assert.h>
  10293. /* Override any gcc2 internal prototype to avoid an error. */
  10294. /* We use char because int might match the return type of a gcc2
  10295. builtin and then its argument prototype would still apply. */
  10296. char cairo_create();
  10297. int main() {
  10298. /* The GNU C library defines this for functions which it implements
  10299. to always fail with ENOSYS. Some functions are actually named
  10300. something starting with __ and the normal name is an alias. */
  10301. #if defined (__stub_cairo_create) || defined (__stub___cairo_create)
  10302. choke me
  10303. #else
  10304. cairo_create();
  10305. #endif
  10306. ; return 0; }
  10307. EOF
  10308. if { (eval echo configure:12998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10309. rm -rf conftest*
  10310. eval "ac_cv_func_cairo_create=yes"
  10311. else
  10312. echo "configure: failed program was:" >&5
  10313. cat conftest.$ac_ext >&5
  10314. rm -rf conftest*
  10315. eval "ac_cv_func_cairo_create=no"
  10316. fi
  10317. rm -f conftest*
  10318. if eval "test \"`echo '$ac_cv_func_'cairo_create`\" = yes"; then
  10319. echo "$ac_t""yes" 1>&6
  10320. :
  10321. else
  10322. echo "$ac_t""no" 1>&6
  10323. { echo "configure: error: *** Unable to locate cairo_create." 1>&2; exit 1; }
  10324. fi
  10325. LIBS=${ac_save_libs}
  10326. LDFLAGS=${ac_save_ldflags}
  10327. ac_save_libs="$LIBS"
  10328. ac_save_ldflags="$LDFLAGS"
  10329. LIBS=" $CAIROLIB $LIBS"
  10330. LDFLAGS=" $LDFLAGS"
  10331. echo $ac_n "checking for cairo_xlib_surface_create_with_xrender_format""... $ac_c" 1>&6
  10332. echo "configure:13032: checking for cairo_xlib_surface_create_with_xrender_format" >&5
  10333. cat > conftest.$ac_ext <<EOF
  10334. #line 13035 "configure"
  10335. #include "confdefs.h"
  10336. /* System header to define __stub macros and hopefully few prototypes,
  10337. which can conflict with char cairo_xlib_surface_create_with_xrender_format(); below. */
  10338. #include <assert.h>
  10339. /* Override any gcc2 internal prototype to avoid an error. */
  10340. /* We use char because int might match the return type of a gcc2
  10341. builtin and then its argument prototype would still apply. */
  10342. char cairo_xlib_surface_create_with_xrender_format();
  10343. int main() {
  10344. /* The GNU C library defines this for functions which it implements
  10345. to always fail with ENOSYS. Some functions are actually named
  10346. something starting with __ and the normal name is an alias. */
  10347. #if defined (__stub_cairo_xlib_surface_create_with_xrender_format) || defined (__stub___cairo_xlib_surface_create_with_xrender_format)
  10348. choke me
  10349. #else
  10350. cairo_xlib_surface_create_with_xrender_format();
  10351. #endif
  10352. ; return 0; }
  10353. EOF
  10354. if { (eval echo configure:13058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10355. rm -rf conftest*
  10356. eval "ac_cv_func_cairo_xlib_surface_create_with_xrender_format=yes"
  10357. else
  10358. echo "configure: failed program was:" >&5
  10359. cat conftest.$ac_ext >&5
  10360. rm -rf conftest*
  10361. eval "ac_cv_func_cairo_xlib_surface_create_with_xrender_format=no"
  10362. fi
  10363. rm -f conftest*
  10364. if eval "test \"`echo '$ac_cv_func_'cairo_xlib_surface_create_with_xrender_format`\" = yes"; then
  10365. echo "$ac_t""yes" 1>&6
  10366. CAIRO_HAS_XRENDER=1
  10367. else
  10368. echo "$ac_t""no" 1>&6
  10369. CAIRO_HAS_XRENDER=
  10370. fi
  10371. LIBS=${ac_save_libs}
  10372. LDFLAGS=${ac_save_ldflags}
  10373. ac_save_libs="$LIBS"
  10374. ac_save_ldflags="$LDFLAGS"
  10375. LIBS=" $CAIROLIB $LIBS"
  10376. LDFLAGS=" $LDFLAGS"
  10377. echo $ac_n "checking for cairo_xlib_surface_get_xrender_format""... $ac_c" 1>&6
  10378. echo "configure:13091: checking for cairo_xlib_surface_get_xrender_format" >&5
  10379. cat > conftest.$ac_ext <<EOF
  10380. #line 13094 "configure"
  10381. #include "confdefs.h"
  10382. /* System header to define __stub macros and hopefully few prototypes,
  10383. which can conflict with char cairo_xlib_surface_get_xrender_format(); below. */
  10384. #include <assert.h>
  10385. /* Override any gcc2 internal prototype to avoid an error. */
  10386. /* We use char because int might match the return type of a gcc2
  10387. builtin and then its argument prototype would still apply. */
  10388. char cairo_xlib_surface_get_xrender_format();
  10389. int main() {
  10390. /* The GNU C library defines this for functions which it implements
  10391. to always fail with ENOSYS. Some functions are actually named
  10392. something starting with __ and the normal name is an alias. */
  10393. #if defined (__stub_cairo_xlib_surface_get_xrender_format) || defined (__stub___cairo_xlib_surface_get_xrender_format)
  10394. choke me
  10395. #else
  10396. cairo_xlib_surface_get_xrender_format();
  10397. #endif
  10398. ; return 0; }
  10399. EOF
  10400. if { (eval echo configure:13117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10401. rm -rf conftest*
  10402. eval "ac_cv_func_cairo_xlib_surface_get_xrender_format=yes"
  10403. else
  10404. echo "configure: failed program was:" >&5
  10405. cat conftest.$ac_ext >&5
  10406. rm -rf conftest*
  10407. eval "ac_cv_func_cairo_xlib_surface_get_xrender_format=no"
  10408. fi
  10409. rm -f conftest*
  10410. if eval "test \"`echo '$ac_cv_func_'cairo_xlib_surface_get_xrender_format`\" = yes"; then
  10411. echo "$ac_t""yes" 1>&6
  10412. CAIRO_HAS_XRENDER_SURFACE=1
  10413. else
  10414. echo "$ac_t""no" 1>&6
  10415. CAIRO_HAS_XRENDER_SURFACE=
  10416. fi
  10417. LIBS=${ac_save_libs}
  10418. LDFLAGS=${ac_save_ldflags}
  10419. CAIROLIB="$CAIROLIB $CAIROLDFLAGS"
  10420. fi # $USE_CAIRO
  10421. # Done checking Cairo
  10422. # Enable FreeType option
  10423. echo $ac_n "checking whether to use FreeType""... $ac_c" 1>&6
  10424. echo "configure:13159: checking whether to use FreeType" >&5
  10425. echo "$ac_t"""$with_freetype"" 1>&6
  10426. case "$with_freetype" in
  10427. "no") USE_FREETYPE= ;;
  10428. "yes") USE_FREETYPE="1" ;;
  10429. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10430. esac
  10431. FTINC=
  10432. FTLIB=
  10433. if test -n "$USE_FREETYPE"; then
  10434. # With FreeType includes directory
  10435. echo $ac_n "checking for location of FreeType includes""... $ac_c" 1>&6
  10436. echo "configure:13178: checking for location of FreeType includes" >&5
  10437. case "$with_freetype_includes" in
  10438. y | ye | yes | n | no)
  10439. { echo "configure: error: *** You must supply a directory to --with-freetype-includes." 1>&2; exit 1; }
  10440. ;;
  10441. esac
  10442. echo "$ac_t""$with_freetype_includes" 1>&6
  10443. if test -n "$with_freetype_includes" ; then
  10444. for dir in $with_freetype_includes; do
  10445. if test -d "$dir"; then
  10446. FTINC="$FTINC -I$dir"
  10447. else
  10448. { echo "configure: error: *** FreeType includes directory $dir does not exist." 1>&2; exit 1; }
  10449. fi
  10450. done
  10451. fi
  10452. ac_save_cppflags="$CPPFLAGS"
  10453. CPPFLAGS="$FTINC $CPPFLAGS"
  10454. for ac_hdr in ft2build.h
  10455. do
  10456. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10457. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10458. echo "configure:13204: checking for $ac_hdr" >&5
  10459. cat > conftest.$ac_ext <<EOF
  10460. #line 13207 "configure"
  10461. #include "confdefs.h"
  10462. #include <$ac_hdr>
  10463. EOF
  10464. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10465. { (eval echo configure:13212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10466. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10467. if test -z "$ac_err"; then
  10468. rm -rf conftest*
  10469. eval "ac_cv_header_$ac_safe=yes"
  10470. else
  10471. echo "$ac_err" >&5
  10472. echo "configure: failed program was:" >&5
  10473. cat conftest.$ac_ext >&5
  10474. rm -rf conftest*
  10475. eval "ac_cv_header_$ac_safe=no"
  10476. fi
  10477. rm -f conftest*
  10478. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10479. echo "$ac_t""yes" 1>&6
  10480. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10481. cat >> confdefs.h <<EOF
  10482. #define $ac_tr_hdr 1
  10483. EOF
  10484. else
  10485. echo "$ac_t""no" 1>&6
  10486. { echo "configure: error: *** Unable to locate FreeType includes." 1>&2; exit 1; }
  10487. fi
  10488. done
  10489. CPPFLAGS=$ac_save_cppflags
  10490. # With FreeType library directory
  10491. echo $ac_n "checking for location of FreeType library""... $ac_c" 1>&6
  10492. echo "configure:13246: checking for location of FreeType library" >&5
  10493. case "$with_freetype_libs" in
  10494. y | ye | yes | n | no)
  10495. { echo "configure: error: *** You must supply a directory to --with-freetype-libs." 1>&2; exit 1; }
  10496. ;;
  10497. esac
  10498. echo "$ac_t""$with_freetype_libs" 1>&6
  10499. if test -n "$with_freetype_libs"; then
  10500. for dir in $with_freetype_libs; do
  10501. if test -d "$dir"; then
  10502. FTLIB="$FTLIB -L$dir"
  10503. else
  10504. { echo "configure: error: *** FreeType library directory $dir does not exist." 1>&2; exit 1; }
  10505. fi
  10506. done
  10507. fi
  10508. ac_save_ldflags="$LDFLAGS"
  10509. LDFLAGS="$FTLIB $LDFLAGS"
  10510. echo $ac_n "checking for FT_Init_FreeType in -lfreetype""... $ac_c" 1>&6
  10511. echo "configure:13271: checking for FT_Init_FreeType in -lfreetype" >&5
  10512. ac_lib_var=`echo freetype'_'FT_Init_FreeType | sed 'y%./+-%__p_%'`
  10513. ac_save_LIBS="$LIBS"
  10514. LIBS="-lfreetype $LIBS"
  10515. cat > conftest.$ac_ext <<EOF
  10516. #line 13277 "configure"
  10517. #include "confdefs.h"
  10518. /* Override any gcc2 internal prototype to avoid an error. */
  10519. /* We use char because int might match the return type of a gcc2
  10520. builtin and then its argument prototype would still apply. */
  10521. char FT_Init_FreeType();
  10522. int main() {
  10523. FT_Init_FreeType()
  10524. ; return 0; }
  10525. EOF
  10526. if { (eval echo configure:13288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10527. rm -rf conftest*
  10528. eval "ac_cv_lib_$ac_lib_var=yes"
  10529. else
  10530. echo "configure: failed program was:" >&5
  10531. cat conftest.$ac_ext >&5
  10532. rm -rf conftest*
  10533. eval "ac_cv_lib_$ac_lib_var=no"
  10534. fi
  10535. rm -f conftest*
  10536. LIBS="$ac_save_LIBS"
  10537. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10538. echo "$ac_t""yes" 1>&6
  10539. FTLIB="$FTLIB -lfreetype "
  10540. else
  10541. echo "$ac_t""no" 1>&6
  10542. LDFLAGS=${ac_save_ldflags}
  10543. { echo "configure: error: *** Unable to locate FreeType library." 1>&2; exit 1; }
  10544. fi
  10545. LDFLAGS=${ac_save_ldflags}
  10546. fi # $USE_FREETYPE
  10547. # Done checking FreeType
  10548. # Enable NLS option
  10549. echo $ac_n "checking whether to use NLS""... $ac_c" 1>&6
  10550. echo "configure:13329: checking whether to use NLS" >&5
  10551. echo "$ac_t"""$with_nls"" 1>&6
  10552. case "$with_nls" in
  10553. "no") USE_NLS= ;;
  10554. "yes") USE_NLS="1" ;;
  10555. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10556. esac
  10557. INTLLIB=
  10558. HAVE_NLS=
  10559. if test -n "${USE_NLS}" ; then
  10560. cat >> confdefs.h <<\EOF
  10561. #define USE_NLS 1
  10562. EOF
  10563. echo $ac_n "checking for gettext""... $ac_c" 1>&6
  10564. echo "configure:13349: checking for gettext" >&5
  10565. cat > conftest.$ac_ext <<EOF
  10566. #line 13352 "configure"
  10567. #include "confdefs.h"
  10568. /* System header to define __stub macros and hopefully few prototypes,
  10569. which can conflict with char gettext(); below. */
  10570. #include <assert.h>
  10571. /* Override any gcc2 internal prototype to avoid an error. */
  10572. /* We use char because int might match the return type of a gcc2
  10573. builtin and then its argument prototype would still apply. */
  10574. char gettext();
  10575. int main() {
  10576. /* The GNU C library defines this for functions which it implements
  10577. to always fail with ENOSYS. Some functions are actually named
  10578. something starting with __ and the normal name is an alias. */
  10579. #if defined (__stub_gettext) || defined (__stub___gettext)
  10580. choke me
  10581. #else
  10582. gettext();
  10583. #endif
  10584. ; return 0; }
  10585. EOF
  10586. if { (eval echo configure:13375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10587. rm -rf conftest*
  10588. eval "ac_cv_func_gettext=yes"
  10589. else
  10590. echo "configure: failed program was:" >&5
  10591. cat conftest.$ac_ext >&5
  10592. rm -rf conftest*
  10593. eval "ac_cv_func_gettext=no"
  10594. fi
  10595. rm -f conftest*
  10596. if eval "test \"`echo '$ac_cv_func_'gettext`\" = yes"; then
  10597. echo "$ac_t""yes" 1>&6
  10598. INTLLIB=
  10599. else
  10600. echo "$ac_t""no" 1>&6
  10601. echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
  10602. echo "configure:13393: checking for gettext in -lintl" >&5
  10603. ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
  10604. ac_save_LIBS="$LIBS"
  10605. LIBS="-lintl $LIBS"
  10606. cat > conftest.$ac_ext <<EOF
  10607. #line 13399 "configure"
  10608. #include "confdefs.h"
  10609. /* Override any gcc2 internal prototype to avoid an error. */
  10610. /* We use char because int might match the return type of a gcc2
  10611. builtin and then its argument prototype would still apply. */
  10612. char gettext();
  10613. int main() {
  10614. gettext()
  10615. ; return 0; }
  10616. EOF
  10617. if { (eval echo configure:13410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10618. rm -rf conftest*
  10619. eval "ac_cv_lib_$ac_lib_var=yes"
  10620. else
  10621. echo "configure: failed program was:" >&5
  10622. cat conftest.$ac_ext >&5
  10623. rm -rf conftest*
  10624. eval "ac_cv_lib_$ac_lib_var=no"
  10625. fi
  10626. rm -f conftest*
  10627. LIBS="$ac_save_LIBS"
  10628. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  10629. echo "$ac_t""yes" 1>&6
  10630. INTLLIB=-lintl
  10631. else
  10632. echo "$ac_t""no" 1>&6
  10633. { echo "configure: error: *** Unable to locate gettext() function." 1>&2; exit 1; }
  10634. fi
  10635. fi
  10636. HAVE_NLS=1
  10637. fi
  10638. # Enable C++ option
  10639. echo $ac_n "checking whether to use C++""... $ac_c" 1>&6
  10640. echo "configure:13445: checking whether to use C++" >&5
  10641. echo "$ac_t"""$with_cxx"" 1>&6
  10642. case "$with_cxx" in
  10643. "no") USE_CXX= ;;
  10644. "yes") USE_CXX="1" ;;
  10645. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10646. esac
  10647. if test -n "$USE_CXX"; then
  10648. for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
  10649. do
  10650. # Extract the first word of "$ac_prog", so it can be a program name with args.
  10651. set dummy $ac_prog; ac_word=$2
  10652. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  10653. echo "configure:13461: checking for $ac_word" >&5
  10654. if test -n "$CXX"; then
  10655. ac_cv_prog_CXX="$CXX" # Let the user override the test.
  10656. else
  10657. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  10658. ac_dummy="$PATH"
  10659. for ac_dir in $ac_dummy; do
  10660. test -z "$ac_dir" && ac_dir=.
  10661. if test -f $ac_dir/$ac_word; then
  10662. ac_cv_prog_CXX="$ac_prog"
  10663. break
  10664. fi
  10665. done
  10666. IFS="$ac_save_ifs"
  10667. fi
  10668. CXX="$ac_cv_prog_CXX"
  10669. if test -n "$CXX"; then
  10670. echo "$ac_t""$CXX" 1>&6
  10671. else
  10672. echo "$ac_t""no" 1>&6
  10673. fi
  10674. test -n "$CXX" && break
  10675. done
  10676. test -n "$CXX" || CXX="gcc"
  10677. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  10678. echo "configure:13490: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
  10679. ac_ext=C
  10680. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  10681. ac_cpp='$CXXCPP $CPPFLAGS'
  10682. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  10683. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  10684. cross_compiling=$ac_cv_prog_cxx_cross
  10685. cat > conftest.$ac_ext << EOF
  10686. #line 13501 "configure"
  10687. #include "confdefs.h"
  10688. int main(){return(0);}
  10689. EOF
  10690. if { (eval echo configure:13506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10691. ac_cv_prog_cxx_works=yes
  10692. # If we can't run a trivial program, we are probably using a cross compiler.
  10693. if (./conftest; exit) 2>/dev/null; then
  10694. ac_cv_prog_cxx_cross=no
  10695. else
  10696. ac_cv_prog_cxx_cross=yes
  10697. fi
  10698. else
  10699. echo "configure: failed program was:" >&5
  10700. cat conftest.$ac_ext >&5
  10701. ac_cv_prog_cxx_works=no
  10702. fi
  10703. rm -fr conftest*
  10704. ac_ext=c
  10705. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  10706. ac_cpp='$CPP $CPPFLAGS'
  10707. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  10708. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  10709. cross_compiling=$ac_cv_prog_cc_cross
  10710. echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
  10711. if test $ac_cv_prog_cxx_works = no; then
  10712. { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
  10713. fi
  10714. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  10715. echo "configure:13532: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
  10716. echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
  10717. cross_compiling=$ac_cv_prog_cxx_cross
  10718. echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
  10719. echo "configure:13537: checking whether we are using GNU C++" >&5
  10720. cat > conftest.C <<EOF
  10721. #ifdef __GNUC__
  10722. yes;
  10723. #endif
  10724. EOF
  10725. if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:13544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  10726. ac_cv_prog_gxx=yes
  10727. else
  10728. ac_cv_prog_gxx=no
  10729. fi
  10730. echo "$ac_t""$ac_cv_prog_gxx" 1>&6
  10731. if test $ac_cv_prog_gxx = yes; then
  10732. GXX=yes
  10733. else
  10734. GXX=
  10735. fi
  10736. ac_test_CXXFLAGS="${CXXFLAGS+set}"
  10737. ac_save_CXXFLAGS="$CXXFLAGS"
  10738. CXXFLAGS=
  10739. echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
  10740. echo "configure:13562: checking whether ${CXX-g++} accepts -g" >&5
  10741. echo 'void f(){}' > conftest.cc
  10742. if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  10743. ac_cv_prog_cxx_g=yes
  10744. else
  10745. ac_cv_prog_cxx_g=no
  10746. fi
  10747. rm -f conftest*
  10748. echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
  10749. if test "$ac_test_CXXFLAGS" = set; then
  10750. CXXFLAGS="$ac_save_CXXFLAGS"
  10751. elif test $ac_cv_prog_cxx_g = yes; then
  10752. if test "$GXX" = yes; then
  10753. CXXFLAGS="-g -O2"
  10754. else
  10755. CXXFLAGS="-g"
  10756. fi
  10757. else
  10758. if test "$GXX" = yes; then
  10759. CXXFLAGS="-O2"
  10760. else
  10761. CXXFLAGS=
  10762. fi
  10763. fi
  10764. else
  10765. CXX=
  10766. CXXFLAGS=
  10767. fi
  10768. # Done checking C++
  10769. # Enable openDWG option
  10770. echo $ac_n "checking whether to use openDWG""... $ac_c" 1>&6
  10771. echo "configure:13603: checking whether to use openDWG" >&5
  10772. echo "$ac_t"""$with_opendwg"" 1>&6
  10773. case "$with_opendwg" in
  10774. "no") USE_OPENDWG= ;;
  10775. "yes") USE_OPENDWG="1" ;;
  10776. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10777. esac
  10778. OPENDWGINCPATH=
  10779. OPENDWGLIBPATH=
  10780. OPENDWGLIB=
  10781. if test -n "${USE_OPENDWG}"; then
  10782. # With OPENDWG includes directory
  10783. echo $ac_n "checking for location of openDGW includes""... $ac_c" 1>&6
  10784. echo "configure:13623: checking for location of openDGW includes" >&5
  10785. case "$with_opendwg_includes" in
  10786. y | ye | yes | n | no)
  10787. { echo "configure: error: *** You must supply a directory to --with-opendwg-includes." 1>&2; exit 1; }
  10788. ;;
  10789. esac
  10790. echo "$ac_t""$with_opendwg_includes" 1>&6
  10791. if test -n "$with_opendwg_includes" ; then
  10792. for dir in $with_opendwg_includes; do
  10793. if test -d "$dir"; then
  10794. OPENDWGINCPATH="$OPENDWGINCPATH -I$dir"
  10795. else
  10796. { echo "configure: error: *** openDGW includes directory $dir does not exist." 1>&2; exit 1; }
  10797. fi
  10798. done
  10799. fi
  10800. ac_save_cppflags="$CPPFLAGS"
  10801. CPPFLAGS="$OPENDWGINCPATH $CPPFLAGS"
  10802. for ac_hdr in ad2.h
  10803. do
  10804. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10805. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10806. echo "configure:13649: checking for $ac_hdr" >&5
  10807. cat > conftest.$ac_ext <<EOF
  10808. #line 13652 "configure"
  10809. #include "confdefs.h"
  10810. #include <$ac_hdr>
  10811. EOF
  10812. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10813. { (eval echo configure:13657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10814. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10815. if test -z "$ac_err"; then
  10816. rm -rf conftest*
  10817. eval "ac_cv_header_$ac_safe=yes"
  10818. else
  10819. echo "$ac_err" >&5
  10820. echo "configure: failed program was:" >&5
  10821. cat conftest.$ac_ext >&5
  10822. rm -rf conftest*
  10823. eval "ac_cv_header_$ac_safe=no"
  10824. fi
  10825. rm -f conftest*
  10826. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10827. echo "$ac_t""yes" 1>&6
  10828. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10829. cat >> confdefs.h <<EOF
  10830. #define $ac_tr_hdr 1
  10831. EOF
  10832. else
  10833. echo "$ac_t""no" 1>&6
  10834. { echo "configure: error: *** Unable to locate openDWG includes." 1>&2; exit 1; }
  10835. fi
  10836. done
  10837. CPPFLAGS=$ac_save_cppflags
  10838. # With OPENDWG library directory
  10839. echo $ac_n "checking for location of openDWG library""... $ac_c" 1>&6
  10840. echo "configure:13691: checking for location of openDWG library" >&5
  10841. case "$with_opendwg_libs" in
  10842. y | ye | yes | n | no)
  10843. { echo "configure: error: *** You must supply a directory to --with-opendwg-libs." 1>&2; exit 1; }
  10844. ;;
  10845. esac
  10846. echo "$ac_t""$with_opendwg_libs" 1>&6
  10847. if test -n "$with_opendwg_libs"; then
  10848. for dir in $with_opendwg_libs; do
  10849. if test -d "$dir"; then
  10850. OPENDWGLIBPATH="$OPENDWGLIBPATH -L$dir"
  10851. else
  10852. { echo "configure: error: *** openDWG library directory $dir does not exist." 1>&2; exit 1; }
  10853. fi
  10854. done
  10855. fi
  10856. #search for ad2.a, ad3.a ... in openDWG toolkit directory:
  10857. #FIX ME how to program this test??
  10858. #LOC_CHECK_LIBS(ad?.a,adSeekLayer,openDWG,$OPENDWGLIBPATH,OPENDWGLIB,,)
  10859. #
  10860. #for now hack (but working):
  10861. TRUEOPENDWGLIBPATH=`echo "$OPENDWGLIBPATH" | cut -b3-`
  10862. adlib=`ls -1 "$TRUEOPENDWGLIBPATH"/ad?.a | tail -1`
  10863. OPENDWGLIB="$adlib"
  10864. fi # $USE_OPENDWG
  10865. # Done checking OPENDWG
  10866. # Enable pthread option
  10867. echo $ac_n "checking whether to use POSIX threads""... $ac_c" 1>&6
  10868. echo "configure:13732: checking whether to use POSIX threads" >&5
  10869. echo "$ac_t"""$with_pthread"" 1>&6
  10870. case "$with_pthread" in
  10871. "no") USE_PTHREAD= ;;
  10872. "yes") USE_PTHREAD="1" ;;
  10873. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  10874. esac
  10875. PTHREADINCPATH=
  10876. PTHREADLIBPATH=
  10877. PTHREADLIB=
  10878. if test -n "$USE_PTHREAD"; then
  10879. # With pthread includes directory
  10880. echo $ac_n "checking for location of POSIX threads includes""... $ac_c" 1>&6
  10881. echo "configure:13752: checking for location of POSIX threads includes" >&5
  10882. case "$with_pthread_includes" in
  10883. y | ye | yes | n | no)
  10884. { echo "configure: error: *** You must supply a directory to --with-pthread-includes." 1>&2; exit 1; }
  10885. ;;
  10886. esac
  10887. echo "$ac_t""$with_pthread_includes" 1>&6
  10888. if test -n "$with_pthread_includes" ; then
  10889. for dir in $with_pthread_includes; do
  10890. if test -d "$dir"; then
  10891. PTHREADINCPATH="$PTHREADINCPATH -I$dir"
  10892. else
  10893. { echo "configure: error: *** POSIX threads includes directory $dir does not exist." 1>&2; exit 1; }
  10894. fi
  10895. done
  10896. fi
  10897. ac_save_cppflags="$CPPFLAGS"
  10898. CPPFLAGS="$PTHREADINCPATH $CPPFLAGS"
  10899. for ac_hdr in pthread.h
  10900. do
  10901. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  10902. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  10903. echo "configure:13778: checking for $ac_hdr" >&5
  10904. cat > conftest.$ac_ext <<EOF
  10905. #line 13781 "configure"
  10906. #include "confdefs.h"
  10907. #include <$ac_hdr>
  10908. EOF
  10909. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  10910. { (eval echo configure:13786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  10911. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  10912. if test -z "$ac_err"; then
  10913. rm -rf conftest*
  10914. eval "ac_cv_header_$ac_safe=yes"
  10915. else
  10916. echo "$ac_err" >&5
  10917. echo "configure: failed program was:" >&5
  10918. cat conftest.$ac_ext >&5
  10919. rm -rf conftest*
  10920. eval "ac_cv_header_$ac_safe=no"
  10921. fi
  10922. rm -f conftest*
  10923. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  10924. echo "$ac_t""yes" 1>&6
  10925. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  10926. cat >> confdefs.h <<EOF
  10927. #define $ac_tr_hdr 1
  10928. EOF
  10929. else
  10930. echo "$ac_t""no" 1>&6
  10931. { echo "configure: error: *** Unable to locate POSIX threads includes." 1>&2; exit 1; }
  10932. fi
  10933. done
  10934. CPPFLAGS=$ac_save_cppflags
  10935. # With pthread library directory
  10936. echo $ac_n "checking for location of POSIX threads library""... $ac_c" 1>&6
  10937. echo "configure:13820: checking for location of POSIX threads library" >&5
  10938. case "$with_pthread_libs" in
  10939. y | ye | yes | n | no)
  10940. { echo "configure: error: *** You must supply a directory to --with-pthread-libs." 1>&2; exit 1; }
  10941. ;;
  10942. esac
  10943. echo "$ac_t""$with_pthread_libs" 1>&6
  10944. if test -n "$with_pthread_libs"; then
  10945. for dir in $with_pthread_libs; do
  10946. if test -d "$dir"; then
  10947. PTHREADLIBPATH="$PTHREADLIBPATH -L$dir"
  10948. else
  10949. { echo "configure: error: *** POSIX threads library directory $dir does not exist." 1>&2; exit 1; }
  10950. fi
  10951. done
  10952. fi
  10953. ac_save_libs="$LIBS"
  10954. ac_save_ldflags="$LDFLAGS"
  10955. LIBS=" $LIBS"
  10956. LDFLAGS=" $LDFLAGS"
  10957. echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
  10958. echo "configure:13845: checking for pthread_create" >&5
  10959. cat > conftest.$ac_ext <<EOF
  10960. #line 13848 "configure"
  10961. #include "confdefs.h"
  10962. /* System header to define __stub macros and hopefully few prototypes,
  10963. which can conflict with char pthread_create(); below. */
  10964. #include <assert.h>
  10965. /* Override any gcc2 internal prototype to avoid an error. */
  10966. /* We use char because int might match the return type of a gcc2
  10967. builtin and then its argument prototype would still apply. */
  10968. char pthread_create();
  10969. int main() {
  10970. /* The GNU C library defines this for functions which it implements
  10971. to always fail with ENOSYS. Some functions are actually named
  10972. something starting with __ and the normal name is an alias. */
  10973. #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
  10974. choke me
  10975. #else
  10976. pthread_create();
  10977. #endif
  10978. ; return 0; }
  10979. EOF
  10980. if { (eval echo configure:13871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10981. rm -rf conftest*
  10982. eval "ac_cv_func_pthread_create=yes"
  10983. else
  10984. echo "configure: failed program was:" >&5
  10985. cat conftest.$ac_ext >&5
  10986. rm -rf conftest*
  10987. eval "ac_cv_func_pthread_create=no"
  10988. fi
  10989. rm -f conftest*
  10990. if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
  10991. echo "$ac_t""yes" 1>&6
  10992. PTHREADLIB="$PTHREADLIB "
  10993. else
  10994. echo "$ac_t""no" 1>&6
  10995. ac_save_ldflags="$LDFLAGS"
  10996. LDFLAGS="$PTHREADLIBPATH $LDFLAGS"
  10997. echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
  10998. echo "configure:13898: checking for pthread_create in -lpthread" >&5
  10999. ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
  11000. ac_save_LIBS="$LIBS"
  11001. LIBS="-lpthread $LIBS"
  11002. cat > conftest.$ac_ext <<EOF
  11003. #line 13904 "configure"
  11004. #include "confdefs.h"
  11005. /* Override any gcc2 internal prototype to avoid an error. */
  11006. /* We use char because int might match the return type of a gcc2
  11007. builtin and then its argument prototype would still apply. */
  11008. char pthread_create();
  11009. int main() {
  11010. pthread_create()
  11011. ; return 0; }
  11012. EOF
  11013. if { (eval echo configure:13915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11014. rm -rf conftest*
  11015. eval "ac_cv_lib_$ac_lib_var=yes"
  11016. else
  11017. echo "configure: failed program was:" >&5
  11018. cat conftest.$ac_ext >&5
  11019. rm -rf conftest*
  11020. eval "ac_cv_lib_$ac_lib_var=no"
  11021. fi
  11022. rm -f conftest*
  11023. LIBS="$ac_save_LIBS"
  11024. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  11025. echo "$ac_t""yes" 1>&6
  11026. PTHREADLIB="$PTHREADLIB -lpthread "
  11027. else
  11028. echo "$ac_t""no" 1>&6
  11029. LDFLAGS=${ac_save_ldflags}
  11030. { echo "configure: error: *** Unable to locate POSIX threads library." 1>&2; exit 1; }
  11031. fi
  11032. LDFLAGS=${ac_save_ldflags}
  11033. fi
  11034. LIBS=${ac_save_libs}
  11035. LDFLAGS=${ac_save_ldflags}
  11036. fi # $USE_PTHREAD
  11037. # Done checking pthread
  11038. # Enable OpenMP option
  11039. echo $ac_n "checking whether to use OpenMP""... $ac_c" 1>&6
  11040. echo "configure:13965: checking whether to use OpenMP" >&5
  11041. echo "$ac_t"""$with_openmp"" 1>&6
  11042. case "$with_openmp" in
  11043. "no") USE_OPENMP= ;;
  11044. "yes") USE_OPENMP="1" ;;
  11045. *) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
  11046. esac
  11047. OMPINCPATH=
  11048. OMPLIBPATH=
  11049. OMPLIB=
  11050. OMPCFLAGS=
  11051. if test -n "$USE_OPENMP"; then
  11052. # With OpenMP includes directory
  11053. echo $ac_n "checking for location of OpenMP includes""... $ac_c" 1>&6
  11054. echo "configure:13986: checking for location of OpenMP includes" >&5
  11055. case "$with_openmp_includes" in
  11056. y | ye | yes | n | no)
  11057. { echo "configure: error: *** You must supply a directory to --with-openmp-includes." 1>&2; exit 1; }
  11058. ;;
  11059. esac
  11060. echo "$ac_t""$with_openmp_includes" 1>&6
  11061. if test -n "$with_openmp_includes" ; then
  11062. for dir in $with_openmp_includes; do
  11063. if test -d "$dir"; then
  11064. OMPINCPATH="$OMPINCPATH -I$dir"
  11065. else
  11066. { echo "configure: error: *** OpenMP includes directory $dir does not exist." 1>&2; exit 1; }
  11067. fi
  11068. done
  11069. fi
  11070. ac_save_cppflags="$CPPFLAGS"
  11071. CPPFLAGS="$OMPINCPATH $CPPFLAGS"
  11072. for ac_hdr in omp.h
  11073. do
  11074. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  11075. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  11076. echo "configure:14012: checking for $ac_hdr" >&5
  11077. cat > conftest.$ac_ext <<EOF
  11078. #line 14015 "configure"
  11079. #include "confdefs.h"
  11080. #include <$ac_hdr>
  11081. EOF
  11082. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  11083. { (eval echo configure:14020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  11084. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  11085. if test -z "$ac_err"; then
  11086. rm -rf conftest*
  11087. eval "ac_cv_header_$ac_safe=yes"
  11088. else
  11089. echo "$ac_err" >&5
  11090. echo "configure: failed program was:" >&5
  11091. cat conftest.$ac_ext >&5
  11092. rm -rf conftest*
  11093. eval "ac_cv_header_$ac_safe=no"
  11094. fi
  11095. rm -f conftest*
  11096. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  11097. echo "$ac_t""yes" 1>&6
  11098. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  11099. cat >> confdefs.h <<EOF
  11100. #define $ac_tr_hdr 1
  11101. EOF
  11102. else
  11103. echo "$ac_t""no" 1>&6
  11104. { echo "configure: error: *** Unable to locate OpenMP includes." 1>&2; exit 1; }
  11105. fi
  11106. done
  11107. CPPFLAGS=$ac_save_cppflags
  11108. # With OpenMP library directory
  11109. # GCC et al.: -lgomp
  11110. # Solaris cc: -lmtsk
  11111. # AIX xlc: -lxlsmp
  11112. # SGI IRIX 6.5 MIPSpro C/C++: -lmp
  11113. echo $ac_n "checking for location of OpenMP library""... $ac_c" 1>&6
  11114. echo "configure:14058: checking for location of OpenMP library" >&5
  11115. case "$with_gomp_libs" in
  11116. y | ye | yes | n | no)
  11117. { echo "configure: error: *** You must supply a directory to --with-gomp-libs." 1>&2; exit 1; }
  11118. ;;
  11119. esac
  11120. echo "$ac_t""$with_gomp_libs" 1>&6
  11121. if test -n "$with_gomp_libs"; then
  11122. for dir in $with_gomp_libs; do
  11123. if test -d "$dir"; then
  11124. OMPLIBPATH="$OMPLIBPATH -L$dir"
  11125. else
  11126. { echo "configure: error: *** OpenMP library directory $dir does not exist." 1>&2; exit 1; }
  11127. fi
  11128. done
  11129. fi
  11130. ac_save_libs="$LIBS"
  11131. ac_save_ldflags="$LDFLAGS"
  11132. LIBS=" $LIBS"
  11133. LDFLAGS=" $LDFLAGS"
  11134. echo $ac_n "checking for GOMP_parallel_start""... $ac_c" 1>&6
  11135. echo "configure:14083: checking for GOMP_parallel_start" >&5
  11136. cat > conftest.$ac_ext <<EOF
  11137. #line 14086 "configure"
  11138. #include "confdefs.h"
  11139. /* System header to define __stub macros and hopefully few prototypes,
  11140. which can conflict with char GOMP_parallel_start(); below. */
  11141. #include <assert.h>
  11142. /* Override any gcc2 internal prototype to avoid an error. */
  11143. /* We use char because int might match the return type of a gcc2
  11144. builtin and then its argument prototype would still apply. */
  11145. char GOMP_parallel_start();
  11146. int main() {
  11147. /* The GNU C library defines this for functions which it implements
  11148. to always fail with ENOSYS. Some functions are actually named
  11149. something starting with __ and the normal name is an alias. */
  11150. #if defined (__stub_GOMP_parallel_start) || defined (__stub___GOMP_parallel_start)
  11151. choke me
  11152. #else
  11153. GOMP_parallel_start();
  11154. #endif
  11155. ; return 0; }
  11156. EOF
  11157. if { (eval echo configure:14109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11158. rm -rf conftest*
  11159. eval "ac_cv_func_GOMP_parallel_start=yes"
  11160. else
  11161. echo "configure: failed program was:" >&5
  11162. cat conftest.$ac_ext >&5
  11163. rm -rf conftest*
  11164. eval "ac_cv_func_GOMP_parallel_start=no"
  11165. fi
  11166. rm -f conftest*
  11167. if eval "test \"`echo '$ac_cv_func_'GOMP_parallel_start`\" = yes"; then
  11168. echo "$ac_t""yes" 1>&6
  11169. OMPLIB="$OMPLIB "
  11170. else
  11171. echo "$ac_t""no" 1>&6
  11172. ac_save_ldflags="$LDFLAGS"
  11173. LDFLAGS="$OMPLIBPATH $LDFLAGS"
  11174. echo $ac_n "checking for GOMP_parallel_start in -lgomp""... $ac_c" 1>&6
  11175. echo "configure:14136: checking for GOMP_parallel_start in -lgomp" >&5
  11176. ac_lib_var=`echo gomp'_'GOMP_parallel_start | sed 'y%./+-%__p_%'`
  11177. ac_save_LIBS="$LIBS"
  11178. LIBS="-lgomp $LIBS"
  11179. cat > conftest.$ac_ext <<EOF
  11180. #line 14142 "configure"
  11181. #include "confdefs.h"
  11182. /* Override any gcc2 internal prototype to avoid an error. */
  11183. /* We use char because int might match the return type of a gcc2
  11184. builtin and then its argument prototype would still apply. */
  11185. char GOMP_parallel_start();
  11186. int main() {
  11187. GOMP_parallel_start()
  11188. ; return 0; }
  11189. EOF
  11190. if { (eval echo configure:14153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11191. rm -rf conftest*
  11192. eval "ac_cv_lib_$ac_lib_var=yes"
  11193. else
  11194. echo "configure: failed program was:" >&5
  11195. cat conftest.$ac_ext >&5
  11196. rm -rf conftest*
  11197. eval "ac_cv_lib_$ac_lib_var=no"
  11198. fi
  11199. rm -f conftest*
  11200. LIBS="$ac_save_LIBS"
  11201. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  11202. echo "$ac_t""yes" 1>&6
  11203. OMPLIB="$OMPLIB -lgomp "
  11204. else
  11205. echo "$ac_t""no" 1>&6
  11206. LDFLAGS=${ac_save_ldflags}
  11207. { echo "configure: error: *** Unable to locate OpenMP library." 1>&2; exit 1; }
  11208. fi
  11209. LDFLAGS=${ac_save_ldflags}
  11210. fi
  11211. LIBS=${ac_save_libs}
  11212. LDFLAGS=${ac_save_ldflags}
  11213. # compiler dependent
  11214. #if test ${CC} = "gcc" ; then
  11215. if test x$GCC = xyes ; then
  11216. # GNU C compiler (>= 4.2.1)
  11217. OMPCFLAGS=-fopenmp
  11218. elif test ${CC} = "icc" ; then
  11219. # Intel compiler
  11220. OMPCFLAGS=-openmp
  11221. elif test ${CC} = "opencc" ; then
  11222. # AMD's x86 Open64 compiler
  11223. OMPCFLAGS=-mp
  11224. elif test ${CC} = "pgcc" ; then
  11225. # Portland Group's compiler
  11226. OMPCFLAGS=-mp
  11227. # ... anybody else?
  11228. fi
  11229. # try to build a test program with "$CC $OMPCLFAGS" to confirm it works
  11230. #...how?
  11231. #echo "int main() {return 0;}" > test.c
  11232. #$CC $OMPCLFAGS test.c -o test
  11233. fi # $USE_OPENMP
  11234. # Done checking OpenMP
  11235. # Enable LFS (from cdr-tools)
  11236. # Check whether --enable-largefile or --disable-largefile was given.
  11237. if test "${enable_largefile+set}" = set; then
  11238. enableval="$enable_largefile"
  11239. :
  11240. fi
  11241. if test "$enable_largefile" = yes; then
  11242. echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6
  11243. echo "configure:14232: checking for special C compiler options needed for large files" >&5
  11244. ac_cv_sys_largefile_CC=no
  11245. largefile_cc_opt=""
  11246. if test "$GCC" != yes; then
  11247. # IRIX 6.2 and later do not support large files by default,
  11248. # so use the C compiler's -n32 option if that helps.
  11249. cat > conftest.$ac_ext <<EOF
  11250. #line 14240 "configure"
  11251. #include "confdefs.h"
  11252. #include <sys/types.h>
  11253. /* Check that off_t can represent 2**63 - 1 correctly.
  11254. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11255. since some C++ compilers masquerading as C compilers
  11256. incorrectly reject 9223372036854775807. */
  11257. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11258. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11259. && LARGE_OFF_T % 2147483647 == 1)
  11260. ? 1 : -1];
  11261. int main() {
  11262. ; return 0; }
  11263. EOF
  11264. if { (eval echo configure:14256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11265. :
  11266. else
  11267. echo "configure: failed program was:" >&5
  11268. cat conftest.$ac_ext >&5
  11269. rm -rf conftest*
  11270. ac_save_CC="${CC-cc}"
  11271. CC="$CC -n32"
  11272. cat > conftest.$ac_ext <<EOF
  11273. #line 14265 "configure"
  11274. #include "confdefs.h"
  11275. #include <sys/types.h>
  11276. /* Check that off_t can represent 2**63 - 1 correctly.
  11277. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11278. since some C++ compilers masquerading as C compilers
  11279. incorrectly reject 9223372036854775807. */
  11280. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11281. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11282. && LARGE_OFF_T % 2147483647 == 1)
  11283. ? 1 : -1];
  11284. int main() {
  11285. ; return 0; }
  11286. EOF
  11287. if { (eval echo configure:14281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11288. rm -rf conftest*
  11289. ac_cv_sys_largefile_CC=' -n32'
  11290. else
  11291. echo "configure: failed program was:" >&5
  11292. cat conftest.$ac_ext >&5
  11293. fi
  11294. rm -f conftest*
  11295. CC="$ac_save_CC"
  11296. fi
  11297. rm -f conftest*
  11298. fi
  11299. echo "$ac_t""$ac_cv_sys_largefile_CC" 1>&6
  11300. if test "$ac_cv_sys_largefile_CC" != no; then
  11301. CC="$CC$ac_cv_sys_largefile_CC"
  11302. largefile_cc_opt="$ac_cv_sys_largefile_CC"
  11303. fi
  11304. echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6
  11305. echo "configure:14301: checking for _FILE_OFFSET_BITS value needed for large files" >&5
  11306. ac_cv_sys_file_offset_bits=no
  11307. cat > conftest.$ac_ext <<EOF
  11308. #line 14305 "configure"
  11309. #include "confdefs.h"
  11310. #include <sys/types.h>
  11311. /* Check that off_t can represent 2**63 - 1 correctly.
  11312. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11313. since some C++ compilers masquerading as C compilers
  11314. incorrectly reject 9223372036854775807. */
  11315. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11316. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11317. && LARGE_OFF_T % 2147483647 == 1)
  11318. ? 1 : -1];
  11319. int main() {
  11320. ; return 0; }
  11321. EOF
  11322. if { (eval echo configure:14321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11323. :
  11324. else
  11325. echo "configure: failed program was:" >&5
  11326. cat conftest.$ac_ext >&5
  11327. rm -rf conftest*
  11328. cat > conftest.$ac_ext <<EOF
  11329. #line 14328 "configure"
  11330. #include "confdefs.h"
  11331. #define _FILE_OFFSET_BITS 64
  11332. #include <sys/types.h>
  11333. /* Check that off_t can represent 2**63 - 1 correctly.
  11334. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11335. since some C++ compilers masquerading as C compilers
  11336. incorrectly reject 9223372036854775807. */
  11337. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11338. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11339. && LARGE_OFF_T % 2147483647 == 1)
  11340. ? 1 : -1];
  11341. int main() {
  11342. ; return 0; }
  11343. EOF
  11344. if { (eval echo configure:14346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11345. rm -rf conftest*
  11346. ac_cv_sys_file_offset_bits=64
  11347. else
  11348. echo "configure: failed program was:" >&5
  11349. cat conftest.$ac_ext >&5
  11350. fi
  11351. rm -f conftest*
  11352. fi
  11353. rm -f conftest*
  11354. echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
  11355. if test "$ac_cv_sys_file_offset_bits" != no; then
  11356. cat >> confdefs.h <<EOF
  11357. #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
  11358. EOF
  11359. fi
  11360. echo $ac_n "checking for _LARGE_FILES value needed for large files""... $ac_c" 1>&6
  11361. echo "configure:14365: checking for _LARGE_FILES value needed for large files" >&5
  11362. ac_cv_sys_large_files=no
  11363. cat > conftest.$ac_ext <<EOF
  11364. #line 14369 "configure"
  11365. #include "confdefs.h"
  11366. #include <sys/types.h>
  11367. /* Check that off_t can represent 2**63 - 1 correctly.
  11368. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11369. since some C++ compilers masquerading as C compilers
  11370. incorrectly reject 9223372036854775807. */
  11371. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11372. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11373. && LARGE_OFF_T % 2147483647 == 1)
  11374. ? 1 : -1];
  11375. int main() {
  11376. ; return 0; }
  11377. EOF
  11378. if { (eval echo configure:14385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11379. :
  11380. else
  11381. echo "configure: failed program was:" >&5
  11382. cat conftest.$ac_ext >&5
  11383. rm -rf conftest*
  11384. cat > conftest.$ac_ext <<EOF
  11385. #line 14392 "configure"
  11386. #include "confdefs.h"
  11387. #define _LARGE_FILES 1
  11388. #include <sys/types.h>
  11389. /* Check that off_t can represent 2**63 - 1 correctly.
  11390. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11391. since some C++ compilers masquerading as C compilers
  11392. incorrectly reject 9223372036854775807. */
  11393. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11394. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11395. && LARGE_OFF_T % 2147483647 == 1)
  11396. ? 1 : -1];
  11397. int main() {
  11398. ; return 0; }
  11399. EOF
  11400. if { (eval echo configure:14410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11401. rm -rf conftest*
  11402. ac_cv_sys_large_files=1
  11403. else
  11404. echo "configure: failed program was:" >&5
  11405. cat conftest.$ac_ext >&5
  11406. fi
  11407. rm -f conftest*
  11408. fi
  11409. rm -f conftest*
  11410. echo "$ac_t""$ac_cv_sys_large_files" 1>&6
  11411. if test "$ac_cv_sys_large_files" != no; then
  11412. cat >> confdefs.h <<EOF
  11413. #define _LARGE_FILES $ac_cv_sys_large_files
  11414. EOF
  11415. fi
  11416. echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
  11417. echo "configure:14429: checking for _LARGEFILE_SOURCE value needed for large files" >&5
  11418. ac_cv_sys_largefile_source=no
  11419. cat > conftest.$ac_ext <<EOF
  11420. #line 14433 "configure"
  11421. #include "confdefs.h"
  11422. #include <stdio.h>
  11423. int main() {
  11424. return !fseeko;
  11425. ; return 0; }
  11426. EOF
  11427. if { (eval echo configure:14440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11428. :
  11429. else
  11430. echo "configure: failed program was:" >&5
  11431. cat conftest.$ac_ext >&5
  11432. rm -rf conftest*
  11433. cat > conftest.$ac_ext <<EOF
  11434. #line 14447 "configure"
  11435. #include "confdefs.h"
  11436. #define _LARGEFILE_SOURCE 1
  11437. #include <stdio.h>
  11438. int main() {
  11439. return !fseeko;
  11440. ; return 0; }
  11441. EOF
  11442. if { (eval echo configure:14456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11443. rm -rf conftest*
  11444. ac_cv_sys_largefile_source=1
  11445. else
  11446. echo "configure: failed program was:" >&5
  11447. cat conftest.$ac_ext >&5
  11448. fi
  11449. rm -f conftest*
  11450. fi
  11451. rm -f conftest*
  11452. echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
  11453. if test "$ac_cv_sys_largefile_source" != no; then
  11454. cat >> confdefs.h <<EOF
  11455. #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
  11456. EOF
  11457. fi
  11458. fi
  11459. echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
  11460. echo "configure:14477: checking for _LARGEFILE_SOURCE value needed for large files" >&5
  11461. ac_cv_sys_largefile_source=no
  11462. cat > conftest.$ac_ext <<EOF
  11463. #line 14481 "configure"
  11464. #include "confdefs.h"
  11465. #include <stdio.h>
  11466. int main() {
  11467. return !fseeko;
  11468. ; return 0; }
  11469. EOF
  11470. if { (eval echo configure:14488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11471. :
  11472. else
  11473. echo "configure: failed program was:" >&5
  11474. cat conftest.$ac_ext >&5
  11475. rm -rf conftest*
  11476. cat > conftest.$ac_ext <<EOF
  11477. #line 14495 "configure"
  11478. #include "confdefs.h"
  11479. #define _LARGEFILE_SOURCE 1
  11480. #include <stdio.h>
  11481. int main() {
  11482. return !fseeko;
  11483. ; return 0; }
  11484. EOF
  11485. if { (eval echo configure:14504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11486. rm -rf conftest*
  11487. ac_cv_sys_largefile_source=1
  11488. else
  11489. echo "configure: failed program was:" >&5
  11490. cat conftest.$ac_ext >&5
  11491. fi
  11492. rm -f conftest*
  11493. fi
  11494. rm -f conftest*
  11495. echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
  11496. if test "$ac_cv_sys_largefile_source" != no; then
  11497. cat >> confdefs.h <<EOF
  11498. #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
  11499. EOF
  11500. fi
  11501. # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
  11502. # in glibc 2.1.3, but that breaks too many other things.
  11503. # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
  11504. echo $ac_n "checking for fseeko""... $ac_c" 1>&6
  11505. echo "configure:14527: checking for fseeko" >&5
  11506. ac_cv_func_fseeko=no
  11507. cat > conftest.$ac_ext <<EOF
  11508. #line 14531 "configure"
  11509. #include "confdefs.h"
  11510. #include <stdio.h>
  11511. int main() {
  11512. return fseeko && fseeko (stdin, 0, 0);
  11513. ; return 0; }
  11514. EOF
  11515. if { (eval echo configure:14538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  11516. rm -rf conftest*
  11517. ac_cv_func_fseeko=yes
  11518. else
  11519. echo "configure: failed program was:" >&5
  11520. cat conftest.$ac_ext >&5
  11521. fi
  11522. rm -f conftest*
  11523. echo "$ac_t""$ac_cv_func_fseeko" 1>&6
  11524. if test $ac_cv_func_fseeko != no; then
  11525. cat >> confdefs.h <<\EOF
  11526. #define HAVE_FSEEKO 1
  11527. EOF
  11528. fi
  11529. echo $ac_n "checking if system supports Large Files at all""... $ac_c" 1>&6
  11530. echo "configure:14555: checking if system supports Large Files at all" >&5
  11531. cat > conftest.$ac_ext <<EOF
  11532. #line 14558 "configure"
  11533. #include "confdefs.h"
  11534. #include <stdio.h>
  11535. #include <sys/types.h>
  11536. int main() {
  11537. /*
  11538. * Check that off_t can represent 2**63 - 1 correctly.
  11539. * We can't simply "#define LARGE_OFF_T 9223372036854775807",
  11540. * since some C++ compilers masquerading as C compilers
  11541. * incorrectly reject 9223372036854775807.
  11542. *
  11543. * For MinGW, off64_t should be used and __MSVCRT_VERSION__ >= 0x0601
  11544. * (msvcrt.dll version 6.10 or higher) is needed for _fstat64 and _stat64.
  11545. */
  11546. #ifdef __MINGW32__
  11547. # define LARGE_OFF_T (((off64_t) 1 << 62) - 1 + ((off64_t) 1 << 62))
  11548. #else
  11549. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  11550. #endif
  11551. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  11552. && LARGE_OFF_T % 2147483647 == 1)
  11553. ? 1 : -1];
  11554. #ifdef __MINGW32__
  11555. return !fseeko64;
  11556. return !ftello64;
  11557. #else
  11558. return !fseeko;
  11559. return !ftello;
  11560. #endif
  11561. ; return 0; }
  11562. EOF
  11563. if { (eval echo configure:14590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11564. rm -rf conftest*
  11565. ac_cv_largefiles=yes
  11566. else
  11567. echo "configure: failed program was:" >&5
  11568. cat conftest.$ac_ext >&5
  11569. rm -rf conftest*
  11570. ac_cv_largefiles=no
  11571. fi
  11572. rm -f conftest*
  11573. echo "$ac_t""$ac_cv_largefiles" 1>&6
  11574. if test $ac_cv_largefiles = yes; then
  11575. cat >> confdefs.h <<\EOF
  11576. #define HAVE_LARGEFILES 1
  11577. EOF
  11578. fi
  11579. USE_LARGEFILES=
  11580. if test $ac_cv_largefiles = yes; then
  11581. USE_LARGEFILES=1
  11582. fi
  11583. # Done large file support
  11584. # Enable wxWidgets support (for wxGUI)
  11585. echo $ac_n "checking whether to use wxWidgets""... $ac_c" 1>&6
  11586. echo "configure:14619: checking whether to use wxWidgets" >&5
  11587. WXVERSION=
  11588. WXWIDGETSCXXFLAGS=
  11589. WXWIDGETSCPPFLAGS=
  11590. WXWIDGETSLIB=
  11591. USE_WXWIDGETS=
  11592. MACOSX_ARCHS_WXPYTHON=
  11593. if test "$with_wxwidgets" = "no" ; then
  11594. echo "$ac_t""no" 1>&6
  11595. else
  11596. echo "$ac_t""yes" 1>&6
  11597. USE_WXWIDGETS="1"
  11598. if test "$with_wxwidgets" != "yes" ; then
  11599. WX_CONFIG="$with_wxwidgets"
  11600. fi
  11601. # Extract the first word of "wx-config", so it can be a program name with args.
  11602. set dummy wx-config; ac_word=$2
  11603. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  11604. echo "configure:14640: checking for $ac_word" >&5
  11605. case "$WX_CONFIG" in
  11606. /*)
  11607. ac_cv_path_WX_CONFIG="$WX_CONFIG" # Let the user override the test with a path.
  11608. ;;
  11609. ?:/*)
  11610. ac_cv_path_WX_CONFIG="$WX_CONFIG" # Let the user override the test with a dos path.
  11611. ;;
  11612. *)
  11613. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  11614. ac_dummy="$PATH"
  11615. for ac_dir in $ac_dummy; do
  11616. test -z "$ac_dir" && ac_dir=.
  11617. if test -f $ac_dir/$ac_word; then
  11618. ac_cv_path_WX_CONFIG="$ac_dir/$ac_word"
  11619. break
  11620. fi
  11621. done
  11622. IFS="$ac_save_ifs"
  11623. test -z "$ac_cv_path_WX_CONFIG" && ac_cv_path_WX_CONFIG="no"
  11624. ;;
  11625. esac
  11626. WX_CONFIG="$ac_cv_path_WX_CONFIG"
  11627. if test -n "$WX_CONFIG"; then
  11628. echo "$ac_t""$WX_CONFIG" 1>&6
  11629. else
  11630. echo "$ac_t""no" 1>&6
  11631. fi
  11632. if test "$WX_CONFIG" = "no" ; then
  11633. { echo "configure: error: *** couldn't find wx-config
  11634. wxWidgets must be installed on your system.
  11635. Please check that wx-config is in path, the directory
  11636. where wxWidgets libraries are installed (returned by
  11637. 'wx-config --libs' or 'wx-config --static --libs' command)
  11638. is in LD_LIBRARY_PATH or equivalent variable and
  11639. wxWidgets version is 2.8.1 or above." 1>&2; exit 1; }
  11640. fi
  11641. # Check wxWidgets version
  11642. REQWX="2.8.1"
  11643. echo $ac_n "checking wxWidgets version""... $ac_c" 1>&6
  11644. echo "configure:14688: checking wxWidgets version" >&5
  11645. if WXVERSION=`"$WX_CONFIG" --version`; then
  11646. echo "$ac_t""$WXVERSION" 1>&6
  11647. else
  11648. echo "$ac_t""not found" 1>&6
  11649. { echo "configure: error: wxWidgets is required." 1>&2; exit 1; }
  11650. fi
  11651. if test `expr "$WXVERSION" \< "$REQWX"` = 1 ; then
  11652. { echo "configure: error: *** wxWidgets "$REQWX" or later is required." 1>&2; exit 1; }
  11653. fi
  11654. # With wxWidgets includes directory
  11655. WXWIDGETSCXXFLAGS=`"$WX_CONFIG" --cxxflags`
  11656. WXWIDGETSCPPFLAGS=`"$WX_CONFIG" --cppflags`
  11657. ac_save_cppflags="$CPPFLAGS"
  11658. CPPFLAGS="$WXWIDGETSCPPFLAGS $CPPFLAGS"
  11659. for ac_hdr in wx/wxprec.h
  11660. do
  11661. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  11662. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  11663. echo "configure:14711: checking for $ac_hdr" >&5
  11664. cat > conftest.$ac_ext <<EOF
  11665. #line 14714 "configure"
  11666. #include "confdefs.h"
  11667. #include <$ac_hdr>
  11668. EOF
  11669. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  11670. { (eval echo configure:14719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  11671. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  11672. if test -z "$ac_err"; then
  11673. rm -rf conftest*
  11674. eval "ac_cv_header_$ac_safe=yes"
  11675. else
  11676. echo "$ac_err" >&5
  11677. echo "configure: failed program was:" >&5
  11678. cat conftest.$ac_ext >&5
  11679. rm -rf conftest*
  11680. eval "ac_cv_header_$ac_safe=no"
  11681. fi
  11682. rm -f conftest*
  11683. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  11684. echo "$ac_t""yes" 1>&6
  11685. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  11686. cat >> confdefs.h <<EOF
  11687. #define $ac_tr_hdr 1
  11688. EOF
  11689. else
  11690. echo "$ac_t""no" 1>&6
  11691. { echo "configure: error: *** Unable to locate wxWidgets includes." 1>&2; exit 1; }
  11692. fi
  11693. done
  11694. CPPFLAGS=$ac_save_cppflags
  11695. # With wxWidgets library directory
  11696. WXWIDGETSLIB=`"$WX_CONFIG" --libs`
  11697. # shouldn't have arch flags in C/LD flags on OSX
  11698. for a in i386 ppc x86_64 ppc64
  11699. do
  11700. WXWIDGETSCXXFLAGS=`echo "$WXWIDGETSCXXFLAGS" | sed "s/-arch *$a//g"`
  11701. WXWIDGETSCPPFLAGS=`echo "$WXWIDGETSCPPFLAGS" | sed "s/-arch *$a//g"`
  11702. WXWIDGETSLIB=`echo "$WXWIDGETSLIB" | sed "s/-arch *$a//g"`
  11703. done
  11704. # check for available OSX archs in wxPython
  11705. if test -n "$MACOSX_ARCHS" ; then
  11706. wxver=`"$WX_CONFIG" --version`
  11707. wxlib=`"$WX_CONFIG" --prefix`/lib/lib`"$WX_CONFIG" --basename`-`echo "$wxver" | cut -d . -f1,2`.dylib
  11708. wxlibinfo=`file "$wxlib"`
  11709. for a in i386 ppc x86_64 ppc64
  11710. do
  11711. # add only if in MACOSX_ARCHS
  11712. if test -n "`echo \"$wxlibinfo\" | grep \"library $a\"`" ; then
  11713. if test -n "`echo \"$MACOSX_ARCHS\" | grep $a`" ; then
  11714. MACOSX_ARCHS_WXPYTHON="$MACOSX_ARCHS_WXPYTHON -arch $a"
  11715. fi
  11716. fi
  11717. done
  11718. fi
  11719. fi # $USE_WXWIDGETS
  11720. # Done checking wxWidgets
  11721. USE_TERMIO=
  11722. STRIPFLAG=
  11723. GRASS_HOME="${DSTDIR}"
  11724. trap '' 1 2 15
  11725. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  11726. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  11727. # Let make expand exec_prefix.
  11728. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  11729. # Any assignment to VPATH causes Sun make to only execute
  11730. # the first set of double-colon rules, so remove it if not needed.
  11731. # If there is a colon in the path, we need to keep it.
  11732. if test "x$srcdir" = x.; then
  11733. ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
  11734. fi
  11735. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  11736. DEFS=-DHAVE_CONFIG_H
  11737. # Without the "./", some shells look in PATH for config.status.
  11738. : ${CONFIG_STATUS=./config.status}
  11739. echo creating $CONFIG_STATUS
  11740. rm -f $CONFIG_STATUS
  11741. cat > $CONFIG_STATUS <<EOF
  11742. #! /bin/sh
  11743. # Generated automatically by configure.
  11744. # Run this file to recreate the current configuration.
  11745. # This directory was configured as follows,
  11746. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  11747. #
  11748. # $0 $ac_configure_args
  11749. #
  11750. # Compiler output produced by configure, useful for debugging
  11751. # configure, is in ./config.log if it exists.
  11752. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  11753. for ac_option
  11754. do
  11755. case "\$ac_option" in
  11756. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  11757. echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  11758. exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  11759. -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  11760. echo "$CONFIG_STATUS generated by autoconf version 2.13"
  11761. exit 0 ;;
  11762. -help | --help | --hel | --he | --h)
  11763. echo "\$ac_cs_usage"; exit 0 ;;
  11764. *) echo "\$ac_cs_usage"; exit 1 ;;
  11765. esac
  11766. done
  11767. ac_given_srcdir=$srcdir
  11768. ac_given_INSTALL="$INSTALL"
  11769. 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
  11770. EOF
  11771. cat >> $CONFIG_STATUS <<EOF
  11772. # Protect against being on the right side of a sed subst in config.status.
  11773. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  11774. s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  11775. $ac_vpsub
  11776. $extrasub
  11777. s%@SHELL@%$SHELL%g
  11778. s%@CFLAGS@%$CFLAGS%g
  11779. s%@CPPFLAGS@%$CPPFLAGS%g
  11780. s%@CXXFLAGS@%$CXXFLAGS%g
  11781. s%@FFLAGS@%$FFLAGS%g
  11782. s%@DEFS@%$DEFS%g
  11783. s%@LDFLAGS@%$LDFLAGS%g
  11784. s%@LIBS@%$LIBS%g
  11785. s%@exec_prefix@%$exec_prefix%g
  11786. s%@prefix@%$prefix%g
  11787. s%@program_transform_name@%$program_transform_name%g
  11788. s%@bindir@%$bindir%g
  11789. s%@sbindir@%$sbindir%g
  11790. s%@libexecdir@%$libexecdir%g
  11791. s%@datadir@%$datadir%g
  11792. s%@sysconfdir@%$sysconfdir%g
  11793. s%@sharedstatedir@%$sharedstatedir%g
  11794. s%@localstatedir@%$localstatedir%g
  11795. s%@libdir@%$libdir%g
  11796. s%@includedir@%$includedir%g
  11797. s%@oldincludedir@%$oldincludedir%g
  11798. s%@infodir@%$infodir%g
  11799. s%@mandir@%$mandir%g
  11800. s%@host@%$host%g
  11801. s%@host_alias@%$host_alias%g
  11802. s%@host_cpu@%$host_cpu%g
  11803. s%@host_vendor@%$host_vendor%g
  11804. s%@host_os@%$host_os%g
  11805. s%@CC@%$CC%g
  11806. s%@EXEEXT@%$EXEEXT%g
  11807. s%@MINGW32@%$MINGW32%g
  11808. s%@BINDIR@%$BINDIR%g
  11809. s%@pwd@%$pwd%g
  11810. s%@SRCDIR@%$SRCDIR%g
  11811. s%@DSTDIR@%$DSTDIR%g
  11812. s%@ARCH@%$ARCH%g
  11813. s%@GISBASE@%$GISBASE%g
  11814. s%@GRASS_BIN@%$GRASS_BIN%g
  11815. s%@SVN_VERSION@%$SVN_VERSION%g
  11816. s%@GRASS_VERSION_FILE@%$GRASS_VERSION_FILE%g
  11817. s%@GRASS_VERSION_MAJOR@%$GRASS_VERSION_MAJOR%g
  11818. s%@GRASS_VERSION_MINOR@%$GRASS_VERSION_MINOR%g
  11819. s%@GRASS_VERSION_RELEASE@%$GRASS_VERSION_RELEASE%g
  11820. s%@GRASS_VERSION_NUMBER@%$GRASS_VERSION_NUMBER%g
  11821. s%@GRASS_VERSION_DATE@%$GRASS_VERSION_DATE%g
  11822. s%@GRASS_VERSION_SVN@%$GRASS_VERSION_SVN%g
  11823. s%@NAME_VER@%$NAME_VER%g
  11824. s%@LIB_VER@%$LIB_VER%g
  11825. s%@MACOSX_APP@%$MACOSX_APP%g
  11826. s%@MACOSX_ARCHS@%$MACOSX_ARCHS%g
  11827. s%@MACOSX_SDK@%$MACOSX_SDK%g
  11828. s%@INSTDIR@%$INSTDIR%g
  11829. s%@GRASS_LIB_PREFIX@%$GRASS_LIB_PREFIX%g
  11830. s%@GRASS_LIB_SUFFIX@%$GRASS_LIB_SUFFIX%g
  11831. s%@GRASS_LIBRARY_TYPE@%$GRASS_LIBRARY_TYPE%g
  11832. s%@PLAT_OBJS@%$PLAT_OBJS%g
  11833. s%@CC_SEARCH_FLAGS@%$CC_SEARCH_FLAGS%g
  11834. s%@LD_SEARCH_FLAGS@%$LD_SEARCH_FLAGS%g
  11835. s%@LD_LIBRARY_PATH_VAR@%$LD_LIBRARY_PATH_VAR%g
  11836. s%@SHLIB_LD@%$SHLIB_LD%g
  11837. s%@SHLIB_LD_FLAGS@%$SHLIB_LD_FLAGS%g
  11838. s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
  11839. s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
  11840. s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
  11841. s%@STLIB_LD@%$STLIB_LD%g
  11842. s%@STLIB_SUFFIX@%$STLIB_SUFFIX%g
  11843. s%@INCLUDE_DIRS@%$INCLUDE_DIRS%g
  11844. s%@LIBRARY_DIRS@%$LIBRARY_DIRS%g
  11845. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  11846. s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
  11847. s%@INSTALL_DATA@%$INSTALL_DATA%g
  11848. s%@LEX@%$LEX%g
  11849. s%@LEXLIB@%$LEXLIB%g
  11850. s%@LEXPATH@%$LEXPATH%g
  11851. s%@YACC@%$YACC%g
  11852. s%@YACCPATH@%$YACCPATH%g
  11853. s%@RANLIB@%$RANLIB%g
  11854. s%@AR@%$AR%g
  11855. s%@ENV@%$ENV%g
  11856. s%@PERL@%$PERL%g
  11857. s%@CPP@%$CPP%g
  11858. s%@CROSS_COMPILING@%$CROSS_COMPILING%g
  11859. s%@X_CFLAGS@%$X_CFLAGS%g
  11860. s%@X_LIBS@%$X_LIBS%g
  11861. s%@X_PRE_LIBS@%$X_PRE_LIBS%g
  11862. s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
  11863. s%@XLIB@%$XLIB%g
  11864. s%@XTLIB@%$XTLIB%g
  11865. s%@USE_X11@%$USE_X11%g
  11866. s%@DBMIEXTRALIB@%$DBMIEXTRALIB%g
  11867. s%@XDRLIB@%$XDRLIB%g
  11868. s%@HAVE_ASPRINTF@%$HAVE_ASPRINTF%g
  11869. s%@MATHLIB@%$MATHLIB%g
  11870. s%@DLLIB@%$DLLIB%g
  11871. s%@ICONVLIB@%$ICONVLIB%g
  11872. s%@SOCKLIB@%$SOCKLIB%g
  11873. s%@HAVE_SOCKET@%$HAVE_SOCKET%g
  11874. s%@ZLIBINCPATH@%$ZLIBINCPATH%g
  11875. s%@ZLIBLIBPATH@%$ZLIBLIBPATH%g
  11876. s%@ZLIB@%$ZLIB%g
  11877. s%@PROJINC@%$PROJINC%g
  11878. s%@PROJLIB@%$PROJLIB%g
  11879. s%@PROJSHARE@%$PROJSHARE%g
  11880. s%@NAD2BIN@%$NAD2BIN%g
  11881. s%@REGEXINCPATH@%$REGEXINCPATH%g
  11882. s%@REGEXLIBPATH@%$REGEXLIBPATH%g
  11883. s%@REGEXLIB@%$REGEXLIB%g
  11884. s%@USE_REGEX@%$USE_REGEX%g
  11885. s%@READLINEINCPATH@%$READLINEINCPATH%g
  11886. s%@READLINELIBPATH@%$READLINELIBPATH%g
  11887. s%@READLINELIB@%$READLINELIB%g
  11888. s%@HISTORYLIB@%$HISTORYLIB%g
  11889. s%@JPEGINCPATH@%$JPEGINCPATH%g
  11890. s%@JPEGLIBPATH@%$JPEGLIBPATH%g
  11891. s%@JPEGLIB@%$JPEGLIB%g
  11892. s%@GDAL_CONFIG@%$GDAL_CONFIG%g
  11893. s%@GDAL_LIBS@%$GDAL_LIBS%g
  11894. s%@GDAL_CFLAGS@%$GDAL_CFLAGS%g
  11895. s%@USE_GDAL@%$USE_GDAL%g
  11896. s%@USE_OGR@%$USE_OGR%g
  11897. s%@LIBLAS_CONFIG@%$LIBLAS_CONFIG%g
  11898. s%@LIBLAS_LIBS@%$LIBLAS_LIBS%g
  11899. s%@LIBLAS_CFLAGS@%$LIBLAS_CFLAGS%g
  11900. s%@LIBLAS_INC@%$LIBLAS_INC%g
  11901. s%@USE_LIBLAS@%$USE_LIBLAS%g
  11902. s%@GEOS_CONFIG@%$GEOS_CONFIG%g
  11903. s%@GEOS_LIBS@%$GEOS_LIBS%g
  11904. s%@GEOS_CFLAGS@%$GEOS_CFLAGS%g
  11905. s%@USE_GEOS@%$USE_GEOS%g
  11906. s%@TIFF_INCLUDE_DIRS@%$TIFF_INCLUDE_DIRS%g
  11907. s%@TIFF_LIBRARY_DIRS@%$TIFF_LIBRARY_DIRS%g
  11908. s%@TIFFLIB@%$TIFFLIB%g
  11909. s%@PNGINC@%$PNGINC%g
  11910. s%@PNGLIB@%$PNGLIB%g
  11911. s%@USE_PNG@%$USE_PNG%g
  11912. s%@USE_POSTGRES@%$USE_POSTGRES%g
  11913. s%@PQINCPATH@%$PQINCPATH%g
  11914. s%@PQLIBPATH@%$PQLIBPATH%g
  11915. s%@PQLIB@%$PQLIB%g
  11916. s%@MYSQLD_CONFIG@%$MYSQLD_CONFIG%g
  11917. s%@USE_MYSQL@%$USE_MYSQL%g
  11918. s%@MYSQLINCPATH@%$MYSQLINCPATH%g
  11919. s%@MYSQLLIBPATH@%$MYSQLLIBPATH%g
  11920. s%@MYSQLLIB@%$MYSQLLIB%g
  11921. s%@MYSQLDLIB@%$MYSQLDLIB%g
  11922. s%@USE_SQLITE@%$USE_SQLITE%g
  11923. s%@SQLITEINCPATH@%$SQLITEINCPATH%g
  11924. s%@SQLITELIBPATH@%$SQLITELIBPATH%g
  11925. s%@SQLITELIB@%$SQLITELIB%g
  11926. s%@USE_FFMPEG@%$USE_FFMPEG%g
  11927. s%@FFMPEGINCPATH@%$FFMPEGINCPATH%g
  11928. s%@FFMPEGLIBPATH@%$FFMPEGLIBPATH%g
  11929. s%@FFMPEGLIB@%$FFMPEGLIB%g
  11930. s%@USE_OPENGL@%$USE_OPENGL%g
  11931. s%@OPENGL_X11@%$OPENGL_X11%g
  11932. s%@OPENGL_AQUA@%$OPENGL_AQUA%g
  11933. s%@OPENGL_WINDOWS@%$OPENGL_WINDOWS%g
  11934. s%@OPENGLINC@%$OPENGLINC%g
  11935. s%@OPENGLLIB@%$OPENGLLIB%g
  11936. s%@OPENGLULIB@%$OPENGLULIB%g
  11937. s%@USE_TCLTK@%$USE_TCLTK%g
  11938. s%@TCLINCDIR@%$TCLINCDIR%g
  11939. s%@TKINCDIR@%$TKINCDIR%g
  11940. s%@TCLTKLIBPATH@%$TCLTKLIBPATH%g
  11941. s%@TCLTKLIBS@%$TCLTKLIBS%g
  11942. s%@MACOSX_ARCHS_TCLTK@%$MACOSX_ARCHS_TCLTK%g
  11943. s%@ODBCINC@%$ODBCINC%g
  11944. s%@ODBCLIB@%$ODBCLIB%g
  11945. s%@FFTWINC@%$FFTWINC%g
  11946. s%@FFTWLIB@%$FFTWLIB%g
  11947. s%@BLASLIB@%$BLASLIB%g
  11948. s%@BLASINC@%$BLASINC%g
  11949. s%@LAPACKLIB@%$LAPACKLIB%g
  11950. s%@LAPACKINC@%$LAPACKINC%g
  11951. s%@CAIRO_HAS_XRENDER@%$CAIRO_HAS_XRENDER%g
  11952. s%@CAIRO_HAS_XRENDER_SURFACE@%$CAIRO_HAS_XRENDER_SURFACE%g
  11953. s%@CAIROINC@%$CAIROINC%g
  11954. s%@CAIROLIB@%$CAIROLIB%g
  11955. s%@USE_CAIRO@%$USE_CAIRO%g
  11956. s%@FTINC@%$FTINC%g
  11957. s%@FTLIB@%$FTLIB%g
  11958. s%@INTLLIB@%$INTLLIB%g
  11959. s%@HAVE_NLS@%$HAVE_NLS%g
  11960. s%@CXX@%$CXX%g
  11961. s%@OPENDWGINCPATH@%$OPENDWGINCPATH%g
  11962. s%@OPENDWGLIBPATH@%$OPENDWGLIBPATH%g
  11963. s%@OPENDWGLIB@%$OPENDWGLIB%g
  11964. s%@USE_OPENDWG@%$USE_OPENDWG%g
  11965. s%@PTHREADINCPATH@%$PTHREADINCPATH%g
  11966. s%@PTHREADLIBPATH@%$PTHREADLIBPATH%g
  11967. s%@PTHREADLIB@%$PTHREADLIB%g
  11968. s%@USE_PTHREAD@%$USE_PTHREAD%g
  11969. s%@OMPINCPATH@%$OMPINCPATH%g
  11970. s%@OMPLIBPATH@%$OMPLIBPATH%g
  11971. s%@OMPLIB@%$OMPLIB%g
  11972. s%@OMPCFLAGS@%$OMPCFLAGS%g
  11973. s%@USE_OPENMP@%$USE_OPENMP%g
  11974. s%@USE_LARGEFILES@%$USE_LARGEFILES%g
  11975. s%@WX_CONFIG@%$WX_CONFIG%g
  11976. s%@WXVERSION@%$WXVERSION%g
  11977. s%@WXWIDGETSCXXFLAGS@%$WXWIDGETSCXXFLAGS%g
  11978. s%@WXWIDGETSCPPFLAGS@%$WXWIDGETSCPPFLAGS%g
  11979. s%@WXWIDGETSLIB@%$WXWIDGETSLIB%g
  11980. s%@USE_WXWIDGETS@%$USE_WXWIDGETS%g
  11981. s%@MACOSX_ARCHS_WXPYTHON@%$MACOSX_ARCHS_WXPYTHON%g
  11982. s%@USE_TERMIO@%$USE_TERMIO%g
  11983. s%@STRIPFLAG@%$STRIPFLAG%g
  11984. s%@GRASS_HOME@%$GRASS_HOME%g
  11985. CEOF
  11986. EOF
  11987. cat >> $CONFIG_STATUS <<\EOF
  11988. # Split the substitutions into bite-sized pieces for seds with
  11989. # small command number limits, like on Digital OSF/1 and HP-UX.
  11990. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  11991. ac_file=1 # Number of current file.
  11992. ac_beg=1 # First line for current file.
  11993. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  11994. ac_more_lines=:
  11995. ac_sed_cmds=""
  11996. while $ac_more_lines; do
  11997. if test $ac_beg -gt 1; then
  11998. sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  11999. else
  12000. sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  12001. fi
  12002. if test ! -s conftest.s$ac_file; then
  12003. ac_more_lines=false
  12004. rm -f conftest.s$ac_file
  12005. else
  12006. if test -z "$ac_sed_cmds"; then
  12007. ac_sed_cmds="sed -f conftest.s$ac_file"
  12008. else
  12009. ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  12010. fi
  12011. ac_file=`expr $ac_file + 1`
  12012. ac_beg=$ac_end
  12013. ac_end=`expr $ac_end + $ac_max_sed_cmds`
  12014. fi
  12015. done
  12016. if test -z "$ac_sed_cmds"; then
  12017. ac_sed_cmds=cat
  12018. fi
  12019. EOF
  12020. cat >> $CONFIG_STATUS <<EOF
  12021. CONFIG_FILES=\${CONFIG_FILES-"include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex include/version.h grass.pc"}
  12022. EOF
  12023. cat >> $CONFIG_STATUS <<\EOF
  12024. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  12025. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  12026. case "$ac_file" in
  12027. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  12028. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  12029. *) ac_file_in="${ac_file}.in" ;;
  12030. esac
  12031. # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  12032. # Remove last slash and all that follows it. Not all systems have dirname.
  12033. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  12034. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  12035. # The file is in a subdirectory.
  12036. test ! -d "$ac_dir" && mkdir "$ac_dir"
  12037. ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  12038. # A "../" for each directory in $ac_dir_suffix.
  12039. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  12040. else
  12041. ac_dir_suffix= ac_dots=
  12042. fi
  12043. case "$ac_given_srcdir" in
  12044. .) srcdir=.
  12045. if test -z "$ac_dots"; then top_srcdir=.
  12046. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  12047. /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  12048. *) # Relative path.
  12049. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  12050. top_srcdir="$ac_dots$ac_given_srcdir" ;;
  12051. esac
  12052. case "$ac_given_INSTALL" in
  12053. [/$]*) INSTALL="$ac_given_INSTALL" ;;
  12054. *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  12055. esac
  12056. echo creating "$ac_file"
  12057. rm -f "$ac_file"
  12058. configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  12059. case "$ac_file" in
  12060. *Makefile*) ac_comsub="1i\\
  12061. # $configure_input" ;;
  12062. *) ac_comsub= ;;
  12063. esac
  12064. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  12065. sed -e "$ac_comsub
  12066. s%@configure_input@%$configure_input%g
  12067. s%@srcdir@%$srcdir%g
  12068. s%@top_srcdir@%$top_srcdir%g
  12069. s%@INSTALL@%$INSTALL%g
  12070. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  12071. fi; done
  12072. rm -f conftest.s*
  12073. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  12074. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  12075. #
  12076. # ac_d sets the value in "#define NAME VALUE" lines.
  12077. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
  12078. ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
  12079. ac_dC='\3'
  12080. ac_dD='%g'
  12081. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  12082. ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  12083. ac_uB='\([ ]\)%\1#\2define\3'
  12084. ac_uC=' '
  12085. ac_uD='\4%g'
  12086. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  12087. ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  12088. ac_eB='$%\1#\2define\3'
  12089. ac_eC=' '
  12090. ac_eD='%g'
  12091. if test "${CONFIG_HEADERS+set}" != set; then
  12092. EOF
  12093. cat >> $CONFIG_STATUS <<EOF
  12094. CONFIG_HEADERS="include/config.h"
  12095. EOF
  12096. cat >> $CONFIG_STATUS <<\EOF
  12097. fi
  12098. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  12099. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  12100. case "$ac_file" in
  12101. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  12102. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  12103. *) ac_file_in="${ac_file}.in" ;;
  12104. esac
  12105. echo creating $ac_file
  12106. rm -f conftest.frag conftest.in conftest.out
  12107. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  12108. cat $ac_file_inputs > conftest.in
  12109. EOF
  12110. # Transform confdefs.h into a sed script conftest.vals that substitutes
  12111. # the proper values into config.h.in to produce config.h. And first:
  12112. # Protect against being on the right side of a sed subst in config.status.
  12113. # Protect against being in an unquoted here document in config.status.
  12114. rm -f conftest.vals
  12115. cat > conftest.hdr <<\EOF
  12116. s/[\\&%]/\\&/g
  12117. s%[\\$`]%\\&%g
  12118. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  12119. s%ac_d%ac_u%gp
  12120. s%ac_u%ac_e%gp
  12121. EOF
  12122. sed -n -f conftest.hdr confdefs.h > conftest.vals
  12123. rm -f conftest.hdr
  12124. # This sed command replaces #undef with comments. This is necessary, for
  12125. # example, in the case of _POSIX_SOURCE, which is predefined and required
  12126. # on some systems where configure will not decide to define it.
  12127. cat >> conftest.vals <<\EOF
  12128. s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  12129. EOF
  12130. # Break up conftest.vals because some shells have a limit on
  12131. # the size of here documents, and old seds have small limits too.
  12132. rm -f conftest.tail
  12133. while :
  12134. do
  12135. ac_lines=`grep -c . conftest.vals`
  12136. # grep -c gives empty output for an empty file on some AIX systems.
  12137. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  12138. # Write a limited-size here document to conftest.frag.
  12139. echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  12140. sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  12141. echo 'CEOF
  12142. sed -f conftest.frag conftest.in > conftest.out
  12143. rm -f conftest.in
  12144. mv conftest.out conftest.in
  12145. ' >> $CONFIG_STATUS
  12146. sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  12147. rm -f conftest.vals
  12148. mv conftest.tail conftest.vals
  12149. done
  12150. rm -f conftest.vals
  12151. cat >> $CONFIG_STATUS <<\EOF
  12152. rm -f conftest.frag conftest.h
  12153. echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
  12154. cat conftest.in >> conftest.h
  12155. rm -f conftest.in
  12156. if cmp -s $ac_file conftest.h 2>/dev/null; then
  12157. echo "$ac_file is unchanged"
  12158. rm -f conftest.h
  12159. else
  12160. # Remove last slash and all that follows it. Not all systems have dirname.
  12161. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  12162. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  12163. # The file is in a subdirectory.
  12164. test ! -d "$ac_dir" && mkdir "$ac_dir"
  12165. fi
  12166. rm -f $ac_file
  12167. mv conftest.h $ac_file
  12168. fi
  12169. fi; done
  12170. EOF
  12171. cat >> $CONFIG_STATUS <<EOF
  12172. EOF
  12173. cat >> $CONFIG_STATUS <<\EOF
  12174. exit 0
  12175. EOF
  12176. chmod +x $CONFIG_STATUS
  12177. rm -fr confdefs* $ac_clean_files
  12178. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  12179. echo "Copying config.status to config.status.${ARCH}"
  12180. cp -f config.status config.status.${ARCH}
  12181. # Display configuration status
  12182. USE_TOGL=
  12183. if test -n "${USE_TCLTK}" -a -n "${USE_OPENGL}" ; then
  12184. USE_TOGL="1"
  12185. fi
  12186. echo ""
  12187. echo "GRASS is now configured for: ${host}"
  12188. echo ""
  12189. echo " Source directory: ${SRCDIR}"
  12190. echo " Build directory: ${DSTDIR}"
  12191. echo " Installation directory: ${INSTDIR}"
  12192. echo " Startup script in directory: ${bindir}"
  12193. echo " C compiler: ${CC} ${CFLAGS}"
  12194. echo " C++ compiler: ${CXX} ${CXXFLAGS}"
  12195. #LOC_MSG([ FORTRAN compiler: ${F77} ${FFLAGS}])
  12196. echo " Building shared libraries: ${shared_ok}"
  12197. echo " OpenGL platform: ${OPENGL_TYPE}"
  12198. echo ""
  12199. echo " MacOSX application: `if test -n "${MACOSX_APP}" ; then echo yes ; else echo no ; fi`"
  12200. echo " MacOSX architectures: ${MACOSX_ARCHS}"
  12201. echo " MacOSX SDK: ${MACOSX_SDK}"
  12202. echo ""
  12203. echo " Tcl/Tk NVIZ: `if test -n "${USE_TOGL}" ; then echo yes ; else echo no ; fi`"
  12204. echo ""
  12205. echo " BLAS support: `if test -n "${USE_BLAS}" ; then echo yes ; else echo no ; fi`"
  12206. echo " C++ support: `if test -n "${USE_CXX}" ; then echo yes ; else echo no ; fi`"
  12207. echo " Cairo support: `if test -n "${USE_CAIRO}" ; then echo yes ; else echo no ; fi`"
  12208. echo " DWG support: `if test -n "${USE_OPENDWG}" ; then echo yes ; else echo no ; fi`"
  12209. echo " FFMPEG support: `if test -n "${USE_FFMPEG}" ; then echo yes ; else echo no ; fi`"
  12210. echo " FFTW support: `if test -n "${USE_FFTW}" ; then echo yes ; else echo no ; fi`"
  12211. echo " FreeType support: `if test -n "${USE_FREETYPE}" ; then echo yes ; else echo no ; fi`"
  12212. echo " GDAL support: `if test -n "${USE_GDAL}" ; then echo yes ; else echo no ; fi`"
  12213. echo " GEOS support: `if test -n "${USE_GEOS}" ; then echo yes ; else echo no ; fi`"
  12214. echo " JPEG support: `if test -n "${USE_JPEG}" ; then echo yes ; else echo no ; fi`"
  12215. echo " LAPACK support: `if test -n "${USE_LAPACK}" ; then echo yes ; else echo no ; fi`"
  12216. echo " Large File support (LFS): `if test -n "${USE_LARGEFILES}" ; then echo yes ; else echo no ; fi`"
  12217. echo " libLAS support: `if test -n "${USE_LIBLAS}" ; then echo yes ; else echo no ; fi`"
  12218. echo " MySQL support: `if test -n "${USE_MYSQL}" ; then echo yes ; else echo no ; fi`"
  12219. echo " NLS support: `if test -n "${USE_NLS}" ; then echo yes ; else echo no ; fi`"
  12220. echo " ODBC support: `if test -n "${USE_ODBC}" ; then echo yes ; else echo no ; fi`"
  12221. echo " OGR support: `if test -n "${USE_OGR}" ; then echo yes ; else echo no ; fi`"
  12222. echo " OpenGL support: `if test -n "${USE_OPENGL}" ; then echo yes ; else echo no ; fi`"
  12223. echo " OpenMP support: `if test -n "${USE_OPENMP}" ; then echo yes ; else echo no ; fi`"
  12224. echo " PNG support: `if test -n "${USE_PNG}" ; then echo yes ; else echo no ; fi`"
  12225. echo " POSIX thread support: `if test -n "${USE_PTHREAD}" ; then echo yes ; else echo no ; fi`"
  12226. echo " PostgreSQL support: `if test -n "${USE_POSTGRES}" ; then echo yes ; else echo no ; fi`"
  12227. echo " Readline support: `if test -n "${USE_READLINE}" ; then echo yes ; else echo no ; fi`"
  12228. echo " Regex support: `if test -n "${USE_REGEX}" ; then echo yes ; else echo no ; fi`"
  12229. echo " SQLite support: `if test -n "${USE_SQLITE}" ; then echo yes ; else echo no ; fi`"
  12230. echo " TIFF support: `if test -n "${USE_TIFF}" ; then echo yes ; else echo no ; fi`"
  12231. echo " Tcl/Tk support: `if test -n "${USE_TCLTK}" ; then echo yes ; else echo no ; fi`"
  12232. echo " wxWidgets support: `if test -n "${USE_WXWIDGETS}" ; then echo yes ; else echo no ; fi`"
  12233. echo " X11 support: `if test -n "${USE_X11}" ; then echo yes ; else echo no ; fi`"
  12234. echo ""