configure 819 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597
  1. #! /bin/sh
  2. # Guess values for system-dependent variables and create Makefiles.
  3. # Generated by GNU Autoconf 2.69 for libgnu UNUSED-VERSION.
  4. #
  5. #
  6. # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
  7. #
  8. #
  9. # This configure script is free software; the Free Software Foundation
  10. # gives unlimited permission to copy, distribute and modify it.
  11. ## -------------------- ##
  12. ## M4sh Initialization. ##
  13. ## -------------------- ##
  14. # Be more Bourne compatible
  15. DUALCASE=1; export DUALCASE # for MKS sh
  16. if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  17. emulate sh
  18. NULLCMD=:
  19. # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  20. # is contrary to our usage. Disable this feature.
  21. alias -g '${1+"$@"}'='"$@"'
  22. setopt NO_GLOB_SUBST
  23. else
  24. case `(set -o) 2>/dev/null` in #(
  25. *posix*) :
  26. set -o posix ;; #(
  27. *) :
  28. ;;
  29. esac
  30. fi
  31. as_nl='
  32. '
  33. export as_nl
  34. # Printing a long string crashes Solaris 7 /usr/bin/printf.
  35. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  36. as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  37. as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  38. # Prefer a ksh shell builtin over an external printf program on Solaris,
  39. # but without wasting forks for bash or zsh.
  40. if test -z "$BASH_VERSION$ZSH_VERSION" \
  41. && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  42. as_echo='print -r --'
  43. as_echo_n='print -rn --'
  44. elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  45. as_echo='printf %s\n'
  46. as_echo_n='printf %s'
  47. else
  48. if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  49. as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  50. as_echo_n='/usr/ucb/echo -n'
  51. else
  52. as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  53. as_echo_n_body='eval
  54. arg=$1;
  55. case $arg in #(
  56. *"$as_nl"*)
  57. expr "X$arg" : "X\\(.*\\)$as_nl";
  58. arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  59. esac;
  60. expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  61. '
  62. export as_echo_n_body
  63. as_echo_n='sh -c $as_echo_n_body as_echo'
  64. fi
  65. export as_echo_body
  66. as_echo='sh -c $as_echo_body as_echo'
  67. fi
  68. # The user is always right.
  69. if test "${PATH_SEPARATOR+set}" != set; then
  70. PATH_SEPARATOR=:
  71. (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  72. (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  73. PATH_SEPARATOR=';'
  74. }
  75. fi
  76. # IFS
  77. # We need space, tab and new line, in precisely that order. Quoting is
  78. # there to prevent editors from complaining about space-tab.
  79. # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  80. # splitting by setting IFS to empty value.)
  81. IFS=" "" $as_nl"
  82. # Find who we are. Look in the path if we contain no directory separator.
  83. as_myself=
  84. case $0 in #((
  85. *[\\/]* ) as_myself=$0 ;;
  86. *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  87. for as_dir in $PATH
  88. do
  89. IFS=$as_save_IFS
  90. test -z "$as_dir" && as_dir=.
  91. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
  92. done
  93. IFS=$as_save_IFS
  94. ;;
  95. esac
  96. # We did not find ourselves, most probably we were run as `sh COMMAND'
  97. # in which case we are not to be found in the path.
  98. if test "x$as_myself" = x; then
  99. as_myself=$0
  100. fi
  101. if test ! -f "$as_myself"; then
  102. $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  103. exit 1
  104. fi
  105. # Unset variables that we do not need and which cause bugs (e.g. in
  106. # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
  107. # suppresses any "Segmentation fault" message there. '((' could
  108. # trigger a bug in pdksh 5.2.14.
  109. for as_var in BASH_ENV ENV MAIL MAILPATH
  110. do eval test x\${$as_var+set} = xset \
  111. && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
  112. done
  113. PS1='$ '
  114. PS2='> '
  115. PS4='+ '
  116. # NLS nuisances.
  117. LC_ALL=C
  118. export LC_ALL
  119. LANGUAGE=C
  120. export LANGUAGE
  121. # CDPATH.
  122. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  123. # Use a proper internal environment variable to ensure we don't fall
  124. # into an infinite loop, continuously re-executing ourselves.
  125. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
  126. _as_can_reexec=no; export _as_can_reexec;
  127. # We cannot yet assume a decent shell, so we have to provide a
  128. # neutralization value for shells without unset; and this also
  129. # works around shells that cannot unset nonexistent variables.
  130. # Preserve -v and -x to the replacement shell.
  131. BASH_ENV=/dev/null
  132. ENV=/dev/null
  133. (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
  134. case $- in # ((((
  135. *v*x* | *x*v* ) as_opts=-vx ;;
  136. *v* ) as_opts=-v ;;
  137. *x* ) as_opts=-x ;;
  138. * ) as_opts= ;;
  139. esac
  140. exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
  141. # Admittedly, this is quite paranoid, since all the known shells bail
  142. # out after a failed `exec'.
  143. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
  144. as_fn_exit 255
  145. fi
  146. # We don't want this to propagate to other subprocesses.
  147. { _as_can_reexec=; unset _as_can_reexec;}
  148. if test "x$CONFIG_SHELL" = x; then
  149. as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
  150. emulate sh
  151. NULLCMD=:
  152. # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
  153. # is contrary to our usage. Disable this feature.
  154. alias -g '\${1+\"\$@\"}'='\"\$@\"'
  155. setopt NO_GLOB_SUBST
  156. else
  157. case \`(set -o) 2>/dev/null\` in #(
  158. *posix*) :
  159. set -o posix ;; #(
  160. *) :
  161. ;;
  162. esac
  163. fi
  164. "
  165. as_required="as_fn_return () { (exit \$1); }
  166. as_fn_success () { as_fn_return 0; }
  167. as_fn_failure () { as_fn_return 1; }
  168. as_fn_ret_success () { return 0; }
  169. as_fn_ret_failure () { return 1; }
  170. exitcode=0
  171. as_fn_success || { exitcode=1; echo as_fn_success failed.; }
  172. as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
  173. as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
  174. as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
  175. if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
  176. else
  177. exitcode=1; echo positional parameters were not saved.
  178. fi
  179. test x\$exitcode = x0 || exit 1
  180. test -x / || exit 1"
  181. as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
  182. as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
  183. eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
  184. test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
  185. test \$(( 1 + 1 )) = 2 || exit 1"
  186. if (eval "$as_required") 2>/dev/null; then :
  187. as_have_required=yes
  188. else
  189. as_have_required=no
  190. fi
  191. if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
  192. else
  193. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  194. as_found=false
  195. for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
  196. do
  197. IFS=$as_save_IFS
  198. test -z "$as_dir" && as_dir=.
  199. as_found=:
  200. case $as_dir in #(
  201. /*)
  202. for as_base in sh bash ksh sh5; do
  203. # Try only shells that exist, to save several forks.
  204. as_shell=$as_dir/$as_base
  205. if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
  206. { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
  207. CONFIG_SHELL=$as_shell as_have_required=yes
  208. if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
  209. break 2
  210. fi
  211. fi
  212. done;;
  213. esac
  214. as_found=false
  215. done
  216. $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
  217. { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
  218. CONFIG_SHELL=$SHELL as_have_required=yes
  219. fi; }
  220. IFS=$as_save_IFS
  221. if test "x$CONFIG_SHELL" != x; then :
  222. export CONFIG_SHELL
  223. # We cannot yet assume a decent shell, so we have to provide a
  224. # neutralization value for shells without unset; and this also
  225. # works around shells that cannot unset nonexistent variables.
  226. # Preserve -v and -x to the replacement shell.
  227. BASH_ENV=/dev/null
  228. ENV=/dev/null
  229. (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
  230. case $- in # ((((
  231. *v*x* | *x*v* ) as_opts=-vx ;;
  232. *v* ) as_opts=-v ;;
  233. *x* ) as_opts=-x ;;
  234. * ) as_opts= ;;
  235. esac
  236. exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
  237. # Admittedly, this is quite paranoid, since all the known shells bail
  238. # out after a failed `exec'.
  239. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
  240. exit 255
  241. fi
  242. if test x$as_have_required = xno; then :
  243. $as_echo "$0: This script requires a shell more modern than all"
  244. $as_echo "$0: the shells that I found on your system."
  245. if test x${ZSH_VERSION+set} = xset ; then
  246. $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
  247. $as_echo "$0: be upgraded to zsh 4.3.4 or later."
  248. else
  249. $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
  250. $0: including any error possibly output before this
  251. $0: message. Then install a modern shell, or manually run
  252. $0: the script under such a shell if you do have one."
  253. fi
  254. exit 1
  255. fi
  256. fi
  257. fi
  258. SHELL=${CONFIG_SHELL-/bin/sh}
  259. export SHELL
  260. # Unset more variables known to interfere with behavior of common tools.
  261. CLICOLOR_FORCE= GREP_OPTIONS=
  262. unset CLICOLOR_FORCE GREP_OPTIONS
  263. ## --------------------- ##
  264. ## M4sh Shell Functions. ##
  265. ## --------------------- ##
  266. # as_fn_unset VAR
  267. # ---------------
  268. # Portably unset VAR.
  269. as_fn_unset ()
  270. {
  271. { eval $1=; unset $1;}
  272. }
  273. as_unset=as_fn_unset
  274. # as_fn_set_status STATUS
  275. # -----------------------
  276. # Set $? to STATUS, without forking.
  277. as_fn_set_status ()
  278. {
  279. return $1
  280. } # as_fn_set_status
  281. # as_fn_exit STATUS
  282. # -----------------
  283. # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
  284. as_fn_exit ()
  285. {
  286. set +e
  287. as_fn_set_status $1
  288. exit $1
  289. } # as_fn_exit
  290. # as_fn_mkdir_p
  291. # -------------
  292. # Create "$as_dir" as a directory, including parents if necessary.
  293. as_fn_mkdir_p ()
  294. {
  295. case $as_dir in #(
  296. -*) as_dir=./$as_dir;;
  297. esac
  298. test -d "$as_dir" || eval $as_mkdir_p || {
  299. as_dirs=
  300. while :; do
  301. case $as_dir in #(
  302. *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
  303. *) as_qdir=$as_dir;;
  304. esac
  305. as_dirs="'$as_qdir' $as_dirs"
  306. as_dir=`$as_dirname -- "$as_dir" ||
  307. $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  308. X"$as_dir" : 'X\(//\)[^/]' \| \
  309. X"$as_dir" : 'X\(//\)$' \| \
  310. X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
  311. $as_echo X"$as_dir" |
  312. sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
  313. s//\1/
  314. q
  315. }
  316. /^X\(\/\/\)[^/].*/{
  317. s//\1/
  318. q
  319. }
  320. /^X\(\/\/\)$/{
  321. s//\1/
  322. q
  323. }
  324. /^X\(\/\).*/{
  325. s//\1/
  326. q
  327. }
  328. s/.*/./; q'`
  329. test -d "$as_dir" && break
  330. done
  331. test -z "$as_dirs" || eval "mkdir $as_dirs"
  332. } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
  333. } # as_fn_mkdir_p
  334. # as_fn_executable_p FILE
  335. # -----------------------
  336. # Test if FILE is an executable regular file.
  337. as_fn_executable_p ()
  338. {
  339. test -f "$1" && test -x "$1"
  340. } # as_fn_executable_p
  341. # as_fn_append VAR VALUE
  342. # ----------------------
  343. # Append the text in VALUE to the end of the definition contained in VAR. Take
  344. # advantage of any shell optimizations that allow amortized linear growth over
  345. # repeated appends, instead of the typical quadratic growth present in naive
  346. # implementations.
  347. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
  348. eval 'as_fn_append ()
  349. {
  350. eval $1+=\$2
  351. }'
  352. else
  353. as_fn_append ()
  354. {
  355. eval $1=\$$1\$2
  356. }
  357. fi # as_fn_append
  358. # as_fn_arith ARG...
  359. # ------------------
  360. # Perform arithmetic evaluation on the ARGs, and store the result in the
  361. # global $as_val. Take advantage of shells that can avoid forks. The arguments
  362. # must be portable across $(()) and expr.
  363. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
  364. eval 'as_fn_arith ()
  365. {
  366. as_val=$(( $* ))
  367. }'
  368. else
  369. as_fn_arith ()
  370. {
  371. as_val=`expr "$@" || test $? -eq 1`
  372. }
  373. fi # as_fn_arith
  374. # as_fn_error STATUS ERROR [LINENO LOG_FD]
  375. # ----------------------------------------
  376. # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
  377. # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
  378. # script with STATUS, using 1 if that was 0.
  379. as_fn_error ()
  380. {
  381. as_status=$1; test $as_status -eq 0 && as_status=1
  382. if test "$4"; then
  383. as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  384. $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
  385. fi
  386. $as_echo "$as_me: error: $2" >&2
  387. as_fn_exit $as_status
  388. } # as_fn_error
  389. if expr a : '\(a\)' >/dev/null 2>&1 &&
  390. test "X`expr 00001 : '.*\(...\)'`" = X001; then
  391. as_expr=expr
  392. else
  393. as_expr=false
  394. fi
  395. if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
  396. as_basename=basename
  397. else
  398. as_basename=false
  399. fi
  400. if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
  401. as_dirname=dirname
  402. else
  403. as_dirname=false
  404. fi
  405. as_me=`$as_basename -- "$0" ||
  406. $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
  407. X"$0" : 'X\(//\)$' \| \
  408. X"$0" : 'X\(/\)' \| . 2>/dev/null ||
  409. $as_echo X/"$0" |
  410. sed '/^.*\/\([^/][^/]*\)\/*$/{
  411. s//\1/
  412. q
  413. }
  414. /^X\/\(\/\/\)$/{
  415. s//\1/
  416. q
  417. }
  418. /^X\/\(\/\).*/{
  419. s//\1/
  420. q
  421. }
  422. s/.*/./; q'`
  423. # Avoid depending upon Character Ranges.
  424. as_cr_letters='abcdefghijklmnopqrstuvwxyz'
  425. as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  426. as_cr_Letters=$as_cr_letters$as_cr_LETTERS
  427. as_cr_digits='0123456789'
  428. as_cr_alnum=$as_cr_Letters$as_cr_digits
  429. as_lineno_1=$LINENO as_lineno_1a=$LINENO
  430. as_lineno_2=$LINENO as_lineno_2a=$LINENO
  431. eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
  432. test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
  433. # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
  434. sed -n '
  435. p
  436. /[$]LINENO/=
  437. ' <$as_myself |
  438. sed '
  439. s/[$]LINENO.*/&-/
  440. t lineno
  441. b
  442. :lineno
  443. N
  444. :loop
  445. s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
  446. t loop
  447. s/-\n.*//
  448. ' >$as_me.lineno &&
  449. chmod +x "$as_me.lineno" ||
  450. { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
  451. # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
  452. # already done that, so ensure we don't try to do so again and fall
  453. # in an infinite loop. This has already happened in practice.
  454. _as_can_reexec=no; export _as_can_reexec
  455. # Don't try to exec as it changes $[0], causing all sort of problems
  456. # (the dirname of $[0] is not the place where we might find the
  457. # original and so on. Autoconf is especially sensitive to this).
  458. . "./$as_me.lineno"
  459. # Exit status is that of the last command.
  460. exit
  461. }
  462. ECHO_C= ECHO_N= ECHO_T=
  463. case `echo -n x` in #(((((
  464. -n*)
  465. case `echo 'xy\c'` in
  466. *c*) ECHO_T=' ';; # ECHO_T is single tab character.
  467. xy) ECHO_C='\c';;
  468. *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
  469. ECHO_T=' ';;
  470. esac;;
  471. *)
  472. ECHO_N='-n';;
  473. esac
  474. rm -f conf$$ conf$$.exe conf$$.file
  475. if test -d conf$$.dir; then
  476. rm -f conf$$.dir/conf$$.file
  477. else
  478. rm -f conf$$.dir
  479. mkdir conf$$.dir 2>/dev/null
  480. fi
  481. if (echo >conf$$.file) 2>/dev/null; then
  482. if ln -s conf$$.file conf$$ 2>/dev/null; then
  483. as_ln_s='ln -s'
  484. # ... but there are two gotchas:
  485. # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
  486. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
  487. # In both cases, we have to default to `cp -pR'.
  488. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
  489. as_ln_s='cp -pR'
  490. elif ln conf$$.file conf$$ 2>/dev/null; then
  491. as_ln_s=ln
  492. else
  493. as_ln_s='cp -pR'
  494. fi
  495. else
  496. as_ln_s='cp -pR'
  497. fi
  498. rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
  499. rmdir conf$$.dir 2>/dev/null
  500. if mkdir -p . 2>/dev/null; then
  501. as_mkdir_p='mkdir -p "$as_dir"'
  502. else
  503. test -d ./-p && rmdir ./-p
  504. as_mkdir_p=false
  505. fi
  506. as_test_x='test -x'
  507. as_executable_p=as_fn_executable_p
  508. # Sed expression to map a string onto a valid CPP name.
  509. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
  510. # Sed expression to map a string onto a valid variable name.
  511. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
  512. test -n "$DJDIR" || exec 7<&0 </dev/null
  513. exec 6>&1
  514. # Name of the host.
  515. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
  516. # so uname gets run too.
  517. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
  518. #
  519. # Initializations.
  520. #
  521. ac_default_prefix=/usr/local
  522. ac_clean_files=
  523. ac_config_libobj_dir=.
  524. LIBOBJS=
  525. cross_compiling=no
  526. subdirs=
  527. MFLAGS=
  528. MAKEFLAGS=
  529. # Identity of this package.
  530. PACKAGE_NAME='libgnu'
  531. PACKAGE_TARNAME='libgnu'
  532. PACKAGE_VERSION='UNUSED-VERSION'
  533. PACKAGE_STRING='libgnu UNUSED-VERSION'
  534. PACKAGE_BUGREPORT=''
  535. PACKAGE_URL=''
  536. ac_unique_file="import/memmem.c"
  537. ac_header_list=
  538. # Factoring default headers for most tests.
  539. ac_includes_default="\
  540. #include <stdio.h>
  541. #ifdef HAVE_SYS_TYPES_H
  542. # include <sys/types.h>
  543. #endif
  544. #ifdef HAVE_SYS_STAT_H
  545. # include <sys/stat.h>
  546. #endif
  547. #ifdef STDC_HEADERS
  548. # include <stdlib.h>
  549. # include <stddef.h>
  550. #else
  551. # ifdef HAVE_STDLIB_H
  552. # include <stdlib.h>
  553. # endif
  554. #endif
  555. #ifdef HAVE_STRING_H
  556. # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
  557. # include <memory.h>
  558. # endif
  559. # include <string.h>
  560. #endif
  561. #ifdef HAVE_STRINGS_H
  562. # include <strings.h>
  563. #endif
  564. #ifdef HAVE_INTTYPES_H
  565. # include <inttypes.h>
  566. #endif
  567. #ifdef HAVE_STDINT_H
  568. # include <stdint.h>
  569. #endif
  570. #ifdef HAVE_UNISTD_H
  571. # include <unistd.h>
  572. #endif"
  573. gl_use_threads_default=
  574. gl_use_winpthreads_default=
  575. ac_func_list=
  576. gl_fnmatch_required=POSIX
  577. ac_subst_vars='am__EXEEXT_FALSE
  578. am__EXEEXT_TRUE
  579. gltests_LTLIBOBJS
  580. gltests_LIBOBJS
  581. gl_LTLIBOBJS
  582. gl_LIBOBJS
  583. LTLIBOBJS
  584. LIBOBJS
  585. LN_S
  586. AM_BACKSLASH
  587. AM_DEFAULT_VERBOSITY
  588. AM_DEFAULT_V
  589. AM_V
  590. am__fastdepCC_FALSE
  591. am__fastdepCC_TRUE
  592. CCDEPMODE
  593. am__nodep
  594. AMDEPBACKSLASH
  595. AMDEP_FALSE
  596. AMDEP_TRUE
  597. am__quote
  598. am__include
  599. DEPDIR
  600. am__untar
  601. am__tar
  602. AMTAR
  603. am__leading_dot
  604. SET_MAKE
  605. AWK
  606. mkdir_p
  607. INSTALL_STRIP_PROGRAM
  608. STRIP
  609. install_sh
  610. MAKEINFO
  611. AUTOHEADER
  612. AUTOMAKE
  613. AUTOCONF
  614. ACLOCAL
  615. VERSION
  616. PACKAGE
  617. CYGPATH_W
  618. am__isrc
  619. INSTALL_DATA
  620. INSTALL_SCRIPT
  621. INSTALL_PROGRAM
  622. LIBGNU_LTLIBDEPS
  623. LIBGNU_LIBDEPS
  624. gltests_WITNESS
  625. REPLACE_TOWLOWER
  626. REPLACE_ISWCNTRL
  627. HAVE_WCTYPE_H
  628. NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
  629. NEXT_WCTYPE_H
  630. HAVE_ISWCNTRL
  631. REPLACE_ISWXDIGIT
  632. REPLACE_ISWDIGIT
  633. REPLACE_ISWBLANK
  634. HAVE_WCTRANS_T
  635. HAVE_WCTYPE_T
  636. HAVE_ISWBLANK
  637. GNULIB_TOWCTRANS
  638. GNULIB_WCTRANS
  639. GNULIB_ISWCTYPE
  640. GNULIB_WCTYPE
  641. GNULIB_ISWXDIGIT
  642. GNULIB_ISWDIGIT
  643. GNULIB_ISWBLANK
  644. HAVE_CRTDEFS_H
  645. HAVE_WINT_T
  646. NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
  647. NEXT_WCHAR_H
  648. HAVE_UNISTD_H
  649. NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
  650. NEXT_UNISTD_H
  651. TIME_H_DEFINES_TIME_UTC
  652. UNISTD_H_DEFINES_STRUCT_TIMESPEC
  653. PTHREAD_H_DEFINES_STRUCT_TIMESPEC
  654. SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
  655. TIME_H_DEFINES_STRUCT_TIMESPEC
  656. NEXT_AS_FIRST_DIRECTIVE_TIME_H
  657. NEXT_TIME_H
  658. REPLACE_LOCALTIME
  659. REPLACE_GMTIME
  660. REPLACE_TZSET
  661. REPLACE_TIMEGM
  662. REPLACE_STRFTIME
  663. REPLACE_NANOSLEEP
  664. REPLACE_MKTIME
  665. REPLACE_LOCALTIME_R
  666. REPLACE_CTIME
  667. HAVE_TIMEZONE_T
  668. HAVE_TIMESPEC_GET
  669. HAVE_TIMEGM
  670. HAVE_STRPTIME
  671. HAVE_NANOSLEEP
  672. HAVE_DECL_LOCALTIME_R
  673. GNULIB_MDA_TZSET
  674. GNULIB_TZSET
  675. GNULIB_TIME_RZ
  676. GNULIB_TIME_R
  677. GNULIB_TIMESPEC_GET
  678. GNULIB_TIMEGM
  679. GNULIB_STRPTIME
  680. GNULIB_STRFTIME
  681. GNULIB_NANOSLEEP
  682. GNULIB_LOCALTIME
  683. GNULIB_MKTIME
  684. GNULIB_CTIME
  685. NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
  686. NEXT_SYS_WAIT_H
  687. GNULIB_WAITPID
  688. HAVE_SYS_UIO_H
  689. NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
  690. NEXT_SYS_UIO_H
  691. WINDOWS_STAT_INODES
  692. WINDOWS_64_BIT_OFF_T
  693. NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
  694. NEXT_SYS_TYPES_H
  695. HAVE_SYS_RANDOM_H
  696. NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H
  697. NEXT_SYS_RANDOM_H
  698. HAVE_STRINGS_H
  699. NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
  700. NEXT_STRINGS_H
  701. NEXT_AS_FIRST_DIRECTIVE_STRING_H
  702. NEXT_STRING_H
  703. NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
  704. NEXT_STDLIB_H
  705. NEXT_AS_FIRST_DIRECTIVE_STDIO_H
  706. NEXT_STDIO_H
  707. HAVE__BOOL
  708. GL_GENERATE_STDBOOL_H_FALSE
  709. GL_GENERATE_STDBOOL_H_TRUE
  710. STDBOOL_H
  711. GL_GENERATE_STDALIGN_H_FALSE
  712. GL_GENERATE_STDALIGN_H_TRUE
  713. STDALIGN_H
  714. NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
  715. NEXT_SIGNAL_H
  716. REPLACE_RAISE
  717. REPLACE_PTHREAD_SIGMASK
  718. HAVE_SIGHANDLER_T
  719. HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
  720. HAVE_STRUCT_SIGACTION_SA_SIGACTION
  721. HAVE_SIGACTION
  722. HAVE_SIGINFO_T
  723. HAVE_SIGSET_T
  724. HAVE_RAISE
  725. HAVE_PTHREAD_SIGMASK
  726. HAVE_POSIX_SIGNALBLOCKING
  727. GNULIB_SIGACTION
  728. GNULIB_SIGPROCMASK
  729. GNULIB_SIGNAL_H_SIGPIPE
  730. GNULIB_RAISE
  731. GNULIB_PTHREAD_SIGMASK
  732. LIB_SELECT
  733. LIBSOCKET
  734. HAVE_SYS_SELECT_H
  735. NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
  736. NEXT_SYS_SELECT_H
  737. REPLACE_SELECT
  738. REPLACE_PSELECT
  739. HAVE_PSELECT
  740. GNULIB_SELECT
  741. GNULIB_PSELECT
  742. GL_GENERATE_NETINET_IN_H_FALSE
  743. GL_GENERATE_NETINET_IN_H_TRUE
  744. NETINET_IN_H
  745. HAVE_NETINET_IN_H
  746. NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
  747. NEXT_NETINET_IN_H
  748. HAVE_NETDB_H
  749. NEXT_AS_FIRST_DIRECTIVE_NETDB_H
  750. NEXT_NETDB_H
  751. REPLACE_GETADDRINFO
  752. REPLACE_GAI_STRERROR
  753. HAVE_DECL_GETNAMEINFO
  754. HAVE_DECL_GETADDRINFO
  755. HAVE_DECL_GAI_STRERROR
  756. HAVE_DECL_FREEADDRINFO
  757. HAVE_STRUCT_ADDRINFO
  758. GNULIB_GETADDRINFO
  759. UNDEFINE_STRTOK_R
  760. REPLACE_STRSIGNAL
  761. REPLACE_STRERRORNAME_NP
  762. REPLACE_STRERROR_R
  763. REPLACE_STRERROR
  764. REPLACE_STRTOK_R
  765. REPLACE_STRCASESTR
  766. REPLACE_STRSTR
  767. REPLACE_STRNLEN
  768. REPLACE_STRNDUP
  769. REPLACE_STRNCAT
  770. REPLACE_STRDUP
  771. REPLACE_STRCHRNUL
  772. REPLACE_STPNCPY
  773. REPLACE_MEMMEM
  774. REPLACE_MEMCHR
  775. REPLACE_FFSLL
  776. HAVE_STRVERSCMP
  777. HAVE_DECL_STRSIGNAL
  778. HAVE_SIGDESCR_NP
  779. HAVE_SIGABBREV_NP
  780. HAVE_STRERRORNAME_NP
  781. HAVE_DECL_STRERROR_R
  782. HAVE_DECL_STRTOK_R
  783. HAVE_STRCASESTR
  784. HAVE_STRSEP
  785. HAVE_STRPBRK
  786. HAVE_DECL_STRNLEN
  787. HAVE_DECL_STRNDUP
  788. HAVE_DECL_STRDUP
  789. HAVE_STRCHRNUL
  790. HAVE_STPNCPY
  791. HAVE_STPCPY
  792. HAVE_RAWMEMCHR
  793. HAVE_DECL_MEMRCHR
  794. HAVE_MEMPCPY
  795. HAVE_DECL_MEMMEM
  796. HAVE_FFSLL
  797. HAVE_FFSL
  798. HAVE_EXPLICIT_BZERO
  799. GNULIB_MDA_STRDUP
  800. GNULIB_MDA_MEMCCPY
  801. HAVE_MBSLEN
  802. GNULIB_STRVERSCMP
  803. GNULIB_STRSIGNAL
  804. GNULIB_SIGDESCR_NP
  805. GNULIB_SIGABBREV_NP
  806. GNULIB_STRERRORNAME_NP
  807. GNULIB_STRERROR_R
  808. GNULIB_STRERROR
  809. GNULIB_MBSTOK_R
  810. GNULIB_MBSSEP
  811. GNULIB_MBSSPN
  812. GNULIB_MBSPBRK
  813. GNULIB_MBSCSPN
  814. GNULIB_MBSCASESTR
  815. GNULIB_MBSPCASECMP
  816. GNULIB_MBSNCASECMP
  817. GNULIB_MBSCASECMP
  818. GNULIB_MBSSTR
  819. GNULIB_MBSRCHR
  820. GNULIB_MBSCHR
  821. GNULIB_MBSNLEN
  822. GNULIB_MBSLEN
  823. GNULIB_STRTOK_R
  824. GNULIB_STRCASESTR
  825. GNULIB_STRSTR
  826. GNULIB_STRSEP
  827. GNULIB_STRPBRK
  828. GNULIB_STRNLEN
  829. GNULIB_STRNDUP
  830. GNULIB_STRNCAT
  831. GNULIB_STRDUP
  832. GNULIB_STRCHRNUL
  833. GNULIB_STPNCPY
  834. GNULIB_STPCPY
  835. GNULIB_RAWMEMCHR
  836. GNULIB_MEMRCHR
  837. GNULIB_MEMPCPY
  838. GNULIB_MEMMEM
  839. GNULIB_MEMCHR
  840. GNULIB_FFSLL
  841. GNULIB_FFSL
  842. GNULIB_EXPLICIT_BZERO
  843. HAVE_VISIBILITY
  844. CFLAG_VISIBILITY
  845. LIB_MBRTOWC
  846. LOCALE_ZH_CN
  847. LOCALE_FR_UTF8
  848. LOCALE_JA
  849. NEXT_AS_FIRST_DIRECTIVE_MATH_H
  850. NEXT_MATH_H
  851. LTLIBMULTITHREAD
  852. LIBMULTITHREAD
  853. LTLIBTHREAD
  854. LIBTHREAD
  855. LIBSTDTHREAD
  856. NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
  857. NEXT_LOCALE_H
  858. HAVE_XLOCALE_H
  859. NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
  860. NEXT_STDDEF_H
  861. GL_GENERATE_STDDEF_H_FALSE
  862. GL_GENERATE_STDDEF_H_TRUE
  863. STDDEF_H
  864. HAVE_WCHAR_T
  865. HAVE_MAX_ALIGN_T
  866. REPLACE_NULL
  867. REPLACE_STRUCT_LCONV
  868. REPLACE_FREELOCALE
  869. REPLACE_DUPLOCALE
  870. REPLACE_NEWLOCALE
  871. REPLACE_SETLOCALE
  872. REPLACE_LOCALECONV
  873. HAVE_FREELOCALE
  874. HAVE_DUPLOCALE
  875. HAVE_NEWLOCALE
  876. GNULIB_LOCALENAME
  877. GNULIB_DUPLOCALE
  878. GNULIB_SETLOCALE_NULL
  879. GNULIB_SETLOCALE
  880. GNULIB_LOCALECONV
  881. LOCALCHARSET_TESTS_ENVIRONMENT
  882. NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
  883. NEXT_INTTYPES_H
  884. UINT64_MAX_EQ_ULONG_MAX
  885. UINT32_MAX_LT_UINTMAX_MAX
  886. PRIPTR_PREFIX
  887. INT64_MAX_EQ_LONG_MAX
  888. INT32_MAX_LT_INTMAX_MAX
  889. REPLACE_STRTOUMAX
  890. REPLACE_STRTOIMAX
  891. HAVE_IMAXDIV_T
  892. HAVE_DECL_STRTOUMAX
  893. HAVE_DECL_STRTOIMAX
  894. HAVE_DECL_IMAXDIV
  895. HAVE_DECL_IMAXABS
  896. GNULIB_STRTOUMAX
  897. GNULIB_STRTOIMAX
  898. GNULIB_IMAXDIV
  899. GNULIB_IMAXABS
  900. GL_GENERATE_STDINT_H_FALSE
  901. GL_GENERATE_STDINT_H_TRUE
  902. STDINT_H
  903. HAVE_SYS_INTTYPES_H
  904. HAVE_SYS_BITYPES_H
  905. HAVE_C99_STDINT_H
  906. WINT_T_SUFFIX
  907. WCHAR_T_SUFFIX
  908. SIG_ATOMIC_T_SUFFIX
  909. SIZE_T_SUFFIX
  910. PTRDIFF_T_SUFFIX
  911. HAVE_SIGNED_WINT_T
  912. HAVE_SIGNED_WCHAR_T
  913. HAVE_SIGNED_SIG_ATOMIC_T
  914. BITSIZEOF_WINT_T
  915. BITSIZEOF_WCHAR_T
  916. BITSIZEOF_SIG_ATOMIC_T
  917. BITSIZEOF_SIZE_T
  918. BITSIZEOF_PTRDIFF_T
  919. APPLE_UNIVERSAL_BUILD
  920. HAVE_STDINT_H
  921. NEXT_AS_FIRST_DIRECTIVE_STDINT_H
  922. NEXT_STDINT_H
  923. HAVE_SYS_TYPES_H
  924. HAVE_INTTYPES_H
  925. HAVE_WCHAR_H
  926. GNULIB_OVERRIDES_WINT_T
  927. GL_GENERATE_LIMITS_H_FALSE
  928. GL_GENERATE_LIMITS_H_TRUE
  929. LIMITS_H
  930. NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
  931. NEXT_LIMITS_H
  932. INET_NTOP_LIB
  933. LIB_HARD_LOCALE
  934. LIB_SETLOCALE_NULL
  935. LIB_SCHED_YIELD
  936. LIBPMULTITHREAD
  937. LIBPTHREAD
  938. GL_GENERATE_GLOB_H_FALSE
  939. GL_GENERATE_GLOB_H_TRUE
  940. GLOB_H
  941. HAVE_GLOB_H
  942. NEXT_AS_FIRST_DIRECTIVE_GLOB_H
  943. NEXT_GLOB_H
  944. REPLACE_GLOB_PATTERN_P
  945. REPLACE_GLOB
  946. HAVE_GLOB_PATTERN_P
  947. HAVE_GLOB
  948. GNULIB_GLOB
  949. NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
  950. NEXT_SYS_TIME_H
  951. REPLACE_STRUCT_TIMEVAL
  952. REPLACE_GETTIMEOFDAY
  953. HAVE_SYS_TIME_H
  954. HAVE_STRUCT_TIMEVAL
  955. HAVE_GETTIMEOFDAY
  956. GNULIB_GETTIMEOFDAY
  957. LTLIBINTL
  958. LIBINTL
  959. LIB_GETRANDOM
  960. REPLACE_GETRANDOM
  961. HAVE_GETRANDOM
  962. GNULIB_GETRANDOM
  963. LIB_GETLOGIN
  964. REPLACE_VSPRINTF
  965. REPLACE_VSNPRINTF
  966. REPLACE_VPRINTF
  967. REPLACE_VFPRINTF
  968. REPLACE_VDPRINTF
  969. REPLACE_VASPRINTF
  970. REPLACE_TMPFILE
  971. REPLACE_STDIO_WRITE_FUNCS
  972. REPLACE_STDIO_READ_FUNCS
  973. REPLACE_SPRINTF
  974. REPLACE_SNPRINTF
  975. REPLACE_RENAMEAT
  976. REPLACE_RENAME
  977. REPLACE_REMOVE
  978. REPLACE_PRINTF
  979. REPLACE_POPEN
  980. REPLACE_PERROR
  981. REPLACE_OBSTACK_PRINTF
  982. REPLACE_GETLINE
  983. REPLACE_GETDELIM
  984. REPLACE_FTELLO
  985. REPLACE_FTELL
  986. REPLACE_FSEEKO
  987. REPLACE_FSEEK
  988. REPLACE_FREOPEN
  989. REPLACE_FPURGE
  990. REPLACE_FPRINTF
  991. REPLACE_FOPEN
  992. REPLACE_FFLUSH
  993. REPLACE_FDOPEN
  994. REPLACE_FCLOSE
  995. REPLACE_DPRINTF
  996. HAVE_VDPRINTF
  997. HAVE_VASPRINTF
  998. HAVE_RENAMEAT
  999. HAVE_POPEN
  1000. HAVE_PCLOSE
  1001. HAVE_FTELLO
  1002. HAVE_FSEEKO
  1003. HAVE_DPRINTF
  1004. HAVE_DECL_VSNPRINTF
  1005. HAVE_DECL_SNPRINTF
  1006. HAVE_DECL_OBSTACK_PRINTF
  1007. HAVE_DECL_GETLINE
  1008. HAVE_DECL_GETDELIM
  1009. HAVE_DECL_FTELLO
  1010. HAVE_DECL_FSEEKO
  1011. HAVE_DECL_FPURGE
  1012. HAVE_DECL_FCLOSEALL
  1013. GNULIB_MDA_TEMPNAM
  1014. GNULIB_MDA_PUTW
  1015. GNULIB_MDA_GETW
  1016. GNULIB_MDA_FILENO
  1017. GNULIB_MDA_FDOPEN
  1018. GNULIB_MDA_FCLOSEALL
  1019. GNULIB_VSPRINTF_POSIX
  1020. GNULIB_VSNPRINTF
  1021. GNULIB_VPRINTF_POSIX
  1022. GNULIB_VPRINTF
  1023. GNULIB_VFPRINTF_POSIX
  1024. GNULIB_VFPRINTF
  1025. GNULIB_VDPRINTF
  1026. GNULIB_VSCANF
  1027. GNULIB_VFSCANF
  1028. GNULIB_VASPRINTF
  1029. GNULIB_TMPFILE
  1030. GNULIB_STDIO_H_SIGPIPE
  1031. GNULIB_STDIO_H_NONBLOCKING
  1032. GNULIB_SPRINTF_POSIX
  1033. GNULIB_SNPRINTF
  1034. GNULIB_SCANF
  1035. GNULIB_RENAMEAT
  1036. GNULIB_RENAME
  1037. GNULIB_REMOVE
  1038. GNULIB_PUTS
  1039. GNULIB_PUTCHAR
  1040. GNULIB_PUTC
  1041. GNULIB_PRINTF_POSIX
  1042. GNULIB_PRINTF
  1043. GNULIB_POPEN
  1044. GNULIB_PERROR
  1045. GNULIB_PCLOSE
  1046. GNULIB_OBSTACK_PRINTF_POSIX
  1047. GNULIB_OBSTACK_PRINTF
  1048. GNULIB_GETLINE
  1049. GNULIB_GETDELIM
  1050. GNULIB_GETCHAR
  1051. GNULIB_GETC
  1052. GNULIB_FWRITE
  1053. GNULIB_FTELLO
  1054. GNULIB_FTELL
  1055. GNULIB_FSEEKO
  1056. GNULIB_FSEEK
  1057. GNULIB_FSCANF
  1058. GNULIB_FREOPEN
  1059. GNULIB_FREAD
  1060. GNULIB_FPUTS
  1061. GNULIB_FPUTC
  1062. GNULIB_FPURGE
  1063. GNULIB_FPRINTF_POSIX
  1064. GNULIB_FPRINTF
  1065. GNULIB_FOPEN
  1066. GNULIB_FGETS
  1067. GNULIB_FGETC
  1068. GNULIB_FFLUSH
  1069. GNULIB_FDOPEN
  1070. GNULIB_FCLOSE
  1071. GNULIB_DPRINTF
  1072. WINDOWS_64_BIT_ST_SIZE
  1073. WINDOWS_STAT_TIMESPEC
  1074. NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
  1075. NEXT_SYS_STAT_H
  1076. REPLACE_UTIMENSAT
  1077. REPLACE_STAT
  1078. REPLACE_MKNODAT
  1079. REPLACE_MKNOD
  1080. REPLACE_MKFIFOAT
  1081. REPLACE_MKFIFO
  1082. REPLACE_MKDIR
  1083. REPLACE_LSTAT
  1084. REPLACE_FUTIMENS
  1085. REPLACE_FSTATAT
  1086. REPLACE_FSTAT
  1087. REPLACE_FCHMODAT
  1088. HAVE_UTIMENSAT
  1089. HAVE_MKNODAT
  1090. HAVE_MKNOD
  1091. HAVE_MKFIFOAT
  1092. HAVE_MKFIFO
  1093. HAVE_MKDIRAT
  1094. HAVE_LSTAT
  1095. HAVE_LCHMOD
  1096. HAVE_GETUMASK
  1097. HAVE_FUTIMENS
  1098. HAVE_FSTATAT
  1099. HAVE_FCHMODAT
  1100. GNULIB_MDA_UMASK
  1101. GNULIB_MDA_MKDIR
  1102. GNULIB_MDA_CHMOD
  1103. GNULIB_OVERRIDES_STRUCT_STAT
  1104. GNULIB_UTIMENSAT
  1105. GNULIB_STAT
  1106. GNULIB_MKNODAT
  1107. GNULIB_MKNOD
  1108. GNULIB_MKFIFOAT
  1109. GNULIB_MKFIFO
  1110. GNULIB_MKDIRAT
  1111. GNULIB_MKDIR
  1112. GNULIB_LSTAT
  1113. GNULIB_LCHMOD
  1114. GNULIB_GETUMASK
  1115. GNULIB_FUTIMENS
  1116. GNULIB_FSTATAT
  1117. GNULIB_FSTAT
  1118. GNULIB_FCHMODAT
  1119. FREXPL_LIBM
  1120. HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
  1121. FREXP_LIBM
  1122. REPLACE_TRUNCL
  1123. REPLACE_TRUNCF
  1124. REPLACE_TRUNC
  1125. REPLACE_TANHF
  1126. REPLACE_TANF
  1127. REPLACE_SQRTL
  1128. REPLACE_SQRTF
  1129. REPLACE_SINHF
  1130. REPLACE_SINF
  1131. REPLACE_SIGNBIT_USING_BUILTINS
  1132. REPLACE_SIGNBIT
  1133. REPLACE_ROUNDL
  1134. REPLACE_ROUNDF
  1135. REPLACE_ROUND
  1136. REPLACE_RINTL
  1137. REPLACE_REMAINDERL
  1138. REPLACE_REMAINDERF
  1139. REPLACE_REMAINDER
  1140. REPLACE_NAN
  1141. REPLACE_MODFL
  1142. REPLACE_MODFF
  1143. REPLACE_MODF
  1144. REPLACE_LOGBL
  1145. REPLACE_LOGBF
  1146. REPLACE_LOGB
  1147. REPLACE_LOG2L
  1148. REPLACE_LOG2F
  1149. REPLACE_LOG2
  1150. REPLACE_LOG1PL
  1151. REPLACE_LOG1PF
  1152. REPLACE_LOG1P
  1153. REPLACE_LOG10L
  1154. REPLACE_LOG10F
  1155. REPLACE_LOG10
  1156. REPLACE_LOGL
  1157. REPLACE_LOGF
  1158. REPLACE_LOG
  1159. REPLACE_LDEXPL
  1160. REPLACE_ISNAN
  1161. REPLACE_ISINF
  1162. REPLACE_ISFINITE
  1163. REPLACE_ILOGBL
  1164. REPLACE_ILOGBF
  1165. REPLACE_ILOGB
  1166. REPLACE_HYPOTL
  1167. REPLACE_HYPOTF
  1168. REPLACE_HYPOT
  1169. REPLACE_HUGE_VAL
  1170. REPLACE_FREXPL
  1171. REPLACE_FREXP
  1172. REPLACE_FREXPF
  1173. REPLACE_FMODL
  1174. REPLACE_FMODF
  1175. REPLACE_FMOD
  1176. REPLACE_FMAL
  1177. REPLACE_FMAF
  1178. REPLACE_FMA
  1179. REPLACE_FLOORL
  1180. REPLACE_FLOORF
  1181. REPLACE_FLOOR
  1182. REPLACE_FABSL
  1183. REPLACE_EXP2L
  1184. REPLACE_EXP2
  1185. REPLACE_EXPM1L
  1186. REPLACE_EXPM1F
  1187. REPLACE_EXPM1
  1188. REPLACE_EXPL
  1189. REPLACE_EXPF
  1190. REPLACE_COSHF
  1191. REPLACE_COSF
  1192. REPLACE_CEILL
  1193. REPLACE_CEILF
  1194. REPLACE_CEIL
  1195. REPLACE_CBRTL
  1196. REPLACE_CBRTF
  1197. REPLACE_ATAN2F
  1198. REPLACE_ATANF
  1199. REPLACE_ASINF
  1200. REPLACE_ACOSF
  1201. HAVE_DECL_TRUNCL
  1202. HAVE_DECL_TRUNCF
  1203. HAVE_DECL_TRUNC
  1204. HAVE_DECL_TANL
  1205. HAVE_DECL_SQRTL
  1206. HAVE_DECL_SINL
  1207. HAVE_DECL_ROUNDL
  1208. HAVE_DECL_ROUNDF
  1209. HAVE_DECL_ROUND
  1210. HAVE_DECL_RINTF
  1211. HAVE_DECL_REMAINDERL
  1212. HAVE_DECL_REMAINDER
  1213. HAVE_DECL_LOGB
  1214. HAVE_DECL_LOG2L
  1215. HAVE_DECL_LOG2F
  1216. HAVE_DECL_LOG2
  1217. HAVE_DECL_LOG10L
  1218. HAVE_DECL_LOGL
  1219. HAVE_DECL_LDEXPL
  1220. HAVE_DECL_FREXPL
  1221. HAVE_DECL_FLOORL
  1222. HAVE_DECL_FLOORF
  1223. HAVE_DECL_EXPM1L
  1224. HAVE_DECL_EXP2L
  1225. HAVE_DECL_EXP2F
  1226. HAVE_DECL_EXP2
  1227. HAVE_DECL_EXPL
  1228. HAVE_DECL_COSL
  1229. HAVE_DECL_COPYSIGNF
  1230. HAVE_DECL_CEILL
  1231. HAVE_DECL_CEILF
  1232. HAVE_DECL_CBRTL
  1233. HAVE_DECL_CBRTF
  1234. HAVE_DECL_ATANL
  1235. HAVE_DECL_ASINL
  1236. HAVE_DECL_ACOSL
  1237. HAVE_TANHF
  1238. HAVE_TANL
  1239. HAVE_TANF
  1240. HAVE_SQRTL
  1241. HAVE_SQRTF
  1242. HAVE_SINHF
  1243. HAVE_SINL
  1244. HAVE_SINF
  1245. HAVE_RINTL
  1246. HAVE_RINT
  1247. HAVE_REMAINDERF
  1248. HAVE_REMAINDER
  1249. HAVE_POWF
  1250. HAVE_MODFL
  1251. HAVE_MODFF
  1252. HAVE_LOGBL
  1253. HAVE_LOGBF
  1254. HAVE_LOG1PL
  1255. HAVE_LOG1PF
  1256. HAVE_LOG1P
  1257. HAVE_LOG10L
  1258. HAVE_LOG10F
  1259. HAVE_LOGL
  1260. HAVE_LOGF
  1261. HAVE_LDEXPF
  1262. HAVE_ISNANL
  1263. HAVE_ISNAND
  1264. HAVE_ISNANF
  1265. HAVE_ILOGBL
  1266. HAVE_ILOGBF
  1267. HAVE_ILOGB
  1268. HAVE_HYPOTL
  1269. HAVE_HYPOTF
  1270. HAVE_FREXPF
  1271. HAVE_FMODL
  1272. HAVE_FMODF
  1273. HAVE_FMAL
  1274. HAVE_FMAF
  1275. HAVE_FMA
  1276. HAVE_FABSL
  1277. HAVE_FABSF
  1278. HAVE_EXPM1F
  1279. HAVE_EXPM1
  1280. HAVE_EXPL
  1281. HAVE_EXPF
  1282. HAVE_COSHF
  1283. HAVE_COSL
  1284. HAVE_COSF
  1285. HAVE_COPYSIGNL
  1286. HAVE_COPYSIGN
  1287. HAVE_CBRTL
  1288. HAVE_CBRTF
  1289. HAVE_CBRT
  1290. HAVE_ATAN2F
  1291. HAVE_ATANL
  1292. HAVE_ATANF
  1293. HAVE_ASINL
  1294. HAVE_ASINF
  1295. HAVE_ACOSL
  1296. HAVE_ACOSF
  1297. GNULIB_MDA_YN
  1298. GNULIB_MDA_Y1
  1299. GNULIB_MDA_Y0
  1300. GNULIB_MDA_JN
  1301. GNULIB_MDA_J1
  1302. GNULIB_MDA_J0
  1303. GNULIB_TRUNCL
  1304. GNULIB_TRUNCF
  1305. GNULIB_TRUNC
  1306. GNULIB_TANHF
  1307. GNULIB_TANL
  1308. GNULIB_TANF
  1309. GNULIB_SQRTL
  1310. GNULIB_SQRTF
  1311. GNULIB_SINHF
  1312. GNULIB_SINL
  1313. GNULIB_SINF
  1314. GNULIB_SIGNBIT
  1315. GNULIB_ROUNDL
  1316. GNULIB_ROUNDF
  1317. GNULIB_ROUND
  1318. GNULIB_RINTL
  1319. GNULIB_RINTF
  1320. GNULIB_RINT
  1321. GNULIB_REMAINDERL
  1322. GNULIB_REMAINDERF
  1323. GNULIB_REMAINDER
  1324. GNULIB_POWF
  1325. GNULIB_MODFL
  1326. GNULIB_MODFF
  1327. GNULIB_MODF
  1328. GNULIB_LOGBL
  1329. GNULIB_LOGBF
  1330. GNULIB_LOGB
  1331. GNULIB_LOG2L
  1332. GNULIB_LOG2F
  1333. GNULIB_LOG2
  1334. GNULIB_LOG1PL
  1335. GNULIB_LOG1PF
  1336. GNULIB_LOG1P
  1337. GNULIB_LOG10L
  1338. GNULIB_LOG10F
  1339. GNULIB_LOG10
  1340. GNULIB_LOGL
  1341. GNULIB_LOGF
  1342. GNULIB_LOG
  1343. GNULIB_LDEXPL
  1344. GNULIB_LDEXPF
  1345. GNULIB_ISNANL
  1346. GNULIB_ISNAND
  1347. GNULIB_ISNANF
  1348. GNULIB_ISNAN
  1349. GNULIB_ISINF
  1350. GNULIB_ISFINITE
  1351. GNULIB_ILOGBL
  1352. GNULIB_ILOGBF
  1353. GNULIB_ILOGB
  1354. GNULIB_HYPOTL
  1355. GNULIB_HYPOTF
  1356. GNULIB_HYPOT
  1357. GNULIB_FREXPL
  1358. GNULIB_FREXP
  1359. GNULIB_FREXPF
  1360. GNULIB_FMODL
  1361. GNULIB_FMODF
  1362. GNULIB_FMOD
  1363. GNULIB_FMAL
  1364. GNULIB_FMAF
  1365. GNULIB_FMA
  1366. GNULIB_FLOORL
  1367. GNULIB_FLOORF
  1368. GNULIB_FLOOR
  1369. GNULIB_FABSL
  1370. GNULIB_FABSF
  1371. GNULIB_EXPM1L
  1372. GNULIB_EXPM1F
  1373. GNULIB_EXPM1
  1374. GNULIB_EXP2L
  1375. GNULIB_EXP2F
  1376. GNULIB_EXP2
  1377. GNULIB_EXPL
  1378. GNULIB_EXPF
  1379. GNULIB_COSHF
  1380. GNULIB_COSL
  1381. GNULIB_COSF
  1382. GNULIB_COPYSIGNL
  1383. GNULIB_COPYSIGNF
  1384. GNULIB_COPYSIGN
  1385. GNULIB_CEILL
  1386. GNULIB_CEILF
  1387. GNULIB_CEIL
  1388. GNULIB_CBRTL
  1389. GNULIB_CBRTF
  1390. GNULIB_CBRT
  1391. GNULIB_ATAN2F
  1392. GNULIB_ATANL
  1393. GNULIB_ATANF
  1394. GNULIB_ASINL
  1395. GNULIB_ASINF
  1396. GNULIB_ACOSL
  1397. GNULIB_ACOSF
  1398. GL_GENERATE_FNMATCH_H_FALSE
  1399. GL_GENERATE_FNMATCH_H_TRUE
  1400. FNMATCH_H
  1401. HAVE_FNMATCH_H
  1402. NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
  1403. NEXT_FNMATCH_H
  1404. REPLACE_FNMATCH
  1405. HAVE_FNMATCH
  1406. GNULIB_FNMATCH
  1407. REPLACE_ITOLD
  1408. GL_GENERATE_FLOAT_H_FALSE
  1409. GL_GENERATE_FLOAT_H_TRUE
  1410. FLOAT_H
  1411. NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
  1412. NEXT_FLOAT_H
  1413. HAVE_DECL_STRNCASECMP
  1414. HAVE_STRCASECMP
  1415. HAVE_FFS
  1416. GNULIB_FFS
  1417. NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
  1418. NEXT_FCNTL_H
  1419. REPLACE_OPENAT
  1420. REPLACE_OPEN
  1421. REPLACE_FCNTL
  1422. REPLACE_CREAT
  1423. HAVE_OPENAT
  1424. HAVE_FCNTL
  1425. GNULIB_MDA_OPEN
  1426. GNULIB_MDA_CREAT
  1427. GNULIB_OPENAT
  1428. GNULIB_OPEN
  1429. GNULIB_NONBLOCKING
  1430. GNULIB_FCNTL
  1431. GNULIB_CREAT
  1432. EOVERFLOW_VALUE
  1433. EOVERFLOW_HIDDEN
  1434. ENOLINK_VALUE
  1435. ENOLINK_HIDDEN
  1436. EMULTIHOP_VALUE
  1437. EMULTIHOP_HIDDEN
  1438. GL_GENERATE_ERRNO_H_FALSE
  1439. GL_GENERATE_ERRNO_H_TRUE
  1440. ERRNO_H
  1441. NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
  1442. NEXT_ERRNO_H
  1443. HAVE_DIRENT_H
  1444. NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
  1445. NEXT_DIRENT_H
  1446. NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
  1447. NEXT_CTYPE_H
  1448. HAVE_ISBLANK
  1449. GNULIB_ISBLANK
  1450. REPLACE_FDOPENDIR
  1451. REPLACE_DIRFD
  1452. REPLACE_CLOSEDIR
  1453. REPLACE_OPENDIR
  1454. HAVE_ALPHASORT
  1455. HAVE_SCANDIR
  1456. HAVE_FDOPENDIR
  1457. HAVE_DECL_FDOPENDIR
  1458. HAVE_DECL_DIRFD
  1459. HAVE_CLOSEDIR
  1460. HAVE_REWINDDIR
  1461. HAVE_READDIR
  1462. HAVE_OPENDIR
  1463. GNULIB_ALPHASORT
  1464. GNULIB_SCANDIR
  1465. GNULIB_FDOPENDIR
  1466. GNULIB_DIRFD
  1467. GNULIB_CLOSEDIR
  1468. GNULIB_REWINDDIR
  1469. GNULIB_READDIR
  1470. GNULIB_OPENDIR
  1471. HAVE_MSVC_INVALID_PARAMETER_HANDLER
  1472. LIB_CLOCK_GETTIME
  1473. REPLACE_WCTOMB
  1474. REPLACE_UNSETENV
  1475. REPLACE_STRTOLD
  1476. REPLACE_STRTOD
  1477. REPLACE_SETSTATE
  1478. REPLACE_SETENV
  1479. REPLACE_REALPATH
  1480. REPLACE_REALLOC
  1481. REPLACE_RANDOM_R
  1482. REPLACE_RANDOM
  1483. REPLACE_QSORT_R
  1484. REPLACE_PUTENV
  1485. REPLACE_PTSNAME_R
  1486. REPLACE_PTSNAME
  1487. REPLACE_POSIX_MEMALIGN
  1488. REPLACE_MKSTEMP
  1489. REPLACE_MBTOWC
  1490. REPLACE_MALLOC
  1491. REPLACE_INITSTATE
  1492. REPLACE_FREE
  1493. REPLACE_CANONICALIZE_FILE_NAME
  1494. REPLACE_CALLOC
  1495. REPLACE_ALIGNED_ALLOC
  1496. HAVE_DECL_UNSETENV
  1497. HAVE_UNLOCKPT
  1498. HAVE_SYS_LOADAVG_H
  1499. HAVE_STRUCT_RANDOM_DATA
  1500. HAVE_STRTOULL
  1501. HAVE_STRTOLL
  1502. HAVE_STRTOLD
  1503. HAVE_STRTOD
  1504. HAVE_DECL_SETSTATE
  1505. HAVE_SETSTATE
  1506. HAVE_DECL_SETENV
  1507. HAVE_SETENV
  1508. HAVE_SECURE_GETENV
  1509. HAVE_RPMATCH
  1510. HAVE_REALPATH
  1511. HAVE_REALLOCARRAY
  1512. HAVE_RANDOM_R
  1513. HAVE_RANDOM_H
  1514. HAVE_RANDOM
  1515. HAVE_QSORT_R
  1516. HAVE_PTSNAME_R
  1517. HAVE_PTSNAME
  1518. HAVE_POSIX_OPENPT
  1519. HAVE_POSIX_MEMALIGN
  1520. HAVE_MKSTEMPS
  1521. HAVE_MKSTEMP
  1522. HAVE_MKOSTEMPS
  1523. HAVE_MKOSTEMP
  1524. HAVE_MKDTEMP
  1525. HAVE_MBTOWC
  1526. HAVE_DECL_INITSTATE
  1527. HAVE_INITSTATE
  1528. HAVE_GRANTPT
  1529. HAVE_GETSUBOPT
  1530. HAVE_DECL_GETLOADAVG
  1531. HAVE_DECL_GCVT
  1532. HAVE_DECL_FCVT
  1533. HAVE_DECL_ECVT
  1534. HAVE_CANONICALIZE_FILE_NAME
  1535. HAVE_ATOLL
  1536. HAVE_ALIGNED_ALLOC
  1537. HAVE__EXIT
  1538. GNULIB_MDA_PUTENV
  1539. GNULIB_MDA_MKTEMP
  1540. GNULIB_MDA_GCVT
  1541. GNULIB_MDA_FCVT
  1542. GNULIB_MDA_ECVT
  1543. GNULIB_WCTOMB
  1544. GNULIB_UNSETENV
  1545. GNULIB_UNLOCKPT
  1546. GNULIB_SYSTEM_POSIX
  1547. GNULIB_STRTOULL
  1548. GNULIB_STRTOLL
  1549. GNULIB_STRTOLD
  1550. GNULIB_STRTOD
  1551. GNULIB_SETENV
  1552. GNULIB_SECURE_GETENV
  1553. GNULIB_RPMATCH
  1554. GNULIB_REALPATH
  1555. GNULIB_REALLOC_POSIX
  1556. GNULIB_REALLOCARRAY
  1557. GNULIB_RANDOM_R
  1558. GNULIB_RANDOM
  1559. GNULIB_QSORT_R
  1560. GNULIB_PUTENV
  1561. GNULIB_PTSNAME_R
  1562. GNULIB_PTSNAME
  1563. GNULIB_POSIX_OPENPT
  1564. GNULIB_POSIX_MEMALIGN
  1565. GNULIB_MKSTEMPS
  1566. GNULIB_MKSTEMP
  1567. GNULIB_MKOSTEMPS
  1568. GNULIB_MKOSTEMP
  1569. GNULIB_MKDTEMP
  1570. GNULIB_MBTOWC
  1571. GNULIB_MALLOC_POSIX
  1572. GNULIB_GRANTPT
  1573. GNULIB_GETSUBOPT
  1574. GNULIB_GETLOADAVG
  1575. GNULIB_FREE_POSIX
  1576. GNULIB_CANONICALIZE_FILE_NAME
  1577. GNULIB_CALLOC_POSIX
  1578. GNULIB_ATOLL
  1579. GNULIB_ALIGNED_ALLOC
  1580. GNULIB__EXIT
  1581. LOCALE_FR
  1582. REPLACE_WCSTOK
  1583. REPLACE_WCSFTIME
  1584. REPLACE_WCSWIDTH
  1585. REPLACE_WCWIDTH
  1586. REPLACE_WCSNRTOMBS
  1587. REPLACE_WCSRTOMBS
  1588. REPLACE_WCRTOMB
  1589. REPLACE_MBSNRTOWCS
  1590. REPLACE_MBSRTOWCS
  1591. REPLACE_MBRLEN
  1592. REPLACE_MBRTOWC
  1593. REPLACE_MBSINIT
  1594. REPLACE_WCTOB
  1595. REPLACE_BTOWC
  1596. REPLACE_MBSTATE_T
  1597. HAVE_DECL_WCWIDTH
  1598. HAVE_DECL_WCSDUP
  1599. HAVE_DECL_WCTOB
  1600. HAVE_WCSFTIME
  1601. HAVE_WCSWIDTH
  1602. HAVE_WCSTOK
  1603. HAVE_WCSSTR
  1604. HAVE_WCSPBRK
  1605. HAVE_WCSSPN
  1606. HAVE_WCSCSPN
  1607. HAVE_WCSRCHR
  1608. HAVE_WCSCHR
  1609. HAVE_WCSDUP
  1610. HAVE_WCSXFRM
  1611. HAVE_WCSCOLL
  1612. HAVE_WCSNCASECMP
  1613. HAVE_WCSCASECMP
  1614. HAVE_WCSNCMP
  1615. HAVE_WCSCMP
  1616. HAVE_WCSNCAT
  1617. HAVE_WCSCAT
  1618. HAVE_WCPNCPY
  1619. HAVE_WCSNCPY
  1620. HAVE_WCPCPY
  1621. HAVE_WCSCPY
  1622. HAVE_WCSNLEN
  1623. HAVE_WCSLEN
  1624. HAVE_WMEMSET
  1625. HAVE_WMEMPCPY
  1626. HAVE_WMEMMOVE
  1627. HAVE_WMEMCPY
  1628. HAVE_WMEMCMP
  1629. HAVE_WMEMCHR
  1630. HAVE_WCSNRTOMBS
  1631. HAVE_WCSRTOMBS
  1632. HAVE_WCRTOMB
  1633. HAVE_MBSNRTOWCS
  1634. HAVE_MBSRTOWCS
  1635. HAVE_MBRLEN
  1636. HAVE_MBRTOWC
  1637. HAVE_MBSINIT
  1638. HAVE_BTOWC
  1639. GNULIB_MDA_WCSDUP
  1640. GNULIB_WCSFTIME
  1641. GNULIB_WCSWIDTH
  1642. GNULIB_WCSTOK
  1643. GNULIB_WCSSTR
  1644. GNULIB_WCSPBRK
  1645. GNULIB_WCSSPN
  1646. GNULIB_WCSCSPN
  1647. GNULIB_WCSRCHR
  1648. GNULIB_WCSCHR
  1649. GNULIB_WCSDUP
  1650. GNULIB_WCSXFRM
  1651. GNULIB_WCSCOLL
  1652. GNULIB_WCSNCASECMP
  1653. GNULIB_WCSCASECMP
  1654. GNULIB_WCSNCMP
  1655. GNULIB_WCSCMP
  1656. GNULIB_WCSNCAT
  1657. GNULIB_WCSCAT
  1658. GNULIB_WCPNCPY
  1659. GNULIB_WCSNCPY
  1660. GNULIB_WCPCPY
  1661. GNULIB_WCSCPY
  1662. GNULIB_WCSNLEN
  1663. GNULIB_WCSLEN
  1664. GNULIB_WMEMSET
  1665. GNULIB_WMEMPCPY
  1666. GNULIB_WMEMMOVE
  1667. GNULIB_WMEMCPY
  1668. GNULIB_WMEMCMP
  1669. GNULIB_WMEMCHR
  1670. GNULIB_WCWIDTH
  1671. GNULIB_WCSNRTOMBS
  1672. GNULIB_WCSRTOMBS
  1673. GNULIB_WCRTOMB
  1674. GNULIB_MBSNRTOWCS
  1675. GNULIB_MBSRTOWCS
  1676. GNULIB_MBRLEN
  1677. GNULIB_MBRTOWC
  1678. GNULIB_MBSINIT
  1679. GNULIB_WCTOB
  1680. GNULIB_BTOWC
  1681. MKDIR_P
  1682. HAVE_FEATURES_H
  1683. NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
  1684. NEXT_ARPA_INET_H
  1685. HAVE_ARPA_INET_H
  1686. REPLACE_INET_PTON
  1687. REPLACE_INET_NTOP
  1688. HAVE_DECL_INET_PTON
  1689. HAVE_DECL_INET_NTOP
  1690. GNULIB_INET_PTON
  1691. GNULIB_INET_NTOP
  1692. HAVE_ALLOCA_H
  1693. GL_GENERATE_ALLOCA_H_FALSE
  1694. GL_GENERATE_ALLOCA_H_TRUE
  1695. ALLOCA_H
  1696. ALLOCA
  1697. HAVE_WINSOCK2_H
  1698. UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
  1699. UNISTD_H_HAVE_WINSOCK2_H
  1700. UNISTD_H_HAVE_SYS_RANDOM_H
  1701. REPLACE_WRITE
  1702. REPLACE_USLEEP
  1703. REPLACE_UNLINKAT
  1704. REPLACE_UNLINK
  1705. REPLACE_TTYNAME_R
  1706. REPLACE_TRUNCATE
  1707. REPLACE_SYMLINKAT
  1708. REPLACE_SYMLINK
  1709. REPLACE_SLEEP
  1710. REPLACE_RMDIR
  1711. REPLACE_READLINKAT
  1712. REPLACE_READLINK
  1713. REPLACE_READ
  1714. REPLACE_PWRITE
  1715. REPLACE_PREAD
  1716. REPLACE_LSEEK
  1717. REPLACE_LINKAT
  1718. REPLACE_LINK
  1719. REPLACE_LCHOWN
  1720. REPLACE_ISATTY
  1721. REPLACE_GETPASS
  1722. REPLACE_GETPAGESIZE
  1723. REPLACE_GETGROUPS
  1724. REPLACE_GETLOGIN_R
  1725. REPLACE_GETDTABLESIZE
  1726. REPLACE_GETDOMAINNAME
  1727. REPLACE_GETCWD
  1728. REPLACE_FTRUNCATE
  1729. REPLACE_FCHOWNAT
  1730. REPLACE_FACCESSAT
  1731. REPLACE_EXECVPE
  1732. REPLACE_EXECVP
  1733. REPLACE_EXECVE
  1734. REPLACE_EXECV
  1735. REPLACE_EXECLP
  1736. REPLACE_EXECLE
  1737. REPLACE_EXECL
  1738. REPLACE_DUP2
  1739. REPLACE_DUP
  1740. REPLACE_CLOSE
  1741. REPLACE_CHOWN
  1742. REPLACE_ACCESS
  1743. HAVE_SYS_PARAM_H
  1744. HAVE_OS_H
  1745. HAVE_DECL_TTYNAME_R
  1746. HAVE_DECL_TRUNCATE
  1747. HAVE_DECL_SETHOSTNAME
  1748. HAVE_DECL_GETUSERSHELL
  1749. HAVE_DECL_GETPAGESIZE
  1750. HAVE_DECL_GETLOGIN_R
  1751. HAVE_DECL_GETLOGIN
  1752. HAVE_DECL_GETDOMAINNAME
  1753. HAVE_DECL_FDATASYNC
  1754. HAVE_DECL_FCHDIR
  1755. HAVE_DECL_EXECVPE
  1756. HAVE_DECL_ENVIRON
  1757. HAVE_USLEEP
  1758. HAVE_UNLINKAT
  1759. HAVE_SYMLINKAT
  1760. HAVE_SYMLINK
  1761. HAVE_SLEEP
  1762. HAVE_SETHOSTNAME
  1763. HAVE_READLINKAT
  1764. HAVE_READLINK
  1765. HAVE_PWRITE
  1766. HAVE_PREAD
  1767. HAVE_PIPE2
  1768. HAVE_PIPE
  1769. HAVE_LINKAT
  1770. HAVE_LINK
  1771. HAVE_LCHOWN
  1772. HAVE_GROUP_MEMBER
  1773. HAVE_GETPASS
  1774. HAVE_GETPAGESIZE
  1775. HAVE_GETLOGIN
  1776. HAVE_GETHOSTNAME
  1777. HAVE_GETGROUPS
  1778. HAVE_GETENTROPY
  1779. HAVE_GETDTABLESIZE
  1780. HAVE_FTRUNCATE
  1781. HAVE_FSYNC
  1782. HAVE_FDATASYNC
  1783. HAVE_FCHOWNAT
  1784. HAVE_FCHDIR
  1785. HAVE_FACCESSAT
  1786. HAVE_EXECVPE
  1787. HAVE_EUIDACCESS
  1788. HAVE_DUP3
  1789. HAVE_COPY_FILE_RANGE
  1790. HAVE_CHOWN
  1791. GNULIB_MDA_WRITE
  1792. GNULIB_MDA_UNLINK
  1793. GNULIB_MDA_SWAB
  1794. GNULIB_MDA_RMDIR
  1795. GNULIB_MDA_READ
  1796. GNULIB_MDA_LSEEK
  1797. GNULIB_MDA_ISATTY
  1798. GNULIB_MDA_GETPID
  1799. GNULIB_MDA_GETCWD
  1800. GNULIB_MDA_EXECVPE
  1801. GNULIB_MDA_EXECVP
  1802. GNULIB_MDA_EXECVE
  1803. GNULIB_MDA_EXECV
  1804. GNULIB_MDA_EXECLP
  1805. GNULIB_MDA_EXECLE
  1806. GNULIB_MDA_EXECL
  1807. GNULIB_MDA_DUP2
  1808. GNULIB_MDA_DUP
  1809. GNULIB_MDA_CLOSE
  1810. GNULIB_MDA_CHDIR
  1811. GNULIB_MDA_ACCESS
  1812. GNULIB_WRITE
  1813. GNULIB_USLEEP
  1814. GNULIB_UNLINKAT
  1815. GNULIB_UNLINK
  1816. GNULIB_UNISTD_H_SIGPIPE
  1817. GNULIB_UNISTD_H_NONBLOCKING
  1818. GNULIB_TTYNAME_R
  1819. GNULIB_TRUNCATE
  1820. GNULIB_SYMLINKAT
  1821. GNULIB_SYMLINK
  1822. GNULIB_SLEEP
  1823. GNULIB_SETHOSTNAME
  1824. GNULIB_RMDIR
  1825. GNULIB_READLINKAT
  1826. GNULIB_READLINK
  1827. GNULIB_READ
  1828. GNULIB_PWRITE
  1829. GNULIB_PREAD
  1830. GNULIB_PIPE2
  1831. GNULIB_PIPE
  1832. GNULIB_LSEEK
  1833. GNULIB_LINKAT
  1834. GNULIB_LINK
  1835. GNULIB_LCHOWN
  1836. GNULIB_ISATTY
  1837. GNULIB_GROUP_MEMBER
  1838. GNULIB_GETUSERSHELL
  1839. GNULIB_GETPASS
  1840. GNULIB_GETPAGESIZE
  1841. GNULIB_GETOPT_POSIX
  1842. GNULIB_GETLOGIN_R
  1843. GNULIB_GETLOGIN
  1844. GNULIB_GETHOSTNAME
  1845. GNULIB_GETGROUPS
  1846. GNULIB_GETENTROPY
  1847. GNULIB_GETDTABLESIZE
  1848. GNULIB_GETDOMAINNAME
  1849. GNULIB_GETCWD
  1850. GNULIB_FTRUNCATE
  1851. GNULIB_FSYNC
  1852. GNULIB_FDATASYNC
  1853. GNULIB_FCHOWNAT
  1854. GNULIB_FCHDIR
  1855. GNULIB_FACCESSAT
  1856. GNULIB_EXECVPE
  1857. GNULIB_EXECVP
  1858. GNULIB_EXECVE
  1859. GNULIB_EXECV
  1860. GNULIB_EXECLP
  1861. GNULIB_EXECLE
  1862. GNULIB_EXECL
  1863. GNULIB_EUIDACCESS
  1864. GNULIB_ENVIRON
  1865. GNULIB_DUP3
  1866. GNULIB_DUP2
  1867. GNULIB_DUP
  1868. GNULIB_COPY_FILE_RANGE
  1869. GNULIB_CLOSE
  1870. GNULIB_CHOWN
  1871. GNULIB_CHDIR
  1872. GNULIB_ACCESS
  1873. HAVE_WS2TCPIP_H
  1874. HAVE_SYS_SOCKET_H
  1875. NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
  1876. NEXT_SYS_SOCKET_H
  1877. PRAGMA_COLUMNS
  1878. PRAGMA_SYSTEM_HEADER
  1879. INCLUDE_NEXT_AS_FIRST_DIRECTIVE
  1880. INCLUDE_NEXT
  1881. HAVE_ACCEPT4
  1882. HAVE_SA_FAMILY_T
  1883. HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
  1884. HAVE_STRUCT_SOCKADDR_STORAGE
  1885. GNULIB_ACCEPT4
  1886. GNULIB_SHUTDOWN
  1887. GNULIB_SETSOCKOPT
  1888. GNULIB_SENDTO
  1889. GNULIB_RECVFROM
  1890. GNULIB_SEND
  1891. GNULIB_RECV
  1892. GNULIB_LISTEN
  1893. GNULIB_GETSOCKOPT
  1894. GNULIB_GETSOCKNAME
  1895. GNULIB_GETPEERNAME
  1896. GNULIB_BIND
  1897. GNULIB_ACCEPT
  1898. GNULIB_CONNECT
  1899. GNULIB_SOCKET
  1900. GL_COND_LIBTOOL_FALSE
  1901. GL_COND_LIBTOOL_TRUE
  1902. RANLIB
  1903. ARFLAGS
  1904. AR
  1905. LARGEFILE_CPPFLAGS
  1906. target_os
  1907. target_vendor
  1908. target_cpu
  1909. target
  1910. host_os
  1911. host_vendor
  1912. host_cpu
  1913. host
  1914. build_os
  1915. build_vendor
  1916. build_cpu
  1917. build
  1918. EGREP
  1919. GREP
  1920. CPP
  1921. OBJEXT
  1922. EXEEXT
  1923. ac_ct_CC
  1924. CPPFLAGS
  1925. LDFLAGS
  1926. CFLAGS
  1927. CC
  1928. MAINT
  1929. MAINTAINER_MODE_FALSE
  1930. MAINTAINER_MODE_TRUE
  1931. target_alias
  1932. host_alias
  1933. build_alias
  1934. LIBS
  1935. ECHO_T
  1936. ECHO_N
  1937. ECHO_C
  1938. DEFS
  1939. mandir
  1940. localedir
  1941. libdir
  1942. psdir
  1943. pdfdir
  1944. dvidir
  1945. htmldir
  1946. infodir
  1947. docdir
  1948. oldincludedir
  1949. includedir
  1950. localstatedir
  1951. sharedstatedir
  1952. sysconfdir
  1953. datadir
  1954. datarootdir
  1955. libexecdir
  1956. sbindir
  1957. bindir
  1958. program_transform_name
  1959. prefix
  1960. exec_prefix
  1961. PACKAGE_URL
  1962. PACKAGE_BUGREPORT
  1963. PACKAGE_STRING
  1964. PACKAGE_VERSION
  1965. PACKAGE_TARNAME
  1966. PACKAGE_NAME
  1967. PATH_SEPARATOR
  1968. SHELL'
  1969. ac_subst_files=''
  1970. ac_user_opts='
  1971. enable_option_checking
  1972. enable_maintainer_mode
  1973. enable_plugins
  1974. enable_largefile
  1975. enable_threads
  1976. enable_cross_guesses
  1977. enable_dependency_tracking
  1978. enable_silent_rules
  1979. '
  1980. ac_precious_vars='build_alias
  1981. host_alias
  1982. target_alias
  1983. CC
  1984. CFLAGS
  1985. LDFLAGS
  1986. LIBS
  1987. CPPFLAGS
  1988. CPP'
  1989. # Initialize some variables set by options.
  1990. ac_init_help=
  1991. ac_init_version=false
  1992. ac_unrecognized_opts=
  1993. ac_unrecognized_sep=
  1994. # The variables have the same names as the options, with
  1995. # dashes changed to underlines.
  1996. cache_file=/dev/null
  1997. exec_prefix=NONE
  1998. no_create=
  1999. no_recursion=
  2000. prefix=NONE
  2001. program_prefix=NONE
  2002. program_suffix=NONE
  2003. program_transform_name=s,x,x,
  2004. silent=
  2005. site=
  2006. srcdir=
  2007. verbose=
  2008. x_includes=NONE
  2009. x_libraries=NONE
  2010. # Installation directory options.
  2011. # These are left unexpanded so users can "make install exec_prefix=/foo"
  2012. # and all the variables that are supposed to be based on exec_prefix
  2013. # by default will actually change.
  2014. # Use braces instead of parens because sh, perl, etc. also accept them.
  2015. # (The list follows the same order as the GNU Coding Standards.)
  2016. bindir='${exec_prefix}/bin'
  2017. sbindir='${exec_prefix}/sbin'
  2018. libexecdir='${exec_prefix}/libexec'
  2019. datarootdir='${prefix}/share'
  2020. datadir='${datarootdir}'
  2021. sysconfdir='${prefix}/etc'
  2022. sharedstatedir='${prefix}/com'
  2023. localstatedir='${prefix}/var'
  2024. includedir='${prefix}/include'
  2025. oldincludedir='/usr/include'
  2026. docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
  2027. infodir='${datarootdir}/info'
  2028. htmldir='${docdir}'
  2029. dvidir='${docdir}'
  2030. pdfdir='${docdir}'
  2031. psdir='${docdir}'
  2032. libdir='${exec_prefix}/lib'
  2033. localedir='${datarootdir}/locale'
  2034. mandir='${datarootdir}/man'
  2035. ac_prev=
  2036. ac_dashdash=
  2037. for ac_option
  2038. do
  2039. # If the previous option needs an argument, assign it.
  2040. if test -n "$ac_prev"; then
  2041. eval $ac_prev=\$ac_option
  2042. ac_prev=
  2043. continue
  2044. fi
  2045. case $ac_option in
  2046. *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
  2047. *=) ac_optarg= ;;
  2048. *) ac_optarg=yes ;;
  2049. esac
  2050. # Accept the important Cygnus configure options, so we can diagnose typos.
  2051. case $ac_dashdash$ac_option in
  2052. --)
  2053. ac_dashdash=yes ;;
  2054. -bindir | --bindir | --bindi | --bind | --bin | --bi)
  2055. ac_prev=bindir ;;
  2056. -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  2057. bindir=$ac_optarg ;;
  2058. -build | --build | --buil | --bui | --bu)
  2059. ac_prev=build_alias ;;
  2060. -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  2061. build_alias=$ac_optarg ;;
  2062. -cache-file | --cache-file | --cache-fil | --cache-fi \
  2063. | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  2064. ac_prev=cache_file ;;
  2065. -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  2066. | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  2067. cache_file=$ac_optarg ;;
  2068. --config-cache | -C)
  2069. cache_file=config.cache ;;
  2070. -datadir | --datadir | --datadi | --datad)
  2071. ac_prev=datadir ;;
  2072. -datadir=* | --datadir=* | --datadi=* | --datad=*)
  2073. datadir=$ac_optarg ;;
  2074. -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
  2075. | --dataroo | --dataro | --datar)
  2076. ac_prev=datarootdir ;;
  2077. -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
  2078. | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
  2079. datarootdir=$ac_optarg ;;
  2080. -disable-* | --disable-*)
  2081. ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
  2082. # Reject names that are not valid shell variable names.
  2083. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
  2084. as_fn_error $? "invalid feature name: $ac_useropt"
  2085. ac_useropt_orig=$ac_useropt
  2086. ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
  2087. case $ac_user_opts in
  2088. *"
  2089. "enable_$ac_useropt"
  2090. "*) ;;
  2091. *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
  2092. ac_unrecognized_sep=', ';;
  2093. esac
  2094. eval enable_$ac_useropt=no ;;
  2095. -docdir | --docdir | --docdi | --doc | --do)
  2096. ac_prev=docdir ;;
  2097. -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
  2098. docdir=$ac_optarg ;;
  2099. -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
  2100. ac_prev=dvidir ;;
  2101. -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
  2102. dvidir=$ac_optarg ;;
  2103. -enable-* | --enable-*)
  2104. ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
  2105. # Reject names that are not valid shell variable names.
  2106. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
  2107. as_fn_error $? "invalid feature name: $ac_useropt"
  2108. ac_useropt_orig=$ac_useropt
  2109. ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
  2110. case $ac_user_opts in
  2111. *"
  2112. "enable_$ac_useropt"
  2113. "*) ;;
  2114. *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
  2115. ac_unrecognized_sep=', ';;
  2116. esac
  2117. eval enable_$ac_useropt=\$ac_optarg ;;
  2118. -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  2119. | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  2120. | --exec | --exe | --ex)
  2121. ac_prev=exec_prefix ;;
  2122. -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  2123. | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  2124. | --exec=* | --exe=* | --ex=*)
  2125. exec_prefix=$ac_optarg ;;
  2126. -gas | --gas | --ga | --g)
  2127. # Obsolete; use --with-gas.
  2128. with_gas=yes ;;
  2129. -help | --help | --hel | --he | -h)
  2130. ac_init_help=long ;;
  2131. -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
  2132. ac_init_help=recursive ;;
  2133. -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
  2134. ac_init_help=short ;;
  2135. -host | --host | --hos | --ho)
  2136. ac_prev=host_alias ;;
  2137. -host=* | --host=* | --hos=* | --ho=*)
  2138. host_alias=$ac_optarg ;;
  2139. -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
  2140. ac_prev=htmldir ;;
  2141. -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
  2142. | --ht=*)
  2143. htmldir=$ac_optarg ;;
  2144. -includedir | --includedir | --includedi | --included | --include \
  2145. | --includ | --inclu | --incl | --inc)
  2146. ac_prev=includedir ;;
  2147. -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  2148. | --includ=* | --inclu=* | --incl=* | --inc=*)
  2149. includedir=$ac_optarg ;;
  2150. -infodir | --infodir | --infodi | --infod | --info | --inf)
  2151. ac_prev=infodir ;;
  2152. -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  2153. infodir=$ac_optarg ;;
  2154. -libdir | --libdir | --libdi | --libd)
  2155. ac_prev=libdir ;;
  2156. -libdir=* | --libdir=* | --libdi=* | --libd=*)
  2157. libdir=$ac_optarg ;;
  2158. -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  2159. | --libexe | --libex | --libe)
  2160. ac_prev=libexecdir ;;
  2161. -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  2162. | --libexe=* | --libex=* | --libe=*)
  2163. libexecdir=$ac_optarg ;;
  2164. -localedir | --localedir | --localedi | --localed | --locale)
  2165. ac_prev=localedir ;;
  2166. -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
  2167. localedir=$ac_optarg ;;
  2168. -localstatedir | --localstatedir | --localstatedi | --localstated \
  2169. | --localstate | --localstat | --localsta | --localst | --locals)
  2170. ac_prev=localstatedir ;;
  2171. -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  2172. | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
  2173. localstatedir=$ac_optarg ;;
  2174. -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  2175. ac_prev=mandir ;;
  2176. -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  2177. mandir=$ac_optarg ;;
  2178. -nfp | --nfp | --nf)
  2179. # Obsolete; use --without-fp.
  2180. with_fp=no ;;
  2181. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  2182. | --no-cr | --no-c | -n)
  2183. no_create=yes ;;
  2184. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  2185. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  2186. no_recursion=yes ;;
  2187. -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  2188. | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  2189. | --oldin | --oldi | --old | --ol | --o)
  2190. ac_prev=oldincludedir ;;
  2191. -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  2192. | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  2193. | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  2194. oldincludedir=$ac_optarg ;;
  2195. -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  2196. ac_prev=prefix ;;
  2197. -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  2198. prefix=$ac_optarg ;;
  2199. -program-prefix | --program-prefix | --program-prefi | --program-pref \
  2200. | --program-pre | --program-pr | --program-p)
  2201. ac_prev=program_prefix ;;
  2202. -program-prefix=* | --program-prefix=* | --program-prefi=* \
  2203. | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  2204. program_prefix=$ac_optarg ;;
  2205. -program-suffix | --program-suffix | --program-suffi | --program-suff \
  2206. | --program-suf | --program-su | --program-s)
  2207. ac_prev=program_suffix ;;
  2208. -program-suffix=* | --program-suffix=* | --program-suffi=* \
  2209. | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  2210. program_suffix=$ac_optarg ;;
  2211. -program-transform-name | --program-transform-name \
  2212. | --program-transform-nam | --program-transform-na \
  2213. | --program-transform-n | --program-transform- \
  2214. | --program-transform | --program-transfor \
  2215. | --program-transfo | --program-transf \
  2216. | --program-trans | --program-tran \
  2217. | --progr-tra | --program-tr | --program-t)
  2218. ac_prev=program_transform_name ;;
  2219. -program-transform-name=* | --program-transform-name=* \
  2220. | --program-transform-nam=* | --program-transform-na=* \
  2221. | --program-transform-n=* | --program-transform-=* \
  2222. | --program-transform=* | --program-transfor=* \
  2223. | --program-transfo=* | --program-transf=* \
  2224. | --program-trans=* | --program-tran=* \
  2225. | --progr-tra=* | --program-tr=* | --program-t=*)
  2226. program_transform_name=$ac_optarg ;;
  2227. -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
  2228. ac_prev=pdfdir ;;
  2229. -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
  2230. pdfdir=$ac_optarg ;;
  2231. -psdir | --psdir | --psdi | --psd | --ps)
  2232. ac_prev=psdir ;;
  2233. -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
  2234. psdir=$ac_optarg ;;
  2235. -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  2236. | -silent | --silent | --silen | --sile | --sil)
  2237. silent=yes ;;
  2238. -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  2239. ac_prev=sbindir ;;
  2240. -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  2241. | --sbi=* | --sb=*)
  2242. sbindir=$ac_optarg ;;
  2243. -sharedstatedir | --sharedstatedir | --sharedstatedi \
  2244. | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  2245. | --sharedst | --shareds | --shared | --share | --shar \
  2246. | --sha | --sh)
  2247. ac_prev=sharedstatedir ;;
  2248. -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  2249. | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  2250. | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  2251. | --sha=* | --sh=*)
  2252. sharedstatedir=$ac_optarg ;;
  2253. -site | --site | --sit)
  2254. ac_prev=site ;;
  2255. -site=* | --site=* | --sit=*)
  2256. site=$ac_optarg ;;
  2257. -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  2258. ac_prev=srcdir ;;
  2259. -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  2260. srcdir=$ac_optarg ;;
  2261. -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  2262. | --syscon | --sysco | --sysc | --sys | --sy)
  2263. ac_prev=sysconfdir ;;
  2264. -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  2265. | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  2266. sysconfdir=$ac_optarg ;;
  2267. -target | --target | --targe | --targ | --tar | --ta | --t)
  2268. ac_prev=target_alias ;;
  2269. -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  2270. target_alias=$ac_optarg ;;
  2271. -v | -verbose | --verbose | --verbos | --verbo | --verb)
  2272. verbose=yes ;;
  2273. -version | --version | --versio | --versi | --vers | -V)
  2274. ac_init_version=: ;;
  2275. -with-* | --with-*)
  2276. ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
  2277. # Reject names that are not valid shell variable names.
  2278. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
  2279. as_fn_error $? "invalid package name: $ac_useropt"
  2280. ac_useropt_orig=$ac_useropt
  2281. ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
  2282. case $ac_user_opts in
  2283. *"
  2284. "with_$ac_useropt"
  2285. "*) ;;
  2286. *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
  2287. ac_unrecognized_sep=', ';;
  2288. esac
  2289. eval with_$ac_useropt=\$ac_optarg ;;
  2290. -without-* | --without-*)
  2291. ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
  2292. # Reject names that are not valid shell variable names.
  2293. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
  2294. as_fn_error $? "invalid package name: $ac_useropt"
  2295. ac_useropt_orig=$ac_useropt
  2296. ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
  2297. case $ac_user_opts in
  2298. *"
  2299. "with_$ac_useropt"
  2300. "*) ;;
  2301. *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
  2302. ac_unrecognized_sep=', ';;
  2303. esac
  2304. eval with_$ac_useropt=no ;;
  2305. --x)
  2306. # Obsolete; use --with-x.
  2307. with_x=yes ;;
  2308. -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  2309. | --x-incl | --x-inc | --x-in | --x-i)
  2310. ac_prev=x_includes ;;
  2311. -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  2312. | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  2313. x_includes=$ac_optarg ;;
  2314. -x-libraries | --x-libraries | --x-librarie | --x-librari \
  2315. | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  2316. ac_prev=x_libraries ;;
  2317. -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  2318. | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  2319. x_libraries=$ac_optarg ;;
  2320. -*) as_fn_error $? "unrecognized option: \`$ac_option'
  2321. Try \`$0 --help' for more information"
  2322. ;;
  2323. *=*)
  2324. ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
  2325. # Reject names that are not valid shell variable names.
  2326. case $ac_envvar in #(
  2327. '' | [0-9]* | *[!_$as_cr_alnum]* )
  2328. as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
  2329. esac
  2330. eval $ac_envvar=\$ac_optarg
  2331. export $ac_envvar ;;
  2332. *)
  2333. # FIXME: should be removed in autoconf 3.0.
  2334. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
  2335. expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
  2336. $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
  2337. : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
  2338. ;;
  2339. esac
  2340. done
  2341. if test -n "$ac_prev"; then
  2342. ac_option=--`echo $ac_prev | sed 's/_/-/g'`
  2343. as_fn_error $? "missing argument to $ac_option"
  2344. fi
  2345. if test -n "$ac_unrecognized_opts"; then
  2346. case $enable_option_checking in
  2347. no) ;;
  2348. fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
  2349. *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
  2350. esac
  2351. fi
  2352. # Check all directory arguments for consistency.
  2353. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
  2354. datadir sysconfdir sharedstatedir localstatedir includedir \
  2355. oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
  2356. libdir localedir mandir
  2357. do
  2358. eval ac_val=\$$ac_var
  2359. # Remove trailing slashes.
  2360. case $ac_val in
  2361. */ )
  2362. ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
  2363. eval $ac_var=\$ac_val;;
  2364. esac
  2365. # Be sure to have absolute directory names.
  2366. case $ac_val in
  2367. [\\/$]* | ?:[\\/]* ) continue;;
  2368. NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
  2369. esac
  2370. as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
  2371. done
  2372. # There might be people who depend on the old broken behavior: `$host'
  2373. # used to hold the argument of --host etc.
  2374. # FIXME: To remove some day.
  2375. build=$build_alias
  2376. host=$host_alias
  2377. target=$target_alias
  2378. # FIXME: To remove some day.
  2379. if test "x$host_alias" != x; then
  2380. if test "x$build_alias" = x; then
  2381. cross_compiling=maybe
  2382. elif test "x$build_alias" != "x$host_alias"; then
  2383. cross_compiling=yes
  2384. fi
  2385. fi
  2386. ac_tool_prefix=
  2387. test -n "$host_alias" && ac_tool_prefix=$host_alias-
  2388. test "$silent" = yes && exec 6>/dev/null
  2389. ac_pwd=`pwd` && test -n "$ac_pwd" &&
  2390. ac_ls_di=`ls -di .` &&
  2391. ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
  2392. as_fn_error $? "working directory cannot be determined"
  2393. test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
  2394. as_fn_error $? "pwd does not report name of working directory"
  2395. # Find the source files, if location was not specified.
  2396. if test -z "$srcdir"; then
  2397. ac_srcdir_defaulted=yes
  2398. # Try the directory containing this script, then the parent directory.
  2399. ac_confdir=`$as_dirname -- "$as_myself" ||
  2400. $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  2401. X"$as_myself" : 'X\(//\)[^/]' \| \
  2402. X"$as_myself" : 'X\(//\)$' \| \
  2403. X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
  2404. $as_echo X"$as_myself" |
  2405. sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
  2406. s//\1/
  2407. q
  2408. }
  2409. /^X\(\/\/\)[^/].*/{
  2410. s//\1/
  2411. q
  2412. }
  2413. /^X\(\/\/\)$/{
  2414. s//\1/
  2415. q
  2416. }
  2417. /^X\(\/\).*/{
  2418. s//\1/
  2419. q
  2420. }
  2421. s/.*/./; q'`
  2422. srcdir=$ac_confdir
  2423. if test ! -r "$srcdir/$ac_unique_file"; then
  2424. srcdir=..
  2425. fi
  2426. else
  2427. ac_srcdir_defaulted=no
  2428. fi
  2429. if test ! -r "$srcdir/$ac_unique_file"; then
  2430. test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
  2431. as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
  2432. fi
  2433. ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
  2434. ac_abs_confdir=`(
  2435. cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
  2436. pwd)`
  2437. # When building in place, set srcdir=.
  2438. if test "$ac_abs_confdir" = "$ac_pwd"; then
  2439. srcdir=.
  2440. fi
  2441. # Remove unnecessary trailing slashes from srcdir.
  2442. # Double slashes in file names in object file debugging info
  2443. # mess up M-x gdb in Emacs.
  2444. case $srcdir in
  2445. */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
  2446. esac
  2447. for ac_var in $ac_precious_vars; do
  2448. eval ac_env_${ac_var}_set=\${${ac_var}+set}
  2449. eval ac_env_${ac_var}_value=\$${ac_var}
  2450. eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
  2451. eval ac_cv_env_${ac_var}_value=\$${ac_var}
  2452. done
  2453. #
  2454. # Report the --help message.
  2455. #
  2456. if test "$ac_init_help" = "long"; then
  2457. # Omit some internal or obsolete options to make the list less imposing.
  2458. # This message is too long to be a string in the A/UX 3.1 sh.
  2459. cat <<_ACEOF
  2460. \`configure' configures libgnu UNUSED-VERSION to adapt to many kinds of systems.
  2461. Usage: $0 [OPTION]... [VAR=VALUE]...
  2462. To assign environment variables (e.g., CC, CFLAGS...), specify them as
  2463. VAR=VALUE. See below for descriptions of some of the useful variables.
  2464. Defaults for the options are specified in brackets.
  2465. Configuration:
  2466. -h, --help display this help and exit
  2467. --help=short display options specific to this package
  2468. --help=recursive display the short help of all the included packages
  2469. -V, --version display version information and exit
  2470. -q, --quiet, --silent do not print \`checking ...' messages
  2471. --cache-file=FILE cache test results in FILE [disabled]
  2472. -C, --config-cache alias for \`--cache-file=config.cache'
  2473. -n, --no-create do not create output files
  2474. --srcdir=DIR find the sources in DIR [configure dir or \`..']
  2475. Installation directories:
  2476. --prefix=PREFIX install architecture-independent files in PREFIX
  2477. [$ac_default_prefix]
  2478. --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
  2479. [PREFIX]
  2480. By default, \`make install' will install all the files in
  2481. \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
  2482. an installation prefix other than \`$ac_default_prefix' using \`--prefix',
  2483. for instance \`--prefix=\$HOME'.
  2484. For better control, use the options below.
  2485. Fine tuning of the installation directories:
  2486. --bindir=DIR user executables [EPREFIX/bin]
  2487. --sbindir=DIR system admin executables [EPREFIX/sbin]
  2488. --libexecdir=DIR program executables [EPREFIX/libexec]
  2489. --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
  2490. --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
  2491. --localstatedir=DIR modifiable single-machine data [PREFIX/var]
  2492. --libdir=DIR object code libraries [EPREFIX/lib]
  2493. --includedir=DIR C header files [PREFIX/include]
  2494. --oldincludedir=DIR C header files for non-gcc [/usr/include]
  2495. --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
  2496. --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
  2497. --infodir=DIR info documentation [DATAROOTDIR/info]
  2498. --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
  2499. --mandir=DIR man documentation [DATAROOTDIR/man]
  2500. --docdir=DIR documentation root [DATAROOTDIR/doc/libgnu]
  2501. --htmldir=DIR html documentation [DOCDIR]
  2502. --dvidir=DIR dvi documentation [DOCDIR]
  2503. --pdfdir=DIR pdf documentation [DOCDIR]
  2504. --psdir=DIR ps documentation [DOCDIR]
  2505. _ACEOF
  2506. cat <<\_ACEOF
  2507. Program names:
  2508. --program-prefix=PREFIX prepend PREFIX to installed program names
  2509. --program-suffix=SUFFIX append SUFFIX to installed program names
  2510. --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  2511. System types:
  2512. --build=BUILD configure for building on BUILD [guessed]
  2513. --host=HOST cross-compile to build programs to run on HOST [BUILD]
  2514. --target=TARGET configure for building compilers for TARGET [HOST]
  2515. _ACEOF
  2516. fi
  2517. if test -n "$ac_init_help"; then
  2518. case $ac_init_help in
  2519. short | recursive ) echo "Configuration of libgnu UNUSED-VERSION:";;
  2520. esac
  2521. cat <<\_ACEOF
  2522. Optional Features:
  2523. --disable-option-checking ignore unrecognized --enable/--with options
  2524. --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
  2525. --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
  2526. --enable-maintainer-mode
  2527. enable make rules and dependencies not useful (and
  2528. sometimes confusing) to the casual installer
  2529. --enable-plugins Enable support for plugins
  2530. --disable-largefile omit support for large files
  2531. --enable-threads={isoc|posix|isoc+posix|windows}
  2532. specify multithreading API
  2533. --disable-threads build without multithread safety
  2534. --enable-cross-guesses={conservative|risky}
  2535. specify policy for cross-compilation guesses
  2536. --enable-dependency-tracking
  2537. do not reject slow dependency extractors
  2538. --disable-dependency-tracking
  2539. speeds up one-time build
  2540. --enable-silent-rules less verbose build output (undo: "make V=1")
  2541. --disable-silent-rules verbose build output (undo: "make V=0")
  2542. Some influential environment variables:
  2543. CC C compiler command
  2544. CFLAGS C compiler flags
  2545. LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
  2546. nonstandard directory <lib dir>
  2547. LIBS libraries to pass to the linker, e.g. -l<library>
  2548. CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
  2549. you have headers in a nonstandard directory <include dir>
  2550. CPP C preprocessor
  2551. Use these variables to override the choices made by `configure' or to help
  2552. it to find libraries and programs with nonstandard names/locations.
  2553. Report bugs to the package provider.
  2554. _ACEOF
  2555. ac_status=$?
  2556. fi
  2557. if test "$ac_init_help" = "recursive"; then
  2558. # If there are subdirs, report their specific --help.
  2559. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
  2560. test -d "$ac_dir" ||
  2561. { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
  2562. continue
  2563. ac_builddir=.
  2564. case "$ac_dir" in
  2565. .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
  2566. *)
  2567. ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
  2568. # A ".." for each directory in $ac_dir_suffix.
  2569. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
  2570. case $ac_top_builddir_sub in
  2571. "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  2572. *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  2573. esac ;;
  2574. esac
  2575. ac_abs_top_builddir=$ac_pwd
  2576. ac_abs_builddir=$ac_pwd$ac_dir_suffix
  2577. # for backward compatibility:
  2578. ac_top_builddir=$ac_top_build_prefix
  2579. case $srcdir in
  2580. .) # We are building in place.
  2581. ac_srcdir=.
  2582. ac_top_srcdir=$ac_top_builddir_sub
  2583. ac_abs_top_srcdir=$ac_pwd ;;
  2584. [\\/]* | ?:[\\/]* ) # Absolute name.
  2585. ac_srcdir=$srcdir$ac_dir_suffix;
  2586. ac_top_srcdir=$srcdir
  2587. ac_abs_top_srcdir=$srcdir ;;
  2588. *) # Relative name.
  2589. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
  2590. ac_top_srcdir=$ac_top_build_prefix$srcdir
  2591. ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
  2592. esac
  2593. ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
  2594. cd "$ac_dir" || { ac_status=$?; continue; }
  2595. # Check for guested configure.
  2596. if test -f "$ac_srcdir/configure.gnu"; then
  2597. echo &&
  2598. $SHELL "$ac_srcdir/configure.gnu" --help=recursive
  2599. elif test -f "$ac_srcdir/configure"; then
  2600. echo &&
  2601. $SHELL "$ac_srcdir/configure" --help=recursive
  2602. else
  2603. $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
  2604. fi || ac_status=$?
  2605. cd "$ac_pwd" || { ac_status=$?; break; }
  2606. done
  2607. fi
  2608. test -n "$ac_init_help" && exit $ac_status
  2609. if $ac_init_version; then
  2610. cat <<\_ACEOF
  2611. libgnu configure UNUSED-VERSION
  2612. generated by GNU Autoconf 2.69
  2613. Copyright (C) 2012 Free Software Foundation, Inc.
  2614. This configure script is free software; the Free Software Foundation
  2615. gives unlimited permission to copy, distribute and modify it.
  2616. _ACEOF
  2617. exit
  2618. fi
  2619. ## ------------------------ ##
  2620. ## Autoconf initialization. ##
  2621. ## ------------------------ ##
  2622. # ac_fn_c_try_compile LINENO
  2623. # --------------------------
  2624. # Try to compile conftest.$ac_ext, and return whether this succeeded.
  2625. ac_fn_c_try_compile ()
  2626. {
  2627. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2628. rm -f conftest.$ac_objext
  2629. if { { ac_try="$ac_compile"
  2630. case "(($ac_try" in
  2631. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  2632. *) ac_try_echo=$ac_try;;
  2633. esac
  2634. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  2635. $as_echo "$ac_try_echo"; } >&5
  2636. (eval "$ac_compile") 2>conftest.err
  2637. ac_status=$?
  2638. if test -s conftest.err; then
  2639. grep -v '^ *+' conftest.err >conftest.er1
  2640. cat conftest.er1 >&5
  2641. mv -f conftest.er1 conftest.err
  2642. fi
  2643. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2644. test $ac_status = 0; } && {
  2645. test -z "$ac_c_werror_flag" ||
  2646. test ! -s conftest.err
  2647. } && test -s conftest.$ac_objext; then :
  2648. ac_retval=0
  2649. else
  2650. $as_echo "$as_me: failed program was:" >&5
  2651. sed 's/^/| /' conftest.$ac_ext >&5
  2652. ac_retval=1
  2653. fi
  2654. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2655. as_fn_set_status $ac_retval
  2656. } # ac_fn_c_try_compile
  2657. # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
  2658. # -------------------------------------------------------
  2659. # Tests whether HEADER exists and can be compiled using the include files in
  2660. # INCLUDES, setting the cache variable VAR accordingly.
  2661. ac_fn_c_check_header_compile ()
  2662. {
  2663. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2664. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
  2665. $as_echo_n "checking for $2... " >&6; }
  2666. if eval \${$3+:} false; then :
  2667. $as_echo_n "(cached) " >&6
  2668. else
  2669. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2670. /* end confdefs.h. */
  2671. $4
  2672. #include <$2>
  2673. _ACEOF
  2674. if ac_fn_c_try_compile "$LINENO"; then :
  2675. eval "$3=yes"
  2676. else
  2677. eval "$3=no"
  2678. fi
  2679. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  2680. fi
  2681. eval ac_res=\$$3
  2682. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  2683. $as_echo "$ac_res" >&6; }
  2684. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2685. } # ac_fn_c_check_header_compile
  2686. # ac_fn_c_try_cpp LINENO
  2687. # ----------------------
  2688. # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
  2689. ac_fn_c_try_cpp ()
  2690. {
  2691. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2692. if { { ac_try="$ac_cpp conftest.$ac_ext"
  2693. case "(($ac_try" in
  2694. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  2695. *) ac_try_echo=$ac_try;;
  2696. esac
  2697. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  2698. $as_echo "$ac_try_echo"; } >&5
  2699. (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
  2700. ac_status=$?
  2701. if test -s conftest.err; then
  2702. grep -v '^ *+' conftest.err >conftest.er1
  2703. cat conftest.er1 >&5
  2704. mv -f conftest.er1 conftest.err
  2705. fi
  2706. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2707. test $ac_status = 0; } > conftest.i && {
  2708. test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
  2709. test ! -s conftest.err
  2710. }; then :
  2711. ac_retval=0
  2712. else
  2713. $as_echo "$as_me: failed program was:" >&5
  2714. sed 's/^/| /' conftest.$ac_ext >&5
  2715. ac_retval=1
  2716. fi
  2717. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2718. as_fn_set_status $ac_retval
  2719. } # ac_fn_c_try_cpp
  2720. # ac_fn_c_try_run LINENO
  2721. # ----------------------
  2722. # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
  2723. # that executables *can* be run.
  2724. ac_fn_c_try_run ()
  2725. {
  2726. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2727. if { { ac_try="$ac_link"
  2728. case "(($ac_try" in
  2729. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  2730. *) ac_try_echo=$ac_try;;
  2731. esac
  2732. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  2733. $as_echo "$ac_try_echo"; } >&5
  2734. (eval "$ac_link") 2>&5
  2735. ac_status=$?
  2736. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2737. test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
  2738. { { case "(($ac_try" in
  2739. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  2740. *) ac_try_echo=$ac_try;;
  2741. esac
  2742. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  2743. $as_echo "$ac_try_echo"; } >&5
  2744. (eval "$ac_try") 2>&5
  2745. ac_status=$?
  2746. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2747. test $ac_status = 0; }; }; then :
  2748. ac_retval=0
  2749. else
  2750. $as_echo "$as_me: program exited with status $ac_status" >&5
  2751. $as_echo "$as_me: failed program was:" >&5
  2752. sed 's/^/| /' conftest.$ac_ext >&5
  2753. ac_retval=$ac_status
  2754. fi
  2755. rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  2756. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2757. as_fn_set_status $ac_retval
  2758. } # ac_fn_c_try_run
  2759. # ac_fn_c_try_link LINENO
  2760. # -----------------------
  2761. # Try to link conftest.$ac_ext, and return whether this succeeded.
  2762. ac_fn_c_try_link ()
  2763. {
  2764. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2765. rm -f conftest.$ac_objext conftest$ac_exeext
  2766. if { { ac_try="$ac_link"
  2767. case "(($ac_try" in
  2768. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  2769. *) ac_try_echo=$ac_try;;
  2770. esac
  2771. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  2772. $as_echo "$ac_try_echo"; } >&5
  2773. (eval "$ac_link") 2>conftest.err
  2774. ac_status=$?
  2775. if test -s conftest.err; then
  2776. grep -v '^ *+' conftest.err >conftest.er1
  2777. cat conftest.er1 >&5
  2778. mv -f conftest.er1 conftest.err
  2779. fi
  2780. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2781. test $ac_status = 0; } && {
  2782. test -z "$ac_c_werror_flag" ||
  2783. test ! -s conftest.err
  2784. } && test -s conftest$ac_exeext && {
  2785. test "$cross_compiling" = yes ||
  2786. test -x conftest$ac_exeext
  2787. }; then :
  2788. ac_retval=0
  2789. else
  2790. $as_echo "$as_me: failed program was:" >&5
  2791. sed 's/^/| /' conftest.$ac_ext >&5
  2792. ac_retval=1
  2793. fi
  2794. # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
  2795. # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
  2796. # interfere with the next link command; also delete a directory that is
  2797. # left behind by Apple's compiler. We do this before executing the actions.
  2798. rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  2799. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2800. as_fn_set_status $ac_retval
  2801. } # ac_fn_c_try_link
  2802. # ac_fn_c_check_func LINENO FUNC VAR
  2803. # ----------------------------------
  2804. # Tests whether FUNC exists, setting the cache variable VAR accordingly
  2805. ac_fn_c_check_func ()
  2806. {
  2807. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2808. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
  2809. $as_echo_n "checking for $2... " >&6; }
  2810. if eval \${$3+:} false; then :
  2811. $as_echo_n "(cached) " >&6
  2812. else
  2813. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2814. /* end confdefs.h. */
  2815. /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
  2816. For example, HP-UX 11i <limits.h> declares gettimeofday. */
  2817. #define $2 innocuous_$2
  2818. /* System header to define __stub macros and hopefully few prototypes,
  2819. which can conflict with char $2 (); below.
  2820. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  2821. <limits.h> exists even on freestanding compilers. */
  2822. #ifdef __STDC__
  2823. # include <limits.h>
  2824. #else
  2825. # include <assert.h>
  2826. #endif
  2827. #undef $2
  2828. /* Override any GCC internal prototype to avoid an error.
  2829. Use char because int might match the return type of a GCC
  2830. builtin and then its argument prototype would still apply. */
  2831. #ifdef __cplusplus
  2832. extern "C"
  2833. #endif
  2834. char $2 ();
  2835. /* The GNU C library defines this for functions which it implements
  2836. to always fail with ENOSYS. Some functions are actually named
  2837. something starting with __ and the normal name is an alias. */
  2838. #if defined __stub_$2 || defined __stub___$2
  2839. choke me
  2840. #endif
  2841. int
  2842. main ()
  2843. {
  2844. return $2 ();
  2845. ;
  2846. return 0;
  2847. }
  2848. _ACEOF
  2849. if ac_fn_c_try_link "$LINENO"; then :
  2850. eval "$3=yes"
  2851. else
  2852. eval "$3=no"
  2853. fi
  2854. rm -f core conftest.err conftest.$ac_objext \
  2855. conftest$ac_exeext conftest.$ac_ext
  2856. fi
  2857. eval ac_res=\$$3
  2858. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  2859. $as_echo "$ac_res" >&6; }
  2860. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2861. } # ac_fn_c_check_func
  2862. # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
  2863. # -------------------------------------------------------
  2864. # Tests whether HEADER exists, giving a warning if it cannot be compiled using
  2865. # the include files in INCLUDES and setting the cache variable VAR
  2866. # accordingly.
  2867. ac_fn_c_check_header_mongrel ()
  2868. {
  2869. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2870. if eval \${$3+:} false; then :
  2871. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
  2872. $as_echo_n "checking for $2... " >&6; }
  2873. if eval \${$3+:} false; then :
  2874. $as_echo_n "(cached) " >&6
  2875. fi
  2876. eval ac_res=\$$3
  2877. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  2878. $as_echo "$ac_res" >&6; }
  2879. else
  2880. # Is the header compilable?
  2881. { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
  2882. $as_echo_n "checking $2 usability... " >&6; }
  2883. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2884. /* end confdefs.h. */
  2885. $4
  2886. #include <$2>
  2887. _ACEOF
  2888. if ac_fn_c_try_compile "$LINENO"; then :
  2889. ac_header_compiler=yes
  2890. else
  2891. ac_header_compiler=no
  2892. fi
  2893. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  2894. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
  2895. $as_echo "$ac_header_compiler" >&6; }
  2896. # Is the header present?
  2897. { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
  2898. $as_echo_n "checking $2 presence... " >&6; }
  2899. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2900. /* end confdefs.h. */
  2901. #include <$2>
  2902. _ACEOF
  2903. if ac_fn_c_try_cpp "$LINENO"; then :
  2904. ac_header_preproc=yes
  2905. else
  2906. ac_header_preproc=no
  2907. fi
  2908. rm -f conftest.err conftest.i conftest.$ac_ext
  2909. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
  2910. $as_echo "$ac_header_preproc" >&6; }
  2911. # So? What about this header?
  2912. case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
  2913. yes:no: )
  2914. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
  2915. $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
  2916. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
  2917. $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
  2918. ;;
  2919. no:yes:* )
  2920. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
  2921. $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
  2922. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
  2923. $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
  2924. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
  2925. $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
  2926. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
  2927. $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
  2928. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
  2929. $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
  2930. ;;
  2931. esac
  2932. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
  2933. $as_echo_n "checking for $2... " >&6; }
  2934. if eval \${$3+:} false; then :
  2935. $as_echo_n "(cached) " >&6
  2936. else
  2937. eval "$3=\$ac_header_compiler"
  2938. fi
  2939. eval ac_res=\$$3
  2940. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  2941. $as_echo "$ac_res" >&6; }
  2942. fi
  2943. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2944. } # ac_fn_c_check_header_mongrel
  2945. # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
  2946. # -------------------------------------------
  2947. # Tests whether TYPE exists after having included INCLUDES, setting cache
  2948. # variable VAR accordingly.
  2949. ac_fn_c_check_type ()
  2950. {
  2951. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  2952. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
  2953. $as_echo_n "checking for $2... " >&6; }
  2954. if eval \${$3+:} false; then :
  2955. $as_echo_n "(cached) " >&6
  2956. else
  2957. eval "$3=no"
  2958. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2959. /* end confdefs.h. */
  2960. $4
  2961. int
  2962. main ()
  2963. {
  2964. if (sizeof ($2))
  2965. return 0;
  2966. ;
  2967. return 0;
  2968. }
  2969. _ACEOF
  2970. if ac_fn_c_try_compile "$LINENO"; then :
  2971. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  2972. /* end confdefs.h. */
  2973. $4
  2974. int
  2975. main ()
  2976. {
  2977. if (sizeof (($2)))
  2978. return 0;
  2979. ;
  2980. return 0;
  2981. }
  2982. _ACEOF
  2983. if ac_fn_c_try_compile "$LINENO"; then :
  2984. else
  2985. eval "$3=yes"
  2986. fi
  2987. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  2988. fi
  2989. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  2990. fi
  2991. eval ac_res=\$$3
  2992. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  2993. $as_echo "$ac_res" >&6; }
  2994. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2995. } # ac_fn_c_check_type
  2996. # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
  2997. # ----------------------------------------------------
  2998. # Tries to find if the field MEMBER exists in type AGGR, after including
  2999. # INCLUDES, setting cache variable VAR accordingly.
  3000. ac_fn_c_check_member ()
  3001. {
  3002. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  3003. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
  3004. $as_echo_n "checking for $2.$3... " >&6; }
  3005. if eval \${$4+:} false; then :
  3006. $as_echo_n "(cached) " >&6
  3007. else
  3008. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  3009. /* end confdefs.h. */
  3010. $5
  3011. int
  3012. main ()
  3013. {
  3014. static $2 ac_aggr;
  3015. if (ac_aggr.$3)
  3016. return 0;
  3017. ;
  3018. return 0;
  3019. }
  3020. _ACEOF
  3021. if ac_fn_c_try_compile "$LINENO"; then :
  3022. eval "$4=yes"
  3023. else
  3024. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  3025. /* end confdefs.h. */
  3026. $5
  3027. int
  3028. main ()
  3029. {
  3030. static $2 ac_aggr;
  3031. if (sizeof ac_aggr.$3)
  3032. return 0;
  3033. ;
  3034. return 0;
  3035. }
  3036. _ACEOF
  3037. if ac_fn_c_try_compile "$LINENO"; then :
  3038. eval "$4=yes"
  3039. else
  3040. eval "$4=no"
  3041. fi
  3042. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  3043. fi
  3044. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  3045. fi
  3046. eval ac_res=\$$4
  3047. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  3048. $as_echo "$ac_res" >&6; }
  3049. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  3050. } # ac_fn_c_check_member
  3051. # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
  3052. # ---------------------------------------------
  3053. # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
  3054. # accordingly.
  3055. ac_fn_c_check_decl ()
  3056. {
  3057. ac_save_ac_compile="$ac_compile"
  3058. if test -n "$ac_compile_for_check_decl"; then
  3059. ac_compile="$ac_compile_for_check_decl"
  3060. fi
  3061. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  3062. as_decl_name=`echo $2|sed 's/ *(.*//'`
  3063. as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
  3064. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
  3065. $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
  3066. if eval \${$3+:} false; then :
  3067. $as_echo_n "(cached) " >&6
  3068. else
  3069. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  3070. /* end confdefs.h. */
  3071. $4
  3072. int
  3073. main ()
  3074. {
  3075. #ifndef $as_decl_name
  3076. #ifdef __cplusplus
  3077. (void) $as_decl_use;
  3078. #else
  3079. (void) $as_decl_name;
  3080. #endif
  3081. #endif
  3082. ;
  3083. return 0;
  3084. }
  3085. _ACEOF
  3086. if ac_fn_c_try_compile "$LINENO"; then :
  3087. eval "$3=yes"
  3088. else
  3089. eval "$3=no"
  3090. fi
  3091. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  3092. fi
  3093. eval ac_res=\$$3
  3094. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  3095. $as_echo "$ac_res" >&6; }
  3096. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  3097. ac_compile="$ac_save_ac_compile"
  3098. } # ac_fn_c_check_decl
  3099. # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
  3100. # --------------------------------------------
  3101. # Tries to find the compile-time value of EXPR in a program that includes
  3102. # INCLUDES, setting VAR accordingly. Returns whether the value could be
  3103. # computed
  3104. ac_fn_c_compute_int ()
  3105. {
  3106. as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  3107. if test "$cross_compiling" = yes; then
  3108. # Depending upon the size, compute the lo and hi bounds.
  3109. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  3110. /* end confdefs.h. */
  3111. $4
  3112. int
  3113. main ()
  3114. {
  3115. static int test_array [1 - 2 * !(($2) >= 0)];
  3116. test_array [0] = 0;
  3117. return test_array [0];
  3118. ;
  3119. return 0;
  3120. }
  3121. _ACEOF
  3122. if ac_fn_c_try_compile "$LINENO"; then :
  3123. ac_lo=0 ac_mid=0
  3124. while :; do
  3125. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  3126. /* end confdefs.h. */
  3127. $4
  3128. int
  3129. main ()
  3130. {
  3131. static int test_array [1 - 2 * !(($2) <= $ac_mid)];
  3132. test_array [0] = 0;
  3133. return test_array [0];
  3134. ;
  3135. return 0;
  3136. }
  3137. _ACEOF
  3138. if ac_fn_c_try_compile "$LINENO"; then :
  3139. ac_hi=$ac_mid; break
  3140. else
  3141. as_fn_arith $ac_mid + 1 && ac_lo=$as_val
  3142. if test $ac_lo -le $ac_mid; then
  3143. ac_lo= ac_hi=
  3144. break
  3145. fi
  3146. as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
  3147. fi
  3148. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  3149. done
  3150. else
  3151. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  3152. /* end confdefs.h. */
  3153. $4
  3154. int
  3155. main ()
  3156. {
  3157. static int test_array [1 - 2 * !(($2) < 0)];
  3158. test_array [0] = 0;
  3159. return test_array [0];
  3160. ;
  3161. return 0;
  3162. }
  3163. _ACEOF
  3164. if ac_fn_c_try_compile "$LINENO"; then :
  3165. ac_hi=-1 ac_mid=-1
  3166. while :; do
  3167. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  3168. /* end confdefs.h. */
  3169. $4
  3170. int
  3171. main ()
  3172. {
  3173. static int test_array [1 - 2 * !(($2) >= $ac_mid)];
  3174. test_array [0] = 0;
  3175. return test_array [0];
  3176. ;
  3177. return 0;
  3178. }
  3179. _ACEOF
  3180. if ac_fn_c_try_compile "$LINENO"; then :
  3181. ac_lo=$ac_mid; break
  3182. else
  3183. as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
  3184. if test $ac_mid -le $ac_hi; then
  3185. ac_lo= ac_hi=
  3186. break
  3187. fi
  3188. as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
  3189. fi
  3190. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  3191. done
  3192. else
  3193. ac_lo= ac_hi=
  3194. fi
  3195. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  3196. fi
  3197. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  3198. # Binary search between lo and hi bounds.
  3199. while test "x$ac_lo" != "x$ac_hi"; do
  3200. as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
  3201. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  3202. /* end confdefs.h. */
  3203. $4
  3204. int
  3205. main ()
  3206. {
  3207. static int test_array [1 - 2 * !(($2) <= $ac_mid)];
  3208. test_array [0] = 0;
  3209. return test_array [0];
  3210. ;
  3211. return 0;
  3212. }
  3213. _ACEOF
  3214. if ac_fn_c_try_compile "$LINENO"; then :
  3215. ac_hi=$ac_mid
  3216. else
  3217. as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
  3218. fi
  3219. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  3220. done
  3221. case $ac_lo in #((
  3222. ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
  3223. '') ac_retval=1 ;;
  3224. esac
  3225. else
  3226. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  3227. /* end confdefs.h. */
  3228. $4
  3229. static long int longval () { return $2; }
  3230. static unsigned long int ulongval () { return $2; }
  3231. #include <stdio.h>
  3232. #include <stdlib.h>
  3233. int
  3234. main ()
  3235. {
  3236. FILE *f = fopen ("conftest.val", "w");
  3237. if (! f)
  3238. return 1;
  3239. if (($2) < 0)
  3240. {
  3241. long int i = longval ();
  3242. if (i != ($2))
  3243. return 1;
  3244. fprintf (f, "%ld", i);
  3245. }
  3246. else
  3247. {
  3248. unsigned long int i = ulongval ();
  3249. if (i != ($2))
  3250. return 1;
  3251. fprintf (f, "%lu", i);
  3252. }
  3253. /* Do not output a trailing newline, as this causes \r\n confusion
  3254. on some platforms. */
  3255. return ferror (f) || fclose (f) != 0;
  3256. ;
  3257. return 0;
  3258. }
  3259. _ACEOF
  3260. if ac_fn_c_try_run "$LINENO"; then :
  3261. echo >>conftest.val; read $3 <conftest.val; ac_retval=0
  3262. else
  3263. ac_retval=1
  3264. fi
  3265. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  3266. conftest.$ac_objext conftest.beam conftest.$ac_ext
  3267. rm -f conftest.val
  3268. fi
  3269. eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  3270. as_fn_set_status $ac_retval
  3271. } # ac_fn_c_compute_int
  3272. cat >config.log <<_ACEOF
  3273. This file contains any messages produced by compilers while
  3274. running configure, to aid debugging if configure makes a mistake.
  3275. It was created by libgnu $as_me UNUSED-VERSION, which was
  3276. generated by GNU Autoconf 2.69. Invocation command line was
  3277. $ $0 $@
  3278. _ACEOF
  3279. exec 5>>config.log
  3280. {
  3281. cat <<_ASUNAME
  3282. ## --------- ##
  3283. ## Platform. ##
  3284. ## --------- ##
  3285. hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
  3286. uname -m = `(uname -m) 2>/dev/null || echo unknown`
  3287. uname -r = `(uname -r) 2>/dev/null || echo unknown`
  3288. uname -s = `(uname -s) 2>/dev/null || echo unknown`
  3289. uname -v = `(uname -v) 2>/dev/null || echo unknown`
  3290. /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
  3291. /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
  3292. /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
  3293. /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
  3294. /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
  3295. /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
  3296. /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
  3297. /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
  3298. /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
  3299. _ASUNAME
  3300. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3301. for as_dir in $PATH
  3302. do
  3303. IFS=$as_save_IFS
  3304. test -z "$as_dir" && as_dir=.
  3305. $as_echo "PATH: $as_dir"
  3306. done
  3307. IFS=$as_save_IFS
  3308. } >&5
  3309. cat >&5 <<_ACEOF
  3310. ## ----------- ##
  3311. ## Core tests. ##
  3312. ## ----------- ##
  3313. _ACEOF
  3314. # Keep a trace of the command line.
  3315. # Strip out --no-create and --no-recursion so they do not pile up.
  3316. # Strip out --silent because we don't want to record it for future runs.
  3317. # Also quote any args containing shell meta-characters.
  3318. # Make two passes to allow for proper duplicate-argument suppression.
  3319. ac_configure_args=
  3320. ac_configure_args0=
  3321. ac_configure_args1=
  3322. ac_must_keep_next=false
  3323. for ac_pass in 1 2
  3324. do
  3325. for ac_arg
  3326. do
  3327. case $ac_arg in
  3328. -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
  3329. -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  3330. | -silent | --silent | --silen | --sile | --sil)
  3331. continue ;;
  3332. *\'*)
  3333. ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
  3334. esac
  3335. case $ac_pass in
  3336. 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
  3337. 2)
  3338. as_fn_append ac_configure_args1 " '$ac_arg'"
  3339. if test $ac_must_keep_next = true; then
  3340. ac_must_keep_next=false # Got value, back to normal.
  3341. else
  3342. case $ac_arg in
  3343. *=* | --config-cache | -C | -disable-* | --disable-* \
  3344. | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
  3345. | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
  3346. | -with-* | --with-* | -without-* | --without-* | --x)
  3347. case "$ac_configure_args0 " in
  3348. "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
  3349. esac
  3350. ;;
  3351. -* ) ac_must_keep_next=true ;;
  3352. esac
  3353. fi
  3354. as_fn_append ac_configure_args " '$ac_arg'"
  3355. ;;
  3356. esac
  3357. done
  3358. done
  3359. { ac_configure_args0=; unset ac_configure_args0;}
  3360. { ac_configure_args1=; unset ac_configure_args1;}
  3361. # When interrupted or exit'd, cleanup temporary files, and complete
  3362. # config.log. We remove comments because anyway the quotes in there
  3363. # would cause problems or look ugly.
  3364. # WARNING: Use '\'' to represent an apostrophe within the trap.
  3365. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
  3366. trap 'exit_status=$?
  3367. # Save into config.log some information that might help in debugging.
  3368. {
  3369. echo
  3370. $as_echo "## ---------------- ##
  3371. ## Cache variables. ##
  3372. ## ---------------- ##"
  3373. echo
  3374. # The following way of writing the cache mishandles newlines in values,
  3375. (
  3376. for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
  3377. eval ac_val=\$$ac_var
  3378. case $ac_val in #(
  3379. *${as_nl}*)
  3380. case $ac_var in #(
  3381. *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
  3382. $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
  3383. esac
  3384. case $ac_var in #(
  3385. _ | IFS | as_nl) ;; #(
  3386. BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
  3387. *) { eval $ac_var=; unset $ac_var;} ;;
  3388. esac ;;
  3389. esac
  3390. done
  3391. (set) 2>&1 |
  3392. case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
  3393. *${as_nl}ac_space=\ *)
  3394. sed -n \
  3395. "s/'\''/'\''\\\\'\'''\''/g;
  3396. s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
  3397. ;; #(
  3398. *)
  3399. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
  3400. ;;
  3401. esac |
  3402. sort
  3403. )
  3404. echo
  3405. $as_echo "## ----------------- ##
  3406. ## Output variables. ##
  3407. ## ----------------- ##"
  3408. echo
  3409. for ac_var in $ac_subst_vars
  3410. do
  3411. eval ac_val=\$$ac_var
  3412. case $ac_val in
  3413. *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
  3414. esac
  3415. $as_echo "$ac_var='\''$ac_val'\''"
  3416. done | sort
  3417. echo
  3418. if test -n "$ac_subst_files"; then
  3419. $as_echo "## ------------------- ##
  3420. ## File substitutions. ##
  3421. ## ------------------- ##"
  3422. echo
  3423. for ac_var in $ac_subst_files
  3424. do
  3425. eval ac_val=\$$ac_var
  3426. case $ac_val in
  3427. *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
  3428. esac
  3429. $as_echo "$ac_var='\''$ac_val'\''"
  3430. done | sort
  3431. echo
  3432. fi
  3433. if test -s confdefs.h; then
  3434. $as_echo "## ----------- ##
  3435. ## confdefs.h. ##
  3436. ## ----------- ##"
  3437. echo
  3438. cat confdefs.h
  3439. echo
  3440. fi
  3441. test "$ac_signal" != 0 &&
  3442. $as_echo "$as_me: caught signal $ac_signal"
  3443. $as_echo "$as_me: exit $exit_status"
  3444. } >&5
  3445. rm -f core *.core core.conftest.* &&
  3446. rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
  3447. exit $exit_status
  3448. ' 0
  3449. for ac_signal in 1 2 13 15; do
  3450. trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
  3451. done
  3452. ac_signal=0
  3453. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  3454. rm -f -r conftest* confdefs.h
  3455. $as_echo "/* confdefs.h */" > confdefs.h
  3456. # Predefined preprocessor variables.
  3457. cat >>confdefs.h <<_ACEOF
  3458. #define PACKAGE_NAME "$PACKAGE_NAME"
  3459. _ACEOF
  3460. cat >>confdefs.h <<_ACEOF
  3461. #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
  3462. _ACEOF
  3463. cat >>confdefs.h <<_ACEOF
  3464. #define PACKAGE_VERSION "$PACKAGE_VERSION"
  3465. _ACEOF
  3466. cat >>confdefs.h <<_ACEOF
  3467. #define PACKAGE_STRING "$PACKAGE_STRING"
  3468. _ACEOF
  3469. cat >>confdefs.h <<_ACEOF
  3470. #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
  3471. _ACEOF
  3472. cat >>confdefs.h <<_ACEOF
  3473. #define PACKAGE_URL "$PACKAGE_URL"
  3474. _ACEOF
  3475. # Let the site file select an alternate cache file if it wants to.
  3476. # Prefer an explicitly selected file to automatically selected ones.
  3477. ac_site_file1=NONE
  3478. ac_site_file2=NONE
  3479. if test -n "$CONFIG_SITE"; then
  3480. # We do not want a PATH search for config.site.
  3481. case $CONFIG_SITE in #((
  3482. -*) ac_site_file1=./$CONFIG_SITE;;
  3483. */*) ac_site_file1=$CONFIG_SITE;;
  3484. *) ac_site_file1=./$CONFIG_SITE;;
  3485. esac
  3486. elif test "x$prefix" != xNONE; then
  3487. ac_site_file1=$prefix/share/config.site
  3488. ac_site_file2=$prefix/etc/config.site
  3489. else
  3490. ac_site_file1=$ac_default_prefix/share/config.site
  3491. ac_site_file2=$ac_default_prefix/etc/config.site
  3492. fi
  3493. for ac_site_file in "$ac_site_file1" "$ac_site_file2"
  3494. do
  3495. test "x$ac_site_file" = xNONE && continue
  3496. if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
  3497. { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
  3498. $as_echo "$as_me: loading site script $ac_site_file" >&6;}
  3499. sed 's/^/| /' "$ac_site_file" >&5
  3500. . "$ac_site_file" \
  3501. || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  3502. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  3503. as_fn_error $? "failed to load site script $ac_site_file
  3504. See \`config.log' for more details" "$LINENO" 5; }
  3505. fi
  3506. done
  3507. if test -r "$cache_file"; then
  3508. # Some versions of bash will fail to source /dev/null (special files
  3509. # actually), so we avoid doing that. DJGPP emulates it as a regular file.
  3510. if test /dev/null != "$cache_file" && test -f "$cache_file"; then
  3511. { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
  3512. $as_echo "$as_me: loading cache $cache_file" >&6;}
  3513. case $cache_file in
  3514. [\\/]* | ?:[\\/]* ) . "$cache_file";;
  3515. *) . "./$cache_file";;
  3516. esac
  3517. fi
  3518. else
  3519. { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
  3520. $as_echo "$as_me: creating cache $cache_file" >&6;}
  3521. >$cache_file
  3522. fi
  3523. as_fn_append ac_header_list " wchar.h"
  3524. as_fn_append ac_header_list " minix/config.h"
  3525. as_fn_append ac_header_list " sys/socket.h"
  3526. as_fn_append ac_header_list " arpa/inet.h"
  3527. as_fn_append ac_header_list " features.h"
  3528. as_fn_append ac_func_list " btowc"
  3529. as_fn_append ac_func_list " canonicalize_file_name"
  3530. as_fn_append ac_func_list " faccessat"
  3531. as_fn_append ac_func_list " realpath"
  3532. as_fn_append ac_header_list " sys/param.h"
  3533. as_fn_append ac_header_list " unistd.h"
  3534. as_fn_append ac_func_list " chown"
  3535. as_fn_append ac_func_list " fchown"
  3536. as_fn_append ac_func_list " _set_invalid_parameter_handler"
  3537. as_fn_append ac_func_list " fchdir"
  3538. as_fn_append ac_header_list " dirent.h"
  3539. as_fn_append ac_func_list " fcntl"
  3540. as_fn_append ac_func_list " symlink"
  3541. as_fn_append ac_func_list " fdopendir"
  3542. as_fn_append ac_func_list " mempcpy"
  3543. as_fn_append ac_header_list " fnmatch.h"
  3544. as_fn_append ac_func_list " fnmatch"
  3545. as_fn_append ac_func_list " mbsrtowcs"
  3546. gl_fnmatch_required=GNU
  3547. as_fn_append ac_header_list " sys/stat.h"
  3548. as_fn_append ac_func_list " fstatat"
  3549. as_fn_append ac_func_list " getdelim"
  3550. as_fn_append ac_func_list " getdtablesize"
  3551. as_fn_append ac_func_list " getlogin_r"
  3552. as_fn_append ac_func_list " getprogname"
  3553. as_fn_append ac_func_list " getexecname"
  3554. as_fn_append ac_func_list " getrandom"
  3555. as_fn_append ac_header_list " sys/time.h"
  3556. as_fn_append ac_func_list " gettimeofday"
  3557. as_fn_append ac_header_list " glob.h"
  3558. as_fn_append ac_func_list " glob"
  3559. as_fn_append ac_func_list " glob_pattern_p"
  3560. as_fn_append ac_func_list " getpwnam_r"
  3561. as_fn_append ac_header_list " threads.h"
  3562. as_fn_append ac_header_list " netdb.h"
  3563. as_fn_append ac_header_list " netinet/in.h"
  3564. as_fn_append ac_header_list " limits.h"
  3565. as_fn_append ac_header_list " inttypes.h"
  3566. as_fn_append ac_header_list " sys/types.h"
  3567. as_fn_append ac_header_list " stdint.h"
  3568. as_fn_append ac_func_list " isblank"
  3569. as_fn_append ac_header_list " xlocale.h"
  3570. as_fn_append ac_func_list " lstat"
  3571. as_fn_append ac_header_list " math.h"
  3572. as_fn_append ac_func_list " mbsinit"
  3573. as_fn_append ac_func_list " mbrtowc"
  3574. as_fn_append ac_header_list " sys/mman.h"
  3575. as_fn_append ac_func_list " mprotect"
  3576. as_fn_append ac_func_list " mkostemp"
  3577. as_fn_append ac_func_list " openat"
  3578. as_fn_append ac_func_list " pipe"
  3579. as_fn_append ac_func_list " readlink"
  3580. as_fn_append ac_func_list " link"
  3581. as_fn_append ac_header_list " sys/select.h"
  3582. as_fn_append ac_func_list " setenv"
  3583. as_fn_append ac_func_list " strerror_r"
  3584. as_fn_append ac_func_list " __xpg_strerror_r"
  3585. as_fn_append ac_func_list " catgets"
  3586. as_fn_append ac_func_list " snprintf"
  3587. as_fn_append ac_header_list " strings.h"
  3588. as_fn_append ac_header_list " sys/random.h"
  3589. as_fn_append ac_header_list " sys/uio.h"
  3590. as_fn_append ac_header_list " sys/wait.h"
  3591. as_fn_append ac_func_list " localtime_r"
  3592. as_fn_append ac_header_list " crtdefs.h"
  3593. as_fn_append ac_func_list " iswcntrl"
  3594. as_fn_append ac_header_list " wctype.h"
  3595. as_fn_append ac_func_list " wmempcpy"
  3596. # Check that the precious variables saved in the cache have kept the same
  3597. # value.
  3598. ac_cache_corrupted=false
  3599. for ac_var in $ac_precious_vars; do
  3600. eval ac_old_set=\$ac_cv_env_${ac_var}_set
  3601. eval ac_new_set=\$ac_env_${ac_var}_set
  3602. eval ac_old_val=\$ac_cv_env_${ac_var}_value
  3603. eval ac_new_val=\$ac_env_${ac_var}_value
  3604. case $ac_old_set,$ac_new_set in
  3605. set,)
  3606. { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
  3607. $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
  3608. ac_cache_corrupted=: ;;
  3609. ,set)
  3610. { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
  3611. $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
  3612. ac_cache_corrupted=: ;;
  3613. ,);;
  3614. *)
  3615. if test "x$ac_old_val" != "x$ac_new_val"; then
  3616. # differences in whitespace do not lead to failure.
  3617. ac_old_val_w=`echo x $ac_old_val`
  3618. ac_new_val_w=`echo x $ac_new_val`
  3619. if test "$ac_old_val_w" != "$ac_new_val_w"; then
  3620. { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
  3621. $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
  3622. ac_cache_corrupted=:
  3623. else
  3624. { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
  3625. $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
  3626. eval $ac_var=\$ac_old_val
  3627. fi
  3628. { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
  3629. $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
  3630. { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
  3631. $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
  3632. fi;;
  3633. esac
  3634. # Pass precious variables to config.status.
  3635. if test "$ac_new_set" = set; then
  3636. case $ac_new_val in
  3637. *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
  3638. *) ac_arg=$ac_var=$ac_new_val ;;
  3639. esac
  3640. case " $ac_configure_args " in
  3641. *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
  3642. *) as_fn_append ac_configure_args " '$ac_arg'" ;;
  3643. esac
  3644. fi
  3645. done
  3646. if $ac_cache_corrupted; then
  3647. { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  3648. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  3649. { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
  3650. $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
  3651. as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
  3652. fi
  3653. ## -------------------- ##
  3654. ## Main body of script. ##
  3655. ## -------------------- ##
  3656. ac_ext=c
  3657. ac_cpp='$CPP $CPPFLAGS'
  3658. ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  3659. ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  3660. ac_compiler_gnu=$ac_cv_c_compiler_gnu
  3661. ac_config_headers="$ac_config_headers config.h:config.in"
  3662. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
  3663. $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
  3664. # Check whether --enable-maintainer-mode was given.
  3665. if test "${enable_maintainer_mode+set}" = set; then :
  3666. enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
  3667. else
  3668. USE_MAINTAINER_MODE=no
  3669. fi
  3670. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
  3671. $as_echo "$USE_MAINTAINER_MODE" >&6; }
  3672. if test $USE_MAINTAINER_MODE = yes; then
  3673. MAINTAINER_MODE_TRUE=
  3674. MAINTAINER_MODE_FALSE='#'
  3675. else
  3676. MAINTAINER_MODE_TRUE='#'
  3677. MAINTAINER_MODE_FALSE=
  3678. fi
  3679. MAINT=$MAINTAINER_MODE_TRUE
  3680. ac_ext=c
  3681. ac_cpp='$CPP $CPPFLAGS'
  3682. ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  3683. ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  3684. ac_compiler_gnu=$ac_cv_c_compiler_gnu
  3685. if test -n "$ac_tool_prefix"; then
  3686. # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
  3687. set dummy ${ac_tool_prefix}gcc; ac_word=$2
  3688. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  3689. $as_echo_n "checking for $ac_word... " >&6; }
  3690. if ${ac_cv_prog_CC+:} false; then :
  3691. $as_echo_n "(cached) " >&6
  3692. else
  3693. if test -n "$CC"; then
  3694. ac_cv_prog_CC="$CC" # Let the user override the test.
  3695. else
  3696. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3697. for as_dir in $PATH
  3698. do
  3699. IFS=$as_save_IFS
  3700. test -z "$as_dir" && as_dir=.
  3701. for ac_exec_ext in '' $ac_executable_extensions; do
  3702. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  3703. ac_cv_prog_CC="${ac_tool_prefix}gcc"
  3704. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  3705. break 2
  3706. fi
  3707. done
  3708. done
  3709. IFS=$as_save_IFS
  3710. fi
  3711. fi
  3712. CC=$ac_cv_prog_CC
  3713. if test -n "$CC"; then
  3714. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
  3715. $as_echo "$CC" >&6; }
  3716. else
  3717. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  3718. $as_echo "no" >&6; }
  3719. fi
  3720. fi
  3721. if test -z "$ac_cv_prog_CC"; then
  3722. ac_ct_CC=$CC
  3723. # Extract the first word of "gcc", so it can be a program name with args.
  3724. set dummy gcc; ac_word=$2
  3725. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  3726. $as_echo_n "checking for $ac_word... " >&6; }
  3727. if ${ac_cv_prog_ac_ct_CC+:} false; then :
  3728. $as_echo_n "(cached) " >&6
  3729. else
  3730. if test -n "$ac_ct_CC"; then
  3731. ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
  3732. else
  3733. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3734. for as_dir in $PATH
  3735. do
  3736. IFS=$as_save_IFS
  3737. test -z "$as_dir" && as_dir=.
  3738. for ac_exec_ext in '' $ac_executable_extensions; do
  3739. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  3740. ac_cv_prog_ac_ct_CC="gcc"
  3741. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  3742. break 2
  3743. fi
  3744. done
  3745. done
  3746. IFS=$as_save_IFS
  3747. fi
  3748. fi
  3749. ac_ct_CC=$ac_cv_prog_ac_ct_CC
  3750. if test -n "$ac_ct_CC"; then
  3751. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
  3752. $as_echo "$ac_ct_CC" >&6; }
  3753. else
  3754. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  3755. $as_echo "no" >&6; }
  3756. fi
  3757. if test "x$ac_ct_CC" = x; then
  3758. CC=""
  3759. else
  3760. case $cross_compiling:$ac_tool_warned in
  3761. yes:)
  3762. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  3763. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  3764. ac_tool_warned=yes ;;
  3765. esac
  3766. CC=$ac_ct_CC
  3767. fi
  3768. else
  3769. CC="$ac_cv_prog_CC"
  3770. fi
  3771. if test -z "$CC"; then
  3772. if test -n "$ac_tool_prefix"; then
  3773. # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
  3774. set dummy ${ac_tool_prefix}cc; ac_word=$2
  3775. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  3776. $as_echo_n "checking for $ac_word... " >&6; }
  3777. if ${ac_cv_prog_CC+:} false; then :
  3778. $as_echo_n "(cached) " >&6
  3779. else
  3780. if test -n "$CC"; then
  3781. ac_cv_prog_CC="$CC" # Let the user override the test.
  3782. else
  3783. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3784. for as_dir in $PATH
  3785. do
  3786. IFS=$as_save_IFS
  3787. test -z "$as_dir" && as_dir=.
  3788. for ac_exec_ext in '' $ac_executable_extensions; do
  3789. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  3790. ac_cv_prog_CC="${ac_tool_prefix}cc"
  3791. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  3792. break 2
  3793. fi
  3794. done
  3795. done
  3796. IFS=$as_save_IFS
  3797. fi
  3798. fi
  3799. CC=$ac_cv_prog_CC
  3800. if test -n "$CC"; then
  3801. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
  3802. $as_echo "$CC" >&6; }
  3803. else
  3804. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  3805. $as_echo "no" >&6; }
  3806. fi
  3807. fi
  3808. fi
  3809. if test -z "$CC"; then
  3810. # Extract the first word of "cc", so it can be a program name with args.
  3811. set dummy cc; ac_word=$2
  3812. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  3813. $as_echo_n "checking for $ac_word... " >&6; }
  3814. if ${ac_cv_prog_CC+:} false; then :
  3815. $as_echo_n "(cached) " >&6
  3816. else
  3817. if test -n "$CC"; then
  3818. ac_cv_prog_CC="$CC" # Let the user override the test.
  3819. else
  3820. ac_prog_rejected=no
  3821. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3822. for as_dir in $PATH
  3823. do
  3824. IFS=$as_save_IFS
  3825. test -z "$as_dir" && as_dir=.
  3826. for ac_exec_ext in '' $ac_executable_extensions; do
  3827. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  3828. if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
  3829. ac_prog_rejected=yes
  3830. continue
  3831. fi
  3832. ac_cv_prog_CC="cc"
  3833. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  3834. break 2
  3835. fi
  3836. done
  3837. done
  3838. IFS=$as_save_IFS
  3839. if test $ac_prog_rejected = yes; then
  3840. # We found a bogon in the path, so make sure we never use it.
  3841. set dummy $ac_cv_prog_CC
  3842. shift
  3843. if test $# != 0; then
  3844. # We chose a different compiler from the bogus one.
  3845. # However, it has the same basename, so the bogon will be chosen
  3846. # first if we set CC to just the basename; use the full file name.
  3847. shift
  3848. ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
  3849. fi
  3850. fi
  3851. fi
  3852. fi
  3853. CC=$ac_cv_prog_CC
  3854. if test -n "$CC"; then
  3855. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
  3856. $as_echo "$CC" >&6; }
  3857. else
  3858. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  3859. $as_echo "no" >&6; }
  3860. fi
  3861. fi
  3862. if test -z "$CC"; then
  3863. if test -n "$ac_tool_prefix"; then
  3864. for ac_prog in cl.exe
  3865. do
  3866. # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
  3867. set dummy $ac_tool_prefix$ac_prog; ac_word=$2
  3868. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  3869. $as_echo_n "checking for $ac_word... " >&6; }
  3870. if ${ac_cv_prog_CC+:} false; then :
  3871. $as_echo_n "(cached) " >&6
  3872. else
  3873. if test -n "$CC"; then
  3874. ac_cv_prog_CC="$CC" # Let the user override the test.
  3875. else
  3876. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3877. for as_dir in $PATH
  3878. do
  3879. IFS=$as_save_IFS
  3880. test -z "$as_dir" && as_dir=.
  3881. for ac_exec_ext in '' $ac_executable_extensions; do
  3882. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  3883. ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
  3884. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  3885. break 2
  3886. fi
  3887. done
  3888. done
  3889. IFS=$as_save_IFS
  3890. fi
  3891. fi
  3892. CC=$ac_cv_prog_CC
  3893. if test -n "$CC"; then
  3894. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
  3895. $as_echo "$CC" >&6; }
  3896. else
  3897. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  3898. $as_echo "no" >&6; }
  3899. fi
  3900. test -n "$CC" && break
  3901. done
  3902. fi
  3903. if test -z "$CC"; then
  3904. ac_ct_CC=$CC
  3905. for ac_prog in cl.exe
  3906. do
  3907. # Extract the first word of "$ac_prog", so it can be a program name with args.
  3908. set dummy $ac_prog; ac_word=$2
  3909. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  3910. $as_echo_n "checking for $ac_word... " >&6; }
  3911. if ${ac_cv_prog_ac_ct_CC+:} false; then :
  3912. $as_echo_n "(cached) " >&6
  3913. else
  3914. if test -n "$ac_ct_CC"; then
  3915. ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
  3916. else
  3917. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3918. for as_dir in $PATH
  3919. do
  3920. IFS=$as_save_IFS
  3921. test -z "$as_dir" && as_dir=.
  3922. for ac_exec_ext in '' $ac_executable_extensions; do
  3923. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  3924. ac_cv_prog_ac_ct_CC="$ac_prog"
  3925. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  3926. break 2
  3927. fi
  3928. done
  3929. done
  3930. IFS=$as_save_IFS
  3931. fi
  3932. fi
  3933. ac_ct_CC=$ac_cv_prog_ac_ct_CC
  3934. if test -n "$ac_ct_CC"; then
  3935. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
  3936. $as_echo "$ac_ct_CC" >&6; }
  3937. else
  3938. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  3939. $as_echo "no" >&6; }
  3940. fi
  3941. test -n "$ac_ct_CC" && break
  3942. done
  3943. if test "x$ac_ct_CC" = x; then
  3944. CC=""
  3945. else
  3946. case $cross_compiling:$ac_tool_warned in
  3947. yes:)
  3948. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  3949. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  3950. ac_tool_warned=yes ;;
  3951. esac
  3952. CC=$ac_ct_CC
  3953. fi
  3954. fi
  3955. fi
  3956. if test -z "$CC"; then
  3957. if test -n "$ac_tool_prefix"; then
  3958. # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
  3959. set dummy ${ac_tool_prefix}clang; ac_word=$2
  3960. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  3961. $as_echo_n "checking for $ac_word... " >&6; }
  3962. if ${ac_cv_prog_CC+:} false; then :
  3963. $as_echo_n "(cached) " >&6
  3964. else
  3965. if test -n "$CC"; then
  3966. ac_cv_prog_CC="$CC" # Let the user override the test.
  3967. else
  3968. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3969. for as_dir in $PATH
  3970. do
  3971. IFS=$as_save_IFS
  3972. test -z "$as_dir" && as_dir=.
  3973. for ac_exec_ext in '' $ac_executable_extensions; do
  3974. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  3975. ac_cv_prog_CC="${ac_tool_prefix}clang"
  3976. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  3977. break 2
  3978. fi
  3979. done
  3980. done
  3981. IFS=$as_save_IFS
  3982. fi
  3983. fi
  3984. CC=$ac_cv_prog_CC
  3985. if test -n "$CC"; then
  3986. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
  3987. $as_echo "$CC" >&6; }
  3988. else
  3989. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  3990. $as_echo "no" >&6; }
  3991. fi
  3992. fi
  3993. if test -z "$ac_cv_prog_CC"; then
  3994. ac_ct_CC=$CC
  3995. # Extract the first word of "clang", so it can be a program name with args.
  3996. set dummy clang; ac_word=$2
  3997. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  3998. $as_echo_n "checking for $ac_word... " >&6; }
  3999. if ${ac_cv_prog_ac_ct_CC+:} false; then :
  4000. $as_echo_n "(cached) " >&6
  4001. else
  4002. if test -n "$ac_ct_CC"; then
  4003. ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
  4004. else
  4005. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  4006. for as_dir in $PATH
  4007. do
  4008. IFS=$as_save_IFS
  4009. test -z "$as_dir" && as_dir=.
  4010. for ac_exec_ext in '' $ac_executable_extensions; do
  4011. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  4012. ac_cv_prog_ac_ct_CC="clang"
  4013. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  4014. break 2
  4015. fi
  4016. done
  4017. done
  4018. IFS=$as_save_IFS
  4019. fi
  4020. fi
  4021. ac_ct_CC=$ac_cv_prog_ac_ct_CC
  4022. if test -n "$ac_ct_CC"; then
  4023. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
  4024. $as_echo "$ac_ct_CC" >&6; }
  4025. else
  4026. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  4027. $as_echo "no" >&6; }
  4028. fi
  4029. if test "x$ac_ct_CC" = x; then
  4030. CC=""
  4031. else
  4032. case $cross_compiling:$ac_tool_warned in
  4033. yes:)
  4034. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  4035. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  4036. ac_tool_warned=yes ;;
  4037. esac
  4038. CC=$ac_ct_CC
  4039. fi
  4040. else
  4041. CC="$ac_cv_prog_CC"
  4042. fi
  4043. fi
  4044. test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  4045. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  4046. as_fn_error $? "no acceptable C compiler found in \$PATH
  4047. See \`config.log' for more details" "$LINENO" 5; }
  4048. # Provide some information about the compiler.
  4049. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
  4050. set X $ac_compile
  4051. ac_compiler=$2
  4052. for ac_option in --version -v -V -qversion -version; do
  4053. { { ac_try="$ac_compiler $ac_option >&5"
  4054. case "(($ac_try" in
  4055. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  4056. *) ac_try_echo=$ac_try;;
  4057. esac
  4058. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  4059. $as_echo "$ac_try_echo"; } >&5
  4060. (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  4061. ac_status=$?
  4062. if test -s conftest.err; then
  4063. sed '10a\
  4064. ... rest of stderr output deleted ...
  4065. 10q' conftest.err >conftest.er1
  4066. cat conftest.er1 >&5
  4067. fi
  4068. rm -f conftest.er1 conftest.err
  4069. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  4070. test $ac_status = 0; }
  4071. done
  4072. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  4073. /* end confdefs.h. */
  4074. int
  4075. main ()
  4076. {
  4077. ;
  4078. return 0;
  4079. }
  4080. _ACEOF
  4081. ac_clean_files_save=$ac_clean_files
  4082. ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
  4083. # Try to create an executable without -o first, disregard a.out.
  4084. # It will help us diagnose broken compilers, and finding out an intuition
  4085. # of exeext.
  4086. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
  4087. $as_echo_n "checking whether the C compiler works... " >&6; }
  4088. ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
  4089. # The possible output files:
  4090. ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
  4091. ac_rmfiles=
  4092. for ac_file in $ac_files
  4093. do
  4094. case $ac_file in
  4095. *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
  4096. * ) ac_rmfiles="$ac_rmfiles $ac_file";;
  4097. esac
  4098. done
  4099. rm -f $ac_rmfiles
  4100. if { { ac_try="$ac_link_default"
  4101. case "(($ac_try" in
  4102. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  4103. *) ac_try_echo=$ac_try;;
  4104. esac
  4105. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  4106. $as_echo "$ac_try_echo"; } >&5
  4107. (eval "$ac_link_default") 2>&5
  4108. ac_status=$?
  4109. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  4110. test $ac_status = 0; }; then :
  4111. # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
  4112. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
  4113. # in a Makefile. We should not override ac_cv_exeext if it was cached,
  4114. # so that the user can short-circuit this test for compilers unknown to
  4115. # Autoconf.
  4116. for ac_file in $ac_files ''
  4117. do
  4118. test -f "$ac_file" || continue
  4119. case $ac_file in
  4120. *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
  4121. ;;
  4122. [ab].out )
  4123. # We found the default executable, but exeext='' is most
  4124. # certainly right.
  4125. break;;
  4126. *.* )
  4127. if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
  4128. then :; else
  4129. ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
  4130. fi
  4131. # We set ac_cv_exeext here because the later test for it is not
  4132. # safe: cross compilers may not add the suffix if given an `-o'
  4133. # argument, so we may need to know it at that point already.
  4134. # Even if this section looks crufty: it has the advantage of
  4135. # actually working.
  4136. break;;
  4137. * )
  4138. break;;
  4139. esac
  4140. done
  4141. test "$ac_cv_exeext" = no && ac_cv_exeext=
  4142. else
  4143. ac_file=''
  4144. fi
  4145. if test -z "$ac_file"; then :
  4146. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  4147. $as_echo "no" >&6; }
  4148. $as_echo "$as_me: failed program was:" >&5
  4149. sed 's/^/| /' conftest.$ac_ext >&5
  4150. { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  4151. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  4152. as_fn_error 77 "C compiler cannot create executables
  4153. See \`config.log' for more details" "$LINENO" 5; }
  4154. else
  4155. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  4156. $as_echo "yes" >&6; }
  4157. fi
  4158. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
  4159. $as_echo_n "checking for C compiler default output file name... " >&6; }
  4160. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
  4161. $as_echo "$ac_file" >&6; }
  4162. ac_exeext=$ac_cv_exeext
  4163. rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
  4164. ac_clean_files=$ac_clean_files_save
  4165. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
  4166. $as_echo_n "checking for suffix of executables... " >&6; }
  4167. if { { ac_try="$ac_link"
  4168. case "(($ac_try" in
  4169. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  4170. *) ac_try_echo=$ac_try;;
  4171. esac
  4172. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  4173. $as_echo "$ac_try_echo"; } >&5
  4174. (eval "$ac_link") 2>&5
  4175. ac_status=$?
  4176. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  4177. test $ac_status = 0; }; then :
  4178. # If both `conftest.exe' and `conftest' are `present' (well, observable)
  4179. # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
  4180. # work properly (i.e., refer to `conftest.exe'), while it won't with
  4181. # `rm'.
  4182. for ac_file in conftest.exe conftest conftest.*; do
  4183. test -f "$ac_file" || continue
  4184. case $ac_file in
  4185. *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
  4186. *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
  4187. break;;
  4188. * ) break;;
  4189. esac
  4190. done
  4191. else
  4192. { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  4193. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  4194. as_fn_error $? "cannot compute suffix of executables: cannot compile and link
  4195. See \`config.log' for more details" "$LINENO" 5; }
  4196. fi
  4197. rm -f conftest conftest$ac_cv_exeext
  4198. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
  4199. $as_echo "$ac_cv_exeext" >&6; }
  4200. rm -f conftest.$ac_ext
  4201. EXEEXT=$ac_cv_exeext
  4202. ac_exeext=$EXEEXT
  4203. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  4204. /* end confdefs.h. */
  4205. #include <stdio.h>
  4206. int
  4207. main ()
  4208. {
  4209. FILE *f = fopen ("conftest.out", "w");
  4210. return ferror (f) || fclose (f) != 0;
  4211. ;
  4212. return 0;
  4213. }
  4214. _ACEOF
  4215. ac_clean_files="$ac_clean_files conftest.out"
  4216. # Check that the compiler produces executables we can run. If not, either
  4217. # the compiler is broken, or we cross compile.
  4218. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
  4219. $as_echo_n "checking whether we are cross compiling... " >&6; }
  4220. if test "$cross_compiling" != yes; then
  4221. { { ac_try="$ac_link"
  4222. case "(($ac_try" in
  4223. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  4224. *) ac_try_echo=$ac_try;;
  4225. esac
  4226. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  4227. $as_echo "$ac_try_echo"; } >&5
  4228. (eval "$ac_link") 2>&5
  4229. ac_status=$?
  4230. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  4231. test $ac_status = 0; }
  4232. if { ac_try='./conftest$ac_cv_exeext'
  4233. { { case "(($ac_try" in
  4234. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  4235. *) ac_try_echo=$ac_try;;
  4236. esac
  4237. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  4238. $as_echo "$ac_try_echo"; } >&5
  4239. (eval "$ac_try") 2>&5
  4240. ac_status=$?
  4241. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  4242. test $ac_status = 0; }; }; then
  4243. cross_compiling=no
  4244. else
  4245. if test "$cross_compiling" = maybe; then
  4246. cross_compiling=yes
  4247. else
  4248. { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  4249. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  4250. as_fn_error $? "cannot run C compiled programs.
  4251. If you meant to cross compile, use \`--host'.
  4252. See \`config.log' for more details" "$LINENO" 5; }
  4253. fi
  4254. fi
  4255. fi
  4256. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
  4257. $as_echo "$cross_compiling" >&6; }
  4258. rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
  4259. ac_clean_files=$ac_clean_files_save
  4260. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
  4261. $as_echo_n "checking for suffix of object files... " >&6; }
  4262. if ${ac_cv_objext+:} false; then :
  4263. $as_echo_n "(cached) " >&6
  4264. else
  4265. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  4266. /* end confdefs.h. */
  4267. int
  4268. main ()
  4269. {
  4270. ;
  4271. return 0;
  4272. }
  4273. _ACEOF
  4274. rm -f conftest.o conftest.obj
  4275. if { { ac_try="$ac_compile"
  4276. case "(($ac_try" in
  4277. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  4278. *) ac_try_echo=$ac_try;;
  4279. esac
  4280. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
  4281. $as_echo "$ac_try_echo"; } >&5
  4282. (eval "$ac_compile") 2>&5
  4283. ac_status=$?
  4284. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  4285. test $ac_status = 0; }; then :
  4286. for ac_file in conftest.o conftest.obj conftest.*; do
  4287. test -f "$ac_file" || continue;
  4288. case $ac_file in
  4289. *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
  4290. *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
  4291. break;;
  4292. esac
  4293. done
  4294. else
  4295. $as_echo "$as_me: failed program was:" >&5
  4296. sed 's/^/| /' conftest.$ac_ext >&5
  4297. { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  4298. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  4299. as_fn_error $? "cannot compute suffix of object files: cannot compile
  4300. See \`config.log' for more details" "$LINENO" 5; }
  4301. fi
  4302. rm -f conftest.$ac_cv_objext conftest.$ac_ext
  4303. fi
  4304. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
  4305. $as_echo "$ac_cv_objext" >&6; }
  4306. OBJEXT=$ac_cv_objext
  4307. ac_objext=$OBJEXT
  4308. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
  4309. $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
  4310. if ${ac_cv_c_compiler_gnu+:} false; then :
  4311. $as_echo_n "(cached) " >&6
  4312. else
  4313. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  4314. /* end confdefs.h. */
  4315. int
  4316. main ()
  4317. {
  4318. #ifndef __GNUC__
  4319. choke me
  4320. #endif
  4321. ;
  4322. return 0;
  4323. }
  4324. _ACEOF
  4325. if ac_fn_c_try_compile "$LINENO"; then :
  4326. ac_compiler_gnu=yes
  4327. else
  4328. ac_compiler_gnu=no
  4329. fi
  4330. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  4331. ac_cv_c_compiler_gnu=$ac_compiler_gnu
  4332. fi
  4333. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
  4334. $as_echo "$ac_cv_c_compiler_gnu" >&6; }
  4335. if test $ac_compiler_gnu = yes; then
  4336. GCC=yes
  4337. else
  4338. GCC=
  4339. fi
  4340. ac_test_CFLAGS=${CFLAGS+set}
  4341. ac_save_CFLAGS=$CFLAGS
  4342. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
  4343. $as_echo_n "checking whether $CC accepts -g... " >&6; }
  4344. if ${ac_cv_prog_cc_g+:} false; then :
  4345. $as_echo_n "(cached) " >&6
  4346. else
  4347. ac_save_c_werror_flag=$ac_c_werror_flag
  4348. ac_c_werror_flag=yes
  4349. ac_cv_prog_cc_g=no
  4350. CFLAGS="-g"
  4351. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  4352. /* end confdefs.h. */
  4353. int
  4354. main ()
  4355. {
  4356. ;
  4357. return 0;
  4358. }
  4359. _ACEOF
  4360. if ac_fn_c_try_compile "$LINENO"; then :
  4361. ac_cv_prog_cc_g=yes
  4362. else
  4363. CFLAGS=""
  4364. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  4365. /* end confdefs.h. */
  4366. int
  4367. main ()
  4368. {
  4369. ;
  4370. return 0;
  4371. }
  4372. _ACEOF
  4373. if ac_fn_c_try_compile "$LINENO"; then :
  4374. else
  4375. ac_c_werror_flag=$ac_save_c_werror_flag
  4376. CFLAGS="-g"
  4377. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  4378. /* end confdefs.h. */
  4379. int
  4380. main ()
  4381. {
  4382. ;
  4383. return 0;
  4384. }
  4385. _ACEOF
  4386. if ac_fn_c_try_compile "$LINENO"; then :
  4387. ac_cv_prog_cc_g=yes
  4388. fi
  4389. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  4390. fi
  4391. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  4392. fi
  4393. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  4394. ac_c_werror_flag=$ac_save_c_werror_flag
  4395. fi
  4396. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
  4397. $as_echo "$ac_cv_prog_cc_g" >&6; }
  4398. if test "$ac_test_CFLAGS" = set; then
  4399. CFLAGS=$ac_save_CFLAGS
  4400. elif test $ac_cv_prog_cc_g = yes; then
  4401. if test "$GCC" = yes; then
  4402. CFLAGS="-g -O2"
  4403. else
  4404. CFLAGS="-g"
  4405. fi
  4406. else
  4407. if test "$GCC" = yes; then
  4408. CFLAGS="-O2"
  4409. else
  4410. CFLAGS=
  4411. fi
  4412. fi
  4413. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
  4414. $as_echo_n "checking for $CC option to enable C11 features... " >&6; }
  4415. if ${ac_cv_prog_cc_c11+:} false; then :
  4416. $as_echo_n "(cached) " >&6
  4417. else
  4418. ac_cv_prog_cc_c11=no
  4419. ac_save_CC=$CC
  4420. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  4421. /* end confdefs.h. */
  4422. #include <stdarg.h>
  4423. #include <stdbool.h>
  4424. #include <stddef.h>
  4425. #include <stdlib.h>
  4426. #include <wchar.h>
  4427. #include <stdio.h>
  4428. // Check varargs macros. These examples are taken from C99 6.10.3.5.
  4429. #define debug(...) fprintf (stderr, __VA_ARGS__)
  4430. #define showlist(...) puts (#__VA_ARGS__)
  4431. #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
  4432. static void
  4433. test_varargs_macros (void)
  4434. {
  4435. int x = 1234;
  4436. int y = 5678;
  4437. debug ("Flag");
  4438. debug ("X = %d\n", x);
  4439. showlist (The first, second, and third items.);
  4440. report (x>y, "x is %d but y is %d", x, y);
  4441. }
  4442. // Check long long types.
  4443. #define BIG64 18446744073709551615ull
  4444. #define BIG32 4294967295ul
  4445. #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
  4446. #if !BIG_OK
  4447. your preprocessor is broken;
  4448. #endif
  4449. #if BIG_OK
  4450. #else
  4451. your preprocessor is broken;
  4452. #endif
  4453. static long long int bignum = -9223372036854775807LL;
  4454. static unsigned long long int ubignum = BIG64;
  4455. struct incomplete_array
  4456. {
  4457. int datasize;
  4458. double data[];
  4459. };
  4460. struct named_init {
  4461. int number;
  4462. const wchar_t *name;
  4463. double average;
  4464. };
  4465. typedef const char *ccp;
  4466. static inline int
  4467. test_restrict (ccp restrict text)
  4468. {
  4469. // See if C++-style comments work.
  4470. // Iterate through items via the restricted pointer.
  4471. // Also check for declarations in for loops.
  4472. for (unsigned int i = 0; *(text+i) != '\0'; ++i)
  4473. continue;
  4474. return 0;
  4475. }
  4476. // Check varargs and va_copy.
  4477. static bool
  4478. test_varargs (const char *format, ...)
  4479. {
  4480. va_list args;
  4481. va_start (args, format);
  4482. va_list args_copy;
  4483. va_copy (args_copy, args);
  4484. const char *str = "";
  4485. int number = 0;
  4486. float fnumber = 0;
  4487. while (*format)
  4488. {
  4489. switch (*format++)
  4490. {
  4491. case 's': // string
  4492. str = va_arg (args_copy, const char *);
  4493. break;
  4494. case 'd': // int
  4495. number = va_arg (args_copy, int);
  4496. break;
  4497. case 'f': // float
  4498. fnumber = va_arg (args_copy, double);
  4499. break;
  4500. default:
  4501. break;
  4502. }
  4503. }
  4504. va_end (args_copy);
  4505. va_end (args);
  4506. return *str && number && fnumber;
  4507. }
  4508. // Check _Alignas.
  4509. char _Alignas (double) aligned_as_double;
  4510. char _Alignas (0) no_special_alignment;
  4511. extern char aligned_as_int;
  4512. char _Alignas (0) _Alignas (int) aligned_as_int;
  4513. // Check _Alignof.
  4514. enum
  4515. {
  4516. int_alignment = _Alignof (int),
  4517. int_array_alignment = _Alignof (int[100]),
  4518. char_alignment = _Alignof (char)
  4519. };
  4520. _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
  4521. // Check _Noreturn.
  4522. int _Noreturn does_not_return (void) { for (;;) continue; }
  4523. // Check _Static_assert.
  4524. struct test_static_assert
  4525. {
  4526. int x;
  4527. _Static_assert (sizeof (int) <= sizeof (long int),
  4528. "_Static_assert does not work in struct");
  4529. long int y;
  4530. };
  4531. // Check UTF-8 literals.
  4532. #define u8 syntax error!
  4533. char const utf8_literal[] = u8"happens to be ASCII" "another string";
  4534. // Check duplicate typedefs.
  4535. typedef long *long_ptr;
  4536. typedef long int *long_ptr;
  4537. typedef long_ptr long_ptr;
  4538. // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
  4539. struct anonymous
  4540. {
  4541. union {
  4542. struct { int i; int j; };
  4543. struct { int k; long int l; } w;
  4544. };
  4545. int m;
  4546. } v1;
  4547. int
  4548. main ()
  4549. {
  4550. // Check bool.
  4551. _Bool success = false;
  4552. // Check restrict.
  4553. if (test_restrict ("String literal") == 0)
  4554. success = true;
  4555. char *restrict newvar = "Another string";
  4556. // Check varargs.
  4557. success &= test_varargs ("s, d' f .", "string", 65, 34.234);
  4558. test_varargs_macros ();
  4559. // Check flexible array members.
  4560. struct incomplete_array *ia =
  4561. malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
  4562. ia->datasize = 10;
  4563. for (int i = 0; i < ia->datasize; ++i)
  4564. ia->data[i] = i * 1.234;
  4565. // Check named initializers.
  4566. struct named_init ni = {
  4567. .number = 34,
  4568. .name = L"Test wide string",
  4569. .average = 543.34343,
  4570. };
  4571. ni.number = 58;
  4572. int dynamic_array[ni.number];
  4573. dynamic_array[ni.number - 1] = 543;
  4574. // work around unused variable warnings
  4575. return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
  4576. || dynamic_array[ni.number - 1] != 543);
  4577. v1.i = 2;
  4578. v1.w.k = 5;
  4579. _Static_assert ((offsetof (struct anonymous, i)
  4580. == offsetof (struct anonymous, w.k)),
  4581. "Anonymous union alignment botch");
  4582. ;
  4583. return 0;
  4584. }
  4585. _ACEOF
  4586. for ac_arg in '' -std=gnu11
  4587. do
  4588. CC="$ac_save_CC $ac_arg"
  4589. if ac_fn_c_try_compile "$LINENO"; then :
  4590. ac_cv_prog_cc_c11=$ac_arg
  4591. fi
  4592. rm -f core conftest.err conftest.$ac_objext
  4593. test "x$ac_cv_prog_cc_c11" != "xno" && break
  4594. done
  4595. rm -f conftest.$ac_ext
  4596. CC=$ac_save_CC
  4597. fi
  4598. # AC_CACHE_VAL
  4599. ac_prog_cc_stdc_options=
  4600. case "x$ac_cv_prog_cc_c11" in
  4601. x)
  4602. { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
  4603. $as_echo "none needed" >&6; } ;;
  4604. xno)
  4605. { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
  4606. $as_echo "unsupported" >&6; } ;;
  4607. *)
  4608. ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
  4609. CC=$CC$ac_prog_cc_stdc_options
  4610. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
  4611. $as_echo "$ac_cv_prog_cc_c11" >&6; } ;;
  4612. esac
  4613. if test "x$ac_cv_prog_cc_c11" != xno; then :
  4614. ac_prog_cc_stdc=c11
  4615. ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
  4616. else
  4617. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
  4618. $as_echo_n "checking for $CC option to enable C99 features... " >&6; }
  4619. if ${ac_cv_prog_cc_c99+:} false; then :
  4620. $as_echo_n "(cached) " >&6
  4621. else
  4622. ac_cv_prog_cc_c99=no
  4623. ac_save_CC=$CC
  4624. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  4625. /* end confdefs.h. */
  4626. #include <stdarg.h>
  4627. #include <stdbool.h>
  4628. #include <stddef.h>
  4629. #include <stdlib.h>
  4630. #include <wchar.h>
  4631. #include <stdio.h>
  4632. // Check varargs macros. These examples are taken from C99 6.10.3.5.
  4633. #define debug(...) fprintf (stderr, __VA_ARGS__)
  4634. #define showlist(...) puts (#__VA_ARGS__)
  4635. #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
  4636. static void
  4637. test_varargs_macros (void)
  4638. {
  4639. int x = 1234;
  4640. int y = 5678;
  4641. debug ("Flag");
  4642. debug ("X = %d\n", x);
  4643. showlist (The first, second, and third items.);
  4644. report (x>y, "x is %d but y is %d", x, y);
  4645. }
  4646. // Check long long types.
  4647. #define BIG64 18446744073709551615ull
  4648. #define BIG32 4294967295ul
  4649. #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
  4650. #if !BIG_OK
  4651. your preprocessor is broken;
  4652. #endif
  4653. #if BIG_OK
  4654. #else
  4655. your preprocessor is broken;
  4656. #endif
  4657. static long long int bignum = -9223372036854775807LL;
  4658. static unsigned long long int ubignum = BIG64;
  4659. struct incomplete_array
  4660. {
  4661. int datasize;
  4662. double data[];
  4663. };
  4664. struct named_init {
  4665. int number;
  4666. const wchar_t *name;
  4667. double average;
  4668. };
  4669. typedef const char *ccp;
  4670. static inline int
  4671. test_restrict (ccp restrict text)
  4672. {
  4673. // See if C++-style comments work.
  4674. // Iterate through items via the restricted pointer.
  4675. // Also check for declarations in for loops.
  4676. for (unsigned int i = 0; *(text+i) != '\0'; ++i)
  4677. continue;
  4678. return 0;
  4679. }
  4680. // Check varargs and va_copy.
  4681. static bool
  4682. test_varargs (const char *format, ...)
  4683. {
  4684. va_list args;
  4685. va_start (args, format);
  4686. va_list args_copy;
  4687. va_copy (args_copy, args);
  4688. const char *str = "";
  4689. int number = 0;
  4690. float fnumber = 0;
  4691. while (*format)
  4692. {
  4693. switch (*format++)
  4694. {
  4695. case 's': // string
  4696. str = va_arg (args_copy, const char *);
  4697. break;
  4698. case 'd': // int
  4699. number = va_arg (args_copy, int);
  4700. break;
  4701. case 'f': // float
  4702. fnumber = va_arg (args_copy, double);
  4703. break;
  4704. default:
  4705. break;
  4706. }
  4707. }
  4708. va_end (args_copy);
  4709. va_end (args);
  4710. return *str && number && fnumber;
  4711. }
  4712. int
  4713. main ()
  4714. {
  4715. // Check bool.
  4716. _Bool success = false;
  4717. // Check restrict.
  4718. if (test_restrict ("String literal") == 0)
  4719. success = true;
  4720. char *restrict newvar = "Another string";
  4721. // Check varargs.
  4722. success &= test_varargs ("s, d' f .", "string", 65, 34.234);
  4723. test_varargs_macros ();
  4724. // Check flexible array members.
  4725. struct incomplete_array *ia =
  4726. malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
  4727. ia->datasize = 10;
  4728. for (int i = 0; i < ia->datasize; ++i)
  4729. ia->data[i] = i * 1.234;
  4730. // Check named initializers.
  4731. struct named_init ni = {
  4732. .number = 34,
  4733. .name = L"Test wide string",
  4734. .average = 543.34343,
  4735. };
  4736. ni.number = 58;
  4737. int dynamic_array[ni.number];
  4738. dynamic_array[ni.number - 1] = 543;
  4739. // work around unused variable warnings
  4740. return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
  4741. || dynamic_array[ni.number - 1] != 543);
  4742. ;
  4743. return 0;
  4744. }
  4745. _ACEOF
  4746. for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
  4747. do
  4748. CC="$ac_save_CC $ac_arg"
  4749. if ac_fn_c_try_compile "$LINENO"; then :
  4750. ac_cv_prog_cc_c99=$ac_arg
  4751. fi
  4752. rm -f core conftest.err conftest.$ac_objext
  4753. test "x$ac_cv_prog_cc_c99" != "xno" && break
  4754. done
  4755. rm -f conftest.$ac_ext
  4756. CC=$ac_save_CC
  4757. fi
  4758. # AC_CACHE_VAL
  4759. ac_prog_cc_stdc_options=
  4760. case "x$ac_cv_prog_cc_c99" in
  4761. x)
  4762. { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
  4763. $as_echo "none needed" >&6; } ;;
  4764. xno)
  4765. { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
  4766. $as_echo "unsupported" >&6; } ;;
  4767. *)
  4768. ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
  4769. CC=$CC$ac_prog_cc_stdc_options
  4770. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
  4771. $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
  4772. esac
  4773. if test "x$ac_cv_prog_cc_c99" != xno; then :
  4774. ac_prog_cc_stdc=c99
  4775. ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
  4776. else
  4777. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
  4778. $as_echo_n "checking for $CC option to enable C89 features... " >&6; }
  4779. if ${ac_cv_prog_cc_c89+:} false; then :
  4780. $as_echo_n "(cached) " >&6
  4781. else
  4782. ac_cv_prog_cc_c89=no
  4783. ac_save_CC=$CC
  4784. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  4785. /* end confdefs.h. */
  4786. #include <stdarg.h>
  4787. #include <stdio.h>
  4788. struct stat;
  4789. /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
  4790. struct buf { int x; };
  4791. FILE * (*rcsopen) (struct buf *, struct stat *, int);
  4792. static char *e (p, i)
  4793. char **p;
  4794. int i;
  4795. {
  4796. return p[i];
  4797. }
  4798. static char *f (char * (*g) (char **, int), char **p, ...)
  4799. {
  4800. char *s;
  4801. va_list v;
  4802. va_start (v,p);
  4803. s = g (p, va_arg (v,int));
  4804. va_end (v);
  4805. return s;
  4806. }
  4807. /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
  4808. function prototypes and stuff, but not '\xHH' hex character constants.
  4809. These don't provoke an error unfortunately, instead are silently treated
  4810. as 'x'. The following induces an error, until -std is added to get
  4811. proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
  4812. array size at least. It's necessary to write '\x00'==0 to get something
  4813. that's true only with -std. */
  4814. int osf4_cc_array ['\x00' == 0 ? 1 : -1];
  4815. /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
  4816. inside strings and character constants. */
  4817. #define FOO(x) 'x'
  4818. int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
  4819. int test (int i, double x);
  4820. struct s1 {int (*f) (int a);};
  4821. struct s2 {int (*f) (double a);};
  4822. int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
  4823. int argc;
  4824. char **argv;
  4825. int
  4826. main ()
  4827. {
  4828. return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
  4829. ;
  4830. return 0;
  4831. }
  4832. _ACEOF
  4833. for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
  4834. -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
  4835. do
  4836. CC="$ac_save_CC $ac_arg"
  4837. if ac_fn_c_try_compile "$LINENO"; then :
  4838. ac_cv_prog_cc_c89=$ac_arg
  4839. fi
  4840. rm -f core conftest.err conftest.$ac_objext
  4841. test "x$ac_cv_prog_cc_c89" != "xno" && break
  4842. done
  4843. rm -f conftest.$ac_ext
  4844. CC=$ac_save_CC
  4845. fi
  4846. # AC_CACHE_VAL
  4847. ac_prog_cc_stdc_options=
  4848. case "x$ac_cv_prog_cc_c89" in
  4849. x)
  4850. { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
  4851. $as_echo "none needed" >&6; } ;;
  4852. xno)
  4853. { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
  4854. $as_echo "unsupported" >&6; } ;;
  4855. *)
  4856. ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
  4857. CC=$CC$ac_prog_cc_stdc_options
  4858. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
  4859. $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
  4860. esac
  4861. if test "x$ac_cv_prog_cc_c89" != xno; then :
  4862. ac_prog_cc_stdc=c89
  4863. ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
  4864. else
  4865. ac_prog_cc_stdc=no
  4866. ac_cv_prog_cc_stdc=no
  4867. fi
  4868. fi
  4869. fi
  4870. ac_ext=c
  4871. ac_cpp='$CPP $CPPFLAGS'
  4872. ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  4873. ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  4874. ac_compiler_gnu=$ac_cv_c_compiler_gnu
  4875. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
  4876. $as_echo_n "checking whether the compiler is clang... " >&6; }
  4877. if ${gl_cv_compiler_clang+:} false; then :
  4878. $as_echo_n "(cached) " >&6
  4879. else
  4880. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  4881. /* end confdefs.h. */
  4882. #ifdef __clang__
  4883. barfbarf
  4884. #endif
  4885. int
  4886. main ()
  4887. {
  4888. ;
  4889. return 0;
  4890. }
  4891. _ACEOF
  4892. if ac_fn_c_try_compile "$LINENO"; then :
  4893. gl_cv_compiler_clang=no
  4894. else
  4895. gl_cv_compiler_clang=yes
  4896. fi
  4897. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  4898. fi
  4899. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
  4900. $as_echo "$gl_cv_compiler_clang" >&6; }
  4901. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
  4902. $as_echo_n "checking for compiler option needed when checking for declarations... " >&6; }
  4903. if ${gl_cv_compiler_check_decl_option+:} false; then :
  4904. $as_echo_n "(cached) " >&6
  4905. else
  4906. if test $gl_cv_compiler_clang = yes; then
  4907. save_ac_compile="$ac_compile"
  4908. ac_compile="$ac_compile -Werror=implicit-function-declaration"
  4909. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  4910. /* end confdefs.h. */
  4911. int
  4912. main ()
  4913. {
  4914. ;
  4915. return 0;
  4916. }
  4917. _ACEOF
  4918. if ac_fn_c_try_compile "$LINENO"; then :
  4919. gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
  4920. else
  4921. gl_cv_compiler_check_decl_option=none
  4922. fi
  4923. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  4924. ac_compile="$save_ac_compile"
  4925. else
  4926. gl_cv_compiler_check_decl_option=none
  4927. fi
  4928. fi
  4929. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
  4930. $as_echo "$gl_cv_compiler_check_decl_option" >&6; }
  4931. if test "x$gl_cv_compiler_check_decl_option" != xnone; then
  4932. ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
  4933. else
  4934. ac_compile_for_check_decl="$ac_compile"
  4935. fi
  4936. ac_ext=c
  4937. ac_cpp='$CPP $CPPFLAGS'
  4938. ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  4939. ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  4940. ac_compiler_gnu=$ac_cv_c_compiler_gnu
  4941. { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
  4942. $as_echo_n "checking how to run the C preprocessor... " >&6; }
  4943. # On Suns, sometimes $CPP names a directory.
  4944. if test -n "$CPP" && test -d "$CPP"; then
  4945. CPP=
  4946. fi
  4947. if test -z "$CPP"; then
  4948. if ${ac_cv_prog_CPP+:} false; then :
  4949. $as_echo_n "(cached) " >&6
  4950. else
  4951. # Double quotes because CPP needs to be expanded
  4952. for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
  4953. do
  4954. ac_preproc_ok=false
  4955. for ac_c_preproc_warn_flag in '' yes
  4956. do
  4957. # Use a header file that comes with gcc, so configuring glibc
  4958. # with a fresh cross-compiler works.
  4959. # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  4960. # <limits.h> exists even on freestanding compilers.
  4961. # On the NeXT, cc -E runs the code through the compiler's parser,
  4962. # not just through cpp. "Syntax error" is here to catch this case.
  4963. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  4964. /* end confdefs.h. */
  4965. #ifdef __STDC__
  4966. # include <limits.h>
  4967. #else
  4968. # include <assert.h>
  4969. #endif
  4970. Syntax error
  4971. _ACEOF
  4972. if ac_fn_c_try_cpp "$LINENO"; then :
  4973. else
  4974. # Broken: fails on valid input.
  4975. continue
  4976. fi
  4977. rm -f conftest.err conftest.i conftest.$ac_ext
  4978. # OK, works on sane cases. Now check whether nonexistent headers
  4979. # can be detected and how.
  4980. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  4981. /* end confdefs.h. */
  4982. #include <ac_nonexistent.h>
  4983. _ACEOF
  4984. if ac_fn_c_try_cpp "$LINENO"; then :
  4985. # Broken: success on invalid input.
  4986. continue
  4987. else
  4988. # Passes both tests.
  4989. ac_preproc_ok=:
  4990. break
  4991. fi
  4992. rm -f conftest.err conftest.i conftest.$ac_ext
  4993. done
  4994. # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
  4995. rm -f conftest.i conftest.err conftest.$ac_ext
  4996. if $ac_preproc_ok; then :
  4997. break
  4998. fi
  4999. done
  5000. ac_cv_prog_CPP=$CPP
  5001. fi
  5002. CPP=$ac_cv_prog_CPP
  5003. else
  5004. ac_cv_prog_CPP=$CPP
  5005. fi
  5006. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
  5007. $as_echo "$CPP" >&6; }
  5008. ac_preproc_ok=false
  5009. for ac_c_preproc_warn_flag in '' yes
  5010. do
  5011. # Use a header file that comes with gcc, so configuring glibc
  5012. # with a fresh cross-compiler works.
  5013. # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  5014. # <limits.h> exists even on freestanding compilers.
  5015. # On the NeXT, cc -E runs the code through the compiler's parser,
  5016. # not just through cpp. "Syntax error" is here to catch this case.
  5017. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5018. /* end confdefs.h. */
  5019. #ifdef __STDC__
  5020. # include <limits.h>
  5021. #else
  5022. # include <assert.h>
  5023. #endif
  5024. Syntax error
  5025. _ACEOF
  5026. if ac_fn_c_try_cpp "$LINENO"; then :
  5027. else
  5028. # Broken: fails on valid input.
  5029. continue
  5030. fi
  5031. rm -f conftest.err conftest.i conftest.$ac_ext
  5032. # OK, works on sane cases. Now check whether nonexistent headers
  5033. # can be detected and how.
  5034. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5035. /* end confdefs.h. */
  5036. #include <ac_nonexistent.h>
  5037. _ACEOF
  5038. if ac_fn_c_try_cpp "$LINENO"; then :
  5039. # Broken: success on invalid input.
  5040. continue
  5041. else
  5042. # Passes both tests.
  5043. ac_preproc_ok=:
  5044. break
  5045. fi
  5046. rm -f conftest.err conftest.i conftest.$ac_ext
  5047. done
  5048. # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
  5049. rm -f conftest.i conftest.err conftest.$ac_ext
  5050. if $ac_preproc_ok; then :
  5051. else
  5052. { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  5053. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  5054. as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
  5055. See \`config.log' for more details" "$LINENO" 5; }
  5056. fi
  5057. ac_ext=c
  5058. ac_cpp='$CPP $CPPFLAGS'
  5059. ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  5060. ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  5061. ac_compiler_gnu=$ac_cv_c_compiler_gnu
  5062. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
  5063. $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
  5064. if ${ac_cv_path_GREP+:} false; then :
  5065. $as_echo_n "(cached) " >&6
  5066. else
  5067. if test -z "$GREP"; then
  5068. ac_path_GREP_found=false
  5069. # Loop through the user's path and test for each of PROGNAME-LIST
  5070. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  5071. for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
  5072. do
  5073. IFS=$as_save_IFS
  5074. test -z "$as_dir" && as_dir=.
  5075. for ac_prog in grep ggrep; do
  5076. for ac_exec_ext in '' $ac_executable_extensions; do
  5077. ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
  5078. as_fn_executable_p "$ac_path_GREP" || continue
  5079. # Check for GNU ac_path_GREP and select it if it is found.
  5080. # Check for GNU $ac_path_GREP
  5081. case `"$ac_path_GREP" --version 2>&1` in
  5082. *GNU*)
  5083. ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
  5084. *)
  5085. ac_count=0
  5086. $as_echo_n 0123456789 >"conftest.in"
  5087. while :
  5088. do
  5089. cat "conftest.in" "conftest.in" >"conftest.tmp"
  5090. mv "conftest.tmp" "conftest.in"
  5091. cp "conftest.in" "conftest.nl"
  5092. $as_echo 'GREP' >> "conftest.nl"
  5093. "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
  5094. diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
  5095. as_fn_arith $ac_count + 1 && ac_count=$as_val
  5096. if test $ac_count -gt ${ac_path_GREP_max-0}; then
  5097. # Best one so far, save it but keep looking for a better one
  5098. ac_cv_path_GREP="$ac_path_GREP"
  5099. ac_path_GREP_max=$ac_count
  5100. fi
  5101. # 10*(2^10) chars as input seems more than enough
  5102. test $ac_count -gt 10 && break
  5103. done
  5104. rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
  5105. esac
  5106. $ac_path_GREP_found && break 3
  5107. done
  5108. done
  5109. done
  5110. IFS=$as_save_IFS
  5111. if test -z "$ac_cv_path_GREP"; then
  5112. as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
  5113. fi
  5114. else
  5115. ac_cv_path_GREP=$GREP
  5116. fi
  5117. fi
  5118. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
  5119. $as_echo "$ac_cv_path_GREP" >&6; }
  5120. GREP="$ac_cv_path_GREP"
  5121. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
  5122. $as_echo_n "checking for egrep... " >&6; }
  5123. if ${ac_cv_path_EGREP+:} false; then :
  5124. $as_echo_n "(cached) " >&6
  5125. else
  5126. if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
  5127. then ac_cv_path_EGREP="$GREP -E"
  5128. else
  5129. if test -z "$EGREP"; then
  5130. ac_path_EGREP_found=false
  5131. # Loop through the user's path and test for each of PROGNAME-LIST
  5132. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  5133. for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
  5134. do
  5135. IFS=$as_save_IFS
  5136. test -z "$as_dir" && as_dir=.
  5137. for ac_prog in egrep; do
  5138. for ac_exec_ext in '' $ac_executable_extensions; do
  5139. ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
  5140. as_fn_executable_p "$ac_path_EGREP" || continue
  5141. # Check for GNU ac_path_EGREP and select it if it is found.
  5142. # Check for GNU $ac_path_EGREP
  5143. case `"$ac_path_EGREP" --version 2>&1` in
  5144. *GNU*)
  5145. ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
  5146. *)
  5147. ac_count=0
  5148. $as_echo_n 0123456789 >"conftest.in"
  5149. while :
  5150. do
  5151. cat "conftest.in" "conftest.in" >"conftest.tmp"
  5152. mv "conftest.tmp" "conftest.in"
  5153. cp "conftest.in" "conftest.nl"
  5154. $as_echo 'EGREP' >> "conftest.nl"
  5155. "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
  5156. diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
  5157. as_fn_arith $ac_count + 1 && ac_count=$as_val
  5158. if test $ac_count -gt ${ac_path_EGREP_max-0}; then
  5159. # Best one so far, save it but keep looking for a better one
  5160. ac_cv_path_EGREP="$ac_path_EGREP"
  5161. ac_path_EGREP_max=$ac_count
  5162. fi
  5163. # 10*(2^10) chars as input seems more than enough
  5164. test $ac_count -gt 10 && break
  5165. done
  5166. rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
  5167. esac
  5168. $ac_path_EGREP_found && break 3
  5169. done
  5170. done
  5171. done
  5172. IFS=$as_save_IFS
  5173. if test -z "$ac_cv_path_EGREP"; then
  5174. as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
  5175. fi
  5176. else
  5177. ac_cv_path_EGREP=$EGREP
  5178. fi
  5179. fi
  5180. fi
  5181. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
  5182. $as_echo "$ac_cv_path_EGREP" >&6; }
  5183. EGREP="$ac_cv_path_EGREP"
  5184. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
  5185. $as_echo_n "checking for ANSI C header files... " >&6; }
  5186. if ${ac_cv_header_stdc+:} false; then :
  5187. $as_echo_n "(cached) " >&6
  5188. else
  5189. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5190. /* end confdefs.h. */
  5191. #include <stdlib.h>
  5192. #include <stdarg.h>
  5193. #include <string.h>
  5194. #include <float.h>
  5195. int
  5196. main ()
  5197. {
  5198. ;
  5199. return 0;
  5200. }
  5201. _ACEOF
  5202. if ac_fn_c_try_compile "$LINENO"; then :
  5203. ac_cv_header_stdc=yes
  5204. else
  5205. ac_cv_header_stdc=no
  5206. fi
  5207. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  5208. if test $ac_cv_header_stdc = yes; then
  5209. # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  5210. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5211. /* end confdefs.h. */
  5212. #include <string.h>
  5213. _ACEOF
  5214. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  5215. $EGREP "memchr" >/dev/null 2>&1; then :
  5216. else
  5217. ac_cv_header_stdc=no
  5218. fi
  5219. rm -f conftest*
  5220. fi
  5221. if test $ac_cv_header_stdc = yes; then
  5222. # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  5223. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5224. /* end confdefs.h. */
  5225. #include <stdlib.h>
  5226. _ACEOF
  5227. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  5228. $EGREP "free" >/dev/null 2>&1; then :
  5229. else
  5230. ac_cv_header_stdc=no
  5231. fi
  5232. rm -f conftest*
  5233. fi
  5234. if test $ac_cv_header_stdc = yes; then
  5235. # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  5236. if test "$cross_compiling" = yes; then :
  5237. :
  5238. else
  5239. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5240. /* end confdefs.h. */
  5241. #include <ctype.h>
  5242. #include <stdlib.h>
  5243. #if ((' ' & 0x0FF) == 0x020)
  5244. # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  5245. # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  5246. #else
  5247. # define ISLOWER(c) \
  5248. (('a' <= (c) && (c) <= 'i') \
  5249. || ('j' <= (c) && (c) <= 'r') \
  5250. || ('s' <= (c) && (c) <= 'z'))
  5251. # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
  5252. #endif
  5253. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  5254. int
  5255. main ()
  5256. {
  5257. int i;
  5258. for (i = 0; i < 256; i++)
  5259. if (XOR (islower (i), ISLOWER (i))
  5260. || toupper (i) != TOUPPER (i))
  5261. return 2;
  5262. return 0;
  5263. }
  5264. _ACEOF
  5265. if ac_fn_c_try_run "$LINENO"; then :
  5266. else
  5267. ac_cv_header_stdc=no
  5268. fi
  5269. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  5270. conftest.$ac_objext conftest.beam conftest.$ac_ext
  5271. fi
  5272. fi
  5273. fi
  5274. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
  5275. $as_echo "$ac_cv_header_stdc" >&6; }
  5276. if test $ac_cv_header_stdc = yes; then
  5277. $as_echo "#define STDC_HEADERS 1" >>confdefs.h
  5278. fi
  5279. # On IRIX 5.3, sys/types and inttypes.h are conflicting.
  5280. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
  5281. inttypes.h stdint.h unistd.h
  5282. do :
  5283. as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
  5284. ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
  5285. "
  5286. if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  5287. cat >>confdefs.h <<_ACEOF
  5288. #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  5289. _ACEOF
  5290. fi
  5291. done
  5292. for ac_header in $ac_header_list
  5293. do :
  5294. as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
  5295. ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
  5296. "
  5297. if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  5298. cat >>confdefs.h <<_ACEOF
  5299. #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  5300. _ACEOF
  5301. fi
  5302. done
  5303. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
  5304. $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
  5305. if ${ac_cv_safe_to_define___extensions__+:} false; then :
  5306. $as_echo_n "(cached) " >&6
  5307. else
  5308. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5309. /* end confdefs.h. */
  5310. # define __EXTENSIONS__ 1
  5311. $ac_includes_default
  5312. int
  5313. main ()
  5314. {
  5315. ;
  5316. return 0;
  5317. }
  5318. _ACEOF
  5319. if ac_fn_c_try_compile "$LINENO"; then :
  5320. ac_cv_safe_to_define___extensions__=yes
  5321. else
  5322. ac_cv_safe_to_define___extensions__=no
  5323. fi
  5324. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  5325. fi
  5326. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
  5327. $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
  5328. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
  5329. $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
  5330. if ${ac_cv_should_define__xopen_source+:} false; then :
  5331. $as_echo_n "(cached) " >&6
  5332. else
  5333. ac_cv_should_define__xopen_source=no
  5334. if test $ac_cv_header_wchar_h = yes; then :
  5335. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5336. /* end confdefs.h. */
  5337. #include <wchar.h>
  5338. mbstate_t x;
  5339. int
  5340. main ()
  5341. {
  5342. ;
  5343. return 0;
  5344. }
  5345. _ACEOF
  5346. if ac_fn_c_try_compile "$LINENO"; then :
  5347. else
  5348. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5349. /* end confdefs.h. */
  5350. #define _XOPEN_SOURCE 500
  5351. #include <wchar.h>
  5352. mbstate_t x;
  5353. int
  5354. main ()
  5355. {
  5356. ;
  5357. return 0;
  5358. }
  5359. _ACEOF
  5360. if ac_fn_c_try_compile "$LINENO"; then :
  5361. ac_cv_should_define__xopen_source=yes
  5362. fi
  5363. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  5364. fi
  5365. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  5366. fi
  5367. fi
  5368. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
  5369. $as_echo "$ac_cv_should_define__xopen_source" >&6; }
  5370. $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
  5371. $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
  5372. $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
  5373. $as_echo "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
  5374. $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
  5375. $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h
  5376. $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
  5377. $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
  5378. $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
  5379. $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
  5380. $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
  5381. $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
  5382. $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
  5383. $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
  5384. $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
  5385. if test $ac_cv_header_minix_config_h = yes; then :
  5386. MINIX=yes
  5387. $as_echo "#define _MINIX 1" >>confdefs.h
  5388. $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
  5389. $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
  5390. else
  5391. MINIX=
  5392. fi
  5393. if test $ac_cv_safe_to_define___extensions__ = yes; then :
  5394. $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
  5395. fi
  5396. if test $ac_cv_should_define__xopen_source = yes; then :
  5397. $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
  5398. fi
  5399. # Needs to run before gl_EARLY so it can override AC_SYS_LARGEFILE included
  5400. # there.
  5401. ac_aux_dir=
  5402. for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
  5403. if test -f "$ac_dir/install-sh"; then
  5404. ac_aux_dir=$ac_dir
  5405. ac_install_sh="$ac_aux_dir/install-sh -c"
  5406. break
  5407. elif test -f "$ac_dir/install.sh"; then
  5408. ac_aux_dir=$ac_dir
  5409. ac_install_sh="$ac_aux_dir/install.sh -c"
  5410. break
  5411. elif test -f "$ac_dir/shtool"; then
  5412. ac_aux_dir=$ac_dir
  5413. ac_install_sh="$ac_aux_dir/shtool install -c"
  5414. break
  5415. fi
  5416. done
  5417. if test -z "$ac_aux_dir"; then
  5418. as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
  5419. fi
  5420. # These three variables are undocumented and unsupported,
  5421. # and are intended to be withdrawn in a future Autoconf release.
  5422. # They can cause serious problems if a builder's source tree is in a directory
  5423. # whose full name contains unusual characters.
  5424. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
  5425. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
  5426. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
  5427. # Make sure we can run config.sub.
  5428. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
  5429. as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
  5430. { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
  5431. $as_echo_n "checking build system type... " >&6; }
  5432. if ${ac_cv_build+:} false; then :
  5433. $as_echo_n "(cached) " >&6
  5434. else
  5435. ac_build_alias=$build_alias
  5436. test "x$ac_build_alias" = x &&
  5437. ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
  5438. test "x$ac_build_alias" = x &&
  5439. as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
  5440. ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
  5441. as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
  5442. fi
  5443. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
  5444. $as_echo "$ac_cv_build" >&6; }
  5445. case $ac_cv_build in
  5446. *-*-*) ;;
  5447. *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
  5448. esac
  5449. build=$ac_cv_build
  5450. ac_save_IFS=$IFS; IFS='-'
  5451. set x $ac_cv_build
  5452. shift
  5453. build_cpu=$1
  5454. build_vendor=$2
  5455. shift; shift
  5456. # Remember, the first character of IFS is used to create $*,
  5457. # except with old shells:
  5458. build_os=$*
  5459. IFS=$ac_save_IFS
  5460. case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
  5461. { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
  5462. $as_echo_n "checking host system type... " >&6; }
  5463. if ${ac_cv_host+:} false; then :
  5464. $as_echo_n "(cached) " >&6
  5465. else
  5466. if test "x$host_alias" = x; then
  5467. ac_cv_host=$ac_cv_build
  5468. else
  5469. ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
  5470. as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
  5471. fi
  5472. fi
  5473. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
  5474. $as_echo "$ac_cv_host" >&6; }
  5475. case $ac_cv_host in
  5476. *-*-*) ;;
  5477. *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
  5478. esac
  5479. host=$ac_cv_host
  5480. ac_save_IFS=$IFS; IFS='-'
  5481. set x $ac_cv_host
  5482. shift
  5483. host_cpu=$1
  5484. host_vendor=$2
  5485. shift; shift
  5486. # Remember, the first character of IFS is used to create $*,
  5487. # except with old shells:
  5488. host_os=$*
  5489. IFS=$ac_save_IFS
  5490. case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
  5491. { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
  5492. $as_echo_n "checking target system type... " >&6; }
  5493. if ${ac_cv_target+:} false; then :
  5494. $as_echo_n "(cached) " >&6
  5495. else
  5496. if test "x$target_alias" = x; then
  5497. ac_cv_target=$ac_cv_host
  5498. else
  5499. ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
  5500. as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
  5501. fi
  5502. fi
  5503. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
  5504. $as_echo "$ac_cv_target" >&6; }
  5505. case $ac_cv_target in
  5506. *-*-*) ;;
  5507. *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
  5508. esac
  5509. target=$ac_cv_target
  5510. ac_save_IFS=$IFS; IFS='-'
  5511. set x $ac_cv_target
  5512. shift
  5513. target_cpu=$1
  5514. target_vendor=$2
  5515. shift; shift
  5516. # Remember, the first character of IFS is used to create $*,
  5517. # except with old shells:
  5518. target_os=$*
  5519. IFS=$ac_save_IFS
  5520. case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
  5521. # The aliases save the names the user supplied, while $host etc.
  5522. # will get canonicalized.
  5523. test -n "$target_alias" &&
  5524. test "$program_prefix$program_suffix$program_transform_name" = \
  5525. NONENONEs,x,x, &&
  5526. program_prefix=${target_alias}-
  5527. # The tests for host and target for $enable_largefile require
  5528. # canonical names.
  5529. # As the $enable_largefile decision depends on --enable-plugins we must set it
  5530. # even in directories otherwise not depending on the $plugins option.
  5531. maybe_plugins=no
  5532. for ac_header in dlfcn.h
  5533. do :
  5534. ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
  5535. "
  5536. if test "x$ac_cv_header_dlfcn_h" = xyes; then :
  5537. cat >>confdefs.h <<_ACEOF
  5538. #define HAVE_DLFCN_H 1
  5539. _ACEOF
  5540. maybe_plugins=yes
  5541. fi
  5542. done
  5543. for ac_header in windows.h
  5544. do :
  5545. ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
  5546. "
  5547. if test "x$ac_cv_header_windows_h" = xyes; then :
  5548. cat >>confdefs.h <<_ACEOF
  5549. #define HAVE_WINDOWS_H 1
  5550. _ACEOF
  5551. maybe_plugins=yes
  5552. fi
  5553. done
  5554. # Check whether --enable-plugins was given.
  5555. if test "${enable_plugins+set}" = set; then :
  5556. enableval=$enable_plugins; case "${enableval}" in
  5557. no) plugins=no ;;
  5558. *) plugins=yes
  5559. if test "$maybe_plugins" != "yes" ; then
  5560. as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
  5561. fi ;;
  5562. esac
  5563. else
  5564. plugins=$maybe_plugins
  5565. fi
  5566. if test "$plugins" = "yes"; then
  5567. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
  5568. $as_echo_n "checking for library containing dlsym... " >&6; }
  5569. if ${ac_cv_search_dlsym+:} false; then :
  5570. $as_echo_n "(cached) " >&6
  5571. else
  5572. ac_func_search_save_LIBS=$LIBS
  5573. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5574. /* end confdefs.h. */
  5575. /* Override any GCC internal prototype to avoid an error.
  5576. Use char because int might match the return type of a GCC
  5577. builtin and then its argument prototype would still apply. */
  5578. #ifdef __cplusplus
  5579. extern "C"
  5580. #endif
  5581. char dlsym ();
  5582. int
  5583. main ()
  5584. {
  5585. return dlsym ();
  5586. ;
  5587. return 0;
  5588. }
  5589. _ACEOF
  5590. for ac_lib in '' dl; do
  5591. if test -z "$ac_lib"; then
  5592. ac_res="none required"
  5593. else
  5594. ac_res=-l$ac_lib
  5595. LIBS="-l$ac_lib $ac_func_search_save_LIBS"
  5596. fi
  5597. if ac_fn_c_try_link "$LINENO"; then :
  5598. ac_cv_search_dlsym=$ac_res
  5599. fi
  5600. rm -f core conftest.err conftest.$ac_objext \
  5601. conftest$ac_exeext
  5602. if ${ac_cv_search_dlsym+:} false; then :
  5603. break
  5604. fi
  5605. done
  5606. if ${ac_cv_search_dlsym+:} false; then :
  5607. else
  5608. ac_cv_search_dlsym=no
  5609. fi
  5610. rm conftest.$ac_ext
  5611. LIBS=$ac_func_search_save_LIBS
  5612. fi
  5613. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
  5614. $as_echo "$ac_cv_search_dlsym" >&6; }
  5615. ac_res=$ac_cv_search_dlsym
  5616. if test "$ac_res" != no; then :
  5617. test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  5618. fi
  5619. fi
  5620. case "${host}" in
  5621. sparc-*-solaris*|i?86-*-solaris*)
  5622. # On native 32-bit Solaris/SPARC and x86, large-file and procfs support
  5623. # were mutually exclusive until Solaris 11.3. Without procfs support,
  5624. # the bfd/ elf module cannot provide certain routines such as
  5625. # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user
  5626. # explicitly requested large-file support through the
  5627. # --enable-largefile switch, disable large-file support in favor of
  5628. # procfs support.
  5629. #
  5630. # Check if <sys/procfs.h> is incompatible with large-file support.
  5631. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5632. /* end confdefs.h. */
  5633. #define _FILE_OFFSET_BITS 64
  5634. #define _STRUCTURED_PROC 1
  5635. #include <sys/procfs.h>
  5636. int
  5637. main ()
  5638. {
  5639. ;
  5640. return 0;
  5641. }
  5642. _ACEOF
  5643. if ac_fn_c_try_compile "$LINENO"; then :
  5644. acx_cv_procfs_lfs=yes
  5645. else
  5646. acx_cv_procfs_lfs=no
  5647. fi
  5648. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  5649. #
  5650. # Forcefully disable large-file support only if necessary, gdb is in
  5651. # tree and enabled.
  5652. if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \
  5653. -a -d $srcdir/../gdb -a "$enable_gdb" != no; then
  5654. : ${enable_largefile="no"}
  5655. if test "$plugins" = yes; then
  5656. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
  5657. plugin support disabled; require large-file support which is incompatible with GDB." >&5
  5658. $as_echo "$as_me: WARNING:
  5659. plugin support disabled; require large-file support which is incompatible with GDB." >&2;}
  5660. plugins=no
  5661. fi
  5662. fi
  5663. #
  5664. # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the
  5665. # benefit of g++ 9+ which predefines it on Solaris.
  5666. if test "$enable_largefile" = no; then
  5667. LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS"
  5668. fi
  5669. ;;
  5670. esac
  5671. # Check whether --enable-largefile was given.
  5672. if test "${enable_largefile+set}" = set; then :
  5673. enableval=$enable_largefile;
  5674. fi
  5675. if test "$enable_largefile" != no; then
  5676. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
  5677. $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
  5678. if ${ac_cv_sys_largefile_CC+:} false; then :
  5679. $as_echo_n "(cached) " >&6
  5680. else
  5681. ac_cv_sys_largefile_CC=no
  5682. if test "$GCC" != yes; then
  5683. ac_save_CC=$CC
  5684. while :; do
  5685. # IRIX 6.2 and later do not support large files by default,
  5686. # so use the C compiler's -n32 option if that helps.
  5687. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5688. /* end confdefs.h. */
  5689. #include <sys/types.h>
  5690. /* Check that off_t can represent 2**63 - 1 correctly.
  5691. We can't simply define LARGE_OFF_T to be 9223372036854775807,
  5692. since some C++ compilers masquerading as C compilers
  5693. incorrectly reject 9223372036854775807. */
  5694. #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
  5695. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  5696. && LARGE_OFF_T % 2147483647 == 1)
  5697. ? 1 : -1];
  5698. int
  5699. main ()
  5700. {
  5701. ;
  5702. return 0;
  5703. }
  5704. _ACEOF
  5705. if ac_fn_c_try_compile "$LINENO"; then :
  5706. break
  5707. fi
  5708. rm -f core conftest.err conftest.$ac_objext
  5709. CC="$CC -n32"
  5710. if ac_fn_c_try_compile "$LINENO"; then :
  5711. ac_cv_sys_largefile_CC=' -n32'; break
  5712. fi
  5713. rm -f core conftest.err conftest.$ac_objext
  5714. break
  5715. done
  5716. CC=$ac_save_CC
  5717. rm -f conftest.$ac_ext
  5718. fi
  5719. fi
  5720. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
  5721. $as_echo "$ac_cv_sys_largefile_CC" >&6; }
  5722. if test "$ac_cv_sys_largefile_CC" != no; then
  5723. CC=$CC$ac_cv_sys_largefile_CC
  5724. fi
  5725. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
  5726. $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
  5727. if ${ac_cv_sys_file_offset_bits+:} false; then :
  5728. $as_echo_n "(cached) " >&6
  5729. else
  5730. while :; do
  5731. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5732. /* end confdefs.h. */
  5733. #include <sys/types.h>
  5734. /* Check that off_t can represent 2**63 - 1 correctly.
  5735. We can't simply define LARGE_OFF_T to be 9223372036854775807,
  5736. since some C++ compilers masquerading as C compilers
  5737. incorrectly reject 9223372036854775807. */
  5738. #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
  5739. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  5740. && LARGE_OFF_T % 2147483647 == 1)
  5741. ? 1 : -1];
  5742. int
  5743. main ()
  5744. {
  5745. ;
  5746. return 0;
  5747. }
  5748. _ACEOF
  5749. if ac_fn_c_try_compile "$LINENO"; then :
  5750. ac_cv_sys_file_offset_bits=no; break
  5751. fi
  5752. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  5753. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5754. /* end confdefs.h. */
  5755. #define _FILE_OFFSET_BITS 64
  5756. #include <sys/types.h>
  5757. /* Check that off_t can represent 2**63 - 1 correctly.
  5758. We can't simply define LARGE_OFF_T to be 9223372036854775807,
  5759. since some C++ compilers masquerading as C compilers
  5760. incorrectly reject 9223372036854775807. */
  5761. #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
  5762. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  5763. && LARGE_OFF_T % 2147483647 == 1)
  5764. ? 1 : -1];
  5765. int
  5766. main ()
  5767. {
  5768. ;
  5769. return 0;
  5770. }
  5771. _ACEOF
  5772. if ac_fn_c_try_compile "$LINENO"; then :
  5773. ac_cv_sys_file_offset_bits=64; break
  5774. fi
  5775. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  5776. ac_cv_sys_file_offset_bits=unknown
  5777. break
  5778. done
  5779. fi
  5780. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
  5781. $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
  5782. case $ac_cv_sys_file_offset_bits in #(
  5783. no | unknown) ;;
  5784. *)
  5785. cat >>confdefs.h <<_ACEOF
  5786. #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
  5787. _ACEOF
  5788. ;;
  5789. esac
  5790. rm -rf conftest*
  5791. if test $ac_cv_sys_file_offset_bits = unknown; then
  5792. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
  5793. $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
  5794. if ${ac_cv_sys_large_files+:} false; then :
  5795. $as_echo_n "(cached) " >&6
  5796. else
  5797. while :; do
  5798. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5799. /* end confdefs.h. */
  5800. #include <sys/types.h>
  5801. /* Check that off_t can represent 2**63 - 1 correctly.
  5802. We can't simply define LARGE_OFF_T to be 9223372036854775807,
  5803. since some C++ compilers masquerading as C compilers
  5804. incorrectly reject 9223372036854775807. */
  5805. #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
  5806. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  5807. && LARGE_OFF_T % 2147483647 == 1)
  5808. ? 1 : -1];
  5809. int
  5810. main ()
  5811. {
  5812. ;
  5813. return 0;
  5814. }
  5815. _ACEOF
  5816. if ac_fn_c_try_compile "$LINENO"; then :
  5817. ac_cv_sys_large_files=no; break
  5818. fi
  5819. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  5820. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5821. /* end confdefs.h. */
  5822. #define _LARGE_FILES 1
  5823. #include <sys/types.h>
  5824. /* Check that off_t can represent 2**63 - 1 correctly.
  5825. We can't simply define LARGE_OFF_T to be 9223372036854775807,
  5826. since some C++ compilers masquerading as C compilers
  5827. incorrectly reject 9223372036854775807. */
  5828. #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
  5829. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  5830. && LARGE_OFF_T % 2147483647 == 1)
  5831. ? 1 : -1];
  5832. int
  5833. main ()
  5834. {
  5835. ;
  5836. return 0;
  5837. }
  5838. _ACEOF
  5839. if ac_fn_c_try_compile "$LINENO"; then :
  5840. ac_cv_sys_large_files=1; break
  5841. fi
  5842. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  5843. ac_cv_sys_large_files=unknown
  5844. break
  5845. done
  5846. fi
  5847. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
  5848. $as_echo "$ac_cv_sys_large_files" >&6; }
  5849. case $ac_cv_sys_large_files in #(
  5850. no | unknown) ;;
  5851. *)
  5852. cat >>confdefs.h <<_ACEOF
  5853. #define _LARGE_FILES $ac_cv_sys_large_files
  5854. _ACEOF
  5855. ;;
  5856. esac
  5857. rm -rf conftest*
  5858. fi
  5859. fi
  5860. case "$host_os" in
  5861. openbsd*)
  5862. $as_echo "#define _ISOC11_SOURCE 1" >>confdefs.h
  5863. ;;
  5864. esac
  5865. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
  5866. $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
  5867. if ${gl_cv_c_amsterdam_compiler+:} false; then :
  5868. $as_echo_n "(cached) " >&6
  5869. else
  5870. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5871. /* end confdefs.h. */
  5872. #ifdef __ACK__
  5873. Amsterdam
  5874. #endif
  5875. _ACEOF
  5876. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  5877. $EGREP "Amsterdam" >/dev/null 2>&1; then :
  5878. gl_cv_c_amsterdam_compiler=yes
  5879. else
  5880. gl_cv_c_amsterdam_compiler=no
  5881. fi
  5882. rm -f conftest*
  5883. fi
  5884. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
  5885. $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
  5886. if test $gl_cv_c_amsterdam_compiler = yes; then
  5887. if test -z "$AR"; then
  5888. AR='cc -c.a'
  5889. fi
  5890. if test -z "$ARFLAGS"; then
  5891. ARFLAGS='-o'
  5892. fi
  5893. else
  5894. :
  5895. fi
  5896. if test -n "$ac_tool_prefix"; then
  5897. # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
  5898. set dummy ${ac_tool_prefix}ar; ac_word=$2
  5899. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  5900. $as_echo_n "checking for $ac_word... " >&6; }
  5901. if ${ac_cv_prog_AR+:} false; then :
  5902. $as_echo_n "(cached) " >&6
  5903. else
  5904. if test -n "$AR"; then
  5905. ac_cv_prog_AR="$AR" # Let the user override the test.
  5906. else
  5907. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  5908. for as_dir in $PATH
  5909. do
  5910. IFS=$as_save_IFS
  5911. test -z "$as_dir" && as_dir=.
  5912. for ac_exec_ext in '' $ac_executable_extensions; do
  5913. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  5914. ac_cv_prog_AR="${ac_tool_prefix}ar"
  5915. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  5916. break 2
  5917. fi
  5918. done
  5919. done
  5920. IFS=$as_save_IFS
  5921. fi
  5922. fi
  5923. AR=$ac_cv_prog_AR
  5924. if test -n "$AR"; then
  5925. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
  5926. $as_echo "$AR" >&6; }
  5927. else
  5928. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  5929. $as_echo "no" >&6; }
  5930. fi
  5931. fi
  5932. if test -z "$ac_cv_prog_AR"; then
  5933. ac_ct_AR=$AR
  5934. # Extract the first word of "ar", so it can be a program name with args.
  5935. set dummy ar; ac_word=$2
  5936. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  5937. $as_echo_n "checking for $ac_word... " >&6; }
  5938. if ${ac_cv_prog_ac_ct_AR+:} false; then :
  5939. $as_echo_n "(cached) " >&6
  5940. else
  5941. if test -n "$ac_ct_AR"; then
  5942. ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
  5943. else
  5944. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  5945. for as_dir in $PATH
  5946. do
  5947. IFS=$as_save_IFS
  5948. test -z "$as_dir" && as_dir=.
  5949. for ac_exec_ext in '' $ac_executable_extensions; do
  5950. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  5951. ac_cv_prog_ac_ct_AR="ar"
  5952. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  5953. break 2
  5954. fi
  5955. done
  5956. done
  5957. IFS=$as_save_IFS
  5958. fi
  5959. fi
  5960. ac_ct_AR=$ac_cv_prog_ac_ct_AR
  5961. if test -n "$ac_ct_AR"; then
  5962. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
  5963. $as_echo "$ac_ct_AR" >&6; }
  5964. else
  5965. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  5966. $as_echo "no" >&6; }
  5967. fi
  5968. if test "x$ac_ct_AR" = x; then
  5969. AR="ar"
  5970. else
  5971. case $cross_compiling:$ac_tool_warned in
  5972. yes:)
  5973. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  5974. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  5975. ac_tool_warned=yes ;;
  5976. esac
  5977. AR=$ac_ct_AR
  5978. fi
  5979. else
  5980. AR="$ac_cv_prog_AR"
  5981. fi
  5982. if test -z "$ARFLAGS"; then
  5983. ARFLAGS='cr'
  5984. fi
  5985. if test -z "$RANLIB"; then
  5986. if test $gl_cv_c_amsterdam_compiler = yes; then
  5987. RANLIB=':'
  5988. else
  5989. if test -n "$ac_tool_prefix"; then
  5990. # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
  5991. set dummy ${ac_tool_prefix}ranlib; ac_word=$2
  5992. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  5993. $as_echo_n "checking for $ac_word... " >&6; }
  5994. if ${ac_cv_prog_RANLIB+:} false; then :
  5995. $as_echo_n "(cached) " >&6
  5996. else
  5997. if test -n "$RANLIB"; then
  5998. ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  5999. else
  6000. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6001. for as_dir in $PATH
  6002. do
  6003. IFS=$as_save_IFS
  6004. test -z "$as_dir" && as_dir=.
  6005. for ac_exec_ext in '' $ac_executable_extensions; do
  6006. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6007. ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
  6008. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6009. break 2
  6010. fi
  6011. done
  6012. done
  6013. IFS=$as_save_IFS
  6014. fi
  6015. fi
  6016. RANLIB=$ac_cv_prog_RANLIB
  6017. if test -n "$RANLIB"; then
  6018. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
  6019. $as_echo "$RANLIB" >&6; }
  6020. else
  6021. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6022. $as_echo "no" >&6; }
  6023. fi
  6024. fi
  6025. if test -z "$ac_cv_prog_RANLIB"; then
  6026. ac_ct_RANLIB=$RANLIB
  6027. # Extract the first word of "ranlib", so it can be a program name with args.
  6028. set dummy ranlib; ac_word=$2
  6029. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  6030. $as_echo_n "checking for $ac_word... " >&6; }
  6031. if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
  6032. $as_echo_n "(cached) " >&6
  6033. else
  6034. if test -n "$ac_ct_RANLIB"; then
  6035. ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
  6036. else
  6037. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6038. for as_dir in $PATH
  6039. do
  6040. IFS=$as_save_IFS
  6041. test -z "$as_dir" && as_dir=.
  6042. for ac_exec_ext in '' $ac_executable_extensions; do
  6043. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  6044. ac_cv_prog_ac_ct_RANLIB="ranlib"
  6045. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  6046. break 2
  6047. fi
  6048. done
  6049. done
  6050. IFS=$as_save_IFS
  6051. fi
  6052. fi
  6053. ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
  6054. if test -n "$ac_ct_RANLIB"; then
  6055. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
  6056. $as_echo "$ac_ct_RANLIB" >&6; }
  6057. else
  6058. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  6059. $as_echo "no" >&6; }
  6060. fi
  6061. if test "x$ac_ct_RANLIB" = x; then
  6062. RANLIB=":"
  6063. else
  6064. case $cross_compiling:$ac_tool_warned in
  6065. yes:)
  6066. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  6067. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  6068. ac_tool_warned=yes ;;
  6069. esac
  6070. RANLIB=$ac_ct_RANLIB
  6071. fi
  6072. else
  6073. RANLIB="$ac_cv_prog_RANLIB"
  6074. fi
  6075. fi
  6076. fi
  6077. # IEEE behaviour is the default on all CPUs except Alpha and SH
  6078. # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
  6079. # and the GCC 4.1.2 manual).
  6080. case "$host_cpu" in
  6081. alpha*)
  6082. # On Alpha systems, a compiler option provides the behaviour.
  6083. # See the ieee(3) manual page, also available at
  6084. # <https://backdrift.org/man/tru64/man3/ieee.3.html>
  6085. if test -n "$GCC"; then
  6086. # GCC has the option -mieee.
  6087. # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
  6088. CPPFLAGS="$CPPFLAGS -mieee"
  6089. else
  6090. # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
  6091. # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
  6092. CPPFLAGS="$CPPFLAGS -ieee"
  6093. fi
  6094. ;;
  6095. sh*)
  6096. if test -n "$GCC"; then
  6097. # GCC has the option -mieee.
  6098. CPPFLAGS="$CPPFLAGS -mieee"
  6099. fi
  6100. ;;
  6101. esac
  6102. # Check whether --enable-threads was given.
  6103. if test "${enable_threads+set}" = set; then :
  6104. enableval=$enable_threads; gl_use_threads=$enableval
  6105. else
  6106. if test -n "$gl_use_threads_default"; then
  6107. gl_use_threads="$gl_use_threads_default"
  6108. else
  6109. case "$host_os" in
  6110. osf*) gl_use_threads=no ;;
  6111. cygwin*)
  6112. case `uname -r` in
  6113. 1.[0-5].*) gl_use_threads=no ;;
  6114. *) gl_use_threads=yes ;;
  6115. esac
  6116. ;;
  6117. mingw*)
  6118. case "$gl_use_winpthreads_default" in
  6119. yes) gl_use_threads=posix ;;
  6120. no) gl_use_threads=windows ;;
  6121. *) gl_use_threads=yes ;;
  6122. esac
  6123. ;;
  6124. *) gl_use_threads=yes ;;
  6125. esac
  6126. fi
  6127. fi
  6128. if test "$gl_use_threads" = yes \
  6129. || test "$gl_use_threads" = isoc \
  6130. || test "$gl_use_threads" = posix \
  6131. || test "$gl_use_threads" = isoc+posix; then
  6132. # For using <threads.h> or <pthread.h>:
  6133. if test -z "$gl_anythreadlib_early_done"; then
  6134. case "$host_os" in
  6135. osf*)
  6136. # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
  6137. # groks <pthread.h>. cc also understands the flag -pthread, but
  6138. # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
  6139. # 2. putting a flag into CPPFLAGS that has an effect on the linker
  6140. # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
  6141. # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
  6142. CPPFLAGS="$CPPFLAGS -D_REENTRANT"
  6143. ;;
  6144. esac
  6145. # Some systems optimize for single-threaded programs by default, and
  6146. # need special flags to disable these optimizations. For example, the
  6147. # definition of 'errno' in <errno.h>.
  6148. case "$host_os" in
  6149. aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
  6150. solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
  6151. esac
  6152. gl_anythreadlib_early_done=done
  6153. fi
  6154. fi
  6155. # Pre-early section.
  6156. # Code from module absolute-header:
  6157. # Code from module accept:
  6158. # Code from module alloca:
  6159. # Code from module alloca-opt:
  6160. # Code from module arpa_inet:
  6161. # Code from module assure:
  6162. # Code from module at-internal:
  6163. # Code from module attribute:
  6164. # Code from module basename-lgpl:
  6165. # Code from module bind:
  6166. # Code from module btowc:
  6167. # Code from module builtin-expect:
  6168. # Code from module c99:
  6169. # Code from module canonicalize-lgpl:
  6170. # Code from module chdir:
  6171. # Code from module chdir-long:
  6172. # Code from module chown:
  6173. # Code from module clock-time:
  6174. # Code from module cloexec:
  6175. # Code from module close:
  6176. # Code from module closedir:
  6177. # Code from module connect:
  6178. # Code from module count-one-bits:
  6179. # Code from module ctype:
  6180. # Code from module d-ino:
  6181. # Code from module d-type:
  6182. # Code from module dirent:
  6183. # Code from module dirfd:
  6184. # Code from module dirname-lgpl:
  6185. # Code from module double-slash-root:
  6186. # Code from module dup:
  6187. # Code from module dup2:
  6188. # Code from module eloop-threshold:
  6189. # Code from module environ:
  6190. # Code from module errno:
  6191. # Code from module error:
  6192. # Code from module exitfail:
  6193. # Code from module extensions:
  6194. # Code from module extern-inline:
  6195. # Code from module fchdir:
  6196. # Code from module fcntl:
  6197. # Code from module fcntl-h:
  6198. # Code from module fd-hook:
  6199. # Code from module fd-safer-flag:
  6200. # Code from module fdopendir:
  6201. # Code from module ffs:
  6202. # Code from module filename:
  6203. # Code from module filenamecat-lgpl:
  6204. # Code from module flexmember:
  6205. # Code from module float:
  6206. # Code from module fnmatch:
  6207. # Code from module fnmatch-gnu:
  6208. # Code from module fnmatch-h:
  6209. # Code from module fpieee:
  6210. # Code from module fpucw:
  6211. # Code from module free-posix:
  6212. # Code from module frexp:
  6213. # Code from module frexpl:
  6214. # Code from module fstat:
  6215. # Code from module fstatat:
  6216. # Code from module gendocs:
  6217. # Code from module getcwd:
  6218. # Code from module getcwd-lgpl:
  6219. # Code from module getdelim:
  6220. # Code from module getdtablesize:
  6221. # Code from module getline:
  6222. # Code from module getlogin_r:
  6223. # Code from module getprogname:
  6224. # Code from module getrandom:
  6225. # Code from module gettext-h:
  6226. # Code from module gettimeofday:
  6227. # Code from module gitlog-to-changelog:
  6228. # Code from module glob:
  6229. # Code from module glob-h:
  6230. # Code from module hard-locale:
  6231. # Code from module idx:
  6232. # Code from module include_next:
  6233. # Code from module inet_ntop:
  6234. # Code from module intprops:
  6235. # Code from module inttypes:
  6236. # Code from module inttypes-incomplete:
  6237. # Code from module isblank:
  6238. # Code from module isnand-nolibm:
  6239. # Code from module isnanl-nolibm:
  6240. # Code from module largefile:
  6241. # Code from module libc-config:
  6242. # Code from module limits-h:
  6243. # Code from module listen:
  6244. # Code from module localcharset:
  6245. # Code from module locale:
  6246. # Code from module lock:
  6247. # Code from module lstat:
  6248. # Code from module malloc-posix:
  6249. # Code from module malloca:
  6250. # Code from module math:
  6251. # Code from module mbrtowc:
  6252. # Code from module mbsinit:
  6253. # Code from module mbsrtowcs:
  6254. # Code from module mbtowc:
  6255. # Code from module memchr:
  6256. # Code from module memmem:
  6257. # Code from module memmem-simple:
  6258. # Code from module mempcpy:
  6259. # Code from module memrchr:
  6260. # Code from module minmax:
  6261. # Code from module mkdir:
  6262. # Code from module mkdtemp:
  6263. # Code from module mkostemp:
  6264. # Code from module msvc-inval:
  6265. # Code from module msvc-nothrow:
  6266. # Code from module multiarch:
  6267. # Code from module netdb:
  6268. # Code from module netinet_in:
  6269. # Code from module nocrash:
  6270. # Code from module open:
  6271. # Code from module openat:
  6272. # Code from module openat-die:
  6273. # Code from module openat-h:
  6274. # Code from module opendir:
  6275. # Code from module pathmax:
  6276. # Code from module pipe-posix:
  6277. # Code from module rawmemchr:
  6278. # Code from module readdir:
  6279. # Code from module readlink:
  6280. # Code from module realloc-posix:
  6281. # Code from module rename:
  6282. # Code from module rewinddir:
  6283. # Code from module rmdir:
  6284. # Code from module same-inode:
  6285. # Code from module save-cwd:
  6286. # Code from module scratch_buffer:
  6287. # Code from module select:
  6288. # Code from module setenv:
  6289. # Code from module setlocale-null:
  6290. # Code from module setsockopt:
  6291. # Code from module signal-h:
  6292. # Code from module snippet/_Noreturn:
  6293. # Code from module snippet/arg-nonnull:
  6294. # Code from module snippet/c++defs:
  6295. # Code from module snippet/warn-on-use:
  6296. # Code from module socket:
  6297. # Code from module socketlib:
  6298. # Code from module sockets:
  6299. # Code from module socklen:
  6300. # Code from module ssize_t:
  6301. # Code from module stat:
  6302. # Code from module stat-time:
  6303. # Code from module std-gnu11:
  6304. # Code from module stdalign:
  6305. # Code from module stdbool:
  6306. # Code from module stddef:
  6307. # Code from module stdint:
  6308. # Code from module stdio:
  6309. # Code from module stdlib:
  6310. # Code from module strchrnul:
  6311. # Code from module strdup-posix:
  6312. # Code from module streq:
  6313. # Code from module strerror:
  6314. # Code from module strerror-override:
  6315. # Code from module strerror_r-posix:
  6316. # Code from module string:
  6317. # Code from module strings:
  6318. # Code from module strnlen:
  6319. # Code from module strnlen1:
  6320. # Code from module strstr:
  6321. # Code from module strstr-simple:
  6322. # Code from module strtok_r:
  6323. # Code from module sys_random:
  6324. # Code from module sys_select:
  6325. # Code from module sys_socket:
  6326. # Code from module sys_stat:
  6327. # Code from module sys_time:
  6328. # Code from module sys_types:
  6329. # Code from module sys_uio:
  6330. # Code from module sys_wait:
  6331. # Code from module tempname:
  6332. # Code from module threadlib:
  6333. # Code from module time:
  6334. # Code from module time_r:
  6335. # Code from module unistd:
  6336. # Code from module unistd-safer:
  6337. # Code from module unsetenv:
  6338. # Code from module update-copyright:
  6339. # Code from module verify:
  6340. # Code from module wchar:
  6341. # Code from module wctype-h:
  6342. # Code from module windows-mutex:
  6343. # Code from module windows-once:
  6344. # Code from module windows-recmutex:
  6345. # Code from module windows-rwlock:
  6346. # Code from module wmemchr:
  6347. # Code from module wmempcpy:
  6348. # Code from module xalloc-oversized:
  6349. am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
  6350. ac_aux_dir=
  6351. for ac_dir in .. "$srcdir"/..; do
  6352. if test -f "$ac_dir/install-sh"; then
  6353. ac_aux_dir=$ac_dir
  6354. ac_install_sh="$ac_aux_dir/install-sh -c"
  6355. break
  6356. elif test -f "$ac_dir/install.sh"; then
  6357. ac_aux_dir=$ac_dir
  6358. ac_install_sh="$ac_aux_dir/install.sh -c"
  6359. break
  6360. elif test -f "$ac_dir/shtool"; then
  6361. ac_aux_dir=$ac_dir
  6362. ac_install_sh="$ac_aux_dir/shtool install -c"
  6363. break
  6364. fi
  6365. done
  6366. if test -z "$ac_aux_dir"; then
  6367. as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
  6368. fi
  6369. # These three variables are undocumented and unsupported,
  6370. # and are intended to be withdrawn in a future Autoconf release.
  6371. # They can cause serious problems if a builder's source tree is in a directory
  6372. # whose full name contains unusual characters.
  6373. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
  6374. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
  6375. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
  6376. # Check whether --enable-cross-guesses was given.
  6377. if test "${enable_cross_guesses+set}" = set; then :
  6378. enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
  6379. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
  6380. $as_echo "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
  6381. enableval=conservative
  6382. fi
  6383. gl_cross_guesses="$enableval"
  6384. else
  6385. gl_cross_guesses=conservative
  6386. fi
  6387. if test $gl_cross_guesses = risky; then
  6388. gl_cross_guess_normal="guessing yes"
  6389. gl_cross_guess_inverted="guessing no"
  6390. else
  6391. gl_cross_guess_normal="guessing no"
  6392. gl_cross_guess_inverted="guessing yes"
  6393. fi
  6394. LIBC_FATAL_STDERR_=1
  6395. export LIBC_FATAL_STDERR_
  6396. GNULIB_SOCKET=0;
  6397. GNULIB_CONNECT=0;
  6398. GNULIB_ACCEPT=0;
  6399. GNULIB_BIND=0;
  6400. GNULIB_GETPEERNAME=0;
  6401. GNULIB_GETSOCKNAME=0;
  6402. GNULIB_GETSOCKOPT=0;
  6403. GNULIB_LISTEN=0;
  6404. GNULIB_RECV=0;
  6405. GNULIB_SEND=0;
  6406. GNULIB_RECVFROM=0;
  6407. GNULIB_SENDTO=0;
  6408. GNULIB_SETSOCKOPT=0;
  6409. GNULIB_SHUTDOWN=0;
  6410. GNULIB_ACCEPT4=0;
  6411. HAVE_STRUCT_SOCKADDR_STORAGE=1;
  6412. HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
  6413. HAVE_SA_FAMILY_T=1;
  6414. HAVE_ACCEPT4=1;
  6415. if test $ac_cv_header_sys_socket_h = no; then
  6416. for ac_header in ws2tcpip.h
  6417. do :
  6418. ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
  6419. if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
  6420. cat >>confdefs.h <<_ACEOF
  6421. #define HAVE_WS2TCPIP_H 1
  6422. _ACEOF
  6423. fi
  6424. done
  6425. fi
  6426. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
  6427. $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
  6428. if ${gl_cv_have_include_next+:} false; then :
  6429. $as_echo_n "(cached) " >&6
  6430. else
  6431. rm -rf conftestd1a conftestd1b conftestd2
  6432. mkdir conftestd1a conftestd1b conftestd2
  6433. cat <<EOF > conftestd1a/conftest.h
  6434. #define DEFINED_IN_CONFTESTD1
  6435. #include_next <conftest.h>
  6436. #ifdef DEFINED_IN_CONFTESTD2
  6437. int foo;
  6438. #else
  6439. #error "include_next doesn't work"
  6440. #endif
  6441. EOF
  6442. cat <<EOF > conftestd1b/conftest.h
  6443. #define DEFINED_IN_CONFTESTD1
  6444. #include <stdio.h>
  6445. #include_next <conftest.h>
  6446. #ifdef DEFINED_IN_CONFTESTD2
  6447. int foo;
  6448. #else
  6449. #error "include_next doesn't work"
  6450. #endif
  6451. EOF
  6452. cat <<EOF > conftestd2/conftest.h
  6453. #ifndef DEFINED_IN_CONFTESTD1
  6454. #error "include_next test doesn't work"
  6455. #endif
  6456. #define DEFINED_IN_CONFTESTD2
  6457. EOF
  6458. gl_save_CPPFLAGS="$CPPFLAGS"
  6459. CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
  6460. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  6461. /* end confdefs.h. */
  6462. #include <conftest.h>
  6463. _ACEOF
  6464. if ac_fn_c_try_compile "$LINENO"; then :
  6465. gl_cv_have_include_next=yes
  6466. else
  6467. CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
  6468. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  6469. /* end confdefs.h. */
  6470. #include <conftest.h>
  6471. _ACEOF
  6472. if ac_fn_c_try_compile "$LINENO"; then :
  6473. gl_cv_have_include_next=buggy
  6474. else
  6475. gl_cv_have_include_next=no
  6476. fi
  6477. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  6478. fi
  6479. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  6480. CPPFLAGS="$gl_save_CPPFLAGS"
  6481. rm -rf conftestd1a conftestd1b conftestd2
  6482. fi
  6483. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
  6484. $as_echo "$gl_cv_have_include_next" >&6; }
  6485. PRAGMA_SYSTEM_HEADER=
  6486. if test $gl_cv_have_include_next = yes; then
  6487. INCLUDE_NEXT=include_next
  6488. INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
  6489. if test -n "$GCC"; then
  6490. PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
  6491. fi
  6492. else
  6493. if test $gl_cv_have_include_next = buggy; then
  6494. INCLUDE_NEXT=include
  6495. INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
  6496. else
  6497. INCLUDE_NEXT=include
  6498. INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
  6499. fi
  6500. fi
  6501. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
  6502. $as_echo_n "checking whether source code line length is unlimited... " >&6; }
  6503. if ${gl_cv_source_line_length_unlimited+:} false; then :
  6504. $as_echo_n "(cached) " >&6
  6505. else
  6506. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  6507. /* end confdefs.h. */
  6508. #ifdef __TANDEM
  6509. choke me
  6510. #endif
  6511. _ACEOF
  6512. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  6513. $EGREP "choke me" >/dev/null 2>&1; then :
  6514. gl_cv_source_line_length_unlimited=no
  6515. else
  6516. gl_cv_source_line_length_unlimited=yes
  6517. fi
  6518. rm -f conftest*
  6519. fi
  6520. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
  6521. $as_echo "$gl_cv_source_line_length_unlimited" >&6; }
  6522. if test $gl_cv_source_line_length_unlimited = no; then
  6523. PRAGMA_COLUMNS="#pragma COLUMNS 10000"
  6524. else
  6525. PRAGMA_COLUMNS=
  6526. fi
  6527. GNULIB_ACCESS=0;
  6528. GNULIB_CHDIR=0;
  6529. GNULIB_CHOWN=0;
  6530. GNULIB_CLOSE=0;
  6531. GNULIB_COPY_FILE_RANGE=0;
  6532. GNULIB_DUP=0;
  6533. GNULIB_DUP2=0;
  6534. GNULIB_DUP3=0;
  6535. GNULIB_ENVIRON=0;
  6536. GNULIB_EUIDACCESS=0;
  6537. GNULIB_EXECL=0;
  6538. GNULIB_EXECLE=0;
  6539. GNULIB_EXECLP=0;
  6540. GNULIB_EXECV=0;
  6541. GNULIB_EXECVE=0;
  6542. GNULIB_EXECVP=0;
  6543. GNULIB_EXECVPE=0;
  6544. GNULIB_FACCESSAT=0;
  6545. GNULIB_FCHDIR=0;
  6546. GNULIB_FCHOWNAT=0;
  6547. GNULIB_FDATASYNC=0;
  6548. GNULIB_FSYNC=0;
  6549. GNULIB_FTRUNCATE=0;
  6550. GNULIB_GETCWD=0;
  6551. GNULIB_GETDOMAINNAME=0;
  6552. GNULIB_GETDTABLESIZE=0;
  6553. GNULIB_GETENTROPY=0;
  6554. GNULIB_GETGROUPS=0;
  6555. GNULIB_GETHOSTNAME=0;
  6556. GNULIB_GETLOGIN=0;
  6557. GNULIB_GETLOGIN_R=0;
  6558. GNULIB_GETOPT_POSIX=0;
  6559. GNULIB_GETPAGESIZE=0;
  6560. GNULIB_GETPASS=0;
  6561. GNULIB_GETUSERSHELL=0;
  6562. GNULIB_GROUP_MEMBER=0;
  6563. GNULIB_ISATTY=0;
  6564. GNULIB_LCHOWN=0;
  6565. GNULIB_LINK=0;
  6566. GNULIB_LINKAT=0;
  6567. GNULIB_LSEEK=0;
  6568. GNULIB_PIPE=0;
  6569. GNULIB_PIPE2=0;
  6570. GNULIB_PREAD=0;
  6571. GNULIB_PWRITE=0;
  6572. GNULIB_READ=0;
  6573. GNULIB_READLINK=0;
  6574. GNULIB_READLINKAT=0;
  6575. GNULIB_RMDIR=0;
  6576. GNULIB_SETHOSTNAME=0;
  6577. GNULIB_SLEEP=0;
  6578. GNULIB_SYMLINK=0;
  6579. GNULIB_SYMLINKAT=0;
  6580. GNULIB_TRUNCATE=0;
  6581. GNULIB_TTYNAME_R=0;
  6582. GNULIB_UNISTD_H_NONBLOCKING=0;
  6583. GNULIB_UNISTD_H_SIGPIPE=0;
  6584. GNULIB_UNLINK=0;
  6585. GNULIB_UNLINKAT=0;
  6586. GNULIB_USLEEP=0;
  6587. GNULIB_WRITE=0;
  6588. GNULIB_MDA_ACCESS=1;
  6589. GNULIB_MDA_CHDIR=1;
  6590. GNULIB_MDA_CLOSE=1;
  6591. GNULIB_MDA_DUP=1;
  6592. GNULIB_MDA_DUP2=1;
  6593. GNULIB_MDA_EXECL=1;
  6594. GNULIB_MDA_EXECLE=1;
  6595. GNULIB_MDA_EXECLP=1;
  6596. GNULIB_MDA_EXECV=1;
  6597. GNULIB_MDA_EXECVE=1;
  6598. GNULIB_MDA_EXECVP=1;
  6599. GNULIB_MDA_EXECVPE=1;
  6600. GNULIB_MDA_GETCWD=1;
  6601. GNULIB_MDA_GETPID=1;
  6602. GNULIB_MDA_ISATTY=1;
  6603. GNULIB_MDA_LSEEK=1;
  6604. GNULIB_MDA_READ=1;
  6605. GNULIB_MDA_RMDIR=1;
  6606. GNULIB_MDA_SWAB=1;
  6607. GNULIB_MDA_UNLINK=1;
  6608. GNULIB_MDA_WRITE=1;
  6609. HAVE_CHOWN=1;
  6610. HAVE_COPY_FILE_RANGE=1;
  6611. HAVE_DUP3=1;
  6612. HAVE_EUIDACCESS=1;
  6613. HAVE_EXECVPE=1;
  6614. HAVE_FACCESSAT=1;
  6615. HAVE_FCHDIR=1;
  6616. HAVE_FCHOWNAT=1;
  6617. HAVE_FDATASYNC=1;
  6618. HAVE_FSYNC=1;
  6619. HAVE_FTRUNCATE=1;
  6620. HAVE_GETDTABLESIZE=1;
  6621. HAVE_GETENTROPY=1;
  6622. HAVE_GETGROUPS=1;
  6623. HAVE_GETHOSTNAME=1;
  6624. HAVE_GETLOGIN=1;
  6625. HAVE_GETPAGESIZE=1;
  6626. HAVE_GETPASS=1;
  6627. HAVE_GROUP_MEMBER=1;
  6628. HAVE_LCHOWN=1;
  6629. HAVE_LINK=1;
  6630. HAVE_LINKAT=1;
  6631. HAVE_PIPE=1;
  6632. HAVE_PIPE2=1;
  6633. HAVE_PREAD=1;
  6634. HAVE_PWRITE=1;
  6635. HAVE_READLINK=1;
  6636. HAVE_READLINKAT=1;
  6637. HAVE_SETHOSTNAME=1;
  6638. HAVE_SLEEP=1;
  6639. HAVE_SYMLINK=1;
  6640. HAVE_SYMLINKAT=1;
  6641. HAVE_UNLINKAT=1;
  6642. HAVE_USLEEP=1;
  6643. HAVE_DECL_ENVIRON=1;
  6644. HAVE_DECL_EXECVPE=1;
  6645. HAVE_DECL_FCHDIR=1;
  6646. HAVE_DECL_FDATASYNC=1;
  6647. HAVE_DECL_GETDOMAINNAME=1;
  6648. HAVE_DECL_GETLOGIN=1;
  6649. HAVE_DECL_GETLOGIN_R=1;
  6650. HAVE_DECL_GETPAGESIZE=1;
  6651. HAVE_DECL_GETUSERSHELL=1;
  6652. HAVE_DECL_SETHOSTNAME=1;
  6653. HAVE_DECL_TRUNCATE=1;
  6654. HAVE_DECL_TTYNAME_R=1;
  6655. HAVE_OS_H=0;
  6656. HAVE_SYS_PARAM_H=0;
  6657. REPLACE_ACCESS=0;
  6658. REPLACE_CHOWN=0;
  6659. REPLACE_CLOSE=0;
  6660. REPLACE_DUP=0;
  6661. REPLACE_DUP2=0;
  6662. REPLACE_EXECL=0;
  6663. REPLACE_EXECLE=0;
  6664. REPLACE_EXECLP=0;
  6665. REPLACE_EXECV=0;
  6666. REPLACE_EXECVE=0;
  6667. REPLACE_EXECVP=0;
  6668. REPLACE_EXECVPE=0;
  6669. REPLACE_FACCESSAT=0;
  6670. REPLACE_FCHOWNAT=0;
  6671. REPLACE_FTRUNCATE=0;
  6672. REPLACE_GETCWD=0;
  6673. REPLACE_GETDOMAINNAME=0;
  6674. REPLACE_GETDTABLESIZE=0;
  6675. REPLACE_GETLOGIN_R=0;
  6676. REPLACE_GETGROUPS=0;
  6677. REPLACE_GETPAGESIZE=0;
  6678. REPLACE_GETPASS=0;
  6679. REPLACE_ISATTY=0;
  6680. REPLACE_LCHOWN=0;
  6681. REPLACE_LINK=0;
  6682. REPLACE_LINKAT=0;
  6683. REPLACE_LSEEK=0;
  6684. REPLACE_PREAD=0;
  6685. REPLACE_PWRITE=0;
  6686. REPLACE_READ=0;
  6687. REPLACE_READLINK=0;
  6688. REPLACE_READLINKAT=0;
  6689. REPLACE_RMDIR=0;
  6690. REPLACE_SLEEP=0;
  6691. REPLACE_SYMLINK=0;
  6692. REPLACE_SYMLINKAT=0;
  6693. REPLACE_TRUNCATE=0;
  6694. REPLACE_TTYNAME_R=0;
  6695. REPLACE_UNLINK=0;
  6696. REPLACE_UNLINKAT=0;
  6697. REPLACE_USLEEP=0;
  6698. REPLACE_WRITE=0;
  6699. UNISTD_H_HAVE_SYS_RANDOM_H=0;
  6700. UNISTD_H_HAVE_WINSOCK2_H=0;
  6701. UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
  6702. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
  6703. $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
  6704. if ${ac_cv_c_restrict+:} false; then :
  6705. $as_echo_n "(cached) " >&6
  6706. else
  6707. ac_cv_c_restrict=no
  6708. # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
  6709. # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
  6710. # Put 'restrict' last, because C++ lacks it.
  6711. for ac_kw in __restrict__ __restrict _Restrict restrict; do
  6712. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  6713. /* end confdefs.h. */
  6714. typedef int *int_ptr;
  6715. int foo (int_ptr $ac_kw ip) { return ip[0]; }
  6716. int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
  6717. int bar (int ip[$ac_kw]) { return ip[0]; }
  6718. int
  6719. main ()
  6720. {
  6721. int s[1];
  6722. int *$ac_kw t = s;
  6723. t[0] = 0;
  6724. return foo (t) + bar (t);
  6725. ;
  6726. return 0;
  6727. }
  6728. _ACEOF
  6729. if ac_fn_c_try_compile "$LINENO"; then :
  6730. ac_cv_c_restrict=$ac_kw
  6731. fi
  6732. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  6733. test "$ac_cv_c_restrict" != no && break
  6734. done
  6735. fi
  6736. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
  6737. $as_echo "$ac_cv_c_restrict" >&6; }
  6738. case $ac_cv_c_restrict in
  6739. restrict) ;;
  6740. no) $as_echo "#define restrict /**/" >>confdefs.h
  6741. ;;
  6742. *) cat >>confdefs.h <<_ACEOF
  6743. #define restrict $ac_cv_c_restrict
  6744. _ACEOF
  6745. ;;
  6746. esac
  6747. case "$host_os" in
  6748. osf*)
  6749. $as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
  6750. ;;
  6751. esac
  6752. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
  6753. $as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
  6754. if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
  6755. $as_echo_n "(cached) " >&6
  6756. else
  6757. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  6758. /* end confdefs.h. */
  6759. #include <sys/socket.h>
  6760. int
  6761. main ()
  6762. {
  6763. ;
  6764. return 0;
  6765. }
  6766. _ACEOF
  6767. if ac_fn_c_try_compile "$LINENO"; then :
  6768. gl_cv_header_sys_socket_h_selfcontained=yes
  6769. else
  6770. gl_cv_header_sys_socket_h_selfcontained=no
  6771. fi
  6772. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  6773. fi
  6774. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
  6775. $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
  6776. if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
  6777. for ac_func in shutdown
  6778. do :
  6779. ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
  6780. if test "x$ac_cv_func_shutdown" = xyes; then :
  6781. cat >>confdefs.h <<_ACEOF
  6782. #define HAVE_SHUTDOWN 1
  6783. _ACEOF
  6784. fi
  6785. done
  6786. if test $ac_cv_func_shutdown = yes; then
  6787. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
  6788. $as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
  6789. if ${gl_cv_header_sys_socket_h_shut+:} false; then :
  6790. $as_echo_n "(cached) " >&6
  6791. else
  6792. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  6793. /* end confdefs.h. */
  6794. #include <sys/socket.h>
  6795. int
  6796. main ()
  6797. {
  6798. int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
  6799. ;
  6800. return 0;
  6801. }
  6802. _ACEOF
  6803. if ac_fn_c_try_compile "$LINENO"; then :
  6804. gl_cv_header_sys_socket_h_shut=yes
  6805. else
  6806. gl_cv_header_sys_socket_h_shut=no
  6807. fi
  6808. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  6809. fi
  6810. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
  6811. $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
  6812. if test $gl_cv_header_sys_socket_h_shut = no; then
  6813. SYS_SOCKET_H='sys/socket.h'
  6814. fi
  6815. fi
  6816. fi
  6817. # We need to check for ws2tcpip.h now.
  6818. if test $gl_cv_have_include_next = yes; then
  6819. gl_cv_next_sys_socket_h='<'sys/socket.h'>'
  6820. else
  6821. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
  6822. $as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
  6823. if ${gl_cv_next_sys_socket_h+:} false; then :
  6824. $as_echo_n "(cached) " >&6
  6825. else
  6826. if test $ac_cv_header_sys_socket_h = yes; then
  6827. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  6828. /* end confdefs.h. */
  6829. #include <sys/socket.h>
  6830. _ACEOF
  6831. case "$host_os" in
  6832. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  6833. *) gl_absname_cpp="$ac_cpp" ;;
  6834. esac
  6835. case "$host_os" in
  6836. mingw*)
  6837. gl_dirsep_regex='[/\\]'
  6838. ;;
  6839. *)
  6840. gl_dirsep_regex='\/'
  6841. ;;
  6842. esac
  6843. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  6844. gl_header_literal_regex=`echo 'sys/socket.h' \
  6845. | sed -e "$gl_make_literal_regex_sed"`
  6846. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  6847. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  6848. s|^/[^/]|//&|
  6849. p
  6850. q
  6851. }'
  6852. gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  6853. sed -n "$gl_absolute_header_sed"`
  6854. gl_header=$gl_cv_absolute_sys_socket_h
  6855. gl_cv_next_sys_socket_h='"'$gl_header'"'
  6856. else
  6857. gl_cv_next_sys_socket_h='<'sys/socket.h'>'
  6858. fi
  6859. fi
  6860. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
  6861. $as_echo "$gl_cv_next_sys_socket_h" >&6; }
  6862. fi
  6863. NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
  6864. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  6865. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  6866. gl_next_as_first_directive='<'sys/socket.h'>'
  6867. else
  6868. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  6869. gl_next_as_first_directive=$gl_cv_next_sys_socket_h
  6870. fi
  6871. NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
  6872. if test $ac_cv_header_sys_socket_h = yes; then
  6873. HAVE_SYS_SOCKET_H=1
  6874. else
  6875. HAVE_SYS_SOCKET_H=0
  6876. fi
  6877. if test $ac_cv_header_sys_socket_h = yes; then
  6878. HAVE_WS2TCPIP_H=0
  6879. else
  6880. if test $ac_cv_header_ws2tcpip_h = yes; then
  6881. HAVE_WS2TCPIP_H=1
  6882. else
  6883. HAVE_WS2TCPIP_H=0
  6884. fi
  6885. fi
  6886. ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
  6887. /* sys/types.h is not needed according to POSIX, but the
  6888. sys/socket.h in i386-unknown-freebsd4.10 and
  6889. powerpc-apple-darwin5.5 required it. */
  6890. #include <sys/types.h>
  6891. #ifdef HAVE_SYS_SOCKET_H
  6892. #include <sys/socket.h>
  6893. #endif
  6894. #ifdef HAVE_WS2TCPIP_H
  6895. #include <ws2tcpip.h>
  6896. #endif
  6897. "
  6898. if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
  6899. cat >>confdefs.h <<_ACEOF
  6900. #define HAVE_STRUCT_SOCKADDR_STORAGE 1
  6901. _ACEOF
  6902. fi
  6903. ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
  6904. /* sys/types.h is not needed according to POSIX, but the
  6905. sys/socket.h in i386-unknown-freebsd4.10 and
  6906. powerpc-apple-darwin5.5 required it. */
  6907. #include <sys/types.h>
  6908. #ifdef HAVE_SYS_SOCKET_H
  6909. #include <sys/socket.h>
  6910. #endif
  6911. #ifdef HAVE_WS2TCPIP_H
  6912. #include <ws2tcpip.h>
  6913. #endif
  6914. "
  6915. if test "x$ac_cv_type_sa_family_t" = xyes; then :
  6916. cat >>confdefs.h <<_ACEOF
  6917. #define HAVE_SA_FAMILY_T 1
  6918. _ACEOF
  6919. fi
  6920. if test $ac_cv_type_struct_sockaddr_storage = no; then
  6921. HAVE_STRUCT_SOCKADDR_STORAGE=0
  6922. fi
  6923. if test $ac_cv_type_sa_family_t = no; then
  6924. HAVE_SA_FAMILY_T=0
  6925. fi
  6926. if test $ac_cv_type_struct_sockaddr_storage != no; then
  6927. ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
  6928. #ifdef HAVE_SYS_SOCKET_H
  6929. #include <sys/socket.h>
  6930. #endif
  6931. #ifdef HAVE_WS2TCPIP_H
  6932. #include <ws2tcpip.h>
  6933. #endif
  6934. "
  6935. if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
  6936. cat >>confdefs.h <<_ACEOF
  6937. #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
  6938. _ACEOF
  6939. else
  6940. HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
  6941. fi
  6942. fi
  6943. if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
  6944. || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
  6945. SYS_SOCKET_H='sys/socket.h'
  6946. fi
  6947. if test $ac_cv_header_sys_socket_h != yes; then
  6948. for ac_header in winsock2.h
  6949. do :
  6950. ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
  6951. if test "x$ac_cv_header_winsock2_h" = xyes; then :
  6952. cat >>confdefs.h <<_ACEOF
  6953. #define HAVE_WINSOCK2_H 1
  6954. _ACEOF
  6955. fi
  6956. done
  6957. fi
  6958. if test "$ac_cv_header_winsock2_h" = yes; then
  6959. HAVE_WINSOCK2_H=1
  6960. UNISTD_H_HAVE_WINSOCK2_H=1
  6961. SYS_IOCTL_H_HAVE_WINSOCK2_H=1
  6962. else
  6963. HAVE_WINSOCK2_H=0
  6964. fi
  6965. ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
  6966. if test "x$ac_cv_type_size_t" = xyes; then :
  6967. else
  6968. cat >>confdefs.h <<_ACEOF
  6969. #define size_t unsigned int
  6970. _ACEOF
  6971. fi
  6972. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  6973. # for constant arguments. Useless!
  6974. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
  6975. $as_echo_n "checking for working alloca.h... " >&6; }
  6976. if ${ac_cv_working_alloca_h+:} false; then :
  6977. $as_echo_n "(cached) " >&6
  6978. else
  6979. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  6980. /* end confdefs.h. */
  6981. #include <alloca.h>
  6982. int
  6983. main ()
  6984. {
  6985. char *p = (char *) alloca (2 * sizeof (int));
  6986. if (p) return 0;
  6987. ;
  6988. return 0;
  6989. }
  6990. _ACEOF
  6991. if ac_fn_c_try_link "$LINENO"; then :
  6992. ac_cv_working_alloca_h=yes
  6993. else
  6994. ac_cv_working_alloca_h=no
  6995. fi
  6996. rm -f core conftest.err conftest.$ac_objext \
  6997. conftest$ac_exeext conftest.$ac_ext
  6998. fi
  6999. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
  7000. $as_echo "$ac_cv_working_alloca_h" >&6; }
  7001. if test $ac_cv_working_alloca_h = yes; then
  7002. $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
  7003. fi
  7004. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
  7005. $as_echo_n "checking for alloca... " >&6; }
  7006. if ${ac_cv_func_alloca_works+:} false; then :
  7007. $as_echo_n "(cached) " >&6
  7008. else
  7009. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  7010. /* end confdefs.h. */
  7011. #ifdef __GNUC__
  7012. # define alloca __builtin_alloca
  7013. #else
  7014. # ifdef _MSC_VER
  7015. # include <malloc.h>
  7016. # define alloca _alloca
  7017. # else
  7018. # ifdef HAVE_ALLOCA_H
  7019. # include <alloca.h>
  7020. # else
  7021. # ifdef _AIX
  7022. #pragma alloca
  7023. # else
  7024. # ifndef alloca /* predefined by HP cc +Olibcalls */
  7025. void *alloca (size_t);
  7026. # endif
  7027. # endif
  7028. # endif
  7029. # endif
  7030. #endif
  7031. int
  7032. main ()
  7033. {
  7034. char *p = (char *) alloca (1);
  7035. if (p) return 0;
  7036. ;
  7037. return 0;
  7038. }
  7039. _ACEOF
  7040. if ac_fn_c_try_link "$LINENO"; then :
  7041. ac_cv_func_alloca_works=yes
  7042. else
  7043. ac_cv_func_alloca_works=no
  7044. fi
  7045. rm -f core conftest.err conftest.$ac_objext \
  7046. conftest$ac_exeext conftest.$ac_ext
  7047. fi
  7048. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
  7049. $as_echo "$ac_cv_func_alloca_works" >&6; }
  7050. if test $ac_cv_func_alloca_works = yes; then
  7051. $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
  7052. else
  7053. # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  7054. # that cause trouble. Some versions do not even contain alloca or
  7055. # contain a buggy version. If you still want to use their alloca,
  7056. # use ar to extract alloca.o from them instead of compiling alloca.c.
  7057. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
  7058. $as_echo "#define C_ALLOCA 1" >>confdefs.h
  7059. { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
  7060. $as_echo_n "checking stack direction for C alloca... " >&6; }
  7061. if ${ac_cv_c_stack_direction+:} false; then :
  7062. $as_echo_n "(cached) " >&6
  7063. else
  7064. if test "$cross_compiling" = yes; then :
  7065. ac_cv_c_stack_direction=0
  7066. else
  7067. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  7068. /* end confdefs.h. */
  7069. $ac_includes_default
  7070. int
  7071. find_stack_direction (int *addr, int depth)
  7072. {
  7073. int dir, dummy = 0;
  7074. if (! addr)
  7075. addr = &dummy;
  7076. *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
  7077. dir = depth ? find_stack_direction (addr, depth - 1) : 0;
  7078. return dir + dummy;
  7079. }
  7080. int
  7081. main (int argc, char **argv)
  7082. {
  7083. return find_stack_direction (0, argc + !argv + 20) < 0;
  7084. }
  7085. _ACEOF
  7086. if ac_fn_c_try_run "$LINENO"; then :
  7087. ac_cv_c_stack_direction=1
  7088. else
  7089. ac_cv_c_stack_direction=-1
  7090. fi
  7091. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  7092. conftest.$ac_objext conftest.beam conftest.$ac_ext
  7093. fi
  7094. fi
  7095. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
  7096. $as_echo "$ac_cv_c_stack_direction" >&6; }
  7097. cat >>confdefs.h <<_ACEOF
  7098. #define STACK_DIRECTION $ac_cv_c_stack_direction
  7099. _ACEOF
  7100. fi
  7101. GNULIB_INET_NTOP=0;
  7102. GNULIB_INET_PTON=0;
  7103. HAVE_DECL_INET_NTOP=1;
  7104. HAVE_DECL_INET_PTON=1;
  7105. REPLACE_INET_NTOP=0;
  7106. REPLACE_INET_PTON=0;
  7107. if test $ac_cv_header_features_h = yes; then
  7108. HAVE_FEATURES_H=1
  7109. else
  7110. HAVE_FEATURES_H=0
  7111. fi
  7112. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
  7113. $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
  7114. if test -z "$MKDIR_P"; then
  7115. if ${ac_cv_path_mkdir+:} false; then :
  7116. $as_echo_n "(cached) " >&6
  7117. else
  7118. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7119. for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
  7120. do
  7121. IFS=$as_save_IFS
  7122. test -z "$as_dir" && as_dir=.
  7123. for ac_prog in mkdir gmkdir; do
  7124. for ac_exec_ext in '' $ac_executable_extensions; do
  7125. as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
  7126. case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
  7127. 'mkdir (GNU coreutils) '* | \
  7128. 'mkdir (coreutils) '* | \
  7129. 'mkdir (fileutils) '4.1*)
  7130. ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
  7131. break 3;;
  7132. esac
  7133. done
  7134. done
  7135. done
  7136. IFS=$as_save_IFS
  7137. fi
  7138. test -d ./--version && rmdir ./--version
  7139. if test "${ac_cv_path_mkdir+set}" = set; then
  7140. MKDIR_P="$ac_cv_path_mkdir -p"
  7141. else
  7142. # As a last resort, use the slow shell script. Don't cache a
  7143. # value for MKDIR_P within a source directory, because that will
  7144. # break other packages using the cache if that directory is
  7145. # removed, or if the value is a relative name.
  7146. MKDIR_P="$ac_install_sh -d"
  7147. fi
  7148. fi
  7149. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
  7150. $as_echo "$MKDIR_P" >&6; }
  7151. GNULIB_BTOWC=0;
  7152. GNULIB_WCTOB=0;
  7153. GNULIB_MBSINIT=0;
  7154. GNULIB_MBRTOWC=0;
  7155. GNULIB_MBRLEN=0;
  7156. GNULIB_MBSRTOWCS=0;
  7157. GNULIB_MBSNRTOWCS=0;
  7158. GNULIB_WCRTOMB=0;
  7159. GNULIB_WCSRTOMBS=0;
  7160. GNULIB_WCSNRTOMBS=0;
  7161. GNULIB_WCWIDTH=0;
  7162. GNULIB_WMEMCHR=0;
  7163. GNULIB_WMEMCMP=0;
  7164. GNULIB_WMEMCPY=0;
  7165. GNULIB_WMEMMOVE=0;
  7166. GNULIB_WMEMPCPY=0;
  7167. GNULIB_WMEMSET=0;
  7168. GNULIB_WCSLEN=0;
  7169. GNULIB_WCSNLEN=0;
  7170. GNULIB_WCSCPY=0;
  7171. GNULIB_WCPCPY=0;
  7172. GNULIB_WCSNCPY=0;
  7173. GNULIB_WCPNCPY=0;
  7174. GNULIB_WCSCAT=0;
  7175. GNULIB_WCSNCAT=0;
  7176. GNULIB_WCSCMP=0;
  7177. GNULIB_WCSNCMP=0;
  7178. GNULIB_WCSCASECMP=0;
  7179. GNULIB_WCSNCASECMP=0;
  7180. GNULIB_WCSCOLL=0;
  7181. GNULIB_WCSXFRM=0;
  7182. GNULIB_WCSDUP=0;
  7183. GNULIB_WCSCHR=0;
  7184. GNULIB_WCSRCHR=0;
  7185. GNULIB_WCSCSPN=0;
  7186. GNULIB_WCSSPN=0;
  7187. GNULIB_WCSPBRK=0;
  7188. GNULIB_WCSSTR=0;
  7189. GNULIB_WCSTOK=0;
  7190. GNULIB_WCSWIDTH=0;
  7191. GNULIB_WCSFTIME=0;
  7192. GNULIB_MDA_WCSDUP=1;
  7193. HAVE_BTOWC=1;
  7194. HAVE_MBSINIT=1;
  7195. HAVE_MBRTOWC=1;
  7196. HAVE_MBRLEN=1;
  7197. HAVE_MBSRTOWCS=1;
  7198. HAVE_MBSNRTOWCS=1;
  7199. HAVE_WCRTOMB=1;
  7200. HAVE_WCSRTOMBS=1;
  7201. HAVE_WCSNRTOMBS=1;
  7202. HAVE_WMEMCHR=1;
  7203. HAVE_WMEMCMP=1;
  7204. HAVE_WMEMCPY=1;
  7205. HAVE_WMEMMOVE=1;
  7206. HAVE_WMEMPCPY=1;
  7207. HAVE_WMEMSET=1;
  7208. HAVE_WCSLEN=1;
  7209. HAVE_WCSNLEN=1;
  7210. HAVE_WCSCPY=1;
  7211. HAVE_WCPCPY=1;
  7212. HAVE_WCSNCPY=1;
  7213. HAVE_WCPNCPY=1;
  7214. HAVE_WCSCAT=1;
  7215. HAVE_WCSNCAT=1;
  7216. HAVE_WCSCMP=1;
  7217. HAVE_WCSNCMP=1;
  7218. HAVE_WCSCASECMP=1;
  7219. HAVE_WCSNCASECMP=1;
  7220. HAVE_WCSCOLL=1;
  7221. HAVE_WCSXFRM=1;
  7222. HAVE_WCSDUP=1;
  7223. HAVE_WCSCHR=1;
  7224. HAVE_WCSRCHR=1;
  7225. HAVE_WCSCSPN=1;
  7226. HAVE_WCSSPN=1;
  7227. HAVE_WCSPBRK=1;
  7228. HAVE_WCSSTR=1;
  7229. HAVE_WCSTOK=1;
  7230. HAVE_WCSWIDTH=1;
  7231. HAVE_WCSFTIME=1;
  7232. HAVE_DECL_WCTOB=1;
  7233. HAVE_DECL_WCSDUP=1;
  7234. HAVE_DECL_WCWIDTH=1;
  7235. REPLACE_MBSTATE_T=0;
  7236. REPLACE_BTOWC=0;
  7237. REPLACE_WCTOB=0;
  7238. REPLACE_MBSINIT=0;
  7239. REPLACE_MBRTOWC=0;
  7240. REPLACE_MBRLEN=0;
  7241. REPLACE_MBSRTOWCS=0;
  7242. REPLACE_MBSNRTOWCS=0;
  7243. REPLACE_WCRTOMB=0;
  7244. REPLACE_WCSRTOMBS=0;
  7245. REPLACE_WCSNRTOMBS=0;
  7246. REPLACE_WCWIDTH=0;
  7247. REPLACE_WCSWIDTH=0;
  7248. REPLACE_WCSFTIME=0;
  7249. REPLACE_WCSTOK=0;
  7250. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
  7251. $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
  7252. if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
  7253. $as_echo_n "(cached) " >&6
  7254. else
  7255. gl_cv_header_wchar_h_correct_inline=yes
  7256. case "$host_os" in
  7257. *-gnu* | gnu*)
  7258. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  7259. /* end confdefs.h. */
  7260. #define wcstod renamed_wcstod
  7261. #include <wchar.h>
  7262. extern int zero (void);
  7263. int main () { return zero(); }
  7264. _ACEOF
  7265. save_ac_compile="$ac_compile"
  7266. ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
  7267. if echo '#include "conftest.c"' >conftest1.c \
  7268. && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  7269. (eval $ac_compile) 2>&5
  7270. ac_status=$?
  7271. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  7272. test $ac_status = 0; }; then
  7273. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  7274. /* end confdefs.h. */
  7275. #define wcstod renamed_wcstod
  7276. #include <wchar.h>
  7277. int zero (void) { return 0; }
  7278. _ACEOF
  7279. ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
  7280. if echo '#include "conftest.c"' >conftest2.c \
  7281. && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  7282. (eval $ac_compile) 2>&5
  7283. ac_status=$?
  7284. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  7285. test $ac_status = 0; }; then
  7286. if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
  7287. :
  7288. else
  7289. gl_cv_header_wchar_h_correct_inline=no
  7290. fi
  7291. fi
  7292. fi
  7293. ac_compile="$save_ac_compile"
  7294. rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
  7295. ;;
  7296. esac
  7297. fi
  7298. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
  7299. $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
  7300. if test $gl_cv_header_wchar_h_correct_inline = no; then
  7301. as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
  7302. This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
  7303. C99 mode. You have four options:
  7304. - Add the flag -fgnu89-inline to CC and reconfigure, or
  7305. - Fix your include files, using parts of
  7306. <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
  7307. - Use a gcc version older than 4.3, or
  7308. - Don't use the flags -std=c99 or -std=gnu99.
  7309. Configuration aborted." "$LINENO" 5
  7310. fi
  7311. for ac_func in $ac_func_list
  7312. do :
  7313. as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
  7314. ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
  7315. if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
  7316. cat >>confdefs.h <<_ACEOF
  7317. #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  7318. _ACEOF
  7319. fi
  7320. done
  7321. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
  7322. $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
  7323. if ${am_cv_langinfo_codeset+:} false; then :
  7324. $as_echo_n "(cached) " >&6
  7325. else
  7326. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  7327. /* end confdefs.h. */
  7328. #include <langinfo.h>
  7329. int
  7330. main ()
  7331. {
  7332. char* cs = nl_langinfo(CODESET); return !cs;
  7333. ;
  7334. return 0;
  7335. }
  7336. _ACEOF
  7337. if ac_fn_c_try_link "$LINENO"; then :
  7338. am_cv_langinfo_codeset=yes
  7339. else
  7340. am_cv_langinfo_codeset=no
  7341. fi
  7342. rm -f core conftest.err conftest.$ac_objext \
  7343. conftest$ac_exeext conftest.$ac_ext
  7344. fi
  7345. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
  7346. $as_echo "$am_cv_langinfo_codeset" >&6; }
  7347. if test $am_cv_langinfo_codeset = yes; then
  7348. $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
  7349. fi
  7350. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
  7351. $as_echo_n "checking for a traditional french locale... " >&6; }
  7352. if ${gt_cv_locale_fr+:} false; then :
  7353. $as_echo_n "(cached) " >&6
  7354. else
  7355. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  7356. /* end confdefs.h. */
  7357. #include <locale.h>
  7358. #include <time.h>
  7359. #if HAVE_LANGINFO_CODESET
  7360. # include <langinfo.h>
  7361. #endif
  7362. #include <stdlib.h>
  7363. #include <string.h>
  7364. struct tm t;
  7365. char buf[16];
  7366. int main () {
  7367. /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
  7368. imitates locale dependent behaviour by looking at the environment
  7369. variables, and all locales use the UTF-8 encoding. */
  7370. #if defined __BEOS__ || defined __HAIKU__
  7371. return 1;
  7372. #else
  7373. /* Check whether the given locale name is recognized by the system. */
  7374. # if defined _WIN32 && !defined __CYGWIN__
  7375. /* On native Windows, setlocale(category, "") looks at the system settings,
  7376. not at the environment variables. Also, when an encoding suffix such
  7377. as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
  7378. category of the locale to "C". */
  7379. if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
  7380. || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
  7381. return 1;
  7382. # else
  7383. if (setlocale (LC_ALL, "") == NULL) return 1;
  7384. # endif
  7385. /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
  7386. On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
  7387. is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
  7388. On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
  7389. succeeds but then nl_langinfo(CODESET) is "646". In this situation,
  7390. some unit tests fail.
  7391. On MirBSD 10, when an unsupported locale is specified, setlocale()
  7392. succeeds but then nl_langinfo(CODESET) is "UTF-8". */
  7393. # if HAVE_LANGINFO_CODESET
  7394. {
  7395. const char *cs = nl_langinfo (CODESET);
  7396. if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
  7397. || strcmp (cs, "UTF-8") == 0)
  7398. return 1;
  7399. }
  7400. # endif
  7401. # ifdef __CYGWIN__
  7402. /* On Cygwin, avoid locale names without encoding suffix, because the
  7403. locale_charset() function relies on the encoding suffix. Note that
  7404. LC_ALL is set on the command line. */
  7405. if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
  7406. # endif
  7407. /* Check whether in the abbreviation of the second month, the second
  7408. character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
  7409. one byte long. This excludes the UTF-8 encoding. */
  7410. t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
  7411. if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
  7412. # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
  7413. /* Check whether the decimal separator is a comma.
  7414. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
  7415. are nl_langinfo(RADIXCHAR) are both ".". */
  7416. if (localeconv () ->decimal_point[0] != ',') return 1;
  7417. # endif
  7418. return 0;
  7419. #endif
  7420. }
  7421. _ACEOF
  7422. if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
  7423. (eval $ac_link) 2>&5
  7424. ac_status=$?
  7425. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  7426. test $ac_status = 0; } && test -s conftest$ac_exeext; then
  7427. case "$host_os" in
  7428. # Handle native Windows specially, because there setlocale() interprets
  7429. # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
  7430. # "fr" or "fra" as "French" or "French_France.1252",
  7431. # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
  7432. # "ja" as "Japanese" or "Japanese_Japan.932",
  7433. # and similar.
  7434. mingw*)
  7435. # Test for the native Windows locale name.
  7436. if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
  7437. gt_cv_locale_fr=French_France.1252
  7438. else
  7439. # None found.
  7440. gt_cv_locale_fr=none
  7441. fi
  7442. ;;
  7443. *)
  7444. # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
  7445. # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
  7446. # configure script would override the LC_ALL setting. Likewise for
  7447. # LC_CTYPE, which is also set at the beginning of the configure script.
  7448. # Test for the usual locale name.
  7449. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
  7450. gt_cv_locale_fr=fr_FR
  7451. else
  7452. # Test for the locale name with explicit encoding suffix.
  7453. if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
  7454. gt_cv_locale_fr=fr_FR.ISO-8859-1
  7455. else
  7456. # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
  7457. if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
  7458. gt_cv_locale_fr=fr_FR.ISO8859-1
  7459. else
  7460. # Test for the HP-UX locale name.
  7461. if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
  7462. gt_cv_locale_fr=fr_FR.iso88591
  7463. else
  7464. # Test for the Solaris 7 locale name.
  7465. if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
  7466. gt_cv_locale_fr=fr
  7467. else
  7468. # None found.
  7469. gt_cv_locale_fr=none
  7470. fi
  7471. fi
  7472. fi
  7473. fi
  7474. fi
  7475. ;;
  7476. esac
  7477. fi
  7478. rm -fr conftest*
  7479. fi
  7480. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
  7481. $as_echo "$gt_cv_locale_fr" >&6; }
  7482. LOCALE_FR=$gt_cv_locale_fr
  7483. GNULIB__EXIT=0;
  7484. GNULIB_ALIGNED_ALLOC=0;
  7485. GNULIB_ATOLL=0;
  7486. GNULIB_CALLOC_POSIX=0;
  7487. GNULIB_CANONICALIZE_FILE_NAME=0;
  7488. GNULIB_FREE_POSIX=0;
  7489. GNULIB_GETLOADAVG=0;
  7490. GNULIB_GETSUBOPT=0;
  7491. GNULIB_GRANTPT=0;
  7492. GNULIB_MALLOC_POSIX=0;
  7493. GNULIB_MBTOWC=0;
  7494. GNULIB_MKDTEMP=0;
  7495. GNULIB_MKOSTEMP=0;
  7496. GNULIB_MKOSTEMPS=0;
  7497. GNULIB_MKSTEMP=0;
  7498. GNULIB_MKSTEMPS=0;
  7499. GNULIB_POSIX_MEMALIGN=0;
  7500. GNULIB_POSIX_OPENPT=0;
  7501. GNULIB_PTSNAME=0;
  7502. GNULIB_PTSNAME_R=0;
  7503. GNULIB_PUTENV=0;
  7504. GNULIB_QSORT_R=0;
  7505. GNULIB_RANDOM=0;
  7506. GNULIB_RANDOM_R=0;
  7507. GNULIB_REALLOCARRAY=0;
  7508. GNULIB_REALLOC_POSIX=0;
  7509. GNULIB_REALPATH=0;
  7510. GNULIB_RPMATCH=0;
  7511. GNULIB_SECURE_GETENV=0;
  7512. GNULIB_SETENV=0;
  7513. GNULIB_STRTOD=0;
  7514. GNULIB_STRTOLD=0;
  7515. GNULIB_STRTOLL=0;
  7516. GNULIB_STRTOULL=0;
  7517. GNULIB_SYSTEM_POSIX=0;
  7518. GNULIB_UNLOCKPT=0;
  7519. GNULIB_UNSETENV=0;
  7520. GNULIB_WCTOMB=0;
  7521. GNULIB_MDA_ECVT=1;
  7522. GNULIB_MDA_FCVT=1;
  7523. GNULIB_MDA_GCVT=1;
  7524. GNULIB_MDA_MKTEMP=1;
  7525. GNULIB_MDA_PUTENV=1;
  7526. HAVE__EXIT=1;
  7527. HAVE_ALIGNED_ALLOC=1;
  7528. HAVE_ATOLL=1;
  7529. HAVE_CANONICALIZE_FILE_NAME=1;
  7530. HAVE_DECL_ECVT=1;
  7531. HAVE_DECL_FCVT=1;
  7532. HAVE_DECL_GCVT=1;
  7533. HAVE_DECL_GETLOADAVG=1;
  7534. HAVE_GETSUBOPT=1;
  7535. HAVE_GRANTPT=1;
  7536. HAVE_INITSTATE=1;
  7537. HAVE_DECL_INITSTATE=1;
  7538. HAVE_MBTOWC=1;
  7539. HAVE_MKDTEMP=1;
  7540. HAVE_MKOSTEMP=1;
  7541. HAVE_MKOSTEMPS=1;
  7542. HAVE_MKSTEMP=1;
  7543. HAVE_MKSTEMPS=1;
  7544. HAVE_POSIX_MEMALIGN=1;
  7545. HAVE_POSIX_OPENPT=1;
  7546. HAVE_PTSNAME=1;
  7547. HAVE_PTSNAME_R=1;
  7548. HAVE_QSORT_R=1;
  7549. HAVE_RANDOM=1;
  7550. HAVE_RANDOM_H=1;
  7551. HAVE_RANDOM_R=1;
  7552. HAVE_REALLOCARRAY=1;
  7553. HAVE_REALPATH=1;
  7554. HAVE_RPMATCH=1;
  7555. HAVE_SECURE_GETENV=1;
  7556. HAVE_SETENV=1;
  7557. HAVE_DECL_SETENV=1;
  7558. HAVE_SETSTATE=1;
  7559. HAVE_DECL_SETSTATE=1;
  7560. HAVE_STRTOD=1;
  7561. HAVE_STRTOLD=1;
  7562. HAVE_STRTOLL=1;
  7563. HAVE_STRTOULL=1;
  7564. HAVE_STRUCT_RANDOM_DATA=1;
  7565. HAVE_SYS_LOADAVG_H=0;
  7566. HAVE_UNLOCKPT=1;
  7567. HAVE_DECL_UNSETENV=1;
  7568. REPLACE_ALIGNED_ALLOC=0;
  7569. REPLACE_CALLOC=0;
  7570. REPLACE_CANONICALIZE_FILE_NAME=0;
  7571. REPLACE_FREE=0;
  7572. REPLACE_INITSTATE=0;
  7573. REPLACE_MALLOC=0;
  7574. REPLACE_MBTOWC=0;
  7575. REPLACE_MKSTEMP=0;
  7576. REPLACE_POSIX_MEMALIGN=0;
  7577. REPLACE_PTSNAME=0;
  7578. REPLACE_PTSNAME_R=0;
  7579. REPLACE_PUTENV=0;
  7580. REPLACE_QSORT_R=0;
  7581. REPLACE_RANDOM=0;
  7582. REPLACE_RANDOM_R=0;
  7583. REPLACE_REALLOC=0;
  7584. REPLACE_REALPATH=0;
  7585. REPLACE_SETENV=0;
  7586. REPLACE_SETSTATE=0;
  7587. REPLACE_STRTOD=0;
  7588. REPLACE_STRTOLD=0;
  7589. REPLACE_UNSETENV=0;
  7590. REPLACE_WCTOMB=0;
  7591. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
  7592. $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
  7593. if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
  7594. $as_echo_n "(cached) " >&6
  7595. else
  7596. rm -f conftest.sym conftest.file
  7597. echo >conftest.file
  7598. if test "$cross_compiling" = yes; then :
  7599. case "$host_os" in
  7600. linux-* | linux)
  7601. # Guess yes on Linux systems.
  7602. gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
  7603. *-gnu* | gnu*)
  7604. # Guess yes on glibc systems.
  7605. gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
  7606. mingw*)
  7607. # Guess no on native Windows.
  7608. gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
  7609. *)
  7610. # If we don't know, obey --enable-cross-guesses.
  7611. gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
  7612. esac
  7613. else
  7614. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  7615. /* end confdefs.h. */
  7616. $ac_includes_default
  7617. int
  7618. main ()
  7619. {
  7620. struct stat sbuf;
  7621. if (symlink ("conftest.file", "conftest.sym") != 0)
  7622. return 1;
  7623. /* Linux will dereference the symlink and fail, as required by
  7624. POSIX. That is better in the sense that it means we will not
  7625. have to compile and use the lstat wrapper. */
  7626. return lstat ("conftest.sym/", &sbuf) == 0;
  7627. ;
  7628. return 0;
  7629. }
  7630. _ACEOF
  7631. if ac_fn_c_try_run "$LINENO"; then :
  7632. gl_cv_func_lstat_dereferences_slashed_symlink=yes
  7633. else
  7634. gl_cv_func_lstat_dereferences_slashed_symlink=no
  7635. fi
  7636. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  7637. conftest.$ac_objext conftest.beam conftest.$ac_ext
  7638. fi
  7639. rm -f conftest.sym conftest.file
  7640. fi
  7641. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
  7642. $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
  7643. case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
  7644. *yes)
  7645. cat >>confdefs.h <<_ACEOF
  7646. #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
  7647. _ACEOF
  7648. ;;
  7649. esac
  7650. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
  7651. $as_echo_n "checking whether // is distinct from /... " >&6; }
  7652. if ${gl_cv_double_slash_root+:} false; then :
  7653. $as_echo_n "(cached) " >&6
  7654. else
  7655. if test x"$cross_compiling" = xyes ; then
  7656. # When cross-compiling, there is no way to tell whether // is special
  7657. # short of a list of hosts. However, the only known hosts to date
  7658. # that have a distinct // are Apollo DomainOS (too old to port to),
  7659. # Cygwin, and z/OS. If anyone knows of another system for which // has
  7660. # special semantics and is distinct from /, please report it to
  7661. # <bug-gnulib@gnu.org>.
  7662. case $host in
  7663. *-cygwin | i370-ibm-openedition)
  7664. gl_cv_double_slash_root=yes ;;
  7665. *)
  7666. # Be optimistic and assume that / and // are the same when we
  7667. # don't know.
  7668. gl_cv_double_slash_root='unknown, assuming no' ;;
  7669. esac
  7670. else
  7671. set x `ls -di / // 2>/dev/null`
  7672. if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
  7673. gl_cv_double_slash_root=no
  7674. else
  7675. gl_cv_double_slash_root=yes
  7676. fi
  7677. fi
  7678. fi
  7679. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
  7680. $as_echo "$gl_cv_double_slash_root" >&6; }
  7681. if test "$gl_cv_double_slash_root" = yes; then
  7682. $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
  7683. fi
  7684. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
  7685. $as_echo_n "checking whether realpath works... " >&6; }
  7686. if ${gl_cv_func_realpath_works+:} false; then :
  7687. $as_echo_n "(cached) " >&6
  7688. else
  7689. rm -rf conftest.a conftest.d
  7690. touch conftest.a
  7691. mkdir conftest.d
  7692. if test "$cross_compiling" = yes; then :
  7693. case "$host_os" in
  7694. # Guess yes on glibc systems.
  7695. *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
  7696. # Guess yes on musl systems.
  7697. *-musl*) gl_cv_func_realpath_works="guessing yes" ;;
  7698. # Guess no on native Windows.
  7699. mingw*) gl_cv_func_realpath_works="guessing no" ;;
  7700. # If we don't know, obey --enable-cross-guesses.
  7701. *) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
  7702. esac
  7703. else
  7704. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  7705. /* end confdefs.h. */
  7706. #include <stdlib.h>
  7707. #if defined __MACH__ && defined __APPLE__
  7708. /* Avoid a crash on Mac OS X. */
  7709. #include <mach/mach.h>
  7710. #include <mach/mach_error.h>
  7711. #include <mach/thread_status.h>
  7712. #include <mach/exception.h>
  7713. #include <mach/task.h>
  7714. #include <pthread.h>
  7715. /* The exception port on which our thread listens. */
  7716. static mach_port_t our_exception_port;
  7717. /* The main function of the thread listening for exceptions of type
  7718. EXC_BAD_ACCESS. */
  7719. static void *
  7720. mach_exception_thread (void *arg)
  7721. {
  7722. /* Buffer for a message to be received. */
  7723. struct {
  7724. mach_msg_header_t head;
  7725. mach_msg_body_t msgh_body;
  7726. char data[1024];
  7727. } msg;
  7728. mach_msg_return_t retval;
  7729. /* Wait for a message on the exception port. */
  7730. retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
  7731. our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
  7732. if (retval != MACH_MSG_SUCCESS)
  7733. abort ();
  7734. exit (1);
  7735. }
  7736. static void
  7737. nocrash_init (void)
  7738. {
  7739. mach_port_t self = mach_task_self ();
  7740. /* Allocate a port on which the thread shall listen for exceptions. */
  7741. if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
  7742. == KERN_SUCCESS) {
  7743. /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
  7744. if (mach_port_insert_right (self, our_exception_port, our_exception_port,
  7745. MACH_MSG_TYPE_MAKE_SEND)
  7746. == KERN_SUCCESS) {
  7747. /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
  7748. for us. */
  7749. exception_mask_t mask = EXC_MASK_BAD_ACCESS;
  7750. /* Create the thread listening on the exception port. */
  7751. pthread_attr_t attr;
  7752. pthread_t thread;
  7753. if (pthread_attr_init (&attr) == 0
  7754. && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
  7755. && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
  7756. pthread_attr_destroy (&attr);
  7757. /* Replace the exception port info for these exceptions with our own.
  7758. Note that we replace the exception port for the entire task, not only
  7759. for a particular thread. This has the effect that when our exception
  7760. port gets the message, the thread specific exception port has already
  7761. been asked, and we don't need to bother about it.
  7762. See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
  7763. task_set_exception_ports (self, mask, our_exception_port,
  7764. EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
  7765. }
  7766. }
  7767. }
  7768. }
  7769. #elif defined _WIN32 && ! defined __CYGWIN__
  7770. /* Avoid a crash on native Windows. */
  7771. #define WIN32_LEAN_AND_MEAN
  7772. #include <windows.h>
  7773. #include <winerror.h>
  7774. static LONG WINAPI
  7775. exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
  7776. {
  7777. switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
  7778. {
  7779. case EXCEPTION_ACCESS_VIOLATION:
  7780. case EXCEPTION_IN_PAGE_ERROR:
  7781. case EXCEPTION_STACK_OVERFLOW:
  7782. case EXCEPTION_GUARD_PAGE:
  7783. case EXCEPTION_PRIV_INSTRUCTION:
  7784. case EXCEPTION_ILLEGAL_INSTRUCTION:
  7785. case EXCEPTION_DATATYPE_MISALIGNMENT:
  7786. case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
  7787. case EXCEPTION_NONCONTINUABLE_EXCEPTION:
  7788. exit (1);
  7789. }
  7790. return EXCEPTION_CONTINUE_SEARCH;
  7791. }
  7792. static void
  7793. nocrash_init (void)
  7794. {
  7795. SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
  7796. }
  7797. #else
  7798. /* Avoid a crash on POSIX systems. */
  7799. #include <signal.h>
  7800. #include <unistd.h>
  7801. /* A POSIX signal handler. */
  7802. static void
  7803. exception_handler (int sig)
  7804. {
  7805. _exit (1);
  7806. }
  7807. static void
  7808. nocrash_init (void)
  7809. {
  7810. #ifdef SIGSEGV
  7811. signal (SIGSEGV, exception_handler);
  7812. #endif
  7813. #ifdef SIGBUS
  7814. signal (SIGBUS, exception_handler);
  7815. #endif
  7816. }
  7817. #endif
  7818. #include <stdlib.h>
  7819. #include <string.h>
  7820. int
  7821. main ()
  7822. {
  7823. int result = 0;
  7824. {
  7825. char *name = realpath ("conftest.a", NULL);
  7826. if (!(name && *name == '/'))
  7827. result |= 1;
  7828. free (name);
  7829. }
  7830. {
  7831. char *name = realpath ("conftest.b/../conftest.a", NULL);
  7832. if (name != NULL)
  7833. result |= 2;
  7834. free (name);
  7835. }
  7836. {
  7837. char *name = realpath ("conftest.a/", NULL);
  7838. if (name != NULL)
  7839. result |= 4;
  7840. free (name);
  7841. }
  7842. {
  7843. char *name1 = realpath (".", NULL);
  7844. char *name2 = realpath ("conftest.d//./..", NULL);
  7845. if (! name1 || ! name2 || strcmp (name1, name2))
  7846. result |= 8;
  7847. free (name1);
  7848. free (name2);
  7849. }
  7850. return result;
  7851. ;
  7852. return 0;
  7853. }
  7854. _ACEOF
  7855. if ac_fn_c_try_run "$LINENO"; then :
  7856. gl_cv_func_realpath_works=yes
  7857. else
  7858. gl_cv_func_realpath_works=no
  7859. fi
  7860. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  7861. conftest.$ac_objext conftest.beam conftest.$ac_ext
  7862. fi
  7863. rm -rf conftest.a conftest.d
  7864. fi
  7865. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
  7866. $as_echo "$gl_cv_func_realpath_works" >&6; }
  7867. case "$gl_cv_func_realpath_works" in
  7868. *yes)
  7869. $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
  7870. ;;
  7871. esac
  7872. case "$host_os" in
  7873. mingw*) ;;
  7874. *) for ac_func in getcwd
  7875. do :
  7876. ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
  7877. if test "x$ac_cv_func_getcwd" = xyes; then :
  7878. cat >>confdefs.h <<_ACEOF
  7879. #define HAVE_GETCWD 1
  7880. _ACEOF
  7881. fi
  7882. done
  7883. ;;
  7884. esac
  7885. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
  7886. $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
  7887. if ${ac_cv_type_uid_t+:} false; then :
  7888. $as_echo_n "(cached) " >&6
  7889. else
  7890. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  7891. /* end confdefs.h. */
  7892. #include <sys/types.h>
  7893. _ACEOF
  7894. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  7895. $EGREP "uid_t" >/dev/null 2>&1; then :
  7896. ac_cv_type_uid_t=yes
  7897. else
  7898. ac_cv_type_uid_t=no
  7899. fi
  7900. rm -f conftest*
  7901. fi
  7902. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
  7903. $as_echo "$ac_cv_type_uid_t" >&6; }
  7904. if test $ac_cv_type_uid_t = no; then
  7905. $as_echo "#define uid_t int" >>confdefs.h
  7906. $as_echo "#define gid_t int" >>confdefs.h
  7907. fi
  7908. gl_mda_defines='
  7909. #if defined _WIN32 && !defined __CYGWIN__
  7910. #define access _access
  7911. #define chdir _chdir
  7912. #define chmod _chmod
  7913. #define close _close
  7914. #define creat _creat
  7915. #define dup _dup
  7916. #define dup2 _dup2
  7917. #define ecvt _ecvt
  7918. #define execl _execl
  7919. #define execle _execle
  7920. #define execlp _execlp
  7921. #define execv _execv
  7922. #define execve _execve
  7923. #define execvp _execvp
  7924. #define execvpe _execvpe
  7925. #define fcloseall _fcloseall
  7926. #define fcvt _fcvt
  7927. #define fdopen _fdopen
  7928. #define fileno _fileno
  7929. #define gcvt _gcvt
  7930. #define getcwd _getcwd
  7931. #define getpid _getpid
  7932. #define getw _getw
  7933. #define isatty _isatty
  7934. #define j0 _j0
  7935. #define j1 _j1
  7936. #define jn _jn
  7937. #define lfind _lfind
  7938. #define lsearch _lsearch
  7939. #define lseek _lseek
  7940. #define memccpy _memccpy
  7941. #define mkdir _mkdir
  7942. #define mktemp _mktemp
  7943. #define open _open
  7944. #define putenv _putenv
  7945. #define putw _putw
  7946. #define read _read
  7947. #define rmdir _rmdir
  7948. #define strdup _strdup
  7949. #define swab _swab
  7950. #define tempnam _tempnam
  7951. #define tzset _tzset
  7952. #define umask _umask
  7953. #define unlink _unlink
  7954. #define utime _utime
  7955. #define wcsdup _wcsdup
  7956. #define write _write
  7957. #define y0 _y0
  7958. #define y1 _y1
  7959. #define yn _yn
  7960. #endif
  7961. '
  7962. for ac_header in unistd.h
  7963. do :
  7964. ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
  7965. if test "x$ac_cv_header_unistd_h" = xyes; then :
  7966. cat >>confdefs.h <<_ACEOF
  7967. #define HAVE_UNISTD_H 1
  7968. _ACEOF
  7969. fi
  7970. done
  7971. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
  7972. $as_echo_n "checking for working chown... " >&6; }
  7973. if ${ac_cv_func_chown_works+:} false; then :
  7974. $as_echo_n "(cached) " >&6
  7975. else
  7976. if test "$cross_compiling" = yes; then :
  7977. case "$host_os" in # ((
  7978. # Guess yes on Linux systems.
  7979. linux-* | linux) ac_cv_func_chown_works="guessing yes" ;;
  7980. # Guess yes on glibc systems.
  7981. *-gnu* | gnu*) ac_cv_func_chown_works="guessing yes" ;;
  7982. # Guess no on native Windows.
  7983. mingw*) ac_cv_func_chown_works="guessing no" ;;
  7984. # If we don't know, obey --enable-cross-guesses.
  7985. *) ac_cv_func_chown_works="$gl_cross_guess_normal" ;;
  7986. esac
  7987. else
  7988. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  7989. /* end confdefs.h. */
  7990. $ac_includes_default
  7991. #include <fcntl.h>
  7992. $gl_mda_defines
  7993. int
  7994. main ()
  7995. {
  7996. char *f = "conftest.chown";
  7997. struct stat before, after;
  7998. if (creat (f, 0600) < 0)
  7999. return 1;
  8000. if (stat (f, &before) < 0)
  8001. return 1;
  8002. if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
  8003. return 1;
  8004. if (stat (f, &after) < 0)
  8005. return 1;
  8006. return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
  8007. ;
  8008. return 0;
  8009. }
  8010. _ACEOF
  8011. if ac_fn_c_try_run "$LINENO"; then :
  8012. ac_cv_func_chown_works=yes
  8013. else
  8014. ac_cv_func_chown_works=no
  8015. fi
  8016. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  8017. conftest.$ac_objext conftest.beam conftest.$ac_ext
  8018. fi
  8019. rm -f conftest.chown
  8020. fi
  8021. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
  8022. $as_echo "$ac_cv_func_chown_works" >&6; }
  8023. case "$ac_cv_func_chown_works" in
  8024. *yes)
  8025. $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
  8026. ;;
  8027. esac
  8028. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown dereferences symlinks" >&5
  8029. $as_echo_n "checking whether chown dereferences symlinks... " >&6; }
  8030. if ${gl_cv_func_chown_follows_symlink+:} false; then :
  8031. $as_echo_n "(cached) " >&6
  8032. else
  8033. if test "$cross_compiling" = yes; then :
  8034. gl_cv_func_chown_follows_symlink="guessing yes"
  8035. else
  8036. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8037. /* end confdefs.h. */
  8038. #include <unistd.h>
  8039. #include <stdlib.h>
  8040. #include <errno.h>
  8041. $gl_mda_defines
  8042. int
  8043. main ()
  8044. {
  8045. int result = 0;
  8046. char const *dangling_symlink = "conftest.dangle";
  8047. unlink (dangling_symlink);
  8048. if (symlink ("conftest.no-such", dangling_symlink))
  8049. abort ();
  8050. /* Exit successfully on a conforming system,
  8051. i.e., where chown must fail with ENOENT. */
  8052. if (chown (dangling_symlink, getuid (), getgid ()) == 0)
  8053. result |= 1;
  8054. if (errno != ENOENT)
  8055. result |= 2;
  8056. return result;
  8057. }
  8058. _ACEOF
  8059. if ac_fn_c_try_run "$LINENO"; then :
  8060. gl_cv_func_chown_follows_symlink=yes
  8061. else
  8062. gl_cv_func_chown_follows_symlink=no
  8063. fi
  8064. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  8065. conftest.$ac_objext conftest.beam conftest.$ac_ext
  8066. fi
  8067. fi
  8068. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_follows_symlink" >&5
  8069. $as_echo "$gl_cv_func_chown_follows_symlink" >&6; }
  8070. case "$gl_cv_func_chown_follows_symlink" in
  8071. *yes) ;;
  8072. *)
  8073. $as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h
  8074. ;;
  8075. esac
  8076. if test $ac_cv_func_chown = no; then
  8077. HAVE_CHOWN=0
  8078. else
  8079. case "$gl_cv_func_chown_follows_symlink" in
  8080. *yes) ;;
  8081. *) REPLACE_CHOWN=1 ;;
  8082. esac
  8083. case "$ac_cv_func_chown_works" in
  8084. *no)
  8085. $as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h
  8086. REPLACE_CHOWN=1
  8087. ;;
  8088. esac
  8089. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown honors trailing slash" >&5
  8090. $as_echo_n "checking whether chown honors trailing slash... " >&6; }
  8091. if ${gl_cv_func_chown_slash_works+:} false; then :
  8092. $as_echo_n "(cached) " >&6
  8093. else
  8094. touch conftest.file && rm -f conftest.link
  8095. if test "$cross_compiling" = yes; then :
  8096. case "$host_os" in
  8097. # Guess yes on glibc systems.
  8098. *-gnu*) gl_cv_func_chown_slash_works="guessing yes" ;;
  8099. # Guess yes on musl systems.
  8100. *-musl*) gl_cv_func_chown_slash_works="guessing yes" ;;
  8101. # If we don't know, obey --enable-cross-guesses.
  8102. *) gl_cv_func_chown_slash_works="$gl_cross_guess_normal" ;;
  8103. esac
  8104. else
  8105. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8106. /* end confdefs.h. */
  8107. #include <unistd.h>
  8108. #include <stdlib.h>
  8109. #include <errno.h>
  8110. $gl_mda_defines
  8111. int
  8112. main ()
  8113. {
  8114. if (symlink ("conftest.file", "conftest.link")) return 1;
  8115. if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2;
  8116. ;
  8117. return 0;
  8118. }
  8119. _ACEOF
  8120. if ac_fn_c_try_run "$LINENO"; then :
  8121. gl_cv_func_chown_slash_works=yes
  8122. else
  8123. gl_cv_func_chown_slash_works=no
  8124. fi
  8125. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  8126. conftest.$ac_objext conftest.beam conftest.$ac_ext
  8127. fi
  8128. rm -f conftest.link conftest.file
  8129. fi
  8130. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_slash_works" >&5
  8131. $as_echo "$gl_cv_func_chown_slash_works" >&6; }
  8132. case "$gl_cv_func_chown_slash_works" in
  8133. *yes) ;;
  8134. *)
  8135. $as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h
  8136. REPLACE_CHOWN=1
  8137. ;;
  8138. esac
  8139. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown always updates ctime" >&5
  8140. $as_echo_n "checking whether chown always updates ctime... " >&6; }
  8141. if ${gl_cv_func_chown_ctime_works+:} false; then :
  8142. $as_echo_n "(cached) " >&6
  8143. else
  8144. if test "$cross_compiling" = yes; then :
  8145. case "$host_os" in
  8146. # Guess yes on glibc systems.
  8147. *-gnu*) gl_cv_func_chown_ctime_works="guessing yes" ;;
  8148. # Guess yes on musl systems.
  8149. *-musl*) gl_cv_func_chown_ctime_works="guessing yes" ;;
  8150. # If we don't know, obey --enable-cross-guesses.
  8151. *) gl_cv_func_chown_ctime_works="$gl_cross_guess_normal" ;;
  8152. esac
  8153. else
  8154. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8155. /* end confdefs.h. */
  8156. #include <unistd.h>
  8157. #include <stdlib.h>
  8158. #include <errno.h>
  8159. #include <fcntl.h>
  8160. #include <sys/stat.h>
  8161. $gl_mda_defines
  8162. int
  8163. main ()
  8164. {
  8165. struct stat st1, st2;
  8166. if (close (creat ("conftest.file", 0600))) return 1;
  8167. if (stat ("conftest.file", &st1)) return 2;
  8168. sleep (1);
  8169. if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3;
  8170. if (stat ("conftest.file", &st2)) return 4;
  8171. if (st2.st_ctime <= st1.st_ctime) return 5;
  8172. ;
  8173. return 0;
  8174. }
  8175. _ACEOF
  8176. if ac_fn_c_try_run "$LINENO"; then :
  8177. gl_cv_func_chown_ctime_works=yes
  8178. else
  8179. gl_cv_func_chown_ctime_works=no
  8180. fi
  8181. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  8182. conftest.$ac_objext conftest.beam conftest.$ac_ext
  8183. fi
  8184. rm -f conftest.file
  8185. fi
  8186. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5
  8187. $as_echo "$gl_cv_func_chown_ctime_works" >&6; }
  8188. case "$gl_cv_func_chown_ctime_works" in
  8189. *yes) ;;
  8190. *)
  8191. $as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h
  8192. REPLACE_CHOWN=1
  8193. ;;
  8194. esac
  8195. fi
  8196. if test $ac_cv_func__set_invalid_parameter_handler = yes; then
  8197. HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
  8198. $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
  8199. else
  8200. HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
  8201. fi
  8202. GNULIB_OPENDIR=0;
  8203. GNULIB_READDIR=0;
  8204. GNULIB_REWINDDIR=0;
  8205. GNULIB_CLOSEDIR=0;
  8206. GNULIB_DIRFD=0;
  8207. GNULIB_FDOPENDIR=0;
  8208. GNULIB_SCANDIR=0;
  8209. GNULIB_ALPHASORT=0;
  8210. HAVE_OPENDIR=1;
  8211. HAVE_READDIR=1;
  8212. HAVE_REWINDDIR=1;
  8213. HAVE_CLOSEDIR=1;
  8214. HAVE_DECL_DIRFD=1;
  8215. HAVE_DECL_FDOPENDIR=1;
  8216. HAVE_FDOPENDIR=1;
  8217. HAVE_SCANDIR=1;
  8218. HAVE_ALPHASORT=1;
  8219. REPLACE_OPENDIR=0;
  8220. REPLACE_CLOSEDIR=0;
  8221. REPLACE_DIRFD=0;
  8222. REPLACE_FDOPENDIR=0;
  8223. GNULIB_ISBLANK=0;
  8224. HAVE_ISBLANK=1;
  8225. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
  8226. $as_echo_n "checking if environ is properly declared... " >&6; }
  8227. if ${gt_cv_var_environ_declaration+:} false; then :
  8228. $as_echo_n "(cached) " >&6
  8229. else
  8230. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8231. /* end confdefs.h. */
  8232. #if HAVE_UNISTD_H
  8233. #include <unistd.h>
  8234. #endif
  8235. /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
  8236. #include <stdlib.h>
  8237. extern struct { int foo; } environ;
  8238. int
  8239. main ()
  8240. {
  8241. environ.foo = 1;
  8242. ;
  8243. return 0;
  8244. }
  8245. _ACEOF
  8246. if ac_fn_c_try_compile "$LINENO"; then :
  8247. gt_cv_var_environ_declaration=no
  8248. else
  8249. gt_cv_var_environ_declaration=yes
  8250. fi
  8251. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  8252. fi
  8253. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
  8254. $as_echo "$gt_cv_var_environ_declaration" >&6; }
  8255. if test $gt_cv_var_environ_declaration = yes; then
  8256. $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
  8257. fi
  8258. if test $gt_cv_var_environ_declaration != yes; then
  8259. HAVE_DECL_ENVIRON=0
  8260. fi
  8261. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
  8262. $as_echo_n "checking for complete errno.h... " >&6; }
  8263. if ${gl_cv_header_errno_h_complete+:} false; then :
  8264. $as_echo_n "(cached) " >&6
  8265. else
  8266. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8267. /* end confdefs.h. */
  8268. #include <errno.h>
  8269. #if !defined ETXTBSY
  8270. booboo
  8271. #endif
  8272. #if !defined ENOMSG
  8273. booboo
  8274. #endif
  8275. #if !defined EIDRM
  8276. booboo
  8277. #endif
  8278. #if !defined ENOLINK
  8279. booboo
  8280. #endif
  8281. #if !defined EPROTO
  8282. booboo
  8283. #endif
  8284. #if !defined EMULTIHOP
  8285. booboo
  8286. #endif
  8287. #if !defined EBADMSG
  8288. booboo
  8289. #endif
  8290. #if !defined EOVERFLOW
  8291. booboo
  8292. #endif
  8293. #if !defined ENOTSUP
  8294. booboo
  8295. #endif
  8296. #if !defined ENETRESET
  8297. booboo
  8298. #endif
  8299. #if !defined ECONNABORTED
  8300. booboo
  8301. #endif
  8302. #if !defined ESTALE
  8303. booboo
  8304. #endif
  8305. #if !defined EDQUOT
  8306. booboo
  8307. #endif
  8308. #if !defined ECANCELED
  8309. booboo
  8310. #endif
  8311. #if !defined EOWNERDEAD
  8312. booboo
  8313. #endif
  8314. #if !defined ENOTRECOVERABLE
  8315. booboo
  8316. #endif
  8317. #if !defined EILSEQ
  8318. booboo
  8319. #endif
  8320. _ACEOF
  8321. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  8322. $EGREP "booboo" >/dev/null 2>&1; then :
  8323. gl_cv_header_errno_h_complete=no
  8324. else
  8325. gl_cv_header_errno_h_complete=yes
  8326. fi
  8327. rm -f conftest*
  8328. fi
  8329. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
  8330. $as_echo "$gl_cv_header_errno_h_complete" >&6; }
  8331. if test $gl_cv_header_errno_h_complete = yes; then
  8332. ERRNO_H=''
  8333. else
  8334. if test $gl_cv_have_include_next = yes; then
  8335. gl_cv_next_errno_h='<'errno.h'>'
  8336. else
  8337. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
  8338. $as_echo_n "checking absolute name of <errno.h>... " >&6; }
  8339. if ${gl_cv_next_errno_h+:} false; then :
  8340. $as_echo_n "(cached) " >&6
  8341. else
  8342. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8343. /* end confdefs.h. */
  8344. #include <errno.h>
  8345. _ACEOF
  8346. case "$host_os" in
  8347. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  8348. *) gl_absname_cpp="$ac_cpp" ;;
  8349. esac
  8350. case "$host_os" in
  8351. mingw*)
  8352. gl_dirsep_regex='[/\\]'
  8353. ;;
  8354. *)
  8355. gl_dirsep_regex='\/'
  8356. ;;
  8357. esac
  8358. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  8359. gl_header_literal_regex=`echo 'errno.h' \
  8360. | sed -e "$gl_make_literal_regex_sed"`
  8361. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  8362. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  8363. s|^/[^/]|//&|
  8364. p
  8365. q
  8366. }'
  8367. gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  8368. sed -n "$gl_absolute_header_sed"`
  8369. gl_header=$gl_cv_absolute_errno_h
  8370. gl_cv_next_errno_h='"'$gl_header'"'
  8371. fi
  8372. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
  8373. $as_echo "$gl_cv_next_errno_h" >&6; }
  8374. fi
  8375. NEXT_ERRNO_H=$gl_cv_next_errno_h
  8376. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  8377. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  8378. gl_next_as_first_directive='<'errno.h'>'
  8379. else
  8380. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  8381. gl_next_as_first_directive=$gl_cv_next_errno_h
  8382. fi
  8383. NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
  8384. ERRNO_H='errno.h'
  8385. fi
  8386. if test -n "$ERRNO_H"; then
  8387. GL_GENERATE_ERRNO_H_TRUE=
  8388. GL_GENERATE_ERRNO_H_FALSE='#'
  8389. else
  8390. GL_GENERATE_ERRNO_H_TRUE='#'
  8391. GL_GENERATE_ERRNO_H_FALSE=
  8392. fi
  8393. if test -n "$ERRNO_H"; then
  8394. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
  8395. $as_echo_n "checking for EMULTIHOP value... " >&6; }
  8396. if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
  8397. $as_echo_n "(cached) " >&6
  8398. else
  8399. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8400. /* end confdefs.h. */
  8401. #include <errno.h>
  8402. #ifdef EMULTIHOP
  8403. yes
  8404. #endif
  8405. _ACEOF
  8406. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  8407. $EGREP "yes" >/dev/null 2>&1; then :
  8408. gl_cv_header_errno_h_EMULTIHOP=yes
  8409. else
  8410. gl_cv_header_errno_h_EMULTIHOP=no
  8411. fi
  8412. rm -f conftest*
  8413. if test $gl_cv_header_errno_h_EMULTIHOP = no; then
  8414. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8415. /* end confdefs.h. */
  8416. #define _XOPEN_SOURCE_EXTENDED 1
  8417. #include <errno.h>
  8418. #ifdef EMULTIHOP
  8419. yes
  8420. #endif
  8421. _ACEOF
  8422. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  8423. $EGREP "yes" >/dev/null 2>&1; then :
  8424. gl_cv_header_errno_h_EMULTIHOP=hidden
  8425. fi
  8426. rm -f conftest*
  8427. if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
  8428. if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
  8429. #define _XOPEN_SOURCE_EXTENDED 1
  8430. #include <errno.h>
  8431. /* The following two lines are a workaround against an autoconf-2.52 bug. */
  8432. #include <stdio.h>
  8433. #include <stdlib.h>
  8434. "; then :
  8435. fi
  8436. fi
  8437. fi
  8438. fi
  8439. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
  8440. $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
  8441. case $gl_cv_header_errno_h_EMULTIHOP in
  8442. yes | no)
  8443. EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
  8444. ;;
  8445. *)
  8446. EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
  8447. ;;
  8448. esac
  8449. fi
  8450. if test -n "$ERRNO_H"; then
  8451. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
  8452. $as_echo_n "checking for ENOLINK value... " >&6; }
  8453. if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
  8454. $as_echo_n "(cached) " >&6
  8455. else
  8456. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8457. /* end confdefs.h. */
  8458. #include <errno.h>
  8459. #ifdef ENOLINK
  8460. yes
  8461. #endif
  8462. _ACEOF
  8463. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  8464. $EGREP "yes" >/dev/null 2>&1; then :
  8465. gl_cv_header_errno_h_ENOLINK=yes
  8466. else
  8467. gl_cv_header_errno_h_ENOLINK=no
  8468. fi
  8469. rm -f conftest*
  8470. if test $gl_cv_header_errno_h_ENOLINK = no; then
  8471. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8472. /* end confdefs.h. */
  8473. #define _XOPEN_SOURCE_EXTENDED 1
  8474. #include <errno.h>
  8475. #ifdef ENOLINK
  8476. yes
  8477. #endif
  8478. _ACEOF
  8479. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  8480. $EGREP "yes" >/dev/null 2>&1; then :
  8481. gl_cv_header_errno_h_ENOLINK=hidden
  8482. fi
  8483. rm -f conftest*
  8484. if test $gl_cv_header_errno_h_ENOLINK = hidden; then
  8485. if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
  8486. #define _XOPEN_SOURCE_EXTENDED 1
  8487. #include <errno.h>
  8488. /* The following two lines are a workaround against an autoconf-2.52 bug. */
  8489. #include <stdio.h>
  8490. #include <stdlib.h>
  8491. "; then :
  8492. fi
  8493. fi
  8494. fi
  8495. fi
  8496. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
  8497. $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
  8498. case $gl_cv_header_errno_h_ENOLINK in
  8499. yes | no)
  8500. ENOLINK_HIDDEN=0; ENOLINK_VALUE=
  8501. ;;
  8502. *)
  8503. ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
  8504. ;;
  8505. esac
  8506. fi
  8507. if test -n "$ERRNO_H"; then
  8508. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
  8509. $as_echo_n "checking for EOVERFLOW value... " >&6; }
  8510. if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
  8511. $as_echo_n "(cached) " >&6
  8512. else
  8513. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8514. /* end confdefs.h. */
  8515. #include <errno.h>
  8516. #ifdef EOVERFLOW
  8517. yes
  8518. #endif
  8519. _ACEOF
  8520. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  8521. $EGREP "yes" >/dev/null 2>&1; then :
  8522. gl_cv_header_errno_h_EOVERFLOW=yes
  8523. else
  8524. gl_cv_header_errno_h_EOVERFLOW=no
  8525. fi
  8526. rm -f conftest*
  8527. if test $gl_cv_header_errno_h_EOVERFLOW = no; then
  8528. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8529. /* end confdefs.h. */
  8530. #define _XOPEN_SOURCE_EXTENDED 1
  8531. #include <errno.h>
  8532. #ifdef EOVERFLOW
  8533. yes
  8534. #endif
  8535. _ACEOF
  8536. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  8537. $EGREP "yes" >/dev/null 2>&1; then :
  8538. gl_cv_header_errno_h_EOVERFLOW=hidden
  8539. fi
  8540. rm -f conftest*
  8541. if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
  8542. if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
  8543. #define _XOPEN_SOURCE_EXTENDED 1
  8544. #include <errno.h>
  8545. /* The following two lines are a workaround against an autoconf-2.52 bug. */
  8546. #include <stdio.h>
  8547. #include <stdlib.h>
  8548. "; then :
  8549. fi
  8550. fi
  8551. fi
  8552. fi
  8553. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
  8554. $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
  8555. case $gl_cv_header_errno_h_EOVERFLOW in
  8556. yes | no)
  8557. EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
  8558. ;;
  8559. *)
  8560. EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
  8561. ;;
  8562. esac
  8563. fi
  8564. ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
  8565. if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
  8566. ac_have_decl=1
  8567. else
  8568. ac_have_decl=0
  8569. fi
  8570. cat >>confdefs.h <<_ACEOF
  8571. #define HAVE_DECL_STRERROR_R $ac_have_decl
  8572. _ACEOF
  8573. for ac_func in strerror_r
  8574. do :
  8575. ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
  8576. if test "x$ac_cv_func_strerror_r" = xyes; then :
  8577. cat >>confdefs.h <<_ACEOF
  8578. #define HAVE_STRERROR_R 1
  8579. _ACEOF
  8580. fi
  8581. done
  8582. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
  8583. $as_echo_n "checking whether strerror_r returns char *... " >&6; }
  8584. if ${ac_cv_func_strerror_r_char_p+:} false; then :
  8585. $as_echo_n "(cached) " >&6
  8586. else
  8587. ac_cv_func_strerror_r_char_p=no
  8588. if test $ac_cv_have_decl_strerror_r = yes; then
  8589. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8590. /* end confdefs.h. */
  8591. $ac_includes_default
  8592. int
  8593. main ()
  8594. {
  8595. char buf[100];
  8596. char x = *strerror_r (0, buf, sizeof buf);
  8597. char *p = strerror_r (0, buf, sizeof buf);
  8598. return !p || x;
  8599. ;
  8600. return 0;
  8601. }
  8602. _ACEOF
  8603. if ac_fn_c_try_compile "$LINENO"; then :
  8604. ac_cv_func_strerror_r_char_p=yes
  8605. fi
  8606. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  8607. else
  8608. # strerror_r is not declared. Choose between
  8609. # systems that have relatively inaccessible declarations for the
  8610. # function. BeOS and DEC UNIX 4.0 fall in this category, but the
  8611. # former has a strerror_r that returns char*, while the latter
  8612. # has a strerror_r that returns `int'.
  8613. # This test should segfault on the DEC system.
  8614. if test "$cross_compiling" = yes; then :
  8615. :
  8616. else
  8617. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8618. /* end confdefs.h. */
  8619. $ac_includes_default
  8620. extern char *strerror_r ();
  8621. int
  8622. main ()
  8623. {
  8624. char buf[100];
  8625. char x = *strerror_r (0, buf, sizeof buf);
  8626. return ! isalpha (x);
  8627. ;
  8628. return 0;
  8629. }
  8630. _ACEOF
  8631. if ac_fn_c_try_run "$LINENO"; then :
  8632. ac_cv_func_strerror_r_char_p=yes
  8633. fi
  8634. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  8635. conftest.$ac_objext conftest.beam conftest.$ac_ext
  8636. fi
  8637. fi
  8638. fi
  8639. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
  8640. $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
  8641. if test $ac_cv_func_strerror_r_char_p = yes; then
  8642. $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
  8643. fi
  8644. ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
  8645. if test "x$ac_cv_have_decl_fchdir" = xyes; then :
  8646. ac_have_decl=1
  8647. else
  8648. ac_have_decl=0
  8649. fi
  8650. cat >>confdefs.h <<_ACEOF
  8651. #define HAVE_DECL_FCHDIR $ac_have_decl
  8652. _ACEOF
  8653. GNULIB_CREAT=0;
  8654. GNULIB_FCNTL=0;
  8655. GNULIB_NONBLOCKING=0;
  8656. GNULIB_OPEN=0;
  8657. GNULIB_OPENAT=0;
  8658. GNULIB_MDA_CREAT=1;
  8659. GNULIB_MDA_OPEN=1;
  8660. HAVE_FCNTL=1;
  8661. HAVE_OPENAT=1;
  8662. REPLACE_CREAT=0;
  8663. REPLACE_FCNTL=0;
  8664. REPLACE_OPEN=0;
  8665. REPLACE_OPENAT=0;
  8666. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
  8667. $as_echo_n "checking for working fcntl.h... " >&6; }
  8668. if ${gl_cv_header_working_fcntl_h+:} false; then :
  8669. $as_echo_n "(cached) " >&6
  8670. else
  8671. if test "$cross_compiling" = yes; then :
  8672. case "$host_os" in
  8673. # Guess 'no' on native Windows.
  8674. mingw*) gl_cv_header_working_fcntl_h='no' ;;
  8675. *) gl_cv_header_working_fcntl_h=cross-compiling ;;
  8676. esac
  8677. else
  8678. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8679. /* end confdefs.h. */
  8680. #include <sys/types.h>
  8681. #include <sys/stat.h>
  8682. #if HAVE_UNISTD_H
  8683. # include <unistd.h>
  8684. #else /* on Windows with MSVC */
  8685. # include <io.h>
  8686. # include <stdlib.h>
  8687. # defined sleep(n) _sleep ((n) * 1000)
  8688. #endif
  8689. #include <fcntl.h>
  8690. $gl_mda_defines
  8691. #ifndef O_NOATIME
  8692. #define O_NOATIME 0
  8693. #endif
  8694. #ifndef O_NOFOLLOW
  8695. #define O_NOFOLLOW 0
  8696. #endif
  8697. static int const constants[] =
  8698. {
  8699. O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
  8700. O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
  8701. };
  8702. int
  8703. main ()
  8704. {
  8705. int result = !constants;
  8706. #if HAVE_SYMLINK
  8707. {
  8708. static char const sym[] = "conftest.sym";
  8709. if (symlink ("/dev/null", sym) != 0)
  8710. result |= 2;
  8711. else
  8712. {
  8713. int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
  8714. if (fd >= 0)
  8715. {
  8716. close (fd);
  8717. result |= 4;
  8718. }
  8719. }
  8720. if (unlink (sym) != 0 || symlink (".", sym) != 0)
  8721. result |= 2;
  8722. else
  8723. {
  8724. int fd = open (sym, O_RDONLY | O_NOFOLLOW);
  8725. if (fd >= 0)
  8726. {
  8727. close (fd);
  8728. result |= 4;
  8729. }
  8730. }
  8731. unlink (sym);
  8732. }
  8733. #endif
  8734. {
  8735. static char const file[] = "confdefs.h";
  8736. int fd = open (file, O_RDONLY | O_NOATIME);
  8737. if (fd < 0)
  8738. result |= 8;
  8739. else
  8740. {
  8741. struct stat st0;
  8742. if (fstat (fd, &st0) != 0)
  8743. result |= 16;
  8744. else
  8745. {
  8746. char c;
  8747. sleep (1);
  8748. if (read (fd, &c, 1) != 1)
  8749. result |= 24;
  8750. else
  8751. {
  8752. if (close (fd) != 0)
  8753. result |= 32;
  8754. else
  8755. {
  8756. struct stat st1;
  8757. if (stat (file, &st1) != 0)
  8758. result |= 40;
  8759. else
  8760. if (st0.st_atime != st1.st_atime)
  8761. result |= 64;
  8762. }
  8763. }
  8764. }
  8765. }
  8766. }
  8767. return result;
  8768. ;
  8769. return 0;
  8770. }
  8771. _ACEOF
  8772. if ac_fn_c_try_run "$LINENO"; then :
  8773. gl_cv_header_working_fcntl_h=yes
  8774. else
  8775. case $? in #(
  8776. 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
  8777. 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
  8778. 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
  8779. *) gl_cv_header_working_fcntl_h='no';;
  8780. esac
  8781. fi
  8782. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  8783. conftest.$ac_objext conftest.beam conftest.$ac_ext
  8784. fi
  8785. fi
  8786. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
  8787. $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
  8788. case $gl_cv_header_working_fcntl_h in #(
  8789. *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
  8790. *) ac_val=1;;
  8791. esac
  8792. cat >>confdefs.h <<_ACEOF
  8793. #define HAVE_WORKING_O_NOATIME $ac_val
  8794. _ACEOF
  8795. case $gl_cv_header_working_fcntl_h in #(
  8796. *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
  8797. *) ac_val=1;;
  8798. esac
  8799. cat >>confdefs.h <<_ACEOF
  8800. #define HAVE_WORKING_O_NOFOLLOW $ac_val
  8801. _ACEOF
  8802. ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
  8803. "
  8804. if test "x$ac_cv_type_pid_t" = xyes; then :
  8805. else
  8806. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8807. /* end confdefs.h. */
  8808. #if defined _WIN64 && !defined __CYGWIN__
  8809. LLP64
  8810. #endif
  8811. int
  8812. main ()
  8813. {
  8814. ;
  8815. return 0;
  8816. }
  8817. _ACEOF
  8818. if ac_fn_c_try_compile "$LINENO"; then :
  8819. gl_pid_type='int'
  8820. else
  8821. gl_pid_type='__int64'
  8822. fi
  8823. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  8824. cat >>confdefs.h <<_ACEOF
  8825. #define pid_t $gl_pid_type
  8826. _ACEOF
  8827. fi
  8828. ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
  8829. if test "x$ac_cv_type_mode_t" = xyes; then :
  8830. else
  8831. cat >>confdefs.h <<_ACEOF
  8832. #define mode_t int
  8833. _ACEOF
  8834. fi
  8835. GNULIB_FFS=0;
  8836. HAVE_FFS=1;
  8837. HAVE_STRCASECMP=1;
  8838. HAVE_DECL_STRNCASECMP=1;
  8839. GNULIB_FNMATCH=0;
  8840. HAVE_FNMATCH=1;
  8841. REPLACE_FNMATCH=0;
  8842. if test $gl_cv_have_include_next = yes; then
  8843. gl_cv_next_fnmatch_h='<'fnmatch.h'>'
  8844. else
  8845. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
  8846. $as_echo_n "checking absolute name of <fnmatch.h>... " >&6; }
  8847. if ${gl_cv_next_fnmatch_h+:} false; then :
  8848. $as_echo_n "(cached) " >&6
  8849. else
  8850. if test $ac_cv_header_fnmatch_h = yes; then
  8851. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8852. /* end confdefs.h. */
  8853. #include <fnmatch.h>
  8854. _ACEOF
  8855. case "$host_os" in
  8856. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  8857. *) gl_absname_cpp="$ac_cpp" ;;
  8858. esac
  8859. case "$host_os" in
  8860. mingw*)
  8861. gl_dirsep_regex='[/\\]'
  8862. ;;
  8863. *)
  8864. gl_dirsep_regex='\/'
  8865. ;;
  8866. esac
  8867. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  8868. gl_header_literal_regex=`echo 'fnmatch.h' \
  8869. | sed -e "$gl_make_literal_regex_sed"`
  8870. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  8871. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  8872. s|^/[^/]|//&|
  8873. p
  8874. q
  8875. }'
  8876. gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  8877. sed -n "$gl_absolute_header_sed"`
  8878. gl_header=$gl_cv_absolute_fnmatch_h
  8879. gl_cv_next_fnmatch_h='"'$gl_header'"'
  8880. else
  8881. gl_cv_next_fnmatch_h='<'fnmatch.h'>'
  8882. fi
  8883. fi
  8884. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
  8885. $as_echo "$gl_cv_next_fnmatch_h" >&6; }
  8886. fi
  8887. NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
  8888. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  8889. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  8890. gl_next_as_first_directive='<'fnmatch.h'>'
  8891. else
  8892. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  8893. gl_next_as_first_directive=$gl_cv_next_fnmatch_h
  8894. fi
  8895. NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
  8896. if test $ac_cv_header_fnmatch_h = yes; then
  8897. HAVE_FNMATCH_H=1
  8898. else
  8899. HAVE_FNMATCH_H=0
  8900. fi
  8901. FNMATCH_H=''
  8902. if false; then
  8903. FNMATCH_H=fnmatch.h
  8904. else
  8905. if test $ac_cv_header_fnmatch_h != yes; then
  8906. FNMATCH_H=fnmatch.h
  8907. fi
  8908. fi
  8909. if test -n "$FNMATCH_H"; then
  8910. GL_GENERATE_FNMATCH_H_TRUE=
  8911. GL_GENERATE_FNMATCH_H_FALSE='#'
  8912. else
  8913. GL_GENERATE_FNMATCH_H_TRUE='#'
  8914. GL_GENERATE_FNMATCH_H_FALSE=
  8915. fi
  8916. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
  8917. $as_echo_n "checking for mbstate_t... " >&6; }
  8918. if ${ac_cv_type_mbstate_t+:} false; then :
  8919. $as_echo_n "(cached) " >&6
  8920. else
  8921. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8922. /* end confdefs.h. */
  8923. $ac_includes_default
  8924. #include <wchar.h>
  8925. int
  8926. main ()
  8927. {
  8928. mbstate_t x; return sizeof x;
  8929. ;
  8930. return 0;
  8931. }
  8932. _ACEOF
  8933. if ac_fn_c_try_compile "$LINENO"; then :
  8934. ac_cv_type_mbstate_t=yes
  8935. else
  8936. ac_cv_type_mbstate_t=no
  8937. fi
  8938. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  8939. fi
  8940. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
  8941. $as_echo "$ac_cv_type_mbstate_t" >&6; }
  8942. if test $ac_cv_type_mbstate_t = yes; then
  8943. $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
  8944. else
  8945. $as_echo "#define mbstate_t int" >>confdefs.h
  8946. fi
  8947. GNULIB_ACOSF=0;
  8948. GNULIB_ACOSL=0;
  8949. GNULIB_ASINF=0;
  8950. GNULIB_ASINL=0;
  8951. GNULIB_ATANF=0;
  8952. GNULIB_ATANL=0;
  8953. GNULIB_ATAN2F=0;
  8954. GNULIB_CBRT=0;
  8955. GNULIB_CBRTF=0;
  8956. GNULIB_CBRTL=0;
  8957. GNULIB_CEIL=0;
  8958. GNULIB_CEILF=0;
  8959. GNULIB_CEILL=0;
  8960. GNULIB_COPYSIGN=0;
  8961. GNULIB_COPYSIGNF=0;
  8962. GNULIB_COPYSIGNL=0;
  8963. GNULIB_COSF=0;
  8964. GNULIB_COSL=0;
  8965. GNULIB_COSHF=0;
  8966. GNULIB_EXPF=0;
  8967. GNULIB_EXPL=0;
  8968. GNULIB_EXP2=0;
  8969. GNULIB_EXP2F=0;
  8970. GNULIB_EXP2L=0;
  8971. GNULIB_EXPM1=0;
  8972. GNULIB_EXPM1F=0;
  8973. GNULIB_EXPM1L=0;
  8974. GNULIB_FABSF=0;
  8975. GNULIB_FABSL=0;
  8976. GNULIB_FLOOR=0;
  8977. GNULIB_FLOORF=0;
  8978. GNULIB_FLOORL=0;
  8979. GNULIB_FMA=0;
  8980. GNULIB_FMAF=0;
  8981. GNULIB_FMAL=0;
  8982. GNULIB_FMOD=0;
  8983. GNULIB_FMODF=0;
  8984. GNULIB_FMODL=0;
  8985. GNULIB_FREXPF=0;
  8986. GNULIB_FREXP=0;
  8987. GNULIB_FREXPL=0;
  8988. GNULIB_HYPOT=0;
  8989. GNULIB_HYPOTF=0;
  8990. GNULIB_HYPOTL=0;
  8991. GNULIB_ILOGB=0;
  8992. GNULIB_ILOGBF=0;
  8993. GNULIB_ILOGBL=0;
  8994. GNULIB_ISFINITE=0;
  8995. GNULIB_ISINF=0;
  8996. GNULIB_ISNAN=0;
  8997. GNULIB_ISNANF=0;
  8998. GNULIB_ISNAND=0;
  8999. GNULIB_ISNANL=0;
  9000. GNULIB_LDEXPF=0;
  9001. GNULIB_LDEXPL=0;
  9002. GNULIB_LOG=0;
  9003. GNULIB_LOGF=0;
  9004. GNULIB_LOGL=0;
  9005. GNULIB_LOG10=0;
  9006. GNULIB_LOG10F=0;
  9007. GNULIB_LOG10L=0;
  9008. GNULIB_LOG1P=0;
  9009. GNULIB_LOG1PF=0;
  9010. GNULIB_LOG1PL=0;
  9011. GNULIB_LOG2=0;
  9012. GNULIB_LOG2F=0;
  9013. GNULIB_LOG2L=0;
  9014. GNULIB_LOGB=0;
  9015. GNULIB_LOGBF=0;
  9016. GNULIB_LOGBL=0;
  9017. GNULIB_MODF=0;
  9018. GNULIB_MODFF=0;
  9019. GNULIB_MODFL=0;
  9020. GNULIB_POWF=0;
  9021. GNULIB_REMAINDER=0;
  9022. GNULIB_REMAINDERF=0;
  9023. GNULIB_REMAINDERL=0;
  9024. GNULIB_RINT=0;
  9025. GNULIB_RINTF=0;
  9026. GNULIB_RINTL=0;
  9027. GNULIB_ROUND=0;
  9028. GNULIB_ROUNDF=0;
  9029. GNULIB_ROUNDL=0;
  9030. GNULIB_SIGNBIT=0;
  9031. GNULIB_SINF=0;
  9032. GNULIB_SINL=0;
  9033. GNULIB_SINHF=0;
  9034. GNULIB_SQRTF=0;
  9035. GNULIB_SQRTL=0;
  9036. GNULIB_TANF=0;
  9037. GNULIB_TANL=0;
  9038. GNULIB_TANHF=0;
  9039. GNULIB_TRUNC=0;
  9040. GNULIB_TRUNCF=0;
  9041. GNULIB_TRUNCL=0;
  9042. GNULIB_MDA_J0=1;
  9043. GNULIB_MDA_J1=1;
  9044. GNULIB_MDA_JN=1;
  9045. GNULIB_MDA_Y0=1;
  9046. GNULIB_MDA_Y1=1;
  9047. GNULIB_MDA_YN=1;
  9048. HAVE_ACOSF=1;
  9049. HAVE_ACOSL=1;
  9050. HAVE_ASINF=1;
  9051. HAVE_ASINL=1;
  9052. HAVE_ATANF=1;
  9053. HAVE_ATANL=1;
  9054. HAVE_ATAN2F=1;
  9055. HAVE_CBRT=1;
  9056. HAVE_CBRTF=1;
  9057. HAVE_CBRTL=1;
  9058. HAVE_COPYSIGN=1;
  9059. HAVE_COPYSIGNL=1;
  9060. HAVE_COSF=1;
  9061. HAVE_COSL=1;
  9062. HAVE_COSHF=1;
  9063. HAVE_EXPF=1;
  9064. HAVE_EXPL=1;
  9065. HAVE_EXPM1=1;
  9066. HAVE_EXPM1F=1;
  9067. HAVE_FABSF=1;
  9068. HAVE_FABSL=1;
  9069. HAVE_FMA=1;
  9070. HAVE_FMAF=1;
  9071. HAVE_FMAL=1;
  9072. HAVE_FMODF=1;
  9073. HAVE_FMODL=1;
  9074. HAVE_FREXPF=1;
  9075. HAVE_HYPOTF=1;
  9076. HAVE_HYPOTL=1;
  9077. HAVE_ILOGB=1;
  9078. HAVE_ILOGBF=1;
  9079. HAVE_ILOGBL=1;
  9080. HAVE_ISNANF=1;
  9081. HAVE_ISNAND=1;
  9082. HAVE_ISNANL=1;
  9083. HAVE_LDEXPF=1;
  9084. HAVE_LOGF=1;
  9085. HAVE_LOGL=1;
  9086. HAVE_LOG10F=1;
  9087. HAVE_LOG10L=1;
  9088. HAVE_LOG1P=1;
  9089. HAVE_LOG1PF=1;
  9090. HAVE_LOG1PL=1;
  9091. HAVE_LOGBF=1;
  9092. HAVE_LOGBL=1;
  9093. HAVE_MODFF=1;
  9094. HAVE_MODFL=1;
  9095. HAVE_POWF=1;
  9096. HAVE_REMAINDER=1;
  9097. HAVE_REMAINDERF=1;
  9098. HAVE_RINT=1;
  9099. HAVE_RINTL=1;
  9100. HAVE_SINF=1;
  9101. HAVE_SINL=1;
  9102. HAVE_SINHF=1;
  9103. HAVE_SQRTF=1;
  9104. HAVE_SQRTL=1;
  9105. HAVE_TANF=1;
  9106. HAVE_TANL=1;
  9107. HAVE_TANHF=1;
  9108. HAVE_DECL_ACOSL=1;
  9109. HAVE_DECL_ASINL=1;
  9110. HAVE_DECL_ATANL=1;
  9111. HAVE_DECL_CBRTF=1;
  9112. HAVE_DECL_CBRTL=1;
  9113. HAVE_DECL_CEILF=1;
  9114. HAVE_DECL_CEILL=1;
  9115. HAVE_DECL_COPYSIGNF=1;
  9116. HAVE_DECL_COSL=1;
  9117. HAVE_DECL_EXPL=1;
  9118. HAVE_DECL_EXP2=1;
  9119. HAVE_DECL_EXP2F=1;
  9120. HAVE_DECL_EXP2L=1;
  9121. HAVE_DECL_EXPM1L=1;
  9122. HAVE_DECL_FLOORF=1;
  9123. HAVE_DECL_FLOORL=1;
  9124. HAVE_DECL_FREXPL=1;
  9125. HAVE_DECL_LDEXPL=1;
  9126. HAVE_DECL_LOGL=1;
  9127. HAVE_DECL_LOG10L=1;
  9128. HAVE_DECL_LOG2=1;
  9129. HAVE_DECL_LOG2F=1;
  9130. HAVE_DECL_LOG2L=1;
  9131. HAVE_DECL_LOGB=1;
  9132. HAVE_DECL_REMAINDER=1;
  9133. HAVE_DECL_REMAINDERL=1;
  9134. HAVE_DECL_RINTF=1;
  9135. HAVE_DECL_ROUND=1;
  9136. HAVE_DECL_ROUNDF=1;
  9137. HAVE_DECL_ROUNDL=1;
  9138. HAVE_DECL_SINL=1;
  9139. HAVE_DECL_SQRTL=1;
  9140. HAVE_DECL_TANL=1;
  9141. HAVE_DECL_TRUNC=1;
  9142. HAVE_DECL_TRUNCF=1;
  9143. HAVE_DECL_TRUNCL=1;
  9144. REPLACE_ACOSF=0;
  9145. REPLACE_ASINF=0;
  9146. REPLACE_ATANF=0;
  9147. REPLACE_ATAN2F=0;
  9148. REPLACE_CBRTF=0;
  9149. REPLACE_CBRTL=0;
  9150. REPLACE_CEIL=0;
  9151. REPLACE_CEILF=0;
  9152. REPLACE_CEILL=0;
  9153. REPLACE_COSF=0;
  9154. REPLACE_COSHF=0;
  9155. REPLACE_EXPF=0;
  9156. REPLACE_EXPL=0;
  9157. REPLACE_EXPM1=0;
  9158. REPLACE_EXPM1F=0;
  9159. REPLACE_EXPM1L=0;
  9160. REPLACE_EXP2=0;
  9161. REPLACE_EXP2L=0;
  9162. REPLACE_FABSL=0;
  9163. REPLACE_FLOOR=0;
  9164. REPLACE_FLOORF=0;
  9165. REPLACE_FLOORL=0;
  9166. REPLACE_FMA=0;
  9167. REPLACE_FMAF=0;
  9168. REPLACE_FMAL=0;
  9169. REPLACE_FMOD=0;
  9170. REPLACE_FMODF=0;
  9171. REPLACE_FMODL=0;
  9172. REPLACE_FREXPF=0;
  9173. REPLACE_FREXP=0;
  9174. REPLACE_FREXPL=0;
  9175. REPLACE_HUGE_VAL=0;
  9176. REPLACE_HYPOT=0;
  9177. REPLACE_HYPOTF=0;
  9178. REPLACE_HYPOTL=0;
  9179. REPLACE_ILOGB=0;
  9180. REPLACE_ILOGBF=0;
  9181. REPLACE_ILOGBL=0;
  9182. REPLACE_ISFINITE=0;
  9183. REPLACE_ISINF=0;
  9184. REPLACE_ISNAN=0;
  9185. REPLACE_LDEXPL=0;
  9186. REPLACE_LOG=0;
  9187. REPLACE_LOGF=0;
  9188. REPLACE_LOGL=0;
  9189. REPLACE_LOG10=0;
  9190. REPLACE_LOG10F=0;
  9191. REPLACE_LOG10L=0;
  9192. REPLACE_LOG1P=0;
  9193. REPLACE_LOG1PF=0;
  9194. REPLACE_LOG1PL=0;
  9195. REPLACE_LOG2=0;
  9196. REPLACE_LOG2F=0;
  9197. REPLACE_LOG2L=0;
  9198. REPLACE_LOGB=0;
  9199. REPLACE_LOGBF=0;
  9200. REPLACE_LOGBL=0;
  9201. REPLACE_MODF=0;
  9202. REPLACE_MODFF=0;
  9203. REPLACE_MODFL=0;
  9204. REPLACE_NAN=0;
  9205. REPLACE_REMAINDER=0;
  9206. REPLACE_REMAINDERF=0;
  9207. REPLACE_REMAINDERL=0;
  9208. REPLACE_RINTL=0;
  9209. REPLACE_ROUND=0;
  9210. REPLACE_ROUNDF=0;
  9211. REPLACE_ROUNDL=0;
  9212. REPLACE_SIGNBIT=0;
  9213. REPLACE_SIGNBIT_USING_BUILTINS=0;
  9214. REPLACE_SINF=0;
  9215. REPLACE_SINHF=0;
  9216. REPLACE_SQRTF=0;
  9217. REPLACE_SQRTL=0;
  9218. REPLACE_TANF=0;
  9219. REPLACE_TANHF=0;
  9220. REPLACE_TRUNC=0;
  9221. REPLACE_TRUNCF=0;
  9222. REPLACE_TRUNCL=0;
  9223. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
  9224. $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
  9225. if ${gl_cv_func_frexp_no_libm+:} false; then :
  9226. $as_echo_n "(cached) " >&6
  9227. else
  9228. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9229. /* end confdefs.h. */
  9230. #include <math.h>
  9231. double x;
  9232. int
  9233. main ()
  9234. {
  9235. int e; return frexp (x, &e) > 0;
  9236. ;
  9237. return 0;
  9238. }
  9239. _ACEOF
  9240. if ac_fn_c_try_link "$LINENO"; then :
  9241. gl_cv_func_frexp_no_libm=yes
  9242. else
  9243. gl_cv_func_frexp_no_libm=no
  9244. fi
  9245. rm -f core conftest.err conftest.$ac_objext \
  9246. conftest$ac_exeext conftest.$ac_ext
  9247. fi
  9248. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
  9249. $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
  9250. ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
  9251. if test "x$ac_cv_have_decl_alarm" = xyes; then :
  9252. ac_have_decl=1
  9253. else
  9254. ac_have_decl=0
  9255. fi
  9256. cat >>confdefs.h <<_ACEOF
  9257. #define HAVE_DECL_ALARM $ac_have_decl
  9258. _ACEOF
  9259. FREXP_LIBM=
  9260. if test $gl_cv_func_frexp_no_libm = no; then
  9261. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
  9262. $as_echo_n "checking whether frexp() can be used with libm... " >&6; }
  9263. if ${gl_cv_func_frexp_in_libm+:} false; then :
  9264. $as_echo_n "(cached) " >&6
  9265. else
  9266. save_LIBS="$LIBS"
  9267. LIBS="$LIBS -lm"
  9268. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9269. /* end confdefs.h. */
  9270. #include <math.h>
  9271. double x;
  9272. int
  9273. main ()
  9274. {
  9275. int e; return frexp (x, &e) > 0;
  9276. ;
  9277. return 0;
  9278. }
  9279. _ACEOF
  9280. if ac_fn_c_try_link "$LINENO"; then :
  9281. gl_cv_func_frexp_in_libm=yes
  9282. else
  9283. gl_cv_func_frexp_in_libm=no
  9284. fi
  9285. rm -f core conftest.err conftest.$ac_objext \
  9286. conftest$ac_exeext conftest.$ac_ext
  9287. LIBS="$save_LIBS"
  9288. fi
  9289. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
  9290. $as_echo "$gl_cv_func_frexp_in_libm" >&6; }
  9291. if test $gl_cv_func_frexp_in_libm = yes; then
  9292. FREXP_LIBM=-lm
  9293. fi
  9294. fi
  9295. if test $gl_cv_func_frexp_no_libm = yes \
  9296. || test $gl_cv_func_frexp_in_libm = yes; then
  9297. save_LIBS="$LIBS"
  9298. LIBS="$LIBS $FREXP_LIBM"
  9299. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
  9300. $as_echo_n "checking whether frexp works... " >&6; }
  9301. if ${gl_cv_func_frexp_works+:} false; then :
  9302. $as_echo_n "(cached) " >&6
  9303. else
  9304. if test "$cross_compiling" = yes; then :
  9305. case "$host_os" in
  9306. netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
  9307. mingw*) # Guess yes with MSVC, no with mingw.
  9308. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9309. /* end confdefs.h. */
  9310. #ifdef _MSC_VER
  9311. Good
  9312. #endif
  9313. _ACEOF
  9314. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  9315. $EGREP "Good" >/dev/null 2>&1; then :
  9316. gl_cv_func_frexp_works="guessing yes"
  9317. else
  9318. gl_cv_func_frexp_works="guessing no"
  9319. fi
  9320. rm -f conftest*
  9321. ;;
  9322. *) gl_cv_func_frexp_works="guessing yes" ;;
  9323. esac
  9324. else
  9325. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9326. /* end confdefs.h. */
  9327. #include <float.h>
  9328. #include <math.h>
  9329. #include <string.h>
  9330. #if HAVE_DECL_ALARM
  9331. # include <signal.h>
  9332. # include <unistd.h>
  9333. #endif
  9334. /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
  9335. ICC 10.0 has a bug when optimizing the expression -zero.
  9336. The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
  9337. to PowerPC on Mac OS X 10.5. */
  9338. #if defined __hpux || defined __sgi || defined __ICC
  9339. static double
  9340. compute_minus_zero (void)
  9341. {
  9342. return -DBL_MIN * DBL_MIN;
  9343. }
  9344. # define minus_zero compute_minus_zero ()
  9345. #else
  9346. double minus_zero = -0.0;
  9347. #endif
  9348. int main()
  9349. {
  9350. int result = 0;
  9351. int i;
  9352. volatile double x;
  9353. double zero = 0.0;
  9354. #if HAVE_DECL_ALARM
  9355. /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
  9356. number. Let the test fail in this case. */
  9357. signal (SIGALRM, SIG_DFL);
  9358. alarm (5);
  9359. #endif
  9360. /* Test on denormalized numbers. */
  9361. for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
  9362. ;
  9363. if (x > 0.0)
  9364. {
  9365. int exp;
  9366. double y = frexp (x, &exp);
  9367. /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
  9368. On NetBSD: y = 0.75. Correct: y = 0.5. */
  9369. if (y != 0.5)
  9370. result |= 1;
  9371. }
  9372. /* Test on infinite numbers. */
  9373. x = 1.0 / zero;
  9374. {
  9375. int exp;
  9376. double y = frexp (x, &exp);
  9377. if (y != x)
  9378. result |= 2;
  9379. }
  9380. /* Test on negative zero. */
  9381. x = minus_zero;
  9382. {
  9383. int exp;
  9384. double y = frexp (x, &exp);
  9385. if (memcmp (&y, &x, sizeof x))
  9386. result |= 4;
  9387. }
  9388. return result;
  9389. }
  9390. _ACEOF
  9391. if ac_fn_c_try_run "$LINENO"; then :
  9392. gl_cv_func_frexp_works=yes
  9393. else
  9394. gl_cv_func_frexp_works=no
  9395. fi
  9396. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  9397. conftest.$ac_objext conftest.beam conftest.$ac_ext
  9398. fi
  9399. fi
  9400. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
  9401. $as_echo "$gl_cv_func_frexp_works" >&6; }
  9402. LIBS="$save_LIBS"
  9403. case "$gl_cv_func_frexp_works" in
  9404. *yes) gl_func_frexp=yes ;;
  9405. *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
  9406. esac
  9407. else
  9408. gl_func_frexp=no
  9409. fi
  9410. if test $gl_func_frexp = yes; then
  9411. $as_echo "#define HAVE_FREXP 1" >>confdefs.h
  9412. fi
  9413. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
  9414. $as_echo_n "checking whether long double and double are the same... " >&6; }
  9415. if ${gl_cv_long_double_equals_double+:} false; then :
  9416. $as_echo_n "(cached) " >&6
  9417. else
  9418. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9419. /* end confdefs.h. */
  9420. #include <float.h>
  9421. int
  9422. main ()
  9423. {
  9424. typedef int check[sizeof (long double) == sizeof (double)
  9425. && LDBL_MANT_DIG == DBL_MANT_DIG
  9426. && LDBL_MAX_EXP == DBL_MAX_EXP
  9427. && LDBL_MIN_EXP == DBL_MIN_EXP
  9428. ? 1 : -1];
  9429. ;
  9430. return 0;
  9431. }
  9432. _ACEOF
  9433. if ac_fn_c_try_compile "$LINENO"; then :
  9434. gl_cv_long_double_equals_double=yes
  9435. else
  9436. gl_cv_long_double_equals_double=no
  9437. fi
  9438. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  9439. fi
  9440. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
  9441. $as_echo "$gl_cv_long_double_equals_double" >&6; }
  9442. if test $gl_cv_long_double_equals_double = yes; then
  9443. $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
  9444. HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
  9445. else
  9446. HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
  9447. fi
  9448. ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
  9449. "
  9450. if test "x$ac_cv_have_decl_frexpl" = xyes; then :
  9451. else
  9452. HAVE_DECL_FREXPL=0
  9453. fi
  9454. FREXPL_LIBM=
  9455. if test $HAVE_DECL_FREXPL = 1; then
  9456. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
  9457. $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
  9458. if ${gl_cv_func_frexpl_no_libm+:} false; then :
  9459. $as_echo_n "(cached) " >&6
  9460. else
  9461. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9462. /* end confdefs.h. */
  9463. #include <math.h>
  9464. long double x;
  9465. int
  9466. main ()
  9467. {
  9468. int e; return frexpl (x, &e) > 0;
  9469. ;
  9470. return 0;
  9471. }
  9472. _ACEOF
  9473. if ac_fn_c_try_link "$LINENO"; then :
  9474. gl_cv_func_frexpl_no_libm=yes
  9475. else
  9476. gl_cv_func_frexpl_no_libm=no
  9477. fi
  9478. rm -f core conftest.err conftest.$ac_objext \
  9479. conftest$ac_exeext conftest.$ac_ext
  9480. fi
  9481. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
  9482. $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
  9483. if test $gl_cv_func_frexpl_no_libm = no; then
  9484. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
  9485. $as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
  9486. if ${gl_cv_func_frexpl_in_libm+:} false; then :
  9487. $as_echo_n "(cached) " >&6
  9488. else
  9489. save_LIBS="$LIBS"
  9490. LIBS="$LIBS -lm"
  9491. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9492. /* end confdefs.h. */
  9493. #include <math.h>
  9494. long double x;
  9495. int
  9496. main ()
  9497. {
  9498. int e; return frexpl (x, &e) > 0;
  9499. ;
  9500. return 0;
  9501. }
  9502. _ACEOF
  9503. if ac_fn_c_try_link "$LINENO"; then :
  9504. gl_cv_func_frexpl_in_libm=yes
  9505. else
  9506. gl_cv_func_frexpl_in_libm=no
  9507. fi
  9508. rm -f core conftest.err conftest.$ac_objext \
  9509. conftest$ac_exeext conftest.$ac_ext
  9510. LIBS="$save_LIBS"
  9511. fi
  9512. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
  9513. $as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
  9514. if test $gl_cv_func_frexpl_in_libm = yes; then
  9515. FREXPL_LIBM=-lm
  9516. fi
  9517. fi
  9518. if test $gl_cv_func_frexpl_no_libm = yes \
  9519. || test $gl_cv_func_frexpl_in_libm = yes; then
  9520. save_LIBS="$LIBS"
  9521. LIBS="$LIBS $FREXPL_LIBM"
  9522. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
  9523. $as_echo_n "checking whether frexpl works... " >&6; }
  9524. if ${gl_cv_func_frexpl_works+:} false; then :
  9525. $as_echo_n "(cached) " >&6
  9526. else
  9527. if test "$cross_compiling" = yes; then :
  9528. case "$host_os" in
  9529. aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
  9530. gl_cv_func_frexpl_works="guessing no";;
  9531. *) gl_cv_func_frexpl_works="guessing yes";;
  9532. esac
  9533. else
  9534. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9535. /* end confdefs.h. */
  9536. #include <float.h>
  9537. #include <math.h>
  9538. /* Override the values of <float.h>, like done in float.in.h. */
  9539. #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
  9540. # undef LDBL_MIN_EXP
  9541. # define LDBL_MIN_EXP (-16381)
  9542. #endif
  9543. #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
  9544. # undef LDBL_MIN_EXP
  9545. # define LDBL_MIN_EXP (-16381)
  9546. #endif
  9547. #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
  9548. # undef LDBL_MIN_EXP
  9549. # define LDBL_MIN_EXP DBL_MIN_EXP
  9550. #endif
  9551. #if defined __sgi && (LDBL_MANT_DIG >= 106)
  9552. # if defined __GNUC__
  9553. # undef LDBL_MIN_EXP
  9554. # define LDBL_MIN_EXP DBL_MIN_EXP
  9555. # endif
  9556. #endif
  9557. extern
  9558. #ifdef __cplusplus
  9559. "C"
  9560. #endif
  9561. long double frexpl (long double, int *);
  9562. long double zero = 0.0L;
  9563. int main()
  9564. {
  9565. int result = 0;
  9566. volatile long double x;
  9567. /* Test on finite numbers that fails on AIX 5.1. */
  9568. x = 16.0L;
  9569. {
  9570. int exp = -9999;
  9571. frexpl (x, &exp);
  9572. if (exp != 5)
  9573. result |= 1;
  9574. }
  9575. /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
  9576. function returns an invalid (incorrectly normalized) value: it returns
  9577. y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
  9578. but the correct result is
  9579. 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
  9580. x = 1.01L;
  9581. {
  9582. int exp = -9999;
  9583. long double y = frexpl (x, &exp);
  9584. if (!(exp == 1 && y == 0.505L))
  9585. result |= 2;
  9586. }
  9587. /* Test on large finite numbers. This fails on BeOS at i = 16322, while
  9588. LDBL_MAX_EXP = 16384.
  9589. In the loop end test, we test x against Infinity, rather than comparing
  9590. i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
  9591. {
  9592. int i;
  9593. for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
  9594. {
  9595. int exp = -9999;
  9596. frexpl (x, &exp);
  9597. if (exp != i)
  9598. {
  9599. result |= 4;
  9600. break;
  9601. }
  9602. }
  9603. }
  9604. /* Test on denormalized numbers. */
  9605. {
  9606. int i;
  9607. for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
  9608. ;
  9609. if (x > 0.0L)
  9610. {
  9611. int exp;
  9612. long double y = frexpl (x, &exp);
  9613. /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
  9614. exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
  9615. if (exp != LDBL_MIN_EXP - 1)
  9616. result |= 8;
  9617. }
  9618. }
  9619. /* Test on infinite numbers. */
  9620. /* The Microsoft MSVC 14 compiler chokes on the expression 1.0 / 0.0. */
  9621. x = 1.0L / zero;
  9622. {
  9623. int exp;
  9624. long double y = frexpl (x, &exp);
  9625. if (y != x)
  9626. result |= 16;
  9627. }
  9628. return result;
  9629. }
  9630. _ACEOF
  9631. if ac_fn_c_try_run "$LINENO"; then :
  9632. gl_cv_func_frexpl_works=yes
  9633. else
  9634. gl_cv_func_frexpl_works=no
  9635. fi
  9636. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  9637. conftest.$ac_objext conftest.beam conftest.$ac_ext
  9638. fi
  9639. fi
  9640. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
  9641. $as_echo "$gl_cv_func_frexpl_works" >&6; }
  9642. LIBS="$save_LIBS"
  9643. case "$gl_cv_func_frexpl_works" in
  9644. *yes) gl_func_frexpl=yes ;;
  9645. *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
  9646. esac
  9647. else
  9648. gl_func_frexpl=no
  9649. fi
  9650. if test $gl_func_frexpl = yes; then
  9651. $as_echo "#define HAVE_FREXPL 1" >>confdefs.h
  9652. fi
  9653. fi
  9654. if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
  9655. if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
  9656. FREXPL_LIBM="$FREXP_LIBM"
  9657. else
  9658. FREXPL_LIBM=
  9659. fi
  9660. fi
  9661. GNULIB_FCHMODAT=0;
  9662. GNULIB_FSTAT=0;
  9663. GNULIB_FSTATAT=0;
  9664. GNULIB_FUTIMENS=0;
  9665. GNULIB_GETUMASK=0;
  9666. GNULIB_LCHMOD=0;
  9667. GNULIB_LSTAT=0;
  9668. GNULIB_MKDIR=0;
  9669. GNULIB_MKDIRAT=0;
  9670. GNULIB_MKFIFO=0;
  9671. GNULIB_MKFIFOAT=0;
  9672. GNULIB_MKNOD=0;
  9673. GNULIB_MKNODAT=0;
  9674. GNULIB_STAT=0;
  9675. GNULIB_UTIMENSAT=0;
  9676. GNULIB_OVERRIDES_STRUCT_STAT=0;
  9677. GNULIB_MDA_CHMOD=1;
  9678. GNULIB_MDA_MKDIR=1;
  9679. GNULIB_MDA_UMASK=1;
  9680. HAVE_FCHMODAT=1;
  9681. HAVE_FSTATAT=1;
  9682. HAVE_FUTIMENS=1;
  9683. HAVE_GETUMASK=1;
  9684. HAVE_LCHMOD=1;
  9685. HAVE_LSTAT=1;
  9686. HAVE_MKDIRAT=1;
  9687. HAVE_MKFIFO=1;
  9688. HAVE_MKFIFOAT=1;
  9689. HAVE_MKNOD=1;
  9690. HAVE_MKNODAT=1;
  9691. HAVE_UTIMENSAT=1;
  9692. REPLACE_FCHMODAT=0;
  9693. REPLACE_FSTAT=0;
  9694. REPLACE_FSTATAT=0;
  9695. REPLACE_FUTIMENS=0;
  9696. REPLACE_LSTAT=0;
  9697. REPLACE_MKDIR=0;
  9698. REPLACE_MKFIFO=0;
  9699. REPLACE_MKFIFOAT=0;
  9700. REPLACE_MKNOD=0;
  9701. REPLACE_MKNODAT=0;
  9702. REPLACE_STAT=0;
  9703. REPLACE_UTIMENSAT=0;
  9704. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
  9705. $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
  9706. if ${ac_cv_header_stat_broken+:} false; then :
  9707. $as_echo_n "(cached) " >&6
  9708. else
  9709. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9710. /* end confdefs.h. */
  9711. #include <sys/types.h>
  9712. #include <sys/stat.h>
  9713. #if defined S_ISBLK && defined S_IFDIR
  9714. extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
  9715. #endif
  9716. #if defined S_ISBLK && defined S_IFCHR
  9717. extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
  9718. #endif
  9719. #if defined S_ISLNK && defined S_IFREG
  9720. extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
  9721. #endif
  9722. #if defined S_ISSOCK && defined S_IFREG
  9723. extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
  9724. #endif
  9725. _ACEOF
  9726. if ac_fn_c_try_compile "$LINENO"; then :
  9727. ac_cv_header_stat_broken=no
  9728. else
  9729. ac_cv_header_stat_broken=yes
  9730. fi
  9731. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  9732. fi
  9733. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
  9734. $as_echo "$ac_cv_header_stat_broken" >&6; }
  9735. if test $ac_cv_header_stat_broken = yes; then
  9736. $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
  9737. fi
  9738. case "$host_os" in
  9739. mingw*)
  9740. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
  9741. $as_echo_n "checking for 64-bit off_t... " >&6; }
  9742. if ${gl_cv_type_off_t_64+:} false; then :
  9743. $as_echo_n "(cached) " >&6
  9744. else
  9745. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9746. /* end confdefs.h. */
  9747. #include <sys/types.h>
  9748. int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
  9749. int
  9750. main ()
  9751. {
  9752. ;
  9753. return 0;
  9754. }
  9755. _ACEOF
  9756. if ac_fn_c_try_compile "$LINENO"; then :
  9757. gl_cv_type_off_t_64=yes
  9758. else
  9759. gl_cv_type_off_t_64=no
  9760. fi
  9761. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  9762. fi
  9763. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
  9764. $as_echo "$gl_cv_type_off_t_64" >&6; }
  9765. if test $gl_cv_type_off_t_64 = no; then
  9766. WINDOWS_64_BIT_OFF_T=1
  9767. else
  9768. WINDOWS_64_BIT_OFF_T=0
  9769. fi
  9770. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
  9771. $as_echo_n "checking for 64-bit st_size... " >&6; }
  9772. if ${gl_cv_member_st_size_64+:} false; then :
  9773. $as_echo_n "(cached) " >&6
  9774. else
  9775. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9776. /* end confdefs.h. */
  9777. #include <sys/types.h>
  9778. struct stat buf;
  9779. int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
  9780. int
  9781. main ()
  9782. {
  9783. ;
  9784. return 0;
  9785. }
  9786. _ACEOF
  9787. if ac_fn_c_try_compile "$LINENO"; then :
  9788. gl_cv_member_st_size_64=yes
  9789. else
  9790. gl_cv_member_st_size_64=no
  9791. fi
  9792. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  9793. fi
  9794. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
  9795. $as_echo "$gl_cv_member_st_size_64" >&6; }
  9796. if test $gl_cv_member_st_size_64 = no; then
  9797. WINDOWS_64_BIT_ST_SIZE=1
  9798. else
  9799. WINDOWS_64_BIT_ST_SIZE=0
  9800. fi
  9801. ;;
  9802. *)
  9803. WINDOWS_64_BIT_OFF_T=0
  9804. WINDOWS_64_BIT_ST_SIZE=0
  9805. ;;
  9806. esac
  9807. if test $gl_cv_have_include_next = yes; then
  9808. gl_cv_next_sys_stat_h='<'sys/stat.h'>'
  9809. else
  9810. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
  9811. $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
  9812. if ${gl_cv_next_sys_stat_h+:} false; then :
  9813. $as_echo_n "(cached) " >&6
  9814. else
  9815. if test $ac_cv_header_sys_stat_h = yes; then
  9816. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9817. /* end confdefs.h. */
  9818. #include <sys/stat.h>
  9819. _ACEOF
  9820. case "$host_os" in
  9821. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  9822. *) gl_absname_cpp="$ac_cpp" ;;
  9823. esac
  9824. case "$host_os" in
  9825. mingw*)
  9826. gl_dirsep_regex='[/\\]'
  9827. ;;
  9828. *)
  9829. gl_dirsep_regex='\/'
  9830. ;;
  9831. esac
  9832. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  9833. gl_header_literal_regex=`echo 'sys/stat.h' \
  9834. | sed -e "$gl_make_literal_regex_sed"`
  9835. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  9836. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  9837. s|^/[^/]|//&|
  9838. p
  9839. q
  9840. }'
  9841. gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  9842. sed -n "$gl_absolute_header_sed"`
  9843. gl_header=$gl_cv_absolute_sys_stat_h
  9844. gl_cv_next_sys_stat_h='"'$gl_header'"'
  9845. else
  9846. gl_cv_next_sys_stat_h='<'sys/stat.h'>'
  9847. fi
  9848. fi
  9849. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
  9850. $as_echo "$gl_cv_next_sys_stat_h" >&6; }
  9851. fi
  9852. NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
  9853. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  9854. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  9855. gl_next_as_first_directive='<'sys/stat.h'>'
  9856. else
  9857. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  9858. gl_next_as_first_directive=$gl_cv_next_sys_stat_h
  9859. fi
  9860. NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
  9861. WINDOWS_STAT_TIMESPEC=0
  9862. ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
  9863. #include <sys/stat.h>
  9864. "
  9865. if test "x$ac_cv_type_nlink_t" = xyes; then :
  9866. else
  9867. $as_echo "#define nlink_t int" >>confdefs.h
  9868. fi
  9869. case "$host_os" in
  9870. mingw*)
  9871. for ac_header in sdkddkver.h
  9872. do :
  9873. ac_fn_c_check_header_mongrel "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
  9874. if test "x$ac_cv_header_sdkddkver_h" = xyes; then :
  9875. cat >>confdefs.h <<_ACEOF
  9876. #define HAVE_SDKDDKVER_H 1
  9877. _ACEOF
  9878. fi
  9879. done
  9880. ;;
  9881. esac
  9882. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
  9883. $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
  9884. if ${gl_cv_func_getcwd_null+:} false; then :
  9885. $as_echo_n "(cached) " >&6
  9886. else
  9887. if test "$cross_compiling" = yes; then :
  9888. case "$host_os" in
  9889. # Guess yes on glibc systems.
  9890. *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
  9891. # Guess yes on musl systems.
  9892. *-musl*) gl_cv_func_getcwd_null="guessing yes";;
  9893. # Guess yes on Cygwin.
  9894. cygwin*) gl_cv_func_getcwd_null="guessing yes";;
  9895. # If we don't know, obey --enable-cross-guesses.
  9896. *) gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
  9897. esac
  9898. else
  9899. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9900. /* end confdefs.h. */
  9901. # include <stdlib.h>
  9902. # if HAVE_UNISTD_H
  9903. # include <unistd.h>
  9904. # else /* on Windows with MSVC */
  9905. # include <direct.h>
  9906. # endif
  9907. $gl_mda_defines
  9908. # ifndef getcwd
  9909. char *getcwd ();
  9910. # endif
  9911. int
  9912. main ()
  9913. {
  9914. #if defined _WIN32 && ! defined __CYGWIN__
  9915. /* mingw cwd does not start with '/', but _getcwd does allocate.
  9916. However, mingw fails to honor non-zero size. */
  9917. #else
  9918. if (chdir ("/") != 0)
  9919. return 1;
  9920. else
  9921. {
  9922. char *f = getcwd (NULL, 0);
  9923. if (! f)
  9924. return 2;
  9925. if (f[0] != '/')
  9926. { free (f); return 3; }
  9927. if (f[1] != '\0')
  9928. { free (f); return 4; }
  9929. free (f);
  9930. return 0;
  9931. }
  9932. #endif
  9933. ;
  9934. return 0;
  9935. }
  9936. _ACEOF
  9937. if ac_fn_c_try_run "$LINENO"; then :
  9938. gl_cv_func_getcwd_null=yes
  9939. else
  9940. gl_cv_func_getcwd_null=no
  9941. fi
  9942. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  9943. conftest.$ac_objext conftest.beam conftest.$ac_ext
  9944. fi
  9945. fi
  9946. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
  9947. $as_echo "$gl_cv_func_getcwd_null" >&6; }
  9948. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
  9949. $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
  9950. if ${gl_cv_func_getcwd_posix_signature+:} false; then :
  9951. $as_echo_n "(cached) " >&6
  9952. else
  9953. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  9954. /* end confdefs.h. */
  9955. #include <unistd.h>
  9956. $gl_mda_defines
  9957. int
  9958. main ()
  9959. {
  9960. extern
  9961. #ifdef __cplusplus
  9962. "C"
  9963. #endif
  9964. char *getcwd (char *, size_t);
  9965. ;
  9966. return 0;
  9967. }
  9968. _ACEOF
  9969. if ac_fn_c_try_compile "$LINENO"; then :
  9970. gl_cv_func_getcwd_posix_signature=yes
  9971. else
  9972. gl_cv_func_getcwd_posix_signature=no
  9973. fi
  9974. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  9975. fi
  9976. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
  9977. $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
  9978. ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
  9979. if test "x$ac_cv_have_decl_getcwd" = xyes; then :
  9980. ac_have_decl=1
  9981. else
  9982. ac_have_decl=0
  9983. fi
  9984. cat >>confdefs.h <<_ACEOF
  9985. #define HAVE_DECL_GETCWD $ac_have_decl
  9986. _ACEOF
  9987. GNULIB_DPRINTF=0;
  9988. GNULIB_FCLOSE=0;
  9989. GNULIB_FDOPEN=0;
  9990. GNULIB_FFLUSH=0;
  9991. GNULIB_FGETC=0;
  9992. GNULIB_FGETS=0;
  9993. GNULIB_FOPEN=0;
  9994. GNULIB_FPRINTF=0;
  9995. GNULIB_FPRINTF_POSIX=0;
  9996. GNULIB_FPURGE=0;
  9997. GNULIB_FPUTC=0;
  9998. GNULIB_FPUTS=0;
  9999. GNULIB_FREAD=0;
  10000. GNULIB_FREOPEN=0;
  10001. GNULIB_FSCANF=0;
  10002. GNULIB_FSEEK=0;
  10003. GNULIB_FSEEKO=0;
  10004. GNULIB_FTELL=0;
  10005. GNULIB_FTELLO=0;
  10006. GNULIB_FWRITE=0;
  10007. GNULIB_GETC=0;
  10008. GNULIB_GETCHAR=0;
  10009. GNULIB_GETDELIM=0;
  10010. GNULIB_GETLINE=0;
  10011. GNULIB_OBSTACK_PRINTF=0;
  10012. GNULIB_OBSTACK_PRINTF_POSIX=0;
  10013. GNULIB_PCLOSE=0;
  10014. GNULIB_PERROR=0;
  10015. GNULIB_POPEN=0;
  10016. GNULIB_PRINTF=0;
  10017. GNULIB_PRINTF_POSIX=0;
  10018. GNULIB_PUTC=0;
  10019. GNULIB_PUTCHAR=0;
  10020. GNULIB_PUTS=0;
  10021. GNULIB_REMOVE=0;
  10022. GNULIB_RENAME=0;
  10023. GNULIB_RENAMEAT=0;
  10024. GNULIB_SCANF=0;
  10025. GNULIB_SNPRINTF=0;
  10026. GNULIB_SPRINTF_POSIX=0;
  10027. GNULIB_STDIO_H_NONBLOCKING=0;
  10028. GNULIB_STDIO_H_SIGPIPE=0;
  10029. GNULIB_TMPFILE=0;
  10030. GNULIB_VASPRINTF=0;
  10031. GNULIB_VFSCANF=0;
  10032. GNULIB_VSCANF=0;
  10033. GNULIB_VDPRINTF=0;
  10034. GNULIB_VFPRINTF=0;
  10035. GNULIB_VFPRINTF_POSIX=0;
  10036. GNULIB_VPRINTF=0;
  10037. GNULIB_VPRINTF_POSIX=0;
  10038. GNULIB_VSNPRINTF=0;
  10039. GNULIB_VSPRINTF_POSIX=0;
  10040. GNULIB_MDA_FCLOSEALL=1;
  10041. GNULIB_MDA_FDOPEN=1;
  10042. GNULIB_MDA_FILENO=1;
  10043. GNULIB_MDA_GETW=1;
  10044. GNULIB_MDA_PUTW=1;
  10045. GNULIB_MDA_TEMPNAM=1;
  10046. HAVE_DECL_FCLOSEALL=1;
  10047. HAVE_DECL_FPURGE=1;
  10048. HAVE_DECL_FSEEKO=1;
  10049. HAVE_DECL_FTELLO=1;
  10050. HAVE_DECL_GETDELIM=1;
  10051. HAVE_DECL_GETLINE=1;
  10052. HAVE_DECL_OBSTACK_PRINTF=1;
  10053. HAVE_DECL_SNPRINTF=1;
  10054. HAVE_DECL_VSNPRINTF=1;
  10055. HAVE_DPRINTF=1;
  10056. HAVE_FSEEKO=1;
  10057. HAVE_FTELLO=1;
  10058. HAVE_PCLOSE=1;
  10059. HAVE_POPEN=1;
  10060. HAVE_RENAMEAT=1;
  10061. HAVE_VASPRINTF=1;
  10062. HAVE_VDPRINTF=1;
  10063. REPLACE_DPRINTF=0;
  10064. REPLACE_FCLOSE=0;
  10065. REPLACE_FDOPEN=0;
  10066. REPLACE_FFLUSH=0;
  10067. REPLACE_FOPEN=0;
  10068. REPLACE_FPRINTF=0;
  10069. REPLACE_FPURGE=0;
  10070. REPLACE_FREOPEN=0;
  10071. REPLACE_FSEEK=0;
  10072. REPLACE_FSEEKO=0;
  10073. REPLACE_FTELL=0;
  10074. REPLACE_FTELLO=0;
  10075. REPLACE_GETDELIM=0;
  10076. REPLACE_GETLINE=0;
  10077. REPLACE_OBSTACK_PRINTF=0;
  10078. REPLACE_PERROR=0;
  10079. REPLACE_POPEN=0;
  10080. REPLACE_PRINTF=0;
  10081. REPLACE_REMOVE=0;
  10082. REPLACE_RENAME=0;
  10083. REPLACE_RENAMEAT=0;
  10084. REPLACE_SNPRINTF=0;
  10085. REPLACE_SPRINTF=0;
  10086. REPLACE_STDIO_READ_FUNCS=0;
  10087. REPLACE_STDIO_WRITE_FUNCS=0;
  10088. REPLACE_TMPFILE=0;
  10089. REPLACE_VASPRINTF=0;
  10090. REPLACE_VDPRINTF=0;
  10091. REPLACE_VFPRINTF=0;
  10092. REPLACE_VPRINTF=0;
  10093. REPLACE_VSNPRINTF=0;
  10094. REPLACE_VSPRINTF=0;
  10095. ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
  10096. if test "x$ac_cv_have_decl_getdelim" = xyes; then :
  10097. ac_have_decl=1
  10098. else
  10099. ac_have_decl=0
  10100. fi
  10101. cat >>confdefs.h <<_ACEOF
  10102. #define HAVE_DECL_GETDELIM $ac_have_decl
  10103. _ACEOF
  10104. ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
  10105. if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
  10106. ac_have_decl=1
  10107. else
  10108. ac_have_decl=0
  10109. fi
  10110. cat >>confdefs.h <<_ACEOF
  10111. #define HAVE_DECL_GETDTABLESIZE $ac_have_decl
  10112. _ACEOF
  10113. ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
  10114. if test "x$ac_cv_have_decl_getline" = xyes; then :
  10115. ac_have_decl=1
  10116. else
  10117. ac_have_decl=0
  10118. fi
  10119. cat >>confdefs.h <<_ACEOF
  10120. #define HAVE_DECL_GETLINE $ac_have_decl
  10121. _ACEOF
  10122. ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
  10123. if test "x$ac_cv_have_decl_getlogin_r" = xyes; then :
  10124. ac_have_decl=1
  10125. else
  10126. ac_have_decl=0
  10127. fi
  10128. cat >>confdefs.h <<_ACEOF
  10129. #define HAVE_DECL_GETLOGIN_R $ac_have_decl
  10130. _ACEOF
  10131. ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
  10132. if test "x$ac_cv_have_decl_getlogin" = xyes; then :
  10133. ac_have_decl=1
  10134. else
  10135. ac_have_decl=0
  10136. fi
  10137. cat >>confdefs.h <<_ACEOF
  10138. #define HAVE_DECL_GETLOGIN $ac_have_decl
  10139. _ACEOF
  10140. case $host_os in
  10141. mingw*)
  10142. LIB_GETLOGIN='-ladvapi32' ;;
  10143. *)
  10144. LIB_GETLOGIN= ;;
  10145. esac
  10146. GNULIB_GETRANDOM=0;
  10147. HAVE_GETRANDOM=1;
  10148. REPLACE_GETRANDOM=0;
  10149. GNULIB_GETTIMEOFDAY=0;
  10150. HAVE_GETTIMEOFDAY=1;
  10151. HAVE_STRUCT_TIMEVAL=1;
  10152. HAVE_SYS_TIME_H=1;
  10153. REPLACE_GETTIMEOFDAY=0;
  10154. REPLACE_STRUCT_TIMEVAL=0;
  10155. if test $gl_cv_have_include_next = yes; then
  10156. gl_cv_next_sys_time_h='<'sys/time.h'>'
  10157. else
  10158. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
  10159. $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
  10160. if ${gl_cv_next_sys_time_h+:} false; then :
  10161. $as_echo_n "(cached) " >&6
  10162. else
  10163. if test $ac_cv_header_sys_time_h = yes; then
  10164. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10165. /* end confdefs.h. */
  10166. #include <sys/time.h>
  10167. _ACEOF
  10168. case "$host_os" in
  10169. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  10170. *) gl_absname_cpp="$ac_cpp" ;;
  10171. esac
  10172. case "$host_os" in
  10173. mingw*)
  10174. gl_dirsep_regex='[/\\]'
  10175. ;;
  10176. *)
  10177. gl_dirsep_regex='\/'
  10178. ;;
  10179. esac
  10180. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  10181. gl_header_literal_regex=`echo 'sys/time.h' \
  10182. | sed -e "$gl_make_literal_regex_sed"`
  10183. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  10184. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  10185. s|^/[^/]|//&|
  10186. p
  10187. q
  10188. }'
  10189. gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  10190. sed -n "$gl_absolute_header_sed"`
  10191. gl_header=$gl_cv_absolute_sys_time_h
  10192. gl_cv_next_sys_time_h='"'$gl_header'"'
  10193. else
  10194. gl_cv_next_sys_time_h='<'sys/time.h'>'
  10195. fi
  10196. fi
  10197. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
  10198. $as_echo "$gl_cv_next_sys_time_h" >&6; }
  10199. fi
  10200. NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
  10201. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  10202. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  10203. gl_next_as_first_directive='<'sys/time.h'>'
  10204. else
  10205. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  10206. gl_next_as_first_directive=$gl_cv_next_sys_time_h
  10207. fi
  10208. NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
  10209. if test $ac_cv_header_sys_time_h != yes; then
  10210. HAVE_SYS_TIME_H=0
  10211. fi
  10212. if test $ac_cv_header_sys_socket_h != yes; then
  10213. for ac_header in winsock2.h
  10214. do :
  10215. ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
  10216. if test "x$ac_cv_header_winsock2_h" = xyes; then :
  10217. cat >>confdefs.h <<_ACEOF
  10218. #define HAVE_WINSOCK2_H 1
  10219. _ACEOF
  10220. fi
  10221. done
  10222. fi
  10223. if test "$ac_cv_header_winsock2_h" = yes; then
  10224. HAVE_WINSOCK2_H=1
  10225. UNISTD_H_HAVE_WINSOCK2_H=1
  10226. SYS_IOCTL_H_HAVE_WINSOCK2_H=1
  10227. else
  10228. HAVE_WINSOCK2_H=0
  10229. fi
  10230. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
  10231. $as_echo_n "checking for struct timeval... " >&6; }
  10232. if ${gl_cv_sys_struct_timeval+:} false; then :
  10233. $as_echo_n "(cached) " >&6
  10234. else
  10235. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10236. /* end confdefs.h. */
  10237. #if HAVE_SYS_TIME_H
  10238. #include <sys/time.h>
  10239. #endif
  10240. #include <time.h>
  10241. #if HAVE_WINSOCK2_H
  10242. # include <winsock2.h>
  10243. #endif
  10244. int
  10245. main ()
  10246. {
  10247. static struct timeval x; x.tv_sec = x.tv_usec;
  10248. ;
  10249. return 0;
  10250. }
  10251. _ACEOF
  10252. if ac_fn_c_try_compile "$LINENO"; then :
  10253. gl_cv_sys_struct_timeval=yes
  10254. else
  10255. gl_cv_sys_struct_timeval=no
  10256. fi
  10257. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  10258. fi
  10259. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
  10260. $as_echo "$gl_cv_sys_struct_timeval" >&6; }
  10261. if test $gl_cv_sys_struct_timeval != yes; then
  10262. HAVE_STRUCT_TIMEVAL=0
  10263. else
  10264. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
  10265. $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
  10266. if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
  10267. $as_echo_n "(cached) " >&6
  10268. else
  10269. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10270. /* end confdefs.h. */
  10271. #if HAVE_SYS_TIME_H
  10272. #include <sys/time.h>
  10273. #endif
  10274. #include <time.h>
  10275. #if HAVE_WINSOCK2_H
  10276. # include <winsock2.h>
  10277. #endif
  10278. int
  10279. main ()
  10280. {
  10281. static struct timeval x;
  10282. typedef int verify_tv_sec_type[
  10283. sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
  10284. ];
  10285. ;
  10286. return 0;
  10287. }
  10288. _ACEOF
  10289. if ac_fn_c_try_compile "$LINENO"; then :
  10290. gl_cv_sys_struct_timeval_tv_sec=yes
  10291. else
  10292. gl_cv_sys_struct_timeval_tv_sec=no
  10293. fi
  10294. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  10295. fi
  10296. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
  10297. $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
  10298. if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
  10299. REPLACE_STRUCT_TIMEVAL=1
  10300. fi
  10301. fi
  10302. GNULIB_GLOB=0;
  10303. HAVE_GLOB=1;
  10304. HAVE_GLOB_PATTERN_P=1;
  10305. REPLACE_GLOB=0;
  10306. REPLACE_GLOB_PATTERN_P=0;
  10307. if test $gl_cv_have_include_next = yes; then
  10308. gl_cv_next_glob_h='<'glob.h'>'
  10309. else
  10310. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <glob.h>" >&5
  10311. $as_echo_n "checking absolute name of <glob.h>... " >&6; }
  10312. if ${gl_cv_next_glob_h+:} false; then :
  10313. $as_echo_n "(cached) " >&6
  10314. else
  10315. if test $ac_cv_header_glob_h = yes; then
  10316. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10317. /* end confdefs.h. */
  10318. #include <glob.h>
  10319. _ACEOF
  10320. case "$host_os" in
  10321. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  10322. *) gl_absname_cpp="$ac_cpp" ;;
  10323. esac
  10324. case "$host_os" in
  10325. mingw*)
  10326. gl_dirsep_regex='[/\\]'
  10327. ;;
  10328. *)
  10329. gl_dirsep_regex='\/'
  10330. ;;
  10331. esac
  10332. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  10333. gl_header_literal_regex=`echo 'glob.h' \
  10334. | sed -e "$gl_make_literal_regex_sed"`
  10335. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  10336. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  10337. s|^/[^/]|//&|
  10338. p
  10339. q
  10340. }'
  10341. gl_cv_absolute_glob_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  10342. sed -n "$gl_absolute_header_sed"`
  10343. gl_header=$gl_cv_absolute_glob_h
  10344. gl_cv_next_glob_h='"'$gl_header'"'
  10345. else
  10346. gl_cv_next_glob_h='<'glob.h'>'
  10347. fi
  10348. fi
  10349. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_glob_h" >&5
  10350. $as_echo "$gl_cv_next_glob_h" >&6; }
  10351. fi
  10352. NEXT_GLOB_H=$gl_cv_next_glob_h
  10353. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  10354. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  10355. gl_next_as_first_directive='<'glob.h'>'
  10356. else
  10357. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  10358. gl_next_as_first_directive=$gl_cv_next_glob_h
  10359. fi
  10360. NEXT_AS_FIRST_DIRECTIVE_GLOB_H=$gl_next_as_first_directive
  10361. if test $ac_cv_header_glob_h = yes; then
  10362. HAVE_GLOB_H=1
  10363. else
  10364. HAVE_GLOB_H=0
  10365. fi
  10366. GLOB_H=''
  10367. if false; then
  10368. GLOB_H=glob.h
  10369. else
  10370. if test $ac_cv_header_glob_h != yes; then
  10371. GLOB_H=glob.h
  10372. fi
  10373. fi
  10374. if test -n "$GLOB_H"; then
  10375. GL_GENERATE_GLOB_H_TRUE=
  10376. GL_GENERATE_GLOB_H_FALSE='#'
  10377. else
  10378. GL_GENERATE_GLOB_H_TRUE='#'
  10379. GL_GENERATE_GLOB_H_FALSE=
  10380. fi
  10381. if test -z "$gl_pthreadlib_body_done"; then
  10382. gl_pthread_api=no
  10383. LIBPTHREAD=
  10384. LIBPMULTITHREAD=
  10385. # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
  10386. # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
  10387. ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
  10388. if test "x$ac_cv_header_pthread_h" = xyes; then :
  10389. gl_have_pthread_h=yes
  10390. else
  10391. gl_have_pthread_h=no
  10392. fi
  10393. if test "$gl_have_pthread_h" = yes; then
  10394. # Other possible tests:
  10395. # -lpthreads (FSU threads, PCthreads)
  10396. # -lgthreads
  10397. # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
  10398. # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
  10399. # the second one only in libpthread, and lock.c needs it.
  10400. #
  10401. # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
  10402. # needs -pthread for some reason. See:
  10403. # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
  10404. save_LIBS=$LIBS
  10405. for gl_pthread in '' '-pthread'; do
  10406. LIBS="$LIBS $gl_pthread"
  10407. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10408. /* end confdefs.h. */
  10409. #include <pthread.h>
  10410. pthread_mutex_t m;
  10411. pthread_mutexattr_t ma;
  10412. int
  10413. main ()
  10414. {
  10415. pthread_mutex_lock (&m);
  10416. pthread_mutexattr_init (&ma);
  10417. ;
  10418. return 0;
  10419. }
  10420. _ACEOF
  10421. if ac_fn_c_try_link "$LINENO"; then :
  10422. gl_pthread_api=yes
  10423. LIBPTHREAD=$gl_pthread
  10424. LIBPMULTITHREAD=$gl_pthread
  10425. fi
  10426. rm -f core conftest.err conftest.$ac_objext \
  10427. conftest$ac_exeext conftest.$ac_ext
  10428. LIBS=$save_LIBS
  10429. test $gl_pthread_api = yes && break
  10430. done
  10431. # Test for libpthread by looking for pthread_kill. (Not pthread_self,
  10432. # since it is defined as a macro on OSF/1.)
  10433. if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
  10434. # The program links fine without libpthread. But it may actually
  10435. # need to link with libpthread in order to create multiple threads.
  10436. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
  10437. $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
  10438. if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
  10439. $as_echo_n "(cached) " >&6
  10440. else
  10441. ac_check_lib_save_LIBS=$LIBS
  10442. LIBS="-lpthread $LIBS"
  10443. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10444. /* end confdefs.h. */
  10445. /* Override any GCC internal prototype to avoid an error.
  10446. Use char because int might match the return type of a GCC
  10447. builtin and then its argument prototype would still apply. */
  10448. #ifdef __cplusplus
  10449. extern "C"
  10450. #endif
  10451. char pthread_kill ();
  10452. int
  10453. main ()
  10454. {
  10455. return pthread_kill ();
  10456. ;
  10457. return 0;
  10458. }
  10459. _ACEOF
  10460. if ac_fn_c_try_link "$LINENO"; then :
  10461. ac_cv_lib_pthread_pthread_kill=yes
  10462. else
  10463. ac_cv_lib_pthread_pthread_kill=no
  10464. fi
  10465. rm -f core conftest.err conftest.$ac_objext \
  10466. conftest$ac_exeext conftest.$ac_ext
  10467. LIBS=$ac_check_lib_save_LIBS
  10468. fi
  10469. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
  10470. $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
  10471. if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
  10472. LIBPMULTITHREAD=-lpthread
  10473. # On Solaris and HP-UX, most pthread functions exist also in libc.
  10474. # Therefore pthread_in_use() needs to actually try to create a
  10475. # thread: pthread_create from libc will fail, whereas
  10476. # pthread_create will actually create a thread.
  10477. # On Solaris 10 or newer, this test is no longer needed, because
  10478. # libc contains the fully functional pthread functions.
  10479. case "$host_os" in
  10480. solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
  10481. $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
  10482. esac
  10483. fi
  10484. elif test $gl_pthread_api != yes; then
  10485. # Some library is needed. Try libpthread and libc_r.
  10486. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
  10487. $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
  10488. if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
  10489. $as_echo_n "(cached) " >&6
  10490. else
  10491. ac_check_lib_save_LIBS=$LIBS
  10492. LIBS="-lpthread $LIBS"
  10493. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10494. /* end confdefs.h. */
  10495. /* Override any GCC internal prototype to avoid an error.
  10496. Use char because int might match the return type of a GCC
  10497. builtin and then its argument prototype would still apply. */
  10498. #ifdef __cplusplus
  10499. extern "C"
  10500. #endif
  10501. char pthread_kill ();
  10502. int
  10503. main ()
  10504. {
  10505. return pthread_kill ();
  10506. ;
  10507. return 0;
  10508. }
  10509. _ACEOF
  10510. if ac_fn_c_try_link "$LINENO"; then :
  10511. ac_cv_lib_pthread_pthread_kill=yes
  10512. else
  10513. ac_cv_lib_pthread_pthread_kill=no
  10514. fi
  10515. rm -f core conftest.err conftest.$ac_objext \
  10516. conftest$ac_exeext conftest.$ac_ext
  10517. LIBS=$ac_check_lib_save_LIBS
  10518. fi
  10519. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
  10520. $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
  10521. if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
  10522. gl_pthread_api=yes
  10523. LIBPTHREAD=-lpthread
  10524. LIBPMULTITHREAD=-lpthread
  10525. fi
  10526. if test $gl_pthread_api != yes; then
  10527. # For FreeBSD 4.
  10528. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
  10529. $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
  10530. if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
  10531. $as_echo_n "(cached) " >&6
  10532. else
  10533. ac_check_lib_save_LIBS=$LIBS
  10534. LIBS="-lc_r $LIBS"
  10535. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10536. /* end confdefs.h. */
  10537. /* Override any GCC internal prototype to avoid an error.
  10538. Use char because int might match the return type of a GCC
  10539. builtin and then its argument prototype would still apply. */
  10540. #ifdef __cplusplus
  10541. extern "C"
  10542. #endif
  10543. char pthread_kill ();
  10544. int
  10545. main ()
  10546. {
  10547. return pthread_kill ();
  10548. ;
  10549. return 0;
  10550. }
  10551. _ACEOF
  10552. if ac_fn_c_try_link "$LINENO"; then :
  10553. ac_cv_lib_c_r_pthread_kill=yes
  10554. else
  10555. ac_cv_lib_c_r_pthread_kill=no
  10556. fi
  10557. rm -f core conftest.err conftest.$ac_objext \
  10558. conftest$ac_exeext conftest.$ac_ext
  10559. LIBS=$ac_check_lib_save_LIBS
  10560. fi
  10561. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
  10562. $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
  10563. if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
  10564. gl_pthread_api=yes
  10565. LIBPTHREAD=-lc_r
  10566. LIBPMULTITHREAD=-lc_r
  10567. fi
  10568. fi
  10569. fi
  10570. fi
  10571. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
  10572. $as_echo_n "checking whether POSIX threads API is available... " >&6; }
  10573. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
  10574. $as_echo "$gl_pthread_api" >&6; }
  10575. if test $gl_pthread_api = yes; then
  10576. $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
  10577. fi
  10578. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10579. /* end confdefs.h. */
  10580. #include <sched.h>
  10581. int
  10582. main ()
  10583. {
  10584. sched_yield ();
  10585. ;
  10586. return 0;
  10587. }
  10588. _ACEOF
  10589. if ac_fn_c_try_link "$LINENO"; then :
  10590. LIB_SCHED_YIELD=
  10591. else
  10592. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
  10593. $as_echo_n "checking for sched_yield in -lrt... " >&6; }
  10594. if ${ac_cv_lib_rt_sched_yield+:} false; then :
  10595. $as_echo_n "(cached) " >&6
  10596. else
  10597. ac_check_lib_save_LIBS=$LIBS
  10598. LIBS="-lrt $LIBS"
  10599. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10600. /* end confdefs.h. */
  10601. /* Override any GCC internal prototype to avoid an error.
  10602. Use char because int might match the return type of a GCC
  10603. builtin and then its argument prototype would still apply. */
  10604. #ifdef __cplusplus
  10605. extern "C"
  10606. #endif
  10607. char sched_yield ();
  10608. int
  10609. main ()
  10610. {
  10611. return sched_yield ();
  10612. ;
  10613. return 0;
  10614. }
  10615. _ACEOF
  10616. if ac_fn_c_try_link "$LINENO"; then :
  10617. ac_cv_lib_rt_sched_yield=yes
  10618. else
  10619. ac_cv_lib_rt_sched_yield=no
  10620. fi
  10621. rm -f core conftest.err conftest.$ac_objext \
  10622. conftest$ac_exeext conftest.$ac_ext
  10623. LIBS=$ac_check_lib_save_LIBS
  10624. fi
  10625. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
  10626. $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
  10627. if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
  10628. LIB_SCHED_YIELD=-lrt
  10629. else
  10630. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
  10631. $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
  10632. if ${ac_cv_lib_posix4_sched_yield+:} false; then :
  10633. $as_echo_n "(cached) " >&6
  10634. else
  10635. ac_check_lib_save_LIBS=$LIBS
  10636. LIBS="-lposix4 $LIBS"
  10637. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10638. /* end confdefs.h. */
  10639. /* Override any GCC internal prototype to avoid an error.
  10640. Use char because int might match the return type of a GCC
  10641. builtin and then its argument prototype would still apply. */
  10642. #ifdef __cplusplus
  10643. extern "C"
  10644. #endif
  10645. char sched_yield ();
  10646. int
  10647. main ()
  10648. {
  10649. return sched_yield ();
  10650. ;
  10651. return 0;
  10652. }
  10653. _ACEOF
  10654. if ac_fn_c_try_link "$LINENO"; then :
  10655. ac_cv_lib_posix4_sched_yield=yes
  10656. else
  10657. ac_cv_lib_posix4_sched_yield=no
  10658. fi
  10659. rm -f core conftest.err conftest.$ac_objext \
  10660. conftest$ac_exeext conftest.$ac_ext
  10661. LIBS=$ac_check_lib_save_LIBS
  10662. fi
  10663. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
  10664. $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
  10665. if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
  10666. LIB_SCHED_YIELD=-lposix4
  10667. fi
  10668. fi
  10669. fi
  10670. rm -f core conftest.err conftest.$ac_objext \
  10671. conftest$ac_exeext conftest.$ac_ext
  10672. gl_pthreadlib_body_done=done
  10673. fi
  10674. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
  10675. $as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
  10676. if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
  10677. $as_echo_n "(cached) " >&6
  10678. else
  10679. case "$host_os" in
  10680. # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
  10681. *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
  10682. gl_cv_func_setlocale_null_all_mtsafe=no ;;
  10683. # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
  10684. *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
  10685. gl_cv_func_setlocale_null_all_mtsafe=yes ;;
  10686. # If we don't know, obey --enable-cross-guesses.
  10687. *)
  10688. gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
  10689. esac
  10690. fi
  10691. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
  10692. $as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
  10693. case "$host_os" in
  10694. mingw*) ;;
  10695. *)
  10696. if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
  10697. gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
  10698. fi
  10699. ;;
  10700. esac
  10701. case "$gl_cv_func_setlocale_null_all_mtsafe" in
  10702. *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
  10703. *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
  10704. esac
  10705. cat >>confdefs.h <<_ACEOF
  10706. #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
  10707. _ACEOF
  10708. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
  10709. $as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
  10710. if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
  10711. $as_echo_n "(cached) " >&6
  10712. else
  10713. case "$host_os" in
  10714. # Guess no on OpenBSD, AIX.
  10715. openbsd* | aix*)
  10716. gl_cv_func_setlocale_null_one_mtsafe=no ;;
  10717. # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
  10718. *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
  10719. gl_cv_func_setlocale_null_one_mtsafe=yes ;;
  10720. # If we don't know, obey --enable-cross-guesses.
  10721. *)
  10722. gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
  10723. esac
  10724. fi
  10725. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
  10726. $as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
  10727. case "$host_os" in
  10728. mingw*) ;;
  10729. *)
  10730. if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
  10731. gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
  10732. fi
  10733. ;;
  10734. esac
  10735. case "$gl_cv_func_setlocale_null_one_mtsafe" in
  10736. *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
  10737. *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
  10738. esac
  10739. cat >>confdefs.h <<_ACEOF
  10740. #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
  10741. _ACEOF
  10742. if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
  10743. case "$host_os" in
  10744. mingw*) LIB_SETLOCALE_NULL= ;;
  10745. *)
  10746. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
  10747. $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
  10748. if ${gl_cv_have_weak+:} false; then :
  10749. $as_echo_n "(cached) " >&6
  10750. else
  10751. gl_cv_have_weak=no
  10752. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10753. /* end confdefs.h. */
  10754. extern void xyzzy ();
  10755. #pragma weak xyzzy
  10756. int
  10757. main ()
  10758. {
  10759. xyzzy();
  10760. ;
  10761. return 0;
  10762. }
  10763. _ACEOF
  10764. if ac_fn_c_try_link "$LINENO"; then :
  10765. gl_cv_have_weak=maybe
  10766. fi
  10767. rm -f core conftest.err conftest.$ac_objext \
  10768. conftest$ac_exeext conftest.$ac_ext
  10769. if test $gl_cv_have_weak = maybe; then
  10770. if test "$cross_compiling" = yes; then :
  10771. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10772. /* end confdefs.h. */
  10773. #ifdef __ELF__
  10774. Extensible Linking Format
  10775. #endif
  10776. _ACEOF
  10777. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  10778. $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
  10779. gl_cv_have_weak="guessing yes"
  10780. else
  10781. gl_cv_have_weak="guessing no"
  10782. fi
  10783. rm -f conftest*
  10784. else
  10785. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10786. /* end confdefs.h. */
  10787. #include <stdio.h>
  10788. #pragma weak fputs
  10789. int main ()
  10790. {
  10791. return (fputs == NULL);
  10792. }
  10793. _ACEOF
  10794. if ac_fn_c_try_run "$LINENO"; then :
  10795. gl_cv_have_weak=yes
  10796. else
  10797. gl_cv_have_weak=no
  10798. fi
  10799. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  10800. conftest.$ac_objext conftest.beam conftest.$ac_ext
  10801. fi
  10802. fi
  10803. case " $LDFLAGS " in
  10804. *" -static "*) gl_cv_have_weak=no ;;
  10805. esac
  10806. case "$gl_cv_have_weak" in
  10807. *yes)
  10808. case "$host_os" in
  10809. freebsd* | dragonfly*)
  10810. : > conftest1.c
  10811. $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
  10812. cat <<EOF > conftest2.c
  10813. #include <pthread.h>
  10814. #pragma weak pthread_mutexattr_gettype
  10815. int main ()
  10816. {
  10817. return (pthread_mutexattr_gettype != NULL);
  10818. }
  10819. EOF
  10820. $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
  10821. || gl_cv_have_weak=no
  10822. rm -f conftest1.c libempty.so conftest2.c conftest
  10823. ;;
  10824. esac
  10825. ;;
  10826. esac
  10827. fi
  10828. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
  10829. $as_echo "$gl_cv_have_weak" >&6; }
  10830. case "$gl_cv_have_weak" in
  10831. *yes)
  10832. $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
  10833. ;;
  10834. esac
  10835. case "$gl_cv_have_weak" in
  10836. *yes) LIB_SETLOCALE_NULL= ;;
  10837. *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
  10838. esac
  10839. ;;
  10840. esac
  10841. else
  10842. LIB_SETLOCALE_NULL=
  10843. fi
  10844. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
  10845. $as_echo_n "checking for IPv4 sockets... " >&6; }
  10846. if ${gl_cv_socket_ipv4+:} false; then :
  10847. $as_echo_n "(cached) " >&6
  10848. else
  10849. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10850. /* end confdefs.h. */
  10851. #include <sys/types.h>
  10852. #ifdef HAVE_SYS_SOCKET_H
  10853. #include <sys/socket.h>
  10854. #endif
  10855. #ifdef HAVE_NETINET_IN_H
  10856. #include <netinet/in.h>
  10857. #endif
  10858. #ifdef HAVE_WINSOCK2_H
  10859. #include <winsock2.h>
  10860. #endif
  10861. int
  10862. main ()
  10863. {
  10864. int x = AF_INET; struct in_addr y; struct sockaddr_in z;
  10865. if (&x && &y && &z) return 0;
  10866. ;
  10867. return 0;
  10868. }
  10869. _ACEOF
  10870. if ac_fn_c_try_compile "$LINENO"; then :
  10871. gl_cv_socket_ipv4=yes
  10872. else
  10873. gl_cv_socket_ipv4=no
  10874. fi
  10875. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  10876. fi
  10877. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
  10878. $as_echo "$gl_cv_socket_ipv4" >&6; }
  10879. if test $gl_cv_socket_ipv4 = yes; then
  10880. $as_echo "#define HAVE_IPV4 1" >>confdefs.h
  10881. fi
  10882. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
  10883. $as_echo_n "checking for IPv6 sockets... " >&6; }
  10884. if ${gl_cv_socket_ipv6+:} false; then :
  10885. $as_echo_n "(cached) " >&6
  10886. else
  10887. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10888. /* end confdefs.h. */
  10889. #include <sys/types.h>
  10890. #ifdef HAVE_SYS_SOCKET_H
  10891. #include <sys/socket.h>
  10892. #endif
  10893. #ifdef HAVE_NETINET_IN_H
  10894. #include <netinet/in.h>
  10895. #endif
  10896. #ifdef HAVE_WINSOCK2_H
  10897. #include <winsock2.h>
  10898. #endif
  10899. #ifdef HAVE_WS2TCPIP_H
  10900. #include <ws2tcpip.h>
  10901. #endif
  10902. int
  10903. main ()
  10904. {
  10905. int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
  10906. if (&x && &y && &z) return 0;
  10907. ;
  10908. return 0;
  10909. }
  10910. _ACEOF
  10911. if ac_fn_c_try_compile "$LINENO"; then :
  10912. gl_cv_socket_ipv6=yes
  10913. else
  10914. gl_cv_socket_ipv6=no
  10915. fi
  10916. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  10917. fi
  10918. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
  10919. $as_echo "$gl_cv_socket_ipv6" >&6; }
  10920. if test $gl_cv_socket_ipv6 = yes; then
  10921. $as_echo "#define HAVE_IPV6 1" >>confdefs.h
  10922. fi
  10923. if test $gl_cv_have_include_next = yes; then
  10924. gl_cv_next_limits_h='<'limits.h'>'
  10925. else
  10926. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
  10927. $as_echo_n "checking absolute name of <limits.h>... " >&6; }
  10928. if ${gl_cv_next_limits_h+:} false; then :
  10929. $as_echo_n "(cached) " >&6
  10930. else
  10931. if test $ac_cv_header_limits_h = yes; then
  10932. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10933. /* end confdefs.h. */
  10934. #include <limits.h>
  10935. _ACEOF
  10936. case "$host_os" in
  10937. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  10938. *) gl_absname_cpp="$ac_cpp" ;;
  10939. esac
  10940. case "$host_os" in
  10941. mingw*)
  10942. gl_dirsep_regex='[/\\]'
  10943. ;;
  10944. *)
  10945. gl_dirsep_regex='\/'
  10946. ;;
  10947. esac
  10948. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  10949. gl_header_literal_regex=`echo 'limits.h' \
  10950. | sed -e "$gl_make_literal_regex_sed"`
  10951. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  10952. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  10953. s|^/[^/]|//&|
  10954. p
  10955. q
  10956. }'
  10957. gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  10958. sed -n "$gl_absolute_header_sed"`
  10959. gl_header=$gl_cv_absolute_limits_h
  10960. gl_cv_next_limits_h='"'$gl_header'"'
  10961. else
  10962. gl_cv_next_limits_h='<'limits.h'>'
  10963. fi
  10964. fi
  10965. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
  10966. $as_echo "$gl_cv_next_limits_h" >&6; }
  10967. fi
  10968. NEXT_LIMITS_H=$gl_cv_next_limits_h
  10969. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  10970. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  10971. gl_next_as_first_directive='<'limits.h'>'
  10972. else
  10973. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  10974. gl_next_as_first_directive=$gl_cv_next_limits_h
  10975. fi
  10976. NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
  10977. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5
  10978. $as_echo_n "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; }
  10979. if ${gl_cv_header_limits_width+:} false; then :
  10980. $as_echo_n "(cached) " >&6
  10981. else
  10982. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  10983. /* end confdefs.h. */
  10984. #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
  10985. #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
  10986. #endif
  10987. #include <limits.h>
  10988. long long llm = LLONG_MAX;
  10989. int wb = WORD_BIT;
  10990. int ullw = ULLONG_WIDTH;
  10991. int
  10992. main ()
  10993. {
  10994. ;
  10995. return 0;
  10996. }
  10997. _ACEOF
  10998. if ac_fn_c_try_compile "$LINENO"; then :
  10999. gl_cv_header_limits_width=yes
  11000. else
  11001. gl_cv_header_limits_width=no
  11002. fi
  11003. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11004. fi
  11005. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
  11006. $as_echo "$gl_cv_header_limits_width" >&6; }
  11007. if test "$gl_cv_header_limits_width" = yes; then
  11008. LIMITS_H=
  11009. else
  11010. LIMITS_H=limits.h
  11011. fi
  11012. if test -n "$LIMITS_H"; then
  11013. GL_GENERATE_LIMITS_H_TRUE=
  11014. GL_GENERATE_LIMITS_H_FALSE='#'
  11015. else
  11016. GL_GENERATE_LIMITS_H_TRUE='#'
  11017. GL_GENERATE_LIMITS_H_FALSE=
  11018. fi
  11019. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
  11020. $as_echo_n "checking for wint_t... " >&6; }
  11021. if ${gt_cv_c_wint_t+:} false; then :
  11022. $as_echo_n "(cached) " >&6
  11023. else
  11024. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11025. /* end confdefs.h. */
  11026. #include <wchar.h>
  11027. wint_t foo = (wchar_t)'\0';
  11028. int
  11029. main ()
  11030. {
  11031. ;
  11032. return 0;
  11033. }
  11034. _ACEOF
  11035. if ac_fn_c_try_compile "$LINENO"; then :
  11036. gt_cv_c_wint_t=yes
  11037. else
  11038. gt_cv_c_wint_t=no
  11039. fi
  11040. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11041. fi
  11042. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
  11043. $as_echo "$gt_cv_c_wint_t" >&6; }
  11044. if test $gt_cv_c_wint_t = yes; then
  11045. $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
  11046. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
  11047. $as_echo_n "checking whether wint_t is large enough... " >&6; }
  11048. if ${gl_cv_type_wint_t_large_enough+:} false; then :
  11049. $as_echo_n "(cached) " >&6
  11050. else
  11051. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11052. /* end confdefs.h. */
  11053. #include <wchar.h>
  11054. int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
  11055. int
  11056. main ()
  11057. {
  11058. ;
  11059. return 0;
  11060. }
  11061. _ACEOF
  11062. if ac_fn_c_try_compile "$LINENO"; then :
  11063. gl_cv_type_wint_t_large_enough=yes
  11064. else
  11065. gl_cv_type_wint_t_large_enough=no
  11066. fi
  11067. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11068. fi
  11069. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
  11070. $as_echo "$gl_cv_type_wint_t_large_enough" >&6; }
  11071. if test $gl_cv_type_wint_t_large_enough = no; then
  11072. GNULIB_OVERRIDES_WINT_T=1
  11073. else
  11074. GNULIB_OVERRIDES_WINT_T=0
  11075. fi
  11076. else
  11077. GNULIB_OVERRIDES_WINT_T=0
  11078. fi
  11079. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
  11080. $as_echo_n "checking whether the compiler produces multi-arch binaries... " >&6; }
  11081. if ${gl_cv_c_multiarch+:} false; then :
  11082. $as_echo_n "(cached) " >&6
  11083. else
  11084. gl_cv_c_multiarch=no
  11085. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11086. /* end confdefs.h. */
  11087. #ifndef __APPLE_CC__
  11088. not a universal capable compiler
  11089. #endif
  11090. typedef int dummy;
  11091. _ACEOF
  11092. if ac_fn_c_try_compile "$LINENO"; then :
  11093. arch=
  11094. prev=
  11095. for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
  11096. if test -n "$prev"; then
  11097. case $word in
  11098. i?86 | x86_64 | ppc | ppc64 | arm | arm64)
  11099. if test -z "$arch" || test "$arch" = "$word"; then
  11100. arch="$word"
  11101. else
  11102. gl_cv_c_multiarch=yes
  11103. fi
  11104. ;;
  11105. esac
  11106. prev=
  11107. else
  11108. if test "x$word" = "x-arch"; then
  11109. prev=arch
  11110. fi
  11111. fi
  11112. done
  11113. fi
  11114. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11115. fi
  11116. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
  11117. $as_echo "$gl_cv_c_multiarch" >&6; }
  11118. if test $gl_cv_c_multiarch = yes; then
  11119. APPLE_UNIVERSAL_BUILD=1
  11120. else
  11121. APPLE_UNIVERSAL_BUILD=0
  11122. fi
  11123. $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
  11124. $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
  11125. if test $ac_cv_header_wchar_h = yes; then
  11126. HAVE_WCHAR_H=1
  11127. else
  11128. HAVE_WCHAR_H=0
  11129. fi
  11130. if test $ac_cv_header_inttypes_h = yes; then
  11131. HAVE_INTTYPES_H=1
  11132. else
  11133. HAVE_INTTYPES_H=0
  11134. fi
  11135. if test $ac_cv_header_sys_types_h = yes; then
  11136. HAVE_SYS_TYPES_H=1
  11137. else
  11138. HAVE_SYS_TYPES_H=0
  11139. fi
  11140. if test $gl_cv_have_include_next = yes; then
  11141. gl_cv_next_stdint_h='<'stdint.h'>'
  11142. else
  11143. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
  11144. $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
  11145. if ${gl_cv_next_stdint_h+:} false; then :
  11146. $as_echo_n "(cached) " >&6
  11147. else
  11148. if test $ac_cv_header_stdint_h = yes; then
  11149. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11150. /* end confdefs.h. */
  11151. #include <stdint.h>
  11152. _ACEOF
  11153. case "$host_os" in
  11154. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  11155. *) gl_absname_cpp="$ac_cpp" ;;
  11156. esac
  11157. case "$host_os" in
  11158. mingw*)
  11159. gl_dirsep_regex='[/\\]'
  11160. ;;
  11161. *)
  11162. gl_dirsep_regex='\/'
  11163. ;;
  11164. esac
  11165. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  11166. gl_header_literal_regex=`echo 'stdint.h' \
  11167. | sed -e "$gl_make_literal_regex_sed"`
  11168. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  11169. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  11170. s|^/[^/]|//&|
  11171. p
  11172. q
  11173. }'
  11174. gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  11175. sed -n "$gl_absolute_header_sed"`
  11176. gl_header=$gl_cv_absolute_stdint_h
  11177. gl_cv_next_stdint_h='"'$gl_header'"'
  11178. else
  11179. gl_cv_next_stdint_h='<'stdint.h'>'
  11180. fi
  11181. fi
  11182. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
  11183. $as_echo "$gl_cv_next_stdint_h" >&6; }
  11184. fi
  11185. NEXT_STDINT_H=$gl_cv_next_stdint_h
  11186. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  11187. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  11188. gl_next_as_first_directive='<'stdint.h'>'
  11189. else
  11190. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  11191. gl_next_as_first_directive=$gl_cv_next_stdint_h
  11192. fi
  11193. NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
  11194. if test $ac_cv_header_stdint_h = yes; then
  11195. HAVE_STDINT_H=1
  11196. else
  11197. HAVE_STDINT_H=0
  11198. fi
  11199. if test $ac_cv_header_stdint_h = yes; then
  11200. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
  11201. $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
  11202. if ${gl_cv_header_working_stdint_h+:} false; then :
  11203. $as_echo_n "(cached) " >&6
  11204. else
  11205. gl_cv_header_working_stdint_h=no
  11206. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11207. /* end confdefs.h. */
  11208. #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
  11209. #define __STDC_CONSTANT_MACROS 1
  11210. #define __STDC_LIMIT_MACROS 1
  11211. #include <stdint.h>
  11212. /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
  11213. #if !(defined WCHAR_MIN && defined WCHAR_MAX)
  11214. #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
  11215. #endif
  11216. #include <stddef.h>
  11217. #include <signal.h>
  11218. #if HAVE_WCHAR_H
  11219. # include <wchar.h>
  11220. #endif
  11221. #ifdef INT8_MAX
  11222. int8_t a1 = INT8_MAX;
  11223. int8_t a1min = INT8_MIN;
  11224. #endif
  11225. #ifdef INT16_MAX
  11226. int16_t a2 = INT16_MAX;
  11227. int16_t a2min = INT16_MIN;
  11228. #endif
  11229. #ifdef INT32_MAX
  11230. int32_t a3 = INT32_MAX;
  11231. int32_t a3min = INT32_MIN;
  11232. #endif
  11233. #ifdef INT64_MAX
  11234. int64_t a4 = INT64_MAX;
  11235. int64_t a4min = INT64_MIN;
  11236. #endif
  11237. #ifdef UINT8_MAX
  11238. uint8_t b1 = UINT8_MAX;
  11239. #else
  11240. typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
  11241. #endif
  11242. #ifdef UINT16_MAX
  11243. uint16_t b2 = UINT16_MAX;
  11244. #endif
  11245. #ifdef UINT32_MAX
  11246. uint32_t b3 = UINT32_MAX;
  11247. #endif
  11248. #ifdef UINT64_MAX
  11249. uint64_t b4 = UINT64_MAX;
  11250. #endif
  11251. int_least8_t c1 = INT8_C (0x7f);
  11252. int_least8_t c1max = INT_LEAST8_MAX;
  11253. int_least8_t c1min = INT_LEAST8_MIN;
  11254. int_least16_t c2 = INT16_C (0x7fff);
  11255. int_least16_t c2max = INT_LEAST16_MAX;
  11256. int_least16_t c2min = INT_LEAST16_MIN;
  11257. int_least32_t c3 = INT32_C (0x7fffffff);
  11258. int_least32_t c3max = INT_LEAST32_MAX;
  11259. int_least32_t c3min = INT_LEAST32_MIN;
  11260. int_least64_t c4 = INT64_C (0x7fffffffffffffff);
  11261. int_least64_t c4max = INT_LEAST64_MAX;
  11262. int_least64_t c4min = INT_LEAST64_MIN;
  11263. uint_least8_t d1 = UINT8_C (0xff);
  11264. uint_least8_t d1max = UINT_LEAST8_MAX;
  11265. uint_least16_t d2 = UINT16_C (0xffff);
  11266. uint_least16_t d2max = UINT_LEAST16_MAX;
  11267. uint_least32_t d3 = UINT32_C (0xffffffff);
  11268. uint_least32_t d3max = UINT_LEAST32_MAX;
  11269. uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
  11270. uint_least64_t d4max = UINT_LEAST64_MAX;
  11271. int_fast8_t e1 = INT_FAST8_MAX;
  11272. int_fast8_t e1min = INT_FAST8_MIN;
  11273. int_fast16_t e2 = INT_FAST16_MAX;
  11274. int_fast16_t e2min = INT_FAST16_MIN;
  11275. int_fast32_t e3 = INT_FAST32_MAX;
  11276. int_fast32_t e3min = INT_FAST32_MIN;
  11277. int_fast64_t e4 = INT_FAST64_MAX;
  11278. int_fast64_t e4min = INT_FAST64_MIN;
  11279. uint_fast8_t f1 = UINT_FAST8_MAX;
  11280. uint_fast16_t f2 = UINT_FAST16_MAX;
  11281. uint_fast32_t f3 = UINT_FAST32_MAX;
  11282. uint_fast64_t f4 = UINT_FAST64_MAX;
  11283. #ifdef INTPTR_MAX
  11284. intptr_t g = INTPTR_MAX;
  11285. intptr_t gmin = INTPTR_MIN;
  11286. #endif
  11287. #ifdef UINTPTR_MAX
  11288. uintptr_t h = UINTPTR_MAX;
  11289. #endif
  11290. intmax_t i = INTMAX_MAX;
  11291. uintmax_t j = UINTMAX_MAX;
  11292. /* Check that SIZE_MAX has the correct type, if possible. */
  11293. #if 201112 <= __STDC_VERSION__
  11294. int k = _Generic (SIZE_MAX, size_t: 0);
  11295. #elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
  11296. || (0x5110 <= __SUNPRO_C && !__STDC__))
  11297. extern size_t k;
  11298. extern __typeof__ (SIZE_MAX) k;
  11299. #endif
  11300. #include <limits.h> /* for CHAR_BIT */
  11301. #define TYPE_MINIMUM(t) \
  11302. ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
  11303. #define TYPE_MAXIMUM(t) \
  11304. ((t) ((t) 0 < (t) -1 \
  11305. ? (t) -1 \
  11306. : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
  11307. struct s {
  11308. int check_PTRDIFF:
  11309. PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
  11310. && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
  11311. ? 1 : -1;
  11312. /* Detect bug in FreeBSD 6.0 / ia64. */
  11313. int check_SIG_ATOMIC:
  11314. SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
  11315. && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
  11316. ? 1 : -1;
  11317. int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
  11318. int check_WCHAR:
  11319. WCHAR_MIN == TYPE_MINIMUM (wchar_t)
  11320. && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
  11321. ? 1 : -1;
  11322. /* Detect bug in mingw. */
  11323. int check_WINT:
  11324. WINT_MIN == TYPE_MINIMUM (wint_t)
  11325. && WINT_MAX == TYPE_MAXIMUM (wint_t)
  11326. ? 1 : -1;
  11327. /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
  11328. int check_UINT8_C:
  11329. (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
  11330. int check_UINT16_C:
  11331. (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
  11332. /* Detect bugs in OpenBSD 3.9 stdint.h. */
  11333. #ifdef UINT8_MAX
  11334. int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
  11335. #endif
  11336. #ifdef UINT16_MAX
  11337. int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
  11338. #endif
  11339. #ifdef UINT32_MAX
  11340. int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
  11341. #endif
  11342. #ifdef UINT64_MAX
  11343. int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
  11344. #endif
  11345. int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
  11346. int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
  11347. int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
  11348. int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
  11349. int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
  11350. int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
  11351. int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
  11352. int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
  11353. int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
  11354. int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
  11355. int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
  11356. };
  11357. int
  11358. main ()
  11359. {
  11360. ;
  11361. return 0;
  11362. }
  11363. _ACEOF
  11364. if ac_fn_c_try_compile "$LINENO"; then :
  11365. if test "$cross_compiling" = yes; then :
  11366. case "$host_os" in
  11367. # Guess yes on native Windows.
  11368. mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
  11369. # In general, assume it works.
  11370. *) gl_cv_header_working_stdint_h="guessing yes" ;;
  11371. esac
  11372. else
  11373. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11374. /* end confdefs.h. */
  11375. #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
  11376. #define __STDC_CONSTANT_MACROS 1
  11377. #define __STDC_LIMIT_MACROS 1
  11378. #include <stdint.h>
  11379. #include <stddef.h>
  11380. #include <signal.h>
  11381. #if HAVE_WCHAR_H
  11382. # include <wchar.h>
  11383. #endif
  11384. #include <stdio.h>
  11385. #include <string.h>
  11386. #define MVAL(macro) MVAL1(macro)
  11387. #define MVAL1(expression) #expression
  11388. static const char *macro_values[] =
  11389. {
  11390. #ifdef INT8_MAX
  11391. MVAL (INT8_MAX),
  11392. #endif
  11393. #ifdef INT16_MAX
  11394. MVAL (INT16_MAX),
  11395. #endif
  11396. #ifdef INT32_MAX
  11397. MVAL (INT32_MAX),
  11398. #endif
  11399. #ifdef INT64_MAX
  11400. MVAL (INT64_MAX),
  11401. #endif
  11402. #ifdef UINT8_MAX
  11403. MVAL (UINT8_MAX),
  11404. #endif
  11405. #ifdef UINT16_MAX
  11406. MVAL (UINT16_MAX),
  11407. #endif
  11408. #ifdef UINT32_MAX
  11409. MVAL (UINT32_MAX),
  11410. #endif
  11411. #ifdef UINT64_MAX
  11412. MVAL (UINT64_MAX),
  11413. #endif
  11414. NULL
  11415. };
  11416. int
  11417. main ()
  11418. {
  11419. const char **mv;
  11420. for (mv = macro_values; *mv != NULL; mv++)
  11421. {
  11422. const char *value = *mv;
  11423. /* Test whether it looks like a cast expression. */
  11424. if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
  11425. || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
  11426. || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
  11427. || strncmp (value, "((int)"/*)*/, 6) == 0
  11428. || strncmp (value, "((signed short)"/*)*/, 15) == 0
  11429. || strncmp (value, "((signed char)"/*)*/, 14) == 0)
  11430. return mv - macro_values + 1;
  11431. }
  11432. return 0;
  11433. ;
  11434. return 0;
  11435. }
  11436. _ACEOF
  11437. if ac_fn_c_try_run "$LINENO"; then :
  11438. gl_cv_header_working_stdint_h=yes
  11439. fi
  11440. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  11441. conftest.$ac_objext conftest.beam conftest.$ac_ext
  11442. fi
  11443. fi
  11444. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11445. fi
  11446. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
  11447. $as_echo "$gl_cv_header_working_stdint_h" >&6; }
  11448. fi
  11449. HAVE_C99_STDINT_H=0
  11450. HAVE_SYS_BITYPES_H=0
  11451. HAVE_SYS_INTTYPES_H=0
  11452. STDINT_H=stdint.h
  11453. case "$gl_cv_header_working_stdint_h" in
  11454. *yes)
  11455. HAVE_C99_STDINT_H=1
  11456. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
  11457. $as_echo_n "checking whether stdint.h works without ISO C predefines... " >&6; }
  11458. if ${gl_cv_header_stdint_without_STDC_macros+:} false; then :
  11459. $as_echo_n "(cached) " >&6
  11460. else
  11461. gl_cv_header_stdint_without_STDC_macros=no
  11462. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11463. /* end confdefs.h. */
  11464. #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
  11465. #include <stdint.h>
  11466. #include <stddef.h>
  11467. #include <signal.h>
  11468. #if HAVE_WCHAR_H
  11469. # include <wchar.h>
  11470. #endif
  11471. intmax_t im = INTMAX_MAX;
  11472. int32_t i32 = INT32_C (0x7fffffff);
  11473. int
  11474. main ()
  11475. {
  11476. ;
  11477. return 0;
  11478. }
  11479. _ACEOF
  11480. if ac_fn_c_try_compile "$LINENO"; then :
  11481. gl_cv_header_stdint_without_STDC_macros=yes
  11482. fi
  11483. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11484. fi
  11485. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
  11486. $as_echo "$gl_cv_header_stdint_without_STDC_macros" >&6; }
  11487. if test $gl_cv_header_stdint_without_STDC_macros = no; then
  11488. $as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
  11489. $as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
  11490. fi
  11491. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
  11492. $as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
  11493. if ${gl_cv_header_stdint_width+:} false; then :
  11494. $as_echo_n "(cached) " >&6
  11495. else
  11496. gl_cv_header_stdint_width=no
  11497. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11498. /* end confdefs.h. */
  11499. /* Work if build is not clean. */
  11500. #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
  11501. #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
  11502. #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
  11503. #endif
  11504. #include <stdint.h>
  11505. #include <stddef.h>
  11506. #include <signal.h>
  11507. #if HAVE_WCHAR_H
  11508. # include <wchar.h>
  11509. #endif
  11510. int iw = UINTMAX_WIDTH;
  11511. int
  11512. main ()
  11513. {
  11514. ;
  11515. return 0;
  11516. }
  11517. _ACEOF
  11518. if ac_fn_c_try_compile "$LINENO"; then :
  11519. gl_cv_header_stdint_width=yes
  11520. fi
  11521. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11522. fi
  11523. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
  11524. $as_echo "$gl_cv_header_stdint_width" >&6; }
  11525. if test "$gl_cv_header_stdint_width" = yes; then
  11526. STDINT_H=
  11527. fi
  11528. ;;
  11529. *)
  11530. for ac_header in sys/inttypes.h sys/bitypes.h
  11531. do :
  11532. as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
  11533. ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
  11534. if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  11535. cat >>confdefs.h <<_ACEOF
  11536. #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  11537. _ACEOF
  11538. fi
  11539. done
  11540. if test $ac_cv_header_sys_inttypes_h = yes; then
  11541. HAVE_SYS_INTTYPES_H=1
  11542. fi
  11543. if test $ac_cv_header_sys_bitypes_h = yes; then
  11544. HAVE_SYS_BITYPES_H=1
  11545. fi
  11546. if test $APPLE_UNIVERSAL_BUILD = 0; then
  11547. for gltype in ptrdiff_t size_t ; do
  11548. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
  11549. $as_echo_n "checking for bit size of $gltype... " >&6; }
  11550. if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
  11551. $as_echo_n "(cached) " >&6
  11552. else
  11553. if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
  11554. #include <stddef.h>
  11555. #include <signal.h>
  11556. #if HAVE_WCHAR_H
  11557. # include <wchar.h>
  11558. #endif
  11559. #include <limits.h>"; then :
  11560. else
  11561. result=unknown
  11562. fi
  11563. eval gl_cv_bitsizeof_${gltype}=\$result
  11564. fi
  11565. eval ac_res=\$gl_cv_bitsizeof_${gltype}
  11566. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  11567. $as_echo "$ac_res" >&6; }
  11568. eval result=\$gl_cv_bitsizeof_${gltype}
  11569. if test $result = unknown; then
  11570. result=0
  11571. fi
  11572. GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
  11573. cat >>confdefs.h <<_ACEOF
  11574. #define BITSIZEOF_${GLTYPE} $result
  11575. _ACEOF
  11576. eval BITSIZEOF_${GLTYPE}=\$result
  11577. done
  11578. fi
  11579. for gltype in sig_atomic_t wchar_t wint_t ; do
  11580. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
  11581. $as_echo_n "checking for bit size of $gltype... " >&6; }
  11582. if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
  11583. $as_echo_n "(cached) " >&6
  11584. else
  11585. if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
  11586. #include <stddef.h>
  11587. #include <signal.h>
  11588. #if HAVE_WCHAR_H
  11589. # include <wchar.h>
  11590. #endif
  11591. #include <limits.h>"; then :
  11592. else
  11593. result=unknown
  11594. fi
  11595. eval gl_cv_bitsizeof_${gltype}=\$result
  11596. fi
  11597. eval ac_res=\$gl_cv_bitsizeof_${gltype}
  11598. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  11599. $as_echo "$ac_res" >&6; }
  11600. eval result=\$gl_cv_bitsizeof_${gltype}
  11601. if test $result = unknown; then
  11602. result=0
  11603. fi
  11604. GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
  11605. cat >>confdefs.h <<_ACEOF
  11606. #define BITSIZEOF_${GLTYPE} $result
  11607. _ACEOF
  11608. eval BITSIZEOF_${GLTYPE}=\$result
  11609. done
  11610. for gltype in sig_atomic_t wchar_t wint_t ; do
  11611. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
  11612. $as_echo_n "checking whether $gltype is signed... " >&6; }
  11613. if eval \${gl_cv_type_${gltype}_signed+:} false; then :
  11614. $as_echo_n "(cached) " >&6
  11615. else
  11616. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11617. /* end confdefs.h. */
  11618. #include <stddef.h>
  11619. #include <signal.h>
  11620. #if HAVE_WCHAR_H
  11621. # include <wchar.h>
  11622. #endif
  11623. int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
  11624. int
  11625. main ()
  11626. {
  11627. ;
  11628. return 0;
  11629. }
  11630. _ACEOF
  11631. if ac_fn_c_try_compile "$LINENO"; then :
  11632. result=yes
  11633. else
  11634. result=no
  11635. fi
  11636. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11637. eval gl_cv_type_${gltype}_signed=\$result
  11638. fi
  11639. eval ac_res=\$gl_cv_type_${gltype}_signed
  11640. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  11641. $as_echo "$ac_res" >&6; }
  11642. eval result=\$gl_cv_type_${gltype}_signed
  11643. GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
  11644. if test "$result" = yes; then
  11645. cat >>confdefs.h <<_ACEOF
  11646. #define HAVE_SIGNED_${GLTYPE} 1
  11647. _ACEOF
  11648. eval HAVE_SIGNED_${GLTYPE}=1
  11649. else
  11650. eval HAVE_SIGNED_${GLTYPE}=0
  11651. fi
  11652. done
  11653. gl_cv_type_ptrdiff_t_signed=yes
  11654. gl_cv_type_size_t_signed=no
  11655. if test $APPLE_UNIVERSAL_BUILD = 0; then
  11656. for gltype in ptrdiff_t size_t ; do
  11657. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
  11658. $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
  11659. if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
  11660. $as_echo_n "(cached) " >&6
  11661. else
  11662. eval gl_cv_type_${gltype}_suffix=no
  11663. eval result=\$gl_cv_type_${gltype}_signed
  11664. if test "$result" = yes; then
  11665. glsufu=
  11666. else
  11667. glsufu=u
  11668. fi
  11669. for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
  11670. case $glsuf in
  11671. '') gltype1='int';;
  11672. l) gltype1='long int';;
  11673. ll) gltype1='long long int';;
  11674. i64) gltype1='__int64';;
  11675. u) gltype1='unsigned int';;
  11676. ul) gltype1='unsigned long int';;
  11677. ull) gltype1='unsigned long long int';;
  11678. ui64)gltype1='unsigned __int64';;
  11679. esac
  11680. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11681. /* end confdefs.h. */
  11682. #include <stddef.h>
  11683. #include <signal.h>
  11684. #if HAVE_WCHAR_H
  11685. # include <wchar.h>
  11686. #endif
  11687. extern $gltype foo;
  11688. extern $gltype1 foo;
  11689. int
  11690. main ()
  11691. {
  11692. ;
  11693. return 0;
  11694. }
  11695. _ACEOF
  11696. if ac_fn_c_try_compile "$LINENO"; then :
  11697. eval gl_cv_type_${gltype}_suffix=\$glsuf
  11698. fi
  11699. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11700. eval result=\$gl_cv_type_${gltype}_suffix
  11701. test "$result" != no && break
  11702. done
  11703. fi
  11704. eval ac_res=\$gl_cv_type_${gltype}_suffix
  11705. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  11706. $as_echo "$ac_res" >&6; }
  11707. GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
  11708. eval result=\$gl_cv_type_${gltype}_suffix
  11709. test "$result" = no && result=
  11710. eval ${GLTYPE}_SUFFIX=\$result
  11711. cat >>confdefs.h <<_ACEOF
  11712. #define ${GLTYPE}_SUFFIX $result
  11713. _ACEOF
  11714. done
  11715. fi
  11716. for gltype in sig_atomic_t wchar_t wint_t ; do
  11717. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
  11718. $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
  11719. if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
  11720. $as_echo_n "(cached) " >&6
  11721. else
  11722. eval gl_cv_type_${gltype}_suffix=no
  11723. eval result=\$gl_cv_type_${gltype}_signed
  11724. if test "$result" = yes; then
  11725. glsufu=
  11726. else
  11727. glsufu=u
  11728. fi
  11729. for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
  11730. case $glsuf in
  11731. '') gltype1='int';;
  11732. l) gltype1='long int';;
  11733. ll) gltype1='long long int';;
  11734. i64) gltype1='__int64';;
  11735. u) gltype1='unsigned int';;
  11736. ul) gltype1='unsigned long int';;
  11737. ull) gltype1='unsigned long long int';;
  11738. ui64)gltype1='unsigned __int64';;
  11739. esac
  11740. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11741. /* end confdefs.h. */
  11742. #include <stddef.h>
  11743. #include <signal.h>
  11744. #if HAVE_WCHAR_H
  11745. # include <wchar.h>
  11746. #endif
  11747. extern $gltype foo;
  11748. extern $gltype1 foo;
  11749. int
  11750. main ()
  11751. {
  11752. ;
  11753. return 0;
  11754. }
  11755. _ACEOF
  11756. if ac_fn_c_try_compile "$LINENO"; then :
  11757. eval gl_cv_type_${gltype}_suffix=\$glsuf
  11758. fi
  11759. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11760. eval result=\$gl_cv_type_${gltype}_suffix
  11761. test "$result" != no && break
  11762. done
  11763. fi
  11764. eval ac_res=\$gl_cv_type_${gltype}_suffix
  11765. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  11766. $as_echo "$ac_res" >&6; }
  11767. GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
  11768. eval result=\$gl_cv_type_${gltype}_suffix
  11769. test "$result" = no && result=
  11770. eval ${GLTYPE}_SUFFIX=\$result
  11771. cat >>confdefs.h <<_ACEOF
  11772. #define ${GLTYPE}_SUFFIX $result
  11773. _ACEOF
  11774. done
  11775. if test $GNULIB_OVERRIDES_WINT_T = 1; then
  11776. BITSIZEOF_WINT_T=32
  11777. fi
  11778. ;;
  11779. esac
  11780. LIMITS_H='limits.h'
  11781. if test -n "$LIMITS_H"; then
  11782. GL_GENERATE_LIMITS_H_TRUE=
  11783. GL_GENERATE_LIMITS_H_FALSE='#'
  11784. else
  11785. GL_GENERATE_LIMITS_H_TRUE='#'
  11786. GL_GENERATE_LIMITS_H_FALSE=
  11787. fi
  11788. if test -n "$STDINT_H"; then
  11789. GL_GENERATE_STDINT_H_TRUE=
  11790. GL_GENERATE_STDINT_H_FALSE='#'
  11791. else
  11792. GL_GENERATE_STDINT_H_TRUE='#'
  11793. GL_GENERATE_STDINT_H_FALSE=
  11794. fi
  11795. GNULIB_IMAXABS=0;
  11796. GNULIB_IMAXDIV=0;
  11797. GNULIB_STRTOIMAX=0;
  11798. GNULIB_STRTOUMAX=0;
  11799. HAVE_DECL_IMAXABS=1;
  11800. HAVE_DECL_IMAXDIV=1;
  11801. HAVE_DECL_STRTOIMAX=1;
  11802. HAVE_DECL_STRTOUMAX=1;
  11803. HAVE_IMAXDIV_T=1;
  11804. REPLACE_STRTOIMAX=0;
  11805. REPLACE_STRTOUMAX=0;
  11806. INT32_MAX_LT_INTMAX_MAX=1;
  11807. INT64_MAX_EQ_LONG_MAX='defined _LP64';
  11808. PRIPTR_PREFIX=__PRIPTR_PREFIX;
  11809. UINT32_MAX_LT_UINTMAX_MAX=1;
  11810. UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
  11811. if test $gl_cv_have_include_next = yes; then
  11812. gl_cv_next_inttypes_h='<'inttypes.h'>'
  11813. else
  11814. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
  11815. $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
  11816. if ${gl_cv_next_inttypes_h+:} false; then :
  11817. $as_echo_n "(cached) " >&6
  11818. else
  11819. if test $ac_cv_header_inttypes_h = yes; then
  11820. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11821. /* end confdefs.h. */
  11822. #include <inttypes.h>
  11823. _ACEOF
  11824. case "$host_os" in
  11825. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  11826. *) gl_absname_cpp="$ac_cpp" ;;
  11827. esac
  11828. case "$host_os" in
  11829. mingw*)
  11830. gl_dirsep_regex='[/\\]'
  11831. ;;
  11832. *)
  11833. gl_dirsep_regex='\/'
  11834. ;;
  11835. esac
  11836. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  11837. gl_header_literal_regex=`echo 'inttypes.h' \
  11838. | sed -e "$gl_make_literal_regex_sed"`
  11839. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  11840. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  11841. s|^/[^/]|//&|
  11842. p
  11843. q
  11844. }'
  11845. gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  11846. sed -n "$gl_absolute_header_sed"`
  11847. gl_header=$gl_cv_absolute_inttypes_h
  11848. gl_cv_next_inttypes_h='"'$gl_header'"'
  11849. else
  11850. gl_cv_next_inttypes_h='<'inttypes.h'>'
  11851. fi
  11852. fi
  11853. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
  11854. $as_echo "$gl_cv_next_inttypes_h" >&6; }
  11855. fi
  11856. NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
  11857. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  11858. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  11859. gl_next_as_first_directive='<'inttypes.h'>'
  11860. else
  11861. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  11862. gl_next_as_first_directive=$gl_cv_next_inttypes_h
  11863. fi
  11864. NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
  11865. { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
  11866. $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
  11867. if ${gl_cv_cc_double_expbit0+:} false; then :
  11868. $as_echo_n "(cached) " >&6
  11869. else
  11870. if test "$cross_compiling" = yes; then :
  11871. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11872. /* end confdefs.h. */
  11873. #if defined arm || defined __arm || defined __arm__
  11874. mixed_endianness
  11875. #endif
  11876. _ACEOF
  11877. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  11878. $EGREP "mixed_endianness" >/dev/null 2>&1; then :
  11879. gl_cv_cc_double_expbit0="unknown"
  11880. else
  11881. :
  11882. if ${ac_cv_c_bigendian+:} false; then :
  11883. $as_echo_n "(cached) " >&6
  11884. else
  11885. ac_cv_c_bigendian=unknown
  11886. # See if we're dealing with a universal compiler.
  11887. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11888. /* end confdefs.h. */
  11889. #ifndef __APPLE_CC__
  11890. not a universal capable compiler
  11891. #endif
  11892. typedef int dummy;
  11893. _ACEOF
  11894. if ac_fn_c_try_compile "$LINENO"; then :
  11895. # Check for potential -arch flags. It is not universal unless
  11896. # there are at least two -arch flags with different values.
  11897. ac_arch=
  11898. ac_prev=
  11899. for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
  11900. if test -n "$ac_prev"; then
  11901. case $ac_word in
  11902. i?86 | x86_64 | ppc | ppc64)
  11903. if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
  11904. ac_arch=$ac_word
  11905. else
  11906. ac_cv_c_bigendian=universal
  11907. break
  11908. fi
  11909. ;;
  11910. esac
  11911. ac_prev=
  11912. elif test "x$ac_word" = "x-arch"; then
  11913. ac_prev=arch
  11914. fi
  11915. done
  11916. fi
  11917. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11918. if test $ac_cv_c_bigendian = unknown; then
  11919. # See if sys/param.h defines the BYTE_ORDER macro.
  11920. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11921. /* end confdefs.h. */
  11922. #include <sys/types.h>
  11923. #include <sys/param.h>
  11924. int
  11925. main ()
  11926. {
  11927. #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
  11928. && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
  11929. && LITTLE_ENDIAN)
  11930. bogus endian macros
  11931. #endif
  11932. ;
  11933. return 0;
  11934. }
  11935. _ACEOF
  11936. if ac_fn_c_try_compile "$LINENO"; then :
  11937. # It does; now see whether it defined to BIG_ENDIAN or not.
  11938. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11939. /* end confdefs.h. */
  11940. #include <sys/types.h>
  11941. #include <sys/param.h>
  11942. int
  11943. main ()
  11944. {
  11945. #if BYTE_ORDER != BIG_ENDIAN
  11946. not big endian
  11947. #endif
  11948. ;
  11949. return 0;
  11950. }
  11951. _ACEOF
  11952. if ac_fn_c_try_compile "$LINENO"; then :
  11953. ac_cv_c_bigendian=yes
  11954. else
  11955. ac_cv_c_bigendian=no
  11956. fi
  11957. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11958. fi
  11959. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11960. fi
  11961. if test $ac_cv_c_bigendian = unknown; then
  11962. # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
  11963. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11964. /* end confdefs.h. */
  11965. #include <limits.h>
  11966. int
  11967. main ()
  11968. {
  11969. #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
  11970. bogus endian macros
  11971. #endif
  11972. ;
  11973. return 0;
  11974. }
  11975. _ACEOF
  11976. if ac_fn_c_try_compile "$LINENO"; then :
  11977. # It does; now see whether it defined to _BIG_ENDIAN or not.
  11978. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11979. /* end confdefs.h. */
  11980. #include <limits.h>
  11981. int
  11982. main ()
  11983. {
  11984. #ifndef _BIG_ENDIAN
  11985. not big endian
  11986. #endif
  11987. ;
  11988. return 0;
  11989. }
  11990. _ACEOF
  11991. if ac_fn_c_try_compile "$LINENO"; then :
  11992. ac_cv_c_bigendian=yes
  11993. else
  11994. ac_cv_c_bigendian=no
  11995. fi
  11996. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11997. fi
  11998. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  11999. fi
  12000. if test $ac_cv_c_bigendian = unknown; then
  12001. # Compile a test program.
  12002. if test "$cross_compiling" = yes; then :
  12003. # Try to guess by grepping values from an object file.
  12004. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12005. /* end confdefs.h. */
  12006. short int ascii_mm[] =
  12007. { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
  12008. short int ascii_ii[] =
  12009. { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
  12010. int use_ascii (int i) {
  12011. return ascii_mm[i] + ascii_ii[i];
  12012. }
  12013. short int ebcdic_ii[] =
  12014. { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
  12015. short int ebcdic_mm[] =
  12016. { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
  12017. int use_ebcdic (int i) {
  12018. return ebcdic_mm[i] + ebcdic_ii[i];
  12019. }
  12020. extern int foo;
  12021. int
  12022. main ()
  12023. {
  12024. return use_ascii (foo) == use_ebcdic (foo);
  12025. ;
  12026. return 0;
  12027. }
  12028. _ACEOF
  12029. if ac_fn_c_try_compile "$LINENO"; then :
  12030. if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
  12031. ac_cv_c_bigendian=yes
  12032. fi
  12033. if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
  12034. if test "$ac_cv_c_bigendian" = unknown; then
  12035. ac_cv_c_bigendian=no
  12036. else
  12037. # finding both strings is unlikely to happen, but who knows?
  12038. ac_cv_c_bigendian=unknown
  12039. fi
  12040. fi
  12041. fi
  12042. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  12043. else
  12044. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12045. /* end confdefs.h. */
  12046. $ac_includes_default
  12047. int
  12048. main ()
  12049. {
  12050. /* Are we little or big endian? From Harbison&Steele. */
  12051. union
  12052. {
  12053. long int l;
  12054. char c[sizeof (long int)];
  12055. } u;
  12056. u.l = 1;
  12057. return u.c[sizeof (long int) - 1] == 1;
  12058. ;
  12059. return 0;
  12060. }
  12061. _ACEOF
  12062. if ac_fn_c_try_run "$LINENO"; then :
  12063. ac_cv_c_bigendian=no
  12064. else
  12065. ac_cv_c_bigendian=yes
  12066. fi
  12067. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  12068. conftest.$ac_objext conftest.beam conftest.$ac_ext
  12069. fi
  12070. fi
  12071. fi
  12072. :
  12073. case $ac_cv_c_bigendian in #(
  12074. yes)
  12075. gl_cv_cc_double_expbit0="word 0 bit 20";; #(
  12076. no)
  12077. gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
  12078. universal)
  12079. $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
  12080. ;; #(
  12081. *)
  12082. gl_cv_cc_double_expbit0="unknown" ;;
  12083. esac
  12084. fi
  12085. rm -f conftest*
  12086. else
  12087. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12088. /* end confdefs.h. */
  12089. #include <float.h>
  12090. #include <stddef.h>
  12091. #include <stdio.h>
  12092. #include <string.h>
  12093. #define NWORDS \
  12094. ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
  12095. typedef union { double value; unsigned int word[NWORDS]; } memory_double;
  12096. static unsigned int ored_words[NWORDS];
  12097. static unsigned int anded_words[NWORDS];
  12098. static void add_to_ored_words (double x)
  12099. {
  12100. memory_double m;
  12101. size_t i;
  12102. /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
  12103. memset (&m, 0, sizeof (memory_double));
  12104. m.value = x;
  12105. for (i = 0; i < NWORDS; i++)
  12106. {
  12107. ored_words[i] |= m.word[i];
  12108. anded_words[i] &= m.word[i];
  12109. }
  12110. }
  12111. int main ()
  12112. {
  12113. size_t j;
  12114. FILE *fp = fopen ("conftest.out", "w");
  12115. if (fp == NULL)
  12116. return 1;
  12117. for (j = 0; j < NWORDS; j++)
  12118. anded_words[j] = ~ (unsigned int) 0;
  12119. add_to_ored_words (0.25);
  12120. add_to_ored_words (0.5);
  12121. add_to_ored_words (1.0);
  12122. add_to_ored_words (2.0);
  12123. add_to_ored_words (4.0);
  12124. /* Remove bits that are common (e.g. if representation of the first mantissa
  12125. bit is explicit). */
  12126. for (j = 0; j < NWORDS; j++)
  12127. ored_words[j] &= ~anded_words[j];
  12128. /* Now find the nonzero word. */
  12129. for (j = 0; j < NWORDS; j++)
  12130. if (ored_words[j] != 0)
  12131. break;
  12132. if (j < NWORDS)
  12133. {
  12134. size_t i;
  12135. for (i = j + 1; i < NWORDS; i++)
  12136. if (ored_words[i] != 0)
  12137. {
  12138. fprintf (fp, "unknown");
  12139. return (fclose (fp) != 0);
  12140. }
  12141. for (i = 0; ; i++)
  12142. if ((ored_words[j] >> i) & 1)
  12143. {
  12144. fprintf (fp, "word %d bit %d", (int) j, (int) i);
  12145. return (fclose (fp) != 0);
  12146. }
  12147. }
  12148. fprintf (fp, "unknown");
  12149. return (fclose (fp) != 0);
  12150. }
  12151. _ACEOF
  12152. if ac_fn_c_try_run "$LINENO"; then :
  12153. gl_cv_cc_double_expbit0=`cat conftest.out`
  12154. else
  12155. gl_cv_cc_double_expbit0="unknown"
  12156. fi
  12157. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  12158. conftest.$ac_objext conftest.beam conftest.$ac_ext
  12159. fi
  12160. rm -f conftest.out
  12161. fi
  12162. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
  12163. $as_echo "$gl_cv_cc_double_expbit0" >&6; }
  12164. case "$gl_cv_cc_double_expbit0" in
  12165. word*bit*)
  12166. word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
  12167. bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
  12168. cat >>confdefs.h <<_ACEOF
  12169. #define DBL_EXPBIT0_WORD $word
  12170. _ACEOF
  12171. cat >>confdefs.h <<_ACEOF
  12172. #define DBL_EXPBIT0_BIT $bit
  12173. _ACEOF
  12174. ;;
  12175. esac
  12176. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
  12177. $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
  12178. if ${ac_cv_c_bigendian+:} false; then :
  12179. $as_echo_n "(cached) " >&6
  12180. else
  12181. ac_cv_c_bigendian=unknown
  12182. # See if we're dealing with a universal compiler.
  12183. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12184. /* end confdefs.h. */
  12185. #ifndef __APPLE_CC__
  12186. not a universal capable compiler
  12187. #endif
  12188. typedef int dummy;
  12189. _ACEOF
  12190. if ac_fn_c_try_compile "$LINENO"; then :
  12191. # Check for potential -arch flags. It is not universal unless
  12192. # there are at least two -arch flags with different values.
  12193. ac_arch=
  12194. ac_prev=
  12195. for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
  12196. if test -n "$ac_prev"; then
  12197. case $ac_word in
  12198. i?86 | x86_64 | ppc | ppc64)
  12199. if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
  12200. ac_arch=$ac_word
  12201. else
  12202. ac_cv_c_bigendian=universal
  12203. break
  12204. fi
  12205. ;;
  12206. esac
  12207. ac_prev=
  12208. elif test "x$ac_word" = "x-arch"; then
  12209. ac_prev=arch
  12210. fi
  12211. done
  12212. fi
  12213. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  12214. if test $ac_cv_c_bigendian = unknown; then
  12215. # See if sys/param.h defines the BYTE_ORDER macro.
  12216. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12217. /* end confdefs.h. */
  12218. #include <sys/types.h>
  12219. #include <sys/param.h>
  12220. int
  12221. main ()
  12222. {
  12223. #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
  12224. && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
  12225. && LITTLE_ENDIAN)
  12226. bogus endian macros
  12227. #endif
  12228. ;
  12229. return 0;
  12230. }
  12231. _ACEOF
  12232. if ac_fn_c_try_compile "$LINENO"; then :
  12233. # It does; now see whether it defined to BIG_ENDIAN or not.
  12234. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12235. /* end confdefs.h. */
  12236. #include <sys/types.h>
  12237. #include <sys/param.h>
  12238. int
  12239. main ()
  12240. {
  12241. #if BYTE_ORDER != BIG_ENDIAN
  12242. not big endian
  12243. #endif
  12244. ;
  12245. return 0;
  12246. }
  12247. _ACEOF
  12248. if ac_fn_c_try_compile "$LINENO"; then :
  12249. ac_cv_c_bigendian=yes
  12250. else
  12251. ac_cv_c_bigendian=no
  12252. fi
  12253. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  12254. fi
  12255. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  12256. fi
  12257. if test $ac_cv_c_bigendian = unknown; then
  12258. # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
  12259. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12260. /* end confdefs.h. */
  12261. #include <limits.h>
  12262. int
  12263. main ()
  12264. {
  12265. #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
  12266. bogus endian macros
  12267. #endif
  12268. ;
  12269. return 0;
  12270. }
  12271. _ACEOF
  12272. if ac_fn_c_try_compile "$LINENO"; then :
  12273. # It does; now see whether it defined to _BIG_ENDIAN or not.
  12274. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12275. /* end confdefs.h. */
  12276. #include <limits.h>
  12277. int
  12278. main ()
  12279. {
  12280. #ifndef _BIG_ENDIAN
  12281. not big endian
  12282. #endif
  12283. ;
  12284. return 0;
  12285. }
  12286. _ACEOF
  12287. if ac_fn_c_try_compile "$LINENO"; then :
  12288. ac_cv_c_bigendian=yes
  12289. else
  12290. ac_cv_c_bigendian=no
  12291. fi
  12292. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  12293. fi
  12294. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  12295. fi
  12296. if test $ac_cv_c_bigendian = unknown; then
  12297. # Compile a test program.
  12298. if test "$cross_compiling" = yes; then :
  12299. # Try to guess by grepping values from an object file.
  12300. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12301. /* end confdefs.h. */
  12302. short int ascii_mm[] =
  12303. { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
  12304. short int ascii_ii[] =
  12305. { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
  12306. int use_ascii (int i) {
  12307. return ascii_mm[i] + ascii_ii[i];
  12308. }
  12309. short int ebcdic_ii[] =
  12310. { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
  12311. short int ebcdic_mm[] =
  12312. { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
  12313. int use_ebcdic (int i) {
  12314. return ebcdic_mm[i] + ebcdic_ii[i];
  12315. }
  12316. extern int foo;
  12317. int
  12318. main ()
  12319. {
  12320. return use_ascii (foo) == use_ebcdic (foo);
  12321. ;
  12322. return 0;
  12323. }
  12324. _ACEOF
  12325. if ac_fn_c_try_compile "$LINENO"; then :
  12326. if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
  12327. ac_cv_c_bigendian=yes
  12328. fi
  12329. if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
  12330. if test "$ac_cv_c_bigendian" = unknown; then
  12331. ac_cv_c_bigendian=no
  12332. else
  12333. # finding both strings is unlikely to happen, but who knows?
  12334. ac_cv_c_bigendian=unknown
  12335. fi
  12336. fi
  12337. fi
  12338. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  12339. else
  12340. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12341. /* end confdefs.h. */
  12342. $ac_includes_default
  12343. int
  12344. main ()
  12345. {
  12346. /* Are we little or big endian? From Harbison&Steele. */
  12347. union
  12348. {
  12349. long int l;
  12350. char c[sizeof (long int)];
  12351. } u;
  12352. u.l = 1;
  12353. return u.c[sizeof (long int) - 1] == 1;
  12354. ;
  12355. return 0;
  12356. }
  12357. _ACEOF
  12358. if ac_fn_c_try_run "$LINENO"; then :
  12359. ac_cv_c_bigendian=no
  12360. else
  12361. ac_cv_c_bigendian=yes
  12362. fi
  12363. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  12364. conftest.$ac_objext conftest.beam conftest.$ac_ext
  12365. fi
  12366. fi
  12367. fi
  12368. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
  12369. $as_echo "$ac_cv_c_bigendian" >&6; }
  12370. case $ac_cv_c_bigendian in #(
  12371. yes)
  12372. $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
  12373. ;; #(
  12374. no)
  12375. ;; #(
  12376. universal)
  12377. $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
  12378. ;; #(
  12379. *)
  12380. as_fn_error $? "unknown endianness
  12381. presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
  12382. esac
  12383. GNULIB_LOCALECONV=0;
  12384. GNULIB_SETLOCALE=0;
  12385. GNULIB_SETLOCALE_NULL=0;
  12386. GNULIB_DUPLOCALE=0;
  12387. GNULIB_LOCALENAME=0;
  12388. HAVE_NEWLOCALE=1;
  12389. HAVE_DUPLOCALE=1;
  12390. HAVE_FREELOCALE=1;
  12391. REPLACE_LOCALECONV=0;
  12392. REPLACE_SETLOCALE=0;
  12393. REPLACE_NEWLOCALE=0;
  12394. REPLACE_DUPLOCALE=0;
  12395. REPLACE_FREELOCALE=0;
  12396. REPLACE_STRUCT_LCONV=0;
  12397. REPLACE_NULL=0;
  12398. HAVE_MAX_ALIGN_T=1;
  12399. HAVE_WCHAR_T=1;
  12400. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
  12401. $as_echo_n "checking for wchar_t... " >&6; }
  12402. if ${gt_cv_c_wchar_t+:} false; then :
  12403. $as_echo_n "(cached) " >&6
  12404. else
  12405. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12406. /* end confdefs.h. */
  12407. #include <stddef.h>
  12408. wchar_t foo = (wchar_t)'\0';
  12409. int
  12410. main ()
  12411. {
  12412. ;
  12413. return 0;
  12414. }
  12415. _ACEOF
  12416. if ac_fn_c_try_compile "$LINENO"; then :
  12417. gt_cv_c_wchar_t=yes
  12418. else
  12419. gt_cv_c_wchar_t=no
  12420. fi
  12421. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  12422. fi
  12423. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
  12424. $as_echo "$gt_cv_c_wchar_t" >&6; }
  12425. if test $gt_cv_c_wchar_t = yes; then
  12426. $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
  12427. fi
  12428. STDDEF_H=
  12429. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
  12430. $as_echo_n "checking for good max_align_t... " >&6; }
  12431. if ${gl_cv_type_max_align_t+:} false; then :
  12432. $as_echo_n "(cached) " >&6
  12433. else
  12434. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12435. /* end confdefs.h. */
  12436. #include <stddef.h>
  12437. unsigned int s = sizeof (max_align_t);
  12438. #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
  12439. int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
  12440. int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
  12441. #endif
  12442. typedef struct { char a; max_align_t b; } max_helper;
  12443. typedef struct { char a; long b; } long_helper;
  12444. typedef struct { char a; double b; } double_helper;
  12445. typedef struct { char a; long double b; } long_double_helper;
  12446. int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
  12447. int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
  12448. int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
  12449. int
  12450. main ()
  12451. {
  12452. ;
  12453. return 0;
  12454. }
  12455. _ACEOF
  12456. if ac_fn_c_try_compile "$LINENO"; then :
  12457. gl_cv_type_max_align_t=yes
  12458. else
  12459. gl_cv_type_max_align_t=no
  12460. fi
  12461. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  12462. fi
  12463. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
  12464. $as_echo "$gl_cv_type_max_align_t" >&6; }
  12465. if test $gl_cv_type_max_align_t = no; then
  12466. HAVE_MAX_ALIGN_T=0
  12467. STDDEF_H=stddef.h
  12468. fi
  12469. if test $gt_cv_c_wchar_t = no; then
  12470. HAVE_WCHAR_T=0
  12471. STDDEF_H=stddef.h
  12472. fi
  12473. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
  12474. $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
  12475. if ${gl_cv_decl_null_works+:} false; then :
  12476. $as_echo_n "(cached) " >&6
  12477. else
  12478. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12479. /* end confdefs.h. */
  12480. #include <stddef.h>
  12481. int test[2 * (sizeof NULL == sizeof (void *)) -1];
  12482. int
  12483. main ()
  12484. {
  12485. ;
  12486. return 0;
  12487. }
  12488. _ACEOF
  12489. if ac_fn_c_try_compile "$LINENO"; then :
  12490. gl_cv_decl_null_works=yes
  12491. else
  12492. gl_cv_decl_null_works=no
  12493. fi
  12494. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  12495. fi
  12496. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
  12497. $as_echo "$gl_cv_decl_null_works" >&6; }
  12498. if test $gl_cv_decl_null_works = no; then
  12499. REPLACE_NULL=1
  12500. STDDEF_H=stddef.h
  12501. fi
  12502. if test -n "$STDDEF_H"; then
  12503. GL_GENERATE_STDDEF_H_TRUE=
  12504. GL_GENERATE_STDDEF_H_FALSE='#'
  12505. else
  12506. GL_GENERATE_STDDEF_H_TRUE='#'
  12507. GL_GENERATE_STDDEF_H_FALSE=
  12508. fi
  12509. if test -n "$STDDEF_H"; then
  12510. if test $gl_cv_have_include_next = yes; then
  12511. gl_cv_next_stddef_h='<'stddef.h'>'
  12512. else
  12513. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
  12514. $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
  12515. if ${gl_cv_next_stddef_h+:} false; then :
  12516. $as_echo_n "(cached) " >&6
  12517. else
  12518. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12519. /* end confdefs.h. */
  12520. #include <stddef.h>
  12521. _ACEOF
  12522. case "$host_os" in
  12523. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  12524. *) gl_absname_cpp="$ac_cpp" ;;
  12525. esac
  12526. case "$host_os" in
  12527. mingw*)
  12528. gl_dirsep_regex='[/\\]'
  12529. ;;
  12530. *)
  12531. gl_dirsep_regex='\/'
  12532. ;;
  12533. esac
  12534. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  12535. gl_header_literal_regex=`echo 'stddef.h' \
  12536. | sed -e "$gl_make_literal_regex_sed"`
  12537. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  12538. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  12539. s|^/[^/]|//&|
  12540. p
  12541. q
  12542. }'
  12543. gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  12544. sed -n "$gl_absolute_header_sed"`
  12545. gl_header=$gl_cv_absolute_stddef_h
  12546. gl_cv_next_stddef_h='"'$gl_header'"'
  12547. fi
  12548. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
  12549. $as_echo "$gl_cv_next_stddef_h" >&6; }
  12550. fi
  12551. NEXT_STDDEF_H=$gl_cv_next_stddef_h
  12552. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  12553. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  12554. gl_next_as_first_directive='<'stddef.h'>'
  12555. else
  12556. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  12557. gl_next_as_first_directive=$gl_cv_next_stddef_h
  12558. fi
  12559. NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
  12560. fi
  12561. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
  12562. $as_echo_n "checking whether locale.h defines locale_t... " >&6; }
  12563. if ${gl_cv_header_locale_has_locale_t+:} false; then :
  12564. $as_echo_n "(cached) " >&6
  12565. else
  12566. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12567. /* end confdefs.h. */
  12568. #include <locale.h>
  12569. locale_t x;
  12570. int
  12571. main ()
  12572. {
  12573. ;
  12574. return 0;
  12575. }
  12576. _ACEOF
  12577. if ac_fn_c_try_compile "$LINENO"; then :
  12578. gl_cv_header_locale_has_locale_t=yes
  12579. else
  12580. gl_cv_header_locale_has_locale_t=no
  12581. fi
  12582. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  12583. fi
  12584. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
  12585. $as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
  12586. if test $ac_cv_header_xlocale_h = yes; then
  12587. HAVE_XLOCALE_H=1
  12588. if test $gl_cv_header_locale_has_locale_t = yes; then
  12589. gl_cv_header_locale_h_needs_xlocale_h=no
  12590. else
  12591. gl_cv_header_locale_h_needs_xlocale_h=yes
  12592. fi
  12593. HAVE_LOCALE_T=1
  12594. else
  12595. HAVE_XLOCALE_H=0
  12596. gl_cv_header_locale_h_needs_xlocale_h=no
  12597. if test $gl_cv_header_locale_has_locale_t = yes; then
  12598. HAVE_LOCALE_T=1
  12599. else
  12600. HAVE_LOCALE_T=0
  12601. fi
  12602. fi
  12603. gl_threads_api=none
  12604. LIBTHREAD=
  12605. LTLIBTHREAD=
  12606. LIBMULTITHREAD=
  12607. LTLIBMULTITHREAD=
  12608. if test "$gl_use_threads" != no; then
  12609. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
  12610. $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
  12611. if ${gl_cv_have_weak+:} false; then :
  12612. $as_echo_n "(cached) " >&6
  12613. else
  12614. gl_cv_have_weak=no
  12615. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12616. /* end confdefs.h. */
  12617. extern void xyzzy ();
  12618. #pragma weak xyzzy
  12619. int
  12620. main ()
  12621. {
  12622. xyzzy();
  12623. ;
  12624. return 0;
  12625. }
  12626. _ACEOF
  12627. if ac_fn_c_try_link "$LINENO"; then :
  12628. gl_cv_have_weak=maybe
  12629. fi
  12630. rm -f core conftest.err conftest.$ac_objext \
  12631. conftest$ac_exeext conftest.$ac_ext
  12632. if test $gl_cv_have_weak = maybe; then
  12633. if test "$cross_compiling" = yes; then :
  12634. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12635. /* end confdefs.h. */
  12636. #ifdef __ELF__
  12637. Extensible Linking Format
  12638. #endif
  12639. _ACEOF
  12640. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  12641. $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
  12642. gl_cv_have_weak="guessing yes"
  12643. else
  12644. gl_cv_have_weak="guessing no"
  12645. fi
  12646. rm -f conftest*
  12647. else
  12648. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12649. /* end confdefs.h. */
  12650. #include <stdio.h>
  12651. #pragma weak fputs
  12652. int main ()
  12653. {
  12654. return (fputs == NULL);
  12655. }
  12656. _ACEOF
  12657. if ac_fn_c_try_run "$LINENO"; then :
  12658. gl_cv_have_weak=yes
  12659. else
  12660. gl_cv_have_weak=no
  12661. fi
  12662. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  12663. conftest.$ac_objext conftest.beam conftest.$ac_ext
  12664. fi
  12665. fi
  12666. case " $LDFLAGS " in
  12667. *" -static "*) gl_cv_have_weak=no ;;
  12668. esac
  12669. case "$gl_cv_have_weak" in
  12670. *yes)
  12671. case "$host_os" in
  12672. freebsd* | dragonfly*)
  12673. : > conftest1.c
  12674. $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
  12675. cat <<EOF > conftest2.c
  12676. #include <pthread.h>
  12677. #pragma weak pthread_mutexattr_gettype
  12678. int main ()
  12679. {
  12680. return (pthread_mutexattr_gettype != NULL);
  12681. }
  12682. EOF
  12683. $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
  12684. || gl_cv_have_weak=no
  12685. rm -f conftest1.c libempty.so conftest2.c conftest
  12686. ;;
  12687. esac
  12688. ;;
  12689. esac
  12690. fi
  12691. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
  12692. $as_echo "$gl_cv_have_weak" >&6; }
  12693. case "$gl_cv_have_weak" in
  12694. *yes)
  12695. $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
  12696. ;;
  12697. esac
  12698. if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
  12699. :
  12700. fi
  12701. if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
  12702. gl_have_isoc_threads="$ac_cv_header_threads_h"
  12703. fi
  12704. if test "$gl_use_threads" = yes \
  12705. || test "$gl_use_threads" = posix \
  12706. || test "$gl_use_threads" = isoc+posix; then
  12707. if test -z "$gl_pthreadlib_body_done"; then
  12708. gl_pthread_api=no
  12709. LIBPTHREAD=
  12710. LIBPMULTITHREAD=
  12711. # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
  12712. # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
  12713. ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
  12714. if test "x$ac_cv_header_pthread_h" = xyes; then :
  12715. gl_have_pthread_h=yes
  12716. else
  12717. gl_have_pthread_h=no
  12718. fi
  12719. if test "$gl_have_pthread_h" = yes; then
  12720. # Other possible tests:
  12721. # -lpthreads (FSU threads, PCthreads)
  12722. # -lgthreads
  12723. # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
  12724. # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
  12725. # the second one only in libpthread, and lock.c needs it.
  12726. #
  12727. # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
  12728. # needs -pthread for some reason. See:
  12729. # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
  12730. save_LIBS=$LIBS
  12731. for gl_pthread in '' '-pthread'; do
  12732. LIBS="$LIBS $gl_pthread"
  12733. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12734. /* end confdefs.h. */
  12735. #include <pthread.h>
  12736. pthread_mutex_t m;
  12737. pthread_mutexattr_t ma;
  12738. int
  12739. main ()
  12740. {
  12741. pthread_mutex_lock (&m);
  12742. pthread_mutexattr_init (&ma);
  12743. ;
  12744. return 0;
  12745. }
  12746. _ACEOF
  12747. if ac_fn_c_try_link "$LINENO"; then :
  12748. gl_pthread_api=yes
  12749. LIBPTHREAD=$gl_pthread
  12750. LIBPMULTITHREAD=$gl_pthread
  12751. fi
  12752. rm -f core conftest.err conftest.$ac_objext \
  12753. conftest$ac_exeext conftest.$ac_ext
  12754. LIBS=$save_LIBS
  12755. test $gl_pthread_api = yes && break
  12756. done
  12757. # Test for libpthread by looking for pthread_kill. (Not pthread_self,
  12758. # since it is defined as a macro on OSF/1.)
  12759. if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
  12760. # The program links fine without libpthread. But it may actually
  12761. # need to link with libpthread in order to create multiple threads.
  12762. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
  12763. $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
  12764. if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
  12765. $as_echo_n "(cached) " >&6
  12766. else
  12767. ac_check_lib_save_LIBS=$LIBS
  12768. LIBS="-lpthread $LIBS"
  12769. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12770. /* end confdefs.h. */
  12771. /* Override any GCC internal prototype to avoid an error.
  12772. Use char because int might match the return type of a GCC
  12773. builtin and then its argument prototype would still apply. */
  12774. #ifdef __cplusplus
  12775. extern "C"
  12776. #endif
  12777. char pthread_kill ();
  12778. int
  12779. main ()
  12780. {
  12781. return pthread_kill ();
  12782. ;
  12783. return 0;
  12784. }
  12785. _ACEOF
  12786. if ac_fn_c_try_link "$LINENO"; then :
  12787. ac_cv_lib_pthread_pthread_kill=yes
  12788. else
  12789. ac_cv_lib_pthread_pthread_kill=no
  12790. fi
  12791. rm -f core conftest.err conftest.$ac_objext \
  12792. conftest$ac_exeext conftest.$ac_ext
  12793. LIBS=$ac_check_lib_save_LIBS
  12794. fi
  12795. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
  12796. $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
  12797. if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
  12798. LIBPMULTITHREAD=-lpthread
  12799. # On Solaris and HP-UX, most pthread functions exist also in libc.
  12800. # Therefore pthread_in_use() needs to actually try to create a
  12801. # thread: pthread_create from libc will fail, whereas
  12802. # pthread_create will actually create a thread.
  12803. # On Solaris 10 or newer, this test is no longer needed, because
  12804. # libc contains the fully functional pthread functions.
  12805. case "$host_os" in
  12806. solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
  12807. $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
  12808. esac
  12809. fi
  12810. elif test $gl_pthread_api != yes; then
  12811. # Some library is needed. Try libpthread and libc_r.
  12812. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
  12813. $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
  12814. if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
  12815. $as_echo_n "(cached) " >&6
  12816. else
  12817. ac_check_lib_save_LIBS=$LIBS
  12818. LIBS="-lpthread $LIBS"
  12819. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12820. /* end confdefs.h. */
  12821. /* Override any GCC internal prototype to avoid an error.
  12822. Use char because int might match the return type of a GCC
  12823. builtin and then its argument prototype would still apply. */
  12824. #ifdef __cplusplus
  12825. extern "C"
  12826. #endif
  12827. char pthread_kill ();
  12828. int
  12829. main ()
  12830. {
  12831. return pthread_kill ();
  12832. ;
  12833. return 0;
  12834. }
  12835. _ACEOF
  12836. if ac_fn_c_try_link "$LINENO"; then :
  12837. ac_cv_lib_pthread_pthread_kill=yes
  12838. else
  12839. ac_cv_lib_pthread_pthread_kill=no
  12840. fi
  12841. rm -f core conftest.err conftest.$ac_objext \
  12842. conftest$ac_exeext conftest.$ac_ext
  12843. LIBS=$ac_check_lib_save_LIBS
  12844. fi
  12845. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
  12846. $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
  12847. if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
  12848. gl_pthread_api=yes
  12849. LIBPTHREAD=-lpthread
  12850. LIBPMULTITHREAD=-lpthread
  12851. fi
  12852. if test $gl_pthread_api != yes; then
  12853. # For FreeBSD 4.
  12854. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
  12855. $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
  12856. if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
  12857. $as_echo_n "(cached) " >&6
  12858. else
  12859. ac_check_lib_save_LIBS=$LIBS
  12860. LIBS="-lc_r $LIBS"
  12861. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12862. /* end confdefs.h. */
  12863. /* Override any GCC internal prototype to avoid an error.
  12864. Use char because int might match the return type of a GCC
  12865. builtin and then its argument prototype would still apply. */
  12866. #ifdef __cplusplus
  12867. extern "C"
  12868. #endif
  12869. char pthread_kill ();
  12870. int
  12871. main ()
  12872. {
  12873. return pthread_kill ();
  12874. ;
  12875. return 0;
  12876. }
  12877. _ACEOF
  12878. if ac_fn_c_try_link "$LINENO"; then :
  12879. ac_cv_lib_c_r_pthread_kill=yes
  12880. else
  12881. ac_cv_lib_c_r_pthread_kill=no
  12882. fi
  12883. rm -f core conftest.err conftest.$ac_objext \
  12884. conftest$ac_exeext conftest.$ac_ext
  12885. LIBS=$ac_check_lib_save_LIBS
  12886. fi
  12887. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
  12888. $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
  12889. if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
  12890. gl_pthread_api=yes
  12891. LIBPTHREAD=-lc_r
  12892. LIBPMULTITHREAD=-lc_r
  12893. fi
  12894. fi
  12895. fi
  12896. fi
  12897. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
  12898. $as_echo_n "checking whether POSIX threads API is available... " >&6; }
  12899. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
  12900. $as_echo "$gl_pthread_api" >&6; }
  12901. if test $gl_pthread_api = yes; then
  12902. $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
  12903. fi
  12904. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12905. /* end confdefs.h. */
  12906. #include <sched.h>
  12907. int
  12908. main ()
  12909. {
  12910. sched_yield ();
  12911. ;
  12912. return 0;
  12913. }
  12914. _ACEOF
  12915. if ac_fn_c_try_link "$LINENO"; then :
  12916. LIB_SCHED_YIELD=
  12917. else
  12918. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
  12919. $as_echo_n "checking for sched_yield in -lrt... " >&6; }
  12920. if ${ac_cv_lib_rt_sched_yield+:} false; then :
  12921. $as_echo_n "(cached) " >&6
  12922. else
  12923. ac_check_lib_save_LIBS=$LIBS
  12924. LIBS="-lrt $LIBS"
  12925. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12926. /* end confdefs.h. */
  12927. /* Override any GCC internal prototype to avoid an error.
  12928. Use char because int might match the return type of a GCC
  12929. builtin and then its argument prototype would still apply. */
  12930. #ifdef __cplusplus
  12931. extern "C"
  12932. #endif
  12933. char sched_yield ();
  12934. int
  12935. main ()
  12936. {
  12937. return sched_yield ();
  12938. ;
  12939. return 0;
  12940. }
  12941. _ACEOF
  12942. if ac_fn_c_try_link "$LINENO"; then :
  12943. ac_cv_lib_rt_sched_yield=yes
  12944. else
  12945. ac_cv_lib_rt_sched_yield=no
  12946. fi
  12947. rm -f core conftest.err conftest.$ac_objext \
  12948. conftest$ac_exeext conftest.$ac_ext
  12949. LIBS=$ac_check_lib_save_LIBS
  12950. fi
  12951. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
  12952. $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
  12953. if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
  12954. LIB_SCHED_YIELD=-lrt
  12955. else
  12956. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
  12957. $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
  12958. if ${ac_cv_lib_posix4_sched_yield+:} false; then :
  12959. $as_echo_n "(cached) " >&6
  12960. else
  12961. ac_check_lib_save_LIBS=$LIBS
  12962. LIBS="-lposix4 $LIBS"
  12963. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  12964. /* end confdefs.h. */
  12965. /* Override any GCC internal prototype to avoid an error.
  12966. Use char because int might match the return type of a GCC
  12967. builtin and then its argument prototype would still apply. */
  12968. #ifdef __cplusplus
  12969. extern "C"
  12970. #endif
  12971. char sched_yield ();
  12972. int
  12973. main ()
  12974. {
  12975. return sched_yield ();
  12976. ;
  12977. return 0;
  12978. }
  12979. _ACEOF
  12980. if ac_fn_c_try_link "$LINENO"; then :
  12981. ac_cv_lib_posix4_sched_yield=yes
  12982. else
  12983. ac_cv_lib_posix4_sched_yield=no
  12984. fi
  12985. rm -f core conftest.err conftest.$ac_objext \
  12986. conftest$ac_exeext conftest.$ac_ext
  12987. LIBS=$ac_check_lib_save_LIBS
  12988. fi
  12989. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
  12990. $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
  12991. if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
  12992. LIB_SCHED_YIELD=-lposix4
  12993. fi
  12994. fi
  12995. fi
  12996. rm -f core conftest.err conftest.$ac_objext \
  12997. conftest$ac_exeext conftest.$ac_ext
  12998. gl_pthreadlib_body_done=done
  12999. fi
  13000. LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
  13001. LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
  13002. if test $gl_pthread_api = yes; then
  13003. if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
  13004. gl_threads_api='isoc+posix'
  13005. $as_echo "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
  13006. LIBTHREAD= LTLIBTHREAD=
  13007. else
  13008. gl_threads_api=posix
  13009. $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
  13010. if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
  13011. if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
  13012. $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
  13013. LIBTHREAD= LTLIBTHREAD=
  13014. else
  13015. case "$host_os" in
  13016. freebsd* | dragonfly*)
  13017. if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
  13018. $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
  13019. fi
  13020. ;;
  13021. esac
  13022. fi
  13023. fi
  13024. fi
  13025. fi
  13026. fi
  13027. if test $gl_threads_api = none; then
  13028. if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
  13029. if test -z "$gl_stdthreadlib_body_done"; then
  13030. case "$host_os" in
  13031. mingw*)
  13032. LIBSTDTHREAD=
  13033. ;;
  13034. *)
  13035. if test -z "$gl_pthreadlib_body_done"; then
  13036. gl_pthread_api=no
  13037. LIBPTHREAD=
  13038. LIBPMULTITHREAD=
  13039. # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
  13040. # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
  13041. ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
  13042. if test "x$ac_cv_header_pthread_h" = xyes; then :
  13043. gl_have_pthread_h=yes
  13044. else
  13045. gl_have_pthread_h=no
  13046. fi
  13047. if test "$gl_have_pthread_h" = yes; then
  13048. # Other possible tests:
  13049. # -lpthreads (FSU threads, PCthreads)
  13050. # -lgthreads
  13051. # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
  13052. # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
  13053. # the second one only in libpthread, and lock.c needs it.
  13054. #
  13055. # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
  13056. # needs -pthread for some reason. See:
  13057. # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
  13058. save_LIBS=$LIBS
  13059. for gl_pthread in '' '-pthread'; do
  13060. LIBS="$LIBS $gl_pthread"
  13061. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13062. /* end confdefs.h. */
  13063. #include <pthread.h>
  13064. pthread_mutex_t m;
  13065. pthread_mutexattr_t ma;
  13066. int
  13067. main ()
  13068. {
  13069. pthread_mutex_lock (&m);
  13070. pthread_mutexattr_init (&ma);
  13071. ;
  13072. return 0;
  13073. }
  13074. _ACEOF
  13075. if ac_fn_c_try_link "$LINENO"; then :
  13076. gl_pthread_api=yes
  13077. LIBPTHREAD=$gl_pthread
  13078. LIBPMULTITHREAD=$gl_pthread
  13079. fi
  13080. rm -f core conftest.err conftest.$ac_objext \
  13081. conftest$ac_exeext conftest.$ac_ext
  13082. LIBS=$save_LIBS
  13083. test $gl_pthread_api = yes && break
  13084. done
  13085. # Test for libpthread by looking for pthread_kill. (Not pthread_self,
  13086. # since it is defined as a macro on OSF/1.)
  13087. if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
  13088. # The program links fine without libpthread. But it may actually
  13089. # need to link with libpthread in order to create multiple threads.
  13090. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
  13091. $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
  13092. if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
  13093. $as_echo_n "(cached) " >&6
  13094. else
  13095. ac_check_lib_save_LIBS=$LIBS
  13096. LIBS="-lpthread $LIBS"
  13097. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13098. /* end confdefs.h. */
  13099. /* Override any GCC internal prototype to avoid an error.
  13100. Use char because int might match the return type of a GCC
  13101. builtin and then its argument prototype would still apply. */
  13102. #ifdef __cplusplus
  13103. extern "C"
  13104. #endif
  13105. char pthread_kill ();
  13106. int
  13107. main ()
  13108. {
  13109. return pthread_kill ();
  13110. ;
  13111. return 0;
  13112. }
  13113. _ACEOF
  13114. if ac_fn_c_try_link "$LINENO"; then :
  13115. ac_cv_lib_pthread_pthread_kill=yes
  13116. else
  13117. ac_cv_lib_pthread_pthread_kill=no
  13118. fi
  13119. rm -f core conftest.err conftest.$ac_objext \
  13120. conftest$ac_exeext conftest.$ac_ext
  13121. LIBS=$ac_check_lib_save_LIBS
  13122. fi
  13123. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
  13124. $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
  13125. if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
  13126. LIBPMULTITHREAD=-lpthread
  13127. # On Solaris and HP-UX, most pthread functions exist also in libc.
  13128. # Therefore pthread_in_use() needs to actually try to create a
  13129. # thread: pthread_create from libc will fail, whereas
  13130. # pthread_create will actually create a thread.
  13131. # On Solaris 10 or newer, this test is no longer needed, because
  13132. # libc contains the fully functional pthread functions.
  13133. case "$host_os" in
  13134. solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
  13135. $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
  13136. esac
  13137. fi
  13138. elif test $gl_pthread_api != yes; then
  13139. # Some library is needed. Try libpthread and libc_r.
  13140. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
  13141. $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
  13142. if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
  13143. $as_echo_n "(cached) " >&6
  13144. else
  13145. ac_check_lib_save_LIBS=$LIBS
  13146. LIBS="-lpthread $LIBS"
  13147. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13148. /* end confdefs.h. */
  13149. /* Override any GCC internal prototype to avoid an error.
  13150. Use char because int might match the return type of a GCC
  13151. builtin and then its argument prototype would still apply. */
  13152. #ifdef __cplusplus
  13153. extern "C"
  13154. #endif
  13155. char pthread_kill ();
  13156. int
  13157. main ()
  13158. {
  13159. return pthread_kill ();
  13160. ;
  13161. return 0;
  13162. }
  13163. _ACEOF
  13164. if ac_fn_c_try_link "$LINENO"; then :
  13165. ac_cv_lib_pthread_pthread_kill=yes
  13166. else
  13167. ac_cv_lib_pthread_pthread_kill=no
  13168. fi
  13169. rm -f core conftest.err conftest.$ac_objext \
  13170. conftest$ac_exeext conftest.$ac_ext
  13171. LIBS=$ac_check_lib_save_LIBS
  13172. fi
  13173. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
  13174. $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
  13175. if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
  13176. gl_pthread_api=yes
  13177. LIBPTHREAD=-lpthread
  13178. LIBPMULTITHREAD=-lpthread
  13179. fi
  13180. if test $gl_pthread_api != yes; then
  13181. # For FreeBSD 4.
  13182. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
  13183. $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
  13184. if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
  13185. $as_echo_n "(cached) " >&6
  13186. else
  13187. ac_check_lib_save_LIBS=$LIBS
  13188. LIBS="-lc_r $LIBS"
  13189. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13190. /* end confdefs.h. */
  13191. /* Override any GCC internal prototype to avoid an error.
  13192. Use char because int might match the return type of a GCC
  13193. builtin and then its argument prototype would still apply. */
  13194. #ifdef __cplusplus
  13195. extern "C"
  13196. #endif
  13197. char pthread_kill ();
  13198. int
  13199. main ()
  13200. {
  13201. return pthread_kill ();
  13202. ;
  13203. return 0;
  13204. }
  13205. _ACEOF
  13206. if ac_fn_c_try_link "$LINENO"; then :
  13207. ac_cv_lib_c_r_pthread_kill=yes
  13208. else
  13209. ac_cv_lib_c_r_pthread_kill=no
  13210. fi
  13211. rm -f core conftest.err conftest.$ac_objext \
  13212. conftest$ac_exeext conftest.$ac_ext
  13213. LIBS=$ac_check_lib_save_LIBS
  13214. fi
  13215. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
  13216. $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
  13217. if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
  13218. gl_pthread_api=yes
  13219. LIBPTHREAD=-lc_r
  13220. LIBPMULTITHREAD=-lc_r
  13221. fi
  13222. fi
  13223. fi
  13224. fi
  13225. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
  13226. $as_echo_n "checking whether POSIX threads API is available... " >&6; }
  13227. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
  13228. $as_echo "$gl_pthread_api" >&6; }
  13229. if test $gl_pthread_api = yes; then
  13230. $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
  13231. fi
  13232. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13233. /* end confdefs.h. */
  13234. #include <sched.h>
  13235. int
  13236. main ()
  13237. {
  13238. sched_yield ();
  13239. ;
  13240. return 0;
  13241. }
  13242. _ACEOF
  13243. if ac_fn_c_try_link "$LINENO"; then :
  13244. LIB_SCHED_YIELD=
  13245. else
  13246. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
  13247. $as_echo_n "checking for sched_yield in -lrt... " >&6; }
  13248. if ${ac_cv_lib_rt_sched_yield+:} false; then :
  13249. $as_echo_n "(cached) " >&6
  13250. else
  13251. ac_check_lib_save_LIBS=$LIBS
  13252. LIBS="-lrt $LIBS"
  13253. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13254. /* end confdefs.h. */
  13255. /* Override any GCC internal prototype to avoid an error.
  13256. Use char because int might match the return type of a GCC
  13257. builtin and then its argument prototype would still apply. */
  13258. #ifdef __cplusplus
  13259. extern "C"
  13260. #endif
  13261. char sched_yield ();
  13262. int
  13263. main ()
  13264. {
  13265. return sched_yield ();
  13266. ;
  13267. return 0;
  13268. }
  13269. _ACEOF
  13270. if ac_fn_c_try_link "$LINENO"; then :
  13271. ac_cv_lib_rt_sched_yield=yes
  13272. else
  13273. ac_cv_lib_rt_sched_yield=no
  13274. fi
  13275. rm -f core conftest.err conftest.$ac_objext \
  13276. conftest$ac_exeext conftest.$ac_ext
  13277. LIBS=$ac_check_lib_save_LIBS
  13278. fi
  13279. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
  13280. $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
  13281. if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
  13282. LIB_SCHED_YIELD=-lrt
  13283. else
  13284. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
  13285. $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
  13286. if ${ac_cv_lib_posix4_sched_yield+:} false; then :
  13287. $as_echo_n "(cached) " >&6
  13288. else
  13289. ac_check_lib_save_LIBS=$LIBS
  13290. LIBS="-lposix4 $LIBS"
  13291. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13292. /* end confdefs.h. */
  13293. /* Override any GCC internal prototype to avoid an error.
  13294. Use char because int might match the return type of a GCC
  13295. builtin and then its argument prototype would still apply. */
  13296. #ifdef __cplusplus
  13297. extern "C"
  13298. #endif
  13299. char sched_yield ();
  13300. int
  13301. main ()
  13302. {
  13303. return sched_yield ();
  13304. ;
  13305. return 0;
  13306. }
  13307. _ACEOF
  13308. if ac_fn_c_try_link "$LINENO"; then :
  13309. ac_cv_lib_posix4_sched_yield=yes
  13310. else
  13311. ac_cv_lib_posix4_sched_yield=no
  13312. fi
  13313. rm -f core conftest.err conftest.$ac_objext \
  13314. conftest$ac_exeext conftest.$ac_ext
  13315. LIBS=$ac_check_lib_save_LIBS
  13316. fi
  13317. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
  13318. $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
  13319. if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
  13320. LIB_SCHED_YIELD=-lposix4
  13321. fi
  13322. fi
  13323. fi
  13324. rm -f core conftest.err conftest.$ac_objext \
  13325. conftest$ac_exeext conftest.$ac_ext
  13326. gl_pthreadlib_body_done=done
  13327. fi
  13328. if test $ac_cv_header_threads_h = yes; then
  13329. for ac_func in thrd_create
  13330. do :
  13331. ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
  13332. if test "x$ac_cv_func_thrd_create" = xyes; then :
  13333. cat >>confdefs.h <<_ACEOF
  13334. #define HAVE_THRD_CREATE 1
  13335. _ACEOF
  13336. fi
  13337. done
  13338. if test $ac_cv_func_thrd_create = yes; then
  13339. LIBSTDTHREAD=
  13340. else
  13341. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
  13342. $as_echo_n "checking for thrd_create in -lstdthreads... " >&6; }
  13343. if ${ac_cv_lib_stdthreads_thrd_create+:} false; then :
  13344. $as_echo_n "(cached) " >&6
  13345. else
  13346. ac_check_lib_save_LIBS=$LIBS
  13347. LIBS="-lstdthreads $LIBS"
  13348. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13349. /* end confdefs.h. */
  13350. /* Override any GCC internal prototype to avoid an error.
  13351. Use char because int might match the return type of a GCC
  13352. builtin and then its argument prototype would still apply. */
  13353. #ifdef __cplusplus
  13354. extern "C"
  13355. #endif
  13356. char thrd_create ();
  13357. int
  13358. main ()
  13359. {
  13360. return thrd_create ();
  13361. ;
  13362. return 0;
  13363. }
  13364. _ACEOF
  13365. if ac_fn_c_try_link "$LINENO"; then :
  13366. ac_cv_lib_stdthreads_thrd_create=yes
  13367. else
  13368. ac_cv_lib_stdthreads_thrd_create=no
  13369. fi
  13370. rm -f core conftest.err conftest.$ac_objext \
  13371. conftest$ac_exeext conftest.$ac_ext
  13372. LIBS=$ac_check_lib_save_LIBS
  13373. fi
  13374. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
  13375. $as_echo "$ac_cv_lib_stdthreads_thrd_create" >&6; }
  13376. if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes; then :
  13377. LIBSTDTHREAD='-lstdthreads -lpthread'
  13378. else
  13379. LIBSTDTHREAD="$LIBPMULTITHREAD"
  13380. fi
  13381. fi
  13382. else
  13383. LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
  13384. fi
  13385. ;;
  13386. esac
  13387. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
  13388. $as_echo_n "checking whether ISO C threads API is available... " >&6; }
  13389. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
  13390. $as_echo "$ac_cv_header_threads_h" >&6; }
  13391. gl_stdthreadlib_body_done=done
  13392. fi
  13393. LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
  13394. LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
  13395. gl_threads_api=isoc
  13396. $as_echo "#define USE_ISOC_THREADS 1" >>confdefs.h
  13397. fi
  13398. fi
  13399. if test $gl_threads_api = none; then
  13400. case "$gl_use_threads" in
  13401. yes | windows | win32) # The 'win32' is for backward compatibility.
  13402. if { case "$host_os" in
  13403. mingw*) true;;
  13404. *) false;;
  13405. esac
  13406. }; then
  13407. gl_threads_api=windows
  13408. $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
  13409. fi
  13410. ;;
  13411. esac
  13412. fi
  13413. fi
  13414. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
  13415. $as_echo_n "checking for multithread API to use... " >&6; }
  13416. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
  13417. $as_echo "$gl_threads_api" >&6; }
  13418. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
  13419. $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
  13420. if ${gl_cv_func_malloc_posix+:} false; then :
  13421. $as_echo_n "(cached) " >&6
  13422. else
  13423. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13424. /* end confdefs.h. */
  13425. int
  13426. main ()
  13427. {
  13428. #if defined _WIN32 && ! defined __CYGWIN__
  13429. choke me
  13430. #endif
  13431. ;
  13432. return 0;
  13433. }
  13434. _ACEOF
  13435. if ac_fn_c_try_compile "$LINENO"; then :
  13436. gl_cv_func_malloc_posix=yes
  13437. else
  13438. gl_cv_func_malloc_posix=no
  13439. fi
  13440. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  13441. fi
  13442. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
  13443. $as_echo "$gl_cv_func_malloc_posix" >&6; }
  13444. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
  13445. $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
  13446. if ${ac_cv_func_malloc_0_nonnull+:} false; then :
  13447. $as_echo_n "(cached) " >&6
  13448. else
  13449. if test "$cross_compiling" = yes; then :
  13450. case "$host_os" in
  13451. # Guess yes on platforms where we know the result.
  13452. *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \
  13453. | hpux* | solaris* | cygwin* | mingw*)
  13454. ac_cv_func_malloc_0_nonnull="guessing yes" ;;
  13455. # If we don't know, obey --enable-cross-guesses.
  13456. *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
  13457. esac
  13458. else
  13459. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13460. /* end confdefs.h. */
  13461. #include <stdlib.h>
  13462. int
  13463. main ()
  13464. {
  13465. char *p = malloc (0);
  13466. int result = !p;
  13467. free (p);
  13468. return result;
  13469. ;
  13470. return 0;
  13471. }
  13472. _ACEOF
  13473. if ac_fn_c_try_run "$LINENO"; then :
  13474. ac_cv_func_malloc_0_nonnull=yes
  13475. else
  13476. ac_cv_func_malloc_0_nonnull=no
  13477. fi
  13478. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  13479. conftest.$ac_objext conftest.beam conftest.$ac_ext
  13480. fi
  13481. fi
  13482. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
  13483. $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
  13484. case "$ac_cv_func_malloc_0_nonnull" in
  13485. *yes)
  13486. gl_cv_func_malloc_0_nonnull=1
  13487. ;;
  13488. *)
  13489. gl_cv_func_malloc_0_nonnull=0
  13490. ;;
  13491. esac
  13492. cat >>confdefs.h <<_ACEOF
  13493. #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
  13494. _ACEOF
  13495. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
  13496. $as_echo_n "checking for a traditional japanese locale... " >&6; }
  13497. if ${gt_cv_locale_ja+:} false; then :
  13498. $as_echo_n "(cached) " >&6
  13499. else
  13500. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13501. /* end confdefs.h. */
  13502. #include <locale.h>
  13503. #include <time.h>
  13504. #if HAVE_LANGINFO_CODESET
  13505. # include <langinfo.h>
  13506. #endif
  13507. #include <stdlib.h>
  13508. #include <string.h>
  13509. struct tm t;
  13510. char buf[16];
  13511. int main ()
  13512. {
  13513. /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
  13514. imitates locale dependent behaviour by looking at the environment
  13515. variables, and all locales use the UTF-8 encoding. */
  13516. #if defined __BEOS__ || defined __HAIKU__
  13517. return 1;
  13518. #else
  13519. /* Check whether the given locale name is recognized by the system. */
  13520. # if defined _WIN32 && !defined __CYGWIN__
  13521. /* On native Windows, setlocale(category, "") looks at the system settings,
  13522. not at the environment variables. Also, when an encoding suffix such
  13523. as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
  13524. category of the locale to "C". */
  13525. if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
  13526. || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
  13527. return 1;
  13528. # else
  13529. if (setlocale (LC_ALL, "") == NULL) return 1;
  13530. # endif
  13531. /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
  13532. On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
  13533. is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
  13534. On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
  13535. succeeds but then nl_langinfo(CODESET) is "646". In this situation,
  13536. some unit tests fail.
  13537. On MirBSD 10, when an unsupported locale is specified, setlocale()
  13538. succeeds but then nl_langinfo(CODESET) is "UTF-8". */
  13539. # if HAVE_LANGINFO_CODESET
  13540. {
  13541. const char *cs = nl_langinfo (CODESET);
  13542. if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
  13543. || strcmp (cs, "UTF-8") == 0)
  13544. return 1;
  13545. }
  13546. # endif
  13547. # ifdef __CYGWIN__
  13548. /* On Cygwin, avoid locale names without encoding suffix, because the
  13549. locale_charset() function relies on the encoding suffix. Note that
  13550. LC_ALL is set on the command line. */
  13551. if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
  13552. # endif
  13553. /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
  13554. on Cygwin 1.5.x. */
  13555. if (MB_CUR_MAX == 1)
  13556. return 1;
  13557. /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
  13558. This excludes the UTF-8 encoding (except on MirBSD). */
  13559. {
  13560. const char *p;
  13561. t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
  13562. if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
  13563. for (p = buf; *p != '\0'; p++)
  13564. if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
  13565. return 1;
  13566. }
  13567. return 0;
  13568. #endif
  13569. }
  13570. _ACEOF
  13571. if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
  13572. (eval $ac_link) 2>&5
  13573. ac_status=$?
  13574. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  13575. test $ac_status = 0; } && test -s conftest$ac_exeext; then
  13576. case "$host_os" in
  13577. # Handle native Windows specially, because there setlocale() interprets
  13578. # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
  13579. # "fr" or "fra" as "French" or "French_France.1252",
  13580. # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
  13581. # "ja" as "Japanese" or "Japanese_Japan.932",
  13582. # and similar.
  13583. mingw*)
  13584. # Note that on native Windows, the Japanese locale is
  13585. # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
  13586. # cannot use it here.
  13587. gt_cv_locale_ja=none
  13588. ;;
  13589. *)
  13590. # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
  13591. # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
  13592. # configure script would override the LC_ALL setting. Likewise for
  13593. # LC_CTYPE, which is also set at the beginning of the configure script.
  13594. # Test for the AIX locale name.
  13595. if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
  13596. gt_cv_locale_ja=ja_JP
  13597. else
  13598. # Test for the locale name with explicit encoding suffix.
  13599. if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
  13600. gt_cv_locale_ja=ja_JP.EUC-JP
  13601. else
  13602. # Test for the HP-UX, OSF/1, NetBSD locale name.
  13603. if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
  13604. gt_cv_locale_ja=ja_JP.eucJP
  13605. else
  13606. # Test for the IRIX, FreeBSD locale name.
  13607. if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
  13608. gt_cv_locale_ja=ja_JP.EUC
  13609. else
  13610. # Test for the Solaris 7 locale name.
  13611. if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
  13612. gt_cv_locale_ja=ja
  13613. else
  13614. # Special test for NetBSD 1.6.
  13615. if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
  13616. gt_cv_locale_ja=ja_JP.eucJP
  13617. else
  13618. # None found.
  13619. gt_cv_locale_ja=none
  13620. fi
  13621. fi
  13622. fi
  13623. fi
  13624. fi
  13625. fi
  13626. ;;
  13627. esac
  13628. fi
  13629. rm -fr conftest*
  13630. fi
  13631. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
  13632. $as_echo "$gt_cv_locale_ja" >&6; }
  13633. LOCALE_JA=$gt_cv_locale_ja
  13634. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
  13635. $as_echo_n "checking for a french Unicode locale... " >&6; }
  13636. if ${gt_cv_locale_fr_utf8+:} false; then :
  13637. $as_echo_n "(cached) " >&6
  13638. else
  13639. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13640. /* end confdefs.h. */
  13641. #include <locale.h>
  13642. #include <time.h>
  13643. #if HAVE_LANGINFO_CODESET
  13644. # include <langinfo.h>
  13645. #endif
  13646. #include <stdlib.h>
  13647. #include <string.h>
  13648. struct tm t;
  13649. char buf[16];
  13650. int main () {
  13651. /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
  13652. imitates locale dependent behaviour by looking at the environment
  13653. variables, and all locales use the UTF-8 encoding. */
  13654. #if !(defined __BEOS__ || defined __HAIKU__)
  13655. /* Check whether the given locale name is recognized by the system. */
  13656. # if defined _WIN32 && !defined __CYGWIN__
  13657. /* On native Windows, setlocale(category, "") looks at the system settings,
  13658. not at the environment variables. Also, when an encoding suffix such
  13659. as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
  13660. category of the locale to "C". */
  13661. if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
  13662. || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
  13663. return 1;
  13664. # else
  13665. if (setlocale (LC_ALL, "") == NULL) return 1;
  13666. # endif
  13667. /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
  13668. On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
  13669. is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
  13670. On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
  13671. succeeds but then nl_langinfo(CODESET) is "646". In this situation,
  13672. some unit tests fail. */
  13673. # if HAVE_LANGINFO_CODESET
  13674. {
  13675. const char *cs = nl_langinfo (CODESET);
  13676. if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
  13677. return 1;
  13678. }
  13679. # endif
  13680. # ifdef __CYGWIN__
  13681. /* On Cygwin, avoid locale names without encoding suffix, because the
  13682. locale_charset() function relies on the encoding suffix. Note that
  13683. LC_ALL is set on the command line. */
  13684. if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
  13685. # endif
  13686. /* Check whether in the abbreviation of the second month, the second
  13687. character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
  13688. two bytes long, with UTF-8 encoding. */
  13689. t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
  13690. if (strftime (buf, sizeof (buf), "%b", &t) < 4
  13691. || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
  13692. return 1;
  13693. #endif
  13694. #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
  13695. /* Check whether the decimal separator is a comma.
  13696. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
  13697. are nl_langinfo(RADIXCHAR) are both ".". */
  13698. if (localeconv () ->decimal_point[0] != ',') return 1;
  13699. #endif
  13700. return 0;
  13701. }
  13702. _ACEOF
  13703. if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
  13704. (eval $ac_link) 2>&5
  13705. ac_status=$?
  13706. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  13707. test $ac_status = 0; } && test -s conftest$ac_exeext; then
  13708. case "$host_os" in
  13709. # Handle native Windows specially, because there setlocale() interprets
  13710. # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
  13711. # "fr" or "fra" as "French" or "French_France.1252",
  13712. # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
  13713. # "ja" as "Japanese" or "Japanese_Japan.932",
  13714. # and similar.
  13715. mingw*)
  13716. # Test for the hypothetical native Windows locale name.
  13717. if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
  13718. gt_cv_locale_fr_utf8=French_France.65001
  13719. else
  13720. # None found.
  13721. gt_cv_locale_fr_utf8=none
  13722. fi
  13723. ;;
  13724. *)
  13725. # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
  13726. # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
  13727. # configure script would override the LC_ALL setting. Likewise for
  13728. # LC_CTYPE, which is also set at the beginning of the configure script.
  13729. # Test for the usual locale name.
  13730. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
  13731. gt_cv_locale_fr_utf8=fr_FR
  13732. else
  13733. # Test for the locale name with explicit encoding suffix.
  13734. if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
  13735. gt_cv_locale_fr_utf8=fr_FR.UTF-8
  13736. else
  13737. # Test for the Solaris 7 locale name.
  13738. if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
  13739. gt_cv_locale_fr_utf8=fr.UTF-8
  13740. else
  13741. # None found.
  13742. gt_cv_locale_fr_utf8=none
  13743. fi
  13744. fi
  13745. fi
  13746. ;;
  13747. esac
  13748. fi
  13749. rm -fr conftest*
  13750. fi
  13751. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
  13752. $as_echo "$gt_cv_locale_fr_utf8" >&6; }
  13753. LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
  13754. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
  13755. $as_echo_n "checking for a transitional chinese locale... " >&6; }
  13756. if ${gt_cv_locale_zh_CN+:} false; then :
  13757. $as_echo_n "(cached) " >&6
  13758. else
  13759. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13760. /* end confdefs.h. */
  13761. #include <locale.h>
  13762. #include <stdlib.h>
  13763. #include <time.h>
  13764. #if HAVE_LANGINFO_CODESET
  13765. # include <langinfo.h>
  13766. #endif
  13767. #include <stdlib.h>
  13768. #include <string.h>
  13769. struct tm t;
  13770. char buf[16];
  13771. int main ()
  13772. {
  13773. /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
  13774. imitates locale dependent behaviour by looking at the environment
  13775. variables, and all locales use the UTF-8 encoding. */
  13776. #if defined __BEOS__ || defined __HAIKU__
  13777. return 1;
  13778. #else
  13779. /* Check whether the given locale name is recognized by the system. */
  13780. # if defined _WIN32 && !defined __CYGWIN__
  13781. /* On native Windows, setlocale(category, "") looks at the system settings,
  13782. not at the environment variables. Also, when an encoding suffix such
  13783. as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
  13784. category of the locale to "C". */
  13785. if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
  13786. || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
  13787. return 1;
  13788. # else
  13789. if (setlocale (LC_ALL, "") == NULL) return 1;
  13790. # endif
  13791. /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
  13792. On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
  13793. is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
  13794. On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
  13795. succeeds but then nl_langinfo(CODESET) is "646". In this situation,
  13796. some unit tests fail.
  13797. On MirBSD 10, when an unsupported locale is specified, setlocale()
  13798. succeeds but then nl_langinfo(CODESET) is "UTF-8". */
  13799. # if HAVE_LANGINFO_CODESET
  13800. {
  13801. const char *cs = nl_langinfo (CODESET);
  13802. if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
  13803. || strcmp (cs, "UTF-8") == 0)
  13804. return 1;
  13805. }
  13806. # endif
  13807. # ifdef __CYGWIN__
  13808. /* On Cygwin, avoid locale names without encoding suffix, because the
  13809. locale_charset() function relies on the encoding suffix. Note that
  13810. LC_ALL is set on the command line. */
  13811. if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
  13812. # endif
  13813. /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
  13814. This excludes the UTF-8 encoding (except on MirBSD). */
  13815. {
  13816. const char *p;
  13817. t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
  13818. if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
  13819. for (p = buf; *p != '\0'; p++)
  13820. if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
  13821. return 1;
  13822. }
  13823. /* Check whether a typical GB18030 multibyte sequence is recognized as a
  13824. single wide character. This excludes the GB2312 and GBK encodings. */
  13825. if (mblen ("\203\062\332\066", 5) != 4)
  13826. return 1;
  13827. return 0;
  13828. #endif
  13829. }
  13830. _ACEOF
  13831. if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
  13832. (eval $ac_link) 2>&5
  13833. ac_status=$?
  13834. $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  13835. test $ac_status = 0; } && test -s conftest$ac_exeext; then
  13836. case "$host_os" in
  13837. # Handle native Windows specially, because there setlocale() interprets
  13838. # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
  13839. # "fr" or "fra" as "French" or "French_France.1252",
  13840. # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
  13841. # "ja" as "Japanese" or "Japanese_Japan.932",
  13842. # and similar.
  13843. mingw*)
  13844. # Test for the hypothetical native Windows locale name.
  13845. if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
  13846. gt_cv_locale_zh_CN=Chinese_China.54936
  13847. else
  13848. # None found.
  13849. gt_cv_locale_zh_CN=none
  13850. fi
  13851. ;;
  13852. solaris2.8)
  13853. # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
  13854. # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
  13855. # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
  13856. gt_cv_locale_zh_CN=none
  13857. ;;
  13858. *)
  13859. # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
  13860. # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
  13861. # configure script would override the LC_ALL setting. Likewise for
  13862. # LC_CTYPE, which is also set at the beginning of the configure script.
  13863. # Test for the locale name without encoding suffix.
  13864. if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
  13865. gt_cv_locale_zh_CN=zh_CN
  13866. else
  13867. # Test for the locale name with explicit encoding suffix.
  13868. if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
  13869. gt_cv_locale_zh_CN=zh_CN.GB18030
  13870. else
  13871. # None found.
  13872. gt_cv_locale_zh_CN=none
  13873. fi
  13874. fi
  13875. ;;
  13876. esac
  13877. else
  13878. # If there was a link error, due to mblen(), the system is so old that
  13879. # it certainly doesn't have a chinese locale.
  13880. gt_cv_locale_zh_CN=none
  13881. fi
  13882. rm -fr conftest*
  13883. fi
  13884. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
  13885. $as_echo "$gt_cv_locale_zh_CN" >&6; }
  13886. LOCALE_ZH_CN=$gt_cv_locale_zh_CN
  13887. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
  13888. $as_echo_n "checking for inline... " >&6; }
  13889. if ${ac_cv_c_inline+:} false; then :
  13890. $as_echo_n "(cached) " >&6
  13891. else
  13892. ac_cv_c_inline=no
  13893. for ac_kw in inline __inline__ __inline; do
  13894. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  13895. /* end confdefs.h. */
  13896. #ifndef __cplusplus
  13897. typedef int foo_t;
  13898. static $ac_kw foo_t static_foo () {return 0; }
  13899. $ac_kw foo_t foo () {return 0; }
  13900. #endif
  13901. _ACEOF
  13902. if ac_fn_c_try_compile "$LINENO"; then :
  13903. ac_cv_c_inline=$ac_kw
  13904. fi
  13905. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  13906. test "$ac_cv_c_inline" != no && break
  13907. done
  13908. fi
  13909. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
  13910. $as_echo "$ac_cv_c_inline" >&6; }
  13911. case $ac_cv_c_inline in
  13912. inline | yes) ;;
  13913. *)
  13914. case $ac_cv_c_inline in
  13915. no) ac_val=;;
  13916. *) ac_val=$ac_cv_c_inline;;
  13917. esac
  13918. cat >>confdefs.h <<_ACEOF
  13919. #ifndef __cplusplus
  13920. #define inline $ac_val
  13921. #endif
  13922. _ACEOF
  13923. ;;
  13924. esac
  13925. GNULIB_EXPLICIT_BZERO=0;
  13926. GNULIB_FFSL=0;
  13927. GNULIB_FFSLL=0;
  13928. GNULIB_MEMCHR=0;
  13929. GNULIB_MEMMEM=0;
  13930. GNULIB_MEMPCPY=0;
  13931. GNULIB_MEMRCHR=0;
  13932. GNULIB_RAWMEMCHR=0;
  13933. GNULIB_STPCPY=0;
  13934. GNULIB_STPNCPY=0;
  13935. GNULIB_STRCHRNUL=0;
  13936. GNULIB_STRDUP=0;
  13937. GNULIB_STRNCAT=0;
  13938. GNULIB_STRNDUP=0;
  13939. GNULIB_STRNLEN=0;
  13940. GNULIB_STRPBRK=0;
  13941. GNULIB_STRSEP=0;
  13942. GNULIB_STRSTR=0;
  13943. GNULIB_STRCASESTR=0;
  13944. GNULIB_STRTOK_R=0;
  13945. GNULIB_MBSLEN=0;
  13946. GNULIB_MBSNLEN=0;
  13947. GNULIB_MBSCHR=0;
  13948. GNULIB_MBSRCHR=0;
  13949. GNULIB_MBSSTR=0;
  13950. GNULIB_MBSCASECMP=0;
  13951. GNULIB_MBSNCASECMP=0;
  13952. GNULIB_MBSPCASECMP=0;
  13953. GNULIB_MBSCASESTR=0;
  13954. GNULIB_MBSCSPN=0;
  13955. GNULIB_MBSPBRK=0;
  13956. GNULIB_MBSSPN=0;
  13957. GNULIB_MBSSEP=0;
  13958. GNULIB_MBSTOK_R=0;
  13959. GNULIB_STRERROR=0;
  13960. GNULIB_STRERROR_R=0;
  13961. GNULIB_STRERRORNAME_NP=0;
  13962. GNULIB_SIGABBREV_NP=0;
  13963. GNULIB_SIGDESCR_NP=0;
  13964. GNULIB_STRSIGNAL=0;
  13965. GNULIB_STRVERSCMP=0;
  13966. HAVE_MBSLEN=0;
  13967. GNULIB_MDA_MEMCCPY=1;
  13968. GNULIB_MDA_STRDUP=1;
  13969. HAVE_EXPLICIT_BZERO=1;
  13970. HAVE_FFSL=1;
  13971. HAVE_FFSLL=1;
  13972. HAVE_DECL_MEMMEM=1;
  13973. HAVE_MEMPCPY=1;
  13974. HAVE_DECL_MEMRCHR=1;
  13975. HAVE_RAWMEMCHR=1;
  13976. HAVE_STPCPY=1;
  13977. HAVE_STPNCPY=1;
  13978. HAVE_STRCHRNUL=1;
  13979. HAVE_DECL_STRDUP=1;
  13980. HAVE_DECL_STRNDUP=1;
  13981. HAVE_DECL_STRNLEN=1;
  13982. HAVE_STRPBRK=1;
  13983. HAVE_STRSEP=1;
  13984. HAVE_STRCASESTR=1;
  13985. HAVE_DECL_STRTOK_R=1;
  13986. HAVE_DECL_STRERROR_R=1;
  13987. HAVE_STRERRORNAME_NP=1;
  13988. HAVE_SIGABBREV_NP=1;
  13989. HAVE_SIGDESCR_NP=1;
  13990. HAVE_DECL_STRSIGNAL=1;
  13991. HAVE_STRVERSCMP=1;
  13992. REPLACE_FFSLL=0;
  13993. REPLACE_MEMCHR=0;
  13994. REPLACE_MEMMEM=0;
  13995. REPLACE_STPNCPY=0;
  13996. REPLACE_STRCHRNUL=0;
  13997. REPLACE_STRDUP=0;
  13998. REPLACE_STRNCAT=0;
  13999. REPLACE_STRNDUP=0;
  14000. REPLACE_STRNLEN=0;
  14001. REPLACE_STRSTR=0;
  14002. REPLACE_STRCASESTR=0;
  14003. REPLACE_STRTOK_R=0;
  14004. REPLACE_STRERROR=0;
  14005. REPLACE_STRERROR_R=0;
  14006. REPLACE_STRERRORNAME_NP=0;
  14007. REPLACE_STRSIGNAL=0;
  14008. UNDEFINE_STRTOK_R=0;
  14009. # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
  14010. # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
  14011. # irrelevant for anonymous mappings.
  14012. ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
  14013. if test "x$ac_cv_func_mmap" = xyes; then :
  14014. gl_have_mmap=yes
  14015. else
  14016. gl_have_mmap=no
  14017. fi
  14018. # Try to allow MAP_ANONYMOUS.
  14019. gl_have_mmap_anonymous=no
  14020. if test $gl_have_mmap = yes; then
  14021. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
  14022. $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
  14023. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14024. /* end confdefs.h. */
  14025. #include <sys/mman.h>
  14026. #ifdef MAP_ANONYMOUS
  14027. I cannot identify this map
  14028. #endif
  14029. _ACEOF
  14030. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  14031. $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
  14032. gl_have_mmap_anonymous=yes
  14033. fi
  14034. rm -f conftest*
  14035. if test $gl_have_mmap_anonymous != yes; then
  14036. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14037. /* end confdefs.h. */
  14038. #include <sys/mman.h>
  14039. #ifdef MAP_ANON
  14040. I cannot identify this map
  14041. #endif
  14042. _ACEOF
  14043. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  14044. $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
  14045. $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
  14046. gl_have_mmap_anonymous=yes
  14047. fi
  14048. rm -f conftest*
  14049. fi
  14050. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
  14051. $as_echo "$gl_have_mmap_anonymous" >&6; }
  14052. if test $gl_have_mmap_anonymous = yes; then
  14053. $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
  14054. fi
  14055. fi
  14056. # Detect platform-specific bugs in some versions of glibc:
  14057. # memchr should not dereference anything with length 0
  14058. # https://bugzilla.redhat.com/show_bug.cgi?id=499689
  14059. # memchr should not dereference overestimated length after a match
  14060. # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
  14061. # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
  14062. # memchr should cast the second argument to 'unsigned char'.
  14063. # This bug exists in Android 4.3.
  14064. # Assume that memchr works on platforms that lack mprotect.
  14065. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
  14066. $as_echo_n "checking whether memchr works... " >&6; }
  14067. if ${gl_cv_func_memchr_works+:} false; then :
  14068. $as_echo_n "(cached) " >&6
  14069. else
  14070. if test "$cross_compiling" = yes; then :
  14071. case "$host_os" in
  14072. # Guess no on Android.
  14073. linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
  14074. # Guess yes on native Windows.
  14075. mingw*) gl_cv_func_memchr_works="guessing yes" ;;
  14076. # If we don't know, obey --enable-cross-guesses.
  14077. *) gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
  14078. esac
  14079. else
  14080. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14081. /* end confdefs.h. */
  14082. #include <string.h>
  14083. #if HAVE_SYS_MMAN_H
  14084. # include <fcntl.h>
  14085. # include <unistd.h>
  14086. # include <sys/types.h>
  14087. # include <sys/mman.h>
  14088. # ifndef MAP_FILE
  14089. # define MAP_FILE 0
  14090. # endif
  14091. #endif
  14092. int
  14093. main ()
  14094. {
  14095. int result = 0;
  14096. char *fence = NULL;
  14097. #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
  14098. # if HAVE_MAP_ANONYMOUS
  14099. const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
  14100. const int fd = -1;
  14101. # else /* !HAVE_MAP_ANONYMOUS */
  14102. const int flags = MAP_FILE | MAP_PRIVATE;
  14103. int fd = open ("/dev/zero", O_RDONLY, 0666);
  14104. if (fd >= 0)
  14105. # endif
  14106. {
  14107. int pagesize = getpagesize ();
  14108. char *two_pages =
  14109. (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
  14110. flags, fd, 0);
  14111. if (two_pages != (char *)(-1)
  14112. && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
  14113. fence = two_pages + pagesize;
  14114. }
  14115. #endif
  14116. if (fence)
  14117. {
  14118. /* Test against bugs on glibc systems. */
  14119. if (memchr (fence, 0, 0))
  14120. result |= 1;
  14121. strcpy (fence - 9, "12345678");
  14122. if (memchr (fence - 9, 0, 79) != fence - 1)
  14123. result |= 2;
  14124. if (memchr (fence - 1, 0, 3) != fence - 1)
  14125. result |= 4;
  14126. /* Test against bug on AIX 7.2. */
  14127. if (memchr (fence - 4, '6', 16) != fence - 4)
  14128. result |= 8;
  14129. }
  14130. /* Test against bug on Android 4.3. */
  14131. {
  14132. char input[3];
  14133. input[0] = 'a';
  14134. input[1] = 'b';
  14135. input[2] = 'c';
  14136. if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
  14137. result |= 16;
  14138. }
  14139. return result;
  14140. ;
  14141. return 0;
  14142. }
  14143. _ACEOF
  14144. if ac_fn_c_try_run "$LINENO"; then :
  14145. gl_cv_func_memchr_works=yes
  14146. else
  14147. gl_cv_func_memchr_works=no
  14148. fi
  14149. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  14150. conftest.$ac_objext conftest.beam conftest.$ac_ext
  14151. fi
  14152. fi
  14153. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
  14154. $as_echo "$gl_cv_func_memchr_works" >&6; }
  14155. case "$gl_cv_func_memchr_works" in
  14156. *yes) ;;
  14157. *) REPLACE_MEMCHR=1 ;;
  14158. esac
  14159. ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
  14160. if test "x$ac_cv_have_decl_memmem" = xyes; then :
  14161. ac_have_decl=1
  14162. else
  14163. ac_have_decl=0
  14164. fi
  14165. cat >>confdefs.h <<_ACEOF
  14166. #define HAVE_DECL_MEMMEM $ac_have_decl
  14167. _ACEOF
  14168. for ac_func in memmem
  14169. do :
  14170. ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
  14171. if test "x$ac_cv_func_memmem" = xyes; then :
  14172. cat >>confdefs.h <<_ACEOF
  14173. #define HAVE_MEMMEM 1
  14174. _ACEOF
  14175. fi
  14176. done
  14177. if test $ac_cv_func_memmem = yes; then
  14178. HAVE_MEMMEM=1
  14179. else
  14180. HAVE_MEMMEM=0
  14181. fi
  14182. if test $ac_cv_have_decl_memmem = no; then
  14183. HAVE_DECL_MEMMEM=0
  14184. else
  14185. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
  14186. $as_echo_n "checking whether memmem works... " >&6; }
  14187. if ${gl_cv_func_memmem_works_always+:} false; then :
  14188. $as_echo_n "(cached) " >&6
  14189. else
  14190. if test "$cross_compiling" = yes; then :
  14191. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14192. /* end confdefs.h. */
  14193. #ifdef __GNU_LIBRARY__
  14194. #include <features.h>
  14195. #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
  14196. || __GLIBC_MINOR__ > 12)) \
  14197. || (__GLIBC__ > 2)) \
  14198. || defined __UCLIBC__
  14199. Lucky user
  14200. #endif
  14201. #elif defined __CYGWIN__
  14202. #include <cygwin/version.h>
  14203. #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
  14204. Lucky user
  14205. #endif
  14206. #else
  14207. Lucky user
  14208. #endif
  14209. _ACEOF
  14210. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  14211. $EGREP "Lucky user" >/dev/null 2>&1; then :
  14212. gl_cv_func_memmem_works_always="guessing yes"
  14213. else
  14214. gl_cv_func_memmem_works_always="$gl_cross_guess_normal"
  14215. fi
  14216. rm -f conftest*
  14217. else
  14218. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14219. /* end confdefs.h. */
  14220. #include <string.h> /* for memmem */
  14221. #define P "_EF_BF_BD"
  14222. #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
  14223. #define NEEDLE P P P P P
  14224. int
  14225. main ()
  14226. {
  14227. int result = 0;
  14228. if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
  14229. result |= 1;
  14230. /* Check for empty needle behavior. */
  14231. {
  14232. const char *haystack = "AAA";
  14233. if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
  14234. result |= 2;
  14235. }
  14236. return result;
  14237. ;
  14238. return 0;
  14239. }
  14240. _ACEOF
  14241. if ac_fn_c_try_run "$LINENO"; then :
  14242. gl_cv_func_memmem_works_always=yes
  14243. else
  14244. gl_cv_func_memmem_works_always=no
  14245. fi
  14246. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  14247. conftest.$ac_objext conftest.beam conftest.$ac_ext
  14248. fi
  14249. fi
  14250. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
  14251. $as_echo "$gl_cv_func_memmem_works_always" >&6; }
  14252. case "$gl_cv_func_memmem_works_always" in
  14253. *yes) ;;
  14254. *)
  14255. REPLACE_MEMMEM=1
  14256. ;;
  14257. esac
  14258. fi
  14259. :
  14260. ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
  14261. if test "x$ac_cv_have_decl_memrchr" = xyes; then :
  14262. ac_have_decl=1
  14263. else
  14264. ac_have_decl=0
  14265. fi
  14266. cat >>confdefs.h <<_ACEOF
  14267. #define HAVE_DECL_MEMRCHR $ac_have_decl
  14268. _ACEOF
  14269. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
  14270. $as_echo_n "checking whether <limits.h> defines MIN and MAX... " >&6; }
  14271. if ${gl_cv_minmax_in_limits_h+:} false; then :
  14272. $as_echo_n "(cached) " >&6
  14273. else
  14274. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14275. /* end confdefs.h. */
  14276. #include <limits.h>
  14277. int x = MIN (42, 17);
  14278. int
  14279. main ()
  14280. {
  14281. ;
  14282. return 0;
  14283. }
  14284. _ACEOF
  14285. if ac_fn_c_try_compile "$LINENO"; then :
  14286. gl_cv_minmax_in_limits_h=yes
  14287. else
  14288. gl_cv_minmax_in_limits_h=no
  14289. fi
  14290. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14291. fi
  14292. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
  14293. $as_echo "$gl_cv_minmax_in_limits_h" >&6; }
  14294. if test $gl_cv_minmax_in_limits_h = yes; then
  14295. $as_echo "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
  14296. fi
  14297. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
  14298. $as_echo_n "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
  14299. if ${gl_cv_minmax_in_sys_param_h+:} false; then :
  14300. $as_echo_n "(cached) " >&6
  14301. else
  14302. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14303. /* end confdefs.h. */
  14304. #include <sys/param.h>
  14305. int x = MIN (42, 17);
  14306. int
  14307. main ()
  14308. {
  14309. ;
  14310. return 0;
  14311. }
  14312. _ACEOF
  14313. if ac_fn_c_try_compile "$LINENO"; then :
  14314. gl_cv_minmax_in_sys_param_h=yes
  14315. else
  14316. gl_cv_minmax_in_sys_param_h=no
  14317. fi
  14318. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14319. fi
  14320. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
  14321. $as_echo "$gl_cv_minmax_in_sys_param_h" >&6; }
  14322. if test $gl_cv_minmax_in_sys_param_h = yes; then
  14323. $as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
  14324. fi
  14325. GNULIB_GETADDRINFO=0;
  14326. HAVE_STRUCT_ADDRINFO=1;
  14327. HAVE_DECL_FREEADDRINFO=1;
  14328. HAVE_DECL_GAI_STRERROR=1;
  14329. HAVE_DECL_GETADDRINFO=1;
  14330. HAVE_DECL_GETNAMEINFO=1;
  14331. REPLACE_GAI_STRERROR=0;
  14332. REPLACE_GETADDRINFO=0;
  14333. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
  14334. $as_echo_n "checking for O_CLOEXEC... " >&6; }
  14335. if ${gl_cv_macro_O_CLOEXEC+:} false; then :
  14336. $as_echo_n "(cached) " >&6
  14337. else
  14338. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14339. /* end confdefs.h. */
  14340. #include <fcntl.h>
  14341. #ifndef O_CLOEXEC
  14342. choke me;
  14343. #endif
  14344. int
  14345. main ()
  14346. {
  14347. return O_CLOEXEC;
  14348. ;
  14349. return 0;
  14350. }
  14351. _ACEOF
  14352. if ac_fn_c_try_compile "$LINENO"; then :
  14353. gl_cv_macro_O_CLOEXEC=yes
  14354. else
  14355. gl_cv_macro_O_CLOEXEC=no
  14356. fi
  14357. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14358. fi
  14359. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
  14360. $as_echo "$gl_cv_macro_O_CLOEXEC" >&6; }
  14361. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
  14362. $as_echo_n "checking for promoted mode_t type... " >&6; }
  14363. if ${gl_cv_promoted_mode_t+:} false; then :
  14364. $as_echo_n "(cached) " >&6
  14365. else
  14366. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14367. /* end confdefs.h. */
  14368. #include <sys/types.h>
  14369. int
  14370. main ()
  14371. {
  14372. typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
  14373. ;
  14374. return 0;
  14375. }
  14376. _ACEOF
  14377. if ac_fn_c_try_compile "$LINENO"; then :
  14378. gl_cv_promoted_mode_t='int'
  14379. else
  14380. gl_cv_promoted_mode_t='mode_t'
  14381. fi
  14382. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14383. fi
  14384. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
  14385. $as_echo "$gl_cv_promoted_mode_t" >&6; }
  14386. cat >>confdefs.h <<_ACEOF
  14387. #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
  14388. _ACEOF
  14389. GNULIB_PSELECT=0;
  14390. GNULIB_SELECT=0;
  14391. HAVE_PSELECT=1;
  14392. REPLACE_PSELECT=0;
  14393. REPLACE_SELECT=0;
  14394. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
  14395. $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
  14396. if ${gl_cv_header_sys_select_h_selfcontained+:} false; then :
  14397. $as_echo_n "(cached) " >&6
  14398. else
  14399. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14400. /* end confdefs.h. */
  14401. #include <sys/select.h>
  14402. int
  14403. main ()
  14404. {
  14405. struct timeval b;
  14406. ;
  14407. return 0;
  14408. }
  14409. _ACEOF
  14410. if ac_fn_c_try_compile "$LINENO"; then :
  14411. gl_cv_header_sys_select_h_selfcontained=yes
  14412. else
  14413. gl_cv_header_sys_select_h_selfcontained=no
  14414. fi
  14415. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14416. if test $gl_cv_header_sys_select_h_selfcontained = yes; then
  14417. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14418. /* end confdefs.h. */
  14419. #include <sys/select.h>
  14420. int
  14421. main ()
  14422. {
  14423. int memset; int bzero;
  14424. ;
  14425. return 0;
  14426. }
  14427. _ACEOF
  14428. if ac_fn_c_try_compile "$LINENO"; then :
  14429. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14430. /* end confdefs.h. */
  14431. #include <sys/select.h>
  14432. int
  14433. main ()
  14434. {
  14435. #undef memset
  14436. #define memset nonexistent_memset
  14437. extern
  14438. #ifdef __cplusplus
  14439. "C"
  14440. #endif
  14441. void *memset (void *, int, unsigned long);
  14442. #undef bzero
  14443. #define bzero nonexistent_bzero
  14444. extern
  14445. #ifdef __cplusplus
  14446. "C"
  14447. #endif
  14448. void bzero (void *, unsigned long);
  14449. fd_set fds;
  14450. FD_ZERO (&fds);
  14451. ;
  14452. return 0;
  14453. }
  14454. _ACEOF
  14455. if ac_fn_c_try_link "$LINENO"; then :
  14456. else
  14457. gl_cv_header_sys_select_h_selfcontained=no
  14458. fi
  14459. rm -f core conftest.err conftest.$ac_objext \
  14460. conftest$ac_exeext conftest.$ac_ext
  14461. fi
  14462. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14463. fi
  14464. fi
  14465. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
  14466. $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
  14467. if test $gl_cv_have_include_next = yes; then
  14468. gl_cv_next_sys_select_h='<'sys/select.h'>'
  14469. else
  14470. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
  14471. $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
  14472. if ${gl_cv_next_sys_select_h+:} false; then :
  14473. $as_echo_n "(cached) " >&6
  14474. else
  14475. if test $ac_cv_header_sys_select_h = yes; then
  14476. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14477. /* end confdefs.h. */
  14478. #include <sys/select.h>
  14479. _ACEOF
  14480. case "$host_os" in
  14481. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  14482. *) gl_absname_cpp="$ac_cpp" ;;
  14483. esac
  14484. case "$host_os" in
  14485. mingw*)
  14486. gl_dirsep_regex='[/\\]'
  14487. ;;
  14488. *)
  14489. gl_dirsep_regex='\/'
  14490. ;;
  14491. esac
  14492. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  14493. gl_header_literal_regex=`echo 'sys/select.h' \
  14494. | sed -e "$gl_make_literal_regex_sed"`
  14495. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  14496. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  14497. s|^/[^/]|//&|
  14498. p
  14499. q
  14500. }'
  14501. gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  14502. sed -n "$gl_absolute_header_sed"`
  14503. gl_header=$gl_cv_absolute_sys_select_h
  14504. gl_cv_next_sys_select_h='"'$gl_header'"'
  14505. else
  14506. gl_cv_next_sys_select_h='<'sys/select.h'>'
  14507. fi
  14508. fi
  14509. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
  14510. $as_echo "$gl_cv_next_sys_select_h" >&6; }
  14511. fi
  14512. NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
  14513. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  14514. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  14515. gl_next_as_first_directive='<'sys/select.h'>'
  14516. else
  14517. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  14518. gl_next_as_first_directive=$gl_cv_next_sys_select_h
  14519. fi
  14520. NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
  14521. if test $ac_cv_header_sys_select_h = yes; then
  14522. HAVE_SYS_SELECT_H=1
  14523. else
  14524. HAVE_SYS_SELECT_H=0
  14525. fi
  14526. if test $ac_cv_header_sys_socket_h != yes; then
  14527. for ac_header in winsock2.h
  14528. do :
  14529. ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
  14530. if test "x$ac_cv_header_winsock2_h" = xyes; then :
  14531. cat >>confdefs.h <<_ACEOF
  14532. #define HAVE_WINSOCK2_H 1
  14533. _ACEOF
  14534. fi
  14535. done
  14536. fi
  14537. if test "$ac_cv_header_winsock2_h" = yes; then
  14538. HAVE_WINSOCK2_H=1
  14539. UNISTD_H_HAVE_WINSOCK2_H=1
  14540. SYS_IOCTL_H_HAVE_WINSOCK2_H=1
  14541. else
  14542. HAVE_WINSOCK2_H=0
  14543. fi
  14544. if test $ac_cv_header_sys_socket_h != yes; then
  14545. for ac_header in winsock2.h
  14546. do :
  14547. ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
  14548. if test "x$ac_cv_header_winsock2_h" = xyes; then :
  14549. cat >>confdefs.h <<_ACEOF
  14550. #define HAVE_WINSOCK2_H 1
  14551. _ACEOF
  14552. fi
  14553. done
  14554. fi
  14555. if test "$ac_cv_header_winsock2_h" = yes; then
  14556. HAVE_WINSOCK2_H=1
  14557. UNISTD_H_HAVE_WINSOCK2_H=1
  14558. SYS_IOCTL_H_HAVE_WINSOCK2_H=1
  14559. else
  14560. HAVE_WINSOCK2_H=0
  14561. fi
  14562. LIBSOCKET=
  14563. if test $HAVE_WINSOCK2_H = 1; then
  14564. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WSAStartup" >&5
  14565. $as_echo_n "checking for WSAStartup... " >&6; }
  14566. if ${gl_cv_func_wsastartup+:} false; then :
  14567. $as_echo_n "(cached) " >&6
  14568. else
  14569. gl_save_LIBS="$LIBS"
  14570. LIBS="$LIBS -lws2_32"
  14571. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14572. /* end confdefs.h. */
  14573. #ifdef HAVE_WINSOCK2_H
  14574. # include <winsock2.h>
  14575. #endif
  14576. int
  14577. main ()
  14578. {
  14579. WORD wVersionRequested = MAKEWORD(1, 1);
  14580. WSADATA wsaData;
  14581. int err = WSAStartup(wVersionRequested, &wsaData);
  14582. WSACleanup ();
  14583. ;
  14584. return 0;
  14585. }
  14586. _ACEOF
  14587. if ac_fn_c_try_link "$LINENO"; then :
  14588. gl_cv_func_wsastartup=yes
  14589. else
  14590. gl_cv_func_wsastartup=no
  14591. fi
  14592. rm -f core conftest.err conftest.$ac_objext \
  14593. conftest$ac_exeext conftest.$ac_ext
  14594. LIBS="$gl_save_LIBS"
  14595. fi
  14596. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
  14597. $as_echo "$gl_cv_func_wsastartup" >&6; }
  14598. if test "$gl_cv_func_wsastartup" = "yes"; then
  14599. $as_echo "#define WINDOWS_SOCKETS 1" >>confdefs.h
  14600. LIBSOCKET='-lws2_32'
  14601. fi
  14602. else
  14603. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
  14604. $as_echo_n "checking for library containing setsockopt... " >&6; }
  14605. if ${gl_cv_lib_socket+:} false; then :
  14606. $as_echo_n "(cached) " >&6
  14607. else
  14608. gl_cv_lib_socket=
  14609. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14610. /* end confdefs.h. */
  14611. extern
  14612. #ifdef __cplusplus
  14613. "C"
  14614. #endif
  14615. char setsockopt();
  14616. int
  14617. main ()
  14618. {
  14619. setsockopt();
  14620. ;
  14621. return 0;
  14622. }
  14623. _ACEOF
  14624. if ac_fn_c_try_link "$LINENO"; then :
  14625. else
  14626. gl_save_LIBS="$LIBS"
  14627. LIBS="$gl_save_LIBS -lsocket"
  14628. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14629. /* end confdefs.h. */
  14630. extern
  14631. #ifdef __cplusplus
  14632. "C"
  14633. #endif
  14634. char setsockopt();
  14635. int
  14636. main ()
  14637. {
  14638. setsockopt();
  14639. ;
  14640. return 0;
  14641. }
  14642. _ACEOF
  14643. if ac_fn_c_try_link "$LINENO"; then :
  14644. gl_cv_lib_socket="-lsocket"
  14645. fi
  14646. rm -f core conftest.err conftest.$ac_objext \
  14647. conftest$ac_exeext conftest.$ac_ext
  14648. if test -z "$gl_cv_lib_socket"; then
  14649. LIBS="$gl_save_LIBS -lnetwork"
  14650. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14651. /* end confdefs.h. */
  14652. extern
  14653. #ifdef __cplusplus
  14654. "C"
  14655. #endif
  14656. char setsockopt();
  14657. int
  14658. main ()
  14659. {
  14660. setsockopt();
  14661. ;
  14662. return 0;
  14663. }
  14664. _ACEOF
  14665. if ac_fn_c_try_link "$LINENO"; then :
  14666. gl_cv_lib_socket="-lnetwork"
  14667. fi
  14668. rm -f core conftest.err conftest.$ac_objext \
  14669. conftest$ac_exeext conftest.$ac_ext
  14670. if test -z "$gl_cv_lib_socket"; then
  14671. LIBS="$gl_save_LIBS -lnet"
  14672. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14673. /* end confdefs.h. */
  14674. extern
  14675. #ifdef __cplusplus
  14676. "C"
  14677. #endif
  14678. char setsockopt();
  14679. int
  14680. main ()
  14681. {
  14682. setsockopt();
  14683. ;
  14684. return 0;
  14685. }
  14686. _ACEOF
  14687. if ac_fn_c_try_link "$LINENO"; then :
  14688. gl_cv_lib_socket="-lnet"
  14689. fi
  14690. rm -f core conftest.err conftest.$ac_objext \
  14691. conftest$ac_exeext conftest.$ac_ext
  14692. fi
  14693. fi
  14694. LIBS="$gl_save_LIBS"
  14695. fi
  14696. rm -f core conftest.err conftest.$ac_objext \
  14697. conftest$ac_exeext conftest.$ac_ext
  14698. if test -z "$gl_cv_lib_socket"; then
  14699. gl_cv_lib_socket="none needed"
  14700. fi
  14701. fi
  14702. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
  14703. $as_echo "$gl_cv_lib_socket" >&6; }
  14704. if test "$gl_cv_lib_socket" != "none needed"; then
  14705. LIBSOCKET="$gl_cv_lib_socket"
  14706. fi
  14707. fi
  14708. :
  14709. ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
  14710. if test "x$ac_cv_have_decl_setenv" = xyes; then :
  14711. ac_have_decl=1
  14712. else
  14713. ac_have_decl=0
  14714. fi
  14715. cat >>confdefs.h <<_ACEOF
  14716. #define HAVE_DECL_SETENV $ac_have_decl
  14717. _ACEOF
  14718. if test $ac_cv_have_decl_setenv = no; then
  14719. HAVE_DECL_SETENV=0
  14720. fi
  14721. for ac_header in search.h
  14722. do :
  14723. ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
  14724. if test "x$ac_cv_header_search_h" = xyes; then :
  14725. cat >>confdefs.h <<_ACEOF
  14726. #define HAVE_SEARCH_H 1
  14727. _ACEOF
  14728. fi
  14729. done
  14730. for ac_func in tsearch
  14731. do :
  14732. ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
  14733. if test "x$ac_cv_func_tsearch" = xyes; then :
  14734. cat >>confdefs.h <<_ACEOF
  14735. #define HAVE_TSEARCH 1
  14736. _ACEOF
  14737. fi
  14738. done
  14739. GNULIB_PTHREAD_SIGMASK=0;
  14740. GNULIB_RAISE=0;
  14741. GNULIB_SIGNAL_H_SIGPIPE=0;
  14742. GNULIB_SIGPROCMASK=0;
  14743. GNULIB_SIGACTION=0;
  14744. HAVE_POSIX_SIGNALBLOCKING=1;
  14745. HAVE_PTHREAD_SIGMASK=1;
  14746. HAVE_RAISE=1;
  14747. HAVE_SIGSET_T=1;
  14748. HAVE_SIGINFO_T=1;
  14749. HAVE_SIGACTION=1;
  14750. HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
  14751. HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
  14752. HAVE_SIGHANDLER_T=1;
  14753. REPLACE_PTHREAD_SIGMASK=0;
  14754. REPLACE_RAISE=0;
  14755. ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
  14756. #include <signal.h>
  14757. /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
  14758. #include <sys/types.h>
  14759. "
  14760. if test "x$ac_cv_type_sigset_t" = xyes; then :
  14761. cat >>confdefs.h <<_ACEOF
  14762. #define HAVE_SIGSET_T 1
  14763. _ACEOF
  14764. gl_cv_type_sigset_t=yes
  14765. else
  14766. gl_cv_type_sigset_t=no
  14767. fi
  14768. if test $gl_cv_type_sigset_t != yes; then
  14769. HAVE_SIGSET_T=0
  14770. fi
  14771. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
  14772. $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
  14773. if ${ac_cv_header_stdbool_h+:} false; then :
  14774. $as_echo_n "(cached) " >&6
  14775. else
  14776. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14777. /* end confdefs.h. */
  14778. #include <stdbool.h>
  14779. #ifdef __cplusplus
  14780. typedef bool Bool;
  14781. #else
  14782. typedef _Bool Bool;
  14783. #ifndef bool
  14784. "error: bool is not defined"
  14785. #endif
  14786. #ifndef false
  14787. "error: false is not defined"
  14788. #endif
  14789. #if false
  14790. "error: false is not 0"
  14791. #endif
  14792. #ifndef true
  14793. "error: true is not defined"
  14794. #endif
  14795. #if true != 1
  14796. "error: true is not 1"
  14797. #endif
  14798. #endif
  14799. #ifndef __bool_true_false_are_defined
  14800. "error: __bool_true_false_are_defined is not defined"
  14801. #endif
  14802. struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
  14803. char a[true == 1 ? 1 : -1];
  14804. char b[false == 0 ? 1 : -1];
  14805. char c[__bool_true_false_are_defined == 1 ? 1 : -1];
  14806. char d[(bool) 0.5 == true ? 1 : -1];
  14807. /* See body of main program for 'e'. */
  14808. char f[(Bool) 0.0 == false ? 1 : -1];
  14809. char g[true];
  14810. char h[sizeof (Bool)];
  14811. char i[sizeof s.t];
  14812. enum { j = false, k = true, l = false * true, m = true * 256 };
  14813. /* The following fails for
  14814. HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
  14815. Bool n[m];
  14816. char o[sizeof n == m * sizeof n[0] ? 1 : -1];
  14817. char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
  14818. /* Catch a bug in an HP-UX C compiler. See
  14819. https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
  14820. https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
  14821. */
  14822. Bool q = true;
  14823. Bool *pq = &q;
  14824. bool *qq = &q;
  14825. int
  14826. main ()
  14827. {
  14828. bool e = &s;
  14829. *pq |= q; *pq |= ! q;
  14830. *qq |= q; *qq |= ! q;
  14831. /* Refer to every declared value, to avoid compiler optimizations. */
  14832. return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
  14833. + !m + !n + !o + !p + !q + !pq + !qq);
  14834. ;
  14835. return 0;
  14836. }
  14837. _ACEOF
  14838. if ac_fn_c_try_compile "$LINENO"; then :
  14839. ac_cv_header_stdbool_h=yes
  14840. else
  14841. ac_cv_header_stdbool_h=no
  14842. fi
  14843. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14844. fi
  14845. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
  14846. $as_echo "$ac_cv_header_stdbool_h" >&6; }
  14847. ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
  14848. if test "x$ac_cv_type__Bool" = xyes; then :
  14849. cat >>confdefs.h <<_ACEOF
  14850. #define HAVE__BOOL 1
  14851. _ACEOF
  14852. fi
  14853. ac_fn_c_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default"
  14854. if test "x$ac_cv_have_decl_fcloseall" = xyes; then :
  14855. ac_have_decl=1
  14856. else
  14857. ac_have_decl=0
  14858. fi
  14859. cat >>confdefs.h <<_ACEOF
  14860. #define HAVE_DECL_FCLOSEALL $ac_have_decl
  14861. _ACEOF
  14862. ac_fn_c_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default"
  14863. if test "x$ac_cv_have_decl_ecvt" = xyes; then :
  14864. ac_have_decl=1
  14865. else
  14866. ac_have_decl=0
  14867. fi
  14868. cat >>confdefs.h <<_ACEOF
  14869. #define HAVE_DECL_ECVT $ac_have_decl
  14870. _ACEOF
  14871. ac_fn_c_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default"
  14872. if test "x$ac_cv_have_decl_fcvt" = xyes; then :
  14873. ac_have_decl=1
  14874. else
  14875. ac_have_decl=0
  14876. fi
  14877. cat >>confdefs.h <<_ACEOF
  14878. #define HAVE_DECL_FCVT $ac_have_decl
  14879. _ACEOF
  14880. ac_fn_c_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default"
  14881. if test "x$ac_cv_have_decl_gcvt" = xyes; then :
  14882. ac_have_decl=1
  14883. else
  14884. ac_have_decl=0
  14885. fi
  14886. cat >>confdefs.h <<_ACEOF
  14887. #define HAVE_DECL_GCVT $ac_have_decl
  14888. _ACEOF
  14889. ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
  14890. if test "x$ac_cv_have_decl_strdup" = xyes; then :
  14891. ac_have_decl=1
  14892. else
  14893. ac_have_decl=0
  14894. fi
  14895. cat >>confdefs.h <<_ACEOF
  14896. #define HAVE_DECL_STRDUP $ac_have_decl
  14897. _ACEOF
  14898. REPLACE_STRERROR_0=0
  14899. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
  14900. $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
  14901. if ${gl_cv_func_strerror_0_works+:} false; then :
  14902. $as_echo_n "(cached) " >&6
  14903. else
  14904. if test "$cross_compiling" = yes; then :
  14905. case "$host_os" in
  14906. # Guess yes on glibc systems.
  14907. *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
  14908. # Guess yes on musl systems.
  14909. *-musl*) gl_cv_func_strerror_0_works="guessing yes" ;;
  14910. # Guess yes on native Windows.
  14911. mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
  14912. # If we don't know, obey --enable-cross-guesses.
  14913. *) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
  14914. esac
  14915. else
  14916. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14917. /* end confdefs.h. */
  14918. #include <string.h>
  14919. #include <errno.h>
  14920. int
  14921. main ()
  14922. {
  14923. int result = 0;
  14924. char *str;
  14925. errno = 0;
  14926. str = strerror (0);
  14927. if (!*str) result |= 1;
  14928. if (errno) result |= 2;
  14929. if (strstr (str, "nknown") || strstr (str, "ndefined"))
  14930. result |= 4;
  14931. return result;
  14932. ;
  14933. return 0;
  14934. }
  14935. _ACEOF
  14936. if ac_fn_c_try_run "$LINENO"; then :
  14937. gl_cv_func_strerror_0_works=yes
  14938. else
  14939. gl_cv_func_strerror_0_works=no
  14940. fi
  14941. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  14942. conftest.$ac_objext conftest.beam conftest.$ac_ext
  14943. fi
  14944. fi
  14945. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
  14946. $as_echo "$gl_cv_func_strerror_0_works" >&6; }
  14947. case "$gl_cv_func_strerror_0_works" in
  14948. *yes) ;;
  14949. *)
  14950. REPLACE_STRERROR_0=1
  14951. $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
  14952. ;;
  14953. esac
  14954. if test $ac_cv_func_strerror_r = yes; then
  14955. if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
  14956. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
  14957. $as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
  14958. if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
  14959. $as_echo_n "(cached) " >&6
  14960. else
  14961. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  14962. /* end confdefs.h. */
  14963. #include <string.h>
  14964. int strerror_r (int, char *, size_t);
  14965. int
  14966. main ()
  14967. {
  14968. ;
  14969. return 0;
  14970. }
  14971. _ACEOF
  14972. if ac_fn_c_try_compile "$LINENO"; then :
  14973. gl_cv_func_strerror_r_posix_signature=yes
  14974. else
  14975. gl_cv_func_strerror_r_posix_signature=no
  14976. fi
  14977. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  14978. fi
  14979. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
  14980. $as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
  14981. if test $gl_cv_func_strerror_r_posix_signature = yes; then
  14982. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
  14983. $as_echo_n "checking whether strerror_r works... " >&6; }
  14984. if ${gl_cv_func_strerror_r_works+:} false; then :
  14985. $as_echo_n "(cached) " >&6
  14986. else
  14987. if test "$cross_compiling" = yes; then :
  14988. case "$host_os" in
  14989. # Guess no on AIX.
  14990. aix*) gl_cv_func_strerror_r_works="guessing no";;
  14991. # Guess no on HP-UX.
  14992. hpux*) gl_cv_func_strerror_r_works="guessing no";;
  14993. # Guess no on BSD variants.
  14994. *bsd*) gl_cv_func_strerror_r_works="guessing no";;
  14995. # Guess yes otherwise.
  14996. *) gl_cv_func_strerror_r_works="guessing yes";;
  14997. esac
  14998. else
  14999. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15000. /* end confdefs.h. */
  15001. #include <errno.h>
  15002. #include <string.h>
  15003. int
  15004. main ()
  15005. {
  15006. int result = 0;
  15007. char buf[79];
  15008. if (strerror_r (EACCES, buf, 0) < 0)
  15009. result |= 1;
  15010. errno = 0;
  15011. if (strerror_r (EACCES, buf, sizeof buf) != 0)
  15012. result |= 2;
  15013. strcpy (buf, "Unknown");
  15014. if (strerror_r (0, buf, sizeof buf) != 0)
  15015. result |= 4;
  15016. if (errno)
  15017. result |= 8;
  15018. if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
  15019. result |= 0x10;
  15020. errno = 0;
  15021. *buf = 0;
  15022. if (strerror_r (-3, buf, sizeof buf) < 0)
  15023. result |= 0x20;
  15024. if (errno)
  15025. result |= 0x40;
  15026. if (!*buf)
  15027. result |= 0x80;
  15028. return result;
  15029. ;
  15030. return 0;
  15031. }
  15032. _ACEOF
  15033. if ac_fn_c_try_run "$LINENO"; then :
  15034. gl_cv_func_strerror_r_works=yes
  15035. else
  15036. gl_cv_func_strerror_r_works=no
  15037. fi
  15038. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  15039. conftest.$ac_objext conftest.beam conftest.$ac_ext
  15040. fi
  15041. fi
  15042. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
  15043. $as_echo "$gl_cv_func_strerror_r_works" >&6; }
  15044. else
  15045. if test $ac_cv_func___xpg_strerror_r = yes; then
  15046. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
  15047. $as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
  15048. if ${gl_cv_func_strerror_r_works+:} false; then :
  15049. $as_echo_n "(cached) " >&6
  15050. else
  15051. if test "$cross_compiling" = yes; then :
  15052. gl_cv_func_strerror_r_works="$gl_cross_guess_normal"
  15053. else
  15054. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15055. /* end confdefs.h. */
  15056. #include <errno.h>
  15057. #include <string.h>
  15058. extern
  15059. #ifdef __cplusplus
  15060. "C"
  15061. #endif
  15062. int __xpg_strerror_r(int, char *, size_t);
  15063. int
  15064. main ()
  15065. {
  15066. int result = 0;
  15067. char buf[256] = "^";
  15068. char copy[256];
  15069. char *str = strerror (-1);
  15070. strcpy (copy, str);
  15071. if (__xpg_strerror_r (-2, buf, 1) == 0)
  15072. result |= 1;
  15073. if (*buf)
  15074. result |= 2;
  15075. __xpg_strerror_r (-2, buf, 256);
  15076. if (strcmp (str, copy))
  15077. result |= 4;
  15078. return result;
  15079. ;
  15080. return 0;
  15081. }
  15082. _ACEOF
  15083. if ac_fn_c_try_run "$LINENO"; then :
  15084. gl_cv_func_strerror_r_works=yes
  15085. else
  15086. gl_cv_func_strerror_r_works=no
  15087. fi
  15088. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  15089. conftest.$ac_objext conftest.beam conftest.$ac_ext
  15090. fi
  15091. fi
  15092. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
  15093. $as_echo "$gl_cv_func_strerror_r_works" >&6; }
  15094. fi
  15095. fi
  15096. fi
  15097. fi
  15098. ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
  15099. if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
  15100. ac_have_decl=1
  15101. else
  15102. ac_have_decl=0
  15103. fi
  15104. cat >>confdefs.h <<_ACEOF
  15105. #define HAVE_DECL_STRERROR_R $ac_have_decl
  15106. _ACEOF
  15107. if test $gl_cv_have_include_next = yes; then
  15108. gl_cv_next_string_h='<'string.h'>'
  15109. else
  15110. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
  15111. $as_echo_n "checking absolute name of <string.h>... " >&6; }
  15112. if ${gl_cv_next_string_h+:} false; then :
  15113. $as_echo_n "(cached) " >&6
  15114. else
  15115. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15116. /* end confdefs.h. */
  15117. #include <string.h>
  15118. _ACEOF
  15119. case "$host_os" in
  15120. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  15121. *) gl_absname_cpp="$ac_cpp" ;;
  15122. esac
  15123. case "$host_os" in
  15124. mingw*)
  15125. gl_dirsep_regex='[/\\]'
  15126. ;;
  15127. *)
  15128. gl_dirsep_regex='\/'
  15129. ;;
  15130. esac
  15131. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  15132. gl_header_literal_regex=`echo 'string.h' \
  15133. | sed -e "$gl_make_literal_regex_sed"`
  15134. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  15135. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  15136. s|^/[^/]|//&|
  15137. p
  15138. q
  15139. }'
  15140. gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  15141. sed -n "$gl_absolute_header_sed"`
  15142. gl_header=$gl_cv_absolute_string_h
  15143. gl_cv_next_string_h='"'$gl_header'"'
  15144. fi
  15145. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
  15146. $as_echo "$gl_cv_next_string_h" >&6; }
  15147. fi
  15148. NEXT_STRING_H=$gl_cv_next_string_h
  15149. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  15150. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  15151. gl_next_as_first_directive='<'string.h'>'
  15152. else
  15153. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  15154. gl_next_as_first_directive=$gl_cv_next_string_h
  15155. fi
  15156. NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
  15157. if test $gl_cv_have_include_next = yes; then
  15158. gl_cv_next_strings_h='<'strings.h'>'
  15159. else
  15160. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
  15161. $as_echo_n "checking absolute name of <strings.h>... " >&6; }
  15162. if ${gl_cv_next_strings_h+:} false; then :
  15163. $as_echo_n "(cached) " >&6
  15164. else
  15165. if test $ac_cv_header_strings_h = yes; then
  15166. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15167. /* end confdefs.h. */
  15168. #include <strings.h>
  15169. _ACEOF
  15170. case "$host_os" in
  15171. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  15172. *) gl_absname_cpp="$ac_cpp" ;;
  15173. esac
  15174. case "$host_os" in
  15175. mingw*)
  15176. gl_dirsep_regex='[/\\]'
  15177. ;;
  15178. *)
  15179. gl_dirsep_regex='\/'
  15180. ;;
  15181. esac
  15182. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  15183. gl_header_literal_regex=`echo 'strings.h' \
  15184. | sed -e "$gl_make_literal_regex_sed"`
  15185. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  15186. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  15187. s|^/[^/]|//&|
  15188. p
  15189. q
  15190. }'
  15191. gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  15192. sed -n "$gl_absolute_header_sed"`
  15193. gl_header=$gl_cv_absolute_strings_h
  15194. gl_cv_next_strings_h='"'$gl_header'"'
  15195. else
  15196. gl_cv_next_strings_h='<'strings.h'>'
  15197. fi
  15198. fi
  15199. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
  15200. $as_echo "$gl_cv_next_strings_h" >&6; }
  15201. fi
  15202. NEXT_STRINGS_H=$gl_cv_next_strings_h
  15203. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  15204. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  15205. gl_next_as_first_directive='<'strings.h'>'
  15206. else
  15207. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  15208. gl_next_as_first_directive=$gl_cv_next_strings_h
  15209. fi
  15210. NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
  15211. if test $ac_cv_header_strings_h = yes; then
  15212. HAVE_STRINGS_H=1
  15213. else
  15214. HAVE_STRINGS_H=0
  15215. fi
  15216. ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
  15217. if test "x$ac_cv_have_decl_strnlen" = xyes; then :
  15218. ac_have_decl=1
  15219. else
  15220. ac_have_decl=0
  15221. fi
  15222. cat >>confdefs.h <<_ACEOF
  15223. #define HAVE_DECL_STRNLEN $ac_have_decl
  15224. _ACEOF
  15225. if test $REPLACE_MEMCHR = 1; then
  15226. REPLACE_STRSTR=1
  15227. else
  15228. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
  15229. $as_echo_n "checking whether strstr works... " >&6; }
  15230. if ${gl_cv_func_strstr_works_always+:} false; then :
  15231. $as_echo_n "(cached) " >&6
  15232. else
  15233. if test "$cross_compiling" = yes; then :
  15234. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15235. /* end confdefs.h. */
  15236. #ifdef __GNU_LIBRARY__
  15237. #include <features.h>
  15238. #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
  15239. || defined __UCLIBC__
  15240. Lucky user
  15241. #endif
  15242. #elif defined __CYGWIN__
  15243. #include <cygwin/version.h>
  15244. #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
  15245. Lucky user
  15246. #endif
  15247. #else
  15248. Lucky user
  15249. #endif
  15250. _ACEOF
  15251. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  15252. $EGREP "Lucky user" >/dev/null 2>&1; then :
  15253. gl_cv_func_strstr_works_always="guessing yes"
  15254. else
  15255. gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
  15256. fi
  15257. rm -f conftest*
  15258. else
  15259. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15260. /* end confdefs.h. */
  15261. #include <string.h> /* for strstr */
  15262. #ifdef __GNU_LIBRARY__
  15263. #include <features.h>
  15264. #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
  15265. Unlucky user
  15266. #endif
  15267. #endif
  15268. #define P "_EF_BF_BD"
  15269. #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
  15270. #define NEEDLE P P P P P
  15271. int
  15272. main ()
  15273. {
  15274. return !!strstr (HAYSTACK, NEEDLE);
  15275. ;
  15276. return 0;
  15277. }
  15278. _ACEOF
  15279. if ac_fn_c_try_run "$LINENO"; then :
  15280. gl_cv_func_strstr_works_always=yes
  15281. else
  15282. gl_cv_func_strstr_works_always=no
  15283. fi
  15284. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  15285. conftest.$ac_objext conftest.beam conftest.$ac_ext
  15286. fi
  15287. fi
  15288. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
  15289. $as_echo "$gl_cv_func_strstr_works_always" >&6; }
  15290. case "$gl_cv_func_strstr_works_always" in
  15291. *yes) ;;
  15292. *)
  15293. REPLACE_STRSTR=1
  15294. ;;
  15295. esac
  15296. fi
  15297. ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
  15298. if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
  15299. ac_have_decl=1
  15300. else
  15301. ac_have_decl=0
  15302. fi
  15303. cat >>confdefs.h <<_ACEOF
  15304. #define HAVE_DECL_STRTOK_R $ac_have_decl
  15305. _ACEOF
  15306. $as_echo "#define _USE_STD_STAT 1" >>confdefs.h
  15307. if test $gl_cv_have_include_next = yes; then
  15308. gl_cv_next_sys_types_h='<'sys/types.h'>'
  15309. else
  15310. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
  15311. $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
  15312. if ${gl_cv_next_sys_types_h+:} false; then :
  15313. $as_echo_n "(cached) " >&6
  15314. else
  15315. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15316. /* end confdefs.h. */
  15317. #include <sys/types.h>
  15318. _ACEOF
  15319. case "$host_os" in
  15320. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  15321. *) gl_absname_cpp="$ac_cpp" ;;
  15322. esac
  15323. case "$host_os" in
  15324. mingw*)
  15325. gl_dirsep_regex='[/\\]'
  15326. ;;
  15327. *)
  15328. gl_dirsep_regex='\/'
  15329. ;;
  15330. esac
  15331. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  15332. gl_header_literal_regex=`echo 'sys/types.h' \
  15333. | sed -e "$gl_make_literal_regex_sed"`
  15334. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  15335. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  15336. s|^/[^/]|//&|
  15337. p
  15338. q
  15339. }'
  15340. gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  15341. sed -n "$gl_absolute_header_sed"`
  15342. gl_header=$gl_cv_absolute_sys_types_h
  15343. gl_cv_next_sys_types_h='"'$gl_header'"'
  15344. fi
  15345. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
  15346. $as_echo "$gl_cv_next_sys_types_h" >&6; }
  15347. fi
  15348. NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
  15349. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  15350. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  15351. gl_next_as_first_directive='<'sys/types.h'>'
  15352. else
  15353. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  15354. gl_next_as_first_directive=$gl_cv_next_sys_types_h
  15355. fi
  15356. NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
  15357. WINDOWS_STAT_INODES=0
  15358. GNULIB_WAITPID=0;
  15359. GNULIB_CTIME=0;
  15360. GNULIB_MKTIME=0;
  15361. GNULIB_LOCALTIME=0;
  15362. GNULIB_NANOSLEEP=0;
  15363. GNULIB_STRFTIME=0;
  15364. GNULIB_STRPTIME=0;
  15365. GNULIB_TIMEGM=0;
  15366. GNULIB_TIMESPEC_GET=0;
  15367. GNULIB_TIME_R=0;
  15368. GNULIB_TIME_RZ=0;
  15369. GNULIB_TZSET=0;
  15370. GNULIB_MDA_TZSET=1;
  15371. HAVE_DECL_LOCALTIME_R=1;
  15372. HAVE_NANOSLEEP=1;
  15373. HAVE_STRPTIME=1;
  15374. HAVE_TIMEGM=1;
  15375. HAVE_TIMESPEC_GET=1;
  15376. HAVE_TIMEZONE_T=0;
  15377. REPLACE_CTIME=GNULIB_PORTCHECK;
  15378. REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
  15379. REPLACE_MKTIME=GNULIB_PORTCHECK;
  15380. REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
  15381. REPLACE_STRFTIME=GNULIB_PORTCHECK;
  15382. REPLACE_TIMEGM=GNULIB_PORTCHECK;
  15383. REPLACE_TZSET=GNULIB_PORTCHECK;
  15384. : ${GNULIB_GETTIMEOFDAY=0};
  15385. REPLACE_GMTIME=0;
  15386. REPLACE_LOCALTIME=0;
  15387. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
  15388. $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
  15389. if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
  15390. $as_echo_n "(cached) " >&6
  15391. else
  15392. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15393. /* end confdefs.h. */
  15394. #include <time.h>
  15395. int
  15396. main ()
  15397. {
  15398. static struct timespec x; x.tv_sec = x.tv_nsec;
  15399. ;
  15400. return 0;
  15401. }
  15402. _ACEOF
  15403. if ac_fn_c_try_compile "$LINENO"; then :
  15404. gl_cv_sys_struct_timespec_in_time_h=yes
  15405. else
  15406. gl_cv_sys_struct_timespec_in_time_h=no
  15407. fi
  15408. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  15409. fi
  15410. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
  15411. $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
  15412. TIME_H_DEFINES_STRUCT_TIMESPEC=0
  15413. SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
  15414. PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
  15415. UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
  15416. if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
  15417. TIME_H_DEFINES_STRUCT_TIMESPEC=1
  15418. else
  15419. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
  15420. $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
  15421. if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
  15422. $as_echo_n "(cached) " >&6
  15423. else
  15424. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15425. /* end confdefs.h. */
  15426. #include <sys/time.h>
  15427. int
  15428. main ()
  15429. {
  15430. static struct timespec x; x.tv_sec = x.tv_nsec;
  15431. ;
  15432. return 0;
  15433. }
  15434. _ACEOF
  15435. if ac_fn_c_try_compile "$LINENO"; then :
  15436. gl_cv_sys_struct_timespec_in_sys_time_h=yes
  15437. else
  15438. gl_cv_sys_struct_timespec_in_sys_time_h=no
  15439. fi
  15440. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  15441. fi
  15442. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
  15443. $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
  15444. if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
  15445. SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
  15446. else
  15447. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
  15448. $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
  15449. if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
  15450. $as_echo_n "(cached) " >&6
  15451. else
  15452. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15453. /* end confdefs.h. */
  15454. #include <pthread.h>
  15455. int
  15456. main ()
  15457. {
  15458. static struct timespec x; x.tv_sec = x.tv_nsec;
  15459. ;
  15460. return 0;
  15461. }
  15462. _ACEOF
  15463. if ac_fn_c_try_compile "$LINENO"; then :
  15464. gl_cv_sys_struct_timespec_in_pthread_h=yes
  15465. else
  15466. gl_cv_sys_struct_timespec_in_pthread_h=no
  15467. fi
  15468. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  15469. fi
  15470. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
  15471. $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
  15472. if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
  15473. PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
  15474. else
  15475. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
  15476. $as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
  15477. if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
  15478. $as_echo_n "(cached) " >&6
  15479. else
  15480. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15481. /* end confdefs.h. */
  15482. #include <unistd.h>
  15483. int
  15484. main ()
  15485. {
  15486. static struct timespec x; x.tv_sec = x.tv_nsec;
  15487. ;
  15488. return 0;
  15489. }
  15490. _ACEOF
  15491. if ac_fn_c_try_compile "$LINENO"; then :
  15492. gl_cv_sys_struct_timespec_in_unistd_h=yes
  15493. else
  15494. gl_cv_sys_struct_timespec_in_unistd_h=no
  15495. fi
  15496. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  15497. fi
  15498. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
  15499. $as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
  15500. if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
  15501. UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
  15502. fi
  15503. fi
  15504. fi
  15505. fi
  15506. if test $gl_cv_have_include_next = yes; then
  15507. gl_cv_next_time_h='<'time.h'>'
  15508. else
  15509. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
  15510. $as_echo_n "checking absolute name of <time.h>... " >&6; }
  15511. if ${gl_cv_next_time_h+:} false; then :
  15512. $as_echo_n "(cached) " >&6
  15513. else
  15514. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15515. /* end confdefs.h. */
  15516. #include <time.h>
  15517. _ACEOF
  15518. case "$host_os" in
  15519. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  15520. *) gl_absname_cpp="$ac_cpp" ;;
  15521. esac
  15522. case "$host_os" in
  15523. mingw*)
  15524. gl_dirsep_regex='[/\\]'
  15525. ;;
  15526. *)
  15527. gl_dirsep_regex='\/'
  15528. ;;
  15529. esac
  15530. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  15531. gl_header_literal_regex=`echo 'time.h' \
  15532. | sed -e "$gl_make_literal_regex_sed"`
  15533. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  15534. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  15535. s|^/[^/]|//&|
  15536. p
  15537. q
  15538. }'
  15539. gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  15540. sed -n "$gl_absolute_header_sed"`
  15541. gl_header=$gl_cv_absolute_time_h
  15542. gl_cv_next_time_h='"'$gl_header'"'
  15543. fi
  15544. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
  15545. $as_echo "$gl_cv_next_time_h" >&6; }
  15546. fi
  15547. NEXT_TIME_H=$gl_cv_next_time_h
  15548. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  15549. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  15550. gl_next_as_first_directive='<'time.h'>'
  15551. else
  15552. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  15553. gl_next_as_first_directive=$gl_cv_next_time_h
  15554. fi
  15555. NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
  15556. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
  15557. $as_echo_n "checking for TIME_UTC in <time.h>... " >&6; }
  15558. if ${gl_cv_time_h_has_TIME_UTC+:} false; then :
  15559. $as_echo_n "(cached) " >&6
  15560. else
  15561. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15562. /* end confdefs.h. */
  15563. #include <time.h>
  15564. int
  15565. main ()
  15566. {
  15567. static int x = TIME_UTC; x++;
  15568. ;
  15569. return 0;
  15570. }
  15571. _ACEOF
  15572. if ac_fn_c_try_compile "$LINENO"; then :
  15573. gl_cv_time_h_has_TIME_UTC=yes
  15574. else
  15575. gl_cv_time_h_has_TIME_UTC=no
  15576. fi
  15577. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  15578. fi
  15579. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
  15580. $as_echo "$gl_cv_time_h_has_TIME_UTC" >&6; }
  15581. if test $gl_cv_time_h_has_TIME_UTC = yes; then
  15582. TIME_H_DEFINES_TIME_UTC=1
  15583. else
  15584. TIME_H_DEFINES_TIME_UTC=0
  15585. fi
  15586. ac_fn_c_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default"
  15587. if test "x$ac_cv_have_decl_execvpe" = xyes; then :
  15588. ac_have_decl=1
  15589. else
  15590. ac_have_decl=0
  15591. fi
  15592. cat >>confdefs.h <<_ACEOF
  15593. #define HAVE_DECL_EXECVPE $ac_have_decl
  15594. _ACEOF
  15595. ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
  15596. if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
  15597. ac_have_decl=1
  15598. else
  15599. ac_have_decl=0
  15600. fi
  15601. cat >>confdefs.h <<_ACEOF
  15602. #define HAVE_DECL_UNSETENV $ac_have_decl
  15603. _ACEOF
  15604. if test $ac_cv_header_crtdefs_h = yes; then
  15605. HAVE_CRTDEFS_H=1
  15606. else
  15607. HAVE_CRTDEFS_H=0
  15608. fi
  15609. GNULIB_ISWBLANK=0;
  15610. GNULIB_ISWDIGIT=0;
  15611. GNULIB_ISWXDIGIT=0;
  15612. GNULIB_WCTYPE=0;
  15613. GNULIB_ISWCTYPE=0;
  15614. GNULIB_WCTRANS=0;
  15615. GNULIB_TOWCTRANS=0;
  15616. HAVE_ISWBLANK=1;
  15617. HAVE_WCTYPE_T=1;
  15618. HAVE_WCTRANS_T=1;
  15619. REPLACE_ISWBLANK=0;
  15620. REPLACE_ISWDIGIT=0;
  15621. REPLACE_ISWXDIGIT=0;
  15622. if false; then
  15623. GL_COND_LIBTOOL_TRUE=
  15624. GL_COND_LIBTOOL_FALSE='#'
  15625. else
  15626. GL_COND_LIBTOOL_TRUE='#'
  15627. GL_COND_LIBTOOL_FALSE=
  15628. fi
  15629. gl_cond_libtool=false
  15630. gl_libdeps=
  15631. gl_ltlibdeps=
  15632. gl_m4_base='import/m4'
  15633. gl_source_base='import'
  15634. if test "$ac_cv_header_winsock2_h" = yes; then
  15635. gl_LIBOBJS="$gl_LIBOBJS accept.$ac_objext"
  15636. fi
  15637. GNULIB_ACCEPT=1
  15638. $as_echo "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h
  15639. if test $ac_cv_func_alloca_works = no; then
  15640. :
  15641. fi
  15642. # Define an additional variable used in the Makefile substitution.
  15643. if test $ac_cv_working_alloca_h = yes; then
  15644. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
  15645. $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
  15646. if ${gl_cv_rpl_alloca+:} false; then :
  15647. $as_echo_n "(cached) " >&6
  15648. else
  15649. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15650. /* end confdefs.h. */
  15651. #if defined __GNUC__ || defined _AIX || defined _MSC_VER
  15652. Need own alloca
  15653. #endif
  15654. _ACEOF
  15655. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  15656. $EGREP "Need own alloca" >/dev/null 2>&1; then :
  15657. gl_cv_rpl_alloca=yes
  15658. else
  15659. gl_cv_rpl_alloca=no
  15660. fi
  15661. rm -f conftest*
  15662. fi
  15663. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
  15664. $as_echo "$gl_cv_rpl_alloca" >&6; }
  15665. if test $gl_cv_rpl_alloca = yes; then
  15666. $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
  15667. ALLOCA_H=alloca.h
  15668. else
  15669. ALLOCA_H=
  15670. fi
  15671. else
  15672. ALLOCA_H=alloca.h
  15673. fi
  15674. if test -n "$ALLOCA_H"; then
  15675. GL_GENERATE_ALLOCA_H_TRUE=
  15676. GL_GENERATE_ALLOCA_H_FALSE='#'
  15677. else
  15678. GL_GENERATE_ALLOCA_H_TRUE='#'
  15679. GL_GENERATE_ALLOCA_H_FALSE=
  15680. fi
  15681. if test $ac_cv_working_alloca_h = yes; then
  15682. HAVE_ALLOCA_H=1
  15683. else
  15684. HAVE_ALLOCA_H=0
  15685. fi
  15686. if test $ac_cv_header_arpa_inet_h = yes; then
  15687. HAVE_ARPA_INET_H=1
  15688. else
  15689. HAVE_ARPA_INET_H=0
  15690. fi
  15691. if test $gl_cv_have_include_next = yes; then
  15692. gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
  15693. else
  15694. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
  15695. $as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
  15696. if ${gl_cv_next_arpa_inet_h+:} false; then :
  15697. $as_echo_n "(cached) " >&6
  15698. else
  15699. if test $ac_cv_header_arpa_inet_h = yes; then
  15700. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15701. /* end confdefs.h. */
  15702. #include <arpa/inet.h>
  15703. _ACEOF
  15704. case "$host_os" in
  15705. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  15706. *) gl_absname_cpp="$ac_cpp" ;;
  15707. esac
  15708. case "$host_os" in
  15709. mingw*)
  15710. gl_dirsep_regex='[/\\]'
  15711. ;;
  15712. *)
  15713. gl_dirsep_regex='\/'
  15714. ;;
  15715. esac
  15716. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  15717. gl_header_literal_regex=`echo 'arpa/inet.h' \
  15718. | sed -e "$gl_make_literal_regex_sed"`
  15719. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  15720. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  15721. s|^/[^/]|//&|
  15722. p
  15723. q
  15724. }'
  15725. gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  15726. sed -n "$gl_absolute_header_sed"`
  15727. gl_header=$gl_cv_absolute_arpa_inet_h
  15728. gl_cv_next_arpa_inet_h='"'$gl_header'"'
  15729. else
  15730. gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
  15731. fi
  15732. fi
  15733. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
  15734. $as_echo "$gl_cv_next_arpa_inet_h" >&6; }
  15735. fi
  15736. NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
  15737. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  15738. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  15739. gl_next_as_first_directive='<'arpa/inet.h'>'
  15740. else
  15741. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  15742. gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
  15743. fi
  15744. NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
  15745. if test $ac_cv_header_sys_socket_h = yes; then
  15746. HAVE_WS2TCPIP_H=0
  15747. else
  15748. if test $ac_cv_header_ws2tcpip_h = yes; then
  15749. HAVE_WS2TCPIP_H=1
  15750. else
  15751. HAVE_WS2TCPIP_H=0
  15752. fi
  15753. fi
  15754. if test "$ac_cv_header_winsock2_h" = yes; then
  15755. gl_LIBOBJS="$gl_LIBOBJS bind.$ac_objext"
  15756. fi
  15757. GNULIB_BIND=1
  15758. $as_echo "#define GNULIB_TEST_BIND 1" >>confdefs.h
  15759. if test $ac_cv_func_btowc = no; then
  15760. HAVE_BTOWC=0
  15761. else
  15762. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
  15763. $as_echo_n "checking whether btowc(0) is correct... " >&6; }
  15764. if ${gl_cv_func_btowc_nul+:} false; then :
  15765. $as_echo_n "(cached) " >&6
  15766. else
  15767. if test "$cross_compiling" = yes; then :
  15768. case "$host_os" in
  15769. # Guess no on Cygwin.
  15770. cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
  15771. # Guess yes on native Windows.
  15772. mingw*) gl_cv_func_btowc_nul="guessing yes" ;;
  15773. # Guess yes otherwise.
  15774. *) gl_cv_func_btowc_nul="guessing yes" ;;
  15775. esac
  15776. else
  15777. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15778. /* end confdefs.h. */
  15779. #include <wchar.h>
  15780. int main ()
  15781. {
  15782. if (btowc ('\0') != 0)
  15783. return 1;
  15784. return 0;
  15785. }
  15786. _ACEOF
  15787. if ac_fn_c_try_run "$LINENO"; then :
  15788. gl_cv_func_btowc_nul=yes
  15789. else
  15790. gl_cv_func_btowc_nul=no
  15791. fi
  15792. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  15793. conftest.$ac_objext conftest.beam conftest.$ac_ext
  15794. fi
  15795. fi
  15796. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
  15797. $as_echo "$gl_cv_func_btowc_nul" >&6; }
  15798. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
  15799. $as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
  15800. if ${gl_cv_func_btowc_eof+:} false; then :
  15801. $as_echo_n "(cached) " >&6
  15802. else
  15803. case "$host_os" in
  15804. # Guess no on IRIX.
  15805. irix*) gl_cv_func_btowc_eof="guessing no" ;;
  15806. # Guess yes on native Windows.
  15807. mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
  15808. # Guess yes otherwise.
  15809. *) gl_cv_func_btowc_eof="guessing yes" ;;
  15810. esac
  15811. if test $LOCALE_FR != none; then
  15812. if test "$cross_compiling" = yes; then :
  15813. :
  15814. else
  15815. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15816. /* end confdefs.h. */
  15817. #include <locale.h>
  15818. #include <stdio.h>
  15819. #include <wchar.h>
  15820. int main ()
  15821. {
  15822. if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
  15823. {
  15824. if (btowc (EOF) != WEOF)
  15825. return 1;
  15826. }
  15827. return 0;
  15828. }
  15829. _ACEOF
  15830. if ac_fn_c_try_run "$LINENO"; then :
  15831. gl_cv_func_btowc_eof=yes
  15832. else
  15833. gl_cv_func_btowc_eof=no
  15834. fi
  15835. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  15836. conftest.$ac_objext conftest.beam conftest.$ac_ext
  15837. fi
  15838. fi
  15839. fi
  15840. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
  15841. $as_echo "$gl_cv_func_btowc_eof" >&6; }
  15842. case "$gl_cv_func_btowc_nul" in
  15843. *yes) ;;
  15844. *) REPLACE_BTOWC=1 ;;
  15845. esac
  15846. case "$gl_cv_func_btowc_eof" in
  15847. *yes) ;;
  15848. *) REPLACE_BTOWC=1 ;;
  15849. esac
  15850. fi
  15851. if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
  15852. gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
  15853. :
  15854. fi
  15855. GNULIB_BTOWC=1
  15856. $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
  15857. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
  15858. $as_echo_n "checking for __builtin_expect... " >&6; }
  15859. if ${gl_cv___builtin_expect+:} false; then :
  15860. $as_echo_n "(cached) " >&6
  15861. else
  15862. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15863. /* end confdefs.h. */
  15864. int
  15865. main (int argc, char **argv)
  15866. {
  15867. argc = __builtin_expect (argc, 100);
  15868. return argv[argc != 100][0];
  15869. }
  15870. _ACEOF
  15871. if ac_fn_c_try_link "$LINENO"; then :
  15872. gl_cv___builtin_expect=yes
  15873. else
  15874. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15875. /* end confdefs.h. */
  15876. #include <builtins.h>
  15877. int
  15878. main (int argc, char **argv)
  15879. {
  15880. argc = __builtin_expect (argc, 100);
  15881. return argv[argc != 100][0];
  15882. }
  15883. _ACEOF
  15884. if ac_fn_c_try_link "$LINENO"; then :
  15885. gl_cv___builtin_expect="in <builtins.h>"
  15886. else
  15887. gl_cv___builtin_expect=no
  15888. fi
  15889. rm -f core conftest.err conftest.$ac_objext \
  15890. conftest$ac_exeext conftest.$ac_ext
  15891. fi
  15892. rm -f core conftest.err conftest.$ac_objext \
  15893. conftest$ac_exeext conftest.$ac_ext
  15894. fi
  15895. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
  15896. $as_echo "$gl_cv___builtin_expect" >&6; }
  15897. if test "$gl_cv___builtin_expect" = yes; then
  15898. $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
  15899. elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
  15900. $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
  15901. fi
  15902. if test $ac_cv_func_canonicalize_file_name = no; then
  15903. HAVE_CANONICALIZE_FILE_NAME=0
  15904. if test $ac_cv_func_realpath = no; then
  15905. HAVE_REALPATH=0
  15906. else
  15907. case "$gl_cv_func_realpath_works" in
  15908. *yes) ;;
  15909. *) REPLACE_REALPATH=1 ;;
  15910. esac
  15911. fi
  15912. else
  15913. case "$gl_cv_func_realpath_works" in
  15914. *yes)
  15915. ;;
  15916. *)
  15917. REPLACE_CANONICALIZE_FILE_NAME=1
  15918. REPLACE_REALPATH=1
  15919. ;;
  15920. esac
  15921. fi
  15922. if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
  15923. gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
  15924. fi
  15925. cat >>confdefs.h <<_ACEOF
  15926. #define GNULIB_CANONICALIZE_LGPL 1
  15927. _ACEOF
  15928. GNULIB_CANONICALIZE_FILE_NAME=1
  15929. $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
  15930. GNULIB_REALPATH=1
  15931. $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
  15932. GNULIB_CHDIR=1
  15933. $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
  15934. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system supports file names of any length" >&5
  15935. $as_echo_n "checking whether this system supports file names of any length... " >&6; }
  15936. if ${gl_cv_have_unlimited_file_name_length+:} false; then :
  15937. $as_echo_n "(cached) " >&6
  15938. else
  15939. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15940. /* end confdefs.h. */
  15941. /* Arrange to define PATH_MAX, like "pathmax.h" does. */
  15942. #if HAVE_UNISTD_H
  15943. # include <unistd.h>
  15944. #endif
  15945. #include <limits.h>
  15946. #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
  15947. # include <sys/param.h>
  15948. #endif
  15949. #if !defined PATH_MAX && defined MAXPATHLEN
  15950. # define PATH_MAX MAXPATHLEN
  15951. #endif
  15952. #ifdef __hpux
  15953. # undef PATH_MAX
  15954. # define PATH_MAX 1024
  15955. #endif
  15956. #if defined _WIN32 && ! defined __CYGWIN__
  15957. # undef PATH_MAX
  15958. # define PATH_MAX 260
  15959. #endif
  15960. #ifdef PATH_MAX
  15961. have_arbitrary_file_name_length_limit
  15962. #endif
  15963. _ACEOF
  15964. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  15965. $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
  15966. gl_cv_have_unlimited_file_name_length=no
  15967. else
  15968. gl_cv_have_unlimited_file_name_length=yes
  15969. fi
  15970. rm -f conftest*
  15971. fi
  15972. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_unlimited_file_name_length" >&5
  15973. $as_echo "$gl_cv_have_unlimited_file_name_length" >&6; }
  15974. if test $gl_cv_have_unlimited_file_name_length = no; then
  15975. gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
  15976. :
  15977. fi
  15978. if test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1; then
  15979. gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
  15980. fi
  15981. if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then
  15982. gl_LIBOBJS="$gl_LIBOBJS fchown-stub.$ac_objext"
  15983. fi
  15984. GNULIB_CHOWN=1
  15985. $as_echo "#define GNULIB_TEST_CHOWN 1" >>confdefs.h
  15986. # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
  15987. # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
  15988. # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
  15989. # programs in the package would end up linked with that potentially-shared
  15990. # library, inducing unnecessary run-time overhead.
  15991. LIB_CLOCK_GETTIME=
  15992. gl_saved_libs=$LIBS
  15993. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
  15994. $as_echo_n "checking for library containing clock_gettime... " >&6; }
  15995. if ${ac_cv_search_clock_gettime+:} false; then :
  15996. $as_echo_n "(cached) " >&6
  15997. else
  15998. ac_func_search_save_LIBS=$LIBS
  15999. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16000. /* end confdefs.h. */
  16001. /* Override any GCC internal prototype to avoid an error.
  16002. Use char because int might match the return type of a GCC
  16003. builtin and then its argument prototype would still apply. */
  16004. #ifdef __cplusplus
  16005. extern "C"
  16006. #endif
  16007. char clock_gettime ();
  16008. int
  16009. main ()
  16010. {
  16011. return clock_gettime ();
  16012. ;
  16013. return 0;
  16014. }
  16015. _ACEOF
  16016. for ac_lib in '' rt posix4; do
  16017. if test -z "$ac_lib"; then
  16018. ac_res="none required"
  16019. else
  16020. ac_res=-l$ac_lib
  16021. LIBS="-l$ac_lib $ac_func_search_save_LIBS"
  16022. fi
  16023. if ac_fn_c_try_link "$LINENO"; then :
  16024. ac_cv_search_clock_gettime=$ac_res
  16025. fi
  16026. rm -f core conftest.err conftest.$ac_objext \
  16027. conftest$ac_exeext
  16028. if ${ac_cv_search_clock_gettime+:} false; then :
  16029. break
  16030. fi
  16031. done
  16032. if ${ac_cv_search_clock_gettime+:} false; then :
  16033. else
  16034. ac_cv_search_clock_gettime=no
  16035. fi
  16036. rm conftest.$ac_ext
  16037. LIBS=$ac_func_search_save_LIBS
  16038. fi
  16039. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
  16040. $as_echo "$ac_cv_search_clock_gettime" >&6; }
  16041. ac_res=$ac_cv_search_clock_gettime
  16042. if test "$ac_res" != no; then :
  16043. test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  16044. test "$ac_cv_search_clock_gettime" = "none required" ||
  16045. LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
  16046. fi
  16047. for ac_func in clock_gettime clock_settime
  16048. do :
  16049. as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
  16050. ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
  16051. if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
  16052. cat >>confdefs.h <<_ACEOF
  16053. #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  16054. _ACEOF
  16055. fi
  16056. done
  16057. LIBS=$gl_saved_libs
  16058. $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
  16059. if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
  16060. REPLACE_CLOSE=1
  16061. fi
  16062. if test $ac_cv_header_sys_socket_h != yes; then
  16063. for ac_header in winsock2.h
  16064. do :
  16065. ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
  16066. if test "x$ac_cv_header_winsock2_h" = xyes; then :
  16067. cat >>confdefs.h <<_ACEOF
  16068. #define HAVE_WINSOCK2_H 1
  16069. _ACEOF
  16070. fi
  16071. done
  16072. fi
  16073. if test "$ac_cv_header_winsock2_h" = yes; then
  16074. HAVE_WINSOCK2_H=1
  16075. UNISTD_H_HAVE_WINSOCK2_H=1
  16076. SYS_IOCTL_H_HAVE_WINSOCK2_H=1
  16077. else
  16078. HAVE_WINSOCK2_H=0
  16079. fi
  16080. if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
  16081. REPLACE_CLOSE=1
  16082. fi
  16083. if test $REPLACE_CLOSE = 0; then
  16084. if test $ac_cv_func_fchdir = no; then
  16085. HAVE_FCHDIR=0
  16086. fi
  16087. if test $HAVE_FCHDIR = 0; then
  16088. REPLACE_CLOSE=1
  16089. fi
  16090. fi
  16091. if test $REPLACE_CLOSE = 1; then
  16092. gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
  16093. fi
  16094. GNULIB_CLOSE=1
  16095. $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
  16096. for ac_func in closedir
  16097. do :
  16098. ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
  16099. if test "x$ac_cv_func_closedir" = xyes; then :
  16100. cat >>confdefs.h <<_ACEOF
  16101. #define HAVE_CLOSEDIR 1
  16102. _ACEOF
  16103. fi
  16104. done
  16105. if test $ac_cv_func_closedir = no; then
  16106. HAVE_CLOSEDIR=0
  16107. fi
  16108. if test $ac_cv_func_fchdir = no; then
  16109. HAVE_FCHDIR=0
  16110. fi
  16111. if test $HAVE_FCHDIR = 0; then
  16112. if test $HAVE_CLOSEDIR = 1; then
  16113. REPLACE_CLOSEDIR=1
  16114. fi
  16115. fi
  16116. case $host_os,$HAVE_CLOSEDIR in
  16117. os2*,1)
  16118. REPLACE_CLOSEDIR=1;;
  16119. esac
  16120. if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
  16121. gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
  16122. fi
  16123. GNULIB_CLOSEDIR=1
  16124. $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
  16125. if test "$ac_cv_header_winsock2_h" = yes; then
  16126. gl_LIBOBJS="$gl_LIBOBJS connect.$ac_objext"
  16127. fi
  16128. GNULIB_CONNECT=1
  16129. $as_echo "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
  16130. if test $gl_cv_have_include_next = yes; then
  16131. gl_cv_next_ctype_h='<'ctype.h'>'
  16132. else
  16133. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
  16134. $as_echo_n "checking absolute name of <ctype.h>... " >&6; }
  16135. if ${gl_cv_next_ctype_h+:} false; then :
  16136. $as_echo_n "(cached) " >&6
  16137. else
  16138. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16139. /* end confdefs.h. */
  16140. #include <ctype.h>
  16141. _ACEOF
  16142. case "$host_os" in
  16143. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  16144. *) gl_absname_cpp="$ac_cpp" ;;
  16145. esac
  16146. case "$host_os" in
  16147. mingw*)
  16148. gl_dirsep_regex='[/\\]'
  16149. ;;
  16150. *)
  16151. gl_dirsep_regex='\/'
  16152. ;;
  16153. esac
  16154. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  16155. gl_header_literal_regex=`echo 'ctype.h' \
  16156. | sed -e "$gl_make_literal_regex_sed"`
  16157. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  16158. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  16159. s|^/[^/]|//&|
  16160. p
  16161. q
  16162. }'
  16163. gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  16164. sed -n "$gl_absolute_header_sed"`
  16165. gl_header=$gl_cv_absolute_ctype_h
  16166. gl_cv_next_ctype_h='"'$gl_header'"'
  16167. fi
  16168. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
  16169. $as_echo "$gl_cv_next_ctype_h" >&6; }
  16170. fi
  16171. NEXT_CTYPE_H=$gl_cv_next_ctype_h
  16172. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  16173. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  16174. gl_next_as_first_directive='<'ctype.h'>'
  16175. else
  16176. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  16177. gl_next_as_first_directive=$gl_cv_next_ctype_h
  16178. fi
  16179. NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
  16180. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
  16181. $as_echo_n "checking for d_ino member in directory struct... " >&6; }
  16182. if ${gl_cv_struct_dirent_d_ino+:} false; then :
  16183. $as_echo_n "(cached) " >&6
  16184. else
  16185. if test "$cross_compiling" = yes; then :
  16186. case "$host_os" in
  16187. # Guess yes on glibc systems with Linux kernel.
  16188. linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
  16189. # Guess yes on musl systems with Linux kernel.
  16190. linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
  16191. # Guess no on native Windows.
  16192. mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;;
  16193. # If we don't know, obey --enable-cross-guesses.
  16194. *) gl_cv_struct_dirent_d_ino="$gl_cross_guess_normal" ;;
  16195. esac
  16196. else
  16197. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16198. /* end confdefs.h. */
  16199. #include <sys/types.h>
  16200. #include <sys/stat.h>
  16201. #include <dirent.h>
  16202. int
  16203. main ()
  16204. {
  16205. DIR *dp = opendir (".");
  16206. struct dirent *e;
  16207. struct stat st;
  16208. if (! dp)
  16209. return 1;
  16210. e = readdir (dp);
  16211. if (! e)
  16212. { closedir (dp); return 2; }
  16213. if (lstat (e->d_name, &st) != 0)
  16214. { closedir (dp); return 3; }
  16215. if (e->d_ino != st.st_ino)
  16216. { closedir (dp); return 4; }
  16217. closedir (dp);
  16218. return 0;
  16219. ;
  16220. return 0;
  16221. }
  16222. _ACEOF
  16223. if ac_fn_c_try_run "$LINENO"; then :
  16224. gl_cv_struct_dirent_d_ino=yes
  16225. else
  16226. gl_cv_struct_dirent_d_ino=no
  16227. fi
  16228. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  16229. conftest.$ac_objext conftest.beam conftest.$ac_ext
  16230. fi
  16231. fi
  16232. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
  16233. $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
  16234. case "$gl_cv_struct_dirent_d_ino" in
  16235. *yes)
  16236. $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
  16237. ;;
  16238. esac
  16239. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
  16240. $as_echo_n "checking for d_type member in directory struct... " >&6; }
  16241. if ${gl_cv_struct_dirent_d_type+:} false; then :
  16242. $as_echo_n "(cached) " >&6
  16243. else
  16244. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16245. /* end confdefs.h. */
  16246. #include <sys/types.h>
  16247. #include <dirent.h>
  16248. int
  16249. main ()
  16250. {
  16251. struct dirent dp; dp.d_type = 0;
  16252. ;
  16253. return 0;
  16254. }
  16255. _ACEOF
  16256. if ac_fn_c_try_link "$LINENO"; then :
  16257. gl_cv_struct_dirent_d_type=yes
  16258. else
  16259. gl_cv_struct_dirent_d_type=no
  16260. fi
  16261. rm -f core conftest.err conftest.$ac_objext \
  16262. conftest$ac_exeext conftest.$ac_ext
  16263. fi
  16264. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
  16265. $as_echo "$gl_cv_struct_dirent_d_type" >&6; }
  16266. if test $gl_cv_struct_dirent_d_type = yes; then
  16267. $as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
  16268. fi
  16269. if test $gl_cv_have_include_next = yes; then
  16270. gl_cv_next_dirent_h='<'dirent.h'>'
  16271. else
  16272. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
  16273. $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
  16274. if ${gl_cv_next_dirent_h+:} false; then :
  16275. $as_echo_n "(cached) " >&6
  16276. else
  16277. if test $ac_cv_header_dirent_h = yes; then
  16278. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16279. /* end confdefs.h. */
  16280. #include <dirent.h>
  16281. _ACEOF
  16282. case "$host_os" in
  16283. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  16284. *) gl_absname_cpp="$ac_cpp" ;;
  16285. esac
  16286. case "$host_os" in
  16287. mingw*)
  16288. gl_dirsep_regex='[/\\]'
  16289. ;;
  16290. *)
  16291. gl_dirsep_regex='\/'
  16292. ;;
  16293. esac
  16294. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  16295. gl_header_literal_regex=`echo 'dirent.h' \
  16296. | sed -e "$gl_make_literal_regex_sed"`
  16297. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  16298. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  16299. s|^/[^/]|//&|
  16300. p
  16301. q
  16302. }'
  16303. gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  16304. sed -n "$gl_absolute_header_sed"`
  16305. gl_header=$gl_cv_absolute_dirent_h
  16306. gl_cv_next_dirent_h='"'$gl_header'"'
  16307. else
  16308. gl_cv_next_dirent_h='<'dirent.h'>'
  16309. fi
  16310. fi
  16311. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
  16312. $as_echo "$gl_cv_next_dirent_h" >&6; }
  16313. fi
  16314. NEXT_DIRENT_H=$gl_cv_next_dirent_h
  16315. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  16316. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  16317. gl_next_as_first_directive='<'dirent.h'>'
  16318. else
  16319. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  16320. gl_next_as_first_directive=$gl_cv_next_dirent_h
  16321. fi
  16322. NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
  16323. if test $ac_cv_header_dirent_h = yes; then
  16324. HAVE_DIRENT_H=1
  16325. else
  16326. HAVE_DIRENT_H=0
  16327. fi
  16328. for ac_func in dirfd
  16329. do :
  16330. ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
  16331. if test "x$ac_cv_func_dirfd" = xyes; then :
  16332. cat >>confdefs.h <<_ACEOF
  16333. #define HAVE_DIRFD 1
  16334. _ACEOF
  16335. fi
  16336. done
  16337. ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
  16338. #include <dirent.h>
  16339. "
  16340. if test "x$ac_cv_have_decl_dirfd" = xyes; then :
  16341. ac_have_decl=1
  16342. else
  16343. ac_have_decl=0
  16344. fi
  16345. cat >>confdefs.h <<_ACEOF
  16346. #define HAVE_DECL_DIRFD $ac_have_decl
  16347. _ACEOF
  16348. if test $ac_cv_have_decl_dirfd = no; then
  16349. HAVE_DECL_DIRFD=0
  16350. fi
  16351. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
  16352. $as_echo_n "checking whether dirfd is a macro... " >&6; }
  16353. if ${gl_cv_func_dirfd_macro+:} false; then :
  16354. $as_echo_n "(cached) " >&6
  16355. else
  16356. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16357. /* end confdefs.h. */
  16358. #include <sys/types.h>
  16359. #include <dirent.h>
  16360. #ifdef dirfd
  16361. dirent_header_defines_dirfd
  16362. #endif
  16363. _ACEOF
  16364. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  16365. $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
  16366. gl_cv_func_dirfd_macro=yes
  16367. else
  16368. gl_cv_func_dirfd_macro=no
  16369. fi
  16370. rm -f conftest*
  16371. fi
  16372. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
  16373. $as_echo "$gl_cv_func_dirfd_macro" >&6; }
  16374. # Use the replacement if we have no function or macro with that name,
  16375. # or if OS/2 kLIBC whose dirfd() does not work.
  16376. # Replace only if the system declares dirfd already.
  16377. case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
  16378. no,no,*,yes | *,*,os2*,yes)
  16379. REPLACE_DIRFD=1
  16380. $as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
  16381. ;;
  16382. esac
  16383. if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
  16384. || test $REPLACE_DIRFD = 1; then
  16385. gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
  16386. { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
  16387. $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
  16388. if ${gl_cv_sys_dir_fd_member_name+:} false; then :
  16389. $as_echo_n "(cached) " >&6
  16390. else
  16391. dirfd_save_CFLAGS=$CFLAGS
  16392. for ac_expr in d_fd dd_fd; do
  16393. CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
  16394. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16395. /* end confdefs.h. */
  16396. #include <sys/types.h>
  16397. #include <dirent.h>
  16398. int
  16399. main ()
  16400. {
  16401. DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
  16402. ;
  16403. return 0;
  16404. }
  16405. _ACEOF
  16406. if ac_fn_c_try_compile "$LINENO"; then :
  16407. dir_fd_found=yes
  16408. fi
  16409. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  16410. CFLAGS=$dirfd_save_CFLAGS
  16411. test "$dir_fd_found" = yes && break
  16412. done
  16413. test "$dir_fd_found" = yes || ac_expr=no_such_member
  16414. gl_cv_sys_dir_fd_member_name=$ac_expr
  16415. fi
  16416. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
  16417. $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
  16418. if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
  16419. cat >>confdefs.h <<_ACEOF
  16420. #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
  16421. _ACEOF
  16422. fi
  16423. fi
  16424. GNULIB_DIRFD=1
  16425. $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
  16426. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
  16427. $as_echo_n "checking whether // is distinct from /... " >&6; }
  16428. if ${gl_cv_double_slash_root+:} false; then :
  16429. $as_echo_n "(cached) " >&6
  16430. else
  16431. if test x"$cross_compiling" = xyes ; then
  16432. # When cross-compiling, there is no way to tell whether // is special
  16433. # short of a list of hosts. However, the only known hosts to date
  16434. # that have a distinct // are Apollo DomainOS (too old to port to),
  16435. # Cygwin, and z/OS. If anyone knows of another system for which // has
  16436. # special semantics and is distinct from /, please report it to
  16437. # <bug-gnulib@gnu.org>.
  16438. case $host in
  16439. *-cygwin | i370-ibm-openedition)
  16440. gl_cv_double_slash_root=yes ;;
  16441. *)
  16442. # Be optimistic and assume that / and // are the same when we
  16443. # don't know.
  16444. gl_cv_double_slash_root='unknown, assuming no' ;;
  16445. esac
  16446. else
  16447. set x `ls -di / // 2>/dev/null`
  16448. if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
  16449. gl_cv_double_slash_root=no
  16450. else
  16451. gl_cv_double_slash_root=yes
  16452. fi
  16453. fi
  16454. fi
  16455. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
  16456. $as_echo "$gl_cv_double_slash_root" >&6; }
  16457. if test "$gl_cv_double_slash_root" = yes; then
  16458. $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
  16459. fi
  16460. if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
  16461. REPLACE_DUP=1
  16462. fi
  16463. if test $ac_cv_func_fchdir = no; then
  16464. HAVE_FCHDIR=0
  16465. fi
  16466. if test $HAVE_FCHDIR = 0; then
  16467. REPLACE_DUP=1
  16468. fi
  16469. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
  16470. $as_echo_n "checking whether dup works... " >&6; }
  16471. if ${gl_cv_func_dup_works+:} false; then :
  16472. $as_echo_n "(cached) " >&6
  16473. else
  16474. if test "$cross_compiling" = yes; then :
  16475. case "$host_os" in
  16476. # Guess no on native Windows.
  16477. mingw*) gl_cv_func_dup_works="guessing no" ;;
  16478. *) gl_cv_func_dup_works="guessing yes" ;;
  16479. esac
  16480. else
  16481. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16482. /* end confdefs.h. */
  16483. #include <unistd.h>
  16484. #include <fcntl.h>
  16485. #include <errno.h>
  16486. $gl_mda_defines
  16487. int
  16488. main ()
  16489. {
  16490. /* On OS/2 kLIBC, dup does not work on a directory fd. */
  16491. int fd = open (".", O_RDONLY);
  16492. return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
  16493. ;
  16494. return 0;
  16495. }
  16496. _ACEOF
  16497. if ac_fn_c_try_run "$LINENO"; then :
  16498. gl_cv_func_dup_works=yes
  16499. else
  16500. gl_cv_func_dup_works=no
  16501. fi
  16502. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  16503. conftest.$ac_objext conftest.beam conftest.$ac_ext
  16504. fi
  16505. fi
  16506. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
  16507. $as_echo "$gl_cv_func_dup_works" >&6; }
  16508. case "$gl_cv_func_dup_works" in
  16509. *yes) ;;
  16510. *)
  16511. REPLACE_DUP=1
  16512. ;;
  16513. esac
  16514. if test $REPLACE_DUP = 1; then
  16515. gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
  16516. :
  16517. fi
  16518. GNULIB_DUP=1
  16519. $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
  16520. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
  16521. $as_echo_n "checking whether dup2 works... " >&6; }
  16522. if ${gl_cv_func_dup2_works+:} false; then :
  16523. $as_echo_n "(cached) " >&6
  16524. else
  16525. if test "$cross_compiling" = yes; then :
  16526. case "$host_os" in
  16527. mingw*) # on this platform, dup2 always returns 0 for success
  16528. gl_cv_func_dup2_works="guessing no" ;;
  16529. cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
  16530. gl_cv_func_dup2_works="guessing no" ;;
  16531. aix* | freebsd*)
  16532. # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
  16533. # not EBADF.
  16534. gl_cv_func_dup2_works="guessing no" ;;
  16535. haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
  16536. gl_cv_func_dup2_works="guessing no" ;;
  16537. *-android*) # implemented using dup3(), which fails if oldfd == newfd
  16538. gl_cv_func_dup2_works="guessing no" ;;
  16539. os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
  16540. gl_cv_func_dup2_works="guessing no" ;;
  16541. *) gl_cv_func_dup2_works="guessing yes" ;;
  16542. esac
  16543. else
  16544. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16545. /* end confdefs.h. */
  16546. #include <errno.h>
  16547. #include <fcntl.h>
  16548. #include <limits.h>
  16549. #include <sys/resource.h>
  16550. #include <unistd.h>
  16551. $gl_mda_defines
  16552. #ifndef RLIM_SAVED_CUR
  16553. # define RLIM_SAVED_CUR RLIM_INFINITY
  16554. #endif
  16555. #ifndef RLIM_SAVED_MAX
  16556. # define RLIM_SAVED_MAX RLIM_INFINITY
  16557. #endif
  16558. int
  16559. main ()
  16560. {
  16561. int result = 0;
  16562. int bad_fd = INT_MAX;
  16563. struct rlimit rlim;
  16564. if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
  16565. && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
  16566. && rlim.rlim_cur != RLIM_INFINITY
  16567. && rlim.rlim_cur != RLIM_SAVED_MAX
  16568. && rlim.rlim_cur != RLIM_SAVED_CUR)
  16569. bad_fd = rlim.rlim_cur;
  16570. #ifdef FD_CLOEXEC
  16571. if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
  16572. result |= 1;
  16573. #endif
  16574. if (dup2 (1, 1) != 1)
  16575. result |= 2;
  16576. #ifdef FD_CLOEXEC
  16577. if (fcntl (1, F_GETFD) != FD_CLOEXEC)
  16578. result |= 4;
  16579. #endif
  16580. close (0);
  16581. if (dup2 (0, 0) != -1)
  16582. result |= 8;
  16583. /* Many gnulib modules require POSIX conformance of EBADF. */
  16584. if (dup2 (2, bad_fd) == -1 && errno != EBADF)
  16585. result |= 16;
  16586. /* Flush out some cygwin core dumps. */
  16587. if (dup2 (2, -1) != -1 || errno != EBADF)
  16588. result |= 32;
  16589. dup2 (2, 255);
  16590. dup2 (2, 256);
  16591. /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
  16592. {
  16593. int fd = open (".", O_RDONLY);
  16594. if (fd == -1)
  16595. result |= 64;
  16596. else if (dup2 (fd, fd + 1) == -1)
  16597. result |= 128;
  16598. close (fd);
  16599. }
  16600. return result;
  16601. ;
  16602. return 0;
  16603. }
  16604. _ACEOF
  16605. if ac_fn_c_try_run "$LINENO"; then :
  16606. gl_cv_func_dup2_works=yes
  16607. else
  16608. gl_cv_func_dup2_works=no
  16609. fi
  16610. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  16611. conftest.$ac_objext conftest.beam conftest.$ac_ext
  16612. fi
  16613. fi
  16614. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
  16615. $as_echo "$gl_cv_func_dup2_works" >&6; }
  16616. case "$gl_cv_func_dup2_works" in
  16617. *yes) ;;
  16618. *)
  16619. REPLACE_DUP2=1
  16620. for ac_func in setdtablesize
  16621. do :
  16622. ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
  16623. if test "x$ac_cv_func_setdtablesize" = xyes; then :
  16624. cat >>confdefs.h <<_ACEOF
  16625. #define HAVE_SETDTABLESIZE 1
  16626. _ACEOF
  16627. fi
  16628. done
  16629. ;;
  16630. esac
  16631. if test $ac_cv_func_fchdir = no; then
  16632. HAVE_FCHDIR=0
  16633. fi
  16634. if test $HAVE_FCHDIR = 0; then
  16635. REPLACE_DUP2=1
  16636. fi
  16637. if test $REPLACE_DUP2 = 1; then
  16638. gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
  16639. fi
  16640. GNULIB_DUP2=1
  16641. $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
  16642. GNULIB_ENVIRON=1
  16643. $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
  16644. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
  16645. $as_echo_n "checking for error_at_line... " >&6; }
  16646. if ${ac_cv_lib_error_at_line+:} false; then :
  16647. $as_echo_n "(cached) " >&6
  16648. else
  16649. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16650. /* end confdefs.h. */
  16651. #include <error.h>
  16652. int
  16653. main ()
  16654. {
  16655. error_at_line (0, 0, "", 0, "an error occurred");
  16656. ;
  16657. return 0;
  16658. }
  16659. _ACEOF
  16660. if ac_fn_c_try_link "$LINENO"; then :
  16661. ac_cv_lib_error_at_line=yes
  16662. else
  16663. ac_cv_lib_error_at_line=no
  16664. fi
  16665. rm -f core conftest.err conftest.$ac_objext \
  16666. conftest$ac_exeext conftest.$ac_ext
  16667. fi
  16668. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
  16669. $as_echo "$ac_cv_lib_error_at_line" >&6; }
  16670. if test $ac_cv_lib_error_at_line = no; then
  16671. gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
  16672. :
  16673. fi
  16674. if test $ac_cv_have_decl_fchdir = no; then
  16675. HAVE_DECL_FCHDIR=0
  16676. fi
  16677. if test $HAVE_FCHDIR = 0; then
  16678. gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
  16679. :
  16680. $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
  16681. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
  16682. $as_echo_n "checking whether open can visit directories... " >&6; }
  16683. if ${gl_cv_func_open_directory_works+:} false; then :
  16684. $as_echo_n "(cached) " >&6
  16685. else
  16686. if test "$cross_compiling" = yes; then :
  16687. case "$host_os" in
  16688. # Guess yes on Linux systems.
  16689. linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
  16690. # Guess yes on glibc systems.
  16691. *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
  16692. # Guess no on native Windows.
  16693. mingw*) gl_cv_func_open_directory_works="guessing no" ;;
  16694. # If we don't know, obey --enable-cross-guesses.
  16695. *) gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;;
  16696. esac
  16697. else
  16698. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16699. /* end confdefs.h. */
  16700. #include <fcntl.h>
  16701. $gl_mda_defines
  16702. int
  16703. main ()
  16704. {
  16705. return open(".", O_RDONLY) < 0;
  16706. ;
  16707. return 0;
  16708. }
  16709. _ACEOF
  16710. if ac_fn_c_try_run "$LINENO"; then :
  16711. gl_cv_func_open_directory_works=yes
  16712. else
  16713. gl_cv_func_open_directory_works=no
  16714. fi
  16715. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  16716. conftest.$ac_objext conftest.beam conftest.$ac_ext
  16717. fi
  16718. fi
  16719. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
  16720. $as_echo "$gl_cv_func_open_directory_works" >&6; }
  16721. case "$gl_cv_func_open_directory_works" in
  16722. *yes) ;;
  16723. *)
  16724. $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
  16725. ;;
  16726. esac
  16727. fi
  16728. GNULIB_FCHDIR=1
  16729. $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
  16730. if test $ac_cv_func_fcntl = no; then
  16731. if test $ac_cv_func_fcntl = no; then
  16732. HAVE_FCNTL=0
  16733. else
  16734. REPLACE_FCNTL=1
  16735. fi
  16736. else
  16737. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
  16738. $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
  16739. if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
  16740. $as_echo_n "(cached) " >&6
  16741. else
  16742. if test "$cross_compiling" = yes; then :
  16743. case $host_os in
  16744. aix* | cygwin* | haiku*)
  16745. gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
  16746. *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
  16747. esac
  16748. else
  16749. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16750. /* end confdefs.h. */
  16751. #include <errno.h>
  16752. #include <fcntl.h>
  16753. #include <limits.h>
  16754. #include <sys/resource.h>
  16755. #include <unistd.h>
  16756. $gl_mda_defines
  16757. #ifndef RLIM_SAVED_CUR
  16758. # define RLIM_SAVED_CUR RLIM_INFINITY
  16759. #endif
  16760. #ifndef RLIM_SAVED_MAX
  16761. # define RLIM_SAVED_MAX RLIM_INFINITY
  16762. #endif
  16763. int
  16764. main ()
  16765. {
  16766. int result = 0;
  16767. int bad_fd = INT_MAX;
  16768. struct rlimit rlim;
  16769. if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
  16770. && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
  16771. && rlim.rlim_cur != RLIM_INFINITY
  16772. && rlim.rlim_cur != RLIM_SAVED_MAX
  16773. && rlim.rlim_cur != RLIM_SAVED_CUR)
  16774. bad_fd = rlim.rlim_cur;
  16775. if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
  16776. if (errno != EINVAL) result |= 2;
  16777. if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
  16778. if (errno != EINVAL) result |= 8;
  16779. /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
  16780. {
  16781. int fd;
  16782. fd = open (".", O_RDONLY);
  16783. if (fd == -1)
  16784. result |= 16;
  16785. else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
  16786. result |= 32;
  16787. close (fd);
  16788. }
  16789. return result;
  16790. ;
  16791. return 0;
  16792. }
  16793. _ACEOF
  16794. if ac_fn_c_try_run "$LINENO"; then :
  16795. gl_cv_func_fcntl_f_dupfd_works=yes
  16796. else
  16797. gl_cv_func_fcntl_f_dupfd_works=no
  16798. fi
  16799. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  16800. conftest.$ac_objext conftest.beam conftest.$ac_ext
  16801. fi
  16802. fi
  16803. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
  16804. $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
  16805. case $gl_cv_func_fcntl_f_dupfd_works in
  16806. *yes) ;;
  16807. *)
  16808. if test $ac_cv_func_fcntl = no; then
  16809. HAVE_FCNTL=0
  16810. else
  16811. REPLACE_FCNTL=1
  16812. fi
  16813. $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
  16814. ;;
  16815. esac
  16816. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
  16817. $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
  16818. if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
  16819. $as_echo_n "(cached) " >&6
  16820. else
  16821. if test "$cross_compiling" = yes; then :
  16822. case "$host_os" in
  16823. # Guess no on NetBSD.
  16824. netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
  16825. *) gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
  16826. esac
  16827. else
  16828. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16829. /* end confdefs.h. */
  16830. #include <fcntl.h>
  16831. #include <unistd.h>
  16832. int main (int argc, char *argv[])
  16833. {
  16834. if (argc == 1)
  16835. /* parent process */
  16836. {
  16837. if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
  16838. return 1;
  16839. return execl ("./conftest", "./conftest", "child", NULL);
  16840. }
  16841. else
  16842. /* child process */
  16843. return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
  16844. }
  16845. _ACEOF
  16846. if ac_fn_c_try_run "$LINENO"; then :
  16847. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16848. /* end confdefs.h. */
  16849. #ifdef __linux__
  16850. /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
  16851. it to support the semantics on older kernels that failed with EINVAL. */
  16852. choke me
  16853. #endif
  16854. int
  16855. main ()
  16856. {
  16857. ;
  16858. return 0;
  16859. }
  16860. _ACEOF
  16861. if ac_fn_c_try_compile "$LINENO"; then :
  16862. gl_cv_func_fcntl_f_dupfd_cloexec=yes
  16863. else
  16864. gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
  16865. fi
  16866. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  16867. else
  16868. gl_cv_func_fcntl_f_dupfd_cloexec=no
  16869. fi
  16870. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  16871. conftest.$ac_objext conftest.beam conftest.$ac_ext
  16872. fi
  16873. fi
  16874. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
  16875. $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
  16876. case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
  16877. *yes) ;;
  16878. *)
  16879. if test $ac_cv_func_fcntl = no; then
  16880. HAVE_FCNTL=0
  16881. else
  16882. REPLACE_FCNTL=1
  16883. fi
  16884. ;;
  16885. esac
  16886. fi
  16887. if test $ac_cv_func_fchdir = no; then
  16888. HAVE_FCHDIR=0
  16889. fi
  16890. if test $HAVE_FCHDIR = 0; then
  16891. if test $ac_cv_func_fcntl = no; then
  16892. HAVE_FCNTL=0
  16893. else
  16894. REPLACE_FCNTL=1
  16895. fi
  16896. fi
  16897. if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
  16898. gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
  16899. fi
  16900. GNULIB_FCNTL=1
  16901. $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
  16902. if test $gl_cv_have_include_next = yes; then
  16903. gl_cv_next_fcntl_h='<'fcntl.h'>'
  16904. else
  16905. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
  16906. $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
  16907. if ${gl_cv_next_fcntl_h+:} false; then :
  16908. $as_echo_n "(cached) " >&6
  16909. else
  16910. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16911. /* end confdefs.h. */
  16912. #include <fcntl.h>
  16913. _ACEOF
  16914. case "$host_os" in
  16915. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  16916. *) gl_absname_cpp="$ac_cpp" ;;
  16917. esac
  16918. case "$host_os" in
  16919. mingw*)
  16920. gl_dirsep_regex='[/\\]'
  16921. ;;
  16922. *)
  16923. gl_dirsep_regex='\/'
  16924. ;;
  16925. esac
  16926. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  16927. gl_header_literal_regex=`echo 'fcntl.h' \
  16928. | sed -e "$gl_make_literal_regex_sed"`
  16929. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  16930. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  16931. s|^/[^/]|//&|
  16932. p
  16933. q
  16934. }'
  16935. gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  16936. sed -n "$gl_absolute_header_sed"`
  16937. gl_header=$gl_cv_absolute_fcntl_h
  16938. gl_cv_next_fcntl_h='"'$gl_header'"'
  16939. fi
  16940. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
  16941. $as_echo "$gl_cv_next_fcntl_h" >&6; }
  16942. fi
  16943. NEXT_FCNTL_H=$gl_cv_next_fcntl_h
  16944. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  16945. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  16946. gl_next_as_first_directive='<'fcntl.h'>'
  16947. else
  16948. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  16949. gl_next_as_first_directive=$gl_cv_next_fcntl_h
  16950. fi
  16951. NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
  16952. cat >>confdefs.h <<_ACEOF
  16953. #define GNULIB_FD_SAFER_FLAG 1
  16954. _ACEOF
  16955. ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
  16956. #include <dirent.h>
  16957. "
  16958. if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
  16959. ac_have_decl=1
  16960. else
  16961. ac_have_decl=0
  16962. fi
  16963. cat >>confdefs.h <<_ACEOF
  16964. #define HAVE_DECL_FDOPENDIR $ac_have_decl
  16965. _ACEOF
  16966. if test $ac_have_decl = 1; then :
  16967. else
  16968. HAVE_DECL_FDOPENDIR=0
  16969. fi
  16970. if test $ac_cv_func_fdopendir = no; then
  16971. HAVE_FDOPENDIR=0
  16972. else
  16973. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
  16974. $as_echo_n "checking whether fdopendir works... " >&6; }
  16975. if ${gl_cv_func_fdopendir_works+:} false; then :
  16976. $as_echo_n "(cached) " >&6
  16977. else
  16978. if test "$cross_compiling" = yes; then :
  16979. case "$host_os" in
  16980. # Guess yes on glibc systems.
  16981. *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
  16982. # Guess yes on musl systems.
  16983. *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;;
  16984. # If we don't know, obey --enable-cross-guesses.
  16985. *) gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
  16986. esac
  16987. else
  16988. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  16989. /* end confdefs.h. */
  16990. #include <dirent.h>
  16991. #include <fcntl.h>
  16992. #include <unistd.h>
  16993. $gl_mda_defines
  16994. #if !HAVE_DECL_FDOPENDIR
  16995. extern
  16996. # ifdef __cplusplus
  16997. "C"
  16998. # endif
  16999. DIR *fdopendir (int);
  17000. #endif
  17001. int
  17002. main ()
  17003. {
  17004. int result = 0;
  17005. int fd = open ("conftest.c", O_RDONLY);
  17006. if (fd < 0) result |= 1;
  17007. if (fdopendir (fd)) result |= 2;
  17008. if (close (fd)) result |= 4;
  17009. return result;
  17010. ;
  17011. return 0;
  17012. }
  17013. _ACEOF
  17014. if ac_fn_c_try_run "$LINENO"; then :
  17015. gl_cv_func_fdopendir_works=yes
  17016. else
  17017. gl_cv_func_fdopendir_works=no
  17018. fi
  17019. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  17020. conftest.$ac_objext conftest.beam conftest.$ac_ext
  17021. fi
  17022. fi
  17023. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
  17024. $as_echo "$gl_cv_func_fdopendir_works" >&6; }
  17025. case "$gl_cv_func_fdopendir_works" in
  17026. *yes) ;;
  17027. *)
  17028. REPLACE_FDOPENDIR=1
  17029. ;;
  17030. esac
  17031. fi
  17032. if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
  17033. gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
  17034. fi
  17035. GNULIB_FDOPENDIR=1
  17036. $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
  17037. cat >>confdefs.h <<_ACEOF
  17038. #define GNULIB_FDOPENDIR 1
  17039. _ACEOF
  17040. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffs" >&5
  17041. $as_echo_n "checking for ffs... " >&6; }
  17042. if ${gl_cv_func_ffs+:} false; then :
  17043. $as_echo_n "(cached) " >&6
  17044. else
  17045. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17046. /* end confdefs.h. */
  17047. #include <strings.h>
  17048. int x;
  17049. int
  17050. main ()
  17051. {
  17052. int (*func) (int) = ffs;
  17053. return func (x);
  17054. ;
  17055. return 0;
  17056. }
  17057. _ACEOF
  17058. if ac_fn_c_try_link "$LINENO"; then :
  17059. gl_cv_func_ffs=yes
  17060. else
  17061. gl_cv_func_ffs=no
  17062. fi
  17063. rm -f core conftest.err conftest.$ac_objext \
  17064. conftest$ac_exeext conftest.$ac_ext
  17065. fi
  17066. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ffs" >&5
  17067. $as_echo "$gl_cv_func_ffs" >&6; }
  17068. if test $gl_cv_func_ffs = no; then
  17069. HAVE_FFS=0
  17070. fi
  17071. if test $HAVE_FFS = 0; then
  17072. gl_LIBOBJS="$gl_LIBOBJS ffs.$ac_objext"
  17073. fi
  17074. GNULIB_FFS=1
  17075. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
  17076. $as_echo_n "checking for flexible array member... " >&6; }
  17077. if ${ac_cv_c_flexmember+:} false; then :
  17078. $as_echo_n "(cached) " >&6
  17079. else
  17080. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17081. /* end confdefs.h. */
  17082. #include <stdlib.h>
  17083. #include <stdio.h>
  17084. #include <stddef.h>
  17085. struct m { struct m *next, **list; char name[]; };
  17086. struct s { struct s *p; struct m *m; int n; double d[]; };
  17087. int
  17088. main ()
  17089. {
  17090. int m = getchar ();
  17091. size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
  17092. nbytes += sizeof (struct s) - 1;
  17093. nbytes -= nbytes % sizeof (struct s);
  17094. struct s *p = malloc (nbytes);
  17095. p->p = p;
  17096. p->m = NULL;
  17097. p->d[0] = 0.0;
  17098. return p->d != (double *) NULL;
  17099. ;
  17100. return 0;
  17101. }
  17102. _ACEOF
  17103. if ac_fn_c_try_compile "$LINENO"; then :
  17104. ac_cv_c_flexmember=yes
  17105. else
  17106. ac_cv_c_flexmember=no
  17107. fi
  17108. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  17109. fi
  17110. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
  17111. $as_echo "$ac_cv_c_flexmember" >&6; }
  17112. if test $ac_cv_c_flexmember = yes; then
  17113. $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
  17114. else
  17115. $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
  17116. fi
  17117. FLOAT_H=
  17118. REPLACE_FLOAT_LDBL=0
  17119. case "$host_os" in
  17120. aix* | beos* | openbsd* | mirbsd* | irix*)
  17121. FLOAT_H=float.h
  17122. ;;
  17123. freebsd* | dragonfly*)
  17124. case "$host_cpu" in
  17125. i[34567]86 )
  17126. FLOAT_H=float.h
  17127. ;;
  17128. x86_64 )
  17129. # On x86_64 systems, the C compiler may still be generating
  17130. # 32-bit code.
  17131. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17132. /* end confdefs.h. */
  17133. #if defined __LP64__ || defined __x86_64__ || defined __amd64__
  17134. int ok;
  17135. #else
  17136. error fail
  17137. #endif
  17138. _ACEOF
  17139. if ac_fn_c_try_compile "$LINENO"; then :
  17140. else
  17141. FLOAT_H=float.h
  17142. fi
  17143. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  17144. ;;
  17145. esac
  17146. ;;
  17147. linux*)
  17148. case "$host_cpu" in
  17149. powerpc*)
  17150. FLOAT_H=float.h
  17151. ;;
  17152. esac
  17153. ;;
  17154. esac
  17155. case "$host_os" in
  17156. aix* | freebsd* | dragonfly* | linux*)
  17157. if test -n "$FLOAT_H"; then
  17158. REPLACE_FLOAT_LDBL=1
  17159. fi
  17160. ;;
  17161. esac
  17162. REPLACE_ITOLD=0
  17163. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
  17164. $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
  17165. if ${gl_cv_func_itold_works+:} false; then :
  17166. $as_echo_n "(cached) " >&6
  17167. else
  17168. if test "$cross_compiling" = yes; then :
  17169. case "$host" in
  17170. sparc*-*-linux*)
  17171. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17172. /* end confdefs.h. */
  17173. #if defined __LP64__ || defined __arch64__
  17174. int ok;
  17175. #else
  17176. error fail
  17177. #endif
  17178. _ACEOF
  17179. if ac_fn_c_try_compile "$LINENO"; then :
  17180. gl_cv_func_itold_works="guessing no"
  17181. else
  17182. gl_cv_func_itold_works="guessing yes"
  17183. fi
  17184. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  17185. ;;
  17186. # Guess yes on native Windows.
  17187. mingw*) gl_cv_func_itold_works="guessing yes" ;;
  17188. *) gl_cv_func_itold_works="guessing yes" ;;
  17189. esac
  17190. else
  17191. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17192. /* end confdefs.h. */
  17193. int i = -1;
  17194. volatile long double ld;
  17195. int main ()
  17196. {
  17197. ld += i * 1.0L;
  17198. if (ld > 0)
  17199. return 1;
  17200. return 0;
  17201. }
  17202. _ACEOF
  17203. if ac_fn_c_try_run "$LINENO"; then :
  17204. gl_cv_func_itold_works=yes
  17205. else
  17206. gl_cv_func_itold_works=no
  17207. fi
  17208. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  17209. conftest.$ac_objext conftest.beam conftest.$ac_ext
  17210. fi
  17211. fi
  17212. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
  17213. $as_echo "$gl_cv_func_itold_works" >&6; }
  17214. case "$gl_cv_func_itold_works" in
  17215. *no)
  17216. REPLACE_ITOLD=1
  17217. FLOAT_H=float.h
  17218. ;;
  17219. esac
  17220. if test -n "$FLOAT_H"; then
  17221. if test $gl_cv_have_include_next = yes; then
  17222. gl_cv_next_float_h='<'float.h'>'
  17223. else
  17224. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
  17225. $as_echo_n "checking absolute name of <float.h>... " >&6; }
  17226. if ${gl_cv_next_float_h+:} false; then :
  17227. $as_echo_n "(cached) " >&6
  17228. else
  17229. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17230. /* end confdefs.h. */
  17231. #include <float.h>
  17232. _ACEOF
  17233. case "$host_os" in
  17234. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  17235. *) gl_absname_cpp="$ac_cpp" ;;
  17236. esac
  17237. case "$host_os" in
  17238. mingw*)
  17239. gl_dirsep_regex='[/\\]'
  17240. ;;
  17241. *)
  17242. gl_dirsep_regex='\/'
  17243. ;;
  17244. esac
  17245. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  17246. gl_header_literal_regex=`echo 'float.h' \
  17247. | sed -e "$gl_make_literal_regex_sed"`
  17248. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  17249. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  17250. s|^/[^/]|//&|
  17251. p
  17252. q
  17253. }'
  17254. gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  17255. sed -n "$gl_absolute_header_sed"`
  17256. gl_header=$gl_cv_absolute_float_h
  17257. gl_cv_next_float_h='"'$gl_header'"'
  17258. fi
  17259. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
  17260. $as_echo "$gl_cv_next_float_h" >&6; }
  17261. fi
  17262. NEXT_FLOAT_H=$gl_cv_next_float_h
  17263. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  17264. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  17265. gl_next_as_first_directive='<'float.h'>'
  17266. else
  17267. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  17268. gl_next_as_first_directive=$gl_cv_next_float_h
  17269. fi
  17270. NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
  17271. fi
  17272. if test -n "$FLOAT_H"; then
  17273. GL_GENERATE_FLOAT_H_TRUE=
  17274. GL_GENERATE_FLOAT_H_FALSE='#'
  17275. else
  17276. GL_GENERATE_FLOAT_H_TRUE='#'
  17277. GL_GENERATE_FLOAT_H_FALSE=
  17278. fi
  17279. if test $REPLACE_FLOAT_LDBL = 1; then
  17280. gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
  17281. fi
  17282. if test $REPLACE_ITOLD = 1; then
  17283. gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
  17284. fi
  17285. gl_fnmatch_required_lowercase=`
  17286. echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
  17287. `
  17288. if test $ac_cv_func_fnmatch = no; then
  17289. HAVE_FNMATCH=0
  17290. else
  17291. gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
  17292. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
  17293. $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
  17294. if eval \${$gl_fnmatch_cache_var+:} false; then :
  17295. $as_echo_n "(cached) " >&6
  17296. else
  17297. if test $gl_fnmatch_required = GNU; then
  17298. gl_fnmatch_gnu_start=
  17299. gl_fnmatch_gnu_end=
  17300. else
  17301. gl_fnmatch_gnu_start='#if 0'
  17302. gl_fnmatch_gnu_end='#endif'
  17303. fi
  17304. if test "$cross_compiling" = yes; then :
  17305. case "$host_os" in
  17306. # Guess yes on musl systems.
  17307. *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
  17308. # Guess no otherwise, even on glibc systems.
  17309. *) eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
  17310. esac
  17311. else
  17312. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17313. /* end confdefs.h. */
  17314. #include <fnmatch.h>
  17315. static int
  17316. y (char const *pattern, char const *string, int flags)
  17317. {
  17318. return fnmatch (pattern, string, flags) == 0;
  17319. }
  17320. static int
  17321. n (char const *pattern, char const *string, int flags)
  17322. {
  17323. return fnmatch (pattern, string, flags) == FNM_NOMATCH;
  17324. }
  17325. int
  17326. main ()
  17327. {
  17328. char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
  17329. char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
  17330. static char const A_1[] = { 'A' - 1, 0 };
  17331. static char const A01[] = { 'A' + 1, 0 };
  17332. static char const a_1[] = { 'a' - 1, 0 };
  17333. static char const a01[] = { 'a' + 1, 0 };
  17334. static char const bs_1[] = { '\\\\' - 1, 0 };
  17335. static char const bs01[] = { '\\\\' + 1, 0 };
  17336. int result = 0;
  17337. if (!n ("a*", "", 0))
  17338. return 1;
  17339. if (!y ("a*", "abc", 0))
  17340. return 1;
  17341. if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
  17342. return 1;
  17343. if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
  17344. return 2;
  17345. if (!y ("a\\\\bc", "abc", 0))
  17346. return 3;
  17347. if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
  17348. return 3;
  17349. if (!y ("*x", ".x", 0))
  17350. return 4;
  17351. if (!n ("*x", ".x", FNM_PERIOD))
  17352. return 4;
  17353. if (!y (Apat, "\\\\", 0))
  17354. return 5;
  17355. if (!y (Apat, "A", 0))
  17356. return 5;
  17357. if (!y (apat, "\\\\", 0))
  17358. return 5;
  17359. if (!y (apat, "a", 0))
  17360. return 5;
  17361. if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
  17362. return 5;
  17363. if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
  17364. return 5;
  17365. if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
  17366. return 5;
  17367. if (!(y (apat, a01, 0) == ('a' < '\\\\')))
  17368. return 5;
  17369. if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
  17370. return 5;
  17371. if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
  17372. return 5;
  17373. if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
  17374. return 5;
  17375. if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
  17376. return 5;
  17377. $gl_fnmatch_gnu_start
  17378. if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
  17379. result |= 8;
  17380. if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
  17381. result |= 16;
  17382. if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
  17383. result |= 32;
  17384. if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
  17385. result |= 64;
  17386. if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
  17387. result |= 64;
  17388. if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
  17389. result |= 64;
  17390. $gl_fnmatch_gnu_end
  17391. return result;
  17392. ;
  17393. return 0;
  17394. }
  17395. _ACEOF
  17396. if ac_fn_c_try_run "$LINENO"; then :
  17397. eval "$gl_fnmatch_cache_var=yes"
  17398. else
  17399. eval "$gl_fnmatch_cache_var=no"
  17400. fi
  17401. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  17402. conftest.$ac_objext conftest.beam conftest.$ac_ext
  17403. fi
  17404. fi
  17405. eval ac_res=\$$gl_fnmatch_cache_var
  17406. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  17407. $as_echo "$ac_res" >&6; }
  17408. eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
  17409. case "$gl_fnmatch_result" in
  17410. *yes) ;;
  17411. *) REPLACE_FNMATCH=1 ;;
  17412. esac
  17413. fi
  17414. if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
  17415. FNMATCH_H='fnmatch.h'
  17416. if test -n "$FNMATCH_H"; then
  17417. GL_GENERATE_FNMATCH_H_TRUE=
  17418. GL_GENERATE_FNMATCH_H_FALSE='#'
  17419. else
  17420. GL_GENERATE_FNMATCH_H_TRUE='#'
  17421. GL_GENERATE_FNMATCH_H_FALSE=
  17422. fi
  17423. fi
  17424. if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
  17425. gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
  17426. fi
  17427. GNULIB_FNMATCH=1
  17428. $as_echo "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
  17429. if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
  17430. gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
  17431. fi
  17432. cat >>confdefs.h <<_ACEOF
  17433. #define GNULIB_FNMATCH_GNU 1
  17434. _ACEOF
  17435. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
  17436. $as_echo_n "checking whether free is known to preserve errno... " >&6; }
  17437. if ${gl_cv_func_free_preserves_errno+:} false; then :
  17438. $as_echo_n "(cached) " >&6
  17439. else
  17440. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17441. /* end confdefs.h. */
  17442. #include <stdlib.h>
  17443. int
  17444. main ()
  17445. {
  17446. #if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
  17447. #elif defined __OpenBSD__
  17448. #elif defined __sun
  17449. #else
  17450. #error "'free' is not known to preserve errno"
  17451. #endif
  17452. ;
  17453. return 0;
  17454. }
  17455. _ACEOF
  17456. if ac_fn_c_try_compile "$LINENO"; then :
  17457. gl_cv_func_free_preserves_errno=yes
  17458. else
  17459. gl_cv_func_free_preserves_errno=no
  17460. fi
  17461. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  17462. fi
  17463. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5
  17464. $as_echo "$gl_cv_func_free_preserves_errno" >&6; }
  17465. case $gl_cv_func_free_preserves_errno in
  17466. *yes) ;;
  17467. *) REPLACE_FREE=1 ;;
  17468. esac
  17469. if test $REPLACE_FREE = 1; then
  17470. gl_LIBOBJS="$gl_LIBOBJS free.$ac_objext"
  17471. :
  17472. fi
  17473. GNULIB_FREE_POSIX=1
  17474. $as_echo "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
  17475. if test $gl_func_frexp != yes; then
  17476. gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
  17477. fi
  17478. GNULIB_FREXP=1
  17479. $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
  17480. if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
  17481. gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
  17482. fi
  17483. GNULIB_FREXPL=1
  17484. $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
  17485. case "$host_os" in
  17486. mingw* | solaris*)
  17487. REPLACE_FSTAT=1
  17488. ;;
  17489. esac
  17490. if test $ac_cv_func_fchdir = no; then
  17491. HAVE_FCHDIR=0
  17492. fi
  17493. if test $HAVE_FCHDIR = 0; then
  17494. case "$gl_cv_func_open_directory_works" in
  17495. *yes) ;;
  17496. *)
  17497. REPLACE_FSTAT=1
  17498. ;;
  17499. esac
  17500. fi
  17501. if test $REPLACE_FSTAT = 1; then
  17502. gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
  17503. case "$host_os" in
  17504. mingw*)
  17505. gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
  17506. ;;
  17507. esac
  17508. :
  17509. fi
  17510. GNULIB_FSTAT=1
  17511. $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
  17512. if test $ac_cv_func_fstatat = no; then
  17513. HAVE_FSTATAT=0
  17514. else
  17515. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
  17516. $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
  17517. if ${gl_cv_func_fstatat_zero_flag+:} false; then :
  17518. $as_echo_n "(cached) " >&6
  17519. else
  17520. if test "$cross_compiling" = yes; then :
  17521. case "$host_os" in
  17522. aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
  17523. *) gl_cv_func_fstatat_zero_flag="guessing yes";;
  17524. esac
  17525. else
  17526. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17527. /* end confdefs.h. */
  17528. #include <fcntl.h>
  17529. #include <sys/stat.h>
  17530. int
  17531. main (void)
  17532. {
  17533. struct stat a;
  17534. return fstatat (AT_FDCWD, ".", &a, 0) != 0;
  17535. }
  17536. _ACEOF
  17537. if ac_fn_c_try_run "$LINENO"; then :
  17538. gl_cv_func_fstatat_zero_flag=yes
  17539. else
  17540. gl_cv_func_fstatat_zero_flag=no
  17541. fi
  17542. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  17543. conftest.$ac_objext conftest.beam conftest.$ac_ext
  17544. fi
  17545. fi
  17546. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
  17547. $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
  17548. case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
  17549. *yes+*yes) ;;
  17550. *) REPLACE_FSTATAT=1 ;;
  17551. esac
  17552. case $host_os in
  17553. solaris*)
  17554. REPLACE_FSTATAT=1 ;;
  17555. esac
  17556. case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in
  17557. 1,*yes)
  17558. $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
  17559. ;;
  17560. esac
  17561. fi
  17562. if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
  17563. gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
  17564. fi
  17565. GNULIB_FSTATAT=1
  17566. $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
  17567. gl_abort_bug=no
  17568. case "$host_os" in
  17569. mingw*)
  17570. gl_cv_func_getcwd_path_max=yes
  17571. ;;
  17572. *)
  17573. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
  17574. $as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
  17575. if ${gl_cv_func_getcwd_path_max+:} false; then :
  17576. $as_echo_n "(cached) " >&6
  17577. else
  17578. # Arrange for deletion of the temporary directory this test creates.
  17579. ac_clean_files="$ac_clean_files confdir3"
  17580. if test "$cross_compiling" = yes; then :
  17581. # Cross-compilation guesses:
  17582. case "$host_os" in
  17583. aix*) # On AIX, it has the AIX bug.
  17584. gl_cv_func_getcwd_path_max='guessing no, it has the AIX bug' ;;
  17585. gnu*) # On Hurd, it is 'yes'.
  17586. gl_cv_func_getcwd_path_max='guessing yes' ;;
  17587. linux* | kfreebsd*)
  17588. # On older Linux+glibc it's 'no, but it is partly working',
  17589. # on newer Linux+glibc it's 'yes'.
  17590. # On Linux+musl libc, it's 'no, but it is partly working'.
  17591. # On kFreeBSD+glibc, it's 'no, but it is partly working'.
  17592. gl_cv_func_getcwd_path_max='guessing no, but it is partly working' ;;
  17593. *) # If we don't know, obey --enable-cross-guesses.
  17594. gl_cv_func_getcwd_path_max="$gl_cross_guess_normal" ;;
  17595. esac
  17596. else
  17597. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17598. /* end confdefs.h. */
  17599. #include <errno.h>
  17600. #include <stdlib.h>
  17601. #if HAVE_UNISTD_H
  17602. # include <unistd.h>
  17603. #else
  17604. # include <direct.h>
  17605. #endif
  17606. #include <string.h>
  17607. #include <limits.h>
  17608. #include <sys/stat.h>
  17609. #include <sys/types.h>
  17610. #include <fcntl.h>
  17611. /* Arrange to define PATH_MAX, like "pathmax.h" does. */
  17612. #if HAVE_UNISTD_H
  17613. # include <unistd.h>
  17614. #endif
  17615. #include <limits.h>
  17616. #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
  17617. # include <sys/param.h>
  17618. #endif
  17619. #if !defined PATH_MAX && defined MAXPATHLEN
  17620. # define PATH_MAX MAXPATHLEN
  17621. #endif
  17622. #ifdef __hpux
  17623. # undef PATH_MAX
  17624. # define PATH_MAX 1024
  17625. #endif
  17626. #if defined _WIN32 && ! defined __CYGWIN__
  17627. # undef PATH_MAX
  17628. # define PATH_MAX 260
  17629. #endif
  17630. #ifndef AT_FDCWD
  17631. # define AT_FDCWD 0
  17632. #endif
  17633. #ifdef ENAMETOOLONG
  17634. # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
  17635. #else
  17636. # define is_ENAMETOOLONG(x) 0
  17637. #endif
  17638. /* Use the getcwd function, not any macro. */
  17639. #undef getcwd
  17640. $gl_mda_defines
  17641. #ifndef S_IRWXU
  17642. # define S_IRWXU 0700
  17643. #endif
  17644. /* The length of this name must be 8. */
  17645. #define DIR_NAME "confdir3"
  17646. #define DIR_NAME_LEN 8
  17647. #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
  17648. /* The length of "../". */
  17649. #define DOTDOTSLASH_LEN 3
  17650. /* Leftover bytes in the buffer, to work around library or OS bugs. */
  17651. #define BUF_SLOP 20
  17652. int
  17653. main ()
  17654. {
  17655. #ifndef PATH_MAX
  17656. /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
  17657. at least not on a local file system. And if we were to start worrying
  17658. about remote file systems, we'd have to enable the wrapper function
  17659. all of the time, just to be safe. That's not worth the cost. */
  17660. exit (0);
  17661. #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
  17662. - DIR_NAME_SIZE - BUF_SLOP) \
  17663. <= PATH_MAX)
  17664. /* FIXME: Assuming there's a system for which this is true,
  17665. this should be done in a compile test. */
  17666. exit (0);
  17667. #else
  17668. char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
  17669. + DIR_NAME_SIZE + BUF_SLOP];
  17670. char *cwd = getcwd (buf, PATH_MAX);
  17671. size_t initial_cwd_len;
  17672. size_t cwd_len;
  17673. int fail = 0;
  17674. size_t n_chdirs = 0;
  17675. if (cwd == NULL)
  17676. exit (10);
  17677. cwd_len = initial_cwd_len = strlen (cwd);
  17678. while (1)
  17679. {
  17680. size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
  17681. char *c = NULL;
  17682. cwd_len += DIR_NAME_SIZE;
  17683. /* If mkdir or chdir fails, it could be that this system cannot create
  17684. any file with an absolute name longer than PATH_MAX, such as cygwin.
  17685. If so, leave fail as 0, because the current working directory can't
  17686. be too long for getcwd if it can't even be created. On Linux with
  17687. the 9p file system, mkdir fails with error EINVAL when cwd_len gets
  17688. too long; ignore this failure because the getcwd() system call
  17689. produces good results whereas the gnulib substitute calls getdents64
  17690. which fails with error EPROTO.
  17691. For other errors, be pessimistic and consider that as a failure,
  17692. too. */
  17693. if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
  17694. {
  17695. if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
  17696. #ifdef __linux__
  17697. if (! (errno == EINVAL))
  17698. #endif
  17699. fail = 20;
  17700. break;
  17701. }
  17702. if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
  17703. {
  17704. struct stat sb;
  17705. c = getcwd (buf, PATH_MAX);
  17706. if (!c && errno == ENOENT)
  17707. {
  17708. fail = 11;
  17709. break;
  17710. }
  17711. if (c)
  17712. {
  17713. fail = 31;
  17714. break;
  17715. }
  17716. if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
  17717. {
  17718. fail = 21;
  17719. break;
  17720. }
  17721. /* Our replacement needs to be able to stat() long ../../paths,
  17722. so generate a path larger than PATH_MAX to check,
  17723. avoiding the replacement if we can't stat(). */
  17724. c = getcwd (buf, cwd_len + 1);
  17725. if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
  17726. {
  17727. fail = 32;
  17728. break;
  17729. }
  17730. }
  17731. if (dotdot_max <= cwd_len - initial_cwd_len)
  17732. {
  17733. if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
  17734. break;
  17735. c = getcwd (buf, cwd_len + 1);
  17736. if (!c)
  17737. {
  17738. if (! (errno == ERANGE || errno == ENOENT
  17739. || is_ENAMETOOLONG (errno)))
  17740. {
  17741. fail = 22;
  17742. break;
  17743. }
  17744. if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
  17745. {
  17746. fail = 12;
  17747. break;
  17748. }
  17749. }
  17750. }
  17751. if (c && strlen (c) != cwd_len)
  17752. {
  17753. fail = 23;
  17754. break;
  17755. }
  17756. ++n_chdirs;
  17757. }
  17758. /* Leaving behind such a deep directory is not polite.
  17759. So clean up here, right away, even though the driving
  17760. shell script would also clean up. */
  17761. {
  17762. size_t i;
  17763. /* Try rmdir first, in case the chdir failed. */
  17764. rmdir (DIR_NAME);
  17765. for (i = 0; i <= n_chdirs; i++)
  17766. {
  17767. if (chdir ("..") < 0)
  17768. break;
  17769. if (rmdir (DIR_NAME) != 0)
  17770. break;
  17771. }
  17772. }
  17773. exit (fail);
  17774. #endif
  17775. }
  17776. _ACEOF
  17777. if ac_fn_c_try_run "$LINENO"; then :
  17778. gl_cv_func_getcwd_path_max=yes
  17779. else
  17780. case $? in
  17781. 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
  17782. 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
  17783. 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
  17784. *) gl_cv_func_getcwd_path_max=no;;
  17785. esac
  17786. fi
  17787. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  17788. conftest.$ac_objext conftest.beam conftest.$ac_ext
  17789. fi
  17790. fi
  17791. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
  17792. $as_echo "$gl_cv_func_getcwd_path_max" >&6; }
  17793. case "$gl_cv_func_getcwd_null" in
  17794. *yes)
  17795. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
  17796. $as_echo_n "checking for getpagesize... " >&6; }
  17797. if ${gl_cv_func_getpagesize+:} false; then :
  17798. $as_echo_n "(cached) " >&6
  17799. else
  17800. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17801. /* end confdefs.h. */
  17802. #include <unistd.h>
  17803. int
  17804. main ()
  17805. {
  17806. return getpagesize();
  17807. ;
  17808. return 0;
  17809. }
  17810. _ACEOF
  17811. if ac_fn_c_try_link "$LINENO"; then :
  17812. gl_cv_func_getpagesize=yes
  17813. else
  17814. gl_cv_func_getpagesize=no
  17815. fi
  17816. rm -f core conftest.err conftest.$ac_objext \
  17817. conftest$ac_exeext conftest.$ac_ext
  17818. fi
  17819. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
  17820. $as_echo "$gl_cv_func_getpagesize" >&6; }
  17821. if test $gl_cv_func_getpagesize = yes; then
  17822. cat >>confdefs.h <<_ACEOF
  17823. #define HAVE_GETPAGESIZE 1
  17824. _ACEOF
  17825. fi
  17826. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd succeeds when 4k < cwd_length < 16k" >&5
  17827. $as_echo_n "checking whether getcwd succeeds when 4k < cwd_length < 16k... " >&6; }
  17828. if ${gl_cv_func_getcwd_succeeds_beyond_4k+:} false; then :
  17829. $as_echo_n "(cached) " >&6
  17830. else
  17831. # Remove any remnants of a previous test.
  17832. rm -rf confdir-14B---
  17833. # Arrange for deletion of the temporary directory this test creates.
  17834. ac_clean_files="$ac_clean_files confdir-14B---"
  17835. if test "$cross_compiling" = yes; then :
  17836. case "$host_os" in
  17837. # Guess yes on musl systems.
  17838. *-musl*) gl_cv_func_getcwd_succeeds_beyond_4k="guessing yes" ;;
  17839. # Guess no otherwise, even on glibc systems.
  17840. *) gl_cv_func_getcwd_succeeds_beyond_4k="guessing no"
  17841. esac
  17842. else
  17843. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  17844. /* end confdefs.h. */
  17845. #include <errno.h>
  17846. #include <stdlib.h>
  17847. #if HAVE_UNISTD_H
  17848. # include <unistd.h>
  17849. #else /* on Windows with MSVC */
  17850. # include <direct.h>
  17851. #endif
  17852. #include <string.h>
  17853. #include <sys/stat.h>
  17854. /* Arrange to define PATH_MAX, like "pathmax.h" does. */
  17855. #if HAVE_UNISTD_H
  17856. # include <unistd.h>
  17857. #endif
  17858. #include <limits.h>
  17859. #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
  17860. # include <sys/param.h>
  17861. #endif
  17862. #if !defined PATH_MAX && defined MAXPATHLEN
  17863. # define PATH_MAX MAXPATHLEN
  17864. #endif
  17865. #ifdef __hpux
  17866. # undef PATH_MAX
  17867. # define PATH_MAX 1024
  17868. #endif
  17869. #if defined _WIN32 && ! defined __CYGWIN__
  17870. # undef PATH_MAX
  17871. # define PATH_MAX 260
  17872. #endif
  17873. $gl_mda_defines
  17874. #ifndef S_IRWXU
  17875. # define S_IRWXU 0700
  17876. #endif
  17877. /* FIXME: skip the run-test altogether on systems without getpagesize. */
  17878. #if ! HAVE_GETPAGESIZE
  17879. # define getpagesize() 0
  17880. #endif
  17881. /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
  17882. the 16kB pagesize on ia64 linux. Those conditions make the code below
  17883. trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
  17884. #define TARGET_LEN (5 * 1024)
  17885. int
  17886. main ()
  17887. {
  17888. char *cwd;
  17889. size_t initial_cwd_len;
  17890. int fail = 0;
  17891. /* The bug is triggered when PATH_MAX < getpagesize (), so skip
  17892. this relatively expensive and invasive test if that's not true. */
  17893. #ifdef PATH_MAX
  17894. int bug_possible = PATH_MAX < getpagesize ();
  17895. #else
  17896. int bug_possible = 0;
  17897. #endif
  17898. if (! bug_possible)
  17899. return 0;
  17900. cwd = getcwd (NULL, 0);
  17901. if (cwd == NULL)
  17902. return 2;
  17903. initial_cwd_len = strlen (cwd);
  17904. free (cwd);
  17905. if (1)
  17906. {
  17907. static char const dir_name[] = "confdir-14B---";
  17908. size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
  17909. / sizeof dir_name);
  17910. size_t d;
  17911. for (d = 0; d < desired_depth; d++)
  17912. {
  17913. if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
  17914. {
  17915. if (! (errno == ERANGE || errno == ENAMETOOLONG
  17916. || errno == ENOENT))
  17917. fail = 3; /* Unable to construct deep hierarchy. */
  17918. break;
  17919. }
  17920. }
  17921. /* If libc has the bug in question, this invocation of getcwd
  17922. results in a failed assertion. */
  17923. cwd = getcwd (NULL, 0);
  17924. if (cwd == NULL)
  17925. fail = 4; /* getcwd didn't assert, but it failed for a long name
  17926. where the answer could have been learned. */
  17927. free (cwd);
  17928. /* Call rmdir first, in case the above chdir failed. */
  17929. rmdir (dir_name);
  17930. while (0 < d--)
  17931. {
  17932. if (chdir ("..") < 0)
  17933. {
  17934. fail = 5;
  17935. break;
  17936. }
  17937. rmdir (dir_name);
  17938. }
  17939. }
  17940. return fail;
  17941. }
  17942. _ACEOF
  17943. if ac_fn_c_try_run "$LINENO"; then :
  17944. gl_cv_func_getcwd_succeeds_beyond_4k=yes
  17945. else
  17946. ret=$?
  17947. if test $ret -ge 128 || test $ret = 4; then
  17948. gl_cv_func_getcwd_succeeds_beyond_4k=no
  17949. else
  17950. gl_cv_func_getcwd_succeeds_beyond_4k=yes
  17951. fi
  17952. fi
  17953. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  17954. conftest.$ac_objext conftest.beam conftest.$ac_ext
  17955. fi
  17956. fi
  17957. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_succeeds_beyond_4k" >&5
  17958. $as_echo "$gl_cv_func_getcwd_succeeds_beyond_4k" >&6; }
  17959. case "$gl_cv_func_getcwd_succeeds_beyond_4k" in
  17960. *no)
  17961. gl_abort_bug=yes
  17962. ;;
  17963. *)
  17964. ;;
  17965. esac
  17966. ;;
  17967. esac
  17968. ;;
  17969. esac
  17970. case "$gl_cv_func_getcwd_path_max" in
  17971. *"no" | *"no, it has the AIX bug") ;;
  17972. *)
  17973. $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
  17974. ;;
  17975. esac
  17976. case "$gl_cv_func_getcwd_path_max" in
  17977. *"no, but it is partly working")
  17978. $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
  17979. ;;
  17980. *"yes, but with shorter paths")
  17981. $as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
  17982. ;;
  17983. esac
  17984. if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
  17985. || test $gl_cv_func_getcwd_posix_signature != yes \
  17986. || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
  17987. || test $gl_abort_bug = yes; then
  17988. REPLACE_GETCWD=1
  17989. fi
  17990. if test $REPLACE_GETCWD = 1; then
  17991. gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
  17992. :
  17993. fi
  17994. cat >>confdefs.h <<_ACEOF
  17995. #define GNULIB_GETCWD 1
  17996. _ACEOF
  17997. GNULIB_GETCWD=1
  17998. $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
  17999. case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
  18000. *yes,yes) ;;
  18001. *)
  18002. REPLACE_GETCWD=1
  18003. ;;
  18004. esac
  18005. if test $REPLACE_GETCWD = 1; then
  18006. gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
  18007. fi
  18008. GNULIB_GETCWD=1
  18009. $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
  18010. if test $ac_cv_func_getdelim = yes; then
  18011. HAVE_GETDELIM=1
  18012. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
  18013. $as_echo_n "checking for working getdelim function... " >&6; }
  18014. if ${gl_cv_func_working_getdelim+:} false; then :
  18015. $as_echo_n "(cached) " >&6
  18016. else
  18017. echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
  18018. if test "$cross_compiling" = yes; then :
  18019. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18020. /* end confdefs.h. */
  18021. #include <features.h>
  18022. #ifdef __GNU_LIBRARY__
  18023. #if (__GLIBC__ >= 2) && !defined __UCLIBC__
  18024. Lucky GNU user
  18025. #endif
  18026. #endif
  18027. _ACEOF
  18028. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  18029. $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
  18030. gl_cv_func_working_getdelim="guessing yes"
  18031. else
  18032. case "$host_os" in
  18033. *-musl*) gl_cv_func_working_getdelim="guessing yes" ;;
  18034. *) gl_cv_func_working_getdelim="$gl_cross_guess_normal" ;;
  18035. esac
  18036. fi
  18037. rm -f conftest*
  18038. else
  18039. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18040. /* end confdefs.h. */
  18041. # include <stdio.h>
  18042. # include <stdlib.h>
  18043. # include <string.h>
  18044. int main ()
  18045. {
  18046. FILE *in = fopen ("./conftest.data", "r");
  18047. if (!in)
  18048. return 1;
  18049. {
  18050. /* Test result for a NULL buffer and a zero size.
  18051. Based on a test program from Karl Heuer. */
  18052. char *line = NULL;
  18053. size_t siz = 0;
  18054. int len = getdelim (&line, &siz, '\n', in);
  18055. if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
  18056. { free (line); fclose (in); return 2; }
  18057. free (line);
  18058. }
  18059. {
  18060. /* Test result for a NULL buffer and a non-zero size.
  18061. This crashes on FreeBSD 8.0. */
  18062. char *line = NULL;
  18063. size_t siz = (size_t)(~0) / 4;
  18064. if (getdelim (&line, &siz, '\n', in) == -1)
  18065. { fclose (in); return 3; }
  18066. free (line);
  18067. }
  18068. fclose (in);
  18069. return 0;
  18070. }
  18071. _ACEOF
  18072. if ac_fn_c_try_run "$LINENO"; then :
  18073. gl_cv_func_working_getdelim=yes
  18074. else
  18075. gl_cv_func_working_getdelim=no
  18076. fi
  18077. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  18078. conftest.$ac_objext conftest.beam conftest.$ac_ext
  18079. fi
  18080. fi
  18081. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
  18082. $as_echo "$gl_cv_func_working_getdelim" >&6; }
  18083. case "$gl_cv_func_working_getdelim" in
  18084. *yes) ;;
  18085. *) REPLACE_GETDELIM=1 ;;
  18086. esac
  18087. else
  18088. HAVE_GETDELIM=0
  18089. fi
  18090. if test $ac_cv_have_decl_getdelim = no; then
  18091. HAVE_DECL_GETDELIM=0
  18092. fi
  18093. if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
  18094. gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
  18095. for ac_func in flockfile funlockfile
  18096. do :
  18097. as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
  18098. ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
  18099. if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
  18100. cat >>confdefs.h <<_ACEOF
  18101. #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  18102. _ACEOF
  18103. fi
  18104. done
  18105. ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
  18106. if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
  18107. ac_have_decl=1
  18108. else
  18109. ac_have_decl=0
  18110. fi
  18111. cat >>confdefs.h <<_ACEOF
  18112. #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
  18113. _ACEOF
  18114. fi
  18115. GNULIB_GETDELIM=1
  18116. $as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
  18117. if test $ac_cv_func_getdtablesize = yes &&
  18118. test $ac_cv_have_decl_getdtablesize = yes; then
  18119. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
  18120. $as_echo_n "checking whether getdtablesize works... " >&6; }
  18121. if ${gl_cv_func_getdtablesize_works+:} false; then :
  18122. $as_echo_n "(cached) " >&6
  18123. else
  18124. case "$host_os" in
  18125. vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
  18126. *)
  18127. if test "$cross_compiling" = yes; then :
  18128. case "$host_os" in
  18129. cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
  18130. gl_cv_func_getdtablesize_works="guessing no" ;;
  18131. *) gl_cv_func_getdtablesize_works="guessing yes" ;;
  18132. esac
  18133. else
  18134. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18135. /* end confdefs.h. */
  18136. #include <unistd.h>
  18137. $gl_mda_defines
  18138. int
  18139. main ()
  18140. {
  18141. int size = getdtablesize();
  18142. if (dup2 (0, getdtablesize()) != -1)
  18143. return 1;
  18144. if (size != getdtablesize())
  18145. return 2;
  18146. ;
  18147. return 0;
  18148. }
  18149. _ACEOF
  18150. if ac_fn_c_try_run "$LINENO"; then :
  18151. gl_cv_func_getdtablesize_works=yes
  18152. else
  18153. gl_cv_func_getdtablesize_works=no
  18154. fi
  18155. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  18156. conftest.$ac_objext conftest.beam conftest.$ac_ext
  18157. fi
  18158. ;;
  18159. esac
  18160. fi
  18161. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
  18162. $as_echo "$gl_cv_func_getdtablesize_works" >&6; }
  18163. case "$gl_cv_func_getdtablesize_works" in
  18164. *yes | "no (limitation)") ;;
  18165. *) REPLACE_GETDTABLESIZE=1 ;;
  18166. esac
  18167. else
  18168. HAVE_GETDTABLESIZE=0
  18169. fi
  18170. if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
  18171. gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
  18172. :
  18173. fi
  18174. GNULIB_GETDTABLESIZE=1
  18175. $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
  18176. gl_getline_needs_run_time_check=no
  18177. ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
  18178. if test "x$ac_cv_func_getline" = xyes; then :
  18179. gl_getline_needs_run_time_check=yes
  18180. else
  18181. am_cv_func_working_getline=no
  18182. fi
  18183. if test $gl_getline_needs_run_time_check = yes; then
  18184. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
  18185. $as_echo_n "checking for working getline function... " >&6; }
  18186. if ${am_cv_func_working_getline+:} false; then :
  18187. $as_echo_n "(cached) " >&6
  18188. else
  18189. echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
  18190. if test "$cross_compiling" = yes; then :
  18191. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18192. /* end confdefs.h. */
  18193. #include <features.h>
  18194. #ifdef __GNU_LIBRARY__
  18195. #if (__GLIBC__ >= 2) && !defined __UCLIBC__
  18196. Lucky GNU user
  18197. #endif
  18198. #endif
  18199. _ACEOF
  18200. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  18201. $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
  18202. am_cv_func_working_getline="guessing yes"
  18203. else
  18204. case "$host_os" in
  18205. *-musl*) am_cv_func_working_getline="guessing yes" ;;
  18206. *) am_cv_func_working_getline="$gl_cross_guess_normal" ;;
  18207. esac
  18208. fi
  18209. rm -f conftest*
  18210. else
  18211. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18212. /* end confdefs.h. */
  18213. # include <stdio.h>
  18214. # include <stdlib.h>
  18215. # include <string.h>
  18216. int main ()
  18217. {
  18218. FILE *in = fopen ("./conftest.data", "r");
  18219. if (!in)
  18220. return 1;
  18221. {
  18222. /* Test result for a NULL buffer and a zero size.
  18223. Based on a test program from Karl Heuer. */
  18224. char *line = NULL;
  18225. size_t siz = 0;
  18226. int len = getline (&line, &siz, in);
  18227. if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
  18228. { free (line); fclose (in); return 2; }
  18229. free (line);
  18230. }
  18231. {
  18232. /* Test result for a NULL buffer and a non-zero size.
  18233. This crashes on FreeBSD 8.0. */
  18234. char *line = NULL;
  18235. size_t siz = (size_t)(~0) / 4;
  18236. if (getline (&line, &siz, in) == -1)
  18237. { fclose (in); return 3; }
  18238. free (line);
  18239. }
  18240. fclose (in);
  18241. return 0;
  18242. }
  18243. _ACEOF
  18244. if ac_fn_c_try_run "$LINENO"; then :
  18245. am_cv_func_working_getline=yes
  18246. else
  18247. am_cv_func_working_getline=no
  18248. fi
  18249. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  18250. conftest.$ac_objext conftest.beam conftest.$ac_ext
  18251. fi
  18252. fi
  18253. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
  18254. $as_echo "$am_cv_func_working_getline" >&6; }
  18255. fi
  18256. if test $ac_cv_have_decl_getline = no; then
  18257. HAVE_DECL_GETLINE=0
  18258. fi
  18259. case "$am_cv_func_working_getline" in
  18260. *yes) ;;
  18261. *)
  18262. REPLACE_GETLINE=1
  18263. ;;
  18264. esac
  18265. if test $REPLACE_GETLINE = 1; then
  18266. gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
  18267. :
  18268. fi
  18269. GNULIB_GETLINE=1
  18270. $as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
  18271. if test $ac_cv_have_decl_getlogin_r = no; then
  18272. HAVE_DECL_GETLOGIN_R=0
  18273. fi
  18274. if test $ac_cv_func_getlogin_r = no; then
  18275. HAVE_GETLOGIN_R=0
  18276. else
  18277. HAVE_GETLOGIN_R=1
  18278. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
  18279. $as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
  18280. if ${gl_cv_func_getlogin_r_works+:} false; then :
  18281. $as_echo_n "(cached) " >&6
  18282. else
  18283. case "$host_os" in
  18284. # Guess no on Mac OS X, OSF/1.
  18285. darwin* | osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
  18286. # Guess yes otherwise.
  18287. *) gl_cv_func_getlogin_r_works="guessing yes" ;;
  18288. esac
  18289. if test "$cross_compiling" = yes; then :
  18290. :
  18291. else
  18292. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18293. /* end confdefs.h. */
  18294. #include <stddef.h>
  18295. #include <string.h>
  18296. #include <unistd.h>
  18297. #if !HAVE_DECL_GETLOGIN_R
  18298. extern
  18299. # ifdef __cplusplus
  18300. "C"
  18301. # endif
  18302. int getlogin_r (char *, size_t);
  18303. #endif
  18304. int
  18305. main (void)
  18306. {
  18307. int result = 0;
  18308. char buf[100];
  18309. if (getlogin_r (buf, 0) == 0)
  18310. result |= 1;
  18311. if (getlogin_r (buf, 1) == 0)
  18312. result |= 2;
  18313. if (getlogin_r (buf, 100) == 0)
  18314. {
  18315. size_t n = strlen (buf);
  18316. if (getlogin_r (buf, n) == 0)
  18317. result |= 4;
  18318. }
  18319. return result;
  18320. }
  18321. _ACEOF
  18322. if ac_fn_c_try_run "$LINENO"; then :
  18323. gl_cv_func_getlogin_r_works=yes
  18324. else
  18325. gl_cv_func_getlogin_r_works=no
  18326. fi
  18327. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  18328. conftest.$ac_objext conftest.beam conftest.$ac_ext
  18329. fi
  18330. fi
  18331. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
  18332. $as_echo "$gl_cv_func_getlogin_r_works" >&6; }
  18333. case "$gl_cv_func_getlogin_r_works" in
  18334. *yes) ;;
  18335. *) REPLACE_GETLOGIN_R=1 ;;
  18336. esac
  18337. fi
  18338. if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
  18339. gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
  18340. fi
  18341. GNULIB_GETLOGIN_R=1
  18342. $as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
  18343. ac_found=0
  18344. ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
  18345. "
  18346. if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
  18347. ac_have_decl=1
  18348. else
  18349. ac_have_decl=0
  18350. fi
  18351. cat >>confdefs.h <<_ACEOF
  18352. #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
  18353. _ACEOF
  18354. if test $ac_have_decl = 1; then :
  18355. ac_found=1
  18356. fi
  18357. ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
  18358. "
  18359. if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
  18360. ac_have_decl=1
  18361. else
  18362. ac_have_decl=0
  18363. fi
  18364. cat >>confdefs.h <<_ACEOF
  18365. #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
  18366. _ACEOF
  18367. if test $ac_have_decl = 1; then :
  18368. ac_found=1
  18369. fi
  18370. ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
  18371. "
  18372. if test "x$ac_cv_have_decl___argv" = xyes; then :
  18373. ac_have_decl=1
  18374. else
  18375. ac_have_decl=0
  18376. fi
  18377. cat >>confdefs.h <<_ACEOF
  18378. #define HAVE_DECL___ARGV $ac_have_decl
  18379. _ACEOF
  18380. if test $ac_have_decl = 1; then :
  18381. ac_found=1
  18382. fi
  18383. # Incur the cost of this test only if none of the above worked.
  18384. if test $ac_found = 0; then
  18385. # On OpenBSD 5.1, using the global __progname variable appears to be
  18386. # the only way to implement getprogname.
  18387. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
  18388. $as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
  18389. if ${gl_cv_var___progname+:} false; then :
  18390. $as_echo_n "(cached) " >&6
  18391. else
  18392. gl_cv_var___progname=
  18393. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18394. /* end confdefs.h. */
  18395. extern char *__progname;
  18396. int
  18397. main ()
  18398. {
  18399. return *__progname;
  18400. ;
  18401. return 0;
  18402. }
  18403. _ACEOF
  18404. if ac_fn_c_try_link "$LINENO"; then :
  18405. gl_cv_var___progname=yes
  18406. fi
  18407. rm -f core conftest.err conftest.$ac_objext \
  18408. conftest$ac_exeext conftest.$ac_ext
  18409. fi
  18410. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
  18411. $as_echo "$gl_cv_var___progname" >&6; }
  18412. if test "$gl_cv_var___progname" = yes; then
  18413. $as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
  18414. fi
  18415. fi
  18416. if test "$ac_cv_func_getrandom" != yes; then
  18417. HAVE_GETRANDOM=0
  18418. else
  18419. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5
  18420. $as_echo_n "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; }
  18421. if ${gl_cv_func_getrandom_ok+:} false; then :
  18422. $as_echo_n "(cached) " >&6
  18423. else
  18424. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18425. /* end confdefs.h. */
  18426. /* Additional includes are needed before <sys/random.h> on uClibc
  18427. and Mac OS X. */
  18428. #include <sys/types.h>
  18429. #include <stdlib.h>
  18430. #include <sys/random.h>
  18431. ssize_t getrandom (void *, size_t, unsigned int);
  18432. int
  18433. main ()
  18434. {
  18435. ;
  18436. return 0;
  18437. }
  18438. _ACEOF
  18439. if ac_fn_c_try_compile "$LINENO"; then :
  18440. gl_cv_func_getrandom_ok=yes
  18441. else
  18442. gl_cv_func_getrandom_ok=no
  18443. fi
  18444. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  18445. fi
  18446. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5
  18447. $as_echo "$gl_cv_func_getrandom_ok" >&6; }
  18448. if test $gl_cv_func_getrandom_ok = no; then
  18449. REPLACE_GETRANDOM=1
  18450. fi
  18451. fi
  18452. case "$host_os" in
  18453. mingw*)
  18454. for ac_header in bcrypt.h
  18455. do :
  18456. ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h>
  18457. "
  18458. if test "x$ac_cv_header_bcrypt_h" = xyes; then :
  18459. cat >>confdefs.h <<_ACEOF
  18460. #define HAVE_BCRYPT_H 1
  18461. _ACEOF
  18462. fi
  18463. done
  18464. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5
  18465. $as_echo_n "checking whether the bcrypt library is guaranteed to be present... " >&6; }
  18466. if ${gl_cv_lib_assume_bcrypt+:} false; then :
  18467. $as_echo_n "(cached) " >&6
  18468. else
  18469. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18470. /* end confdefs.h. */
  18471. #include <windows.h>
  18472. int
  18473. main ()
  18474. {
  18475. #if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
  18476. cannot assume it
  18477. #endif
  18478. ;
  18479. return 0;
  18480. }
  18481. _ACEOF
  18482. if ac_fn_c_try_compile "$LINENO"; then :
  18483. gl_cv_lib_assume_bcrypt=yes
  18484. else
  18485. gl_cv_lib_assume_bcrypt=no
  18486. fi
  18487. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  18488. fi
  18489. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5
  18490. $as_echo "$gl_cv_lib_assume_bcrypt" >&6; }
  18491. if test $gl_cv_lib_assume_bcrypt = yes; then
  18492. $as_echo "#define HAVE_LIB_BCRYPT 1" >>confdefs.h
  18493. LIB_GETRANDOM='-lbcrypt'
  18494. else
  18495. LIB_GETRANDOM='-ladvapi32'
  18496. fi
  18497. ;;
  18498. *)
  18499. LIB_GETRANDOM= ;;
  18500. esac
  18501. if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
  18502. gl_LIBOBJS="$gl_LIBOBJS getrandom.$ac_objext"
  18503. fi
  18504. GNULIB_GETRANDOM=1
  18505. $as_echo "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
  18506. gl_gettimeofday_timezone=void
  18507. if test $ac_cv_func_gettimeofday != yes; then
  18508. HAVE_GETTIMEOFDAY=0
  18509. else
  18510. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
  18511. $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
  18512. if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
  18513. $as_echo_n "(cached) " >&6
  18514. else
  18515. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18516. /* end confdefs.h. */
  18517. #include <sys/time.h>
  18518. struct timeval c;
  18519. int gettimeofday (struct timeval *restrict, void *restrict);
  18520. int
  18521. main ()
  18522. {
  18523. /* glibc uses struct timezone * rather than the POSIX void *
  18524. if _GNU_SOURCE is defined. However, since the only portable
  18525. use of gettimeofday uses NULL as the second parameter, and
  18526. since the glibc definition is actually more typesafe, it is
  18527. not worth wrapping this to get a compliant signature. */
  18528. int (*f) (struct timeval *restrict, void *restrict)
  18529. = gettimeofday;
  18530. int x = f (&c, 0);
  18531. return !(x | c.tv_sec | c.tv_usec);
  18532. ;
  18533. return 0;
  18534. }
  18535. _ACEOF
  18536. if ac_fn_c_try_compile "$LINENO"; then :
  18537. gl_cv_func_gettimeofday_posix_signature=yes
  18538. else
  18539. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18540. /* end confdefs.h. */
  18541. #include <sys/time.h>
  18542. int gettimeofday (struct timeval *restrict, struct timezone *restrict);
  18543. int
  18544. main ()
  18545. {
  18546. ;
  18547. return 0;
  18548. }
  18549. _ACEOF
  18550. if ac_fn_c_try_compile "$LINENO"; then :
  18551. gl_cv_func_gettimeofday_posix_signature=almost
  18552. else
  18553. gl_cv_func_gettimeofday_posix_signature=no
  18554. fi
  18555. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  18556. fi
  18557. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  18558. fi
  18559. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
  18560. $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
  18561. if test $gl_cv_func_gettimeofday_posix_signature = almost; then
  18562. gl_gettimeofday_timezone='struct timezone'
  18563. elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
  18564. REPLACE_GETTIMEOFDAY=1
  18565. fi
  18566. if test $REPLACE_STRUCT_TIMEVAL = 1; then
  18567. REPLACE_GETTIMEOFDAY=1
  18568. fi
  18569. case "$host_os" in
  18570. mingw*) REPLACE_GETTIMEOFDAY=1 ;;
  18571. esac
  18572. fi
  18573. cat >>confdefs.h <<_ACEOF
  18574. #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
  18575. _ACEOF
  18576. if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
  18577. gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
  18578. :
  18579. fi
  18580. GNULIB_GETTIMEOFDAY=1
  18581. $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
  18582. if test $ac_cv_func_glob = no; then
  18583. HAVE_GLOB=0
  18584. else
  18585. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1 or 2" >&5
  18586. $as_echo_n "checking for GNU glob interface version 1 or 2... " >&6; }
  18587. if ${gl_cv_gnu_glob_interface_version_1_2+:} false; then :
  18588. $as_echo_n "(cached) " >&6
  18589. else
  18590. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18591. /* end confdefs.h. */
  18592. #include <gnu-versions.h>
  18593. char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 : -1];
  18594. _ACEOF
  18595. if ac_fn_c_try_compile "$LINENO"; then :
  18596. gl_cv_gnu_glob_interface_version_1_2=yes
  18597. else
  18598. gl_cv_gnu_glob_interface_version_1_2=no
  18599. fi
  18600. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  18601. fi
  18602. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1_2" >&5
  18603. $as_echo "$gl_cv_gnu_glob_interface_version_1_2" >&6; }
  18604. if test "$gl_cv_gnu_glob_interface_version_1_2" = "no"; then
  18605. REPLACE_GLOB=1
  18606. fi
  18607. if test $REPLACE_GLOB = 0; then
  18608. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
  18609. $as_echo_n "checking whether glob lists broken symlinks... " >&6; }
  18610. if ${gl_cv_glob_lists_symlinks+:} false; then :
  18611. $as_echo_n "(cached) " >&6
  18612. else
  18613. if test $cross_compiling != yes; then
  18614. if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
  18615. gl_cv_glob_lists_symlinks=maybe
  18616. else
  18617. # If we can't make a symlink, then we cannot test this issue. Be
  18618. # pessimistic about this.
  18619. gl_cv_glob_lists_symlinks=no
  18620. fi
  18621. if test $gl_cv_glob_lists_symlinks = maybe; then
  18622. if test "$cross_compiling" = yes; then :
  18623. :
  18624. else
  18625. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18626. /* end confdefs.h. */
  18627. #include <stddef.h>
  18628. #include <glob.h>
  18629. int
  18630. main ()
  18631. {
  18632. glob_t found;
  18633. if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH)
  18634. return 1;
  18635. globfree (&found);
  18636. ;
  18637. return 0;
  18638. }
  18639. _ACEOF
  18640. if ac_fn_c_try_run "$LINENO"; then :
  18641. gl_cv_glob_lists_symlinks=yes
  18642. else
  18643. gl_cv_glob_lists_symlinks=no
  18644. fi
  18645. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  18646. conftest.$ac_objext conftest.beam conftest.$ac_ext
  18647. fi
  18648. fi
  18649. rm -f conf$$-globtest
  18650. else
  18651. gl_cv_glob_lists_symlinks="$gl_cross_guess_normal"
  18652. fi
  18653. fi
  18654. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
  18655. $as_echo "$gl_cv_glob_lists_symlinks" >&6; }
  18656. case "$gl_cv_glob_lists_symlinks" in
  18657. *yes) ;;
  18658. *) REPLACE_GLOB=1 ;;
  18659. esac
  18660. fi
  18661. fi
  18662. if test $ac_cv_func_glob_pattern_p = no; then
  18663. HAVE_GLOB_PATTERN_P=0
  18664. else
  18665. if test $REPLACE_GLOB = 1; then
  18666. REPLACE_GLOB_PATTERN_P=1
  18667. fi
  18668. fi
  18669. if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
  18670. GLOB_H='glob.h'
  18671. if test -n "$GLOB_H"; then
  18672. GL_GENERATE_GLOB_H_TRUE=
  18673. GL_GENERATE_GLOB_H_FALSE='#'
  18674. else
  18675. GL_GENERATE_GLOB_H_TRUE='#'
  18676. GL_GENERATE_GLOB_H_FALSE=
  18677. fi
  18678. fi
  18679. if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
  18680. gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
  18681. gl_LIBOBJS="$gl_LIBOBJS globfree.$ac_objext"
  18682. fi
  18683. if test $HAVE_GLOB_PATTERN_P = 0 || test $REPLACE_GLOB_PATTERN_P = 1; then
  18684. gl_LIBOBJS="$gl_LIBOBJS glob_pattern_p.$ac_objext"
  18685. fi
  18686. GNULIB_GLOB=1
  18687. $as_echo "#define GNULIB_TEST_GLOB 1" >>confdefs.h
  18688. LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
  18689. HAVE_INET_NTOP=1
  18690. INET_NTOP_LIB=
  18691. if test $ac_cv_header_sys_socket_h != yes; then
  18692. for ac_header in winsock2.h
  18693. do :
  18694. ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
  18695. if test "x$ac_cv_header_winsock2_h" = xyes; then :
  18696. cat >>confdefs.h <<_ACEOF
  18697. #define HAVE_WINSOCK2_H 1
  18698. _ACEOF
  18699. fi
  18700. done
  18701. fi
  18702. if test "$ac_cv_header_winsock2_h" = yes; then
  18703. HAVE_WINSOCK2_H=1
  18704. UNISTD_H_HAVE_WINSOCK2_H=1
  18705. SYS_IOCTL_H_HAVE_WINSOCK2_H=1
  18706. else
  18707. HAVE_WINSOCK2_H=0
  18708. fi
  18709. if test $HAVE_WINSOCK2_H = 1; then
  18710. REPLACE_INET_NTOP=1
  18711. ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
  18712. "
  18713. if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
  18714. ac_have_decl=1
  18715. else
  18716. ac_have_decl=0
  18717. fi
  18718. cat >>confdefs.h <<_ACEOF
  18719. #define HAVE_DECL_INET_NTOP $ac_have_decl
  18720. _ACEOF
  18721. if test $ac_cv_have_decl_inet_ntop = yes; then
  18722. INET_NTOP_LIB="-lws2_32"
  18723. else
  18724. HAVE_DECL_INET_NTOP=0
  18725. fi
  18726. else
  18727. gl_save_LIBS=$LIBS
  18728. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
  18729. $as_echo_n "checking for library containing inet_ntop... " >&6; }
  18730. if ${ac_cv_search_inet_ntop+:} false; then :
  18731. $as_echo_n "(cached) " >&6
  18732. else
  18733. ac_func_search_save_LIBS=$LIBS
  18734. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18735. /* end confdefs.h. */
  18736. /* Override any GCC internal prototype to avoid an error.
  18737. Use char because int might match the return type of a GCC
  18738. builtin and then its argument prototype would still apply. */
  18739. #ifdef __cplusplus
  18740. extern "C"
  18741. #endif
  18742. char inet_ntop ();
  18743. int
  18744. main ()
  18745. {
  18746. return inet_ntop ();
  18747. ;
  18748. return 0;
  18749. }
  18750. _ACEOF
  18751. for ac_lib in '' nsl resolv network; do
  18752. if test -z "$ac_lib"; then
  18753. ac_res="none required"
  18754. else
  18755. ac_res=-l$ac_lib
  18756. LIBS="-l$ac_lib $ac_func_search_save_LIBS"
  18757. fi
  18758. if ac_fn_c_try_link "$LINENO"; then :
  18759. ac_cv_search_inet_ntop=$ac_res
  18760. fi
  18761. rm -f core conftest.err conftest.$ac_objext \
  18762. conftest$ac_exeext
  18763. if ${ac_cv_search_inet_ntop+:} false; then :
  18764. break
  18765. fi
  18766. done
  18767. if ${ac_cv_search_inet_ntop+:} false; then :
  18768. else
  18769. ac_cv_search_inet_ntop=no
  18770. fi
  18771. rm conftest.$ac_ext
  18772. LIBS=$ac_func_search_save_LIBS
  18773. fi
  18774. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
  18775. $as_echo "$ac_cv_search_inet_ntop" >&6; }
  18776. ac_res=$ac_cv_search_inet_ntop
  18777. if test "$ac_res" != no; then :
  18778. test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  18779. else
  18780. for ac_func in inet_ntop
  18781. do :
  18782. ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
  18783. if test "x$ac_cv_func_inet_ntop" = xyes; then :
  18784. cat >>confdefs.h <<_ACEOF
  18785. #define HAVE_INET_NTOP 1
  18786. _ACEOF
  18787. fi
  18788. done
  18789. if test $ac_cv_func_inet_ntop = no; then
  18790. HAVE_INET_NTOP=0
  18791. fi
  18792. fi
  18793. LIBS=$gl_save_LIBS
  18794. if test "$ac_cv_search_inet_ntop" != "no" \
  18795. && test "$ac_cv_search_inet_ntop" != "none required"; then
  18796. INET_NTOP_LIB="$ac_cv_search_inet_ntop"
  18797. fi
  18798. ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
  18799. #if HAVE_NETDB_H
  18800. # include <netdb.h>
  18801. #endif
  18802. "
  18803. if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
  18804. ac_have_decl=1
  18805. else
  18806. ac_have_decl=0
  18807. fi
  18808. cat >>confdefs.h <<_ACEOF
  18809. #define HAVE_DECL_INET_NTOP $ac_have_decl
  18810. _ACEOF
  18811. if test $ac_cv_have_decl_inet_ntop = no; then
  18812. HAVE_DECL_INET_NTOP=0
  18813. fi
  18814. fi
  18815. if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
  18816. gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext"
  18817. fi
  18818. GNULIB_INET_NTOP=1
  18819. PRIPTR_PREFIX=
  18820. if test -n "$STDINT_H"; then
  18821. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18822. /* end confdefs.h. */
  18823. #ifdef _WIN64
  18824. LLP64
  18825. #endif
  18826. int
  18827. main ()
  18828. {
  18829. ;
  18830. return 0;
  18831. }
  18832. _ACEOF
  18833. if ac_fn_c_try_compile "$LINENO"; then :
  18834. PRIPTR_PREFIX='"l"'
  18835. else
  18836. PRIPTR_PREFIX='"ll"'
  18837. fi
  18838. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  18839. else
  18840. for glpfx in '' l ll I64; do
  18841. case $glpfx in
  18842. '') gltype1='int';;
  18843. l) gltype1='long int';;
  18844. ll) gltype1='long long int';;
  18845. I64) gltype1='__int64';;
  18846. esac
  18847. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18848. /* end confdefs.h. */
  18849. #include <stdint.h>
  18850. extern intptr_t foo;
  18851. extern $gltype1 foo;
  18852. int
  18853. main ()
  18854. {
  18855. ;
  18856. return 0;
  18857. }
  18858. _ACEOF
  18859. if ac_fn_c_try_compile "$LINENO"; then :
  18860. PRIPTR_PREFIX='"'$glpfx'"'
  18861. fi
  18862. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  18863. test -n "$PRIPTR_PREFIX" && break
  18864. done
  18865. fi
  18866. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
  18867. $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
  18868. if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
  18869. $as_echo_n "(cached) " >&6
  18870. else
  18871. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18872. /* end confdefs.h. */
  18873. /* Work also in C++ mode. */
  18874. #define __STDC_LIMIT_MACROS 1
  18875. /* Work if build is not clean. */
  18876. #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
  18877. #include <limits.h>
  18878. #if HAVE_STDINT_H
  18879. #include <stdint.h>
  18880. #endif
  18881. #if defined INT32_MAX && defined INTMAX_MAX
  18882. #define CONDITION (INT32_MAX < INTMAX_MAX)
  18883. #else
  18884. #define CONDITION (sizeof (int) < sizeof (long long int))
  18885. #endif
  18886. int test[CONDITION ? 1 : -1];
  18887. int
  18888. main ()
  18889. {
  18890. ;
  18891. return 0;
  18892. }
  18893. _ACEOF
  18894. if ac_fn_c_try_compile "$LINENO"; then :
  18895. gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
  18896. else
  18897. gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
  18898. fi
  18899. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  18900. fi
  18901. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
  18902. $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
  18903. if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
  18904. INT32_MAX_LT_INTMAX_MAX=1;
  18905. else
  18906. INT32_MAX_LT_INTMAX_MAX=0;
  18907. fi
  18908. if test $APPLE_UNIVERSAL_BUILD = 0; then
  18909. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
  18910. $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
  18911. if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
  18912. $as_echo_n "(cached) " >&6
  18913. else
  18914. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18915. /* end confdefs.h. */
  18916. /* Work also in C++ mode. */
  18917. #define __STDC_LIMIT_MACROS 1
  18918. /* Work if build is not clean. */
  18919. #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
  18920. #include <limits.h>
  18921. #if HAVE_STDINT_H
  18922. #include <stdint.h>
  18923. #endif
  18924. #if defined INT64_MAX
  18925. #define CONDITION (INT64_MAX == LONG_MAX)
  18926. #else
  18927. #define CONDITION (sizeof (long long int) == sizeof (long int))
  18928. #endif
  18929. int test[CONDITION ? 1 : -1];
  18930. int
  18931. main ()
  18932. {
  18933. ;
  18934. return 0;
  18935. }
  18936. _ACEOF
  18937. if ac_fn_c_try_compile "$LINENO"; then :
  18938. gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
  18939. else
  18940. gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
  18941. fi
  18942. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  18943. fi
  18944. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
  18945. $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
  18946. if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
  18947. INT64_MAX_EQ_LONG_MAX=1;
  18948. else
  18949. INT64_MAX_EQ_LONG_MAX=0;
  18950. fi
  18951. else
  18952. INT64_MAX_EQ_LONG_MAX=-1
  18953. fi
  18954. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
  18955. $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
  18956. if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
  18957. $as_echo_n "(cached) " >&6
  18958. else
  18959. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  18960. /* end confdefs.h. */
  18961. /* Work also in C++ mode. */
  18962. #define __STDC_LIMIT_MACROS 1
  18963. /* Work if build is not clean. */
  18964. #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
  18965. #include <limits.h>
  18966. #if HAVE_STDINT_H
  18967. #include <stdint.h>
  18968. #endif
  18969. #if defined UINT32_MAX && defined UINTMAX_MAX
  18970. #define CONDITION (UINT32_MAX < UINTMAX_MAX)
  18971. #else
  18972. #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
  18973. #endif
  18974. int test[CONDITION ? 1 : -1];
  18975. int
  18976. main ()
  18977. {
  18978. ;
  18979. return 0;
  18980. }
  18981. _ACEOF
  18982. if ac_fn_c_try_compile "$LINENO"; then :
  18983. gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
  18984. else
  18985. gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
  18986. fi
  18987. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  18988. fi
  18989. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
  18990. $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
  18991. if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
  18992. UINT32_MAX_LT_UINTMAX_MAX=1;
  18993. else
  18994. UINT32_MAX_LT_UINTMAX_MAX=0;
  18995. fi
  18996. if test $APPLE_UNIVERSAL_BUILD = 0; then
  18997. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
  18998. $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
  18999. if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
  19000. $as_echo_n "(cached) " >&6
  19001. else
  19002. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19003. /* end confdefs.h. */
  19004. /* Work also in C++ mode. */
  19005. #define __STDC_LIMIT_MACROS 1
  19006. /* Work if build is not clean. */
  19007. #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
  19008. #include <limits.h>
  19009. #if HAVE_STDINT_H
  19010. #include <stdint.h>
  19011. #endif
  19012. #if defined UINT64_MAX
  19013. #define CONDITION (UINT64_MAX == ULONG_MAX)
  19014. #else
  19015. #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
  19016. #endif
  19017. int test[CONDITION ? 1 : -1];
  19018. int
  19019. main ()
  19020. {
  19021. ;
  19022. return 0;
  19023. }
  19024. _ACEOF
  19025. if ac_fn_c_try_compile "$LINENO"; then :
  19026. gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
  19027. else
  19028. gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
  19029. fi
  19030. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  19031. fi
  19032. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
  19033. $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
  19034. if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
  19035. UINT64_MAX_EQ_ULONG_MAX=1;
  19036. else
  19037. UINT64_MAX_EQ_ULONG_MAX=0;
  19038. fi
  19039. else
  19040. UINT64_MAX_EQ_ULONG_MAX=-1
  19041. fi
  19042. if test $ac_cv_func_isblank = no; then
  19043. HAVE_ISBLANK=0
  19044. fi
  19045. if test $HAVE_ISBLANK = 0; then
  19046. gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
  19047. fi
  19048. cat >>confdefs.h <<_ACEOF
  19049. #define GNULIB_ISBLANK 1
  19050. _ACEOF
  19051. GNULIB_ISBLANK=1
  19052. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
  19053. $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
  19054. if ${gl_cv_func_isnand_no_libm+:} false; then :
  19055. $as_echo_n "(cached) " >&6
  19056. else
  19057. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19058. /* end confdefs.h. */
  19059. #include <math.h>
  19060. #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
  19061. # undef isnand
  19062. # define isnand(x) __builtin_isnan ((double)(x))
  19063. #else
  19064. # undef isnand
  19065. # define isnand(x) isnan ((double)(x))
  19066. #endif
  19067. double x;
  19068. int
  19069. main ()
  19070. {
  19071. return isnand (x);
  19072. ;
  19073. return 0;
  19074. }
  19075. _ACEOF
  19076. if ac_fn_c_try_link "$LINENO"; then :
  19077. gl_cv_func_isnand_no_libm=yes
  19078. else
  19079. gl_cv_func_isnand_no_libm=no
  19080. fi
  19081. rm -f core conftest.err conftest.$ac_objext \
  19082. conftest$ac_exeext conftest.$ac_ext
  19083. fi
  19084. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
  19085. $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
  19086. gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
  19087. if test $gl_cv_func_isnand_no_libm = yes; then
  19088. $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
  19089. fi
  19090. if test $gl_func_isnand_no_libm != yes; then
  19091. gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
  19092. fi
  19093. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
  19094. $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
  19095. if ${gl_cv_func_isnanl_no_libm+:} false; then :
  19096. $as_echo_n "(cached) " >&6
  19097. else
  19098. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19099. /* end confdefs.h. */
  19100. #include <math.h>
  19101. #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
  19102. # undef isnanl
  19103. # define isnanl(x) __builtin_isnan ((long double)(x))
  19104. #elif defined isnan
  19105. # undef isnanl
  19106. # define isnanl(x) isnan ((long double)(x))
  19107. #endif
  19108. long double x;
  19109. int
  19110. main ()
  19111. {
  19112. return isnanl (x);
  19113. ;
  19114. return 0;
  19115. }
  19116. _ACEOF
  19117. if ac_fn_c_try_link "$LINENO"; then :
  19118. gl_cv_func_isnanl_no_libm=yes
  19119. else
  19120. gl_cv_func_isnanl_no_libm=no
  19121. fi
  19122. rm -f core conftest.err conftest.$ac_objext \
  19123. conftest$ac_exeext conftest.$ac_ext
  19124. fi
  19125. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
  19126. $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
  19127. gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
  19128. if test $gl_func_isnanl_no_libm = yes; then
  19129. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
  19130. $as_echo_n "checking whether isnanl works... " >&6; }
  19131. if ${gl_cv_func_isnanl_works+:} false; then :
  19132. $as_echo_n "(cached) " >&6
  19133. else
  19134. if test "$cross_compiling" = yes; then :
  19135. case "$host_os" in
  19136. mingw*) # Guess yes on mingw, no on MSVC.
  19137. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19138. /* end confdefs.h. */
  19139. #ifdef __MINGW32__
  19140. Known
  19141. #endif
  19142. _ACEOF
  19143. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  19144. $EGREP "Known" >/dev/null 2>&1; then :
  19145. gl_cv_func_isnanl_works="guessing yes"
  19146. else
  19147. gl_cv_func_isnanl_works="guessing no"
  19148. fi
  19149. rm -f conftest*
  19150. ;;
  19151. *) gl_cv_func_isnanl_works="guessing yes" ;;
  19152. esac
  19153. else
  19154. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19155. /* end confdefs.h. */
  19156. #include <float.h>
  19157. #include <limits.h>
  19158. #include <math.h>
  19159. #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
  19160. # undef isnanl
  19161. # define isnanl(x) __builtin_isnan ((long double)(x))
  19162. #elif defined isnan
  19163. # undef isnanl
  19164. # define isnanl(x) isnan ((long double)(x))
  19165. #endif
  19166. #define NWORDS \
  19167. ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
  19168. typedef union { unsigned int word[NWORDS]; long double value; }
  19169. memory_long_double;
  19170. /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
  19171. runtime type conversion. */
  19172. #ifdef __sgi
  19173. static long double NaNl ()
  19174. {
  19175. double zero = 0.0;
  19176. return zero / zero;
  19177. }
  19178. #else
  19179. # define NaNl() (0.0L / 0.0L)
  19180. #endif
  19181. int main ()
  19182. {
  19183. int result = 0;
  19184. if (!isnanl (NaNl ()))
  19185. result |= 1;
  19186. {
  19187. memory_long_double m;
  19188. unsigned int i;
  19189. /* The isnanl function should be immune against changes in the sign bit and
  19190. in the mantissa bits. The xor operation twiddles a bit that can only be
  19191. a sign bit or a mantissa bit (since the exponent never extends to
  19192. bit 31). */
  19193. m.value = NaNl ();
  19194. m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
  19195. for (i = 0; i < NWORDS; i++)
  19196. m.word[i] |= 1;
  19197. if (!isnanl (m.value))
  19198. result |= 1;
  19199. }
  19200. #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
  19201. /* Representation of an 80-bit 'long double' as an initializer for a sequence
  19202. of 'unsigned int' words. */
  19203. # ifdef WORDS_BIGENDIAN
  19204. # define LDBL80_WORDS(exponent,manthi,mantlo) \
  19205. { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
  19206. ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
  19207. (unsigned int) (mantlo) << 16 \
  19208. }
  19209. # else
  19210. # define LDBL80_WORDS(exponent,manthi,mantlo) \
  19211. { mantlo, manthi, exponent }
  19212. # endif
  19213. { /* Quiet NaN. */
  19214. static memory_long_double x =
  19215. { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
  19216. if (!isnanl (x.value))
  19217. result |= 2;
  19218. }
  19219. {
  19220. /* Signalling NaN. */
  19221. static memory_long_double x =
  19222. { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
  19223. if (!isnanl (x.value))
  19224. result |= 2;
  19225. }
  19226. /* isnanl should return something even for noncanonical values. */
  19227. { /* Pseudo-NaN. */
  19228. static memory_long_double x =
  19229. { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
  19230. if (isnanl (x.value) && !isnanl (x.value))
  19231. result |= 4;
  19232. }
  19233. { /* Pseudo-Infinity. */
  19234. static memory_long_double x =
  19235. { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
  19236. if (isnanl (x.value) && !isnanl (x.value))
  19237. result |= 8;
  19238. }
  19239. { /* Pseudo-Zero. */
  19240. static memory_long_double x =
  19241. { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
  19242. if (isnanl (x.value) && !isnanl (x.value))
  19243. result |= 16;
  19244. }
  19245. { /* Unnormalized number. */
  19246. static memory_long_double x =
  19247. { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
  19248. if (isnanl (x.value) && !isnanl (x.value))
  19249. result |= 32;
  19250. }
  19251. { /* Pseudo-Denormal. */
  19252. static memory_long_double x =
  19253. { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
  19254. if (isnanl (x.value) && !isnanl (x.value))
  19255. result |= 64;
  19256. }
  19257. #endif
  19258. return result;
  19259. }
  19260. _ACEOF
  19261. if ac_fn_c_try_run "$LINENO"; then :
  19262. gl_cv_func_isnanl_works=yes
  19263. else
  19264. gl_cv_func_isnanl_works=no
  19265. fi
  19266. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  19267. conftest.$ac_objext conftest.beam conftest.$ac_ext
  19268. fi
  19269. fi
  19270. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
  19271. $as_echo "$gl_cv_func_isnanl_works" >&6; }
  19272. case "$gl_cv_func_isnanl_works" in
  19273. *yes) ;;
  19274. *) gl_func_isnanl_no_libm=no ;;
  19275. esac
  19276. fi
  19277. if test $gl_func_isnanl_no_libm = yes; then
  19278. $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
  19279. fi
  19280. if test $gl_func_isnanl_no_libm != yes; then
  19281. gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
  19282. { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
  19283. $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
  19284. if ${gl_cv_cc_long_double_expbit0+:} false; then :
  19285. $as_echo_n "(cached) " >&6
  19286. else
  19287. if test "$cross_compiling" = yes; then :
  19288. gl_cv_cc_long_double_expbit0="unknown"
  19289. case "$host_os" in
  19290. mingw*) # On native Windows (little-endian), we know the result
  19291. # in two cases: mingw, MSVC.
  19292. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19293. /* end confdefs.h. */
  19294. #ifdef __MINGW32__
  19295. Known
  19296. #endif
  19297. _ACEOF
  19298. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  19299. $EGREP "Known" >/dev/null 2>&1; then :
  19300. gl_cv_cc_long_double_expbit0="word 2 bit 0"
  19301. fi
  19302. rm -f conftest*
  19303. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19304. /* end confdefs.h. */
  19305. #ifdef _MSC_VER
  19306. Known
  19307. #endif
  19308. _ACEOF
  19309. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  19310. $EGREP "Known" >/dev/null 2>&1; then :
  19311. gl_cv_cc_long_double_expbit0="word 1 bit 20"
  19312. fi
  19313. rm -f conftest*
  19314. ;;
  19315. esac
  19316. else
  19317. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19318. /* end confdefs.h. */
  19319. #include <float.h>
  19320. #include <stddef.h>
  19321. #include <stdio.h>
  19322. #include <string.h>
  19323. #define NWORDS \
  19324. ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
  19325. typedef union { long double value; unsigned int word[NWORDS]; }
  19326. memory_long_double;
  19327. static unsigned int ored_words[NWORDS];
  19328. static unsigned int anded_words[NWORDS];
  19329. static void add_to_ored_words (long double *x)
  19330. {
  19331. memory_long_double m;
  19332. size_t i;
  19333. /* Clear it first, in case
  19334. sizeof (long double) < sizeof (memory_long_double). */
  19335. memset (&m, 0, sizeof (memory_long_double));
  19336. m.value = *x;
  19337. for (i = 0; i < NWORDS; i++)
  19338. {
  19339. ored_words[i] |= m.word[i];
  19340. anded_words[i] &= m.word[i];
  19341. }
  19342. }
  19343. int main ()
  19344. {
  19345. static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L };
  19346. size_t j;
  19347. FILE *fp = fopen ("conftest.out", "w");
  19348. if (fp == NULL)
  19349. return 1;
  19350. for (j = 0; j < NWORDS; j++)
  19351. anded_words[j] = ~ (unsigned int) 0;
  19352. for (j = 0; j < 5; j++)
  19353. add_to_ored_words (&samples[j]);
  19354. /* Remove bits that are common (e.g. if representation of the first mantissa
  19355. bit is explicit). */
  19356. for (j = 0; j < NWORDS; j++)
  19357. ored_words[j] &= ~anded_words[j];
  19358. /* Now find the nonzero word. */
  19359. for (j = 0; j < NWORDS; j++)
  19360. if (ored_words[j] != 0)
  19361. break;
  19362. if (j < NWORDS)
  19363. {
  19364. size_t i;
  19365. for (i = j + 1; i < NWORDS; i++)
  19366. if (ored_words[i] != 0)
  19367. {
  19368. fprintf (fp, "unknown");
  19369. return (fclose (fp) != 0);
  19370. }
  19371. for (i = 0; ; i++)
  19372. if ((ored_words[j] >> i) & 1)
  19373. {
  19374. fprintf (fp, "word %d bit %d", (int) j, (int) i);
  19375. return (fclose (fp) != 0);
  19376. }
  19377. }
  19378. fprintf (fp, "unknown");
  19379. return (fclose (fp) != 0);
  19380. }
  19381. _ACEOF
  19382. if ac_fn_c_try_run "$LINENO"; then :
  19383. gl_cv_cc_long_double_expbit0=`cat conftest.out`
  19384. else
  19385. gl_cv_cc_long_double_expbit0="unknown"
  19386. fi
  19387. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  19388. conftest.$ac_objext conftest.beam conftest.$ac_ext
  19389. fi
  19390. rm -f conftest.out
  19391. fi
  19392. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
  19393. $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
  19394. case "$gl_cv_cc_long_double_expbit0" in
  19395. word*bit*)
  19396. word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
  19397. bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
  19398. cat >>confdefs.h <<_ACEOF
  19399. #define LDBL_EXPBIT0_WORD $word
  19400. _ACEOF
  19401. cat >>confdefs.h <<_ACEOF
  19402. #define LDBL_EXPBIT0_BIT $bit
  19403. _ACEOF
  19404. ;;
  19405. esac
  19406. fi
  19407. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
  19408. $as_echo_n "checking whether the compiler supports the __inline keyword... " >&6; }
  19409. if ${gl_cv_c___inline+:} false; then :
  19410. $as_echo_n "(cached) " >&6
  19411. else
  19412. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19413. /* end confdefs.h. */
  19414. typedef int foo_t;
  19415. static __inline foo_t foo (void) { return 0; }
  19416. int
  19417. main ()
  19418. {
  19419. return foo ();
  19420. ;
  19421. return 0;
  19422. }
  19423. _ACEOF
  19424. if ac_fn_c_try_compile "$LINENO"; then :
  19425. gl_cv_c___inline=yes
  19426. else
  19427. gl_cv_c___inline=no
  19428. fi
  19429. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  19430. fi
  19431. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
  19432. $as_echo "$gl_cv_c___inline" >&6; }
  19433. if test $gl_cv_c___inline = yes; then
  19434. $as_echo "#define HAVE___INLINE 1" >>confdefs.h
  19435. fi
  19436. if test "$ac_cv_header_winsock2_h" = yes; then
  19437. gl_LIBOBJS="$gl_LIBOBJS listen.$ac_objext"
  19438. fi
  19439. GNULIB_LISTEN=1
  19440. $as_echo "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
  19441. LOCALCHARSET_TESTS_ENVIRONMENT=
  19442. case "$host_os" in
  19443. solaris*)
  19444. $as_echo "#define _LCONV_C99 1" >>confdefs.h
  19445. ;;
  19446. esac
  19447. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
  19448. $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
  19449. if ${gl_cv_header_locale_h_posix2001+:} false; then :
  19450. $as_echo_n "(cached) " >&6
  19451. else
  19452. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19453. /* end confdefs.h. */
  19454. #include <locale.h>
  19455. int x = LC_MESSAGES;
  19456. int y = sizeof (((struct lconv *) 0)->decimal_point);
  19457. int
  19458. main ()
  19459. {
  19460. ;
  19461. return 0;
  19462. }
  19463. _ACEOF
  19464. if ac_fn_c_try_compile "$LINENO"; then :
  19465. gl_cv_header_locale_h_posix2001=yes
  19466. else
  19467. gl_cv_header_locale_h_posix2001=no
  19468. fi
  19469. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  19470. fi
  19471. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
  19472. $as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
  19473. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
  19474. $as_echo_n "checking whether struct lconv is properly defined... " >&6; }
  19475. if ${gl_cv_sys_struct_lconv_ok+:} false; then :
  19476. $as_echo_n "(cached) " >&6
  19477. else
  19478. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19479. /* end confdefs.h. */
  19480. #include <locale.h>
  19481. struct lconv l;
  19482. int x = sizeof (l.decimal_point);
  19483. int y = sizeof (l.int_p_cs_precedes);
  19484. int
  19485. main ()
  19486. {
  19487. ;
  19488. return 0;
  19489. }
  19490. _ACEOF
  19491. if ac_fn_c_try_compile "$LINENO"; then :
  19492. gl_cv_sys_struct_lconv_ok=yes
  19493. else
  19494. gl_cv_sys_struct_lconv_ok=no
  19495. fi
  19496. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  19497. fi
  19498. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
  19499. $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
  19500. if test $gl_cv_sys_struct_lconv_ok = no; then
  19501. case "$host_os" in
  19502. mingw*)
  19503. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19504. /* end confdefs.h. */
  19505. #ifdef _MSC_VER
  19506. Special
  19507. #endif
  19508. _ACEOF
  19509. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  19510. $EGREP "Special" >/dev/null 2>&1; then :
  19511. else
  19512. REPLACE_STRUCT_LCONV=1
  19513. fi
  19514. rm -f conftest*
  19515. ;;
  19516. *) REPLACE_STRUCT_LCONV=1 ;;
  19517. esac
  19518. fi
  19519. if test $gl_cv_have_include_next = yes; then
  19520. gl_cv_next_locale_h='<'locale.h'>'
  19521. else
  19522. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
  19523. $as_echo_n "checking absolute name of <locale.h>... " >&6; }
  19524. if ${gl_cv_next_locale_h+:} false; then :
  19525. $as_echo_n "(cached) " >&6
  19526. else
  19527. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19528. /* end confdefs.h. */
  19529. #include <locale.h>
  19530. _ACEOF
  19531. case "$host_os" in
  19532. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  19533. *) gl_absname_cpp="$ac_cpp" ;;
  19534. esac
  19535. case "$host_os" in
  19536. mingw*)
  19537. gl_dirsep_regex='[/\\]'
  19538. ;;
  19539. *)
  19540. gl_dirsep_regex='\/'
  19541. ;;
  19542. esac
  19543. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  19544. gl_header_literal_regex=`echo 'locale.h' \
  19545. | sed -e "$gl_make_literal_regex_sed"`
  19546. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  19547. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  19548. s|^/[^/]|//&|
  19549. p
  19550. q
  19551. }'
  19552. gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  19553. sed -n "$gl_absolute_header_sed"`
  19554. gl_header=$gl_cv_absolute_locale_h
  19555. gl_cv_next_locale_h='"'$gl_header'"'
  19556. fi
  19557. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
  19558. $as_echo "$gl_cv_next_locale_h" >&6; }
  19559. fi
  19560. NEXT_LOCALE_H=$gl_cv_next_locale_h
  19561. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  19562. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  19563. gl_next_as_first_directive='<'locale.h'>'
  19564. else
  19565. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  19566. gl_next_as_first_directive=$gl_cv_next_locale_h
  19567. fi
  19568. NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
  19569. if test "$gl_threads_api" = posix; then
  19570. # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
  19571. # pthread_rwlock_* functions.
  19572. has_rwlock=false
  19573. ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
  19574. "
  19575. if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
  19576. has_rwlock=true
  19577. $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
  19578. fi
  19579. if $has_rwlock; then
  19580. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
  19581. $as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
  19582. if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then :
  19583. $as_echo_n "(cached) " >&6
  19584. else
  19585. save_LIBS="$LIBS"
  19586. LIBS="$LIBS $LIBMULTITHREAD"
  19587. if test "$cross_compiling" = yes; then :
  19588. case "$host_os" in
  19589. # Guess no on glibc systems.
  19590. *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
  19591. # Guess no on musl systems.
  19592. *-musl*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
  19593. # Guess no on bionic systems.
  19594. *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
  19595. # Guess yes on native Windows with the mingw-w64 winpthreads library.
  19596. # Guess no on native Windows with the gnulib windows-rwlock module.
  19597. mingw*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
  19598. gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
  19599. else
  19600. gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
  19601. fi
  19602. ;;
  19603. # If we don't know, obey --enable-cross-guesses.
  19604. *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
  19605. esac
  19606. else
  19607. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19608. /* end confdefs.h. */
  19609. #include <errno.h>
  19610. #include <pthread.h>
  19611. #include <stdlib.h>
  19612. #include <unistd.h>
  19613. #define SUCCEED() exit (0)
  19614. #define FAILURE() exit (1)
  19615. #define UNEXPECTED(n) (exit (10 + (n)))
  19616. /* The main thread creates the waiting writer and the requesting reader threads
  19617. in the default way; this guarantees that they have the same priority.
  19618. We can reuse the main thread as first reader thread. */
  19619. static pthread_rwlock_t lock;
  19620. static pthread_t reader1;
  19621. static pthread_t writer;
  19622. static pthread_t reader2;
  19623. static pthread_t timer;
  19624. /* Used to pass control from writer to reader2 and from reader2 to timer,
  19625. as in a relay race.
  19626. Passing control from one running thread to another running thread
  19627. is most likely faster than to create the second thread. */
  19628. static pthread_mutex_t baton;
  19629. static void *
  19630. timer_func (void *ignored)
  19631. {
  19632. /* Step 13 (can be before or after step 12):
  19633. The timer thread takes the baton, then waits a moment to make sure
  19634. it can tell whether the second reader thread is blocked at step 12. */
  19635. if (pthread_mutex_lock (&baton))
  19636. UNEXPECTED (13);
  19637. usleep (100000);
  19638. /* By the time we get here, it's clear that the second reader thread is
  19639. blocked at step 12. This is the desired behaviour. */
  19640. SUCCEED ();
  19641. }
  19642. static void *
  19643. reader2_func (void *ignored)
  19644. {
  19645. int err;
  19646. /* Step 8 (can be before or after step 7):
  19647. The second reader thread takes the baton, then waits a moment to make sure
  19648. the writer thread has reached step 7. */
  19649. if (pthread_mutex_lock (&baton))
  19650. UNEXPECTED (8);
  19651. usleep (100000);
  19652. /* Step 9: The second reader thread requests the lock. */
  19653. err = pthread_rwlock_tryrdlock (&lock);
  19654. if (err == 0)
  19655. FAILURE ();
  19656. else if (err != EBUSY)
  19657. UNEXPECTED (9);
  19658. /* Step 10: Launch a timer, to test whether the next call blocks. */
  19659. if (pthread_create (&timer, NULL, timer_func, NULL))
  19660. UNEXPECTED (10);
  19661. /* Step 11: Release the baton. */
  19662. if (pthread_mutex_unlock (&baton))
  19663. UNEXPECTED (11);
  19664. /* Step 12: The second reader thread requests the lock. */
  19665. err = pthread_rwlock_rdlock (&lock);
  19666. if (err == 0)
  19667. FAILURE ();
  19668. else
  19669. UNEXPECTED (12);
  19670. }
  19671. static void *
  19672. writer_func (void *ignored)
  19673. {
  19674. /* Step 4: Take the baton, so that the second reader thread does not go ahead
  19675. too early. */
  19676. if (pthread_mutex_lock (&baton))
  19677. UNEXPECTED (4);
  19678. /* Step 5: Create the second reader thread. */
  19679. if (pthread_create (&reader2, NULL, reader2_func, NULL))
  19680. UNEXPECTED (5);
  19681. /* Step 6: Release the baton. */
  19682. if (pthread_mutex_unlock (&baton))
  19683. UNEXPECTED (6);
  19684. /* Step 7: The writer thread requests the lock. */
  19685. if (pthread_rwlock_wrlock (&lock))
  19686. UNEXPECTED (7);
  19687. return NULL;
  19688. }
  19689. int
  19690. main ()
  19691. {
  19692. reader1 = pthread_self ();
  19693. /* Step 1: The main thread initializes the lock and the baton. */
  19694. if (pthread_rwlock_init (&lock, NULL))
  19695. UNEXPECTED (1);
  19696. if (pthread_mutex_init (&baton, NULL))
  19697. UNEXPECTED (1);
  19698. /* Step 2: The main thread acquires the lock as a reader. */
  19699. if (pthread_rwlock_rdlock (&lock))
  19700. UNEXPECTED (2);
  19701. /* Step 3: Create the writer thread. */
  19702. if (pthread_create (&writer, NULL, writer_func, NULL))
  19703. UNEXPECTED (3);
  19704. /* Job done. Go to sleep. */
  19705. for (;;)
  19706. {
  19707. sleep (1);
  19708. }
  19709. }
  19710. _ACEOF
  19711. if ac_fn_c_try_run "$LINENO"; then :
  19712. gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
  19713. else
  19714. gl_cv_pthread_rwlock_rdlock_prefer_writer=no
  19715. fi
  19716. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  19717. conftest.$ac_objext conftest.beam conftest.$ac_ext
  19718. fi
  19719. LIBS="$save_LIBS"
  19720. fi
  19721. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
  19722. $as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
  19723. case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
  19724. *yes)
  19725. $as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
  19726. ;;
  19727. esac
  19728. fi
  19729. # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
  19730. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19731. /* end confdefs.h. */
  19732. #include <pthread.h>
  19733. int
  19734. main ()
  19735. {
  19736. #if __FreeBSD__ == 4
  19737. error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
  19738. #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
  19739. && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
  19740. error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
  19741. #else
  19742. int x = (int)PTHREAD_MUTEX_RECURSIVE;
  19743. return !x;
  19744. #endif
  19745. ;
  19746. return 0;
  19747. }
  19748. _ACEOF
  19749. if ac_fn_c_try_compile "$LINENO"; then :
  19750. $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
  19751. fi
  19752. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  19753. fi
  19754. :
  19755. cat >>confdefs.h <<_ACEOF
  19756. #define GNULIB_LOCK 1
  19757. _ACEOF
  19758. if test $ac_cv_func_lstat = yes; then
  19759. case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
  19760. solaris* | *no)
  19761. REPLACE_LSTAT=1
  19762. ;;
  19763. esac
  19764. else
  19765. HAVE_LSTAT=0
  19766. fi
  19767. if test $REPLACE_LSTAT = 1; then
  19768. gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
  19769. :
  19770. fi
  19771. GNULIB_LSTAT=1
  19772. $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
  19773. if test $gl_cv_func_malloc_posix = yes; then
  19774. $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
  19775. else
  19776. REPLACE_MALLOC=1
  19777. fi
  19778. if test $REPLACE_MALLOC = 1; then
  19779. gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
  19780. fi
  19781. GNULIB_MALLOC_POSIX=1
  19782. $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
  19783. if test $gl_cv_have_include_next = yes; then
  19784. gl_cv_next_math_h='<'math.h'>'
  19785. else
  19786. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
  19787. $as_echo_n "checking absolute name of <math.h>... " >&6; }
  19788. if ${gl_cv_next_math_h+:} false; then :
  19789. $as_echo_n "(cached) " >&6
  19790. else
  19791. if test $ac_cv_header_math_h = yes; then
  19792. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19793. /* end confdefs.h. */
  19794. #include <math.h>
  19795. _ACEOF
  19796. case "$host_os" in
  19797. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  19798. *) gl_absname_cpp="$ac_cpp" ;;
  19799. esac
  19800. case "$host_os" in
  19801. mingw*)
  19802. gl_dirsep_regex='[/\\]'
  19803. ;;
  19804. *)
  19805. gl_dirsep_regex='\/'
  19806. ;;
  19807. esac
  19808. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  19809. gl_header_literal_regex=`echo 'math.h' \
  19810. | sed -e "$gl_make_literal_regex_sed"`
  19811. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  19812. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  19813. s|^/[^/]|//&|
  19814. p
  19815. q
  19816. }'
  19817. gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  19818. sed -n "$gl_absolute_header_sed"`
  19819. gl_header=$gl_cv_absolute_math_h
  19820. gl_cv_next_math_h='"'$gl_header'"'
  19821. else
  19822. gl_cv_next_math_h='<'math.h'>'
  19823. fi
  19824. fi
  19825. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
  19826. $as_echo "$gl_cv_next_math_h" >&6; }
  19827. fi
  19828. NEXT_MATH_H=$gl_cv_next_math_h
  19829. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  19830. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  19831. gl_next_as_first_directive='<'math.h'>'
  19832. else
  19833. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  19834. gl_next_as_first_directive=$gl_cv_next_math_h
  19835. fi
  19836. NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
  19837. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
  19838. $as_echo_n "checking whether NAN macro works... " >&6; }
  19839. if ${gl_cv_header_math_nan_works+:} false; then :
  19840. $as_echo_n "(cached) " >&6
  19841. else
  19842. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19843. /* end confdefs.h. */
  19844. #include <math.h>
  19845. int
  19846. main ()
  19847. {
  19848. /* Solaris 10 has a broken definition of NAN. Other platforms
  19849. fail to provide NAN, or provide it only in C99 mode; this
  19850. test only needs to fail when NAN is provided but wrong. */
  19851. float f = 1.0f;
  19852. #ifdef NAN
  19853. f = NAN;
  19854. #endif
  19855. return f == 0;
  19856. ;
  19857. return 0;
  19858. }
  19859. _ACEOF
  19860. if ac_fn_c_try_compile "$LINENO"; then :
  19861. gl_cv_header_math_nan_works=yes
  19862. else
  19863. gl_cv_header_math_nan_works=no
  19864. fi
  19865. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  19866. fi
  19867. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
  19868. $as_echo "$gl_cv_header_math_nan_works" >&6; }
  19869. if test $gl_cv_header_math_nan_works = no; then
  19870. REPLACE_NAN=1
  19871. fi
  19872. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
  19873. $as_echo_n "checking whether HUGE_VAL works... " >&6; }
  19874. if ${gl_cv_header_math_huge_val_works+:} false; then :
  19875. $as_echo_n "(cached) " >&6
  19876. else
  19877. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19878. /* end confdefs.h. */
  19879. #include <math.h>
  19880. int
  19881. main ()
  19882. {
  19883. /* Solaris 10 has a broken definition of HUGE_VAL. */
  19884. double d = HUGE_VAL;
  19885. return d == 0;
  19886. ;
  19887. return 0;
  19888. }
  19889. _ACEOF
  19890. if ac_fn_c_try_compile "$LINENO"; then :
  19891. gl_cv_header_math_huge_val_works=yes
  19892. else
  19893. gl_cv_header_math_huge_val_works=no
  19894. fi
  19895. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  19896. fi
  19897. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
  19898. $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
  19899. if test $gl_cv_header_math_huge_val_works = no; then
  19900. REPLACE_HUGE_VAL=1
  19901. fi
  19902. if case "$host_os" in
  19903. mingw*) true ;;
  19904. *) test $ac_cv_func_mbsinit = yes ;;
  19905. esac \
  19906. && test $ac_cv_func_mbrtowc = yes; then
  19907. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
  19908. $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
  19909. if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
  19910. $as_echo_n "(cached) " >&6
  19911. else
  19912. case "$host_os" in
  19913. # Guess no on AIX and OSF/1.
  19914. aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
  19915. # Guess yes otherwise.
  19916. *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
  19917. esac
  19918. if test $LOCALE_JA != none; then
  19919. if test "$cross_compiling" = yes; then :
  19920. :
  19921. else
  19922. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19923. /* end confdefs.h. */
  19924. #include <locale.h>
  19925. #include <string.h>
  19926. #include <wchar.h>
  19927. int main ()
  19928. {
  19929. if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
  19930. {
  19931. const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
  19932. mbstate_t state;
  19933. wchar_t wc;
  19934. memset (&state, '\0', sizeof (mbstate_t));
  19935. if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
  19936. if (mbsinit (&state))
  19937. return 2;
  19938. }
  19939. return 0;
  19940. }
  19941. _ACEOF
  19942. if ac_fn_c_try_run "$LINENO"; then :
  19943. gl_cv_func_mbrtowc_incomplete_state=yes
  19944. else
  19945. gl_cv_func_mbrtowc_incomplete_state=no
  19946. fi
  19947. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  19948. conftest.$ac_objext conftest.beam conftest.$ac_ext
  19949. fi
  19950. else
  19951. if test $LOCALE_FR_UTF8 != none; then
  19952. if test "$cross_compiling" = yes; then :
  19953. :
  19954. else
  19955. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  19956. /* end confdefs.h. */
  19957. #include <locale.h>
  19958. #include <string.h>
  19959. #include <wchar.h>
  19960. int main ()
  19961. {
  19962. if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
  19963. {
  19964. const char input[] = "B\303\274\303\237er"; /* "Büßer" */
  19965. mbstate_t state;
  19966. wchar_t wc;
  19967. memset (&state, '\0', sizeof (mbstate_t));
  19968. if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
  19969. if (mbsinit (&state))
  19970. return 2;
  19971. }
  19972. return 0;
  19973. }
  19974. _ACEOF
  19975. if ac_fn_c_try_run "$LINENO"; then :
  19976. gl_cv_func_mbrtowc_incomplete_state=yes
  19977. else
  19978. gl_cv_func_mbrtowc_incomplete_state=no
  19979. fi
  19980. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  19981. conftest.$ac_objext conftest.beam conftest.$ac_ext
  19982. fi
  19983. fi
  19984. fi
  19985. fi
  19986. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
  19987. $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
  19988. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
  19989. $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
  19990. if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
  19991. $as_echo_n "(cached) " >&6
  19992. else
  19993. case "$host_os" in
  19994. # Guess no on Solaris 8.
  19995. solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
  19996. # Guess yes otherwise.
  19997. *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
  19998. esac
  19999. if test $LOCALE_ZH_CN != none; then
  20000. if test "$cross_compiling" = yes; then :
  20001. :
  20002. else
  20003. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20004. /* end confdefs.h. */
  20005. #include <locale.h>
  20006. #include <stdlib.h>
  20007. #include <string.h>
  20008. #include <wchar.h>
  20009. int main ()
  20010. {
  20011. /* This fails on Solaris 8:
  20012. mbrtowc returns 2, and sets wc to 0x00F0.
  20013. mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
  20014. if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
  20015. {
  20016. char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
  20017. mbstate_t state;
  20018. wchar_t wc;
  20019. memset (&state, '\0', sizeof (mbstate_t));
  20020. if (mbrtowc (&wc, input + 3, 6, &state) != 4
  20021. && mbtowc (&wc, input + 3, 6) == 4)
  20022. return 2;
  20023. }
  20024. return 0;
  20025. }
  20026. _ACEOF
  20027. if ac_fn_c_try_run "$LINENO"; then :
  20028. gl_cv_func_mbrtowc_sanitycheck=yes
  20029. else
  20030. gl_cv_func_mbrtowc_sanitycheck=no
  20031. fi
  20032. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  20033. conftest.$ac_objext conftest.beam conftest.$ac_ext
  20034. fi
  20035. fi
  20036. fi
  20037. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
  20038. $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
  20039. REPLACE_MBSTATE_T=0
  20040. case "$gl_cv_func_mbrtowc_incomplete_state" in
  20041. *yes) ;;
  20042. *) REPLACE_MBSTATE_T=1 ;;
  20043. esac
  20044. case "$gl_cv_func_mbrtowc_sanitycheck" in
  20045. *yes) ;;
  20046. *) REPLACE_MBSTATE_T=1 ;;
  20047. esac
  20048. else
  20049. REPLACE_MBSTATE_T=1
  20050. fi
  20051. if test $ac_cv_func_mbrtowc = no; then
  20052. HAVE_MBRTOWC=0
  20053. ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
  20054. #include <wchar.h>
  20055. "
  20056. if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
  20057. ac_have_decl=1
  20058. else
  20059. ac_have_decl=0
  20060. fi
  20061. cat >>confdefs.h <<_ACEOF
  20062. #define HAVE_DECL_MBRTOWC $ac_have_decl
  20063. _ACEOF
  20064. if test $ac_cv_have_decl_mbrtowc = yes; then
  20065. REPLACE_MBRTOWC=1
  20066. fi
  20067. else
  20068. if test $REPLACE_MBSTATE_T = 1; then
  20069. REPLACE_MBRTOWC=1
  20070. else
  20071. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
  20072. $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
  20073. if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
  20074. $as_echo_n "(cached) " >&6
  20075. else
  20076. case "$host_os" in
  20077. # Guess no on Solaris.
  20078. solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
  20079. # Guess yes otherwise.
  20080. *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
  20081. esac
  20082. if test $LOCALE_FR_UTF8 != none; then
  20083. if test "$cross_compiling" = yes; then :
  20084. :
  20085. else
  20086. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20087. /* end confdefs.h. */
  20088. #include <locale.h>
  20089. #include <stdlib.h>
  20090. #include <string.h>
  20091. #include <wchar.h>
  20092. int main ()
  20093. {
  20094. int result = 0;
  20095. if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
  20096. {
  20097. char input[] = "\303\237er";
  20098. mbstate_t state;
  20099. wchar_t wc;
  20100. size_t ret;
  20101. memset (&state, '\0', sizeof (mbstate_t));
  20102. wc = (wchar_t) 0xBADFACE;
  20103. ret = mbrtowc (&wc, input, 5, &state);
  20104. if (ret != 2)
  20105. result |= 1;
  20106. if (!mbsinit (&state))
  20107. result |= 2;
  20108. memset (&state, '\0', sizeof (mbstate_t));
  20109. ret = mbrtowc (NULL, input, 5, &state);
  20110. if (ret != 2) /* Solaris 7 fails here: ret is -1. */
  20111. result |= 4;
  20112. if (!mbsinit (&state))
  20113. result |= 8;
  20114. }
  20115. return result;
  20116. }
  20117. _ACEOF
  20118. if ac_fn_c_try_run "$LINENO"; then :
  20119. gl_cv_func_mbrtowc_null_arg1=yes
  20120. else
  20121. gl_cv_func_mbrtowc_null_arg1=no
  20122. fi
  20123. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  20124. conftest.$ac_objext conftest.beam conftest.$ac_ext
  20125. fi
  20126. fi
  20127. fi
  20128. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
  20129. $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
  20130. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
  20131. $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
  20132. if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
  20133. $as_echo_n "(cached) " >&6
  20134. else
  20135. case "$host_os" in
  20136. # Guess no on OSF/1.
  20137. osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
  20138. # Guess yes otherwise.
  20139. *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
  20140. esac
  20141. if test $LOCALE_FR_UTF8 != none; then
  20142. if test "$cross_compiling" = yes; then :
  20143. :
  20144. else
  20145. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20146. /* end confdefs.h. */
  20147. #include <locale.h>
  20148. #include <string.h>
  20149. #include <wchar.h>
  20150. int main ()
  20151. {
  20152. if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
  20153. {
  20154. mbstate_t state;
  20155. wchar_t wc;
  20156. int ret;
  20157. memset (&state, '\0', sizeof (mbstate_t));
  20158. wc = (wchar_t) 0xBADFACE;
  20159. mbrtowc (&wc, NULL, 5, &state);
  20160. /* Check that wc was not modified. */
  20161. if (wc != (wchar_t) 0xBADFACE)
  20162. return 2;
  20163. }
  20164. return 0;
  20165. }
  20166. _ACEOF
  20167. if ac_fn_c_try_run "$LINENO"; then :
  20168. gl_cv_func_mbrtowc_null_arg2=yes
  20169. else
  20170. gl_cv_func_mbrtowc_null_arg2=no
  20171. fi
  20172. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  20173. conftest.$ac_objext conftest.beam conftest.$ac_ext
  20174. fi
  20175. fi
  20176. fi
  20177. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
  20178. $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
  20179. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
  20180. $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
  20181. if ${gl_cv_func_mbrtowc_retval+:} false; then :
  20182. $as_echo_n "(cached) " >&6
  20183. else
  20184. case "$host_os" in
  20185. # Guess no on HP-UX, Solaris, native Windows.
  20186. hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
  20187. # Guess yes otherwise.
  20188. *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
  20189. esac
  20190. if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
  20191. || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
  20192. if test "$cross_compiling" = yes; then :
  20193. :
  20194. else
  20195. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20196. /* end confdefs.h. */
  20197. #include <locale.h>
  20198. #include <string.h>
  20199. #include <wchar.h>
  20200. int main ()
  20201. {
  20202. int result = 0;
  20203. int found_some_locale = 0;
  20204. /* This fails on Solaris. */
  20205. if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
  20206. {
  20207. char input[] = "B\303\274\303\237er"; /* "Büßer" */
  20208. mbstate_t state;
  20209. wchar_t wc;
  20210. memset (&state, '\0', sizeof (mbstate_t));
  20211. if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
  20212. {
  20213. input[1] = '\0';
  20214. if (mbrtowc (&wc, input + 2, 5, &state) != 1)
  20215. result |= 1;
  20216. }
  20217. found_some_locale = 1;
  20218. }
  20219. /* This fails on HP-UX 11.11. */
  20220. if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
  20221. {
  20222. char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
  20223. mbstate_t state;
  20224. wchar_t wc;
  20225. memset (&state, '\0', sizeof (mbstate_t));
  20226. if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
  20227. {
  20228. input[1] = '\0';
  20229. if (mbrtowc (&wc, input + 2, 5, &state) != 2)
  20230. result |= 2;
  20231. }
  20232. found_some_locale = 1;
  20233. }
  20234. /* This fails on native Windows. */
  20235. if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
  20236. {
  20237. char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
  20238. mbstate_t state;
  20239. wchar_t wc;
  20240. memset (&state, '\0', sizeof (mbstate_t));
  20241. if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
  20242. {
  20243. input[3] = '\0';
  20244. if (mbrtowc (&wc, input + 4, 4, &state) != 1)
  20245. result |= 4;
  20246. }
  20247. found_some_locale = 1;
  20248. }
  20249. if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
  20250. {
  20251. char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
  20252. mbstate_t state;
  20253. wchar_t wc;
  20254. memset (&state, '\0', sizeof (mbstate_t));
  20255. if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
  20256. {
  20257. input[3] = '\0';
  20258. if (mbrtowc (&wc, input + 4, 4, &state) != 1)
  20259. result |= 8;
  20260. }
  20261. found_some_locale = 1;
  20262. }
  20263. if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
  20264. {
  20265. char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
  20266. mbstate_t state;
  20267. wchar_t wc;
  20268. memset (&state, '\0', sizeof (mbstate_t));
  20269. if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
  20270. {
  20271. input[3] = '\0';
  20272. if (mbrtowc (&wc, input + 4, 4, &state) != 1)
  20273. result |= 16;
  20274. }
  20275. found_some_locale = 1;
  20276. }
  20277. return (found_some_locale ? result : 77);
  20278. }
  20279. _ACEOF
  20280. if ac_fn_c_try_run "$LINENO"; then :
  20281. gl_cv_func_mbrtowc_retval=yes
  20282. else
  20283. if test $? != 77; then
  20284. gl_cv_func_mbrtowc_retval=no
  20285. fi
  20286. fi
  20287. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  20288. conftest.$ac_objext conftest.beam conftest.$ac_ext
  20289. fi
  20290. fi
  20291. fi
  20292. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
  20293. $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
  20294. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
  20295. $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
  20296. if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
  20297. $as_echo_n "(cached) " >&6
  20298. else
  20299. case "$host_os" in
  20300. # Guess no on Solaris 8 and 9.
  20301. solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
  20302. # Guess yes otherwise.
  20303. *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
  20304. esac
  20305. if test $LOCALE_ZH_CN != none; then
  20306. if test "$cross_compiling" = yes; then :
  20307. :
  20308. else
  20309. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20310. /* end confdefs.h. */
  20311. #include <locale.h>
  20312. #include <string.h>
  20313. #include <wchar.h>
  20314. int main ()
  20315. {
  20316. /* This fails on Solaris 8 and 9. */
  20317. if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
  20318. {
  20319. mbstate_t state;
  20320. wchar_t wc;
  20321. memset (&state, '\0', sizeof (mbstate_t));
  20322. if (mbrtowc (&wc, "", 1, &state) != 0)
  20323. return 2;
  20324. }
  20325. return 0;
  20326. }
  20327. _ACEOF
  20328. if ac_fn_c_try_run "$LINENO"; then :
  20329. gl_cv_func_mbrtowc_nul_retval=yes
  20330. else
  20331. gl_cv_func_mbrtowc_nul_retval=no
  20332. fi
  20333. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  20334. conftest.$ac_objext conftest.beam conftest.$ac_ext
  20335. fi
  20336. fi
  20337. fi
  20338. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
  20339. $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
  20340. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
  20341. $as_echo_n "checking whether mbrtowc stores incomplete characters... " >&6; }
  20342. if ${gl_cv_func_mbrtowc_stores_incomplete+:} false; then :
  20343. $as_echo_n "(cached) " >&6
  20344. else
  20345. case "$host_os" in
  20346. # Guess yes on native Windows.
  20347. mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
  20348. *) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
  20349. esac
  20350. case "$host_os" in
  20351. mingw*)
  20352. if test "$cross_compiling" = yes; then :
  20353. :
  20354. else
  20355. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20356. /* end confdefs.h. */
  20357. #include <locale.h>
  20358. #include <string.h>
  20359. #include <wchar.h>
  20360. int main ()
  20361. {
  20362. int result = 0;
  20363. if (setlocale (LC_ALL, "French_France.65001") != NULL)
  20364. {
  20365. wchar_t wc = (wchar_t) 0xBADFACE;
  20366. mbstate_t state;
  20367. memset (&state, '\0', sizeof (mbstate_t));
  20368. if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
  20369. && wc != (wchar_t) 0xBADFACE)
  20370. result |= 1;
  20371. }
  20372. if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
  20373. {
  20374. wchar_t wc = (wchar_t) 0xBADFACE;
  20375. mbstate_t state;
  20376. memset (&state, '\0', sizeof (mbstate_t));
  20377. if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
  20378. && wc != (wchar_t) 0xBADFACE)
  20379. result |= 2;
  20380. }
  20381. if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
  20382. {
  20383. wchar_t wc = (wchar_t) 0xBADFACE;
  20384. mbstate_t state;
  20385. memset (&state, '\0', sizeof (mbstate_t));
  20386. if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
  20387. && wc != (wchar_t) 0xBADFACE)
  20388. result |= 4;
  20389. }
  20390. if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
  20391. {
  20392. wchar_t wc = (wchar_t) 0xBADFACE;
  20393. mbstate_t state;
  20394. memset (&state, '\0', sizeof (mbstate_t));
  20395. if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
  20396. && wc != (wchar_t) 0xBADFACE)
  20397. result |= 8;
  20398. }
  20399. return result;
  20400. }
  20401. _ACEOF
  20402. if ac_fn_c_try_run "$LINENO"; then :
  20403. gl_cv_func_mbrtowc_stores_incomplete=no
  20404. else
  20405. gl_cv_func_mbrtowc_stores_incomplete=yes
  20406. fi
  20407. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  20408. conftest.$ac_objext conftest.beam conftest.$ac_ext
  20409. fi
  20410. ;;
  20411. *)
  20412. if test $LOCALE_FR_UTF8 != none; then
  20413. if test "$cross_compiling" = yes; then :
  20414. :
  20415. else
  20416. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20417. /* end confdefs.h. */
  20418. #include <locale.h>
  20419. #include <string.h>
  20420. #include <wchar.h>
  20421. int main ()
  20422. {
  20423. if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
  20424. {
  20425. wchar_t wc = (wchar_t) 0xBADFACE;
  20426. mbstate_t state;
  20427. memset (&state, '\0', sizeof (mbstate_t));
  20428. if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
  20429. && wc != (wchar_t) 0xBADFACE)
  20430. return 1;
  20431. }
  20432. return 0;
  20433. }
  20434. _ACEOF
  20435. if ac_fn_c_try_run "$LINENO"; then :
  20436. gl_cv_func_mbrtowc_stores_incomplete=no
  20437. else
  20438. gl_cv_func_mbrtowc_stores_incomplete=yes
  20439. fi
  20440. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  20441. conftest.$ac_objext conftest.beam conftest.$ac_ext
  20442. fi
  20443. fi
  20444. ;;
  20445. esac
  20446. fi
  20447. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
  20448. $as_echo "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
  20449. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
  20450. $as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
  20451. if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
  20452. $as_echo_n "(cached) " >&6
  20453. else
  20454. case "$host_os" in
  20455. # Guess no on AIX and glibc systems.
  20456. aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
  20457. # Guess yes on native Windows.
  20458. mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
  20459. *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
  20460. esac
  20461. if test "$cross_compiling" = yes; then :
  20462. :
  20463. else
  20464. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20465. /* end confdefs.h. */
  20466. #include <wchar.h>
  20467. static wchar_t wc;
  20468. static mbstate_t mbs;
  20469. int
  20470. main (void)
  20471. {
  20472. return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
  20473. }
  20474. _ACEOF
  20475. if ac_fn_c_try_run "$LINENO"; then :
  20476. gl_cv_func_mbrtowc_empty_input=yes
  20477. else
  20478. gl_cv_func_mbrtowc_empty_input=no
  20479. fi
  20480. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  20481. conftest.$ac_objext conftest.beam conftest.$ac_ext
  20482. fi
  20483. fi
  20484. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
  20485. $as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
  20486. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
  20487. $as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
  20488. if ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+:} false; then :
  20489. $as_echo_n "(cached) " >&6
  20490. else
  20491. gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
  20492. if test "$cross_compiling" = yes; then :
  20493. case "$host_os" in
  20494. # Guess yes on native Windows.
  20495. mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
  20496. esac
  20497. else
  20498. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20499. /* end confdefs.h. */
  20500. #include <limits.h>
  20501. #include <locale.h>
  20502. #include <wchar.h>
  20503. int
  20504. main ()
  20505. {
  20506. int i;
  20507. char *locale = setlocale (LC_ALL, "C");
  20508. if (! locale)
  20509. return 2;
  20510. for (i = CHAR_MIN; i <= CHAR_MAX; i++)
  20511. {
  20512. char c = i;
  20513. wchar_t wc;
  20514. mbstate_t mbs = { 0, };
  20515. size_t ss = mbrtowc (&wc, &c, 1, &mbs);
  20516. if (1 < ss)
  20517. return 3;
  20518. }
  20519. return 0;
  20520. ;
  20521. return 0;
  20522. }
  20523. _ACEOF
  20524. if ac_fn_c_try_run "$LINENO"; then :
  20525. gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
  20526. else
  20527. gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no
  20528. fi
  20529. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  20530. conftest.$ac_objext conftest.beam conftest.$ac_ext
  20531. fi
  20532. fi
  20533. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
  20534. $as_echo "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
  20535. case "$gl_cv_func_mbrtowc_null_arg1" in
  20536. *yes) ;;
  20537. *)
  20538. $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
  20539. REPLACE_MBRTOWC=1
  20540. ;;
  20541. esac
  20542. case "$gl_cv_func_mbrtowc_null_arg2" in
  20543. *yes) ;;
  20544. *)
  20545. $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
  20546. REPLACE_MBRTOWC=1
  20547. ;;
  20548. esac
  20549. case "$gl_cv_func_mbrtowc_retval" in
  20550. *yes) ;;
  20551. *)
  20552. $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
  20553. REPLACE_MBRTOWC=1
  20554. ;;
  20555. esac
  20556. case "$gl_cv_func_mbrtowc_nul_retval" in
  20557. *yes) ;;
  20558. *)
  20559. $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
  20560. REPLACE_MBRTOWC=1
  20561. ;;
  20562. esac
  20563. case "$gl_cv_func_mbrtowc_stores_incomplete" in
  20564. *no) ;;
  20565. *)
  20566. $as_echo "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
  20567. REPLACE_MBRTOWC=1
  20568. ;;
  20569. esac
  20570. case "$gl_cv_func_mbrtowc_empty_input" in
  20571. *yes) ;;
  20572. *)
  20573. $as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
  20574. REPLACE_MBRTOWC=1
  20575. ;;
  20576. esac
  20577. case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
  20578. *yes) ;;
  20579. *)
  20580. $as_echo "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
  20581. REPLACE_MBRTOWC=1
  20582. ;;
  20583. esac
  20584. fi
  20585. fi
  20586. if test $REPLACE_MBSTATE_T = 1; then
  20587. case "$host_os" in
  20588. mingw*) LIB_MBRTOWC= ;;
  20589. *)
  20590. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
  20591. $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
  20592. if ${gl_cv_have_weak+:} false; then :
  20593. $as_echo_n "(cached) " >&6
  20594. else
  20595. gl_cv_have_weak=no
  20596. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20597. /* end confdefs.h. */
  20598. extern void xyzzy ();
  20599. #pragma weak xyzzy
  20600. int
  20601. main ()
  20602. {
  20603. xyzzy();
  20604. ;
  20605. return 0;
  20606. }
  20607. _ACEOF
  20608. if ac_fn_c_try_link "$LINENO"; then :
  20609. gl_cv_have_weak=maybe
  20610. fi
  20611. rm -f core conftest.err conftest.$ac_objext \
  20612. conftest$ac_exeext conftest.$ac_ext
  20613. if test $gl_cv_have_weak = maybe; then
  20614. if test "$cross_compiling" = yes; then :
  20615. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20616. /* end confdefs.h. */
  20617. #ifdef __ELF__
  20618. Extensible Linking Format
  20619. #endif
  20620. _ACEOF
  20621. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  20622. $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
  20623. gl_cv_have_weak="guessing yes"
  20624. else
  20625. gl_cv_have_weak="guessing no"
  20626. fi
  20627. rm -f conftest*
  20628. else
  20629. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20630. /* end confdefs.h. */
  20631. #include <stdio.h>
  20632. #pragma weak fputs
  20633. int main ()
  20634. {
  20635. return (fputs == NULL);
  20636. }
  20637. _ACEOF
  20638. if ac_fn_c_try_run "$LINENO"; then :
  20639. gl_cv_have_weak=yes
  20640. else
  20641. gl_cv_have_weak=no
  20642. fi
  20643. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  20644. conftest.$ac_objext conftest.beam conftest.$ac_ext
  20645. fi
  20646. fi
  20647. case " $LDFLAGS " in
  20648. *" -static "*) gl_cv_have_weak=no ;;
  20649. esac
  20650. case "$gl_cv_have_weak" in
  20651. *yes)
  20652. case "$host_os" in
  20653. freebsd* | dragonfly*)
  20654. : > conftest1.c
  20655. $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
  20656. cat <<EOF > conftest2.c
  20657. #include <pthread.h>
  20658. #pragma weak pthread_mutexattr_gettype
  20659. int main ()
  20660. {
  20661. return (pthread_mutexattr_gettype != NULL);
  20662. }
  20663. EOF
  20664. $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
  20665. || gl_cv_have_weak=no
  20666. rm -f conftest1.c libempty.so conftest2.c conftest
  20667. ;;
  20668. esac
  20669. ;;
  20670. esac
  20671. fi
  20672. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
  20673. $as_echo "$gl_cv_have_weak" >&6; }
  20674. case "$gl_cv_have_weak" in
  20675. *yes)
  20676. $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
  20677. ;;
  20678. esac
  20679. case "$gl_cv_have_weak" in
  20680. *yes) LIB_MBRTOWC= ;;
  20681. *) LIB_MBRTOWC="$LIBPTHREAD" ;;
  20682. esac
  20683. ;;
  20684. esac
  20685. else
  20686. LIB_MBRTOWC=
  20687. fi
  20688. if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
  20689. gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
  20690. if test $REPLACE_MBSTATE_T = 1; then
  20691. gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext"
  20692. gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext"
  20693. CFLAG_VISIBILITY=
  20694. HAVE_VISIBILITY=0
  20695. if test -n "$GCC"; then
  20696. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
  20697. $as_echo_n "checking whether the -Werror option is usable... " >&6; }
  20698. if ${gl_cv_cc_vis_werror+:} false; then :
  20699. $as_echo_n "(cached) " >&6
  20700. else
  20701. gl_save_CFLAGS="$CFLAGS"
  20702. CFLAGS="$CFLAGS -Werror"
  20703. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20704. /* end confdefs.h. */
  20705. int
  20706. main ()
  20707. {
  20708. ;
  20709. return 0;
  20710. }
  20711. _ACEOF
  20712. if ac_fn_c_try_compile "$LINENO"; then :
  20713. gl_cv_cc_vis_werror=yes
  20714. else
  20715. gl_cv_cc_vis_werror=no
  20716. fi
  20717. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  20718. CFLAGS="$gl_save_CFLAGS"
  20719. fi
  20720. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
  20721. $as_echo "$gl_cv_cc_vis_werror" >&6; }
  20722. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
  20723. $as_echo_n "checking for simple visibility declarations... " >&6; }
  20724. if ${gl_cv_cc_visibility+:} false; then :
  20725. $as_echo_n "(cached) " >&6
  20726. else
  20727. gl_save_CFLAGS="$CFLAGS"
  20728. CFLAGS="$CFLAGS -fvisibility=hidden"
  20729. if test $gl_cv_cc_vis_werror = yes; then
  20730. CFLAGS="$CFLAGS -Werror"
  20731. fi
  20732. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20733. /* end confdefs.h. */
  20734. extern __attribute__((__visibility__("hidden"))) int hiddenvar;
  20735. extern __attribute__((__visibility__("default"))) int exportedvar;
  20736. extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
  20737. extern __attribute__((__visibility__("default"))) int exportedfunc (void);
  20738. void dummyfunc (void) {}
  20739. int
  20740. main ()
  20741. {
  20742. ;
  20743. return 0;
  20744. }
  20745. _ACEOF
  20746. if ac_fn_c_try_compile "$LINENO"; then :
  20747. gl_cv_cc_visibility=yes
  20748. else
  20749. gl_cv_cc_visibility=no
  20750. fi
  20751. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  20752. CFLAGS="$gl_save_CFLAGS"
  20753. fi
  20754. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
  20755. $as_echo "$gl_cv_cc_visibility" >&6; }
  20756. if test $gl_cv_cc_visibility = yes; then
  20757. CFLAG_VISIBILITY="-fvisibility=hidden"
  20758. HAVE_VISIBILITY=1
  20759. fi
  20760. fi
  20761. cat >>confdefs.h <<_ACEOF
  20762. #define HAVE_VISIBILITY $HAVE_VISIBILITY
  20763. _ACEOF
  20764. fi
  20765. :
  20766. fi
  20767. GNULIB_MBRTOWC=1
  20768. $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
  20769. if case "$host_os" in
  20770. mingw*) true ;;
  20771. *) test $ac_cv_func_mbsinit = yes ;;
  20772. esac \
  20773. && test $ac_cv_func_mbrtowc = yes; then
  20774. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
  20775. $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
  20776. if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
  20777. $as_echo_n "(cached) " >&6
  20778. else
  20779. case "$host_os" in
  20780. # Guess no on AIX and OSF/1.
  20781. aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
  20782. # Guess yes otherwise.
  20783. *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
  20784. esac
  20785. if test $LOCALE_JA != none; then
  20786. if test "$cross_compiling" = yes; then :
  20787. :
  20788. else
  20789. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20790. /* end confdefs.h. */
  20791. #include <locale.h>
  20792. #include <string.h>
  20793. #include <wchar.h>
  20794. int main ()
  20795. {
  20796. if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
  20797. {
  20798. const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
  20799. mbstate_t state;
  20800. wchar_t wc;
  20801. memset (&state, '\0', sizeof (mbstate_t));
  20802. if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
  20803. if (mbsinit (&state))
  20804. return 2;
  20805. }
  20806. return 0;
  20807. }
  20808. _ACEOF
  20809. if ac_fn_c_try_run "$LINENO"; then :
  20810. gl_cv_func_mbrtowc_incomplete_state=yes
  20811. else
  20812. gl_cv_func_mbrtowc_incomplete_state=no
  20813. fi
  20814. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  20815. conftest.$ac_objext conftest.beam conftest.$ac_ext
  20816. fi
  20817. else
  20818. if test $LOCALE_FR_UTF8 != none; then
  20819. if test "$cross_compiling" = yes; then :
  20820. :
  20821. else
  20822. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20823. /* end confdefs.h. */
  20824. #include <locale.h>
  20825. #include <string.h>
  20826. #include <wchar.h>
  20827. int main ()
  20828. {
  20829. if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
  20830. {
  20831. const char input[] = "B\303\274\303\237er"; /* "Büßer" */
  20832. mbstate_t state;
  20833. wchar_t wc;
  20834. memset (&state, '\0', sizeof (mbstate_t));
  20835. if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
  20836. if (mbsinit (&state))
  20837. return 2;
  20838. }
  20839. return 0;
  20840. }
  20841. _ACEOF
  20842. if ac_fn_c_try_run "$LINENO"; then :
  20843. gl_cv_func_mbrtowc_incomplete_state=yes
  20844. else
  20845. gl_cv_func_mbrtowc_incomplete_state=no
  20846. fi
  20847. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  20848. conftest.$ac_objext conftest.beam conftest.$ac_ext
  20849. fi
  20850. fi
  20851. fi
  20852. fi
  20853. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
  20854. $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
  20855. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
  20856. $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
  20857. if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
  20858. $as_echo_n "(cached) " >&6
  20859. else
  20860. case "$host_os" in
  20861. # Guess no on Solaris 8.
  20862. solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
  20863. # Guess yes otherwise.
  20864. *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
  20865. esac
  20866. if test $LOCALE_ZH_CN != none; then
  20867. if test "$cross_compiling" = yes; then :
  20868. :
  20869. else
  20870. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20871. /* end confdefs.h. */
  20872. #include <locale.h>
  20873. #include <stdlib.h>
  20874. #include <string.h>
  20875. #include <wchar.h>
  20876. int main ()
  20877. {
  20878. /* This fails on Solaris 8:
  20879. mbrtowc returns 2, and sets wc to 0x00F0.
  20880. mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
  20881. if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
  20882. {
  20883. char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
  20884. mbstate_t state;
  20885. wchar_t wc;
  20886. memset (&state, '\0', sizeof (mbstate_t));
  20887. if (mbrtowc (&wc, input + 3, 6, &state) != 4
  20888. && mbtowc (&wc, input + 3, 6) == 4)
  20889. return 2;
  20890. }
  20891. return 0;
  20892. }
  20893. _ACEOF
  20894. if ac_fn_c_try_run "$LINENO"; then :
  20895. gl_cv_func_mbrtowc_sanitycheck=yes
  20896. else
  20897. gl_cv_func_mbrtowc_sanitycheck=no
  20898. fi
  20899. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  20900. conftest.$ac_objext conftest.beam conftest.$ac_ext
  20901. fi
  20902. fi
  20903. fi
  20904. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
  20905. $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
  20906. REPLACE_MBSTATE_T=0
  20907. case "$gl_cv_func_mbrtowc_incomplete_state" in
  20908. *yes) ;;
  20909. *) REPLACE_MBSTATE_T=1 ;;
  20910. esac
  20911. case "$gl_cv_func_mbrtowc_sanitycheck" in
  20912. *yes) ;;
  20913. *) REPLACE_MBSTATE_T=1 ;;
  20914. esac
  20915. else
  20916. REPLACE_MBSTATE_T=1
  20917. fi
  20918. if test $ac_cv_func_mbsinit = no; then
  20919. HAVE_MBSINIT=0
  20920. ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
  20921. #include <wchar.h>
  20922. "
  20923. if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
  20924. ac_have_decl=1
  20925. else
  20926. ac_have_decl=0
  20927. fi
  20928. cat >>confdefs.h <<_ACEOF
  20929. #define HAVE_DECL_MBSINIT $ac_have_decl
  20930. _ACEOF
  20931. if test $ac_cv_have_decl_mbsinit = yes; then
  20932. REPLACE_MBSINIT=1
  20933. fi
  20934. else
  20935. if test $REPLACE_MBSTATE_T = 1; then
  20936. REPLACE_MBSINIT=1
  20937. else
  20938. case "$host_os" in
  20939. mingw*) REPLACE_MBSINIT=1 ;;
  20940. esac
  20941. fi
  20942. fi
  20943. if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
  20944. gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
  20945. :
  20946. fi
  20947. GNULIB_MBSINIT=1
  20948. $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
  20949. if case "$host_os" in
  20950. mingw*) true ;;
  20951. *) test $ac_cv_func_mbsinit = yes ;;
  20952. esac \
  20953. && test $ac_cv_func_mbrtowc = yes; then
  20954. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
  20955. $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
  20956. if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
  20957. $as_echo_n "(cached) " >&6
  20958. else
  20959. case "$host_os" in
  20960. # Guess no on AIX and OSF/1.
  20961. aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
  20962. # Guess yes otherwise.
  20963. *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
  20964. esac
  20965. if test $LOCALE_JA != none; then
  20966. if test "$cross_compiling" = yes; then :
  20967. :
  20968. else
  20969. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  20970. /* end confdefs.h. */
  20971. #include <locale.h>
  20972. #include <string.h>
  20973. #include <wchar.h>
  20974. int main ()
  20975. {
  20976. if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
  20977. {
  20978. const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
  20979. mbstate_t state;
  20980. wchar_t wc;
  20981. memset (&state, '\0', sizeof (mbstate_t));
  20982. if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
  20983. if (mbsinit (&state))
  20984. return 2;
  20985. }
  20986. return 0;
  20987. }
  20988. _ACEOF
  20989. if ac_fn_c_try_run "$LINENO"; then :
  20990. gl_cv_func_mbrtowc_incomplete_state=yes
  20991. else
  20992. gl_cv_func_mbrtowc_incomplete_state=no
  20993. fi
  20994. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  20995. conftest.$ac_objext conftest.beam conftest.$ac_ext
  20996. fi
  20997. else
  20998. if test $LOCALE_FR_UTF8 != none; then
  20999. if test "$cross_compiling" = yes; then :
  21000. :
  21001. else
  21002. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21003. /* end confdefs.h. */
  21004. #include <locale.h>
  21005. #include <string.h>
  21006. #include <wchar.h>
  21007. int main ()
  21008. {
  21009. if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
  21010. {
  21011. const char input[] = "B\303\274\303\237er"; /* "Büßer" */
  21012. mbstate_t state;
  21013. wchar_t wc;
  21014. memset (&state, '\0', sizeof (mbstate_t));
  21015. if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
  21016. if (mbsinit (&state))
  21017. return 2;
  21018. }
  21019. return 0;
  21020. }
  21021. _ACEOF
  21022. if ac_fn_c_try_run "$LINENO"; then :
  21023. gl_cv_func_mbrtowc_incomplete_state=yes
  21024. else
  21025. gl_cv_func_mbrtowc_incomplete_state=no
  21026. fi
  21027. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  21028. conftest.$ac_objext conftest.beam conftest.$ac_ext
  21029. fi
  21030. fi
  21031. fi
  21032. fi
  21033. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
  21034. $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
  21035. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
  21036. $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
  21037. if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
  21038. $as_echo_n "(cached) " >&6
  21039. else
  21040. case "$host_os" in
  21041. # Guess no on Solaris 8.
  21042. solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
  21043. # Guess yes otherwise.
  21044. *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
  21045. esac
  21046. if test $LOCALE_ZH_CN != none; then
  21047. if test "$cross_compiling" = yes; then :
  21048. :
  21049. else
  21050. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21051. /* end confdefs.h. */
  21052. #include <locale.h>
  21053. #include <stdlib.h>
  21054. #include <string.h>
  21055. #include <wchar.h>
  21056. int main ()
  21057. {
  21058. /* This fails on Solaris 8:
  21059. mbrtowc returns 2, and sets wc to 0x00F0.
  21060. mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
  21061. if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
  21062. {
  21063. char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
  21064. mbstate_t state;
  21065. wchar_t wc;
  21066. memset (&state, '\0', sizeof (mbstate_t));
  21067. if (mbrtowc (&wc, input + 3, 6, &state) != 4
  21068. && mbtowc (&wc, input + 3, 6) == 4)
  21069. return 2;
  21070. }
  21071. return 0;
  21072. }
  21073. _ACEOF
  21074. if ac_fn_c_try_run "$LINENO"; then :
  21075. gl_cv_func_mbrtowc_sanitycheck=yes
  21076. else
  21077. gl_cv_func_mbrtowc_sanitycheck=no
  21078. fi
  21079. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  21080. conftest.$ac_objext conftest.beam conftest.$ac_ext
  21081. fi
  21082. fi
  21083. fi
  21084. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
  21085. $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
  21086. REPLACE_MBSTATE_T=0
  21087. case "$gl_cv_func_mbrtowc_incomplete_state" in
  21088. *yes) ;;
  21089. *) REPLACE_MBSTATE_T=1 ;;
  21090. esac
  21091. case "$gl_cv_func_mbrtowc_sanitycheck" in
  21092. *yes) ;;
  21093. *) REPLACE_MBSTATE_T=1 ;;
  21094. esac
  21095. else
  21096. REPLACE_MBSTATE_T=1
  21097. fi
  21098. if test $ac_cv_func_mbsrtowcs = no; then
  21099. HAVE_MBSRTOWCS=0
  21100. ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
  21101. #include <wchar.h>
  21102. "
  21103. if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
  21104. ac_have_decl=1
  21105. else
  21106. ac_have_decl=0
  21107. fi
  21108. cat >>confdefs.h <<_ACEOF
  21109. #define HAVE_DECL_MBSRTOWCS $ac_have_decl
  21110. _ACEOF
  21111. if test $ac_cv_have_decl_mbsrtowcs = yes; then
  21112. REPLACE_MBSRTOWCS=1
  21113. fi
  21114. else
  21115. if test $REPLACE_MBSTATE_T = 1; then
  21116. REPLACE_MBSRTOWCS=1
  21117. else
  21118. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
  21119. $as_echo_n "checking whether mbsrtowcs works... " >&6; }
  21120. if ${gl_cv_func_mbsrtowcs_works+:} false; then :
  21121. $as_echo_n "(cached) " >&6
  21122. else
  21123. case "$host_os" in
  21124. # Guess no on HP-UX, Solaris, mingw.
  21125. hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
  21126. # Guess yes otherwise.
  21127. *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
  21128. esac
  21129. if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
  21130. if test "$cross_compiling" = yes; then :
  21131. :
  21132. else
  21133. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21134. /* end confdefs.h. */
  21135. #include <locale.h>
  21136. #include <string.h>
  21137. #include <wchar.h>
  21138. int main ()
  21139. {
  21140. int result = 0;
  21141. /* Test whether the function supports a NULL destination argument.
  21142. This fails on native Windows. */
  21143. if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
  21144. {
  21145. const char input[] = "\337er";
  21146. const char *src = input;
  21147. mbstate_t state;
  21148. memset (&state, '\0', sizeof (mbstate_t));
  21149. if (mbsrtowcs (NULL, &src, 1, &state) != 3
  21150. || src != input)
  21151. result |= 1;
  21152. }
  21153. /* Test whether the function works when started with a conversion state
  21154. in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
  21155. if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
  21156. {
  21157. const char input[] = "B\303\274\303\237er";
  21158. mbstate_t state;
  21159. memset (&state, '\0', sizeof (mbstate_t));
  21160. if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
  21161. if (!mbsinit (&state))
  21162. {
  21163. const char *src = input + 2;
  21164. if (mbsrtowcs (NULL, &src, 10, &state) != 4)
  21165. result |= 2;
  21166. }
  21167. }
  21168. if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
  21169. {
  21170. const char input[] = "<\306\374\313\334\270\354>";
  21171. mbstate_t state;
  21172. memset (&state, '\0', sizeof (mbstate_t));
  21173. if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
  21174. if (!mbsinit (&state))
  21175. {
  21176. const char *src = input + 4;
  21177. if (mbsrtowcs (NULL, &src, 10, &state) != 3)
  21178. result |= 4;
  21179. }
  21180. }
  21181. if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
  21182. {
  21183. const char input[] = "B\250\271\201\060\211\070er";
  21184. mbstate_t state;
  21185. memset (&state, '\0', sizeof (mbstate_t));
  21186. if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
  21187. if (!mbsinit (&state))
  21188. {
  21189. const char *src = input + 2;
  21190. if (mbsrtowcs (NULL, &src, 10, &state) != 4)
  21191. result |= 8;
  21192. }
  21193. }
  21194. return result;
  21195. }
  21196. _ACEOF
  21197. if ac_fn_c_try_run "$LINENO"; then :
  21198. gl_cv_func_mbsrtowcs_works=yes
  21199. else
  21200. gl_cv_func_mbsrtowcs_works=no
  21201. fi
  21202. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  21203. conftest.$ac_objext conftest.beam conftest.$ac_ext
  21204. fi
  21205. fi
  21206. fi
  21207. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
  21208. $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
  21209. case "$gl_cv_func_mbsrtowcs_works" in
  21210. *yes) ;;
  21211. *) REPLACE_MBSRTOWCS=1 ;;
  21212. esac
  21213. fi
  21214. fi
  21215. if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
  21216. gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
  21217. gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
  21218. :
  21219. fi
  21220. GNULIB_MBSRTOWCS=1
  21221. $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
  21222. for ac_func in mbtowc
  21223. do :
  21224. ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
  21225. if test "x$ac_cv_func_mbtowc" = xyes; then :
  21226. cat >>confdefs.h <<_ACEOF
  21227. #define HAVE_MBTOWC 1
  21228. _ACEOF
  21229. fi
  21230. done
  21231. if test $ac_cv_func_mbtowc = no; then
  21232. HAVE_MBTOWC=0
  21233. else
  21234. if false; then
  21235. REPLACE_MBTOWC=1
  21236. fi
  21237. fi
  21238. if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
  21239. gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
  21240. :
  21241. fi
  21242. GNULIB_MBTOWC=1
  21243. $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
  21244. if test $REPLACE_MEMCHR = 1; then
  21245. gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
  21246. for ac_header in bp-sym.h
  21247. do :
  21248. ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
  21249. if test "x$ac_cv_header_bp_sym_h" = xyes; then :
  21250. cat >>confdefs.h <<_ACEOF
  21251. #define HAVE_BP_SYM_H 1
  21252. _ACEOF
  21253. fi
  21254. done
  21255. fi
  21256. GNULIB_MEMCHR=1
  21257. $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
  21258. if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
  21259. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
  21260. $as_echo_n "checking whether memmem works in linear time... " >&6; }
  21261. if ${gl_cv_func_memmem_works_fast+:} false; then :
  21262. $as_echo_n "(cached) " >&6
  21263. else
  21264. if test "$cross_compiling" = yes; then :
  21265. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21266. /* end confdefs.h. */
  21267. #include <features.h>
  21268. #ifdef __GNU_LIBRARY__
  21269. #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
  21270. && !defined __UCLIBC__
  21271. Lucky user
  21272. #endif
  21273. #endif
  21274. #ifdef __CYGWIN__
  21275. #include <cygwin/version.h>
  21276. #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
  21277. Lucky user
  21278. #endif
  21279. #endif
  21280. _ACEOF
  21281. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  21282. $EGREP "Lucky user" >/dev/null 2>&1; then :
  21283. gl_cv_func_memmem_works_fast="guessing yes"
  21284. else
  21285. gl_cv_func_memmem_works_fast="$gl_cross_guess_normal"
  21286. fi
  21287. rm -f conftest*
  21288. else
  21289. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21290. /* end confdefs.h. */
  21291. #include <signal.h> /* for signal */
  21292. #include <string.h> /* for memmem */
  21293. #include <stdlib.h> /* for malloc */
  21294. #include <unistd.h> /* for alarm */
  21295. static void quit (int sig) { _exit (sig + 128); }
  21296. int
  21297. main ()
  21298. {
  21299. int result = 0;
  21300. size_t m = 1000000;
  21301. char *haystack = (char *) malloc (2 * m + 1);
  21302. char *needle = (char *) malloc (m + 1);
  21303. /* Failure to compile this test due to missing alarm is okay,
  21304. since all such platforms (mingw) also lack memmem. */
  21305. signal (SIGALRM, quit);
  21306. alarm (5);
  21307. /* Check for quadratic performance. */
  21308. if (haystack && needle)
  21309. {
  21310. memset (haystack, 'A', 2 * m);
  21311. haystack[2 * m] = 'B';
  21312. memset (needle, 'A', m);
  21313. needle[m] = 'B';
  21314. if (!memmem (haystack, 2 * m + 1, needle, m + 1))
  21315. result |= 1;
  21316. }
  21317. /* Free allocated memory, in case some sanitizer is watching. */
  21318. free (haystack);
  21319. free (needle);
  21320. return result;
  21321. ;
  21322. return 0;
  21323. }
  21324. _ACEOF
  21325. if ac_fn_c_try_run "$LINENO"; then :
  21326. gl_cv_func_memmem_works_fast=yes
  21327. else
  21328. gl_cv_func_memmem_works_fast=no
  21329. fi
  21330. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  21331. conftest.$ac_objext conftest.beam conftest.$ac_ext
  21332. fi
  21333. fi
  21334. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
  21335. $as_echo "$gl_cv_func_memmem_works_fast" >&6; }
  21336. case "$gl_cv_func_memmem_works_fast" in
  21337. *yes) ;;
  21338. *)
  21339. REPLACE_MEMMEM=1
  21340. ;;
  21341. esac
  21342. fi
  21343. if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
  21344. gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
  21345. fi
  21346. for ac_func in memmem
  21347. do :
  21348. ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
  21349. if test "x$ac_cv_func_memmem" = xyes; then :
  21350. cat >>confdefs.h <<_ACEOF
  21351. #define HAVE_MEMMEM 1
  21352. _ACEOF
  21353. fi
  21354. done
  21355. if test $ac_cv_func_memmem = yes; then
  21356. HAVE_MEMMEM=1
  21357. else
  21358. HAVE_MEMMEM=0
  21359. fi
  21360. if test $ac_cv_have_decl_memmem = no; then
  21361. HAVE_DECL_MEMMEM=0
  21362. else
  21363. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
  21364. $as_echo_n "checking whether memmem works... " >&6; }
  21365. if ${gl_cv_func_memmem_works_always+:} false; then :
  21366. $as_echo_n "(cached) " >&6
  21367. else
  21368. if test "$cross_compiling" = yes; then :
  21369. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21370. /* end confdefs.h. */
  21371. #ifdef __GNU_LIBRARY__
  21372. #include <features.h>
  21373. #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
  21374. || __GLIBC_MINOR__ > 12)) \
  21375. || (__GLIBC__ > 2)) \
  21376. || defined __UCLIBC__
  21377. Lucky user
  21378. #endif
  21379. #elif defined __CYGWIN__
  21380. #include <cygwin/version.h>
  21381. #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
  21382. Lucky user
  21383. #endif
  21384. #else
  21385. Lucky user
  21386. #endif
  21387. _ACEOF
  21388. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  21389. $EGREP "Lucky user" >/dev/null 2>&1; then :
  21390. gl_cv_func_memmem_works_always="guessing yes"
  21391. else
  21392. gl_cv_func_memmem_works_always="$gl_cross_guess_normal"
  21393. fi
  21394. rm -f conftest*
  21395. else
  21396. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21397. /* end confdefs.h. */
  21398. #include <string.h> /* for memmem */
  21399. #define P "_EF_BF_BD"
  21400. #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
  21401. #define NEEDLE P P P P P
  21402. int
  21403. main ()
  21404. {
  21405. int result = 0;
  21406. if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
  21407. result |= 1;
  21408. /* Check for empty needle behavior. */
  21409. {
  21410. const char *haystack = "AAA";
  21411. if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
  21412. result |= 2;
  21413. }
  21414. return result;
  21415. ;
  21416. return 0;
  21417. }
  21418. _ACEOF
  21419. if ac_fn_c_try_run "$LINENO"; then :
  21420. gl_cv_func_memmem_works_always=yes
  21421. else
  21422. gl_cv_func_memmem_works_always=no
  21423. fi
  21424. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  21425. conftest.$ac_objext conftest.beam conftest.$ac_ext
  21426. fi
  21427. fi
  21428. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
  21429. $as_echo "$gl_cv_func_memmem_works_always" >&6; }
  21430. case "$gl_cv_func_memmem_works_always" in
  21431. *yes) ;;
  21432. *)
  21433. REPLACE_MEMMEM=1
  21434. ;;
  21435. esac
  21436. fi
  21437. :
  21438. if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
  21439. gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
  21440. fi
  21441. GNULIB_MEMMEM=1
  21442. $as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
  21443. for ac_func in mempcpy
  21444. do :
  21445. ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
  21446. if test "x$ac_cv_func_mempcpy" = xyes; then :
  21447. cat >>confdefs.h <<_ACEOF
  21448. #define HAVE_MEMPCPY 1
  21449. _ACEOF
  21450. fi
  21451. done
  21452. if test $ac_cv_func_mempcpy = no; then
  21453. HAVE_MEMPCPY=0
  21454. fi
  21455. if test $HAVE_MEMPCPY = 0; then
  21456. gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
  21457. :
  21458. fi
  21459. GNULIB_MEMPCPY=1
  21460. $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
  21461. if test $ac_cv_have_decl_memrchr = no; then
  21462. HAVE_DECL_MEMRCHR=0
  21463. fi
  21464. for ac_func in memrchr
  21465. do :
  21466. ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
  21467. if test "x$ac_cv_func_memrchr" = xyes; then :
  21468. cat >>confdefs.h <<_ACEOF
  21469. #define HAVE_MEMRCHR 1
  21470. _ACEOF
  21471. fi
  21472. done
  21473. if test $ac_cv_func_memrchr = no; then
  21474. gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
  21475. :
  21476. fi
  21477. GNULIB_MEMRCHR=1
  21478. $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
  21479. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
  21480. $as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
  21481. if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
  21482. $as_echo_n "(cached) " >&6
  21483. else
  21484. rm -rf conftest.dir
  21485. if test "$cross_compiling" = yes; then :
  21486. case "$host_os" in
  21487. # Guess yes on Linux systems.
  21488. linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
  21489. # Guess yes on glibc systems.
  21490. *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
  21491. # Guess yes on MSVC, no on mingw.
  21492. mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21493. /* end confdefs.h. */
  21494. #ifdef _MSC_VER
  21495. Known
  21496. #endif
  21497. _ACEOF
  21498. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  21499. $EGREP "Known" >/dev/null 2>&1; then :
  21500. gl_cv_func_mkdir_trailing_slash_works="guessing yes"
  21501. else
  21502. gl_cv_func_mkdir_trailing_slash_works="guessing no"
  21503. fi
  21504. rm -f conftest*
  21505. ;;
  21506. # If we don't know, obey --enable-cross-guesses.
  21507. *) gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
  21508. esac
  21509. else
  21510. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21511. /* end confdefs.h. */
  21512. #include <sys/types.h>
  21513. #include <sys/stat.h>
  21514. $gl_mda_defines
  21515. int
  21516. main ()
  21517. {
  21518. return mkdir ("conftest.dir/", 0700);
  21519. ;
  21520. return 0;
  21521. }
  21522. _ACEOF
  21523. if ac_fn_c_try_run "$LINENO"; then :
  21524. gl_cv_func_mkdir_trailing_slash_works=yes
  21525. else
  21526. gl_cv_func_mkdir_trailing_slash_works=no
  21527. fi
  21528. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  21529. conftest.$ac_objext conftest.beam conftest.$ac_ext
  21530. fi
  21531. rm -rf conftest.dir
  21532. fi
  21533. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
  21534. $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
  21535. case "$gl_cv_func_mkdir_trailing_slash_works" in
  21536. *yes) ;;
  21537. *)
  21538. REPLACE_MKDIR=1
  21539. ;;
  21540. esac
  21541. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
  21542. $as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
  21543. if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
  21544. $as_echo_n "(cached) " >&6
  21545. else
  21546. rm -rf conftest.dir
  21547. if test "$cross_compiling" = yes; then :
  21548. case "$host_os" in
  21549. # Guess yes on glibc systems.
  21550. *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
  21551. # Guess yes on musl systems.
  21552. *-musl*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
  21553. # Guess no on native Windows.
  21554. mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
  21555. # If we don't know, obey --enable-cross-guesses.
  21556. *) gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
  21557. esac
  21558. else
  21559. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21560. /* end confdefs.h. */
  21561. #include <sys/types.h>
  21562. #include <sys/stat.h>
  21563. $gl_mda_defines
  21564. int
  21565. main ()
  21566. {
  21567. return !mkdir ("conftest.dir/./", 0700);
  21568. ;
  21569. return 0;
  21570. }
  21571. _ACEOF
  21572. if ac_fn_c_try_run "$LINENO"; then :
  21573. gl_cv_func_mkdir_trailing_dot_works=yes
  21574. else
  21575. gl_cv_func_mkdir_trailing_dot_works=no
  21576. fi
  21577. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  21578. conftest.$ac_objext conftest.beam conftest.$ac_ext
  21579. fi
  21580. rm -rf conftest.dir
  21581. fi
  21582. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
  21583. $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
  21584. case "$gl_cv_func_mkdir_trailing_dot_works" in
  21585. *yes) ;;
  21586. *)
  21587. REPLACE_MKDIR=1
  21588. $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
  21589. ;;
  21590. esac
  21591. if test $REPLACE_MKDIR = 1; then
  21592. gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
  21593. fi
  21594. GNULIB_MKDIR=1
  21595. $as_echo "#define GNULIB_TEST_MKDIR 1" >>confdefs.h
  21596. for ac_func in mkdtemp
  21597. do :
  21598. ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
  21599. if test "x$ac_cv_func_mkdtemp" = xyes; then :
  21600. cat >>confdefs.h <<_ACEOF
  21601. #define HAVE_MKDTEMP 1
  21602. _ACEOF
  21603. fi
  21604. done
  21605. if test $ac_cv_func_mkdtemp = no; then
  21606. HAVE_MKDTEMP=0
  21607. fi
  21608. if test $HAVE_MKDTEMP = 0; then
  21609. gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
  21610. :
  21611. fi
  21612. GNULIB_MKDTEMP=1
  21613. $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
  21614. if test $ac_cv_func_mkostemp != yes; then
  21615. HAVE_MKOSTEMP=0
  21616. fi
  21617. if test $HAVE_MKOSTEMP = 0; then
  21618. gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
  21619. fi
  21620. cat >>confdefs.h <<_ACEOF
  21621. #define GNULIB_MKOSTEMP 1
  21622. _ACEOF
  21623. GNULIB_MKOSTEMP=1
  21624. $as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
  21625. if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
  21626. gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
  21627. fi
  21628. if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
  21629. gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
  21630. fi
  21631. cat >>confdefs.h <<_ACEOF
  21632. #define GNULIB_MSVC_NOTHROW 1
  21633. _ACEOF
  21634. if test $gl_cv_have_include_next = yes; then
  21635. gl_cv_next_netdb_h='<'netdb.h'>'
  21636. else
  21637. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netdb.h>" >&5
  21638. $as_echo_n "checking absolute name of <netdb.h>... " >&6; }
  21639. if ${gl_cv_next_netdb_h+:} false; then :
  21640. $as_echo_n "(cached) " >&6
  21641. else
  21642. if test $ac_cv_header_netdb_h = yes; then
  21643. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21644. /* end confdefs.h. */
  21645. #include <netdb.h>
  21646. _ACEOF
  21647. case "$host_os" in
  21648. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  21649. *) gl_absname_cpp="$ac_cpp" ;;
  21650. esac
  21651. case "$host_os" in
  21652. mingw*)
  21653. gl_dirsep_regex='[/\\]'
  21654. ;;
  21655. *)
  21656. gl_dirsep_regex='\/'
  21657. ;;
  21658. esac
  21659. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  21660. gl_header_literal_regex=`echo 'netdb.h' \
  21661. | sed -e "$gl_make_literal_regex_sed"`
  21662. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  21663. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  21664. s|^/[^/]|//&|
  21665. p
  21666. q
  21667. }'
  21668. gl_cv_absolute_netdb_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  21669. sed -n "$gl_absolute_header_sed"`
  21670. gl_header=$gl_cv_absolute_netdb_h
  21671. gl_cv_next_netdb_h='"'$gl_header'"'
  21672. else
  21673. gl_cv_next_netdb_h='<'netdb.h'>'
  21674. fi
  21675. fi
  21676. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netdb_h" >&5
  21677. $as_echo "$gl_cv_next_netdb_h" >&6; }
  21678. fi
  21679. NEXT_NETDB_H=$gl_cv_next_netdb_h
  21680. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  21681. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  21682. gl_next_as_first_directive='<'netdb.h'>'
  21683. else
  21684. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  21685. gl_next_as_first_directive=$gl_cv_next_netdb_h
  21686. fi
  21687. NEXT_AS_FIRST_DIRECTIVE_NETDB_H=$gl_next_as_first_directive
  21688. if test $ac_cv_header_netdb_h = yes; then
  21689. HAVE_NETDB_H=1
  21690. else
  21691. HAVE_NETDB_H=0
  21692. fi
  21693. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
  21694. $as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
  21695. if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then :
  21696. $as_echo_n "(cached) " >&6
  21697. else
  21698. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21699. /* end confdefs.h. */
  21700. #include <netinet/in.h>
  21701. int
  21702. main ()
  21703. {
  21704. ;
  21705. return 0;
  21706. }
  21707. _ACEOF
  21708. if ac_fn_c_try_compile "$LINENO"; then :
  21709. gl_cv_header_netinet_in_h_selfcontained=yes
  21710. else
  21711. gl_cv_header_netinet_in_h_selfcontained=no
  21712. fi
  21713. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  21714. fi
  21715. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
  21716. $as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
  21717. if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
  21718. NETINET_IN_H=''
  21719. else
  21720. NETINET_IN_H='netinet/in.h'
  21721. for ac_header in netinet/in.h
  21722. do :
  21723. ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
  21724. if test "x$ac_cv_header_netinet_in_h" = xyes; then :
  21725. cat >>confdefs.h <<_ACEOF
  21726. #define HAVE_NETINET_IN_H 1
  21727. _ACEOF
  21728. fi
  21729. done
  21730. if test $gl_cv_have_include_next = yes; then
  21731. gl_cv_next_netinet_in_h='<'netinet/in.h'>'
  21732. else
  21733. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
  21734. $as_echo_n "checking absolute name of <netinet/in.h>... " >&6; }
  21735. if ${gl_cv_next_netinet_in_h+:} false; then :
  21736. $as_echo_n "(cached) " >&6
  21737. else
  21738. if test $ac_cv_header_netinet_in_h = yes; then
  21739. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21740. /* end confdefs.h. */
  21741. #include <netinet/in.h>
  21742. _ACEOF
  21743. case "$host_os" in
  21744. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  21745. *) gl_absname_cpp="$ac_cpp" ;;
  21746. esac
  21747. case "$host_os" in
  21748. mingw*)
  21749. gl_dirsep_regex='[/\\]'
  21750. ;;
  21751. *)
  21752. gl_dirsep_regex='\/'
  21753. ;;
  21754. esac
  21755. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  21756. gl_header_literal_regex=`echo 'netinet/in.h' \
  21757. | sed -e "$gl_make_literal_regex_sed"`
  21758. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  21759. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  21760. s|^/[^/]|//&|
  21761. p
  21762. q
  21763. }'
  21764. gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  21765. sed -n "$gl_absolute_header_sed"`
  21766. gl_header=$gl_cv_absolute_netinet_in_h
  21767. gl_cv_next_netinet_in_h='"'$gl_header'"'
  21768. else
  21769. gl_cv_next_netinet_in_h='<'netinet/in.h'>'
  21770. fi
  21771. fi
  21772. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
  21773. $as_echo "$gl_cv_next_netinet_in_h" >&6; }
  21774. fi
  21775. NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
  21776. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  21777. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  21778. gl_next_as_first_directive='<'netinet/in.h'>'
  21779. else
  21780. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  21781. gl_next_as_first_directive=$gl_cv_next_netinet_in_h
  21782. fi
  21783. NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
  21784. if test $ac_cv_header_netinet_in_h = yes; then
  21785. HAVE_NETINET_IN_H=1
  21786. else
  21787. HAVE_NETINET_IN_H=0
  21788. fi
  21789. fi
  21790. if test -n "$NETINET_IN_H"; then
  21791. GL_GENERATE_NETINET_IN_H_TRUE=
  21792. GL_GENERATE_NETINET_IN_H_FALSE='#'
  21793. else
  21794. GL_GENERATE_NETINET_IN_H_TRUE='#'
  21795. GL_GENERATE_NETINET_IN_H_FALSE=
  21796. fi
  21797. case "$host_os" in
  21798. mingw* | pw*)
  21799. REPLACE_OPEN=1
  21800. ;;
  21801. *)
  21802. if test "$gl_cv_macro_O_CLOEXEC" != yes; then
  21803. REPLACE_OPEN=1
  21804. fi
  21805. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
  21806. $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
  21807. if ${gl_cv_func_open_slash+:} false; then :
  21808. $as_echo_n "(cached) " >&6
  21809. else
  21810. # Assume that if we have lstat, we can also check symlinks.
  21811. if test $ac_cv_func_lstat = yes; then
  21812. touch conftest.tmp
  21813. ln -s conftest.tmp conftest.lnk
  21814. fi
  21815. if test "$cross_compiling" = yes; then :
  21816. case "$host_os" in
  21817. freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
  21818. gl_cv_func_open_slash="guessing no" ;;
  21819. *)
  21820. gl_cv_func_open_slash="guessing yes" ;;
  21821. esac
  21822. else
  21823. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21824. /* end confdefs.h. */
  21825. #include <fcntl.h>
  21826. #if HAVE_UNISTD_H
  21827. # include <unistd.h>
  21828. #endif
  21829. $gl_mda_defines
  21830. int main ()
  21831. {
  21832. int result = 0;
  21833. #if HAVE_LSTAT
  21834. if (open ("conftest.lnk/", O_RDONLY) != -1)
  21835. result |= 1;
  21836. #endif
  21837. if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
  21838. result |= 2;
  21839. return result;
  21840. }
  21841. _ACEOF
  21842. if ac_fn_c_try_run "$LINENO"; then :
  21843. gl_cv_func_open_slash=yes
  21844. else
  21845. gl_cv_func_open_slash=no
  21846. fi
  21847. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  21848. conftest.$ac_objext conftest.beam conftest.$ac_ext
  21849. fi
  21850. rm -f conftest.sl conftest.tmp conftest.lnk
  21851. fi
  21852. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
  21853. $as_echo "$gl_cv_func_open_slash" >&6; }
  21854. case "$gl_cv_func_open_slash" in
  21855. *no)
  21856. $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
  21857. ;;
  21858. esac
  21859. case "$gl_cv_func_open_slash" in
  21860. *no)
  21861. REPLACE_OPEN=1
  21862. ;;
  21863. esac
  21864. ;;
  21865. esac
  21866. if test $REPLACE_OPEN = 0; then
  21867. if test $ac_cv_func_fchdir = no; then
  21868. HAVE_FCHDIR=0
  21869. fi
  21870. if test $HAVE_FCHDIR = 0; then
  21871. REPLACE_OPEN=1
  21872. fi
  21873. fi
  21874. if test $REPLACE_OPEN = 1; then
  21875. gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
  21876. :
  21877. fi
  21878. GNULIB_OPEN=1
  21879. $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
  21880. case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
  21881. yes+*yes+yes)
  21882. ;;
  21883. yes+*)
  21884. # Solaris 10 lacks O_CLOEXEC.
  21885. # Solaris 9 has *at functions, but uniformly mishandles trailing
  21886. # slash in all of them.
  21887. REPLACE_OPENAT=1
  21888. ;;
  21889. *)
  21890. HAVE_OPENAT=0
  21891. ;;
  21892. esac
  21893. if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
  21894. gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
  21895. :
  21896. fi
  21897. cat >>confdefs.h <<_ACEOF
  21898. #define GNULIB_OPENAT 1
  21899. _ACEOF
  21900. GNULIB_OPENAT=1
  21901. $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
  21902. for ac_func in opendir
  21903. do :
  21904. ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
  21905. if test "x$ac_cv_func_opendir" = xyes; then :
  21906. cat >>confdefs.h <<_ACEOF
  21907. #define HAVE_OPENDIR 1
  21908. _ACEOF
  21909. fi
  21910. done
  21911. if test $ac_cv_func_opendir = no; then
  21912. HAVE_OPENDIR=0
  21913. fi
  21914. if test $ac_cv_func_fchdir = no; then
  21915. HAVE_FCHDIR=0
  21916. fi
  21917. if test $HAVE_FCHDIR = 0; then
  21918. if test $HAVE_OPENDIR = 1; then
  21919. REPLACE_OPENDIR=1
  21920. fi
  21921. fi
  21922. case $host_os,$HAVE_OPENDIR in
  21923. os2*,1)
  21924. REPLACE_OPENDIR=1;;
  21925. esac
  21926. if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
  21927. gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
  21928. fi
  21929. GNULIB_OPENDIR=1
  21930. $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
  21931. if test $ac_cv_func_pipe != yes; then
  21932. HAVE_PIPE=0
  21933. fi
  21934. if test $HAVE_PIPE = 0; then
  21935. gl_LIBOBJS="$gl_LIBOBJS pipe.$ac_objext"
  21936. fi
  21937. GNULIB_PIPE=1
  21938. $as_echo "#define GNULIB_TEST_PIPE 1" >>confdefs.h
  21939. for ac_func in rawmemchr
  21940. do :
  21941. ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
  21942. if test "x$ac_cv_func_rawmemchr" = xyes; then :
  21943. cat >>confdefs.h <<_ACEOF
  21944. #define HAVE_RAWMEMCHR 1
  21945. _ACEOF
  21946. fi
  21947. done
  21948. if test $ac_cv_func_rawmemchr = no; then
  21949. HAVE_RAWMEMCHR=0
  21950. fi
  21951. if test $HAVE_RAWMEMCHR = 0; then
  21952. gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
  21953. :
  21954. fi
  21955. GNULIB_RAWMEMCHR=1
  21956. $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
  21957. for ac_func in readdir
  21958. do :
  21959. ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
  21960. if test "x$ac_cv_func_readdir" = xyes; then :
  21961. cat >>confdefs.h <<_ACEOF
  21962. #define HAVE_READDIR 1
  21963. _ACEOF
  21964. fi
  21965. done
  21966. if test $ac_cv_func_readdir = no; then
  21967. HAVE_READDIR=0
  21968. fi
  21969. if test $HAVE_READDIR = 0; then
  21970. gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
  21971. fi
  21972. GNULIB_READDIR=1
  21973. $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
  21974. if test $ac_cv_func_readlink = no; then
  21975. HAVE_READLINK=0
  21976. else
  21977. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
  21978. $as_echo_n "checking whether readlink signature is correct... " >&6; }
  21979. if ${gl_cv_decl_readlink_works+:} false; then :
  21980. $as_echo_n "(cached) " >&6
  21981. else
  21982. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  21983. /* end confdefs.h. */
  21984. #include <unistd.h>
  21985. /* Cause compilation failure if original declaration has wrong type. */
  21986. ssize_t readlink (const char *, char *, size_t);
  21987. int
  21988. main ()
  21989. {
  21990. ;
  21991. return 0;
  21992. }
  21993. _ACEOF
  21994. if ac_fn_c_try_compile "$LINENO"; then :
  21995. gl_cv_decl_readlink_works=yes
  21996. else
  21997. gl_cv_decl_readlink_works=no
  21998. fi
  21999. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  22000. fi
  22001. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
  22002. $as_echo "$gl_cv_decl_readlink_works" >&6; }
  22003. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
  22004. $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
  22005. if ${gl_cv_func_readlink_trailing_slash+:} false; then :
  22006. $as_echo_n "(cached) " >&6
  22007. else
  22008. # We have readlink, so assume ln -s works.
  22009. ln -s conftest.no-such conftest.link
  22010. ln -s conftest.link conftest.lnk2
  22011. if test "$cross_compiling" = yes; then :
  22012. case "$host_os" in
  22013. # Guess yes on Linux or glibc systems.
  22014. linux-* | linux | *-gnu* | gnu*)
  22015. gl_cv_func_readlink_trailing_slash="guessing yes" ;;
  22016. # Guess no on AIX or HP-UX.
  22017. aix* | hpux*)
  22018. gl_cv_func_readlink_trailing_slash="guessing no" ;;
  22019. # If we don't know, obey --enable-cross-guesses.
  22020. *)
  22021. gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
  22022. esac
  22023. else
  22024. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22025. /* end confdefs.h. */
  22026. #include <unistd.h>
  22027. int
  22028. main ()
  22029. {
  22030. char buf[20];
  22031. return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
  22032. ;
  22033. return 0;
  22034. }
  22035. _ACEOF
  22036. if ac_fn_c_try_run "$LINENO"; then :
  22037. gl_cv_func_readlink_trailing_slash=yes
  22038. else
  22039. gl_cv_func_readlink_trailing_slash=no
  22040. fi
  22041. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  22042. conftest.$ac_objext conftest.beam conftest.$ac_ext
  22043. fi
  22044. rm -f conftest.link conftest.lnk2
  22045. fi
  22046. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5
  22047. $as_echo "$gl_cv_func_readlink_trailing_slash" >&6; }
  22048. case "$gl_cv_func_readlink_trailing_slash" in
  22049. *yes)
  22050. if test "$gl_cv_decl_readlink_works" != yes; then
  22051. REPLACE_READLINK=1
  22052. fi
  22053. ;;
  22054. *)
  22055. $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
  22056. REPLACE_READLINK=1
  22057. ;;
  22058. esac
  22059. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5
  22060. $as_echo_n "checking whether readlink truncates results correctly... " >&6; }
  22061. if ${gl_cv_func_readlink_truncate+:} false; then :
  22062. $as_echo_n "(cached) " >&6
  22063. else
  22064. # We have readlink, so assume ln -s works.
  22065. ln -s ab conftest.link
  22066. if test "$cross_compiling" = yes; then :
  22067. case "$host_os" in
  22068. # Guess yes on Linux or glibc systems.
  22069. linux-* | linux | *-gnu* | gnu*)
  22070. gl_cv_func_readlink_truncate="guessing yes" ;;
  22071. # Guess no on AIX or HP-UX.
  22072. aix* | hpux*)
  22073. gl_cv_func_readlink_truncate="guessing no" ;;
  22074. # If we don't know, obey --enable-cross-guesses.
  22075. *)
  22076. gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
  22077. esac
  22078. else
  22079. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22080. /* end confdefs.h. */
  22081. #include <unistd.h>
  22082. int
  22083. main ()
  22084. {
  22085. char c;
  22086. return readlink ("conftest.link", &c, 1) != 1;
  22087. ;
  22088. return 0;
  22089. }
  22090. _ACEOF
  22091. if ac_fn_c_try_run "$LINENO"; then :
  22092. gl_cv_func_readlink_truncate=yes
  22093. else
  22094. gl_cv_func_readlink_truncate=no
  22095. fi
  22096. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  22097. conftest.$ac_objext conftest.beam conftest.$ac_ext
  22098. fi
  22099. rm -f conftest.link conftest.lnk2
  22100. fi
  22101. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5
  22102. $as_echo "$gl_cv_func_readlink_truncate" >&6; }
  22103. case $gl_cv_func_readlink_truncate in
  22104. *yes)
  22105. if test "$gl_cv_decl_readlink_works" != yes; then
  22106. REPLACE_READLINK=1
  22107. fi
  22108. ;;
  22109. *)
  22110. $as_echo "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h
  22111. REPLACE_READLINK=1
  22112. ;;
  22113. esac
  22114. fi
  22115. if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
  22116. gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
  22117. :
  22118. fi
  22119. GNULIB_READLINK=1
  22120. $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
  22121. if test $gl_cv_func_malloc_posix = yes; then
  22122. $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
  22123. else
  22124. REPLACE_REALLOC=1
  22125. fi
  22126. if test $REPLACE_REALLOC = 1; then
  22127. gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
  22128. fi
  22129. GNULIB_REALLOC_POSIX=1
  22130. $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
  22131. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
  22132. $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
  22133. if ${gl_cv_func_rename_slash_dst_works+:} false; then :
  22134. $as_echo_n "(cached) " >&6
  22135. else
  22136. rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
  22137. touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
  22138. as_fn_error $? "cannot create temporary files" "$LINENO" 5
  22139. # Assume that if we have lstat, we can also check symlinks.
  22140. if test $ac_cv_func_lstat = yes; then
  22141. ln -s conftest.f conftest.lnk
  22142. fi
  22143. if test "$cross_compiling" = yes; then :
  22144. case "$host_os" in
  22145. # Guess yes on Linux systems.
  22146. linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
  22147. # Guess yes on glibc systems.
  22148. *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
  22149. # Guess no on native Windows.
  22150. mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
  22151. # If we don't know, obey --enable-cross-guesses.
  22152. *) gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;;
  22153. esac
  22154. else
  22155. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22156. /* end confdefs.h. */
  22157. # include <stdio.h>
  22158. # include <stdlib.h>
  22159. int
  22160. main ()
  22161. {
  22162. int result = 0;
  22163. if (rename ("conftest.f1", "conftest.f2/") == 0)
  22164. result |= 1;
  22165. if (rename ("conftest.d1", "conftest.d2/") != 0)
  22166. result |= 2;
  22167. #if HAVE_LSTAT
  22168. if (rename ("conftest.f", "conftest.lnk/") == 0)
  22169. result |= 4;
  22170. #endif
  22171. return result;
  22172. ;
  22173. return 0;
  22174. }
  22175. _ACEOF
  22176. if ac_fn_c_try_run "$LINENO"; then :
  22177. gl_cv_func_rename_slash_dst_works=yes
  22178. else
  22179. gl_cv_func_rename_slash_dst_works=no
  22180. fi
  22181. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  22182. conftest.$ac_objext conftest.beam conftest.$ac_ext
  22183. fi
  22184. rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
  22185. fi
  22186. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
  22187. $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
  22188. case "$gl_cv_func_rename_slash_dst_works" in
  22189. *yes) ;;
  22190. *)
  22191. REPLACE_RENAME=1
  22192. $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
  22193. ;;
  22194. esac
  22195. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
  22196. $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
  22197. if ${gl_cv_func_rename_slash_src_works+:} false; then :
  22198. $as_echo_n "(cached) " >&6
  22199. else
  22200. rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
  22201. touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
  22202. as_fn_error $? "cannot create temporary files" "$LINENO" 5
  22203. # Assume that if we have lstat, we can also check symlinks.
  22204. if test $ac_cv_func_lstat = yes; then
  22205. ln -s conftest.f conftest.lnk
  22206. fi
  22207. if test "$cross_compiling" = yes; then :
  22208. case "$host_os" in
  22209. # Guess yes on Linux systems.
  22210. linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;;
  22211. # Guess yes on glibc systems.
  22212. *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
  22213. # Guess yes on native Windows.
  22214. mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
  22215. # If we don't know, obey --enable-cross-guesses.
  22216. *) gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;;
  22217. esac
  22218. else
  22219. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22220. /* end confdefs.h. */
  22221. # include <stdio.h>
  22222. # include <stdlib.h>
  22223. int
  22224. main ()
  22225. {
  22226. int result = 0;
  22227. if (rename ("conftest.f1/", "conftest.d3") == 0)
  22228. result |= 1;
  22229. if (rename ("conftest.d1/", "conftest.d2") != 0)
  22230. result |= 2;
  22231. #if HAVE_LSTAT
  22232. if (rename ("conftest.lnk/", "conftest.f") == 0)
  22233. result |= 4;
  22234. #endif
  22235. return result;
  22236. ;
  22237. return 0;
  22238. }
  22239. _ACEOF
  22240. if ac_fn_c_try_run "$LINENO"; then :
  22241. gl_cv_func_rename_slash_src_works=yes
  22242. else
  22243. gl_cv_func_rename_slash_src_works=no
  22244. fi
  22245. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  22246. conftest.$ac_objext conftest.beam conftest.$ac_ext
  22247. fi
  22248. rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
  22249. fi
  22250. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
  22251. $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
  22252. case "$gl_cv_func_rename_slash_src_works" in
  22253. *yes) ;;
  22254. *)
  22255. REPLACE_RENAME=1
  22256. $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
  22257. ;;
  22258. esac
  22259. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
  22260. $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
  22261. if ${gl_cv_func_rename_link_works+:} false; then :
  22262. $as_echo_n "(cached) " >&6
  22263. else
  22264. if test $ac_cv_func_link = yes; then
  22265. if test $cross_compiling != yes; then
  22266. rm -rf conftest.f conftest.f1 conftest.f2
  22267. if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 &&
  22268. set x `ls -i conftest.f conftest.f1` && test "" = ""; then
  22269. if test "$cross_compiling" = yes; then :
  22270. :
  22271. else
  22272. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22273. /* end confdefs.h. */
  22274. # include <errno.h>
  22275. # include <stdio.h>
  22276. # include <stdlib.h>
  22277. # include <unistd.h>
  22278. $gl_mda_defines
  22279. int
  22280. main ()
  22281. {
  22282. int result = 0;
  22283. if (rename ("conftest.f", "conftest.f1"))
  22284. result |= 1;
  22285. if (unlink ("conftest.f1"))
  22286. result |= 2;
  22287. /* Allow either the POSIX-required behavior, where the
  22288. previous rename kept conftest.f, or the (better) NetBSD
  22289. behavior, where it removed conftest.f. */
  22290. if (rename ("conftest.f", "conftest.f") != 0
  22291. && errno != ENOENT)
  22292. result |= 4;
  22293. if (rename ("conftest.f1", "conftest.f1") == 0)
  22294. result |= 8;
  22295. if (rename ("conftest.f2", "conftest.f2") != 0)
  22296. result |= 16;
  22297. return result;
  22298. ;
  22299. return 0;
  22300. }
  22301. _ACEOF
  22302. if ac_fn_c_try_run "$LINENO"; then :
  22303. gl_cv_func_rename_link_works=yes
  22304. else
  22305. gl_cv_func_rename_link_works=no
  22306. fi
  22307. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  22308. conftest.$ac_objext conftest.beam conftest.$ac_ext
  22309. fi
  22310. else
  22311. gl_cv_func_rename_link_works="guessing no"
  22312. fi
  22313. rm -rf conftest.f conftest.f1 conftest.f2
  22314. else
  22315. case "$host_os" in
  22316. # Guess yes on Linux systems.
  22317. linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;;
  22318. # Guess yes on glibc systems.
  22319. *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
  22320. # Guess yes on native Windows.
  22321. mingw*) gl_cv_func_rename_link_works="guessing yes" ;;
  22322. # If we don't know, obey --enable-cross-guesses.
  22323. *) gl_cv_func_rename_link_works="$gl_cross_guess_normal" ;;
  22324. esac
  22325. fi
  22326. else
  22327. gl_cv_func_rename_link_works=yes
  22328. fi
  22329. fi
  22330. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
  22331. $as_echo "$gl_cv_func_rename_link_works" >&6; }
  22332. case "$gl_cv_func_rename_link_works" in
  22333. *yes) ;;
  22334. *)
  22335. REPLACE_RENAME=1
  22336. $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
  22337. ;;
  22338. esac
  22339. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
  22340. $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
  22341. if ${gl_cv_func_rename_dest_works+:} false; then :
  22342. $as_echo_n "(cached) " >&6
  22343. else
  22344. rm -rf conftest.f conftest.d1 conftest.d2
  22345. touch conftest.f && mkdir conftest.d1 conftest.d2 ||
  22346. as_fn_error $? "cannot create temporary files" "$LINENO" 5
  22347. if test "$cross_compiling" = yes; then :
  22348. case "$host_os" in
  22349. # Guess yes on Linux systems.
  22350. linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;;
  22351. # Guess yes on glibc systems.
  22352. *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
  22353. # Guess no on native Windows.
  22354. mingw*) gl_cv_func_rename_dest_works="guessing no" ;;
  22355. # If we don't know, obey --enable-cross-guesses.
  22356. *) gl_cv_func_rename_dest_works="$gl_cross_guess_normal" ;;
  22357. esac
  22358. else
  22359. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22360. /* end confdefs.h. */
  22361. # include <stdio.h>
  22362. # include <stdlib.h>
  22363. int
  22364. main ()
  22365. {
  22366. int result = 0;
  22367. if (rename ("conftest.d1", "conftest.d2") != 0)
  22368. result |= 1;
  22369. if (rename ("conftest.d2", "conftest.f") == 0)
  22370. result |= 2;
  22371. return result;
  22372. ;
  22373. return 0;
  22374. }
  22375. _ACEOF
  22376. if ac_fn_c_try_run "$LINENO"; then :
  22377. gl_cv_func_rename_dest_works=yes
  22378. else
  22379. gl_cv_func_rename_dest_works=no
  22380. fi
  22381. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  22382. conftest.$ac_objext conftest.beam conftest.$ac_ext
  22383. fi
  22384. rm -rf conftest.f conftest.d1 conftest.d2
  22385. fi
  22386. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
  22387. $as_echo "$gl_cv_func_rename_dest_works" >&6; }
  22388. case "$gl_cv_func_rename_dest_works" in
  22389. *yes) ;;
  22390. *)
  22391. REPLACE_RENAME=1
  22392. $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
  22393. ;;
  22394. esac
  22395. if test $REPLACE_RENAME = 1; then
  22396. gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
  22397. fi
  22398. GNULIB_RENAME=1
  22399. $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
  22400. for ac_func in rewinddir
  22401. do :
  22402. ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
  22403. if test "x$ac_cv_func_rewinddir" = xyes; then :
  22404. cat >>confdefs.h <<_ACEOF
  22405. #define HAVE_REWINDDIR 1
  22406. _ACEOF
  22407. fi
  22408. done
  22409. if test $ac_cv_func_rewinddir = no; then
  22410. HAVE_REWINDDIR=0
  22411. fi
  22412. if test $HAVE_REWINDDIR = 0; then
  22413. gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
  22414. fi
  22415. GNULIB_REWINDDIR=1
  22416. $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
  22417. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
  22418. $as_echo_n "checking whether rmdir works... " >&6; }
  22419. if ${gl_cv_func_rmdir_works+:} false; then :
  22420. $as_echo_n "(cached) " >&6
  22421. else
  22422. mkdir conftest.dir
  22423. touch conftest.file
  22424. if test "$cross_compiling" = yes; then :
  22425. case "$host_os" in
  22426. # Guess yes on Linux systems.
  22427. linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;;
  22428. # Guess yes on glibc systems.
  22429. *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
  22430. # Guess no on native Windows.
  22431. mingw*) gl_cv_func_rmdir_works="guessing no" ;;
  22432. # If we don't know, obey --enable-cross-guesses.
  22433. *) gl_cv_func_rmdir_works="$gl_cross_guess_normal" ;;
  22434. esac
  22435. else
  22436. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22437. /* end confdefs.h. */
  22438. #include <stdio.h>
  22439. #include <errno.h>
  22440. #if HAVE_UNISTD_H
  22441. # include <unistd.h>
  22442. #else /* on Windows with MSVC */
  22443. # include <direct.h>
  22444. #endif
  22445. $gl_mda_defines
  22446. int
  22447. main ()
  22448. {
  22449. int result = 0;
  22450. if (!rmdir ("conftest.file/"))
  22451. result |= 1;
  22452. else if (errno != ENOTDIR)
  22453. result |= 2;
  22454. if (!rmdir ("conftest.dir/./"))
  22455. result |= 4;
  22456. return result;
  22457. ;
  22458. return 0;
  22459. }
  22460. _ACEOF
  22461. if ac_fn_c_try_run "$LINENO"; then :
  22462. gl_cv_func_rmdir_works=yes
  22463. else
  22464. gl_cv_func_rmdir_works=no
  22465. fi
  22466. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  22467. conftest.$ac_objext conftest.beam conftest.$ac_ext
  22468. fi
  22469. rm -rf conftest.dir conftest.file
  22470. fi
  22471. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
  22472. $as_echo "$gl_cv_func_rmdir_works" >&6; }
  22473. case "$gl_cv_func_rmdir_works" in
  22474. *yes) ;;
  22475. *)
  22476. REPLACE_RMDIR=1
  22477. ;;
  22478. esac
  22479. if test $REPLACE_RMDIR = 1; then
  22480. gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
  22481. fi
  22482. GNULIB_RMDIR=1
  22483. $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
  22484. if test "$ac_cv_header_winsock2_h" = yes; then
  22485. REPLACE_SELECT=1
  22486. else
  22487. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
  22488. $as_echo_n "checking whether select supports a 0 argument... " >&6; }
  22489. if ${gl_cv_func_select_supports0+:} false; then :
  22490. $as_echo_n "(cached) " >&6
  22491. else
  22492. if test "$cross_compiling" = yes; then :
  22493. case "$host_os" in
  22494. # Guess no on Interix.
  22495. interix*) gl_cv_func_select_supports0="guessing no";;
  22496. # Guess yes otherwise.
  22497. *) gl_cv_func_select_supports0="guessing yes";;
  22498. esac
  22499. else
  22500. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22501. /* end confdefs.h. */
  22502. #include <sys/types.h>
  22503. #include <sys/time.h>
  22504. #if HAVE_SYS_SELECT_H
  22505. #include <sys/select.h>
  22506. #endif
  22507. int main ()
  22508. {
  22509. struct timeval timeout;
  22510. timeout.tv_sec = 0;
  22511. timeout.tv_usec = 5;
  22512. return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
  22513. }
  22514. _ACEOF
  22515. if ac_fn_c_try_run "$LINENO"; then :
  22516. gl_cv_func_select_supports0=yes
  22517. else
  22518. gl_cv_func_select_supports0=no
  22519. fi
  22520. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  22521. conftest.$ac_objext conftest.beam conftest.$ac_ext
  22522. fi
  22523. fi
  22524. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
  22525. $as_echo "$gl_cv_func_select_supports0" >&6; }
  22526. case "$gl_cv_func_select_supports0" in
  22527. *yes) ;;
  22528. *) REPLACE_SELECT=1 ;;
  22529. esac
  22530. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
  22531. $as_echo_n "checking whether select detects invalid fds... " >&6; }
  22532. if ${gl_cv_func_select_detects_ebadf+:} false; then :
  22533. $as_echo_n "(cached) " >&6
  22534. else
  22535. if test "$cross_compiling" = yes; then :
  22536. case "$host_os" in
  22537. # Guess yes on Linux systems.
  22538. linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
  22539. # Guess yes on glibc systems.
  22540. *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
  22541. # If we don't know, obey --enable-cross-guesses.
  22542. *) gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
  22543. esac
  22544. else
  22545. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22546. /* end confdefs.h. */
  22547. #include <sys/types.h>
  22548. #include <sys/time.h>
  22549. #if HAVE_SYS_SELECT_H
  22550. # include <sys/select.h>
  22551. #endif
  22552. #include <unistd.h>
  22553. #include <errno.h>
  22554. $gl_mda_defines
  22555. int
  22556. main ()
  22557. {
  22558. fd_set set;
  22559. dup2(0, 16);
  22560. FD_ZERO(&set);
  22561. FD_SET(16, &set);
  22562. close(16);
  22563. struct timeval timeout;
  22564. timeout.tv_sec = 0;
  22565. timeout.tv_usec = 5;
  22566. return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
  22567. ;
  22568. return 0;
  22569. }
  22570. _ACEOF
  22571. if ac_fn_c_try_run "$LINENO"; then :
  22572. gl_cv_func_select_detects_ebadf=yes
  22573. else
  22574. gl_cv_func_select_detects_ebadf=no
  22575. fi
  22576. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  22577. conftest.$ac_objext conftest.beam conftest.$ac_ext
  22578. fi
  22579. fi
  22580. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
  22581. $as_echo "$gl_cv_func_select_detects_ebadf" >&6; }
  22582. case $gl_cv_func_select_detects_ebadf in
  22583. *yes) ;;
  22584. *) REPLACE_SELECT=1 ;;
  22585. esac
  22586. fi
  22587. LIB_SELECT="$LIBSOCKET"
  22588. if test $REPLACE_SELECT = 1; then
  22589. case "$host_os" in
  22590. mingw*)
  22591. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22592. /* end confdefs.h. */
  22593. #define WIN32_LEAN_AND_MEAN
  22594. #include <windows.h>
  22595. int
  22596. main ()
  22597. {
  22598. MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
  22599. return 0;
  22600. }
  22601. _ACEOF
  22602. if ac_fn_c_try_link "$LINENO"; then :
  22603. else
  22604. LIB_SELECT="$LIB_SELECT -luser32"
  22605. fi
  22606. rm -f core conftest.err conftest.$ac_objext \
  22607. conftest$ac_exeext conftest.$ac_ext
  22608. ;;
  22609. esac
  22610. fi
  22611. if test $REPLACE_SELECT = 1; then
  22612. gl_LIBOBJS="$gl_LIBOBJS select.$ac_objext"
  22613. fi
  22614. GNULIB_SELECT=1
  22615. $as_echo "#define GNULIB_TEST_SELECT 1" >>confdefs.h
  22616. if test $ac_cv_func_setenv = no; then
  22617. HAVE_SETENV=0
  22618. else
  22619. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
  22620. $as_echo_n "checking whether setenv validates arguments... " >&6; }
  22621. if ${gl_cv_func_setenv_works+:} false; then :
  22622. $as_echo_n "(cached) " >&6
  22623. else
  22624. if test "$cross_compiling" = yes; then :
  22625. case "$host_os" in
  22626. # Guess yes on glibc systems.
  22627. *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
  22628. # Guess yes on musl systems.
  22629. *-musl*) gl_cv_func_setenv_works="guessing yes" ;;
  22630. # If we don't know, obey --enable-cross-guesses.
  22631. *) gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
  22632. esac
  22633. else
  22634. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22635. /* end confdefs.h. */
  22636. #include <stdlib.h>
  22637. #include <errno.h>
  22638. #include <string.h>
  22639. int
  22640. main ()
  22641. {
  22642. int result = 0;
  22643. {
  22644. if (setenv ("", "", 0) != -1)
  22645. result |= 1;
  22646. else if (errno != EINVAL)
  22647. result |= 2;
  22648. }
  22649. {
  22650. if (setenv ("a", "=", 1) != 0)
  22651. result |= 4;
  22652. else if (strcmp (getenv ("a"), "=") != 0)
  22653. result |= 8;
  22654. }
  22655. return result;
  22656. ;
  22657. return 0;
  22658. }
  22659. _ACEOF
  22660. if ac_fn_c_try_run "$LINENO"; then :
  22661. gl_cv_func_setenv_works=yes
  22662. else
  22663. gl_cv_func_setenv_works=no
  22664. fi
  22665. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  22666. conftest.$ac_objext conftest.beam conftest.$ac_ext
  22667. fi
  22668. fi
  22669. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
  22670. $as_echo "$gl_cv_func_setenv_works" >&6; }
  22671. case "$gl_cv_func_setenv_works" in
  22672. *yes) ;;
  22673. *)
  22674. REPLACE_SETENV=1
  22675. ;;
  22676. esac
  22677. fi
  22678. if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
  22679. gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
  22680. fi
  22681. GNULIB_SETENV=1
  22682. $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
  22683. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
  22684. $as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
  22685. if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
  22686. $as_echo_n "(cached) " >&6
  22687. else
  22688. case "$host_os" in
  22689. # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
  22690. *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
  22691. gl_cv_func_setlocale_null_all_mtsafe=no ;;
  22692. # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
  22693. *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
  22694. gl_cv_func_setlocale_null_all_mtsafe=yes ;;
  22695. # If we don't know, obey --enable-cross-guesses.
  22696. *)
  22697. gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
  22698. esac
  22699. fi
  22700. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
  22701. $as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
  22702. case "$host_os" in
  22703. mingw*) ;;
  22704. *)
  22705. if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
  22706. gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
  22707. fi
  22708. ;;
  22709. esac
  22710. case "$gl_cv_func_setlocale_null_all_mtsafe" in
  22711. *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
  22712. *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
  22713. esac
  22714. cat >>confdefs.h <<_ACEOF
  22715. #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
  22716. _ACEOF
  22717. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
  22718. $as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
  22719. if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
  22720. $as_echo_n "(cached) " >&6
  22721. else
  22722. case "$host_os" in
  22723. # Guess no on OpenBSD, AIX.
  22724. openbsd* | aix*)
  22725. gl_cv_func_setlocale_null_one_mtsafe=no ;;
  22726. # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
  22727. *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
  22728. gl_cv_func_setlocale_null_one_mtsafe=yes ;;
  22729. # If we don't know, obey --enable-cross-guesses.
  22730. *)
  22731. gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
  22732. esac
  22733. fi
  22734. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
  22735. $as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
  22736. case "$host_os" in
  22737. mingw*) ;;
  22738. *)
  22739. if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
  22740. gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
  22741. fi
  22742. ;;
  22743. esac
  22744. case "$gl_cv_func_setlocale_null_one_mtsafe" in
  22745. *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
  22746. *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
  22747. esac
  22748. cat >>confdefs.h <<_ACEOF
  22749. #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
  22750. _ACEOF
  22751. if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
  22752. case "$host_os" in
  22753. mingw*) LIB_SETLOCALE_NULL= ;;
  22754. *)
  22755. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
  22756. $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
  22757. if ${gl_cv_have_weak+:} false; then :
  22758. $as_echo_n "(cached) " >&6
  22759. else
  22760. gl_cv_have_weak=no
  22761. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22762. /* end confdefs.h. */
  22763. extern void xyzzy ();
  22764. #pragma weak xyzzy
  22765. int
  22766. main ()
  22767. {
  22768. xyzzy();
  22769. ;
  22770. return 0;
  22771. }
  22772. _ACEOF
  22773. if ac_fn_c_try_link "$LINENO"; then :
  22774. gl_cv_have_weak=maybe
  22775. fi
  22776. rm -f core conftest.err conftest.$ac_objext \
  22777. conftest$ac_exeext conftest.$ac_ext
  22778. if test $gl_cv_have_weak = maybe; then
  22779. if test "$cross_compiling" = yes; then :
  22780. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22781. /* end confdefs.h. */
  22782. #ifdef __ELF__
  22783. Extensible Linking Format
  22784. #endif
  22785. _ACEOF
  22786. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  22787. $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
  22788. gl_cv_have_weak="guessing yes"
  22789. else
  22790. gl_cv_have_weak="guessing no"
  22791. fi
  22792. rm -f conftest*
  22793. else
  22794. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22795. /* end confdefs.h. */
  22796. #include <stdio.h>
  22797. #pragma weak fputs
  22798. int main ()
  22799. {
  22800. return (fputs == NULL);
  22801. }
  22802. _ACEOF
  22803. if ac_fn_c_try_run "$LINENO"; then :
  22804. gl_cv_have_weak=yes
  22805. else
  22806. gl_cv_have_weak=no
  22807. fi
  22808. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  22809. conftest.$ac_objext conftest.beam conftest.$ac_ext
  22810. fi
  22811. fi
  22812. case " $LDFLAGS " in
  22813. *" -static "*) gl_cv_have_weak=no ;;
  22814. esac
  22815. case "$gl_cv_have_weak" in
  22816. *yes)
  22817. case "$host_os" in
  22818. freebsd* | dragonfly*)
  22819. : > conftest1.c
  22820. $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
  22821. cat <<EOF > conftest2.c
  22822. #include <pthread.h>
  22823. #pragma weak pthread_mutexattr_gettype
  22824. int main ()
  22825. {
  22826. return (pthread_mutexattr_gettype != NULL);
  22827. }
  22828. EOF
  22829. $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
  22830. || gl_cv_have_weak=no
  22831. rm -f conftest1.c libempty.so conftest2.c conftest
  22832. ;;
  22833. esac
  22834. ;;
  22835. esac
  22836. fi
  22837. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
  22838. $as_echo "$gl_cv_have_weak" >&6; }
  22839. case "$gl_cv_have_weak" in
  22840. *yes)
  22841. $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
  22842. ;;
  22843. esac
  22844. case "$gl_cv_have_weak" in
  22845. *yes) LIB_SETLOCALE_NULL= ;;
  22846. *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
  22847. esac
  22848. ;;
  22849. esac
  22850. else
  22851. LIB_SETLOCALE_NULL=
  22852. fi
  22853. if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
  22854. gl_LIBOBJS="$gl_LIBOBJS setlocale-lock.$ac_objext"
  22855. CFLAG_VISIBILITY=
  22856. HAVE_VISIBILITY=0
  22857. if test -n "$GCC"; then
  22858. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
  22859. $as_echo_n "checking whether the -Werror option is usable... " >&6; }
  22860. if ${gl_cv_cc_vis_werror+:} false; then :
  22861. $as_echo_n "(cached) " >&6
  22862. else
  22863. gl_save_CFLAGS="$CFLAGS"
  22864. CFLAGS="$CFLAGS -Werror"
  22865. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22866. /* end confdefs.h. */
  22867. int
  22868. main ()
  22869. {
  22870. ;
  22871. return 0;
  22872. }
  22873. _ACEOF
  22874. if ac_fn_c_try_compile "$LINENO"; then :
  22875. gl_cv_cc_vis_werror=yes
  22876. else
  22877. gl_cv_cc_vis_werror=no
  22878. fi
  22879. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  22880. CFLAGS="$gl_save_CFLAGS"
  22881. fi
  22882. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
  22883. $as_echo "$gl_cv_cc_vis_werror" >&6; }
  22884. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
  22885. $as_echo_n "checking for simple visibility declarations... " >&6; }
  22886. if ${gl_cv_cc_visibility+:} false; then :
  22887. $as_echo_n "(cached) " >&6
  22888. else
  22889. gl_save_CFLAGS="$CFLAGS"
  22890. CFLAGS="$CFLAGS -fvisibility=hidden"
  22891. if test $gl_cv_cc_vis_werror = yes; then
  22892. CFLAGS="$CFLAGS -Werror"
  22893. fi
  22894. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22895. /* end confdefs.h. */
  22896. extern __attribute__((__visibility__("hidden"))) int hiddenvar;
  22897. extern __attribute__((__visibility__("default"))) int exportedvar;
  22898. extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
  22899. extern __attribute__((__visibility__("default"))) int exportedfunc (void);
  22900. void dummyfunc (void) {}
  22901. int
  22902. main ()
  22903. {
  22904. ;
  22905. return 0;
  22906. }
  22907. _ACEOF
  22908. if ac_fn_c_try_compile "$LINENO"; then :
  22909. gl_cv_cc_visibility=yes
  22910. else
  22911. gl_cv_cc_visibility=no
  22912. fi
  22913. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  22914. CFLAGS="$gl_save_CFLAGS"
  22915. fi
  22916. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
  22917. $as_echo "$gl_cv_cc_visibility" >&6; }
  22918. if test $gl_cv_cc_visibility = yes; then
  22919. CFLAG_VISIBILITY="-fvisibility=hidden"
  22920. HAVE_VISIBILITY=1
  22921. fi
  22922. fi
  22923. cat >>confdefs.h <<_ACEOF
  22924. #define HAVE_VISIBILITY $HAVE_VISIBILITY
  22925. _ACEOF
  22926. fi
  22927. GNULIB_SETLOCALE_NULL=1
  22928. $as_echo "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
  22929. if test "$ac_cv_header_winsock2_h" = yes; then
  22930. gl_LIBOBJS="$gl_LIBOBJS setsockopt.$ac_objext"
  22931. fi
  22932. GNULIB_SETSOCKOPT=1
  22933. $as_echo "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
  22934. if test $gl_cv_have_include_next = yes; then
  22935. gl_cv_next_signal_h='<'signal.h'>'
  22936. else
  22937. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
  22938. $as_echo_n "checking absolute name of <signal.h>... " >&6; }
  22939. if ${gl_cv_next_signal_h+:} false; then :
  22940. $as_echo_n "(cached) " >&6
  22941. else
  22942. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  22943. /* end confdefs.h. */
  22944. #include <signal.h>
  22945. _ACEOF
  22946. case "$host_os" in
  22947. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  22948. *) gl_absname_cpp="$ac_cpp" ;;
  22949. esac
  22950. case "$host_os" in
  22951. mingw*)
  22952. gl_dirsep_regex='[/\\]'
  22953. ;;
  22954. *)
  22955. gl_dirsep_regex='\/'
  22956. ;;
  22957. esac
  22958. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  22959. gl_header_literal_regex=`echo 'signal.h' \
  22960. | sed -e "$gl_make_literal_regex_sed"`
  22961. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  22962. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  22963. s|^/[^/]|//&|
  22964. p
  22965. q
  22966. }'
  22967. gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  22968. sed -n "$gl_absolute_header_sed"`
  22969. gl_header=$gl_cv_absolute_signal_h
  22970. gl_cv_next_signal_h='"'$gl_header'"'
  22971. fi
  22972. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
  22973. $as_echo "$gl_cv_next_signal_h" >&6; }
  22974. fi
  22975. NEXT_SIGNAL_H=$gl_cv_next_signal_h
  22976. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  22977. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  22978. gl_next_as_first_directive='<'signal.h'>'
  22979. else
  22980. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  22981. gl_next_as_first_directive=$gl_cv_next_signal_h
  22982. fi
  22983. NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
  22984. # AIX declares sig_atomic_t to already include volatile, and C89 compilers
  22985. # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
  22986. ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
  22987. #include <signal.h>
  22988. "
  22989. if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
  22990. else
  22991. HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
  22992. fi
  22993. ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
  22994. #include <signal.h>
  22995. "
  22996. if test "x$ac_cv_type_sighandler_t" = xyes; then :
  22997. else
  22998. HAVE_SIGHANDLER_T=0
  22999. fi
  23000. if test "$ac_cv_header_winsock2_h" = yes; then
  23001. gl_LIBOBJS="$gl_LIBOBJS socket.$ac_objext"
  23002. fi
  23003. # When this module is used, sockets may actually occur as file descriptors,
  23004. # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
  23005. if test "$ac_cv_header_winsock2_h" = yes; then
  23006. UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
  23007. SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
  23008. fi
  23009. GNULIB_SOCKET=1
  23010. $as_echo "#define GNULIB_TEST_SOCKET 1" >>confdefs.h
  23011. ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
  23012. /* <sys/types.h> is not needed according to POSIX, but the
  23013. <sys/socket.h> in i386-unknown-freebsd4.10 and
  23014. powerpc-apple-darwin5.5 required it. */
  23015. #include <sys/types.h>
  23016. #if HAVE_SYS_SOCKET_H
  23017. # include <sys/socket.h>
  23018. #elif HAVE_WS2TCPIP_H
  23019. # include <ws2tcpip.h>
  23020. #endif
  23021. "
  23022. if test "x$ac_cv_type_socklen_t" = xyes; then :
  23023. else
  23024. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
  23025. $as_echo_n "checking for socklen_t equivalent... " >&6; }
  23026. if ${gl_cv_socklen_t_equiv+:} false; then :
  23027. $as_echo_n "(cached) " >&6
  23028. else
  23029. # Systems have either "struct sockaddr *" or
  23030. # "void *" as the second argument to getpeername
  23031. gl_cv_socklen_t_equiv=
  23032. for arg2 in "struct sockaddr" void; do
  23033. for t in int size_t "unsigned int" "long int" "unsigned long int"; do
  23034. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23035. /* end confdefs.h. */
  23036. #include <sys/types.h>
  23037. #include <sys/socket.h>
  23038. int getpeername (int, $arg2 *, $t *);
  23039. int
  23040. main ()
  23041. {
  23042. $t len;
  23043. getpeername (0, 0, &len);
  23044. ;
  23045. return 0;
  23046. }
  23047. _ACEOF
  23048. if ac_fn_c_try_compile "$LINENO"; then :
  23049. gl_cv_socklen_t_equiv="$t"
  23050. fi
  23051. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  23052. test "$gl_cv_socklen_t_equiv" != "" && break
  23053. done
  23054. test "$gl_cv_socklen_t_equiv" != "" && break
  23055. done
  23056. if test "$gl_cv_socklen_t_equiv" = ""; then
  23057. as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
  23058. fi
  23059. fi
  23060. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
  23061. $as_echo "$gl_cv_socklen_t_equiv" >&6; }
  23062. cat >>confdefs.h <<_ACEOF
  23063. #define socklen_t $gl_cv_socklen_t_equiv
  23064. _ACEOF
  23065. fi
  23066. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
  23067. $as_echo_n "checking for ssize_t... " >&6; }
  23068. if ${gt_cv_ssize_t+:} false; then :
  23069. $as_echo_n "(cached) " >&6
  23070. else
  23071. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23072. /* end confdefs.h. */
  23073. #include <sys/types.h>
  23074. int
  23075. main ()
  23076. {
  23077. int x = sizeof (ssize_t *) + sizeof (ssize_t);
  23078. return !x;
  23079. ;
  23080. return 0;
  23081. }
  23082. _ACEOF
  23083. if ac_fn_c_try_compile "$LINENO"; then :
  23084. gt_cv_ssize_t=yes
  23085. else
  23086. gt_cv_ssize_t=no
  23087. fi
  23088. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  23089. fi
  23090. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
  23091. $as_echo "$gt_cv_ssize_t" >&6; }
  23092. if test $gt_cv_ssize_t = no; then
  23093. $as_echo "#define ssize_t int" >>confdefs.h
  23094. fi
  23095. case "$host_os" in
  23096. mingw*)
  23097. ;;
  23098. *)
  23099. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
  23100. $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
  23101. if ${gl_cv_func_stat_file_slash+:} false; then :
  23102. $as_echo_n "(cached) " >&6
  23103. else
  23104. touch conftest.tmp
  23105. # Assume that if we have lstat, we can also check symlinks.
  23106. if test $ac_cv_func_lstat = yes; then
  23107. ln -s conftest.tmp conftest.lnk
  23108. fi
  23109. if test "$cross_compiling" = yes; then :
  23110. case "$host_os" in
  23111. # Guess yes on Linux systems.
  23112. linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
  23113. # Guess yes on glibc systems.
  23114. *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
  23115. # If we don't know, obey --enable-cross-guesses.
  23116. *) gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
  23117. esac
  23118. else
  23119. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23120. /* end confdefs.h. */
  23121. #include <sys/stat.h>
  23122. int
  23123. main ()
  23124. {
  23125. int result = 0;
  23126. struct stat st;
  23127. if (!stat ("conftest.tmp/", &st))
  23128. result |= 1;
  23129. #if HAVE_LSTAT
  23130. if (!stat ("conftest.lnk/", &st))
  23131. result |= 2;
  23132. #endif
  23133. return result;
  23134. ;
  23135. return 0;
  23136. }
  23137. _ACEOF
  23138. if ac_fn_c_try_run "$LINENO"; then :
  23139. gl_cv_func_stat_file_slash=yes
  23140. else
  23141. gl_cv_func_stat_file_slash=no
  23142. fi
  23143. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  23144. conftest.$ac_objext conftest.beam conftest.$ac_ext
  23145. fi
  23146. rm -f conftest.tmp conftest.lnk
  23147. fi
  23148. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
  23149. $as_echo "$gl_cv_func_stat_file_slash" >&6; }
  23150. case $gl_cv_func_stat_file_slash in
  23151. *no)
  23152. REPLACE_STAT=1
  23153. $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
  23154. ;;
  23155. esac
  23156. case $host_os in
  23157. solaris*)
  23158. REPLACE_FSTAT=1 ;;
  23159. esac
  23160. ;;
  23161. esac
  23162. if test $REPLACE_STAT = 1; then
  23163. gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
  23164. case "$host_os" in
  23165. mingw*)
  23166. gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
  23167. ;;
  23168. esac
  23169. :
  23170. fi
  23171. GNULIB_STAT=1
  23172. $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
  23173. ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h>
  23174. #include <sys/stat.h>
  23175. "
  23176. if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
  23177. cat >>confdefs.h <<_ACEOF
  23178. #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
  23179. _ACEOF
  23180. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
  23181. $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
  23182. if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
  23183. $as_echo_n "(cached) " >&6
  23184. else
  23185. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23186. /* end confdefs.h. */
  23187. #include <sys/types.h>
  23188. #include <sys/stat.h>
  23189. #if HAVE_SYS_TIME_H
  23190. # include <sys/time.h>
  23191. #endif
  23192. #include <time.h>
  23193. struct timespec ts;
  23194. struct stat st;
  23195. int
  23196. main ()
  23197. {
  23198. st.st_atim = ts;
  23199. ;
  23200. return 0;
  23201. }
  23202. _ACEOF
  23203. if ac_fn_c_try_compile "$LINENO"; then :
  23204. ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
  23205. else
  23206. ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
  23207. fi
  23208. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  23209. fi
  23210. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
  23211. $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
  23212. if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
  23213. $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
  23214. fi
  23215. else
  23216. ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h>
  23217. #include <sys/stat.h>
  23218. "
  23219. if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
  23220. cat >>confdefs.h <<_ACEOF
  23221. #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
  23222. _ACEOF
  23223. else
  23224. ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
  23225. #include <sys/stat.h>
  23226. "
  23227. if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
  23228. cat >>confdefs.h <<_ACEOF
  23229. #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
  23230. _ACEOF
  23231. else
  23232. ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include <sys/types.h>
  23233. #include <sys/stat.h>
  23234. "
  23235. if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
  23236. cat >>confdefs.h <<_ACEOF
  23237. #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
  23238. _ACEOF
  23239. fi
  23240. fi
  23241. fi
  23242. fi
  23243. ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include <sys/types.h>
  23244. #include <sys/stat.h>
  23245. "
  23246. if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
  23247. cat >>confdefs.h <<_ACEOF
  23248. #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
  23249. _ACEOF
  23250. else
  23251. ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
  23252. #include <sys/stat.h>
  23253. "
  23254. if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
  23255. cat >>confdefs.h <<_ACEOF
  23256. #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
  23257. _ACEOF
  23258. else
  23259. ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include <sys/types.h>
  23260. #include <sys/stat.h>
  23261. "
  23262. if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
  23263. cat >>confdefs.h <<_ACEOF
  23264. #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
  23265. _ACEOF
  23266. fi
  23267. fi
  23268. fi
  23269. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
  23270. $as_echo_n "checking for working stdalign.h... " >&6; }
  23271. if ${gl_cv_header_working_stdalign_h+:} false; then :
  23272. $as_echo_n "(cached) " >&6
  23273. else
  23274. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23275. /* end confdefs.h. */
  23276. #include <stdalign.h>
  23277. #include <stddef.h>
  23278. /* Test that alignof yields a result consistent with offsetof.
  23279. This catches GCC bug 52023
  23280. <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
  23281. #ifdef __cplusplus
  23282. template <class t> struct alignof_helper { char a; t b; };
  23283. # define ao(type) offsetof (alignof_helper<type>, b)
  23284. #else
  23285. # define ao(type) offsetof (struct { char a; type b; }, b)
  23286. #endif
  23287. char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
  23288. char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
  23289. char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
  23290. /* Test _Alignas only on platforms where gnulib can help. */
  23291. #if \
  23292. ((defined __cplusplus && 201103 <= __cplusplus) \
  23293. || (defined __APPLE__ && defined __MACH__ \
  23294. ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
  23295. : __GNUC__) \
  23296. || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
  23297. || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
  23298. || 1300 <= _MSC_VER)
  23299. struct alignas_test { char c; char alignas (8) alignas_8; };
  23300. char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
  23301. ? 1 : -1];
  23302. #endif
  23303. int
  23304. main ()
  23305. {
  23306. ;
  23307. return 0;
  23308. }
  23309. _ACEOF
  23310. if ac_fn_c_try_compile "$LINENO"; then :
  23311. gl_cv_header_working_stdalign_h=yes
  23312. else
  23313. gl_cv_header_working_stdalign_h=no
  23314. fi
  23315. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  23316. fi
  23317. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
  23318. $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
  23319. if test $gl_cv_header_working_stdalign_h = yes; then
  23320. STDALIGN_H=''
  23321. else
  23322. STDALIGN_H='stdalign.h'
  23323. fi
  23324. if test -n "$STDALIGN_H"; then
  23325. GL_GENERATE_STDALIGN_H_TRUE=
  23326. GL_GENERATE_STDALIGN_H_FALSE='#'
  23327. else
  23328. GL_GENERATE_STDALIGN_H_TRUE='#'
  23329. GL_GENERATE_STDALIGN_H_FALSE=
  23330. fi
  23331. if test "$ac_cv_header_stdbool_h" = yes; then
  23332. case "$host_os" in
  23333. solaris*)
  23334. if test -z "$GCC"; then
  23335. STDBOOL_H='stdbool.h'
  23336. else
  23337. STDBOOL_H=''
  23338. fi
  23339. ;;
  23340. *)
  23341. STDBOOL_H=''
  23342. ;;
  23343. esac
  23344. else
  23345. STDBOOL_H='stdbool.h'
  23346. fi
  23347. if test -n "$STDBOOL_H"; then
  23348. GL_GENERATE_STDBOOL_H_TRUE=
  23349. GL_GENERATE_STDBOOL_H_FALSE='#'
  23350. else
  23351. GL_GENERATE_STDBOOL_H_TRUE='#'
  23352. GL_GENERATE_STDBOOL_H_FALSE=
  23353. fi
  23354. if test "$ac_cv_type__Bool" = yes; then
  23355. HAVE__BOOL=1
  23356. else
  23357. HAVE__BOOL=0
  23358. fi
  23359. STDDEF_H=
  23360. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
  23361. $as_echo_n "checking for good max_align_t... " >&6; }
  23362. if ${gl_cv_type_max_align_t+:} false; then :
  23363. $as_echo_n "(cached) " >&6
  23364. else
  23365. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23366. /* end confdefs.h. */
  23367. #include <stddef.h>
  23368. unsigned int s = sizeof (max_align_t);
  23369. #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
  23370. int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
  23371. int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
  23372. #endif
  23373. typedef struct { char a; max_align_t b; } max_helper;
  23374. typedef struct { char a; long b; } long_helper;
  23375. typedef struct { char a; double b; } double_helper;
  23376. typedef struct { char a; long double b; } long_double_helper;
  23377. int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
  23378. int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
  23379. int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
  23380. int
  23381. main ()
  23382. {
  23383. ;
  23384. return 0;
  23385. }
  23386. _ACEOF
  23387. if ac_fn_c_try_compile "$LINENO"; then :
  23388. gl_cv_type_max_align_t=yes
  23389. else
  23390. gl_cv_type_max_align_t=no
  23391. fi
  23392. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  23393. fi
  23394. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
  23395. $as_echo "$gl_cv_type_max_align_t" >&6; }
  23396. if test $gl_cv_type_max_align_t = no; then
  23397. HAVE_MAX_ALIGN_T=0
  23398. STDDEF_H=stddef.h
  23399. fi
  23400. if test $gt_cv_c_wchar_t = no; then
  23401. HAVE_WCHAR_T=0
  23402. STDDEF_H=stddef.h
  23403. fi
  23404. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
  23405. $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
  23406. if ${gl_cv_decl_null_works+:} false; then :
  23407. $as_echo_n "(cached) " >&6
  23408. else
  23409. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23410. /* end confdefs.h. */
  23411. #include <stddef.h>
  23412. int test[2 * (sizeof NULL == sizeof (void *)) -1];
  23413. int
  23414. main ()
  23415. {
  23416. ;
  23417. return 0;
  23418. }
  23419. _ACEOF
  23420. if ac_fn_c_try_compile "$LINENO"; then :
  23421. gl_cv_decl_null_works=yes
  23422. else
  23423. gl_cv_decl_null_works=no
  23424. fi
  23425. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  23426. fi
  23427. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
  23428. $as_echo "$gl_cv_decl_null_works" >&6; }
  23429. if test $gl_cv_decl_null_works = no; then
  23430. REPLACE_NULL=1
  23431. STDDEF_H=stddef.h
  23432. fi
  23433. if test -n "$STDDEF_H"; then
  23434. GL_GENERATE_STDDEF_H_TRUE=
  23435. GL_GENERATE_STDDEF_H_FALSE='#'
  23436. else
  23437. GL_GENERATE_STDDEF_H_TRUE='#'
  23438. GL_GENERATE_STDDEF_H_FALSE=
  23439. fi
  23440. if test -n "$STDDEF_H"; then
  23441. if test $gl_cv_have_include_next = yes; then
  23442. gl_cv_next_stddef_h='<'stddef.h'>'
  23443. else
  23444. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
  23445. $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
  23446. if ${gl_cv_next_stddef_h+:} false; then :
  23447. $as_echo_n "(cached) " >&6
  23448. else
  23449. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23450. /* end confdefs.h. */
  23451. #include <stddef.h>
  23452. _ACEOF
  23453. case "$host_os" in
  23454. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  23455. *) gl_absname_cpp="$ac_cpp" ;;
  23456. esac
  23457. case "$host_os" in
  23458. mingw*)
  23459. gl_dirsep_regex='[/\\]'
  23460. ;;
  23461. *)
  23462. gl_dirsep_regex='\/'
  23463. ;;
  23464. esac
  23465. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  23466. gl_header_literal_regex=`echo 'stddef.h' \
  23467. | sed -e "$gl_make_literal_regex_sed"`
  23468. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  23469. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  23470. s|^/[^/]|//&|
  23471. p
  23472. q
  23473. }'
  23474. gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  23475. sed -n "$gl_absolute_header_sed"`
  23476. gl_header=$gl_cv_absolute_stddef_h
  23477. gl_cv_next_stddef_h='"'$gl_header'"'
  23478. fi
  23479. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
  23480. $as_echo "$gl_cv_next_stddef_h" >&6; }
  23481. fi
  23482. NEXT_STDDEF_H=$gl_cv_next_stddef_h
  23483. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  23484. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  23485. gl_next_as_first_directive='<'stddef.h'>'
  23486. else
  23487. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  23488. gl_next_as_first_directive=$gl_cv_next_stddef_h
  23489. fi
  23490. NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
  23491. fi
  23492. $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
  23493. if test $gl_cv_have_include_next = yes; then
  23494. gl_cv_next_stdio_h='<'stdio.h'>'
  23495. else
  23496. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
  23497. $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
  23498. if ${gl_cv_next_stdio_h+:} false; then :
  23499. $as_echo_n "(cached) " >&6
  23500. else
  23501. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23502. /* end confdefs.h. */
  23503. #include <stdio.h>
  23504. _ACEOF
  23505. case "$host_os" in
  23506. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  23507. *) gl_absname_cpp="$ac_cpp" ;;
  23508. esac
  23509. case "$host_os" in
  23510. mingw*)
  23511. gl_dirsep_regex='[/\\]'
  23512. ;;
  23513. *)
  23514. gl_dirsep_regex='\/'
  23515. ;;
  23516. esac
  23517. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  23518. gl_header_literal_regex=`echo 'stdio.h' \
  23519. | sed -e "$gl_make_literal_regex_sed"`
  23520. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  23521. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  23522. s|^/[^/]|//&|
  23523. p
  23524. q
  23525. }'
  23526. gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  23527. sed -n "$gl_absolute_header_sed"`
  23528. gl_header=$gl_cv_absolute_stdio_h
  23529. gl_cv_next_stdio_h='"'$gl_header'"'
  23530. fi
  23531. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
  23532. $as_echo "$gl_cv_next_stdio_h" >&6; }
  23533. fi
  23534. NEXT_STDIO_H=$gl_cv_next_stdio_h
  23535. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  23536. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  23537. gl_next_as_first_directive='<'stdio.h'>'
  23538. else
  23539. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  23540. gl_next_as_first_directive=$gl_cv_next_stdio_h
  23541. fi
  23542. NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
  23543. { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
  23544. $as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
  23545. if ${gl_cv_func_printf_attribute_flavor+:} false; then :
  23546. $as_echo_n "(cached) " >&6
  23547. else
  23548. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23549. /* end confdefs.h. */
  23550. #define __STDC_FORMAT_MACROS 1
  23551. #include <stdio.h>
  23552. #include <inttypes.h>
  23553. /* For non-mingw systems, compilation will trivially succeed.
  23554. For mingw, compilation will succeed for older mingw (system
  23555. printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
  23556. #if (defined _WIN32 && ! defined __CYGWIN__) && \
  23557. (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
  23558. extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
  23559. #endif
  23560. int
  23561. main ()
  23562. {
  23563. ;
  23564. return 0;
  23565. }
  23566. _ACEOF
  23567. if ac_fn_c_try_compile "$LINENO"; then :
  23568. gl_cv_func_printf_attribute_flavor=system
  23569. else
  23570. gl_cv_func_printf_attribute_flavor=gnu
  23571. fi
  23572. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  23573. fi
  23574. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
  23575. $as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
  23576. if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
  23577. $as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
  23578. fi
  23579. GNULIB_FSCANF=1
  23580. cat >>confdefs.h <<_ACEOF
  23581. #define GNULIB_FSCANF 1
  23582. _ACEOF
  23583. GNULIB_SCANF=1
  23584. cat >>confdefs.h <<_ACEOF
  23585. #define GNULIB_SCANF 1
  23586. _ACEOF
  23587. GNULIB_FGETC=1
  23588. GNULIB_GETC=1
  23589. GNULIB_GETCHAR=1
  23590. GNULIB_FGETS=1
  23591. GNULIB_FREAD=1
  23592. GNULIB_FPRINTF=1
  23593. GNULIB_PRINTF=1
  23594. GNULIB_VFPRINTF=1
  23595. GNULIB_VPRINTF=1
  23596. GNULIB_FPUTC=1
  23597. GNULIB_PUTC=1
  23598. GNULIB_PUTCHAR=1
  23599. GNULIB_FPUTS=1
  23600. GNULIB_PUTS=1
  23601. GNULIB_FWRITE=1
  23602. if test $ac_cv_have_decl_fcloseall = no; then
  23603. HAVE_DECL_FCLOSEALL=0
  23604. fi
  23605. if test $gl_cv_have_include_next = yes; then
  23606. gl_cv_next_stdlib_h='<'stdlib.h'>'
  23607. else
  23608. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
  23609. $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
  23610. if ${gl_cv_next_stdlib_h+:} false; then :
  23611. $as_echo_n "(cached) " >&6
  23612. else
  23613. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23614. /* end confdefs.h. */
  23615. #include <stdlib.h>
  23616. _ACEOF
  23617. case "$host_os" in
  23618. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  23619. *) gl_absname_cpp="$ac_cpp" ;;
  23620. esac
  23621. case "$host_os" in
  23622. mingw*)
  23623. gl_dirsep_regex='[/\\]'
  23624. ;;
  23625. *)
  23626. gl_dirsep_regex='\/'
  23627. ;;
  23628. esac
  23629. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  23630. gl_header_literal_regex=`echo 'stdlib.h' \
  23631. | sed -e "$gl_make_literal_regex_sed"`
  23632. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  23633. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  23634. s|^/[^/]|//&|
  23635. p
  23636. q
  23637. }'
  23638. gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  23639. sed -n "$gl_absolute_header_sed"`
  23640. gl_header=$gl_cv_absolute_stdlib_h
  23641. gl_cv_next_stdlib_h='"'$gl_header'"'
  23642. fi
  23643. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
  23644. $as_echo "$gl_cv_next_stdlib_h" >&6; }
  23645. fi
  23646. NEXT_STDLIB_H=$gl_cv_next_stdlib_h
  23647. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  23648. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  23649. gl_next_as_first_directive='<'stdlib.h'>'
  23650. else
  23651. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  23652. gl_next_as_first_directive=$gl_cv_next_stdlib_h
  23653. fi
  23654. NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
  23655. if test $ac_cv_have_decl_ecvt = no; then
  23656. HAVE_DECL_ECVT=0
  23657. fi
  23658. if test $ac_cv_have_decl_fcvt = no; then
  23659. HAVE_DECL_FCVT=0
  23660. fi
  23661. if test $ac_cv_have_decl_gcvt = no; then
  23662. HAVE_DECL_GCVT=0
  23663. fi
  23664. for ac_func in strchrnul
  23665. do :
  23666. ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
  23667. if test "x$ac_cv_func_strchrnul" = xyes; then :
  23668. cat >>confdefs.h <<_ACEOF
  23669. #define HAVE_STRCHRNUL 1
  23670. _ACEOF
  23671. fi
  23672. done
  23673. if test $ac_cv_func_strchrnul = no; then
  23674. HAVE_STRCHRNUL=0
  23675. else
  23676. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
  23677. $as_echo_n "checking whether strchrnul works... " >&6; }
  23678. if ${gl_cv_func_strchrnul_works+:} false; then :
  23679. $as_echo_n "(cached) " >&6
  23680. else
  23681. if test "$cross_compiling" = yes; then :
  23682. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23683. /* end confdefs.h. */
  23684. #if defined __CYGWIN__
  23685. #include <cygwin/version.h>
  23686. #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
  23687. Lucky user
  23688. #endif
  23689. #else
  23690. Lucky user
  23691. #endif
  23692. _ACEOF
  23693. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  23694. $EGREP "Lucky user" >/dev/null 2>&1; then :
  23695. gl_cv_func_strchrnul_works="guessing yes"
  23696. else
  23697. gl_cv_func_strchrnul_works="guessing no"
  23698. fi
  23699. rm -f conftest*
  23700. else
  23701. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23702. /* end confdefs.h. */
  23703. #include <string.h> /* for strchrnul */
  23704. int
  23705. main ()
  23706. {
  23707. const char *buf = "a";
  23708. return strchrnul (buf, 'b') != buf + 1;
  23709. ;
  23710. return 0;
  23711. }
  23712. _ACEOF
  23713. if ac_fn_c_try_run "$LINENO"; then :
  23714. gl_cv_func_strchrnul_works=yes
  23715. else
  23716. gl_cv_func_strchrnul_works=no
  23717. fi
  23718. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  23719. conftest.$ac_objext conftest.beam conftest.$ac_ext
  23720. fi
  23721. fi
  23722. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
  23723. $as_echo "$gl_cv_func_strchrnul_works" >&6; }
  23724. case "$gl_cv_func_strchrnul_works" in
  23725. *yes) ;;
  23726. *) REPLACE_STRCHRNUL=1 ;;
  23727. esac
  23728. fi
  23729. if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
  23730. gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
  23731. :
  23732. fi
  23733. GNULIB_STRCHRNUL=1
  23734. $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
  23735. if test $gl_cv_func_malloc_posix != yes; then
  23736. REPLACE_STRDUP=1
  23737. fi
  23738. if test $ac_cv_have_decl_strdup = no; then
  23739. HAVE_DECL_STRDUP=0
  23740. fi
  23741. if test $REPLACE_STRDUP = 1; then
  23742. gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
  23743. :
  23744. fi
  23745. GNULIB_STRDUP=1
  23746. $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
  23747. if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
  23748. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
  23749. $as_echo_n "checking for working strerror function... " >&6; }
  23750. if ${gl_cv_func_working_strerror+:} false; then :
  23751. $as_echo_n "(cached) " >&6
  23752. else
  23753. if test "$cross_compiling" = yes; then :
  23754. case "$host_os" in
  23755. # Guess yes on glibc systems.
  23756. *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
  23757. # Guess yes on musl systems.
  23758. *-musl*) gl_cv_func_working_strerror="guessing yes" ;;
  23759. # If we don't know, obey --enable-cross-guesses.
  23760. *) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
  23761. esac
  23762. else
  23763. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23764. /* end confdefs.h. */
  23765. #include <string.h>
  23766. int
  23767. main ()
  23768. {
  23769. if (!*strerror (-2)) return 1;
  23770. ;
  23771. return 0;
  23772. }
  23773. _ACEOF
  23774. if ac_fn_c_try_run "$LINENO"; then :
  23775. gl_cv_func_working_strerror=yes
  23776. else
  23777. gl_cv_func_working_strerror=no
  23778. fi
  23779. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  23780. conftest.$ac_objext conftest.beam conftest.$ac_ext
  23781. fi
  23782. fi
  23783. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
  23784. $as_echo "$gl_cv_func_working_strerror" >&6; }
  23785. case "$gl_cv_func_working_strerror" in
  23786. *yes) ;;
  23787. *)
  23788. REPLACE_STRERROR=1
  23789. ;;
  23790. esac
  23791. case "$gl_cv_func_strerror_r_works" in
  23792. *no) REPLACE_STRERROR=1 ;;
  23793. esac
  23794. else
  23795. REPLACE_STRERROR=1
  23796. fi
  23797. if test $REPLACE_STRERROR = 1; then
  23798. gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
  23799. fi
  23800. cat >>confdefs.h <<_ACEOF
  23801. #define GNULIB_STRERROR 1
  23802. _ACEOF
  23803. GNULIB_STRERROR=1
  23804. $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
  23805. if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
  23806. gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
  23807. if test $ac_cv_header_sys_socket_h != yes; then
  23808. for ac_header in winsock2.h
  23809. do :
  23810. ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
  23811. if test "x$ac_cv_header_winsock2_h" = xyes; then :
  23812. cat >>confdefs.h <<_ACEOF
  23813. #define HAVE_WINSOCK2_H 1
  23814. _ACEOF
  23815. fi
  23816. done
  23817. fi
  23818. if test "$ac_cv_header_winsock2_h" = yes; then
  23819. HAVE_WINSOCK2_H=1
  23820. UNISTD_H_HAVE_WINSOCK2_H=1
  23821. SYS_IOCTL_H_HAVE_WINSOCK2_H=1
  23822. else
  23823. HAVE_WINSOCK2_H=0
  23824. fi
  23825. fi
  23826. if test $ac_cv_have_decl_strerror_r = no; then
  23827. HAVE_DECL_STRERROR_R=0
  23828. fi
  23829. if test $ac_cv_func_strerror_r = yes; then
  23830. if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
  23831. if test $gl_cv_func_strerror_r_posix_signature = yes; then
  23832. case "$gl_cv_func_strerror_r_works" in
  23833. *no) REPLACE_STRERROR_R=1 ;;
  23834. esac
  23835. else
  23836. REPLACE_STRERROR_R=1
  23837. fi
  23838. else
  23839. REPLACE_STRERROR_R=1
  23840. fi
  23841. fi
  23842. if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
  23843. gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
  23844. fi
  23845. GNULIB_STRERROR_R=1
  23846. $as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
  23847. cat >>confdefs.h <<_ACEOF
  23848. #define GNULIB_STRERROR_R_POSIX 1
  23849. _ACEOF
  23850. if test $ac_cv_have_decl_strnlen = no; then
  23851. HAVE_DECL_STRNLEN=0
  23852. else
  23853. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
  23854. $as_echo_n "checking for working strnlen... " >&6; }
  23855. if ${ac_cv_func_strnlen_working+:} false; then :
  23856. $as_echo_n "(cached) " >&6
  23857. else
  23858. if test "$cross_compiling" = yes; then :
  23859. # Guess no on AIX systems, yes otherwise.
  23860. case "$host_os" in
  23861. aix*) ac_cv_func_strnlen_working=no;;
  23862. *) ac_cv_func_strnlen_working=yes;;
  23863. esac
  23864. else
  23865. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23866. /* end confdefs.h. */
  23867. $ac_includes_default
  23868. int
  23869. main ()
  23870. {
  23871. #define S "foobar"
  23872. #define S_LEN (sizeof S - 1)
  23873. /* At least one implementation is buggy: that of AIX 4.3 would
  23874. give strnlen (S, 1) == 3. */
  23875. int i;
  23876. for (i = 0; i < S_LEN + 1; ++i)
  23877. {
  23878. int expected = i <= S_LEN ? i : S_LEN;
  23879. if (strnlen (S, i) != expected)
  23880. return 1;
  23881. }
  23882. return 0;
  23883. ;
  23884. return 0;
  23885. }
  23886. _ACEOF
  23887. if ac_fn_c_try_run "$LINENO"; then :
  23888. ac_cv_func_strnlen_working=yes
  23889. else
  23890. ac_cv_func_strnlen_working=no
  23891. fi
  23892. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  23893. conftest.$ac_objext conftest.beam conftest.$ac_ext
  23894. fi
  23895. fi
  23896. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
  23897. $as_echo "$ac_cv_func_strnlen_working" >&6; }
  23898. test $ac_cv_func_strnlen_working = no && :
  23899. if test $ac_cv_func_strnlen_working = no; then
  23900. REPLACE_STRNLEN=1
  23901. fi
  23902. fi
  23903. if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
  23904. gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
  23905. :
  23906. fi
  23907. GNULIB_STRNLEN=1
  23908. $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
  23909. if test $REPLACE_STRSTR = 0; then
  23910. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
  23911. $as_echo_n "checking whether strstr works in linear time... " >&6; }
  23912. if ${gl_cv_func_strstr_linear+:} false; then :
  23913. $as_echo_n "(cached) " >&6
  23914. else
  23915. if test "$cross_compiling" = yes; then :
  23916. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23917. /* end confdefs.h. */
  23918. #include <features.h>
  23919. #ifdef __GNU_LIBRARY__
  23920. #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
  23921. && !(defined __i386__ || defined __x86_64__) \
  23922. && !defined __UCLIBC__
  23923. Lucky user
  23924. #endif
  23925. #endif
  23926. #ifdef __CYGWIN__
  23927. #include <cygwin/version.h>
  23928. #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
  23929. Lucky user
  23930. #endif
  23931. #endif
  23932. _ACEOF
  23933. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  23934. $EGREP "Lucky user" >/dev/null 2>&1; then :
  23935. gl_cv_func_strstr_linear="guessing yes"
  23936. else
  23937. gl_cv_func_strstr_linear="$gl_cross_guess_normal"
  23938. fi
  23939. rm -f conftest*
  23940. else
  23941. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  23942. /* end confdefs.h. */
  23943. #ifdef __MVS__
  23944. /* z/OS does not deliver signals while strstr() is running (thanks to
  23945. restrictions on its LE runtime), which prevents us from limiting the
  23946. running time of this test. */
  23947. # error "This test does not work properly on z/OS"
  23948. #endif
  23949. #include <signal.h> /* for signal */
  23950. #include <string.h> /* for strstr */
  23951. #include <stdlib.h> /* for malloc */
  23952. #include <unistd.h> /* for alarm */
  23953. static void quit (int sig) { _exit (sig + 128); }
  23954. int
  23955. main ()
  23956. {
  23957. int result = 0;
  23958. size_t m = 1000000;
  23959. char *haystack = (char *) malloc (2 * m + 2);
  23960. char *needle = (char *) malloc (m + 2);
  23961. /* Failure to compile this test due to missing alarm is okay,
  23962. since all such platforms (mingw) also have quadratic strstr. */
  23963. signal (SIGALRM, quit);
  23964. alarm (5);
  23965. /* Check for quadratic performance. */
  23966. if (haystack && needle)
  23967. {
  23968. memset (haystack, 'A', 2 * m);
  23969. haystack[2 * m] = 'B';
  23970. haystack[2 * m + 1] = 0;
  23971. memset (needle, 'A', m);
  23972. needle[m] = 'B';
  23973. needle[m + 1] = 0;
  23974. if (!strstr (haystack, needle))
  23975. result |= 1;
  23976. }
  23977. /* Free allocated memory, in case some sanitizer is watching. */
  23978. free (haystack);
  23979. free (needle);
  23980. return result;
  23981. ;
  23982. return 0;
  23983. }
  23984. _ACEOF
  23985. if ac_fn_c_try_run "$LINENO"; then :
  23986. gl_cv_func_strstr_linear=yes
  23987. else
  23988. gl_cv_func_strstr_linear=no
  23989. fi
  23990. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  23991. conftest.$ac_objext conftest.beam conftest.$ac_ext
  23992. fi
  23993. fi
  23994. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
  23995. $as_echo "$gl_cv_func_strstr_linear" >&6; }
  23996. case "$gl_cv_func_strstr_linear" in
  23997. *yes) ;;
  23998. *)
  23999. REPLACE_STRSTR=1
  24000. ;;
  24001. esac
  24002. fi
  24003. if test $REPLACE_STRSTR = 1; then
  24004. gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
  24005. fi
  24006. if test $REPLACE_MEMCHR = 1; then
  24007. REPLACE_STRSTR=1
  24008. else
  24009. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
  24010. $as_echo_n "checking whether strstr works... " >&6; }
  24011. if ${gl_cv_func_strstr_works_always+:} false; then :
  24012. $as_echo_n "(cached) " >&6
  24013. else
  24014. if test "$cross_compiling" = yes; then :
  24015. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24016. /* end confdefs.h. */
  24017. #ifdef __GNU_LIBRARY__
  24018. #include <features.h>
  24019. #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
  24020. || defined __UCLIBC__
  24021. Lucky user
  24022. #endif
  24023. #elif defined __CYGWIN__
  24024. #include <cygwin/version.h>
  24025. #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
  24026. Lucky user
  24027. #endif
  24028. #else
  24029. Lucky user
  24030. #endif
  24031. _ACEOF
  24032. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  24033. $EGREP "Lucky user" >/dev/null 2>&1; then :
  24034. gl_cv_func_strstr_works_always="guessing yes"
  24035. else
  24036. gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
  24037. fi
  24038. rm -f conftest*
  24039. else
  24040. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24041. /* end confdefs.h. */
  24042. #include <string.h> /* for strstr */
  24043. #ifdef __GNU_LIBRARY__
  24044. #include <features.h>
  24045. #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
  24046. Unlucky user
  24047. #endif
  24048. #endif
  24049. #define P "_EF_BF_BD"
  24050. #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
  24051. #define NEEDLE P P P P P
  24052. int
  24053. main ()
  24054. {
  24055. return !!strstr (HAYSTACK, NEEDLE);
  24056. ;
  24057. return 0;
  24058. }
  24059. _ACEOF
  24060. if ac_fn_c_try_run "$LINENO"; then :
  24061. gl_cv_func_strstr_works_always=yes
  24062. else
  24063. gl_cv_func_strstr_works_always=no
  24064. fi
  24065. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  24066. conftest.$ac_objext conftest.beam conftest.$ac_ext
  24067. fi
  24068. fi
  24069. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
  24070. $as_echo "$gl_cv_func_strstr_works_always" >&6; }
  24071. case "$gl_cv_func_strstr_works_always" in
  24072. *yes) ;;
  24073. *)
  24074. REPLACE_STRSTR=1
  24075. ;;
  24076. esac
  24077. fi
  24078. if test $REPLACE_STRSTR = 1; then
  24079. gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
  24080. fi
  24081. GNULIB_STRSTR=1
  24082. $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
  24083. for ac_func in strtok_r
  24084. do :
  24085. ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
  24086. if test "x$ac_cv_func_strtok_r" = xyes; then :
  24087. cat >>confdefs.h <<_ACEOF
  24088. #define HAVE_STRTOK_R 1
  24089. _ACEOF
  24090. fi
  24091. done
  24092. if test $ac_cv_func_strtok_r = yes; then
  24093. HAVE_STRTOK_R=1
  24094. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
  24095. $as_echo_n "checking whether strtok_r works... " >&6; }
  24096. if ${gl_cv_func_strtok_r_works+:} false; then :
  24097. $as_echo_n "(cached) " >&6
  24098. else
  24099. if test "$cross_compiling" = yes; then :
  24100. case "$host_os" in
  24101. # Guess no on glibc systems.
  24102. *-gnu* | gnu*) gl_cv_func_strtok_r_works="guessing no" ;;
  24103. # Guess yes on native Windows.
  24104. mingw*) gl_cv_func_strtok_r_works="guessing yes" ;;
  24105. *) gl_cv_func_strtok_r_works="guessing yes" ;;
  24106. esac
  24107. else
  24108. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24109. /* end confdefs.h. */
  24110. #ifndef __OPTIMIZE__
  24111. # define __OPTIMIZE__ 1
  24112. #endif
  24113. #undef __OPTIMIZE_SIZE__
  24114. #undef __NO_INLINE__
  24115. #include <stdlib.h>
  24116. #include <string.h>
  24117. int
  24118. main ()
  24119. {
  24120. static const char dummy[] = "\177\01a";
  24121. char delimiters[] = "xxxxxxxx";
  24122. char *save_ptr = (char *) dummy;
  24123. strtok_r (delimiters, "x", &save_ptr);
  24124. strtok_r (NULL, "x", &save_ptr);
  24125. return 0;
  24126. ;
  24127. return 0;
  24128. }
  24129. _ACEOF
  24130. if ac_fn_c_try_run "$LINENO"; then :
  24131. gl_cv_func_strtok_r_works=yes
  24132. else
  24133. gl_cv_func_strtok_r_works=no
  24134. fi
  24135. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  24136. conftest.$ac_objext conftest.beam conftest.$ac_ext
  24137. fi
  24138. fi
  24139. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
  24140. $as_echo "$gl_cv_func_strtok_r_works" >&6; }
  24141. case "$gl_cv_func_strtok_r_works" in
  24142. *no)
  24143. UNDEFINE_STRTOK_R=1
  24144. ;;
  24145. esac
  24146. else
  24147. HAVE_STRTOK_R=0
  24148. fi
  24149. if test $ac_cv_have_decl_strtok_r = no; then
  24150. HAVE_DECL_STRTOK_R=0
  24151. fi
  24152. if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
  24153. gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
  24154. :
  24155. fi
  24156. GNULIB_STRTOK_R=1
  24157. $as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
  24158. if test $gl_cv_have_include_next = yes; then
  24159. gl_cv_next_sys_random_h='<'sys/random.h'>'
  24160. else
  24161. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
  24162. $as_echo_n "checking absolute name of <sys/random.h>... " >&6; }
  24163. if ${gl_cv_next_sys_random_h+:} false; then :
  24164. $as_echo_n "(cached) " >&6
  24165. else
  24166. if test $ac_cv_header_sys_random_h = yes; then
  24167. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24168. /* end confdefs.h. */
  24169. #include <sys/random.h>
  24170. _ACEOF
  24171. case "$host_os" in
  24172. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  24173. *) gl_absname_cpp="$ac_cpp" ;;
  24174. esac
  24175. case "$host_os" in
  24176. mingw*)
  24177. gl_dirsep_regex='[/\\]'
  24178. ;;
  24179. *)
  24180. gl_dirsep_regex='\/'
  24181. ;;
  24182. esac
  24183. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  24184. gl_header_literal_regex=`echo 'sys/random.h' \
  24185. | sed -e "$gl_make_literal_regex_sed"`
  24186. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  24187. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  24188. s|^/[^/]|//&|
  24189. p
  24190. q
  24191. }'
  24192. gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  24193. sed -n "$gl_absolute_header_sed"`
  24194. gl_header=$gl_cv_absolute_sys_random_h
  24195. gl_cv_next_sys_random_h='"'$gl_header'"'
  24196. else
  24197. gl_cv_next_sys_random_h='<'sys/random.h'>'
  24198. fi
  24199. fi
  24200. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
  24201. $as_echo "$gl_cv_next_sys_random_h" >&6; }
  24202. fi
  24203. NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h
  24204. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  24205. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  24206. gl_next_as_first_directive='<'sys/random.h'>'
  24207. else
  24208. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  24209. gl_next_as_first_directive=$gl_cv_next_sys_random_h
  24210. fi
  24211. NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive
  24212. if test $ac_cv_header_sys_random_h = yes; then
  24213. HAVE_SYS_RANDOM_H=1
  24214. else
  24215. HAVE_SYS_RANDOM_H=0
  24216. fi
  24217. if test $ac_cv_header_sys_random_h = yes; then
  24218. UNISTD_H_HAVE_SYS_RANDOM_H=1
  24219. fi
  24220. if test $gl_cv_have_include_next = yes; then
  24221. gl_cv_next_sys_stat_h='<'sys/stat.h'>'
  24222. else
  24223. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
  24224. $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
  24225. if ${gl_cv_next_sys_stat_h+:} false; then :
  24226. $as_echo_n "(cached) " >&6
  24227. else
  24228. if test $ac_cv_header_sys_stat_h = yes; then
  24229. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24230. /* end confdefs.h. */
  24231. #include <sys/stat.h>
  24232. _ACEOF
  24233. case "$host_os" in
  24234. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  24235. *) gl_absname_cpp="$ac_cpp" ;;
  24236. esac
  24237. case "$host_os" in
  24238. mingw*)
  24239. gl_dirsep_regex='[/\\]'
  24240. ;;
  24241. *)
  24242. gl_dirsep_regex='\/'
  24243. ;;
  24244. esac
  24245. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  24246. gl_header_literal_regex=`echo 'sys/stat.h' \
  24247. | sed -e "$gl_make_literal_regex_sed"`
  24248. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  24249. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  24250. s|^/[^/]|//&|
  24251. p
  24252. q
  24253. }'
  24254. gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  24255. sed -n "$gl_absolute_header_sed"`
  24256. gl_header=$gl_cv_absolute_sys_stat_h
  24257. gl_cv_next_sys_stat_h='"'$gl_header'"'
  24258. else
  24259. gl_cv_next_sys_stat_h='<'sys/stat.h'>'
  24260. fi
  24261. fi
  24262. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
  24263. $as_echo "$gl_cv_next_sys_stat_h" >&6; }
  24264. fi
  24265. NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
  24266. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  24267. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  24268. gl_next_as_first_directive='<'sys/stat.h'>'
  24269. else
  24270. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  24271. gl_next_as_first_directive=$gl_cv_next_sys_stat_h
  24272. fi
  24273. NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
  24274. WINDOWS_STAT_TIMESPEC=0
  24275. ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
  24276. #include <sys/stat.h>
  24277. "
  24278. if test "x$ac_cv_type_nlink_t" = xyes; then :
  24279. else
  24280. $as_echo "#define nlink_t int" >>confdefs.h
  24281. fi
  24282. if test $gl_cv_have_include_next = yes; then
  24283. gl_cv_next_sys_uio_h='<'sys/uio.h'>'
  24284. else
  24285. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
  24286. $as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
  24287. if ${gl_cv_next_sys_uio_h+:} false; then :
  24288. $as_echo_n "(cached) " >&6
  24289. else
  24290. if test $ac_cv_header_sys_uio_h = yes; then
  24291. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24292. /* end confdefs.h. */
  24293. #include <sys/uio.h>
  24294. _ACEOF
  24295. case "$host_os" in
  24296. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  24297. *) gl_absname_cpp="$ac_cpp" ;;
  24298. esac
  24299. case "$host_os" in
  24300. mingw*)
  24301. gl_dirsep_regex='[/\\]'
  24302. ;;
  24303. *)
  24304. gl_dirsep_regex='\/'
  24305. ;;
  24306. esac
  24307. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  24308. gl_header_literal_regex=`echo 'sys/uio.h' \
  24309. | sed -e "$gl_make_literal_regex_sed"`
  24310. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  24311. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  24312. s|^/[^/]|//&|
  24313. p
  24314. q
  24315. }'
  24316. gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  24317. sed -n "$gl_absolute_header_sed"`
  24318. gl_header=$gl_cv_absolute_sys_uio_h
  24319. gl_cv_next_sys_uio_h='"'$gl_header'"'
  24320. else
  24321. gl_cv_next_sys_uio_h='<'sys/uio.h'>'
  24322. fi
  24323. fi
  24324. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
  24325. $as_echo "$gl_cv_next_sys_uio_h" >&6; }
  24326. fi
  24327. NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
  24328. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  24329. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  24330. gl_next_as_first_directive='<'sys/uio.h'>'
  24331. else
  24332. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  24333. gl_next_as_first_directive=$gl_cv_next_sys_uio_h
  24334. fi
  24335. NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
  24336. if test $ac_cv_header_sys_uio_h = yes; then
  24337. HAVE_SYS_UIO_H=1
  24338. else
  24339. HAVE_SYS_UIO_H=0
  24340. fi
  24341. if test $gl_cv_have_include_next = yes; then
  24342. gl_cv_next_sys_wait_h='<'sys/wait.h'>'
  24343. else
  24344. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
  24345. $as_echo_n "checking absolute name of <sys/wait.h>... " >&6; }
  24346. if ${gl_cv_next_sys_wait_h+:} false; then :
  24347. $as_echo_n "(cached) " >&6
  24348. else
  24349. if test $ac_cv_header_sys_wait_h = yes; then
  24350. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24351. /* end confdefs.h. */
  24352. #include <sys/wait.h>
  24353. _ACEOF
  24354. case "$host_os" in
  24355. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  24356. *) gl_absname_cpp="$ac_cpp" ;;
  24357. esac
  24358. case "$host_os" in
  24359. mingw*)
  24360. gl_dirsep_regex='[/\\]'
  24361. ;;
  24362. *)
  24363. gl_dirsep_regex='\/'
  24364. ;;
  24365. esac
  24366. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  24367. gl_header_literal_regex=`echo 'sys/wait.h' \
  24368. | sed -e "$gl_make_literal_regex_sed"`
  24369. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  24370. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  24371. s|^/[^/]|//&|
  24372. p
  24373. q
  24374. }'
  24375. gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  24376. sed -n "$gl_absolute_header_sed"`
  24377. gl_header=$gl_cv_absolute_sys_wait_h
  24378. gl_cv_next_sys_wait_h='"'$gl_header'"'
  24379. else
  24380. gl_cv_next_sys_wait_h='<'sys/wait.h'>'
  24381. fi
  24382. fi
  24383. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
  24384. $as_echo "$gl_cv_next_sys_wait_h" >&6; }
  24385. fi
  24386. NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
  24387. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  24388. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  24389. gl_next_as_first_directive='<'sys/wait.h'>'
  24390. else
  24391. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  24392. gl_next_as_first_directive=$gl_cv_next_sys_wait_h
  24393. fi
  24394. NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
  24395. :
  24396. cat >>confdefs.h <<_ACEOF
  24397. #define GNULIB_TEMPNAME 1
  24398. _ACEOF
  24399. ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "/* mingw's <time.h> provides the functions asctime_r, ctime_r,
  24400. gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
  24401. been included before. */
  24402. #if defined __MINGW32__
  24403. # include <unistd.h>
  24404. #endif
  24405. #include <time.h>
  24406. "
  24407. if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
  24408. ac_have_decl=1
  24409. else
  24410. ac_have_decl=0
  24411. fi
  24412. cat >>confdefs.h <<_ACEOF
  24413. #define HAVE_DECL_LOCALTIME_R $ac_have_decl
  24414. _ACEOF
  24415. if test $ac_cv_have_decl_localtime_r = no; then
  24416. HAVE_DECL_LOCALTIME_R=0
  24417. fi
  24418. if test $ac_cv_func_localtime_r = yes; then
  24419. HAVE_LOCALTIME_R=1
  24420. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
  24421. $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
  24422. if ${gl_cv_time_r_posix+:} false; then :
  24423. $as_echo_n "(cached) " >&6
  24424. else
  24425. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24426. /* end confdefs.h. */
  24427. /* mingw's <time.h> provides the functions asctime_r, ctime_r,
  24428. gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
  24429. been included before. */
  24430. #if defined __MINGW32__
  24431. # include <unistd.h>
  24432. #endif
  24433. #include <time.h>
  24434. int
  24435. main ()
  24436. {
  24437. /* We don't need to append 'restrict's to the argument types,
  24438. even though the POSIX signature has the 'restrict's,
  24439. since C99 says they can't affect type compatibility. */
  24440. struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
  24441. if (ptr) return 0;
  24442. /* Check the return type is a pointer.
  24443. On HP-UX 10 it is 'int'. */
  24444. *localtime_r (0, 0);
  24445. ;
  24446. return 0;
  24447. }
  24448. _ACEOF
  24449. if ac_fn_c_try_compile "$LINENO"; then :
  24450. gl_cv_time_r_posix=yes
  24451. else
  24452. gl_cv_time_r_posix=no
  24453. fi
  24454. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  24455. fi
  24456. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
  24457. $as_echo "$gl_cv_time_r_posix" >&6; }
  24458. if test $gl_cv_time_r_posix = yes; then
  24459. REPLACE_LOCALTIME_R=0
  24460. else
  24461. REPLACE_LOCALTIME_R=1
  24462. fi
  24463. else
  24464. HAVE_LOCALTIME_R=0
  24465. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5
  24466. $as_echo_n "checking whether localtime_r exists as an inline function... " >&6; }
  24467. if ${gl_cv_func_localtime_r_inline+:} false; then :
  24468. $as_echo_n "(cached) " >&6
  24469. else
  24470. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24471. /* end confdefs.h. */
  24472. /* mingw's <time.h> provides the functions asctime_r, ctime_r,
  24473. gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
  24474. been included before. */
  24475. #if defined __MINGW32__
  24476. # include <unistd.h>
  24477. #endif
  24478. #include <time.h>
  24479. int
  24480. main ()
  24481. {
  24482. time_t a;
  24483. struct tm r;
  24484. localtime_r (&a, &r);
  24485. ;
  24486. return 0;
  24487. }
  24488. _ACEOF
  24489. if ac_fn_c_try_link "$LINENO"; then :
  24490. gl_cv_func_localtime_r_inline=yes
  24491. else
  24492. gl_cv_func_localtime_r_inline=no
  24493. fi
  24494. rm -f core conftest.err conftest.$ac_objext \
  24495. conftest$ac_exeext conftest.$ac_ext
  24496. fi
  24497. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_r_inline" >&5
  24498. $as_echo "$gl_cv_func_localtime_r_inline" >&6; }
  24499. if test $gl_cv_func_localtime_r_inline = yes; then
  24500. REPLACE_LOCALTIME_R=1
  24501. fi
  24502. fi
  24503. if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
  24504. gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
  24505. :
  24506. fi
  24507. GNULIB_TIME_R=1
  24508. $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
  24509. if test $gl_cv_have_include_next = yes; then
  24510. gl_cv_next_unistd_h='<'unistd.h'>'
  24511. else
  24512. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
  24513. $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
  24514. if ${gl_cv_next_unistd_h+:} false; then :
  24515. $as_echo_n "(cached) " >&6
  24516. else
  24517. if test $ac_cv_header_unistd_h = yes; then
  24518. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24519. /* end confdefs.h. */
  24520. #include <unistd.h>
  24521. _ACEOF
  24522. case "$host_os" in
  24523. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  24524. *) gl_absname_cpp="$ac_cpp" ;;
  24525. esac
  24526. case "$host_os" in
  24527. mingw*)
  24528. gl_dirsep_regex='[/\\]'
  24529. ;;
  24530. *)
  24531. gl_dirsep_regex='\/'
  24532. ;;
  24533. esac
  24534. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  24535. gl_header_literal_regex=`echo 'unistd.h' \
  24536. | sed -e "$gl_make_literal_regex_sed"`
  24537. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  24538. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  24539. s|^/[^/]|//&|
  24540. p
  24541. q
  24542. }'
  24543. gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  24544. sed -n "$gl_absolute_header_sed"`
  24545. gl_header=$gl_cv_absolute_unistd_h
  24546. gl_cv_next_unistd_h='"'$gl_header'"'
  24547. else
  24548. gl_cv_next_unistd_h='<'unistd.h'>'
  24549. fi
  24550. fi
  24551. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
  24552. $as_echo "$gl_cv_next_unistd_h" >&6; }
  24553. fi
  24554. NEXT_UNISTD_H=$gl_cv_next_unistd_h
  24555. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  24556. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  24557. gl_next_as_first_directive='<'unistd.h'>'
  24558. else
  24559. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  24560. gl_next_as_first_directive=$gl_cv_next_unistd_h
  24561. fi
  24562. NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
  24563. if test $ac_cv_header_unistd_h = yes; then
  24564. HAVE_UNISTD_H=1
  24565. else
  24566. HAVE_UNISTD_H=0
  24567. fi
  24568. if test $ac_cv_have_decl_execvpe = no; then
  24569. HAVE_DECL_EXECVPE=0
  24570. fi
  24571. if test $ac_cv_have_decl_unsetenv = no; then
  24572. HAVE_DECL_UNSETENV=0
  24573. fi
  24574. for ac_func in unsetenv
  24575. do :
  24576. ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
  24577. if test "x$ac_cv_func_unsetenv" = xyes; then :
  24578. cat >>confdefs.h <<_ACEOF
  24579. #define HAVE_UNSETENV 1
  24580. _ACEOF
  24581. fi
  24582. done
  24583. if test $ac_cv_func_unsetenv = no; then
  24584. HAVE_UNSETENV=0
  24585. else
  24586. HAVE_UNSETENV=1
  24587. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
  24588. $as_echo_n "checking for unsetenv() return type... " >&6; }
  24589. if ${gt_cv_func_unsetenv_ret+:} false; then :
  24590. $as_echo_n "(cached) " >&6
  24591. else
  24592. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24593. /* end confdefs.h. */
  24594. #undef _BSD
  24595. #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
  24596. #include <stdlib.h>
  24597. extern
  24598. #ifdef __cplusplus
  24599. "C"
  24600. #endif
  24601. int unsetenv (const char *name);
  24602. int
  24603. main ()
  24604. {
  24605. ;
  24606. return 0;
  24607. }
  24608. _ACEOF
  24609. if ac_fn_c_try_compile "$LINENO"; then :
  24610. gt_cv_func_unsetenv_ret='int'
  24611. else
  24612. gt_cv_func_unsetenv_ret='void'
  24613. fi
  24614. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  24615. fi
  24616. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
  24617. $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
  24618. if test $gt_cv_func_unsetenv_ret = 'void'; then
  24619. $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
  24620. REPLACE_UNSETENV=1
  24621. fi
  24622. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
  24623. $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
  24624. if ${gl_cv_func_unsetenv_works+:} false; then :
  24625. $as_echo_n "(cached) " >&6
  24626. else
  24627. if test "$cross_compiling" = yes; then :
  24628. case "$host_os" in
  24629. # Guess yes on glibc systems.
  24630. *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
  24631. # If we don't know, obey --enable-cross-guesses.
  24632. *) gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
  24633. esac
  24634. else
  24635. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24636. /* end confdefs.h. */
  24637. #include <stdlib.h>
  24638. #include <errno.h>
  24639. extern char **environ;
  24640. $gl_mda_defines
  24641. int
  24642. main ()
  24643. {
  24644. char entry1[] = "a=1";
  24645. char entry2[] = "b=2";
  24646. char *env[] = { entry1, entry2, NULL };
  24647. if (putenv ((char *) "a=1")) return 1;
  24648. if (putenv (entry2)) return 2;
  24649. entry2[0] = 'a';
  24650. unsetenv ("a");
  24651. if (getenv ("a")) return 3;
  24652. if (!unsetenv ("") || errno != EINVAL) return 4;
  24653. entry2[0] = 'b';
  24654. environ = env;
  24655. if (!getenv ("a")) return 5;
  24656. entry2[0] = 'a';
  24657. unsetenv ("a");
  24658. if (getenv ("a")) return 6;
  24659. ;
  24660. return 0;
  24661. }
  24662. _ACEOF
  24663. if ac_fn_c_try_run "$LINENO"; then :
  24664. gl_cv_func_unsetenv_works=yes
  24665. else
  24666. gl_cv_func_unsetenv_works=no
  24667. fi
  24668. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  24669. conftest.$ac_objext conftest.beam conftest.$ac_ext
  24670. fi
  24671. fi
  24672. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
  24673. $as_echo "$gl_cv_func_unsetenv_works" >&6; }
  24674. case "$gl_cv_func_unsetenv_works" in
  24675. *yes) ;;
  24676. *)
  24677. REPLACE_UNSETENV=1
  24678. ;;
  24679. esac
  24680. fi
  24681. if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
  24682. gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
  24683. fi
  24684. GNULIB_UNSETENV=1
  24685. $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
  24686. if test $gl_cv_have_include_next = yes; then
  24687. gl_cv_next_wchar_h='<'wchar.h'>'
  24688. else
  24689. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
  24690. $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
  24691. if ${gl_cv_next_wchar_h+:} false; then :
  24692. $as_echo_n "(cached) " >&6
  24693. else
  24694. if test $ac_cv_header_wchar_h = yes; then
  24695. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24696. /* end confdefs.h. */
  24697. #include <wchar.h>
  24698. _ACEOF
  24699. case "$host_os" in
  24700. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  24701. *) gl_absname_cpp="$ac_cpp" ;;
  24702. esac
  24703. case "$host_os" in
  24704. mingw*)
  24705. gl_dirsep_regex='[/\\]'
  24706. ;;
  24707. *)
  24708. gl_dirsep_regex='\/'
  24709. ;;
  24710. esac
  24711. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  24712. gl_header_literal_regex=`echo 'wchar.h' \
  24713. | sed -e "$gl_make_literal_regex_sed"`
  24714. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  24715. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  24716. s|^/[^/]|//&|
  24717. p
  24718. q
  24719. }'
  24720. gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  24721. sed -n "$gl_absolute_header_sed"`
  24722. gl_header=$gl_cv_absolute_wchar_h
  24723. gl_cv_next_wchar_h='"'$gl_header'"'
  24724. else
  24725. gl_cv_next_wchar_h='<'wchar.h'>'
  24726. fi
  24727. fi
  24728. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
  24729. $as_echo "$gl_cv_next_wchar_h" >&6; }
  24730. fi
  24731. NEXT_WCHAR_H=$gl_cv_next_wchar_h
  24732. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  24733. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  24734. gl_next_as_first_directive='<'wchar.h'>'
  24735. else
  24736. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  24737. gl_next_as_first_directive=$gl_cv_next_wchar_h
  24738. fi
  24739. NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
  24740. if test $ac_cv_header_wchar_h = yes; then
  24741. HAVE_WCHAR_H=1
  24742. else
  24743. HAVE_WCHAR_H=0
  24744. fi
  24745. if test $gt_cv_c_wint_t = yes; then
  24746. HAVE_WINT_T=1
  24747. else
  24748. HAVE_WINT_T=0
  24749. fi
  24750. ac_fn_c_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
  24751. #include <wchar.h>
  24752. "
  24753. if test "x$ac_cv_have_decl_wcsdup" = xyes; then :
  24754. ac_have_decl=1
  24755. else
  24756. ac_have_decl=0
  24757. fi
  24758. cat >>confdefs.h <<_ACEOF
  24759. #define HAVE_DECL_WCSDUP $ac_have_decl
  24760. _ACEOF
  24761. if test $ac_cv_have_decl_wcsdup = no; then
  24762. HAVE_DECL_WCSDUP=0
  24763. fi
  24764. if test $ac_cv_func_iswcntrl = yes; then
  24765. HAVE_ISWCNTRL=1
  24766. else
  24767. HAVE_ISWCNTRL=0
  24768. fi
  24769. if test $gt_cv_c_wint_t = yes; then
  24770. HAVE_WINT_T=1
  24771. else
  24772. HAVE_WINT_T=0
  24773. fi
  24774. if test $gl_cv_have_include_next = yes; then
  24775. gl_cv_next_wctype_h='<'wctype.h'>'
  24776. else
  24777. { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
  24778. $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
  24779. if ${gl_cv_next_wctype_h+:} false; then :
  24780. $as_echo_n "(cached) " >&6
  24781. else
  24782. if test $ac_cv_header_wctype_h = yes; then
  24783. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24784. /* end confdefs.h. */
  24785. #include <wctype.h>
  24786. _ACEOF
  24787. case "$host_os" in
  24788. aix*) gl_absname_cpp="$ac_cpp -C" ;;
  24789. *) gl_absname_cpp="$ac_cpp" ;;
  24790. esac
  24791. case "$host_os" in
  24792. mingw*)
  24793. gl_dirsep_regex='[/\\]'
  24794. ;;
  24795. *)
  24796. gl_dirsep_regex='\/'
  24797. ;;
  24798. esac
  24799. gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  24800. gl_header_literal_regex=`echo 'wctype.h' \
  24801. | sed -e "$gl_make_literal_regex_sed"`
  24802. gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
  24803. s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
  24804. s|^/[^/]|//&|
  24805. p
  24806. q
  24807. }'
  24808. gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  24809. sed -n "$gl_absolute_header_sed"`
  24810. gl_header=$gl_cv_absolute_wctype_h
  24811. gl_cv_next_wctype_h='"'$gl_header'"'
  24812. else
  24813. gl_cv_next_wctype_h='<'wctype.h'>'
  24814. fi
  24815. fi
  24816. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
  24817. $as_echo "$gl_cv_next_wctype_h" >&6; }
  24818. fi
  24819. NEXT_WCTYPE_H=$gl_cv_next_wctype_h
  24820. if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
  24821. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
  24822. gl_next_as_first_directive='<'wctype.h'>'
  24823. else
  24824. # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
  24825. gl_next_as_first_directive=$gl_cv_next_wctype_h
  24826. fi
  24827. NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
  24828. if test $ac_cv_header_wctype_h = yes; then
  24829. if test $ac_cv_func_iswcntrl = yes; then
  24830. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
  24831. $as_echo_n "checking whether iswcntrl works... " >&6; }
  24832. if ${gl_cv_func_iswcntrl_works+:} false; then :
  24833. $as_echo_n "(cached) " >&6
  24834. else
  24835. if test "$cross_compiling" = yes; then :
  24836. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24837. /* end confdefs.h. */
  24838. #include <stdlib.h>
  24839. #if __GNU_LIBRARY__ == 1
  24840. Linux libc5 i18n is broken.
  24841. #endif
  24842. int
  24843. main ()
  24844. {
  24845. ;
  24846. return 0;
  24847. }
  24848. _ACEOF
  24849. if ac_fn_c_try_compile "$LINENO"; then :
  24850. gl_cv_func_iswcntrl_works="guessing yes"
  24851. else
  24852. gl_cv_func_iswcntrl_works="guessing no"
  24853. fi
  24854. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  24855. else
  24856. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24857. /* end confdefs.h. */
  24858. #include <wchar.h>
  24859. #include <wctype.h>
  24860. int main () { return iswprint ('x') == 0; }
  24861. _ACEOF
  24862. if ac_fn_c_try_run "$LINENO"; then :
  24863. gl_cv_func_iswcntrl_works=yes
  24864. else
  24865. gl_cv_func_iswcntrl_works=no
  24866. fi
  24867. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  24868. conftest.$ac_objext conftest.beam conftest.$ac_ext
  24869. fi
  24870. fi
  24871. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
  24872. $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
  24873. fi
  24874. HAVE_WCTYPE_H=1
  24875. else
  24876. HAVE_WCTYPE_H=0
  24877. fi
  24878. if test $GNULIB_OVERRIDES_WINT_T = 1; then
  24879. REPLACE_ISWCNTRL=1
  24880. else
  24881. case "$gl_cv_func_iswcntrl_works" in
  24882. *yes) REPLACE_ISWCNTRL=0 ;;
  24883. *) REPLACE_ISWCNTRL=1 ;;
  24884. esac
  24885. fi
  24886. if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
  24887. :
  24888. fi
  24889. if test $REPLACE_ISWCNTRL = 1; then
  24890. REPLACE_TOWLOWER=1
  24891. else
  24892. for ac_func in towlower
  24893. do :
  24894. ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
  24895. if test "x$ac_cv_func_towlower" = xyes; then :
  24896. cat >>confdefs.h <<_ACEOF
  24897. #define HAVE_TOWLOWER 1
  24898. _ACEOF
  24899. fi
  24900. done
  24901. if test $ac_cv_func_towlower = yes; then
  24902. REPLACE_TOWLOWER=0
  24903. else
  24904. ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
  24905. #if HAVE_WCTYPE_H
  24906. # include <wctype.h>
  24907. #endif
  24908. "
  24909. if test "x$ac_cv_have_decl_towlower" = xyes; then :
  24910. ac_have_decl=1
  24911. else
  24912. ac_have_decl=0
  24913. fi
  24914. cat >>confdefs.h <<_ACEOF
  24915. #define HAVE_DECL_TOWLOWER $ac_have_decl
  24916. _ACEOF
  24917. if test $ac_cv_have_decl_towlower = yes; then
  24918. REPLACE_TOWLOWER=1
  24919. else
  24920. REPLACE_TOWLOWER=0
  24921. fi
  24922. fi
  24923. fi
  24924. if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
  24925. :
  24926. fi
  24927. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
  24928. $as_echo_n "checking for wctype_t... " >&6; }
  24929. if ${gl_cv_type_wctype_t+:} false; then :
  24930. $as_echo_n "(cached) " >&6
  24931. else
  24932. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24933. /* end confdefs.h. */
  24934. #include <wchar.h>
  24935. #if HAVE_WCTYPE_H
  24936. # include <wctype.h>
  24937. #endif
  24938. wctype_t a;
  24939. int
  24940. main ()
  24941. {
  24942. ;
  24943. return 0;
  24944. }
  24945. _ACEOF
  24946. if ac_fn_c_try_compile "$LINENO"; then :
  24947. gl_cv_type_wctype_t=yes
  24948. else
  24949. gl_cv_type_wctype_t=no
  24950. fi
  24951. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  24952. fi
  24953. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
  24954. $as_echo "$gl_cv_type_wctype_t" >&6; }
  24955. if test $gl_cv_type_wctype_t = no; then
  24956. HAVE_WCTYPE_T=0
  24957. fi
  24958. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
  24959. $as_echo_n "checking for wctrans_t... " >&6; }
  24960. if ${gl_cv_type_wctrans_t+:} false; then :
  24961. $as_echo_n "(cached) " >&6
  24962. else
  24963. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24964. /* end confdefs.h. */
  24965. #include <wchar.h>
  24966. #include <wctype.h>
  24967. wctrans_t a;
  24968. int
  24969. main ()
  24970. {
  24971. ;
  24972. return 0;
  24973. }
  24974. _ACEOF
  24975. if ac_fn_c_try_compile "$LINENO"; then :
  24976. gl_cv_type_wctrans_t=yes
  24977. else
  24978. gl_cv_type_wctrans_t=no
  24979. fi
  24980. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  24981. fi
  24982. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
  24983. $as_echo "$gl_cv_type_wctrans_t" >&6; }
  24984. if test $gl_cv_type_wctrans_t = no; then
  24985. HAVE_WCTRANS_T=0
  24986. fi
  24987. case "$host_os" in
  24988. mingw*)
  24989. gl_LIBOBJS="$gl_LIBOBJS windows-mutex.$ac_objext"
  24990. ;;
  24991. esac
  24992. case "$host_os" in
  24993. mingw*)
  24994. gl_LIBOBJS="$gl_LIBOBJS windows-once.$ac_objext"
  24995. ;;
  24996. esac
  24997. case "$host_os" in
  24998. mingw*)
  24999. gl_LIBOBJS="$gl_LIBOBJS windows-recmutex.$ac_objext"
  25000. ;;
  25001. esac
  25002. case "$host_os" in
  25003. mingw*)
  25004. gl_LIBOBJS="$gl_LIBOBJS windows-rwlock.$ac_objext"
  25005. ;;
  25006. esac
  25007. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wmemchr" >&5
  25008. $as_echo_n "checking for wmemchr... " >&6; }
  25009. if ${gl_cv_func_wmemchr+:} false; then :
  25010. $as_echo_n "(cached) " >&6
  25011. else
  25012. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  25013. /* end confdefs.h. */
  25014. #include <wchar.h>
  25015. int
  25016. main ()
  25017. {
  25018. return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);
  25019. ;
  25020. return 0;
  25021. }
  25022. _ACEOF
  25023. if ac_fn_c_try_link "$LINENO"; then :
  25024. gl_cv_func_wmemchr=yes
  25025. else
  25026. gl_cv_func_wmemchr=no
  25027. fi
  25028. rm -f core conftest.err conftest.$ac_objext \
  25029. conftest$ac_exeext conftest.$ac_ext
  25030. fi
  25031. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wmemchr" >&5
  25032. $as_echo "$gl_cv_func_wmemchr" >&6; }
  25033. if test $gl_cv_func_wmemchr = no; then
  25034. HAVE_WMEMCHR=0
  25035. fi
  25036. if test $HAVE_WMEMCHR = 0; then
  25037. gl_LIBOBJS="$gl_LIBOBJS wmemchr.$ac_objext"
  25038. fi
  25039. GNULIB_WMEMCHR=1
  25040. $as_echo "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h
  25041. if test $ac_cv_func_wmempcpy = no; then
  25042. HAVE_WMEMPCPY=0
  25043. fi
  25044. if test $HAVE_WMEMPCPY = 0; then
  25045. gl_LIBOBJS="$gl_LIBOBJS wmempcpy.$ac_objext"
  25046. fi
  25047. GNULIB_WMEMPCPY=1
  25048. $as_echo "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h
  25049. # End of code from modules
  25050. gltests_libdeps=
  25051. gltests_ltlibdeps=
  25052. gl_source_base='tests'
  25053. gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
  25054. gl_module_indicator_condition=$gltests_WITNESS
  25055. LIBGNU_LIBDEPS="$gl_libdeps"
  25056. LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
  25057. am__api_version='1.15'
  25058. # Find a good install program. We prefer a C program (faster),
  25059. # so one script is as good as another. But avoid the broken or
  25060. # incompatible versions:
  25061. # SysV /etc/install, /usr/sbin/install
  25062. # SunOS /usr/etc/install
  25063. # IRIX /sbin/install
  25064. # AIX /bin/install
  25065. # AmigaOS /C/install, which installs bootblocks on floppy discs
  25066. # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  25067. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  25068. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  25069. # OS/2's system install, which has a completely different semantic
  25070. # ./install, which can be erroneously created by make from ./install.sh.
  25071. # Reject install programs that cannot install multiple files.
  25072. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
  25073. $as_echo_n "checking for a BSD-compatible install... " >&6; }
  25074. if test -z "$INSTALL"; then
  25075. if ${ac_cv_path_install+:} false; then :
  25076. $as_echo_n "(cached) " >&6
  25077. else
  25078. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  25079. for as_dir in $PATH
  25080. do
  25081. IFS=$as_save_IFS
  25082. test -z "$as_dir" && as_dir=.
  25083. # Account for people who put trailing slashes in PATH elements.
  25084. case $as_dir/ in #((
  25085. ./ | .// | /[cC]/* | \
  25086. /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
  25087. ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
  25088. /usr/ucb/* ) ;;
  25089. *)
  25090. # OSF1 and SCO ODT 3.0 have their own names for install.
  25091. # Don't use installbsd from OSF since it installs stuff as root
  25092. # by default.
  25093. for ac_prog in ginstall scoinst install; do
  25094. for ac_exec_ext in '' $ac_executable_extensions; do
  25095. if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
  25096. if test $ac_prog = install &&
  25097. grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
  25098. # AIX install. It has an incompatible calling convention.
  25099. :
  25100. elif test $ac_prog = install &&
  25101. grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
  25102. # program-specific install script used by HP pwplus--don't use.
  25103. :
  25104. else
  25105. rm -rf conftest.one conftest.two conftest.dir
  25106. echo one > conftest.one
  25107. echo two > conftest.two
  25108. mkdir conftest.dir
  25109. if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
  25110. test -s conftest.one && test -s conftest.two &&
  25111. test -s conftest.dir/conftest.one &&
  25112. test -s conftest.dir/conftest.two
  25113. then
  25114. ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
  25115. break 3
  25116. fi
  25117. fi
  25118. fi
  25119. done
  25120. done
  25121. ;;
  25122. esac
  25123. done
  25124. IFS=$as_save_IFS
  25125. rm -rf conftest.one conftest.two conftest.dir
  25126. fi
  25127. if test "${ac_cv_path_install+set}" = set; then
  25128. INSTALL=$ac_cv_path_install
  25129. else
  25130. # As a last resort, use the slow shell script. Don't cache a
  25131. # value for INSTALL within a source directory, because that will
  25132. # break other packages using the cache if that directory is
  25133. # removed, or if the value is a relative name.
  25134. INSTALL=$ac_install_sh
  25135. fi
  25136. fi
  25137. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
  25138. $as_echo "$INSTALL" >&6; }
  25139. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  25140. # It thinks the first close brace ends the variable substitution.
  25141. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  25142. test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
  25143. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  25144. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
  25145. $as_echo_n "checking whether build environment is sane... " >&6; }
  25146. # Reject unsafe characters in $srcdir or the absolute working directory
  25147. # name. Accept space and tab only in the latter.
  25148. am_lf='
  25149. '
  25150. case `pwd` in
  25151. *[\\\"\#\$\&\'\`$am_lf]*)
  25152. as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
  25153. esac
  25154. case $srcdir in
  25155. *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
  25156. as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
  25157. esac
  25158. # Do 'set' in a subshell so we don't clobber the current shell's
  25159. # arguments. Must try -L first in case configure is actually a
  25160. # symlink; some systems play weird games with the mod time of symlinks
  25161. # (eg FreeBSD returns the mod time of the symlink's containing
  25162. # directory).
  25163. if (
  25164. am_has_slept=no
  25165. for am_try in 1 2; do
  25166. echo "timestamp, slept: $am_has_slept" > conftest.file
  25167. set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
  25168. if test "$*" = "X"; then
  25169. # -L didn't work.
  25170. set X `ls -t "$srcdir/configure" conftest.file`
  25171. fi
  25172. if test "$*" != "X $srcdir/configure conftest.file" \
  25173. && test "$*" != "X conftest.file $srcdir/configure"; then
  25174. # If neither matched, then we have a broken ls. This can happen
  25175. # if, for instance, CONFIG_SHELL is bash and it inherits a
  25176. # broken ls alias from the environment. This has actually
  25177. # happened. Such a system could not be considered "sane".
  25178. as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
  25179. alias in your environment" "$LINENO" 5
  25180. fi
  25181. if test "$2" = conftest.file || test $am_try -eq 2; then
  25182. break
  25183. fi
  25184. # Just in case.
  25185. sleep 1
  25186. am_has_slept=yes
  25187. done
  25188. test "$2" = conftest.file
  25189. )
  25190. then
  25191. # Ok.
  25192. :
  25193. else
  25194. as_fn_error $? "newly created file is older than distributed files!
  25195. Check your system clock" "$LINENO" 5
  25196. fi
  25197. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  25198. $as_echo "yes" >&6; }
  25199. # If we didn't sleep, we still need to ensure time stamps of config.status and
  25200. # generated files are strictly newer.
  25201. am_sleep_pid=
  25202. if grep 'slept: no' conftest.file >/dev/null 2>&1; then
  25203. ( sleep 1 ) &
  25204. am_sleep_pid=$!
  25205. fi
  25206. rm -f conftest.file
  25207. test "$program_prefix" != NONE &&
  25208. program_transform_name="s&^&$program_prefix&;$program_transform_name"
  25209. # Use a double $ so make ignores it.
  25210. test "$program_suffix" != NONE &&
  25211. program_transform_name="s&\$&$program_suffix&;$program_transform_name"
  25212. # Double any \ or $.
  25213. # By default was `s,x,x', remove it if useless.
  25214. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
  25215. program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
  25216. # Expand $ac_aux_dir to an absolute path.
  25217. am_aux_dir=`cd "$ac_aux_dir" && pwd`
  25218. if test x"${MISSING+set}" != xset; then
  25219. case $am_aux_dir in
  25220. *\ * | *\ *)
  25221. MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
  25222. *)
  25223. MISSING="\${SHELL} $am_aux_dir/missing" ;;
  25224. esac
  25225. fi
  25226. # Use eval to expand $SHELL
  25227. if eval "$MISSING --is-lightweight"; then
  25228. am_missing_run="$MISSING "
  25229. else
  25230. am_missing_run=
  25231. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
  25232. $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
  25233. fi
  25234. if test x"${install_sh+set}" != xset; then
  25235. case $am_aux_dir in
  25236. *\ * | *\ *)
  25237. install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  25238. *)
  25239. install_sh="\${SHELL} $am_aux_dir/install-sh"
  25240. esac
  25241. fi
  25242. # Installed binaries are usually stripped using 'strip' when the user
  25243. # run "make install-strip". However 'strip' might not be the right
  25244. # tool to use in cross-compilation environments, therefore Automake
  25245. # will honor the 'STRIP' environment variable to overrule this program.
  25246. if test "$cross_compiling" != no; then
  25247. if test -n "$ac_tool_prefix"; then
  25248. # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
  25249. set dummy ${ac_tool_prefix}strip; ac_word=$2
  25250. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  25251. $as_echo_n "checking for $ac_word... " >&6; }
  25252. if ${ac_cv_prog_STRIP+:} false; then :
  25253. $as_echo_n "(cached) " >&6
  25254. else
  25255. if test -n "$STRIP"; then
  25256. ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
  25257. else
  25258. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  25259. for as_dir in $PATH
  25260. do
  25261. IFS=$as_save_IFS
  25262. test -z "$as_dir" && as_dir=.
  25263. for ac_exec_ext in '' $ac_executable_extensions; do
  25264. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  25265. ac_cv_prog_STRIP="${ac_tool_prefix}strip"
  25266. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  25267. break 2
  25268. fi
  25269. done
  25270. done
  25271. IFS=$as_save_IFS
  25272. fi
  25273. fi
  25274. STRIP=$ac_cv_prog_STRIP
  25275. if test -n "$STRIP"; then
  25276. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
  25277. $as_echo "$STRIP" >&6; }
  25278. else
  25279. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  25280. $as_echo "no" >&6; }
  25281. fi
  25282. fi
  25283. if test -z "$ac_cv_prog_STRIP"; then
  25284. ac_ct_STRIP=$STRIP
  25285. # Extract the first word of "strip", so it can be a program name with args.
  25286. set dummy strip; ac_word=$2
  25287. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  25288. $as_echo_n "checking for $ac_word... " >&6; }
  25289. if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
  25290. $as_echo_n "(cached) " >&6
  25291. else
  25292. if test -n "$ac_ct_STRIP"; then
  25293. ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
  25294. else
  25295. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  25296. for as_dir in $PATH
  25297. do
  25298. IFS=$as_save_IFS
  25299. test -z "$as_dir" && as_dir=.
  25300. for ac_exec_ext in '' $ac_executable_extensions; do
  25301. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  25302. ac_cv_prog_ac_ct_STRIP="strip"
  25303. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  25304. break 2
  25305. fi
  25306. done
  25307. done
  25308. IFS=$as_save_IFS
  25309. fi
  25310. fi
  25311. ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
  25312. if test -n "$ac_ct_STRIP"; then
  25313. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
  25314. $as_echo "$ac_ct_STRIP" >&6; }
  25315. else
  25316. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  25317. $as_echo "no" >&6; }
  25318. fi
  25319. if test "x$ac_ct_STRIP" = x; then
  25320. STRIP=":"
  25321. else
  25322. case $cross_compiling:$ac_tool_warned in
  25323. yes:)
  25324. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  25325. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  25326. ac_tool_warned=yes ;;
  25327. esac
  25328. STRIP=$ac_ct_STRIP
  25329. fi
  25330. else
  25331. STRIP="$ac_cv_prog_STRIP"
  25332. fi
  25333. fi
  25334. INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  25335. for ac_prog in gawk mawk nawk awk
  25336. do
  25337. # Extract the first word of "$ac_prog", so it can be a program name with args.
  25338. set dummy $ac_prog; ac_word=$2
  25339. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  25340. $as_echo_n "checking for $ac_word... " >&6; }
  25341. if ${ac_cv_prog_AWK+:} false; then :
  25342. $as_echo_n "(cached) " >&6
  25343. else
  25344. if test -n "$AWK"; then
  25345. ac_cv_prog_AWK="$AWK" # Let the user override the test.
  25346. else
  25347. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  25348. for as_dir in $PATH
  25349. do
  25350. IFS=$as_save_IFS
  25351. test -z "$as_dir" && as_dir=.
  25352. for ac_exec_ext in '' $ac_executable_extensions; do
  25353. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  25354. ac_cv_prog_AWK="$ac_prog"
  25355. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  25356. break 2
  25357. fi
  25358. done
  25359. done
  25360. IFS=$as_save_IFS
  25361. fi
  25362. fi
  25363. AWK=$ac_cv_prog_AWK
  25364. if test -n "$AWK"; then
  25365. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
  25366. $as_echo "$AWK" >&6; }
  25367. else
  25368. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  25369. $as_echo "no" >&6; }
  25370. fi
  25371. test -n "$AWK" && break
  25372. done
  25373. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
  25374. $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
  25375. set x ${MAKE-make}
  25376. ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
  25377. if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
  25378. $as_echo_n "(cached) " >&6
  25379. else
  25380. cat >conftest.make <<\_ACEOF
  25381. SHELL = /bin/sh
  25382. all:
  25383. @echo '@@@%%%=$(MAKE)=@@@%%%'
  25384. _ACEOF
  25385. # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
  25386. case `${MAKE-make} -f conftest.make 2>/dev/null` in
  25387. *@@@%%%=?*=@@@%%%*)
  25388. eval ac_cv_prog_make_${ac_make}_set=yes;;
  25389. *)
  25390. eval ac_cv_prog_make_${ac_make}_set=no;;
  25391. esac
  25392. rm -f conftest.make
  25393. fi
  25394. if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
  25395. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  25396. $as_echo "yes" >&6; }
  25397. SET_MAKE=
  25398. else
  25399. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  25400. $as_echo "no" >&6; }
  25401. SET_MAKE="MAKE=${MAKE-make}"
  25402. fi
  25403. rm -rf .tst 2>/dev/null
  25404. mkdir .tst 2>/dev/null
  25405. if test -d .tst; then
  25406. am__leading_dot=.
  25407. else
  25408. am__leading_dot=_
  25409. fi
  25410. rmdir .tst 2>/dev/null
  25411. DEPDIR="${am__leading_dot}deps"
  25412. ac_config_commands="$ac_config_commands depfiles"
  25413. am_make=${MAKE-make}
  25414. cat > confinc << 'END'
  25415. am__doit:
  25416. @echo this is the am__doit target
  25417. .PHONY: am__doit
  25418. END
  25419. # If we don't find an include directive, just comment out the code.
  25420. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
  25421. $as_echo_n "checking for style of include used by $am_make... " >&6; }
  25422. am__include="#"
  25423. am__quote=
  25424. _am_result=none
  25425. # First try GNU make style include.
  25426. echo "include confinc" > confmf
  25427. # Ignore all kinds of additional output from 'make'.
  25428. case `$am_make -s -f confmf 2> /dev/null` in #(
  25429. *the\ am__doit\ target*)
  25430. am__include=include
  25431. am__quote=
  25432. _am_result=GNU
  25433. ;;
  25434. esac
  25435. # Now try BSD make style include.
  25436. if test "$am__include" = "#"; then
  25437. echo '.include "confinc"' > confmf
  25438. case `$am_make -s -f confmf 2> /dev/null` in #(
  25439. *the\ am__doit\ target*)
  25440. am__include=.include
  25441. am__quote="\""
  25442. _am_result=BSD
  25443. ;;
  25444. esac
  25445. fi
  25446. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
  25447. $as_echo "$_am_result" >&6; }
  25448. rm -f confinc confmf
  25449. # Check whether --enable-dependency-tracking was given.
  25450. if test "${enable_dependency_tracking+set}" = set; then :
  25451. enableval=$enable_dependency_tracking;
  25452. fi
  25453. if test "x$enable_dependency_tracking" != xno; then
  25454. am_depcomp="$ac_aux_dir/depcomp"
  25455. AMDEPBACKSLASH='\'
  25456. am__nodep='_no'
  25457. fi
  25458. if test "x$enable_dependency_tracking" != xno; then
  25459. AMDEP_TRUE=
  25460. AMDEP_FALSE='#'
  25461. else
  25462. AMDEP_TRUE='#'
  25463. AMDEP_FALSE=
  25464. fi
  25465. # Check whether --enable-silent-rules was given.
  25466. if test "${enable_silent_rules+set}" = set; then :
  25467. enableval=$enable_silent_rules;
  25468. fi
  25469. case $enable_silent_rules in # (((
  25470. yes) AM_DEFAULT_VERBOSITY=0;;
  25471. no) AM_DEFAULT_VERBOSITY=1;;
  25472. *) AM_DEFAULT_VERBOSITY=1;;
  25473. esac
  25474. am_make=${MAKE-make}
  25475. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
  25476. $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
  25477. if ${am_cv_make_support_nested_variables+:} false; then :
  25478. $as_echo_n "(cached) " >&6
  25479. else
  25480. if $as_echo 'TRUE=$(BAR$(V))
  25481. BAR0=false
  25482. BAR1=true
  25483. V=1
  25484. am__doit:
  25485. @$(TRUE)
  25486. .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
  25487. am_cv_make_support_nested_variables=yes
  25488. else
  25489. am_cv_make_support_nested_variables=no
  25490. fi
  25491. fi
  25492. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
  25493. $as_echo "$am_cv_make_support_nested_variables" >&6; }
  25494. if test $am_cv_make_support_nested_variables = yes; then
  25495. AM_V='$(V)'
  25496. AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
  25497. else
  25498. AM_V=$AM_DEFAULT_VERBOSITY
  25499. AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
  25500. fi
  25501. AM_BACKSLASH='\'
  25502. if test "`cd $srcdir && pwd`" != "`pwd`"; then
  25503. # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  25504. # is not polluted with repeated "-I."
  25505. am__isrc=' -I$(srcdir)'
  25506. # test to see if srcdir already configured
  25507. if test -f $srcdir/config.status; then
  25508. as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
  25509. fi
  25510. fi
  25511. # test whether we have cygpath
  25512. if test -z "$CYGPATH_W"; then
  25513. if (cygpath --version) >/dev/null 2>/dev/null; then
  25514. CYGPATH_W='cygpath -w'
  25515. else
  25516. CYGPATH_W=echo
  25517. fi
  25518. fi
  25519. # Define the identity of the package.
  25520. PACKAGE='libgnu'
  25521. VERSION='UNUSED-VERSION'
  25522. # Some tools Automake needs.
  25523. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
  25524. AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
  25525. AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
  25526. AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
  25527. MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
  25528. # For better backward compatibility. To be removed once Automake 1.9.x
  25529. # dies out for good. For more background, see:
  25530. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
  25531. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
  25532. mkdir_p='$(MKDIR_P)'
  25533. # We need awk for the "check" target (and possibly the TAP driver). The
  25534. # system "awk" is bad on some platforms.
  25535. # Always define AMTAR for backward compatibility. Yes, it's still used
  25536. # in the wild :-( We should find a proper way to deprecate it ...
  25537. AMTAR='$${TAR-tar}'
  25538. # We'll loop over all known methods to create a tar archive until one works.
  25539. _am_tools='gnutar pax cpio none'
  25540. am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
  25541. depcc="$CC" am_compiler_list=
  25542. { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
  25543. $as_echo_n "checking dependency style of $depcc... " >&6; }
  25544. if ${am_cv_CC_dependencies_compiler_type+:} false; then :
  25545. $as_echo_n "(cached) " >&6
  25546. else
  25547. if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  25548. # We make a subdir and do the tests there. Otherwise we can end up
  25549. # making bogus files that we don't know about and never remove. For
  25550. # instance it was reported that on HP-UX the gcc test will end up
  25551. # making a dummy file named 'D' -- because '-MD' means "put the output
  25552. # in D".
  25553. rm -rf conftest.dir
  25554. mkdir conftest.dir
  25555. # Copy depcomp to subdir because otherwise we won't find it if we're
  25556. # using a relative directory.
  25557. cp "$am_depcomp" conftest.dir
  25558. cd conftest.dir
  25559. # We will build objects and dependencies in a subdirectory because
  25560. # it helps to detect inapplicable dependency modes. For instance
  25561. # both Tru64's cc and ICC support -MD to output dependencies as a
  25562. # side effect of compilation, but ICC will put the dependencies in
  25563. # the current directory while Tru64 will put them in the object
  25564. # directory.
  25565. mkdir sub
  25566. am_cv_CC_dependencies_compiler_type=none
  25567. if test "$am_compiler_list" = ""; then
  25568. am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
  25569. fi
  25570. am__universal=false
  25571. case " $depcc " in #(
  25572. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  25573. esac
  25574. for depmode in $am_compiler_list; do
  25575. # Setup a source with many dependencies, because some compilers
  25576. # like to wrap large dependency lists on column 80 (with \), and
  25577. # we should not choose a depcomp mode which is confused by this.
  25578. #
  25579. # We need to recreate these files for each test, as the compiler may
  25580. # overwrite some of them when testing with obscure command lines.
  25581. # This happens at least with the AIX C compiler.
  25582. : > sub/conftest.c
  25583. for i in 1 2 3 4 5 6; do
  25584. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  25585. # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
  25586. # Solaris 10 /bin/sh.
  25587. echo '/* dummy */' > sub/conftst$i.h
  25588. done
  25589. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  25590. # We check with '-c' and '-o' for the sake of the "dashmstdout"
  25591. # mode. It turns out that the SunPro C++ compiler does not properly
  25592. # handle '-M -o', and we need to detect this. Also, some Intel
  25593. # versions had trouble with output in subdirs.
  25594. am__obj=sub/conftest.${OBJEXT-o}
  25595. am__minus_obj="-o $am__obj"
  25596. case $depmode in
  25597. gcc)
  25598. # This depmode causes a compiler race in universal mode.
  25599. test "$am__universal" = false || continue
  25600. ;;
  25601. nosideeffect)
  25602. # After this tag, mechanisms are not by side-effect, so they'll
  25603. # only be used when explicitly requested.
  25604. if test "x$enable_dependency_tracking" = xyes; then
  25605. continue
  25606. else
  25607. break
  25608. fi
  25609. ;;
  25610. msvc7 | msvc7msys | msvisualcpp | msvcmsys)
  25611. # This compiler won't grok '-c -o', but also, the minuso test has
  25612. # not run yet. These depmodes are late enough in the game, and
  25613. # so weak that their functioning should not be impacted.
  25614. am__obj=conftest.${OBJEXT-o}
  25615. am__minus_obj=
  25616. ;;
  25617. none) break ;;
  25618. esac
  25619. if depmode=$depmode \
  25620. source=sub/conftest.c object=$am__obj \
  25621. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  25622. $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
  25623. >/dev/null 2>conftest.err &&
  25624. grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
  25625. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  25626. grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
  25627. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  25628. # icc doesn't choke on unknown options, it will just issue warnings
  25629. # or remarks (even with -Werror). So we grep stderr for any message
  25630. # that says an option was ignored or not supported.
  25631. # When given -MP, icc 7.0 and 7.1 complain thusly:
  25632. # icc: Command line warning: ignoring option '-M'; no argument required
  25633. # The diagnosis changed in icc 8.0:
  25634. # icc: Command line remark: option '-MP' not supported
  25635. if (grep 'ignoring option' conftest.err ||
  25636. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  25637. am_cv_CC_dependencies_compiler_type=$depmode
  25638. break
  25639. fi
  25640. fi
  25641. done
  25642. cd ..
  25643. rm -rf conftest.dir
  25644. else
  25645. am_cv_CC_dependencies_compiler_type=none
  25646. fi
  25647. fi
  25648. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
  25649. $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
  25650. CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
  25651. if
  25652. test "x$enable_dependency_tracking" != xno \
  25653. && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
  25654. am__fastdepCC_TRUE=
  25655. am__fastdepCC_FALSE='#'
  25656. else
  25657. am__fastdepCC_TRUE='#'
  25658. am__fastdepCC_FALSE=
  25659. fi
  25660. # POSIX will say in a future version that running "rm -f" with no argument
  25661. # is OK; and we want to be able to make that assumption in our Makefile
  25662. # recipes. So use an aggressive probe to check that the usage we want is
  25663. # actually supported "in the wild" to an acceptable degree.
  25664. # See automake bug#10828.
  25665. # To make any issue more visible, cause the running configure to be aborted
  25666. # by default if the 'rm' program in use doesn't match our expectations; the
  25667. # user can still override this though.
  25668. if rm -f && rm -fr && rm -rf; then : OK; else
  25669. cat >&2 <<'END'
  25670. Oops!
  25671. Your 'rm' program seems unable to run without file operands specified
  25672. on the command line, even when the '-f' option is present. This is contrary
  25673. to the behaviour of most rm programs out there, and not conforming with
  25674. the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
  25675. Please tell bug-automake@gnu.org about your system, including the value
  25676. of your $PATH and any error possibly output before this message. This
  25677. can help us improve future automake versions.
  25678. END
  25679. if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
  25680. echo 'Configuration will proceed anyway, since you have set the' >&2
  25681. echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
  25682. echo >&2
  25683. else
  25684. cat >&2 <<'END'
  25685. Aborting the configuration process, to ensure you take notice of the issue.
  25686. You can download and install GNU coreutils to get an 'rm' implementation
  25687. that behaves properly: <http://www.gnu.org/software/coreutils/>.
  25688. If you want to complete the configuration process using your problematic
  25689. 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
  25690. to "yes", and re-run configure.
  25691. END
  25692. as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
  25693. fi
  25694. fi
  25695. # Check whether --enable-silent-rules was given.
  25696. if test "${enable_silent_rules+set}" = set; then :
  25697. enableval=$enable_silent_rules;
  25698. fi
  25699. case $enable_silent_rules in # (((
  25700. yes) AM_DEFAULT_VERBOSITY=0;;
  25701. no) AM_DEFAULT_VERBOSITY=1;;
  25702. *) AM_DEFAULT_VERBOSITY=0;;
  25703. esac
  25704. am_make=${MAKE-make}
  25705. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
  25706. $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
  25707. if ${am_cv_make_support_nested_variables+:} false; then :
  25708. $as_echo_n "(cached) " >&6
  25709. else
  25710. if $as_echo 'TRUE=$(BAR$(V))
  25711. BAR0=false
  25712. BAR1=true
  25713. V=1
  25714. am__doit:
  25715. @$(TRUE)
  25716. .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
  25717. am_cv_make_support_nested_variables=yes
  25718. else
  25719. am_cv_make_support_nested_variables=no
  25720. fi
  25721. fi
  25722. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
  25723. $as_echo "$am_cv_make_support_nested_variables" >&6; }
  25724. if test $am_cv_make_support_nested_variables = yes; then
  25725. AM_V='$(V)'
  25726. AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
  25727. else
  25728. AM_V=$AM_DEFAULT_VERBOSITY
  25729. AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
  25730. fi
  25731. AM_BACKSLASH='\'
  25732. # --------------------- #
  25733. # Checks for programs. #
  25734. # --------------------- #
  25735. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
  25736. $as_echo_n "checking whether ln -s works... " >&6; }
  25737. LN_S=$as_ln_s
  25738. if test "$LN_S" = "ln -s"; then
  25739. { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  25740. $as_echo "yes" >&6; }
  25741. else
  25742. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
  25743. $as_echo "no, using $LN_S" >&6; }
  25744. fi
  25745. if test -n "$ac_tool_prefix"; then
  25746. # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
  25747. set dummy ${ac_tool_prefix}ranlib; ac_word=$2
  25748. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  25749. $as_echo_n "checking for $ac_word... " >&6; }
  25750. if ${ac_cv_prog_RANLIB+:} false; then :
  25751. $as_echo_n "(cached) " >&6
  25752. else
  25753. if test -n "$RANLIB"; then
  25754. ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  25755. else
  25756. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  25757. for as_dir in $PATH
  25758. do
  25759. IFS=$as_save_IFS
  25760. test -z "$as_dir" && as_dir=.
  25761. for ac_exec_ext in '' $ac_executable_extensions; do
  25762. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  25763. ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
  25764. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  25765. break 2
  25766. fi
  25767. done
  25768. done
  25769. IFS=$as_save_IFS
  25770. fi
  25771. fi
  25772. RANLIB=$ac_cv_prog_RANLIB
  25773. if test -n "$RANLIB"; then
  25774. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
  25775. $as_echo "$RANLIB" >&6; }
  25776. else
  25777. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  25778. $as_echo "no" >&6; }
  25779. fi
  25780. fi
  25781. if test -z "$ac_cv_prog_RANLIB"; then
  25782. ac_ct_RANLIB=$RANLIB
  25783. # Extract the first word of "ranlib", so it can be a program name with args.
  25784. set dummy ranlib; ac_word=$2
  25785. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  25786. $as_echo_n "checking for $ac_word... " >&6; }
  25787. if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
  25788. $as_echo_n "(cached) " >&6
  25789. else
  25790. if test -n "$ac_ct_RANLIB"; then
  25791. ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
  25792. else
  25793. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  25794. for as_dir in $PATH
  25795. do
  25796. IFS=$as_save_IFS
  25797. test -z "$as_dir" && as_dir=.
  25798. for ac_exec_ext in '' $ac_executable_extensions; do
  25799. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  25800. ac_cv_prog_ac_ct_RANLIB="ranlib"
  25801. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  25802. break 2
  25803. fi
  25804. done
  25805. done
  25806. IFS=$as_save_IFS
  25807. fi
  25808. fi
  25809. ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
  25810. if test -n "$ac_ct_RANLIB"; then
  25811. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
  25812. $as_echo "$ac_ct_RANLIB" >&6; }
  25813. else
  25814. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  25815. $as_echo "no" >&6; }
  25816. fi
  25817. if test "x$ac_ct_RANLIB" = x; then
  25818. RANLIB=":"
  25819. else
  25820. case $cross_compiling:$ac_tool_warned in
  25821. yes:)
  25822. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  25823. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  25824. ac_tool_warned=yes ;;
  25825. esac
  25826. RANLIB=$ac_ct_RANLIB
  25827. fi
  25828. else
  25829. RANLIB="$ac_cv_prog_RANLIB"
  25830. fi
  25831. if test -n "$ac_tool_prefix"; then
  25832. # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
  25833. set dummy ${ac_tool_prefix}ar; ac_word=$2
  25834. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  25835. $as_echo_n "checking for $ac_word... " >&6; }
  25836. if ${ac_cv_prog_AR+:} false; then :
  25837. $as_echo_n "(cached) " >&6
  25838. else
  25839. if test -n "$AR"; then
  25840. ac_cv_prog_AR="$AR" # Let the user override the test.
  25841. else
  25842. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  25843. for as_dir in $PATH
  25844. do
  25845. IFS=$as_save_IFS
  25846. test -z "$as_dir" && as_dir=.
  25847. for ac_exec_ext in '' $ac_executable_extensions; do
  25848. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  25849. ac_cv_prog_AR="${ac_tool_prefix}ar"
  25850. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  25851. break 2
  25852. fi
  25853. done
  25854. done
  25855. IFS=$as_save_IFS
  25856. fi
  25857. fi
  25858. AR=$ac_cv_prog_AR
  25859. if test -n "$AR"; then
  25860. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
  25861. $as_echo "$AR" >&6; }
  25862. else
  25863. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  25864. $as_echo "no" >&6; }
  25865. fi
  25866. fi
  25867. if test -z "$ac_cv_prog_AR"; then
  25868. ac_ct_AR=$AR
  25869. # Extract the first word of "ar", so it can be a program name with args.
  25870. set dummy ar; ac_word=$2
  25871. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  25872. $as_echo_n "checking for $ac_word... " >&6; }
  25873. if ${ac_cv_prog_ac_ct_AR+:} false; then :
  25874. $as_echo_n "(cached) " >&6
  25875. else
  25876. if test -n "$ac_ct_AR"; then
  25877. ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
  25878. else
  25879. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  25880. for as_dir in $PATH
  25881. do
  25882. IFS=$as_save_IFS
  25883. test -z "$as_dir" && as_dir=.
  25884. for ac_exec_ext in '' $ac_executable_extensions; do
  25885. if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  25886. ac_cv_prog_ac_ct_AR="ar"
  25887. $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  25888. break 2
  25889. fi
  25890. done
  25891. done
  25892. IFS=$as_save_IFS
  25893. fi
  25894. fi
  25895. ac_ct_AR=$ac_cv_prog_ac_ct_AR
  25896. if test -n "$ac_ct_AR"; then
  25897. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
  25898. $as_echo "$ac_ct_AR" >&6; }
  25899. else
  25900. { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  25901. $as_echo "no" >&6; }
  25902. fi
  25903. if test "x$ac_ct_AR" = x; then
  25904. AR=""
  25905. else
  25906. case $cross_compiling:$ac_tool_warned in
  25907. yes:)
  25908. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
  25909. $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  25910. ac_tool_warned=yes ;;
  25911. esac
  25912. AR=$ac_ct_AR
  25913. fi
  25914. else
  25915. AR="$ac_cv_prog_AR"
  25916. fi
  25917. # ---------------------- #
  25918. # Checks for libraries. #
  25919. # ---------------------- #
  25920. ac_config_files="$ac_config_files Makefile.gnulib.inc"
  25921. ac_config_files="$ac_config_files Makefile import/Makefile"
  25922. ac_config_commands="$ac_config_commands default"
  25923. cat >confcache <<\_ACEOF
  25924. # This file is a shell script that caches the results of configure
  25925. # tests run on this system so they can be shared between configure
  25926. # scripts and configure runs, see configure's option --config-cache.
  25927. # It is not useful on other systems. If it contains results you don't
  25928. # want to keep, you may remove or edit it.
  25929. #
  25930. # config.status only pays attention to the cache file if you give it
  25931. # the --recheck option to rerun configure.
  25932. #
  25933. # `ac_cv_env_foo' variables (set or unset) will be overridden when
  25934. # loading this file, other *unset* `ac_cv_foo' will be assigned the
  25935. # following values.
  25936. _ACEOF
  25937. # The following way of writing the cache mishandles newlines in values,
  25938. # but we know of no workaround that is simple, portable, and efficient.
  25939. # So, we kill variables containing newlines.
  25940. # Ultrix sh set writes to stderr and can't be redirected directly,
  25941. # and sets the high bit in the cache file unless we assign to the vars.
  25942. (
  25943. for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
  25944. eval ac_val=\$$ac_var
  25945. case $ac_val in #(
  25946. *${as_nl}*)
  25947. case $ac_var in #(
  25948. *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
  25949. $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
  25950. esac
  25951. case $ac_var in #(
  25952. _ | IFS | as_nl) ;; #(
  25953. BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
  25954. *) { eval $ac_var=; unset $ac_var;} ;;
  25955. esac ;;
  25956. esac
  25957. done
  25958. (set) 2>&1 |
  25959. case $as_nl`(ac_space=' '; set) 2>&1` in #(
  25960. *${as_nl}ac_space=\ *)
  25961. # `set' does not quote correctly, so add quotes: double-quote
  25962. # substitution turns \\\\ into \\, and sed turns \\ into \.
  25963. sed -n \
  25964. "s/'/'\\\\''/g;
  25965. s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
  25966. ;; #(
  25967. *)
  25968. # `set' quotes correctly as required by POSIX, so do not add quotes.
  25969. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
  25970. ;;
  25971. esac |
  25972. sort
  25973. ) |
  25974. sed '
  25975. /^ac_cv_env_/b end
  25976. t clear
  25977. :clear
  25978. s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
  25979. t end
  25980. s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
  25981. :end' >>confcache
  25982. if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
  25983. if test -w "$cache_file"; then
  25984. if test "x$cache_file" != "x/dev/null"; then
  25985. { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
  25986. $as_echo "$as_me: updating cache $cache_file" >&6;}
  25987. if test ! -f "$cache_file" || test -h "$cache_file"; then
  25988. cat confcache >"$cache_file"
  25989. else
  25990. case $cache_file in #(
  25991. */* | ?:*)
  25992. mv -f confcache "$cache_file"$$ &&
  25993. mv -f "$cache_file"$$ "$cache_file" ;; #(
  25994. *)
  25995. mv -f confcache "$cache_file" ;;
  25996. esac
  25997. fi
  25998. fi
  25999. else
  26000. { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
  26001. $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
  26002. fi
  26003. fi
  26004. rm -f confcache
  26005. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  26006. # Let make expand exec_prefix.
  26007. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  26008. DEFS=-DHAVE_CONFIG_H
  26009. ac_libobjs=
  26010. ac_ltlibobjs=
  26011. for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
  26012. # 1. Remove the extension, and $U if already installed.
  26013. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
  26014. ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
  26015. # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
  26016. # will be set to the directory where LIBOBJS objects are built.
  26017. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
  26018. as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
  26019. done
  26020. LIBOBJS=$ac_libobjs
  26021. LTLIBOBJS=$ac_ltlibobjs
  26022. if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
  26023. as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
  26024. Usually this means the macro was only invoked conditionally." "$LINENO" 5
  26025. fi
  26026. if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
  26027. as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
  26028. Usually this means the macro was only invoked conditionally." "$LINENO" 5
  26029. fi
  26030. if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
  26031. as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
  26032. Usually this means the macro was only invoked conditionally." "$LINENO" 5
  26033. fi
  26034. if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
  26035. as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
  26036. Usually this means the macro was only invoked conditionally." "$LINENO" 5
  26037. fi
  26038. if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
  26039. as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
  26040. Usually this means the macro was only invoked conditionally." "$LINENO" 5
  26041. fi
  26042. if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
  26043. as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
  26044. Usually this means the macro was only invoked conditionally." "$LINENO" 5
  26045. fi
  26046. if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
  26047. as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
  26048. Usually this means the macro was only invoked conditionally." "$LINENO" 5
  26049. fi
  26050. if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
  26051. as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
  26052. Usually this means the macro was only invoked conditionally." "$LINENO" 5
  26053. fi
  26054. if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
  26055. as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
  26056. Usually this means the macro was only invoked conditionally." "$LINENO" 5
  26057. fi
  26058. if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
  26059. as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
  26060. Usually this means the macro was only invoked conditionally." "$LINENO" 5
  26061. fi
  26062. if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
  26063. as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
  26064. Usually this means the macro was only invoked conditionally." "$LINENO" 5
  26065. fi
  26066. if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
  26067. as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
  26068. Usually this means the macro was only invoked conditionally." "$LINENO" 5
  26069. fi
  26070. if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
  26071. as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
  26072. Usually this means the macro was only invoked conditionally." "$LINENO" 5
  26073. fi
  26074. if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
  26075. as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
  26076. Usually this means the macro was only invoked conditionally." "$LINENO" 5
  26077. fi
  26078. if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
  26079. as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
  26080. Usually this means the macro was only invoked conditionally." "$LINENO" 5
  26081. fi
  26082. if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
  26083. as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
  26084. Usually this means the macro was only invoked conditionally." "$LINENO" 5
  26085. fi
  26086. if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
  26087. as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
  26088. Usually this means the macro was only invoked conditionally." "$LINENO" 5
  26089. fi
  26090. gl_libobjs=
  26091. gl_ltlibobjs=
  26092. if test -n "$gl_LIBOBJS"; then
  26093. # Remove the extension.
  26094. sed_drop_objext='s/\.o$//;s/\.obj$//'
  26095. for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
  26096. gl_libobjs="$gl_libobjs $i.$ac_objext"
  26097. gl_ltlibobjs="$gl_ltlibobjs $i.lo"
  26098. done
  26099. fi
  26100. gl_LIBOBJS=$gl_libobjs
  26101. gl_LTLIBOBJS=$gl_ltlibobjs
  26102. gltests_libobjs=
  26103. gltests_ltlibobjs=
  26104. if test -n "$gltests_LIBOBJS"; then
  26105. # Remove the extension.
  26106. sed_drop_objext='s/\.o$//;s/\.obj$//'
  26107. for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
  26108. gltests_libobjs="$gltests_libobjs $i.$ac_objext"
  26109. gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
  26110. done
  26111. fi
  26112. gltests_LIBOBJS=$gltests_libobjs
  26113. gltests_LTLIBOBJS=$gltests_ltlibobjs
  26114. { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
  26115. $as_echo_n "checking that generated files are newer than configure... " >&6; }
  26116. if test -n "$am_sleep_pid"; then
  26117. # Hide warnings about reused PIDs.
  26118. wait $am_sleep_pid 2>/dev/null
  26119. fi
  26120. { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
  26121. $as_echo "done" >&6; }
  26122. if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
  26123. as_fn_error $? "conditional \"AMDEP\" was never defined.
  26124. Usually this means the macro was only invoked conditionally." "$LINENO" 5
  26125. fi
  26126. if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
  26127. as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
  26128. Usually this means the macro was only invoked conditionally." "$LINENO" 5
  26129. fi
  26130. if test -n "$EXEEXT"; then
  26131. am__EXEEXT_TRUE=
  26132. am__EXEEXT_FALSE='#'
  26133. else
  26134. am__EXEEXT_TRUE='#'
  26135. am__EXEEXT_FALSE=
  26136. fi
  26137. : "${CONFIG_STATUS=./config.status}"
  26138. ac_write_fail=0
  26139. ac_clean_files_save=$ac_clean_files
  26140. ac_clean_files="$ac_clean_files $CONFIG_STATUS"
  26141. { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
  26142. $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
  26143. as_write_fail=0
  26144. cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
  26145. #! $SHELL
  26146. # Generated by $as_me.
  26147. # Run this file to recreate the current configuration.
  26148. # Compiler output produced by configure, useful for debugging
  26149. # configure, is in config.log if it exists.
  26150. debug=false
  26151. ac_cs_recheck=false
  26152. ac_cs_silent=false
  26153. SHELL=\${CONFIG_SHELL-$SHELL}
  26154. export SHELL
  26155. _ASEOF
  26156. cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
  26157. ## -------------------- ##
  26158. ## M4sh Initialization. ##
  26159. ## -------------------- ##
  26160. # Be more Bourne compatible
  26161. DUALCASE=1; export DUALCASE # for MKS sh
  26162. if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  26163. emulate sh
  26164. NULLCMD=:
  26165. # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  26166. # is contrary to our usage. Disable this feature.
  26167. alias -g '${1+"$@"}'='"$@"'
  26168. setopt NO_GLOB_SUBST
  26169. else
  26170. case `(set -o) 2>/dev/null` in #(
  26171. *posix*) :
  26172. set -o posix ;; #(
  26173. *) :
  26174. ;;
  26175. esac
  26176. fi
  26177. as_nl='
  26178. '
  26179. export as_nl
  26180. # Printing a long string crashes Solaris 7 /usr/bin/printf.
  26181. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  26182. as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  26183. as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  26184. # Prefer a ksh shell builtin over an external printf program on Solaris,
  26185. # but without wasting forks for bash or zsh.
  26186. if test -z "$BASH_VERSION$ZSH_VERSION" \
  26187. && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  26188. as_echo='print -r --'
  26189. as_echo_n='print -rn --'
  26190. elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  26191. as_echo='printf %s\n'
  26192. as_echo_n='printf %s'
  26193. else
  26194. if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  26195. as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  26196. as_echo_n='/usr/ucb/echo -n'
  26197. else
  26198. as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  26199. as_echo_n_body='eval
  26200. arg=$1;
  26201. case $arg in #(
  26202. *"$as_nl"*)
  26203. expr "X$arg" : "X\\(.*\\)$as_nl";
  26204. arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  26205. esac;
  26206. expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  26207. '
  26208. export as_echo_n_body
  26209. as_echo_n='sh -c $as_echo_n_body as_echo'
  26210. fi
  26211. export as_echo_body
  26212. as_echo='sh -c $as_echo_body as_echo'
  26213. fi
  26214. # The user is always right.
  26215. if test "${PATH_SEPARATOR+set}" != set; then
  26216. PATH_SEPARATOR=:
  26217. (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  26218. (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  26219. PATH_SEPARATOR=';'
  26220. }
  26221. fi
  26222. # IFS
  26223. # We need space, tab and new line, in precisely that order. Quoting is
  26224. # there to prevent editors from complaining about space-tab.
  26225. # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  26226. # splitting by setting IFS to empty value.)
  26227. IFS=" "" $as_nl"
  26228. # Find who we are. Look in the path if we contain no directory separator.
  26229. as_myself=
  26230. case $0 in #((
  26231. *[\\/]* ) as_myself=$0 ;;
  26232. *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  26233. for as_dir in $PATH
  26234. do
  26235. IFS=$as_save_IFS
  26236. test -z "$as_dir" && as_dir=.
  26237. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
  26238. done
  26239. IFS=$as_save_IFS
  26240. ;;
  26241. esac
  26242. # We did not find ourselves, most probably we were run as `sh COMMAND'
  26243. # in which case we are not to be found in the path.
  26244. if test "x$as_myself" = x; then
  26245. as_myself=$0
  26246. fi
  26247. if test ! -f "$as_myself"; then
  26248. $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  26249. exit 1
  26250. fi
  26251. # Unset variables that we do not need and which cause bugs (e.g. in
  26252. # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
  26253. # suppresses any "Segmentation fault" message there. '((' could
  26254. # trigger a bug in pdksh 5.2.14.
  26255. for as_var in BASH_ENV ENV MAIL MAILPATH
  26256. do eval test x\${$as_var+set} = xset \
  26257. && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
  26258. done
  26259. PS1='$ '
  26260. PS2='> '
  26261. PS4='+ '
  26262. # NLS nuisances.
  26263. LC_ALL=C
  26264. export LC_ALL
  26265. LANGUAGE=C
  26266. export LANGUAGE
  26267. # CDPATH.
  26268. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  26269. # as_fn_error STATUS ERROR [LINENO LOG_FD]
  26270. # ----------------------------------------
  26271. # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
  26272. # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
  26273. # script with STATUS, using 1 if that was 0.
  26274. as_fn_error ()
  26275. {
  26276. as_status=$1; test $as_status -eq 0 && as_status=1
  26277. if test "$4"; then
  26278. as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  26279. $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
  26280. fi
  26281. $as_echo "$as_me: error: $2" >&2
  26282. as_fn_exit $as_status
  26283. } # as_fn_error
  26284. # as_fn_set_status STATUS
  26285. # -----------------------
  26286. # Set $? to STATUS, without forking.
  26287. as_fn_set_status ()
  26288. {
  26289. return $1
  26290. } # as_fn_set_status
  26291. # as_fn_exit STATUS
  26292. # -----------------
  26293. # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
  26294. as_fn_exit ()
  26295. {
  26296. set +e
  26297. as_fn_set_status $1
  26298. exit $1
  26299. } # as_fn_exit
  26300. # as_fn_unset VAR
  26301. # ---------------
  26302. # Portably unset VAR.
  26303. as_fn_unset ()
  26304. {
  26305. { eval $1=; unset $1;}
  26306. }
  26307. as_unset=as_fn_unset
  26308. # as_fn_append VAR VALUE
  26309. # ----------------------
  26310. # Append the text in VALUE to the end of the definition contained in VAR. Take
  26311. # advantage of any shell optimizations that allow amortized linear growth over
  26312. # repeated appends, instead of the typical quadratic growth present in naive
  26313. # implementations.
  26314. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
  26315. eval 'as_fn_append ()
  26316. {
  26317. eval $1+=\$2
  26318. }'
  26319. else
  26320. as_fn_append ()
  26321. {
  26322. eval $1=\$$1\$2
  26323. }
  26324. fi # as_fn_append
  26325. # as_fn_arith ARG...
  26326. # ------------------
  26327. # Perform arithmetic evaluation on the ARGs, and store the result in the
  26328. # global $as_val. Take advantage of shells that can avoid forks. The arguments
  26329. # must be portable across $(()) and expr.
  26330. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
  26331. eval 'as_fn_arith ()
  26332. {
  26333. as_val=$(( $* ))
  26334. }'
  26335. else
  26336. as_fn_arith ()
  26337. {
  26338. as_val=`expr "$@" || test $? -eq 1`
  26339. }
  26340. fi # as_fn_arith
  26341. if expr a : '\(a\)' >/dev/null 2>&1 &&
  26342. test "X`expr 00001 : '.*\(...\)'`" = X001; then
  26343. as_expr=expr
  26344. else
  26345. as_expr=false
  26346. fi
  26347. if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
  26348. as_basename=basename
  26349. else
  26350. as_basename=false
  26351. fi
  26352. if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
  26353. as_dirname=dirname
  26354. else
  26355. as_dirname=false
  26356. fi
  26357. as_me=`$as_basename -- "$0" ||
  26358. $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
  26359. X"$0" : 'X\(//\)$' \| \
  26360. X"$0" : 'X\(/\)' \| . 2>/dev/null ||
  26361. $as_echo X/"$0" |
  26362. sed '/^.*\/\([^/][^/]*\)\/*$/{
  26363. s//\1/
  26364. q
  26365. }
  26366. /^X\/\(\/\/\)$/{
  26367. s//\1/
  26368. q
  26369. }
  26370. /^X\/\(\/\).*/{
  26371. s//\1/
  26372. q
  26373. }
  26374. s/.*/./; q'`
  26375. # Avoid depending upon Character Ranges.
  26376. as_cr_letters='abcdefghijklmnopqrstuvwxyz'
  26377. as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  26378. as_cr_Letters=$as_cr_letters$as_cr_LETTERS
  26379. as_cr_digits='0123456789'
  26380. as_cr_alnum=$as_cr_Letters$as_cr_digits
  26381. ECHO_C= ECHO_N= ECHO_T=
  26382. case `echo -n x` in #(((((
  26383. -n*)
  26384. case `echo 'xy\c'` in
  26385. *c*) ECHO_T=' ';; # ECHO_T is single tab character.
  26386. xy) ECHO_C='\c';;
  26387. *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
  26388. ECHO_T=' ';;
  26389. esac;;
  26390. *)
  26391. ECHO_N='-n';;
  26392. esac
  26393. rm -f conf$$ conf$$.exe conf$$.file
  26394. if test -d conf$$.dir; then
  26395. rm -f conf$$.dir/conf$$.file
  26396. else
  26397. rm -f conf$$.dir
  26398. mkdir conf$$.dir 2>/dev/null
  26399. fi
  26400. if (echo >conf$$.file) 2>/dev/null; then
  26401. if ln -s conf$$.file conf$$ 2>/dev/null; then
  26402. as_ln_s='ln -s'
  26403. # ... but there are two gotchas:
  26404. # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
  26405. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
  26406. # In both cases, we have to default to `cp -pR'.
  26407. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
  26408. as_ln_s='cp -pR'
  26409. elif ln conf$$.file conf$$ 2>/dev/null; then
  26410. as_ln_s=ln
  26411. else
  26412. as_ln_s='cp -pR'
  26413. fi
  26414. else
  26415. as_ln_s='cp -pR'
  26416. fi
  26417. rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
  26418. rmdir conf$$.dir 2>/dev/null
  26419. # as_fn_mkdir_p
  26420. # -------------
  26421. # Create "$as_dir" as a directory, including parents if necessary.
  26422. as_fn_mkdir_p ()
  26423. {
  26424. case $as_dir in #(
  26425. -*) as_dir=./$as_dir;;
  26426. esac
  26427. test -d "$as_dir" || eval $as_mkdir_p || {
  26428. as_dirs=
  26429. while :; do
  26430. case $as_dir in #(
  26431. *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
  26432. *) as_qdir=$as_dir;;
  26433. esac
  26434. as_dirs="'$as_qdir' $as_dirs"
  26435. as_dir=`$as_dirname -- "$as_dir" ||
  26436. $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  26437. X"$as_dir" : 'X\(//\)[^/]' \| \
  26438. X"$as_dir" : 'X\(//\)$' \| \
  26439. X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
  26440. $as_echo X"$as_dir" |
  26441. sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
  26442. s//\1/
  26443. q
  26444. }
  26445. /^X\(\/\/\)[^/].*/{
  26446. s//\1/
  26447. q
  26448. }
  26449. /^X\(\/\/\)$/{
  26450. s//\1/
  26451. q
  26452. }
  26453. /^X\(\/\).*/{
  26454. s//\1/
  26455. q
  26456. }
  26457. s/.*/./; q'`
  26458. test -d "$as_dir" && break
  26459. done
  26460. test -z "$as_dirs" || eval "mkdir $as_dirs"
  26461. } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
  26462. } # as_fn_mkdir_p
  26463. if mkdir -p . 2>/dev/null; then
  26464. as_mkdir_p='mkdir -p "$as_dir"'
  26465. else
  26466. test -d ./-p && rmdir ./-p
  26467. as_mkdir_p=false
  26468. fi
  26469. # as_fn_executable_p FILE
  26470. # -----------------------
  26471. # Test if FILE is an executable regular file.
  26472. as_fn_executable_p ()
  26473. {
  26474. test -f "$1" && test -x "$1"
  26475. } # as_fn_executable_p
  26476. as_test_x='test -x'
  26477. as_executable_p=as_fn_executable_p
  26478. # Sed expression to map a string onto a valid CPP name.
  26479. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
  26480. # Sed expression to map a string onto a valid variable name.
  26481. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
  26482. exec 6>&1
  26483. ## ----------------------------------- ##
  26484. ## Main body of $CONFIG_STATUS script. ##
  26485. ## ----------------------------------- ##
  26486. _ASEOF
  26487. test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
  26488. cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  26489. # Save the log message, to keep $0 and so on meaningful, and to
  26490. # report actual input values of CONFIG_FILES etc. instead of their
  26491. # values after options handling.
  26492. ac_log="
  26493. This file was extended by libgnu $as_me UNUSED-VERSION, which was
  26494. generated by GNU Autoconf 2.69. Invocation command line was
  26495. CONFIG_FILES = $CONFIG_FILES
  26496. CONFIG_HEADERS = $CONFIG_HEADERS
  26497. CONFIG_LINKS = $CONFIG_LINKS
  26498. CONFIG_COMMANDS = $CONFIG_COMMANDS
  26499. $ $0 $@
  26500. on `(hostname || uname -n) 2>/dev/null | sed 1q`
  26501. "
  26502. _ACEOF
  26503. case $ac_config_files in *"
  26504. "*) set x $ac_config_files; shift; ac_config_files=$*;;
  26505. esac
  26506. case $ac_config_headers in *"
  26507. "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
  26508. esac
  26509. cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  26510. # Files that config.status was made for.
  26511. config_files="$ac_config_files"
  26512. config_headers="$ac_config_headers"
  26513. config_commands="$ac_config_commands"
  26514. _ACEOF
  26515. cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  26516. ac_cs_usage="\
  26517. \`$as_me' instantiates files and other configuration actions
  26518. from templates according to the current configuration. Unless the files
  26519. and actions are specified as TAGs, all are instantiated by default.
  26520. Usage: $0 [OPTION]... [TAG]...
  26521. -h, --help print this help, then exit
  26522. -V, --version print version number and configuration settings, then exit
  26523. --config print configuration, then exit
  26524. -q, --quiet, --silent
  26525. do not print progress messages
  26526. -d, --debug don't remove temporary files
  26527. --recheck update $as_me by reconfiguring in the same conditions
  26528. --file=FILE[:TEMPLATE]
  26529. instantiate the configuration file FILE
  26530. --header=FILE[:TEMPLATE]
  26531. instantiate the configuration header FILE
  26532. Configuration files:
  26533. $config_files
  26534. Configuration headers:
  26535. $config_headers
  26536. Configuration commands:
  26537. $config_commands
  26538. Report bugs to the package provider."
  26539. _ACEOF
  26540. cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  26541. ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
  26542. ac_cs_version="\\
  26543. libgnu config.status UNUSED-VERSION
  26544. configured by $0, generated by GNU Autoconf 2.69,
  26545. with options \\"\$ac_cs_config\\"
  26546. Copyright (C) 2012 Free Software Foundation, Inc.
  26547. This config.status script is free software; the Free Software Foundation
  26548. gives unlimited permission to copy, distribute and modify it."
  26549. ac_pwd='$ac_pwd'
  26550. srcdir='$srcdir'
  26551. INSTALL='$INSTALL'
  26552. MKDIR_P='$MKDIR_P'
  26553. AWK='$AWK'
  26554. test -n "\$AWK" || AWK=awk
  26555. _ACEOF
  26556. cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  26557. # The default lists apply if the user does not specify any file.
  26558. ac_need_defaults=:
  26559. while test $# != 0
  26560. do
  26561. case $1 in
  26562. --*=?*)
  26563. ac_option=`expr "X$1" : 'X\([^=]*\)='`
  26564. ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
  26565. ac_shift=:
  26566. ;;
  26567. --*=)
  26568. ac_option=`expr "X$1" : 'X\([^=]*\)='`
  26569. ac_optarg=
  26570. ac_shift=:
  26571. ;;
  26572. *)
  26573. ac_option=$1
  26574. ac_optarg=$2
  26575. ac_shift=shift
  26576. ;;
  26577. esac
  26578. case $ac_option in
  26579. # Handling of the options.
  26580. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  26581. ac_cs_recheck=: ;;
  26582. --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
  26583. $as_echo "$ac_cs_version"; exit ;;
  26584. --config | --confi | --conf | --con | --co | --c )
  26585. $as_echo "$ac_cs_config"; exit ;;
  26586. --debug | --debu | --deb | --de | --d | -d )
  26587. debug=: ;;
  26588. --file | --fil | --fi | --f )
  26589. $ac_shift
  26590. case $ac_optarg in
  26591. *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
  26592. '') as_fn_error $? "missing file argument" ;;
  26593. esac
  26594. as_fn_append CONFIG_FILES " '$ac_optarg'"
  26595. ac_need_defaults=false;;
  26596. --header | --heade | --head | --hea )
  26597. $ac_shift
  26598. case $ac_optarg in
  26599. *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
  26600. esac
  26601. as_fn_append CONFIG_HEADERS " '$ac_optarg'"
  26602. ac_need_defaults=false;;
  26603. --he | --h)
  26604. # Conflict between --help and --header
  26605. as_fn_error $? "ambiguous option: \`$1'
  26606. Try \`$0 --help' for more information.";;
  26607. --help | --hel | -h )
  26608. $as_echo "$ac_cs_usage"; exit ;;
  26609. -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  26610. | -silent | --silent | --silen | --sile | --sil | --si | --s)
  26611. ac_cs_silent=: ;;
  26612. # This is an error.
  26613. -*) as_fn_error $? "unrecognized option: \`$1'
  26614. Try \`$0 --help' for more information." ;;
  26615. *) as_fn_append ac_config_targets " $1"
  26616. ac_need_defaults=false ;;
  26617. esac
  26618. shift
  26619. done
  26620. ac_configure_extra_args=
  26621. if $ac_cs_silent; then
  26622. exec 6>/dev/null
  26623. ac_configure_extra_args="$ac_configure_extra_args --silent"
  26624. fi
  26625. _ACEOF
  26626. cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  26627. if \$ac_cs_recheck; then
  26628. set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
  26629. shift
  26630. \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
  26631. CONFIG_SHELL='$SHELL'
  26632. export CONFIG_SHELL
  26633. exec "\$@"
  26634. fi
  26635. _ACEOF
  26636. cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  26637. exec 5>>config.log
  26638. {
  26639. echo
  26640. sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
  26641. ## Running $as_me. ##
  26642. _ASBOX
  26643. $as_echo "$ac_log"
  26644. } >&5
  26645. _ACEOF
  26646. cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  26647. #
  26648. # INIT-COMMANDS
  26649. #
  26650. AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
  26651. _ACEOF
  26652. cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  26653. # Handling of arguments.
  26654. for ac_config_target in $ac_config_targets
  26655. do
  26656. case $ac_config_target in
  26657. "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
  26658. "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
  26659. "Makefile.gnulib.inc") CONFIG_FILES="$CONFIG_FILES Makefile.gnulib.inc" ;;
  26660. "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
  26661. "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
  26662. "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
  26663. *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
  26664. esac
  26665. done
  26666. # If the user did not use the arguments to specify the items to instantiate,
  26667. # then the envvar interface is used. Set only those that are not.
  26668. # We use the long form for the default assignment because of an extremely
  26669. # bizarre bug on SunOS 4.1.3.
  26670. if $ac_need_defaults; then
  26671. test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
  26672. test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
  26673. test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
  26674. fi
  26675. # Have a temporary directory for convenience. Make it in the build tree
  26676. # simply because there is no reason against having it here, and in addition,
  26677. # creating and moving files from /tmp can sometimes cause problems.
  26678. # Hook for its removal unless debugging.
  26679. # Note that there is a small window in which the directory will not be cleaned:
  26680. # after its creation but before its name has been assigned to `$tmp'.
  26681. $debug ||
  26682. {
  26683. tmp= ac_tmp=
  26684. trap 'exit_status=$?
  26685. : "${ac_tmp:=$tmp}"
  26686. { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
  26687. ' 0
  26688. trap 'as_fn_exit 1' 1 2 13 15
  26689. }
  26690. # Create a (secure) tmp directory for tmp files.
  26691. {
  26692. tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
  26693. test -d "$tmp"
  26694. } ||
  26695. {
  26696. tmp=./conf$$-$RANDOM
  26697. (umask 077 && mkdir "$tmp")
  26698. } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
  26699. ac_tmp=$tmp
  26700. # Set up the scripts for CONFIG_FILES section.
  26701. # No need to generate them if there are no CONFIG_FILES.
  26702. # This happens for instance with `./config.status config.h'.
  26703. if test -n "$CONFIG_FILES"; then
  26704. ac_cr=`echo X | tr X '\015'`
  26705. # On cygwin, bash can eat \r inside `` if the user requested igncr.
  26706. # But we know of no other shell where ac_cr would be empty at this
  26707. # point, so we can use a bashism as a fallback.
  26708. if test "x$ac_cr" = x; then
  26709. eval ac_cr=\$\'\\r\'
  26710. fi
  26711. ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
  26712. if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
  26713. ac_cs_awk_cr='\\r'
  26714. else
  26715. ac_cs_awk_cr=$ac_cr
  26716. fi
  26717. echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
  26718. _ACEOF
  26719. {
  26720. echo "cat >conf$$subs.awk <<_ACEOF" &&
  26721. echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
  26722. echo "_ACEOF"
  26723. } >conf$$subs.sh ||
  26724. as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
  26725. ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
  26726. ac_delim='%!_!# '
  26727. for ac_last_try in false false false false false :; do
  26728. . ./conf$$subs.sh ||
  26729. as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
  26730. ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
  26731. if test $ac_delim_n = $ac_delim_num; then
  26732. break
  26733. elif $ac_last_try; then
  26734. as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
  26735. else
  26736. ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  26737. fi
  26738. done
  26739. rm -f conf$$subs.sh
  26740. cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  26741. cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
  26742. _ACEOF
  26743. sed -n '
  26744. h
  26745. s/^/S["/; s/!.*/"]=/
  26746. p
  26747. g
  26748. s/^[^!]*!//
  26749. :repl
  26750. t repl
  26751. s/'"$ac_delim"'$//
  26752. t delim
  26753. :nl
  26754. h
  26755. s/\(.\{148\}\)..*/\1/
  26756. t more1
  26757. s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
  26758. p
  26759. n
  26760. b repl
  26761. :more1
  26762. s/["\\]/\\&/g; s/^/"/; s/$/"\\/
  26763. p
  26764. g
  26765. s/.\{148\}//
  26766. t nl
  26767. :delim
  26768. h
  26769. s/\(.\{148\}\)..*/\1/
  26770. t more2
  26771. s/["\\]/\\&/g; s/^/"/; s/$/"/
  26772. p
  26773. b
  26774. :more2
  26775. s/["\\]/\\&/g; s/^/"/; s/$/"\\/
  26776. p
  26777. g
  26778. s/.\{148\}//
  26779. t delim
  26780. ' <conf$$subs.awk | sed '
  26781. /^[^""]/{
  26782. N
  26783. s/\n//
  26784. }
  26785. ' >>$CONFIG_STATUS || ac_write_fail=1
  26786. rm -f conf$$subs.awk
  26787. cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  26788. _ACAWK
  26789. cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
  26790. for (key in S) S_is_set[key] = 1
  26791. FS = ""
  26792. }
  26793. {
  26794. line = $ 0
  26795. nfields = split(line, field, "@")
  26796. substed = 0
  26797. len = length(field[1])
  26798. for (i = 2; i < nfields; i++) {
  26799. key = field[i]
  26800. keylen = length(key)
  26801. if (S_is_set[key]) {
  26802. value = S[key]
  26803. line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
  26804. len += length(value) + length(field[++i])
  26805. substed = 1
  26806. } else
  26807. len += 1 + keylen
  26808. }
  26809. print line
  26810. }
  26811. _ACAWK
  26812. _ACEOF
  26813. cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  26814. if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
  26815. sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
  26816. else
  26817. cat
  26818. fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
  26819. || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
  26820. _ACEOF
  26821. # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
  26822. # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
  26823. # trailing colons and then remove the whole line if VPATH becomes empty
  26824. # (actually we leave an empty line to preserve line numbers).
  26825. if test "x$srcdir" = x.; then
  26826. ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
  26827. h
  26828. s///
  26829. s/^/:/
  26830. s/[ ]*$/:/
  26831. s/:\$(srcdir):/:/g
  26832. s/:\${srcdir}:/:/g
  26833. s/:@srcdir@:/:/g
  26834. s/^:*//
  26835. s/:*$//
  26836. x
  26837. s/\(=[ ]*\).*/\1/
  26838. G
  26839. s/\n//
  26840. s/^[^=]*=[ ]*$//
  26841. }'
  26842. fi
  26843. cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  26844. fi # test -n "$CONFIG_FILES"
  26845. # Set up the scripts for CONFIG_HEADERS section.
  26846. # No need to generate them if there are no CONFIG_HEADERS.
  26847. # This happens for instance with `./config.status Makefile'.
  26848. if test -n "$CONFIG_HEADERS"; then
  26849. cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
  26850. BEGIN {
  26851. _ACEOF
  26852. # Transform confdefs.h into an awk script `defines.awk', embedded as
  26853. # here-document in config.status, that substitutes the proper values into
  26854. # config.h.in to produce config.h.
  26855. # Create a delimiter string that does not exist in confdefs.h, to ease
  26856. # handling of long lines.
  26857. ac_delim='%!_!# '
  26858. for ac_last_try in false false :; do
  26859. ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
  26860. if test -z "$ac_tt"; then
  26861. break
  26862. elif $ac_last_try; then
  26863. as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
  26864. else
  26865. ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  26866. fi
  26867. done
  26868. # For the awk script, D is an array of macro values keyed by name,
  26869. # likewise P contains macro parameters if any. Preserve backslash
  26870. # newline sequences.
  26871. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
  26872. sed -n '
  26873. s/.\{148\}/&'"$ac_delim"'/g
  26874. t rset
  26875. :rset
  26876. s/^[ ]*#[ ]*define[ ][ ]*/ /
  26877. t def
  26878. d
  26879. :def
  26880. s/\\$//
  26881. t bsnl
  26882. s/["\\]/\\&/g
  26883. s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
  26884. D["\1"]=" \3"/p
  26885. s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
  26886. d
  26887. :bsnl
  26888. s/["\\]/\\&/g
  26889. s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
  26890. D["\1"]=" \3\\\\\\n"\\/p
  26891. t cont
  26892. s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
  26893. t cont
  26894. d
  26895. :cont
  26896. n
  26897. s/.\{148\}/&'"$ac_delim"'/g
  26898. t clear
  26899. :clear
  26900. s/\\$//
  26901. t bsnlc
  26902. s/["\\]/\\&/g; s/^/"/; s/$/"/p
  26903. d
  26904. :bsnlc
  26905. s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
  26906. b cont
  26907. ' <confdefs.h | sed '
  26908. s/'"$ac_delim"'/"\\\
  26909. "/g' >>$CONFIG_STATUS || ac_write_fail=1
  26910. cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  26911. for (key in D) D_is_set[key] = 1
  26912. FS = ""
  26913. }
  26914. /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
  26915. line = \$ 0
  26916. split(line, arg, " ")
  26917. if (arg[1] == "#") {
  26918. defundef = arg[2]
  26919. mac1 = arg[3]
  26920. } else {
  26921. defundef = substr(arg[1], 2)
  26922. mac1 = arg[2]
  26923. }
  26924. split(mac1, mac2, "(") #)
  26925. macro = mac2[1]
  26926. prefix = substr(line, 1, index(line, defundef) - 1)
  26927. if (D_is_set[macro]) {
  26928. # Preserve the white space surrounding the "#".
  26929. print prefix "define", macro P[macro] D[macro]
  26930. next
  26931. } else {
  26932. # Replace #undef with comments. This is necessary, for example,
  26933. # in the case of _POSIX_SOURCE, which is predefined and required
  26934. # on some systems where configure will not decide to define it.
  26935. if (defundef == "undef") {
  26936. print "/*", prefix defundef, macro, "*/"
  26937. next
  26938. }
  26939. }
  26940. }
  26941. { print }
  26942. _ACAWK
  26943. _ACEOF
  26944. cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  26945. as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
  26946. fi # test -n "$CONFIG_HEADERS"
  26947. eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
  26948. shift
  26949. for ac_tag
  26950. do
  26951. case $ac_tag in
  26952. :[FHLC]) ac_mode=$ac_tag; continue;;
  26953. esac
  26954. case $ac_mode$ac_tag in
  26955. :[FHL]*:*);;
  26956. :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
  26957. :[FH]-) ac_tag=-:-;;
  26958. :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
  26959. esac
  26960. ac_save_IFS=$IFS
  26961. IFS=:
  26962. set x $ac_tag
  26963. IFS=$ac_save_IFS
  26964. shift
  26965. ac_file=$1
  26966. shift
  26967. case $ac_mode in
  26968. :L) ac_source=$1;;
  26969. :[FH])
  26970. ac_file_inputs=
  26971. for ac_f
  26972. do
  26973. case $ac_f in
  26974. -) ac_f="$ac_tmp/stdin";;
  26975. *) # Look for the file first in the build tree, then in the source tree
  26976. # (if the path is not absolute). The absolute path cannot be DOS-style,
  26977. # because $ac_f cannot contain `:'.
  26978. test -f "$ac_f" ||
  26979. case $ac_f in
  26980. [\\/$]*) false;;
  26981. *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
  26982. esac ||
  26983. as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
  26984. esac
  26985. case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
  26986. as_fn_append ac_file_inputs " '$ac_f'"
  26987. done
  26988. # Let's still pretend it is `configure' which instantiates (i.e., don't
  26989. # use $as_me), people would be surprised to read:
  26990. # /* config.h. Generated by config.status. */
  26991. configure_input='Generated from '`
  26992. $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
  26993. `' by configure.'
  26994. if test x"$ac_file" != x-; then
  26995. configure_input="$ac_file. $configure_input"
  26996. { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
  26997. $as_echo "$as_me: creating $ac_file" >&6;}
  26998. fi
  26999. # Neutralize special characters interpreted by sed in replacement strings.
  27000. case $configure_input in #(
  27001. *\&* | *\|* | *\\* )
  27002. ac_sed_conf_input=`$as_echo "$configure_input" |
  27003. sed 's/[\\\\&|]/\\\\&/g'`;; #(
  27004. *) ac_sed_conf_input=$configure_input;;
  27005. esac
  27006. case $ac_tag in
  27007. *:-:* | *:-) cat >"$ac_tmp/stdin" \
  27008. || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
  27009. esac
  27010. ;;
  27011. esac
  27012. ac_dir=`$as_dirname -- "$ac_file" ||
  27013. $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  27014. X"$ac_file" : 'X\(//\)[^/]' \| \
  27015. X"$ac_file" : 'X\(//\)$' \| \
  27016. X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
  27017. $as_echo X"$ac_file" |
  27018. sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
  27019. s//\1/
  27020. q
  27021. }
  27022. /^X\(\/\/\)[^/].*/{
  27023. s//\1/
  27024. q
  27025. }
  27026. /^X\(\/\/\)$/{
  27027. s//\1/
  27028. q
  27029. }
  27030. /^X\(\/\).*/{
  27031. s//\1/
  27032. q
  27033. }
  27034. s/.*/./; q'`
  27035. as_dir="$ac_dir"; as_fn_mkdir_p
  27036. ac_builddir=.
  27037. case "$ac_dir" in
  27038. .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
  27039. *)
  27040. ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
  27041. # A ".." for each directory in $ac_dir_suffix.
  27042. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
  27043. case $ac_top_builddir_sub in
  27044. "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  27045. *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  27046. esac ;;
  27047. esac
  27048. ac_abs_top_builddir=$ac_pwd
  27049. ac_abs_builddir=$ac_pwd$ac_dir_suffix
  27050. # for backward compatibility:
  27051. ac_top_builddir=$ac_top_build_prefix
  27052. case $srcdir in
  27053. .) # We are building in place.
  27054. ac_srcdir=.
  27055. ac_top_srcdir=$ac_top_builddir_sub
  27056. ac_abs_top_srcdir=$ac_pwd ;;
  27057. [\\/]* | ?:[\\/]* ) # Absolute name.
  27058. ac_srcdir=$srcdir$ac_dir_suffix;
  27059. ac_top_srcdir=$srcdir
  27060. ac_abs_top_srcdir=$srcdir ;;
  27061. *) # Relative name.
  27062. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
  27063. ac_top_srcdir=$ac_top_build_prefix$srcdir
  27064. ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
  27065. esac
  27066. ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
  27067. case $ac_mode in
  27068. :F)
  27069. #
  27070. # CONFIG_FILE
  27071. #
  27072. case $INSTALL in
  27073. [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
  27074. *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
  27075. esac
  27076. ac_MKDIR_P=$MKDIR_P
  27077. case $MKDIR_P in
  27078. [\\/$]* | ?:[\\/]* ) ;;
  27079. */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
  27080. esac
  27081. _ACEOF
  27082. cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  27083. # If the template does not know about datarootdir, expand it.
  27084. # FIXME: This hack should be removed a few years after 2.60.
  27085. ac_datarootdir_hack=; ac_datarootdir_seen=
  27086. ac_sed_dataroot='
  27087. /datarootdir/ {
  27088. p
  27089. q
  27090. }
  27091. /@datadir@/p
  27092. /@docdir@/p
  27093. /@infodir@/p
  27094. /@localedir@/p
  27095. /@mandir@/p'
  27096. case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
  27097. *datarootdir*) ac_datarootdir_seen=yes;;
  27098. *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
  27099. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
  27100. $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
  27101. _ACEOF
  27102. cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  27103. ac_datarootdir_hack='
  27104. s&@datadir@&$datadir&g
  27105. s&@docdir@&$docdir&g
  27106. s&@infodir@&$infodir&g
  27107. s&@localedir@&$localedir&g
  27108. s&@mandir@&$mandir&g
  27109. s&\\\${datarootdir}&$datarootdir&g' ;;
  27110. esac
  27111. _ACEOF
  27112. # Neutralize VPATH when `$srcdir' = `.'.
  27113. # Shell code in configure.ac might set extrasub.
  27114. # FIXME: do we really want to maintain this feature?
  27115. cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  27116. ac_sed_extra="$ac_vpsub
  27117. $extrasub
  27118. _ACEOF
  27119. cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  27120. :t
  27121. /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
  27122. s|@configure_input@|$ac_sed_conf_input|;t t
  27123. s&@top_builddir@&$ac_top_builddir_sub&;t t
  27124. s&@top_build_prefix@&$ac_top_build_prefix&;t t
  27125. s&@srcdir@&$ac_srcdir&;t t
  27126. s&@abs_srcdir@&$ac_abs_srcdir&;t t
  27127. s&@top_srcdir@&$ac_top_srcdir&;t t
  27128. s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
  27129. s&@builddir@&$ac_builddir&;t t
  27130. s&@abs_builddir@&$ac_abs_builddir&;t t
  27131. s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
  27132. s&@INSTALL@&$ac_INSTALL&;t t
  27133. s&@MKDIR_P@&$ac_MKDIR_P&;t t
  27134. $ac_datarootdir_hack
  27135. "
  27136. eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
  27137. >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  27138. test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
  27139. { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
  27140. { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
  27141. "$ac_tmp/out"`; test -z "$ac_out"; } &&
  27142. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
  27143. which seems to be undefined. Please make sure it is defined" >&5
  27144. $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
  27145. which seems to be undefined. Please make sure it is defined" >&2;}
  27146. rm -f "$ac_tmp/stdin"
  27147. case $ac_file in
  27148. -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
  27149. *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
  27150. esac \
  27151. || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  27152. ;;
  27153. :H)
  27154. #
  27155. # CONFIG_HEADER
  27156. #
  27157. if test x"$ac_file" != x-; then
  27158. {
  27159. $as_echo "/* $configure_input */" \
  27160. && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
  27161. } >"$ac_tmp/config.h" \
  27162. || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  27163. if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
  27164. { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
  27165. $as_echo "$as_me: $ac_file is unchanged" >&6;}
  27166. else
  27167. rm -f "$ac_file"
  27168. mv "$ac_tmp/config.h" "$ac_file" \
  27169. || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  27170. fi
  27171. else
  27172. $as_echo "/* $configure_input */" \
  27173. && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
  27174. || as_fn_error $? "could not create -" "$LINENO" 5
  27175. fi
  27176. # Compute "$ac_file"'s index in $config_headers.
  27177. _am_arg="$ac_file"
  27178. _am_stamp_count=1
  27179. for _am_header in $config_headers :; do
  27180. case $_am_header in
  27181. $_am_arg | $_am_arg:* )
  27182. break ;;
  27183. * )
  27184. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  27185. esac
  27186. done
  27187. echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
  27188. $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  27189. X"$_am_arg" : 'X\(//\)[^/]' \| \
  27190. X"$_am_arg" : 'X\(//\)$' \| \
  27191. X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
  27192. $as_echo X"$_am_arg" |
  27193. sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
  27194. s//\1/
  27195. q
  27196. }
  27197. /^X\(\/\/\)[^/].*/{
  27198. s//\1/
  27199. q
  27200. }
  27201. /^X\(\/\/\)$/{
  27202. s//\1/
  27203. q
  27204. }
  27205. /^X\(\/\).*/{
  27206. s//\1/
  27207. q
  27208. }
  27209. s/.*/./; q'`/stamp-h$_am_stamp_count
  27210. ;;
  27211. :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
  27212. $as_echo "$as_me: executing $ac_file commands" >&6;}
  27213. ;;
  27214. esac
  27215. case $ac_file$ac_mode in
  27216. "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
  27217. # Older Autoconf quotes --file arguments for eval, but not when files
  27218. # are listed without --file. Let's play safe and only enable the eval
  27219. # if we detect the quoting.
  27220. case $CONFIG_FILES in
  27221. *\'*) eval set x "$CONFIG_FILES" ;;
  27222. *) set x $CONFIG_FILES ;;
  27223. esac
  27224. shift
  27225. for mf
  27226. do
  27227. # Strip MF so we end up with the name of the file.
  27228. mf=`echo "$mf" | sed -e 's/:.*$//'`
  27229. # Check whether this is an Automake generated Makefile or not.
  27230. # We used to match only the files named 'Makefile.in', but
  27231. # some people rename them; so instead we look at the file content.
  27232. # Grep'ing the first line is not enough: some people post-process
  27233. # each Makefile.in and add a new line on top of each file to say so.
  27234. # Grep'ing the whole file is not good either: AIX grep has a line
  27235. # limit of 2048, but all sed's we know have understand at least 4000.
  27236. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
  27237. dirpart=`$as_dirname -- "$mf" ||
  27238. $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  27239. X"$mf" : 'X\(//\)[^/]' \| \
  27240. X"$mf" : 'X\(//\)$' \| \
  27241. X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
  27242. $as_echo X"$mf" |
  27243. sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
  27244. s//\1/
  27245. q
  27246. }
  27247. /^X\(\/\/\)[^/].*/{
  27248. s//\1/
  27249. q
  27250. }
  27251. /^X\(\/\/\)$/{
  27252. s//\1/
  27253. q
  27254. }
  27255. /^X\(\/\).*/{
  27256. s//\1/
  27257. q
  27258. }
  27259. s/.*/./; q'`
  27260. else
  27261. continue
  27262. fi
  27263. # Extract the definition of DEPDIR, am__include, and am__quote
  27264. # from the Makefile without running 'make'.
  27265. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  27266. test -z "$DEPDIR" && continue
  27267. am__include=`sed -n 's/^am__include = //p' < "$mf"`
  27268. test -z "$am__include" && continue
  27269. am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
  27270. # Find all dependency output files, they are included files with
  27271. # $(DEPDIR) in their names. We invoke sed twice because it is the
  27272. # simplest approach to changing $(DEPDIR) to its actual value in the
  27273. # expansion.
  27274. for file in `sed -n "
  27275. s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
  27276. sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
  27277. # Make sure the directory exists.
  27278. test -f "$dirpart/$file" && continue
  27279. fdir=`$as_dirname -- "$file" ||
  27280. $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  27281. X"$file" : 'X\(//\)[^/]' \| \
  27282. X"$file" : 'X\(//\)$' \| \
  27283. X"$file" : 'X\(/\)' \| . 2>/dev/null ||
  27284. $as_echo X"$file" |
  27285. sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
  27286. s//\1/
  27287. q
  27288. }
  27289. /^X\(\/\/\)[^/].*/{
  27290. s//\1/
  27291. q
  27292. }
  27293. /^X\(\/\/\)$/{
  27294. s//\1/
  27295. q
  27296. }
  27297. /^X\(\/\).*/{
  27298. s//\1/
  27299. q
  27300. }
  27301. s/.*/./; q'`
  27302. as_dir=$dirpart/$fdir; as_fn_mkdir_p
  27303. # echo "creating $dirpart/$file"
  27304. echo '# dummy' > "$dirpart/$file"
  27305. done
  27306. done
  27307. }
  27308. ;;
  27309. "default":C)
  27310. case x$CONFIG_HEADERS in
  27311. xconfig.h:config.in)
  27312. echo > stamp-h ;;
  27313. esac
  27314. ;;
  27315. esac
  27316. done # for ac_tag
  27317. as_fn_exit 0
  27318. _ACEOF
  27319. ac_clean_files=$ac_clean_files_save
  27320. test $ac_write_fail = 0 ||
  27321. as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
  27322. # configure is writing to config.log, and then calls config.status.
  27323. # config.status does its own redirection, appending to config.log.
  27324. # Unfortunately, on DOS this fails, as config.log is still kept open
  27325. # by configure, so config.status won't be able to write to it; its
  27326. # output is simply discarded. So we exec the FD to /dev/null,
  27327. # effectively closing config.log, so it can be properly (re)opened and
  27328. # appended to by config.status. When coming back to configure, we
  27329. # need to make the FD available again.
  27330. if test "$no_create" != yes; then
  27331. ac_cs_success=:
  27332. ac_config_status_args=
  27333. test "$silent" = yes &&
  27334. ac_config_status_args="$ac_config_status_args --quiet"
  27335. exec 5>/dev/null
  27336. $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
  27337. exec 5>>config.log
  27338. # Use ||, not &&, to avoid exiting from the if with $? = 1, which
  27339. # would make configure fail if this is the last instruction.
  27340. $ac_cs_success || as_fn_exit 1
  27341. fi
  27342. if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
  27343. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
  27344. $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
  27345. fi
  27346. exit 0