genext2fs-01-cvs-updates.patch 304 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709
  1. diff --exclude CVS -urN genext2fs-1.3.orig/AUTHORS genext2fs/AUTHORS
  2. --- genext2fs-1.3.orig/AUTHORS 1969-12-31 17:00:00.000000000 -0700
  3. +++ genext2fs/AUTHORS 2001-05-02 12:20:05.000000000 -0600
  4. @@ -0,0 +1 @@
  5. +Xavier Bestel <xavier.bestel@free.fr>
  6. diff --exclude CVS -urN genext2fs-1.3.orig/ChangeLog genext2fs/ChangeLog
  7. --- genext2fs-1.3.orig/ChangeLog 1969-12-31 17:00:00.000000000 -0700
  8. +++ genext2fs/ChangeLog 2004-11-21 23:21:05.000000000 -0700
  9. @@ -0,0 +1,2 @@
  10. +see our cvs logs here:
  11. +http://cvs.sourceforge.net/viewcvs.py/genext2fs/genext2fs/
  12. diff --exclude CVS -urN genext2fs-1.3.orig/INSTALL genext2fs/INSTALL
  13. --- genext2fs-1.3.orig/INSTALL 1969-12-31 17:00:00.000000000 -0700
  14. +++ genext2fs/INSTALL 2004-11-21 23:19:19.000000000 -0700
  15. @@ -0,0 +1,5 @@
  16. +To install, just do it the normal GNU way:
  17. +
  18. +./configure
  19. +make
  20. +sudo make install
  21. diff --exclude CVS -urN genext2fs-1.3.orig/Makefile.am genext2fs/Makefile.am
  22. --- genext2fs-1.3.orig/Makefile.am 1969-12-31 17:00:00.000000000 -0700
  23. +++ genext2fs/Makefile.am 2002-10-16 09:41:00.000000000 -0600
  24. @@ -0,0 +1,11 @@
  25. +bin_PROGRAMS = genext2fs
  26. +genext2fs_SOURCES = genext2fs.c
  27. +man_MANS = genext2fs.8
  28. +
  29. +# test genext2fs by creating the image and comparing checksums
  30. +test: all
  31. + sh ./test.sh
  32. +
  33. +# test genext2fs by actually mounting the created image.
  34. +test-mount: all
  35. + sudo sh ./test-mount.sh
  36. diff --exclude CVS -urN genext2fs-1.3.orig/Makefile.in genext2fs/Makefile.in
  37. --- genext2fs-1.3.orig/Makefile.in 1969-12-31 17:00:00.000000000 -0700
  38. +++ genext2fs/Makefile.in 2004-12-27 13:03:47.000000000 -0700
  39. @@ -0,0 +1,570 @@
  40. +# Makefile.in generated by automake 1.8.5 from Makefile.am.
  41. +# @configure_input@
  42. +
  43. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
  44. +# 2003, 2004 Free Software Foundation, Inc.
  45. +# This Makefile.in is free software; the Free Software Foundation
  46. +# gives unlimited permission to copy and/or distribute it,
  47. +# with or without modifications, as long as this notice is preserved.
  48. +
  49. +# This program is distributed in the hope that it will be useful,
  50. +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  51. +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  52. +# PARTICULAR PURPOSE.
  53. +
  54. +@SET_MAKE@
  55. +
  56. +SOURCES = $(genext2fs_SOURCES)
  57. +
  58. +srcdir = @srcdir@
  59. +top_srcdir = @top_srcdir@
  60. +VPATH = @srcdir@
  61. +pkgdatadir = $(datadir)/@PACKAGE@
  62. +pkglibdir = $(libdir)/@PACKAGE@
  63. +pkgincludedir = $(includedir)/@PACKAGE@
  64. +top_builddir = .
  65. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
  66. +INSTALL = @INSTALL@
  67. +install_sh_DATA = $(install_sh) -c -m 644
  68. +install_sh_PROGRAM = $(install_sh) -c
  69. +install_sh_SCRIPT = $(install_sh) -c
  70. +INSTALL_HEADER = $(INSTALL_DATA)
  71. +transform = $(program_transform_name)
  72. +NORMAL_INSTALL = :
  73. +PRE_INSTALL = :
  74. +POST_INSTALL = :
  75. +NORMAL_UNINSTALL = :
  76. +PRE_UNINSTALL = :
  77. +POST_UNINSTALL = :
  78. +bin_PROGRAMS = genext2fs$(EXEEXT)
  79. +subdir = .
  80. +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
  81. + $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
  82. + ChangeLog INSTALL NEWS TODO depcomp install-sh missing
  83. +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  84. +am__aclocal_m4_deps = $(top_srcdir)/configure.in
  85. +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  86. + $(ACLOCAL_M4)
  87. +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  88. + configure.lineno configure.status.lineno
  89. +mkinstalldirs = $(mkdir_p)
  90. +CONFIG_CLEAN_FILES =
  91. +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man8dir)"
  92. +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
  93. +PROGRAMS = $(bin_PROGRAMS)
  94. +am_genext2fs_OBJECTS = genext2fs.$(OBJEXT)
  95. +genext2fs_OBJECTS = $(am_genext2fs_OBJECTS)
  96. +genext2fs_LDADD = $(LDADD)
  97. +DEFAULT_INCLUDES = -I. -I$(srcdir)
  98. +depcomp = $(SHELL) $(top_srcdir)/depcomp
  99. +am__depfiles_maybe = depfiles
  100. +@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/genext2fs.Po
  101. +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
  102. + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  103. +CCLD = $(CC)
  104. +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
  105. +SOURCES = $(genext2fs_SOURCES)
  106. +DIST_SOURCES = $(genext2fs_SOURCES)
  107. +man8dir = $(mandir)/man8
  108. +NROFF = nroff
  109. +MANS = $(man_MANS)
  110. +ETAGS = etags
  111. +CTAGS = ctags
  112. +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
  113. +distdir = $(PACKAGE)-$(VERSION)
  114. +top_distdir = $(distdir)
  115. +am__remove_distdir = \
  116. + { test ! -d $(distdir) \
  117. + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
  118. + && rm -fr $(distdir); }; }
  119. +DIST_ARCHIVES = $(distdir).tar.gz
  120. +GZIP_ENV = --best
  121. +distuninstallcheck_listfiles = find . -type f -print
  122. +distcleancheck_listfiles = find . -type f -print
  123. +ACLOCAL = @ACLOCAL@
  124. +AMDEP_FALSE = @AMDEP_FALSE@
  125. +AMDEP_TRUE = @AMDEP_TRUE@
  126. +AMTAR = @AMTAR@
  127. +AUTOCONF = @AUTOCONF@
  128. +AUTOHEADER = @AUTOHEADER@
  129. +AUTOMAKE = @AUTOMAKE@
  130. +AWK = @AWK@
  131. +CC = @CC@
  132. +CCDEPMODE = @CCDEPMODE@
  133. +CFLAGS = @CFLAGS@
  134. +CPPFLAGS = @CPPFLAGS@
  135. +CYGPATH_W = @CYGPATH_W@
  136. +DEFS = @DEFS@
  137. +DEPDIR = @DEPDIR@
  138. +ECHO_C = @ECHO_C@
  139. +ECHO_N = @ECHO_N@
  140. +ECHO_T = @ECHO_T@
  141. +EXEEXT = @EXEEXT@
  142. +INSTALL_DATA = @INSTALL_DATA@
  143. +INSTALL_PROGRAM = @INSTALL_PROGRAM@
  144. +INSTALL_SCRIPT = @INSTALL_SCRIPT@
  145. +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  146. +LDFLAGS = @LDFLAGS@
  147. +LIBOBJS = @LIBOBJS@
  148. +LIBS = @LIBS@
  149. +LTLIBOBJS = @LTLIBOBJS@
  150. +MAKEINFO = @MAKEINFO@
  151. +OBJEXT = @OBJEXT@
  152. +PACKAGE = @PACKAGE@
  153. +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
  154. +PACKAGE_NAME = @PACKAGE_NAME@
  155. +PACKAGE_STRING = @PACKAGE_STRING@
  156. +PACKAGE_TARNAME = @PACKAGE_TARNAME@
  157. +PACKAGE_VERSION = @PACKAGE_VERSION@
  158. +PATH_SEPARATOR = @PATH_SEPARATOR@
  159. +SET_MAKE = @SET_MAKE@
  160. +SHELL = @SHELL@
  161. +STRIP = @STRIP@
  162. +VERSION = @VERSION@
  163. +ac_ct_CC = @ac_ct_CC@
  164. +ac_ct_STRIP = @ac_ct_STRIP@
  165. +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
  166. +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
  167. +am__include = @am__include@
  168. +am__leading_dot = @am__leading_dot@
  169. +am__quote = @am__quote@
  170. +bindir = @bindir@
  171. +build_alias = @build_alias@
  172. +datadir = @datadir@
  173. +exec_prefix = @exec_prefix@
  174. +host_alias = @host_alias@
  175. +includedir = @includedir@
  176. +infodir = @infodir@
  177. +install_sh = @install_sh@
  178. +libdir = @libdir@
  179. +libexecdir = @libexecdir@
  180. +localstatedir = @localstatedir@
  181. +mandir = @mandir@
  182. +mkdir_p = @mkdir_p@
  183. +oldincludedir = @oldincludedir@
  184. +prefix = @prefix@
  185. +program_transform_name = @program_transform_name@
  186. +sbindir = @sbindir@
  187. +sharedstatedir = @sharedstatedir@
  188. +sysconfdir = @sysconfdir@
  189. +target_alias = @target_alias@
  190. +genext2fs_SOURCES = genext2fs.c
  191. +man_MANS = genext2fs.8
  192. +all: all-am
  193. +
  194. +.SUFFIXES:
  195. +.SUFFIXES: .c .o .obj
  196. +am--refresh:
  197. + @:
  198. +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
  199. + @for dep in $?; do \
  200. + case '$(am__configure_deps)' in \
  201. + *$$dep*) \
  202. + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
  203. + cd $(srcdir) && $(AUTOMAKE) --gnu \
  204. + && exit 0; \
  205. + exit 1;; \
  206. + esac; \
  207. + done; \
  208. + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
  209. + cd $(top_srcdir) && \
  210. + $(AUTOMAKE) --gnu Makefile
  211. +.PRECIOUS: Makefile
  212. +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  213. + @case '$?' in \
  214. + *config.status*) \
  215. + echo ' $(SHELL) ./config.status'; \
  216. + $(SHELL) ./config.status;; \
  217. + *) \
  218. + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
  219. + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
  220. + esac;
  221. +
  222. +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
  223. + $(SHELL) ./config.status --recheck
  224. +
  225. +$(top_srcdir)/configure: $(am__configure_deps)
  226. + cd $(srcdir) && $(AUTOCONF)
  227. +$(ACLOCAL_M4): $(am__aclocal_m4_deps)
  228. + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
  229. +install-binPROGRAMS: $(bin_PROGRAMS)
  230. + @$(NORMAL_INSTALL)
  231. + test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
  232. + @list='$(bin_PROGRAMS)'; for p in $$list; do \
  233. + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
  234. + if test -f $$p \
  235. + ; then \
  236. + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
  237. + echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
  238. + $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
  239. + else :; fi; \
  240. + done
  241. +
  242. +uninstall-binPROGRAMS:
  243. + @$(NORMAL_UNINSTALL)
  244. + @list='$(bin_PROGRAMS)'; for p in $$list; do \
  245. + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
  246. + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
  247. + rm -f "$(DESTDIR)$(bindir)/$$f"; \
  248. + done
  249. +
  250. +clean-binPROGRAMS:
  251. + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
  252. +genext2fs$(EXEEXT): $(genext2fs_OBJECTS) $(genext2fs_DEPENDENCIES)
  253. + @rm -f genext2fs$(EXEEXT)
  254. + $(LINK) $(genext2fs_LDFLAGS) $(genext2fs_OBJECTS) $(genext2fs_LDADD) $(LIBS)
  255. +
  256. +mostlyclean-compile:
  257. + -rm -f *.$(OBJEXT)
  258. +
  259. +distclean-compile:
  260. + -rm -f *.tab.c
  261. +
  262. +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/genext2fs.Po@am__quote@
  263. +
  264. +.c.o:
  265. +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
  266. +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
  267. +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  268. +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
  269. +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  270. +@am__fastdepCC_FALSE@ $(COMPILE) -c $<
  271. +
  272. +.c.obj:
  273. +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
  274. +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
  275. +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  276. +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
  277. +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  278. +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
  279. +uninstall-info-am:
  280. +install-man8: $(man8_MANS) $(man_MANS)
  281. + @$(NORMAL_INSTALL)
  282. + test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)"
  283. + @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
  284. + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
  285. + for i in $$l2; do \
  286. + case "$$i" in \
  287. + *.8*) list="$$list $$i" ;; \
  288. + esac; \
  289. + done; \
  290. + for i in $$list; do \
  291. + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
  292. + else file=$$i; fi; \
  293. + ext=`echo $$i | sed -e 's/^.*\\.//'`; \
  294. + case "$$ext" in \
  295. + 8*) ;; \
  296. + *) ext='8' ;; \
  297. + esac; \
  298. + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
  299. + inst=`echo $$inst | sed -e 's/^.*\///'`; \
  300. + inst=`echo $$inst | sed '$(transform)'`.$$ext; \
  301. + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
  302. + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \
  303. + done
  304. +uninstall-man8:
  305. + @$(NORMAL_UNINSTALL)
  306. + @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
  307. + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
  308. + for i in $$l2; do \
  309. + case "$$i" in \
  310. + *.8*) list="$$list $$i" ;; \
  311. + esac; \
  312. + done; \
  313. + for i in $$list; do \
  314. + ext=`echo $$i | sed -e 's/^.*\\.//'`; \
  315. + case "$$ext" in \
  316. + 8*) ;; \
  317. + *) ext='8' ;; \
  318. + esac; \
  319. + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
  320. + inst=`echo $$inst | sed -e 's/^.*\///'`; \
  321. + inst=`echo $$inst | sed '$(transform)'`.$$ext; \
  322. + echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \
  323. + rm -f "$(DESTDIR)$(man8dir)/$$inst"; \
  324. + done
  325. +
  326. +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
  327. + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
  328. + unique=`for i in $$list; do \
  329. + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  330. + done | \
  331. + $(AWK) ' { files[$$0] = 1; } \
  332. + END { for (i in files) print i; }'`; \
  333. + mkid -fID $$unique
  334. +tags: TAGS
  335. +
  336. +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
  337. + $(TAGS_FILES) $(LISP)
  338. + tags=; \
  339. + here=`pwd`; \
  340. + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
  341. + unique=`for i in $$list; do \
  342. + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  343. + done | \
  344. + $(AWK) ' { files[$$0] = 1; } \
  345. + END { for (i in files) print i; }'`; \
  346. + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
  347. + test -n "$$unique" || unique=$$empty_fix; \
  348. + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
  349. + $$tags $$unique; \
  350. + fi
  351. +ctags: CTAGS
  352. +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
  353. + $(TAGS_FILES) $(LISP)
  354. + tags=; \
  355. + here=`pwd`; \
  356. + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
  357. + unique=`for i in $$list; do \
  358. + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  359. + done | \
  360. + $(AWK) ' { files[$$0] = 1; } \
  361. + END { for (i in files) print i; }'`; \
  362. + test -z "$(CTAGS_ARGS)$$tags$$unique" \
  363. + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
  364. + $$tags $$unique
  365. +
  366. +GTAGS:
  367. + here=`$(am__cd) $(top_builddir) && pwd` \
  368. + && cd $(top_srcdir) \
  369. + && gtags -i $(GTAGS_ARGS) $$here
  370. +
  371. +distclean-tags:
  372. + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
  373. +
  374. +distdir: $(DISTFILES)
  375. + $(am__remove_distdir)
  376. + mkdir $(distdir)
  377. + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
  378. + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
  379. + list='$(DISTFILES)'; for file in $$list; do \
  380. + case $$file in \
  381. + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
  382. + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
  383. + esac; \
  384. + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
  385. + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
  386. + if test "$$dir" != "$$file" && test "$$dir" != "."; then \
  387. + dir="/$$dir"; \
  388. + $(mkdir_p) "$(distdir)$$dir"; \
  389. + else \
  390. + dir=''; \
  391. + fi; \
  392. + if test -d $$d/$$file; then \
  393. + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
  394. + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
  395. + fi; \
  396. + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
  397. + else \
  398. + test -f $(distdir)/$$file \
  399. + || cp -p $$d/$$file $(distdir)/$$file \
  400. + || exit 1; \
  401. + fi; \
  402. + done
  403. + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
  404. + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
  405. + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
  406. + ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
  407. + || chmod -R a+r $(distdir)
  408. +dist-gzip: distdir
  409. + $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
  410. + $(am__remove_distdir)
  411. +
  412. +dist-bzip2: distdir
  413. + $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
  414. + $(am__remove_distdir)
  415. +
  416. +dist-tarZ: distdir
  417. + $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z
  418. + $(am__remove_distdir)
  419. +
  420. +dist-shar: distdir
  421. + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
  422. + $(am__remove_distdir)
  423. +
  424. +dist-zip: distdir
  425. + -rm -f $(distdir).zip
  426. + zip -rq $(distdir).zip $(distdir)
  427. + $(am__remove_distdir)
  428. +
  429. +dist dist-all: distdir
  430. + $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
  431. + $(am__remove_distdir)
  432. +
  433. +# This target untars the dist file and tries a VPATH configuration. Then
  434. +# it guarantees that the distribution is self-contained by making another
  435. +# tarfile.
  436. +distcheck: dist
  437. + case '$(DIST_ARCHIVES)' in \
  438. + *.tar.gz*) \
  439. + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\
  440. + *.tar.bz2*) \
  441. + bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\
  442. + *.tar.Z*) \
  443. + uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\
  444. + *.shar.gz*) \
  445. + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
  446. + *.zip*) \
  447. + unzip $(distdir).zip ;;\
  448. + esac
  449. + chmod -R a-w $(distdir); chmod a+w $(distdir)
  450. + mkdir $(distdir)/_build
  451. + mkdir $(distdir)/_inst
  452. + chmod a-w $(distdir)
  453. + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
  454. + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
  455. + && cd $(distdir)/_build \
  456. + && ../configure --srcdir=.. --prefix="$$dc_install_base" \
  457. + $(DISTCHECK_CONFIGURE_FLAGS) \
  458. + && $(MAKE) $(AM_MAKEFLAGS) \
  459. + && $(MAKE) $(AM_MAKEFLAGS) dvi \
  460. + && $(MAKE) $(AM_MAKEFLAGS) check \
  461. + && $(MAKE) $(AM_MAKEFLAGS) install \
  462. + && $(MAKE) $(AM_MAKEFLAGS) installcheck \
  463. + && $(MAKE) $(AM_MAKEFLAGS) uninstall \
  464. + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
  465. + distuninstallcheck \
  466. + && chmod -R a-w "$$dc_install_base" \
  467. + && ({ \
  468. + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
  469. + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
  470. + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
  471. + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
  472. + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
  473. + } || { rm -rf "$$dc_destdir"; exit 1; }) \
  474. + && rm -rf "$$dc_destdir" \
  475. + && $(MAKE) $(AM_MAKEFLAGS) dist \
  476. + && rm -rf $(DIST_ARCHIVES) \
  477. + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
  478. + $(am__remove_distdir)
  479. + @(echo "$(distdir) archives ready for distribution: "; \
  480. + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
  481. + sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
  482. +distuninstallcheck:
  483. + @cd $(distuninstallcheck_dir) \
  484. + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
  485. + || { echo "ERROR: files left after uninstall:" ; \
  486. + if test -n "$(DESTDIR)"; then \
  487. + echo " (check DESTDIR support)"; \
  488. + fi ; \
  489. + $(distuninstallcheck_listfiles) ; \
  490. + exit 1; } >&2
  491. +distcleancheck: distclean
  492. + @if test '$(srcdir)' = . ; then \
  493. + echo "ERROR: distcleancheck can only run from a VPATH build" ; \
  494. + exit 1 ; \
  495. + fi
  496. + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
  497. + || { echo "ERROR: files left in build directory after distclean:" ; \
  498. + $(distcleancheck_listfiles) ; \
  499. + exit 1; } >&2
  500. +check-am: all-am
  501. +check: check-am
  502. +all-am: Makefile $(PROGRAMS) $(MANS)
  503. +installdirs:
  504. + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man8dir)"; do \
  505. + test -z "$$dir" || $(mkdir_p) "$$dir"; \
  506. + done
  507. +install: install-am
  508. +install-exec: install-exec-am
  509. +install-data: install-data-am
  510. +uninstall: uninstall-am
  511. +
  512. +install-am: all-am
  513. + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  514. +
  515. +installcheck: installcheck-am
  516. +install-strip:
  517. + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
  518. + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
  519. + `test -z '$(STRIP)' || \
  520. + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
  521. +mostlyclean-generic:
  522. +
  523. +clean-generic:
  524. +
  525. +distclean-generic:
  526. + -rm -f $(CONFIG_CLEAN_FILES)
  527. +
  528. +maintainer-clean-generic:
  529. + @echo "This command is intended for maintainers to use"
  530. + @echo "it deletes files that may require special tools to rebuild."
  531. +clean: clean-am
  532. +
  533. +clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
  534. +
  535. +distclean: distclean-am
  536. + -rm -f $(am__CONFIG_DISTCLEAN_FILES)
  537. + -rm -rf ./$(DEPDIR)
  538. + -rm -f Makefile
  539. +distclean-am: clean-am distclean-compile distclean-generic \
  540. + distclean-tags
  541. +
  542. +dvi: dvi-am
  543. +
  544. +dvi-am:
  545. +
  546. +html: html-am
  547. +
  548. +info: info-am
  549. +
  550. +info-am:
  551. +
  552. +install-data-am: install-man
  553. +
  554. +install-exec-am: install-binPROGRAMS
  555. +
  556. +install-info: install-info-am
  557. +
  558. +install-man: install-man8
  559. +
  560. +installcheck-am:
  561. +
  562. +maintainer-clean: maintainer-clean-am
  563. + -rm -f $(am__CONFIG_DISTCLEAN_FILES)
  564. + -rm -rf $(top_srcdir)/autom4te.cache
  565. + -rm -rf ./$(DEPDIR)
  566. + -rm -f Makefile
  567. +maintainer-clean-am: distclean-am maintainer-clean-generic
  568. +
  569. +mostlyclean: mostlyclean-am
  570. +
  571. +mostlyclean-am: mostlyclean-compile mostlyclean-generic
  572. +
  573. +pdf: pdf-am
  574. +
  575. +pdf-am:
  576. +
  577. +ps: ps-am
  578. +
  579. +ps-am:
  580. +
  581. +uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man
  582. +
  583. +uninstall-man: uninstall-man8
  584. +
  585. +.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
  586. + clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
  587. + dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \
  588. + distclean-compile distclean-generic distclean-tags \
  589. + distcleancheck distdir distuninstallcheck dvi dvi-am html \
  590. + html-am info info-am install install-am install-binPROGRAMS \
  591. + install-data install-data-am install-exec install-exec-am \
  592. + install-info install-info-am install-man install-man8 \
  593. + install-strip installcheck installcheck-am installdirs \
  594. + maintainer-clean maintainer-clean-generic mostlyclean \
  595. + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
  596. + tags uninstall uninstall-am uninstall-binPROGRAMS \
  597. + uninstall-info-am uninstall-man uninstall-man8
  598. +
  599. +
  600. +# test genext2fs by creating the image and comparing checksums
  601. +test: all
  602. + sh ./test.sh
  603. +
  604. +# test genext2fs by actually mounting the created image.
  605. +test-mount: all
  606. + sudo sh ./test-mount.sh
  607. +# Tell versions [3.59,3.63) of GNU make to not export all variables.
  608. +# Otherwise a system limit (for SysV at least) may be exceeded.
  609. +.NOEXPORT:
  610. diff --exclude CVS -urN genext2fs-1.3.orig/NEWS genext2fs/NEWS
  611. --- genext2fs-1.3.orig/NEWS 1969-12-31 17:00:00.000000000 -0700
  612. +++ genext2fs/NEWS 2004-11-21 23:21:05.000000000 -0700
  613. @@ -0,0 +1 @@
  614. +No news yet :)
  615. diff --exclude CVS -urN genext2fs-1.3.orig/README genext2fs/README
  616. --- genext2fs-1.3.orig/README 1969-12-31 17:00:00.000000000 -0700
  617. +++ genext2fs/README 2004-11-21 23:18:40.000000000 -0700
  618. @@ -0,0 +1,19 @@
  619. + ABOUT
  620. +-----------
  621. +genext2fs is a mean to generate an ext2 filesystem as a normal (non-root)
  622. +user. It doesn't require you to mount the image file to copy files on it.
  623. +It doesn't even require you to be the superuser to make device nodes.
  624. +
  625. +http://sourceforge.net/projects/genext2fs
  626. +
  627. + CONTACT
  628. +-------------
  629. +Please use the genext2fs-devel@lists.sourceforge.net mailing list.
  630. +
  631. + INSTALL
  632. +-------------
  633. +Please see the INSTALL file ;)
  634. +
  635. + AUTHORS
  636. +-------------
  637. +Please see the AUTHORS file ;)
  638. diff --exclude CVS -urN genext2fs-1.3.orig/TODO genext2fs/TODO
  639. --- genext2fs-1.3.orig/TODO 1969-12-31 17:00:00.000000000 -0700
  640. +++ genext2fs/TODO 2004-11-25 11:12:10.000000000 -0700
  641. @@ -0,0 +1,13 @@
  642. +Disclaimer: I'll probably never do all this ...
  643. +
  644. +- support fancy ext2 options
  645. +- support ext3
  646. +
  647. +- add path to -f/-d options, e.g:
  648. + -f /:file.img => extract file.img at root
  649. + -d /etc:/path/to/my/etc => copy /path/to/my/etc into /etc
  650. +
  651. +- add tar.gz extraction capabilities ?
  652. +
  653. +- implement truncate_node
  654. +- find a better way to guess filesystem's size
  655. diff --exclude CVS -urN genext2fs-1.3.orig/aclocal.m4 genext2fs/aclocal.m4
  656. --- genext2fs-1.3.orig/aclocal.m4 1969-12-31 17:00:00.000000000 -0700
  657. +++ genext2fs/aclocal.m4 2004-12-27 13:03:45.000000000 -0700
  658. @@ -0,0 +1,908 @@
  659. +# generated automatically by aclocal 1.8.5 -*- Autoconf -*-
  660. +
  661. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
  662. +# Free Software Foundation, Inc.
  663. +# This file is free software; the Free Software Foundation
  664. +# gives unlimited permission to copy and/or distribute it,
  665. +# with or without modifications, as long as this notice is preserved.
  666. +
  667. +# This program is distributed in the hope that it will be useful,
  668. +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  669. +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  670. +# PARTICULAR PURPOSE.
  671. +
  672. +# -*- Autoconf -*-
  673. +# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
  674. +# Generated from amversion.in; do not edit by hand.
  675. +
  676. +# This program is free software; you can redistribute it and/or modify
  677. +# it under the terms of the GNU General Public License as published by
  678. +# the Free Software Foundation; either version 2, or (at your option)
  679. +# any later version.
  680. +
  681. +# This program is distributed in the hope that it will be useful,
  682. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  683. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  684. +# GNU General Public License for more details.
  685. +
  686. +# You should have received a copy of the GNU General Public License
  687. +# along with this program; if not, write to the Free Software
  688. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  689. +
  690. +# AM_AUTOMAKE_VERSION(VERSION)
  691. +# ----------------------------
  692. +# Automake X.Y traces this macro to ensure aclocal.m4 has been
  693. +# generated from the m4 files accompanying Automake X.Y.
  694. +AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
  695. +
  696. +# AM_SET_CURRENT_AUTOMAKE_VERSION
  697. +# -------------------------------
  698. +# Call AM_AUTOMAKE_VERSION so it can be traced.
  699. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
  700. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  701. + [AM_AUTOMAKE_VERSION([1.8.5])])
  702. +
  703. +# AM_AUX_DIR_EXPAND
  704. +
  705. +# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
  706. +
  707. +# This program is free software; you can redistribute it and/or modify
  708. +# it under the terms of the GNU General Public License as published by
  709. +# the Free Software Foundation; either version 2, or (at your option)
  710. +# any later version.
  711. +
  712. +# This program is distributed in the hope that it will be useful,
  713. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  714. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  715. +# GNU General Public License for more details.
  716. +
  717. +# You should have received a copy of the GNU General Public License
  718. +# along with this program; if not, write to the Free Software
  719. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  720. +# 02111-1307, USA.
  721. +
  722. +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  723. +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
  724. +# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
  725. +#
  726. +# Of course, Automake must honor this variable whenever it calls a
  727. +# tool from the auxiliary directory. The problem is that $srcdir (and
  728. +# therefore $ac_aux_dir as well) can be either absolute or relative,
  729. +# depending on how configure is run. This is pretty annoying, since
  730. +# it makes $ac_aux_dir quite unusable in subdirectories: in the top
  731. +# source directory, any form will work fine, but in subdirectories a
  732. +# relative path needs to be adjusted first.
  733. +#
  734. +# $ac_aux_dir/missing
  735. +# fails when called from a subdirectory if $ac_aux_dir is relative
  736. +# $top_srcdir/$ac_aux_dir/missing
  737. +# fails if $ac_aux_dir is absolute,
  738. +# fails when called from a subdirectory in a VPATH build with
  739. +# a relative $ac_aux_dir
  740. +#
  741. +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  742. +# are both prefixed by $srcdir. In an in-source build this is usually
  743. +# harmless because $srcdir is `.', but things will broke when you
  744. +# start a VPATH build or use an absolute $srcdir.
  745. +#
  746. +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  747. +# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  748. +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  749. +# and then we would define $MISSING as
  750. +# MISSING="\${SHELL} $am_aux_dir/missing"
  751. +# This will work as long as MISSING is not called from configure, because
  752. +# unfortunately $(top_srcdir) has no meaning in configure.
  753. +# However there are other variables, like CC, which are often used in
  754. +# configure, and could therefore not use this "fixed" $ac_aux_dir.
  755. +#
  756. +# Another solution, used here, is to always expand $ac_aux_dir to an
  757. +# absolute PATH. The drawback is that using absolute paths prevent a
  758. +# configured tree to be moved without reconfiguration.
  759. +
  760. +AC_DEFUN([AM_AUX_DIR_EXPAND],
  761. +[dnl Rely on autoconf to set up CDPATH properly.
  762. +AC_PREREQ([2.50])dnl
  763. +# expand $ac_aux_dir to an absolute path
  764. +am_aux_dir=`cd $ac_aux_dir && pwd`
  765. +])
  766. +
  767. +# AM_CONDITIONAL -*- Autoconf -*-
  768. +
  769. +# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
  770. +
  771. +# This program is free software; you can redistribute it and/or modify
  772. +# it under the terms of the GNU General Public License as published by
  773. +# the Free Software Foundation; either version 2, or (at your option)
  774. +# any later version.
  775. +
  776. +# This program is distributed in the hope that it will be useful,
  777. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  778. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  779. +# GNU General Public License for more details.
  780. +
  781. +# You should have received a copy of the GNU General Public License
  782. +# along with this program; if not, write to the Free Software
  783. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  784. +# 02111-1307, USA.
  785. +
  786. +# serial 6
  787. +
  788. +# AM_CONDITIONAL(NAME, SHELL-CONDITION)
  789. +# -------------------------------------
  790. +# Define a conditional.
  791. +AC_DEFUN([AM_CONDITIONAL],
  792. +[AC_PREREQ(2.52)dnl
  793. + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  794. + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  795. +AC_SUBST([$1_TRUE])
  796. +AC_SUBST([$1_FALSE])
  797. +if $2; then
  798. + $1_TRUE=
  799. + $1_FALSE='#'
  800. +else
  801. + $1_TRUE='#'
  802. + $1_FALSE=
  803. +fi
  804. +AC_CONFIG_COMMANDS_PRE(
  805. +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  806. + AC_MSG_ERROR([conditional "$1" was never defined.
  807. +Usually this means the macro was only invoked conditionally.])
  808. +fi])])
  809. +
  810. +# serial 7 -*- Autoconf -*-
  811. +
  812. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
  813. +# Free Software Foundation, Inc.
  814. +
  815. +# This program is free software; you can redistribute it and/or modify
  816. +# it under the terms of the GNU General Public License as published by
  817. +# the Free Software Foundation; either version 2, or (at your option)
  818. +# any later version.
  819. +
  820. +# This program is distributed in the hope that it will be useful,
  821. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  822. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  823. +# GNU General Public License for more details.
  824. +
  825. +# You should have received a copy of the GNU General Public License
  826. +# along with this program; if not, write to the Free Software
  827. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  828. +# 02111-1307, USA.
  829. +
  830. +
  831. +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
  832. +# written in clear, in which case automake, when reading aclocal.m4,
  833. +# will think it sees a *use*, and therefore will trigger all it's
  834. +# C support machinery. Also note that it means that autoscan, seeing
  835. +# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  836. +
  837. +
  838. +
  839. +# _AM_DEPENDENCIES(NAME)
  840. +# ----------------------
  841. +# See how the compiler implements dependency checking.
  842. +# NAME is "CC", "CXX", "GCJ", or "OBJC".
  843. +# We try a few techniques and use that to set a single cache variable.
  844. +#
  845. +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  846. +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  847. +# dependency, and given that the user is not expected to run this macro,
  848. +# just rely on AC_PROG_CC.
  849. +AC_DEFUN([_AM_DEPENDENCIES],
  850. +[AC_REQUIRE([AM_SET_DEPDIR])dnl
  851. +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  852. +AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  853. +AC_REQUIRE([AM_DEP_TRACK])dnl
  854. +
  855. +ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
  856. + [$1], CXX, [depcc="$CXX" am_compiler_list=],
  857. + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  858. + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  859. + [depcc="$$1" am_compiler_list=])
  860. +
  861. +AC_CACHE_CHECK([dependency style of $depcc],
  862. + [am_cv_$1_dependencies_compiler_type],
  863. +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  864. + # We make a subdir and do the tests there. Otherwise we can end up
  865. + # making bogus files that we don't know about and never remove. For
  866. + # instance it was reported that on HP-UX the gcc test will end up
  867. + # making a dummy file named `D' -- because `-MD' means `put the output
  868. + # in D'.
  869. + mkdir conftest.dir
  870. + # Copy depcomp to subdir because otherwise we won't find it if we're
  871. + # using a relative directory.
  872. + cp "$am_depcomp" conftest.dir
  873. + cd conftest.dir
  874. + # We will build objects and dependencies in a subdirectory because
  875. + # it helps to detect inapplicable dependency modes. For instance
  876. + # both Tru64's cc and ICC support -MD to output dependencies as a
  877. + # side effect of compilation, but ICC will put the dependencies in
  878. + # the current directory while Tru64 will put them in the object
  879. + # directory.
  880. + mkdir sub
  881. +
  882. + am_cv_$1_dependencies_compiler_type=none
  883. + if test "$am_compiler_list" = ""; then
  884. + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  885. + fi
  886. + for depmode in $am_compiler_list; do
  887. + # Setup a source with many dependencies, because some compilers
  888. + # like to wrap large dependency lists on column 80 (with \), and
  889. + # we should not choose a depcomp mode which is confused by this.
  890. + #
  891. + # We need to recreate these files for each test, as the compiler may
  892. + # overwrite some of them when testing with obscure command lines.
  893. + # This happens at least with the AIX C compiler.
  894. + : > sub/conftest.c
  895. + for i in 1 2 3 4 5 6; do
  896. + echo '#include "conftst'$i'.h"' >> sub/conftest.c
  897. + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
  898. + # Solaris 8's {/usr,}/bin/sh.
  899. + touch sub/conftst$i.h
  900. + done
  901. + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  902. +
  903. + case $depmode in
  904. + nosideeffect)
  905. + # after this tag, mechanisms are not by side-effect, so they'll
  906. + # only be used when explicitly requested
  907. + if test "x$enable_dependency_tracking" = xyes; then
  908. + continue
  909. + else
  910. + break
  911. + fi
  912. + ;;
  913. + none) break ;;
  914. + esac
  915. + # We check with `-c' and `-o' for the sake of the "dashmstdout"
  916. + # mode. It turns out that the SunPro C++ compiler does not properly
  917. + # handle `-M -o', and we need to detect this.
  918. + if depmode=$depmode \
  919. + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
  920. + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  921. + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
  922. + >/dev/null 2>conftest.err &&
  923. + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  924. + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
  925. + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  926. + # icc doesn't choke on unknown options, it will just issue warnings
  927. + # or remarks (even with -Werror). So we grep stderr for any message
  928. + # that says an option was ignored or not supported.
  929. + # When given -MP, icc 7.0 and 7.1 complain thusly:
  930. + # icc: Command line warning: ignoring option '-M'; no argument required
  931. + # The diagnosis changed in icc 8.0:
  932. + # icc: Command line remark: option '-MP' not supported
  933. + if (grep 'ignoring option' conftest.err ||
  934. + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  935. + am_cv_$1_dependencies_compiler_type=$depmode
  936. + break
  937. + fi
  938. + fi
  939. + done
  940. +
  941. + cd ..
  942. + rm -rf conftest.dir
  943. +else
  944. + am_cv_$1_dependencies_compiler_type=none
  945. +fi
  946. +])
  947. +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  948. +AM_CONDITIONAL([am__fastdep$1], [
  949. + test "x$enable_dependency_tracking" != xno \
  950. + && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  951. +])
  952. +
  953. +
  954. +# AM_SET_DEPDIR
  955. +# -------------
  956. +# Choose a directory name for dependency files.
  957. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES
  958. +AC_DEFUN([AM_SET_DEPDIR],
  959. +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  960. +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  961. +])
  962. +
  963. +
  964. +# AM_DEP_TRACK
  965. +# ------------
  966. +AC_DEFUN([AM_DEP_TRACK],
  967. +[AC_ARG_ENABLE(dependency-tracking,
  968. +[ --disable-dependency-tracking speeds up one-time build
  969. + --enable-dependency-tracking do not reject slow dependency extractors])
  970. +if test "x$enable_dependency_tracking" != xno; then
  971. + am_depcomp="$ac_aux_dir/depcomp"
  972. + AMDEPBACKSLASH='\'
  973. +fi
  974. +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  975. +AC_SUBST([AMDEPBACKSLASH])
  976. +])
  977. +
  978. +# Generate code to set up dependency tracking. -*- Autoconf -*-
  979. +
  980. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
  981. +
  982. +# This program is free software; you can redistribute it and/or modify
  983. +# it under the terms of the GNU General Public License as published by
  984. +# the Free Software Foundation; either version 2, or (at your option)
  985. +# any later version.
  986. +
  987. +# This program is distributed in the hope that it will be useful,
  988. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  989. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  990. +# GNU General Public License for more details.
  991. +
  992. +# You should have received a copy of the GNU General Public License
  993. +# along with this program; if not, write to the Free Software
  994. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  995. +# 02111-1307, USA.
  996. +
  997. +#serial 2
  998. +
  999. +# _AM_OUTPUT_DEPENDENCY_COMMANDS
  1000. +# ------------------------------
  1001. +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  1002. +[for mf in $CONFIG_FILES; do
  1003. + # Strip MF so we end up with the name of the file.
  1004. + mf=`echo "$mf" | sed -e 's/:.*$//'`
  1005. + # Check whether this is an Automake generated Makefile or not.
  1006. + # We used to match only the files named `Makefile.in', but
  1007. + # some people rename them; so instead we look at the file content.
  1008. + # Grep'ing the first line is not enough: some people post-process
  1009. + # each Makefile.in and add a new line on top of each file to say so.
  1010. + # So let's grep whole file.
  1011. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
  1012. + dirpart=`AS_DIRNAME("$mf")`
  1013. + else
  1014. + continue
  1015. + fi
  1016. + grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
  1017. + # Extract the definition of DEP_FILES from the Makefile without
  1018. + # running `make'.
  1019. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  1020. + test -z "$DEPDIR" && continue
  1021. + # When using ansi2knr, U may be empty or an underscore; expand it
  1022. + U=`sed -n 's/^U = //p' < "$mf"`
  1023. + test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
  1024. + # We invoke sed twice because it is the simplest approach to
  1025. + # changing $(DEPDIR) to its actual value in the expansion.
  1026. + for file in `sed -n '
  1027. + /^DEP_FILES = .*\\\\$/ {
  1028. + s/^DEP_FILES = //
  1029. + :loop
  1030. + s/\\\\$//
  1031. + p
  1032. + n
  1033. + /\\\\$/ b loop
  1034. + p
  1035. + }
  1036. + /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
  1037. + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
  1038. + # Make sure the directory exists.
  1039. + test -f "$dirpart/$file" && continue
  1040. + fdir=`AS_DIRNAME(["$file"])`
  1041. + AS_MKDIR_P([$dirpart/$fdir])
  1042. + # echo "creating $dirpart/$file"
  1043. + echo '# dummy' > "$dirpart/$file"
  1044. + done
  1045. +done
  1046. +])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  1047. +
  1048. +
  1049. +# AM_OUTPUT_DEPENDENCY_COMMANDS
  1050. +# -----------------------------
  1051. +# This macro should only be invoked once -- use via AC_REQUIRE.
  1052. +#
  1053. +# This code is only required when automatic dependency tracking
  1054. +# is enabled. FIXME. This creates each `.P' file that we will
  1055. +# need in order to bootstrap the dependency handling code.
  1056. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  1057. +[AC_CONFIG_COMMANDS([depfiles],
  1058. + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  1059. + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  1060. +])
  1061. +
  1062. +# Do all the work for Automake. -*- Autoconf -*-
  1063. +
  1064. +# This macro actually does too much some checks are only needed if
  1065. +# your package does certain things. But this isn't really a big deal.
  1066. +
  1067. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
  1068. +# Free Software Foundation, Inc.
  1069. +
  1070. +# This program is free software; you can redistribute it and/or modify
  1071. +# it under the terms of the GNU General Public License as published by
  1072. +# the Free Software Foundation; either version 2, or (at your option)
  1073. +# any later version.
  1074. +
  1075. +# This program is distributed in the hope that it will be useful,
  1076. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  1077. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1078. +# GNU General Public License for more details.
  1079. +
  1080. +# You should have received a copy of the GNU General Public License
  1081. +# along with this program; if not, write to the Free Software
  1082. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  1083. +# 02111-1307, USA.
  1084. +
  1085. +# serial 11
  1086. +
  1087. +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  1088. +# AM_INIT_AUTOMAKE([OPTIONS])
  1089. +# -----------------------------------------------
  1090. +# The call with PACKAGE and VERSION arguments is the old style
  1091. +# call (pre autoconf-2.50), which is being phased out. PACKAGE
  1092. +# and VERSION should now be passed to AC_INIT and removed from
  1093. +# the call to AM_INIT_AUTOMAKE.
  1094. +# We support both call styles for the transition. After
  1095. +# the next Automake release, Autoconf can make the AC_INIT
  1096. +# arguments mandatory, and then we can depend on a new Autoconf
  1097. +# release and drop the old call support.
  1098. +AC_DEFUN([AM_INIT_AUTOMAKE],
  1099. +[AC_PREREQ([2.58])dnl
  1100. +dnl Autoconf wants to disallow AM_ names. We explicitly allow
  1101. +dnl the ones we care about.
  1102. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  1103. +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  1104. +AC_REQUIRE([AC_PROG_INSTALL])dnl
  1105. +# test to see if srcdir already configured
  1106. +if test "`cd $srcdir && pwd`" != "`pwd`" &&
  1107. + test -f $srcdir/config.status; then
  1108. + AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  1109. +fi
  1110. +
  1111. +# test whether we have cygpath
  1112. +if test -z "$CYGPATH_W"; then
  1113. + if (cygpath --version) >/dev/null 2>/dev/null; then
  1114. + CYGPATH_W='cygpath -w'
  1115. + else
  1116. + CYGPATH_W=echo
  1117. + fi
  1118. +fi
  1119. +AC_SUBST([CYGPATH_W])
  1120. +
  1121. +# Define the identity of the package.
  1122. +dnl Distinguish between old-style and new-style calls.
  1123. +m4_ifval([$2],
  1124. +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  1125. + AC_SUBST([PACKAGE], [$1])dnl
  1126. + AC_SUBST([VERSION], [$2])],
  1127. +[_AM_SET_OPTIONS([$1])dnl
  1128. + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  1129. + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  1130. +
  1131. +_AM_IF_OPTION([no-define],,
  1132. +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  1133. + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
  1134. +
  1135. +# Some tools Automake needs.
  1136. +AC_REQUIRE([AM_SANITY_CHECK])dnl
  1137. +AC_REQUIRE([AC_ARG_PROGRAM])dnl
  1138. +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
  1139. +AM_MISSING_PROG(AUTOCONF, autoconf)
  1140. +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
  1141. +AM_MISSING_PROG(AUTOHEADER, autoheader)
  1142. +AM_MISSING_PROG(MAKEINFO, makeinfo)
  1143. +AM_MISSING_PROG(AMTAR, tar)
  1144. +AM_PROG_INSTALL_SH
  1145. +AM_PROG_INSTALL_STRIP
  1146. +AC_REQUIRE([AM_PROG_MKDIR_P])dnl
  1147. +# We need awk for the "check" target. The system "awk" is bad on
  1148. +# some platforms.
  1149. +AC_REQUIRE([AC_PROG_AWK])dnl
  1150. +AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  1151. +AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  1152. +
  1153. +_AM_IF_OPTION([no-dependencies],,
  1154. +[AC_PROVIDE_IFELSE([AC_PROG_CC],
  1155. + [_AM_DEPENDENCIES(CC)],
  1156. + [define([AC_PROG_CC],
  1157. + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
  1158. +AC_PROVIDE_IFELSE([AC_PROG_CXX],
  1159. + [_AM_DEPENDENCIES(CXX)],
  1160. + [define([AC_PROG_CXX],
  1161. + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
  1162. +])
  1163. +])
  1164. +
  1165. +
  1166. +# When config.status generates a header, we must update the stamp-h file.
  1167. +# This file resides in the same directory as the config header
  1168. +# that is generated. The stamp files are numbered to have different names.
  1169. +
  1170. +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  1171. +# loop where config.status creates the headers, so we can generate
  1172. +# our stamp files there.
  1173. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  1174. +[# Compute $1's index in $config_headers.
  1175. +_am_stamp_count=1
  1176. +for _am_header in $config_headers :; do
  1177. + case $_am_header in
  1178. + $1 | $1:* )
  1179. + break ;;
  1180. + * )
  1181. + _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  1182. + esac
  1183. +done
  1184. +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
  1185. +
  1186. +# AM_PROG_INSTALL_SH
  1187. +# ------------------
  1188. +# Define $install_sh.
  1189. +
  1190. +# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
  1191. +
  1192. +# This program is free software; you can redistribute it and/or modify
  1193. +# it under the terms of the GNU General Public License as published by
  1194. +# the Free Software Foundation; either version 2, or (at your option)
  1195. +# any later version.
  1196. +
  1197. +# This program is distributed in the hope that it will be useful,
  1198. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  1199. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1200. +# GNU General Public License for more details.
  1201. +
  1202. +# You should have received a copy of the GNU General Public License
  1203. +# along with this program; if not, write to the Free Software
  1204. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  1205. +# 02111-1307, USA.
  1206. +
  1207. +AC_DEFUN([AM_PROG_INSTALL_SH],
  1208. +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  1209. +install_sh=${install_sh-"$am_aux_dir/install-sh"}
  1210. +AC_SUBST(install_sh)])
  1211. +
  1212. +# -*- Autoconf -*-
  1213. +# Copyright (C) 2003 Free Software Foundation, Inc.
  1214. +
  1215. +# This program is free software; you can redistribute it and/or modify
  1216. +# it under the terms of the GNU General Public License as published by
  1217. +# the Free Software Foundation; either version 2, or (at your option)
  1218. +# any later version.
  1219. +
  1220. +# This program is distributed in the hope that it will be useful,
  1221. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  1222. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1223. +# GNU General Public License for more details.
  1224. +
  1225. +# You should have received a copy of the GNU General Public License
  1226. +# along with this program; if not, write to the Free Software
  1227. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  1228. +# 02111-1307, USA.
  1229. +
  1230. +# serial 1
  1231. +
  1232. +# Check whether the underlying file-system supports filenames
  1233. +# with a leading dot. For instance MS-DOS doesn't.
  1234. +AC_DEFUN([AM_SET_LEADING_DOT],
  1235. +[rm -rf .tst 2>/dev/null
  1236. +mkdir .tst 2>/dev/null
  1237. +if test -d .tst; then
  1238. + am__leading_dot=.
  1239. +else
  1240. + am__leading_dot=_
  1241. +fi
  1242. +rmdir .tst 2>/dev/null
  1243. +AC_SUBST([am__leading_dot])])
  1244. +
  1245. +# Check to see how 'make' treats includes. -*- Autoconf -*-
  1246. +
  1247. +# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
  1248. +
  1249. +# This program is free software; you can redistribute it and/or modify
  1250. +# it under the terms of the GNU General Public License as published by
  1251. +# the Free Software Foundation; either version 2, or (at your option)
  1252. +# any later version.
  1253. +
  1254. +# This program is distributed in the hope that it will be useful,
  1255. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  1256. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1257. +# GNU General Public License for more details.
  1258. +
  1259. +# You should have received a copy of the GNU General Public License
  1260. +# along with this program; if not, write to the Free Software
  1261. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  1262. +# 02111-1307, USA.
  1263. +
  1264. +# serial 2
  1265. +
  1266. +# AM_MAKE_INCLUDE()
  1267. +# -----------------
  1268. +# Check to see how make treats includes.
  1269. +AC_DEFUN([AM_MAKE_INCLUDE],
  1270. +[am_make=${MAKE-make}
  1271. +cat > confinc << 'END'
  1272. +am__doit:
  1273. + @echo done
  1274. +.PHONY: am__doit
  1275. +END
  1276. +# If we don't find an include directive, just comment out the code.
  1277. +AC_MSG_CHECKING([for style of include used by $am_make])
  1278. +am__include="#"
  1279. +am__quote=
  1280. +_am_result=none
  1281. +# First try GNU make style include.
  1282. +echo "include confinc" > confmf
  1283. +# We grep out `Entering directory' and `Leaving directory'
  1284. +# messages which can occur if `w' ends up in MAKEFLAGS.
  1285. +# In particular we don't look at `^make:' because GNU make might
  1286. +# be invoked under some other name (usually "gmake"), in which
  1287. +# case it prints its new name instead of `make'.
  1288. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
  1289. + am__include=include
  1290. + am__quote=
  1291. + _am_result=GNU
  1292. +fi
  1293. +# Now try BSD make style include.
  1294. +if test "$am__include" = "#"; then
  1295. + echo '.include "confinc"' > confmf
  1296. + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
  1297. + am__include=.include
  1298. + am__quote="\""
  1299. + _am_result=BSD
  1300. + fi
  1301. +fi
  1302. +AC_SUBST([am__include])
  1303. +AC_SUBST([am__quote])
  1304. +AC_MSG_RESULT([$_am_result])
  1305. +rm -f confinc confmf
  1306. +])
  1307. +
  1308. +# -*- Autoconf -*-
  1309. +
  1310. +
  1311. +# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
  1312. +
  1313. +# This program is free software; you can redistribute it and/or modify
  1314. +# it under the terms of the GNU General Public License as published by
  1315. +# the Free Software Foundation; either version 2, or (at your option)
  1316. +# any later version.
  1317. +
  1318. +# This program is distributed in the hope that it will be useful,
  1319. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  1320. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1321. +# GNU General Public License for more details.
  1322. +
  1323. +# You should have received a copy of the GNU General Public License
  1324. +# along with this program; if not, write to the Free Software
  1325. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  1326. +# 02111-1307, USA.
  1327. +
  1328. +# serial 3
  1329. +
  1330. +# AM_MISSING_PROG(NAME, PROGRAM)
  1331. +# ------------------------------
  1332. +AC_DEFUN([AM_MISSING_PROG],
  1333. +[AC_REQUIRE([AM_MISSING_HAS_RUN])
  1334. +$1=${$1-"${am_missing_run}$2"}
  1335. +AC_SUBST($1)])
  1336. +
  1337. +
  1338. +# AM_MISSING_HAS_RUN
  1339. +# ------------------
  1340. +# Define MISSING if not defined so far and test if it supports --run.
  1341. +# If it does, set am_missing_run to use it, otherwise, to nothing.
  1342. +AC_DEFUN([AM_MISSING_HAS_RUN],
  1343. +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  1344. +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
  1345. +# Use eval to expand $SHELL
  1346. +if eval "$MISSING --run true"; then
  1347. + am_missing_run="$MISSING --run "
  1348. +else
  1349. + am_missing_run=
  1350. + AC_MSG_WARN([`missing' script is too old or missing])
  1351. +fi
  1352. +])
  1353. +
  1354. +# AM_PROG_MKDIR_P
  1355. +# ---------------
  1356. +# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
  1357. +
  1358. +# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
  1359. +
  1360. +# This program is free software; you can redistribute it and/or modify
  1361. +# it under the terms of the GNU General Public License as published by
  1362. +# the Free Software Foundation; either version 2, or (at your option)
  1363. +# any later version.
  1364. +
  1365. +# This program is distributed in the hope that it will be useful,
  1366. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  1367. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1368. +# GNU General Public License for more details.
  1369. +
  1370. +# You should have received a copy of the GNU General Public License
  1371. +# along with this program; if not, write to the Free Software
  1372. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  1373. +# 02111-1307, USA.
  1374. +
  1375. +# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
  1376. +# created by `make install' are always world readable, even if the
  1377. +# installer happens to have an overly restrictive umask (e.g. 077).
  1378. +# This was a mistake. There are at least two reasons why we must not
  1379. +# use `-m 0755':
  1380. +# - it causes special bits like SGID to be ignored,
  1381. +# - it may be too restrictive (some setups expect 775 directories).
  1382. +#
  1383. +# Do not use -m 0755 and let people choose whatever they expect by
  1384. +# setting umask.
  1385. +#
  1386. +# We cannot accept any implementation of `mkdir' that recognizes `-p'.
  1387. +# Some implementations (such as Solaris 8's) are not thread-safe: if a
  1388. +# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
  1389. +# concurrently, both version can detect that a/ is missing, but only
  1390. +# one can create it and the other will error out. Consequently we
  1391. +# restrict ourselves to GNU make (using the --version option ensures
  1392. +# this.)
  1393. +AC_DEFUN([AM_PROG_MKDIR_P],
  1394. +[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
  1395. + # Keeping the `.' argument allows $(mkdir_p) to be used without
  1396. + # argument. Indeed, we sometimes output rules like
  1397. + # $(mkdir_p) $(somedir)
  1398. + # where $(somedir) is conditionally defined.
  1399. + # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
  1400. + # expensive solution, as it forces Make to start a sub-shell.)
  1401. + mkdir_p='mkdir -p -- .'
  1402. +else
  1403. + # On NextStep and OpenStep, the `mkdir' command does not
  1404. + # recognize any option. It will interpret all options as
  1405. + # directories to create, and then abort because `.' already
  1406. + # exists.
  1407. + for d in ./-p ./--version;
  1408. + do
  1409. + test -d $d && rmdir $d
  1410. + done
  1411. + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
  1412. + if test -f "$ac_aux_dir/mkinstalldirs"; then
  1413. + mkdir_p='$(mkinstalldirs)'
  1414. + else
  1415. + mkdir_p='$(install_sh) -d'
  1416. + fi
  1417. +fi
  1418. +AC_SUBST([mkdir_p])])
  1419. +
  1420. +# Helper functions for option handling. -*- Autoconf -*-
  1421. +
  1422. +# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
  1423. +
  1424. +# This program is free software; you can redistribute it and/or modify
  1425. +# it under the terms of the GNU General Public License as published by
  1426. +# the Free Software Foundation; either version 2, or (at your option)
  1427. +# any later version.
  1428. +
  1429. +# This program is distributed in the hope that it will be useful,
  1430. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  1431. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1432. +# GNU General Public License for more details.
  1433. +
  1434. +# You should have received a copy of the GNU General Public License
  1435. +# along with this program; if not, write to the Free Software
  1436. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  1437. +# 02111-1307, USA.
  1438. +
  1439. +# serial 2
  1440. +
  1441. +# _AM_MANGLE_OPTION(NAME)
  1442. +# -----------------------
  1443. +AC_DEFUN([_AM_MANGLE_OPTION],
  1444. +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  1445. +
  1446. +# _AM_SET_OPTION(NAME)
  1447. +# ------------------------------
  1448. +# Set option NAME. Presently that only means defining a flag for this option.
  1449. +AC_DEFUN([_AM_SET_OPTION],
  1450. +[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
  1451. +
  1452. +# _AM_SET_OPTIONS(OPTIONS)
  1453. +# ----------------------------------
  1454. +# OPTIONS is a space-separated list of Automake options.
  1455. +AC_DEFUN([_AM_SET_OPTIONS],
  1456. +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  1457. +
  1458. +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  1459. +# -------------------------------------------
  1460. +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  1461. +AC_DEFUN([_AM_IF_OPTION],
  1462. +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  1463. +
  1464. +#
  1465. +# Check to make sure that the build environment is sane.
  1466. +#
  1467. +
  1468. +# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
  1469. +
  1470. +# This program is free software; you can redistribute it and/or modify
  1471. +# it under the terms of the GNU General Public License as published by
  1472. +# the Free Software Foundation; either version 2, or (at your option)
  1473. +# any later version.
  1474. +
  1475. +# This program is distributed in the hope that it will be useful,
  1476. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  1477. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1478. +# GNU General Public License for more details.
  1479. +
  1480. +# You should have received a copy of the GNU General Public License
  1481. +# along with this program; if not, write to the Free Software
  1482. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  1483. +# 02111-1307, USA.
  1484. +
  1485. +# serial 3
  1486. +
  1487. +# AM_SANITY_CHECK
  1488. +# ---------------
  1489. +AC_DEFUN([AM_SANITY_CHECK],
  1490. +[AC_MSG_CHECKING([whether build environment is sane])
  1491. +# Just in case
  1492. +sleep 1
  1493. +echo timestamp > conftest.file
  1494. +# Do `set' in a subshell so we don't clobber the current shell's
  1495. +# arguments. Must try -L first in case configure is actually a
  1496. +# symlink; some systems play weird games with the mod time of symlinks
  1497. +# (eg FreeBSD returns the mod time of the symlink's containing
  1498. +# directory).
  1499. +if (
  1500. + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
  1501. + if test "$[*]" = "X"; then
  1502. + # -L didn't work.
  1503. + set X `ls -t $srcdir/configure conftest.file`
  1504. + fi
  1505. + rm -f conftest.file
  1506. + if test "$[*]" != "X $srcdir/configure conftest.file" \
  1507. + && test "$[*]" != "X conftest.file $srcdir/configure"; then
  1508. +
  1509. + # If neither matched, then we have a broken ls. This can happen
  1510. + # if, for instance, CONFIG_SHELL is bash and it inherits a
  1511. + # broken ls alias from the environment. This has actually
  1512. + # happened. Such a system could not be considered "sane".
  1513. + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  1514. +alias in your environment])
  1515. + fi
  1516. +
  1517. + test "$[2]" = conftest.file
  1518. + )
  1519. +then
  1520. + # Ok.
  1521. + :
  1522. +else
  1523. + AC_MSG_ERROR([newly created file is older than distributed files!
  1524. +Check your system clock])
  1525. +fi
  1526. +AC_MSG_RESULT(yes)])
  1527. +
  1528. +# AM_PROG_INSTALL_STRIP
  1529. +
  1530. +# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
  1531. +
  1532. +# This program is free software; you can redistribute it and/or modify
  1533. +# it under the terms of the GNU General Public License as published by
  1534. +# the Free Software Foundation; either version 2, or (at your option)
  1535. +# any later version.
  1536. +
  1537. +# This program is distributed in the hope that it will be useful,
  1538. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  1539. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1540. +# GNU General Public License for more details.
  1541. +
  1542. +# You should have received a copy of the GNU General Public License
  1543. +# along with this program; if not, write to the Free Software
  1544. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  1545. +# 02111-1307, USA.
  1546. +
  1547. +# One issue with vendor `install' (even GNU) is that you can't
  1548. +# specify the program used to strip binaries. This is especially
  1549. +# annoying in cross-compiling environments, where the build's strip
  1550. +# is unlikely to handle the host's binaries.
  1551. +# Fortunately install-sh will honor a STRIPPROG variable, so we
  1552. +# always use install-sh in `make install-strip', and initialize
  1553. +# STRIPPROG with the value of the STRIP variable (set by the user).
  1554. +AC_DEFUN([AM_PROG_INSTALL_STRIP],
  1555. +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  1556. +# Installed binaries are usually stripped using `strip' when the user
  1557. +# run `make install-strip'. However `strip' might not be the right
  1558. +# tool to use in cross-compilation environments, therefore Automake
  1559. +# will honor the `STRIP' environment variable to overrule this program.
  1560. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
  1561. +if test "$cross_compiling" != no; then
  1562. + AC_CHECK_TOOL([STRIP], [strip], :)
  1563. +fi
  1564. +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
  1565. +AC_SUBST([INSTALL_STRIP_PROGRAM])])
  1566. +
  1567. diff --exclude CVS -urN genext2fs-1.3.orig/autogen.sh genext2fs/autogen.sh
  1568. --- genext2fs-1.3.orig/autogen.sh 1969-12-31 17:00:00.000000000 -0700
  1569. +++ genext2fs/autogen.sh 2004-11-21 23:24:52.000000000 -0700
  1570. @@ -0,0 +1,22 @@
  1571. +#!/bin/sh
  1572. +
  1573. +die() {
  1574. + echo "*** $0 failed :("
  1575. + exit 1
  1576. +}
  1577. +
  1578. +./clean.sh
  1579. +
  1580. +automake_flags="-c -a"
  1581. +for p in aclocal autoconf automake ; do
  1582. + flags=${p}_flags
  1583. + if ! ${p} ${!flags} ; then
  1584. + echo "*** ${p} failed :("
  1585. + exit 1
  1586. + fi
  1587. +done
  1588. +
  1589. +echo
  1590. +echo "Now just run:"
  1591. +echo "./configure"
  1592. +echo "make"
  1593. diff --exclude CVS -urN genext2fs-1.3.orig/clean.sh genext2fs/clean.sh
  1594. --- genext2fs-1.3.orig/clean.sh 1969-12-31 17:00:00.000000000 -0700
  1595. +++ genext2fs/clean.sh 2004-11-21 23:24:52.000000000 -0700
  1596. @@ -0,0 +1,13 @@
  1597. +#!/bin/bash
  1598. +
  1599. +for f in \
  1600. + `find . -name Makefile.in -o -name Makefile` \
  1601. + `find . -name .libs -o -name .deps` \
  1602. + `find . -name '*.o' -o -name '*.la' -o -name '*.lo' -o -name '*.loT'` \
  1603. + aclocal.m4* autom4te.cache \
  1604. + configure config.* \
  1605. + depcomp install-sh ltmain.sh missing mkinstalldirs libtool \
  1606. + genext2fs
  1607. +do
  1608. + rm -rf $f
  1609. +done
  1610. diff --exclude CVS -urN genext2fs-1.3.orig/configure genext2fs/configure
  1611. --- genext2fs-1.3.orig/configure 1969-12-31 17:00:00.000000000 -0700
  1612. +++ genext2fs/configure 2004-12-27 13:03:46.000000000 -0700
  1613. @@ -0,0 +1,4034 @@
  1614. +#! /bin/sh
  1615. +# Guess values for system-dependent variables and create Makefiles.
  1616. +# Generated by GNU Autoconf 2.59.
  1617. +#
  1618. +# Copyright (C) 2003 Free Software Foundation, Inc.
  1619. +# This configure script is free software; the Free Software Foundation
  1620. +# gives unlimited permission to copy, distribute and modify it.
  1621. +## --------------------- ##
  1622. +## M4sh Initialization. ##
  1623. +## --------------------- ##
  1624. +
  1625. +# Be Bourne compatible
  1626. +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  1627. + emulate sh
  1628. + NULLCMD=:
  1629. + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
  1630. + # is contrary to our usage. Disable this feature.
  1631. + alias -g '${1+"$@"}'='"$@"'
  1632. +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
  1633. + set -o posix
  1634. +fi
  1635. +DUALCASE=1; export DUALCASE # for MKS sh
  1636. +
  1637. +# Support unset when possible.
  1638. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  1639. + as_unset=unset
  1640. +else
  1641. + as_unset=false
  1642. +fi
  1643. +
  1644. +
  1645. +# Work around bugs in pre-3.0 UWIN ksh.
  1646. +$as_unset ENV MAIL MAILPATH
  1647. +PS1='$ '
  1648. +PS2='> '
  1649. +PS4='+ '
  1650. +
  1651. +# NLS nuisances.
  1652. +for as_var in \
  1653. + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
  1654. + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
  1655. + LC_TELEPHONE LC_TIME
  1656. +do
  1657. + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
  1658. + eval $as_var=C; export $as_var
  1659. + else
  1660. + $as_unset $as_var
  1661. + fi
  1662. +done
  1663. +
  1664. +# Required to use basename.
  1665. +if expr a : '\(a\)' >/dev/null 2>&1; then
  1666. + as_expr=expr
  1667. +else
  1668. + as_expr=false
  1669. +fi
  1670. +
  1671. +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
  1672. + as_basename=basename
  1673. +else
  1674. + as_basename=false
  1675. +fi
  1676. +
  1677. +
  1678. +# Name of the executable.
  1679. +as_me=`$as_basename "$0" ||
  1680. +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
  1681. + X"$0" : 'X\(//\)$' \| \
  1682. + X"$0" : 'X\(/\)$' \| \
  1683. + . : '\(.\)' 2>/dev/null ||
  1684. +echo X/"$0" |
  1685. + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
  1686. + /^X\/\(\/\/\)$/{ s//\1/; q; }
  1687. + /^X\/\(\/\).*/{ s//\1/; q; }
  1688. + s/.*/./; q'`
  1689. +
  1690. +
  1691. +# PATH needs CR, and LINENO needs CR and PATH.
  1692. +# Avoid depending upon Character Ranges.
  1693. +as_cr_letters='abcdefghijklmnopqrstuvwxyz'
  1694. +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  1695. +as_cr_Letters=$as_cr_letters$as_cr_LETTERS
  1696. +as_cr_digits='0123456789'
  1697. +as_cr_alnum=$as_cr_Letters$as_cr_digits
  1698. +
  1699. +# The user is always right.
  1700. +if test "${PATH_SEPARATOR+set}" != set; then
  1701. + echo "#! /bin/sh" >conf$$.sh
  1702. + echo "exit 0" >>conf$$.sh
  1703. + chmod +x conf$$.sh
  1704. + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
  1705. + PATH_SEPARATOR=';'
  1706. + else
  1707. + PATH_SEPARATOR=:
  1708. + fi
  1709. + rm -f conf$$.sh
  1710. +fi
  1711. +
  1712. +
  1713. + as_lineno_1=$LINENO
  1714. + as_lineno_2=$LINENO
  1715. + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
  1716. + test "x$as_lineno_1" != "x$as_lineno_2" &&
  1717. + test "x$as_lineno_3" = "x$as_lineno_2" || {
  1718. + # Find who we are. Look in the path if we contain no path at all
  1719. + # relative or not.
  1720. + case $0 in
  1721. + *[\\/]* ) as_myself=$0 ;;
  1722. + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  1723. +for as_dir in $PATH
  1724. +do
  1725. + IFS=$as_save_IFS
  1726. + test -z "$as_dir" && as_dir=.
  1727. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
  1728. +done
  1729. +
  1730. + ;;
  1731. + esac
  1732. + # We did not find ourselves, most probably we were run as `sh COMMAND'
  1733. + # in which case we are not to be found in the path.
  1734. + if test "x$as_myself" = x; then
  1735. + as_myself=$0
  1736. + fi
  1737. + if test ! -f "$as_myself"; then
  1738. + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
  1739. + { (exit 1); exit 1; }; }
  1740. + fi
  1741. + case $CONFIG_SHELL in
  1742. + '')
  1743. + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  1744. +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
  1745. +do
  1746. + IFS=$as_save_IFS
  1747. + test -z "$as_dir" && as_dir=.
  1748. + for as_base in sh bash ksh sh5; do
  1749. + case $as_dir in
  1750. + /*)
  1751. + if ("$as_dir/$as_base" -c '
  1752. + as_lineno_1=$LINENO
  1753. + as_lineno_2=$LINENO
  1754. + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
  1755. + test "x$as_lineno_1" != "x$as_lineno_2" &&
  1756. + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
  1757. + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
  1758. + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
  1759. + CONFIG_SHELL=$as_dir/$as_base
  1760. + export CONFIG_SHELL
  1761. + exec "$CONFIG_SHELL" "$0" ${1+"$@"}
  1762. + fi;;
  1763. + esac
  1764. + done
  1765. +done
  1766. +;;
  1767. + esac
  1768. +
  1769. + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
  1770. + # uniformly replaced by the line number. The first 'sed' inserts a
  1771. + # line-number line before each line; the second 'sed' does the real
  1772. + # work. The second script uses 'N' to pair each line-number line
  1773. + # with the numbered line, and appends trailing '-' during
  1774. + # substitution so that $LINENO is not a special case at line end.
  1775. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
  1776. + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
  1777. + sed '=' <$as_myself |
  1778. + sed '
  1779. + N
  1780. + s,$,-,
  1781. + : loop
  1782. + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
  1783. + t loop
  1784. + s,-$,,
  1785. + s,^['$as_cr_digits']*\n,,
  1786. + ' >$as_me.lineno &&
  1787. + chmod +x $as_me.lineno ||
  1788. + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
  1789. + { (exit 1); exit 1; }; }
  1790. +
  1791. + # Don't try to exec as it changes $[0], causing all sort of problems
  1792. + # (the dirname of $[0] is not the place where we might find the
  1793. + # original and so on. Autoconf is especially sensible to this).
  1794. + . ./$as_me.lineno
  1795. + # Exit status is that of the last command.
  1796. + exit
  1797. +}
  1798. +
  1799. +
  1800. +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
  1801. + *c*,-n*) ECHO_N= ECHO_C='
  1802. +' ECHO_T=' ' ;;
  1803. + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
  1804. + *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
  1805. +esac
  1806. +
  1807. +if expr a : '\(a\)' >/dev/null 2>&1; then
  1808. + as_expr=expr
  1809. +else
  1810. + as_expr=false
  1811. +fi
  1812. +
  1813. +rm -f conf$$ conf$$.exe conf$$.file
  1814. +echo >conf$$.file
  1815. +if ln -s conf$$.file conf$$ 2>/dev/null; then
  1816. + # We could just check for DJGPP; but this test a) works b) is more generic
  1817. + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
  1818. + if test -f conf$$.exe; then
  1819. + # Don't use ln at all; we don't have any links
  1820. + as_ln_s='cp -p'
  1821. + else
  1822. + as_ln_s='ln -s'
  1823. + fi
  1824. +elif ln conf$$.file conf$$ 2>/dev/null; then
  1825. + as_ln_s=ln
  1826. +else
  1827. + as_ln_s='cp -p'
  1828. +fi
  1829. +rm -f conf$$ conf$$.exe conf$$.file
  1830. +
  1831. +if mkdir -p . 2>/dev/null; then
  1832. + as_mkdir_p=:
  1833. +else
  1834. + test -d ./-p && rmdir ./-p
  1835. + as_mkdir_p=false
  1836. +fi
  1837. +
  1838. +as_executable_p="test -f"
  1839. +
  1840. +# Sed expression to map a string onto a valid CPP name.
  1841. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
  1842. +
  1843. +# Sed expression to map a string onto a valid variable name.
  1844. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
  1845. +
  1846. +
  1847. +# IFS
  1848. +# We need space, tab and new line, in precisely that order.
  1849. +as_nl='
  1850. +'
  1851. +IFS=" $as_nl"
  1852. +
  1853. +# CDPATH.
  1854. +$as_unset CDPATH
  1855. +
  1856. +
  1857. +# Name of the host.
  1858. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
  1859. +# so uname gets run too.
  1860. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
  1861. +
  1862. +exec 6>&1
  1863. +
  1864. +#
  1865. +# Initializations.
  1866. +#
  1867. +ac_default_prefix=/usr/local
  1868. +ac_config_libobj_dir=.
  1869. +cross_compiling=no
  1870. +subdirs=
  1871. +MFLAGS=
  1872. +MAKEFLAGS=
  1873. +SHELL=${CONFIG_SHELL-/bin/sh}
  1874. +
  1875. +# Maximum number of lines to put in a shell here document.
  1876. +# This variable seems obsolete. It should probably be removed, and
  1877. +# only ac_max_sed_lines should be used.
  1878. +: ${ac_max_here_lines=38}
  1879. +
  1880. +# Identity of this package.
  1881. +PACKAGE_NAME=
  1882. +PACKAGE_TARNAME=
  1883. +PACKAGE_VERSION=
  1884. +PACKAGE_STRING=
  1885. +PACKAGE_BUGREPORT=
  1886. +
  1887. +ac_unique_file="genext2fs.c"
  1888. +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LIBOBJS LTLIBOBJS'
  1889. +ac_subst_files=''
  1890. +
  1891. +# Initialize some variables set by options.
  1892. +ac_init_help=
  1893. +ac_init_version=false
  1894. +# The variables have the same names as the options, with
  1895. +# dashes changed to underlines.
  1896. +cache_file=/dev/null
  1897. +exec_prefix=NONE
  1898. +no_create=
  1899. +no_recursion=
  1900. +prefix=NONE
  1901. +program_prefix=NONE
  1902. +program_suffix=NONE
  1903. +program_transform_name=s,x,x,
  1904. +silent=
  1905. +site=
  1906. +srcdir=
  1907. +verbose=
  1908. +x_includes=NONE
  1909. +x_libraries=NONE
  1910. +
  1911. +# Installation directory options.
  1912. +# These are left unexpanded so users can "make install exec_prefix=/foo"
  1913. +# and all the variables that are supposed to be based on exec_prefix
  1914. +# by default will actually change.
  1915. +# Use braces instead of parens because sh, perl, etc. also accept them.
  1916. +bindir='${exec_prefix}/bin'
  1917. +sbindir='${exec_prefix}/sbin'
  1918. +libexecdir='${exec_prefix}/libexec'
  1919. +datadir='${prefix}/share'
  1920. +sysconfdir='${prefix}/etc'
  1921. +sharedstatedir='${prefix}/com'
  1922. +localstatedir='${prefix}/var'
  1923. +libdir='${exec_prefix}/lib'
  1924. +includedir='${prefix}/include'
  1925. +oldincludedir='/usr/include'
  1926. +infodir='${prefix}/info'
  1927. +mandir='${prefix}/man'
  1928. +
  1929. +ac_prev=
  1930. +for ac_option
  1931. +do
  1932. + # If the previous option needs an argument, assign it.
  1933. + if test -n "$ac_prev"; then
  1934. + eval "$ac_prev=\$ac_option"
  1935. + ac_prev=
  1936. + continue
  1937. + fi
  1938. +
  1939. + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
  1940. +
  1941. + # Accept the important Cygnus configure options, so we can diagnose typos.
  1942. +
  1943. + case $ac_option in
  1944. +
  1945. + -bindir | --bindir | --bindi | --bind | --bin | --bi)
  1946. + ac_prev=bindir ;;
  1947. + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  1948. + bindir=$ac_optarg ;;
  1949. +
  1950. + -build | --build | --buil | --bui | --bu)
  1951. + ac_prev=build_alias ;;
  1952. + -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  1953. + build_alias=$ac_optarg ;;
  1954. +
  1955. + -cache-file | --cache-file | --cache-fil | --cache-fi \
  1956. + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  1957. + ac_prev=cache_file ;;
  1958. + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  1959. + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  1960. + cache_file=$ac_optarg ;;
  1961. +
  1962. + --config-cache | -C)
  1963. + cache_file=config.cache ;;
  1964. +
  1965. + -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  1966. + ac_prev=datadir ;;
  1967. + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  1968. + | --da=*)
  1969. + datadir=$ac_optarg ;;
  1970. +
  1971. + -disable-* | --disable-*)
  1972. + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
  1973. + # Reject names that are not valid shell variable names.
  1974. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
  1975. + { echo "$as_me: error: invalid feature name: $ac_feature" >&2
  1976. + { (exit 1); exit 1; }; }
  1977. + ac_feature=`echo $ac_feature | sed 's/-/_/g'`
  1978. + eval "enable_$ac_feature=no" ;;
  1979. +
  1980. + -enable-* | --enable-*)
  1981. + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
  1982. + # Reject names that are not valid shell variable names.
  1983. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
  1984. + { echo "$as_me: error: invalid feature name: $ac_feature" >&2
  1985. + { (exit 1); exit 1; }; }
  1986. + ac_feature=`echo $ac_feature | sed 's/-/_/g'`
  1987. + case $ac_option in
  1988. + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
  1989. + *) ac_optarg=yes ;;
  1990. + esac
  1991. + eval "enable_$ac_feature='$ac_optarg'" ;;
  1992. +
  1993. + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  1994. + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  1995. + | --exec | --exe | --ex)
  1996. + ac_prev=exec_prefix ;;
  1997. + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  1998. + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  1999. + | --exec=* | --exe=* | --ex=*)
  2000. + exec_prefix=$ac_optarg ;;
  2001. +
  2002. + -gas | --gas | --ga | --g)
  2003. + # Obsolete; use --with-gas.
  2004. + with_gas=yes ;;
  2005. +
  2006. + -help | --help | --hel | --he | -h)
  2007. + ac_init_help=long ;;
  2008. + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
  2009. + ac_init_help=recursive ;;
  2010. + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
  2011. + ac_init_help=short ;;
  2012. +
  2013. + -host | --host | --hos | --ho)
  2014. + ac_prev=host_alias ;;
  2015. + -host=* | --host=* | --hos=* | --ho=*)
  2016. + host_alias=$ac_optarg ;;
  2017. +
  2018. + -includedir | --includedir | --includedi | --included | --include \
  2019. + | --includ | --inclu | --incl | --inc)
  2020. + ac_prev=includedir ;;
  2021. + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  2022. + | --includ=* | --inclu=* | --incl=* | --inc=*)
  2023. + includedir=$ac_optarg ;;
  2024. +
  2025. + -infodir | --infodir | --infodi | --infod | --info | --inf)
  2026. + ac_prev=infodir ;;
  2027. + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  2028. + infodir=$ac_optarg ;;
  2029. +
  2030. + -libdir | --libdir | --libdi | --libd)
  2031. + ac_prev=libdir ;;
  2032. + -libdir=* | --libdir=* | --libdi=* | --libd=*)
  2033. + libdir=$ac_optarg ;;
  2034. +
  2035. + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  2036. + | --libexe | --libex | --libe)
  2037. + ac_prev=libexecdir ;;
  2038. + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  2039. + | --libexe=* | --libex=* | --libe=*)
  2040. + libexecdir=$ac_optarg ;;
  2041. +
  2042. + -localstatedir | --localstatedir | --localstatedi | --localstated \
  2043. + | --localstate | --localstat | --localsta | --localst \
  2044. + | --locals | --local | --loca | --loc | --lo)
  2045. + ac_prev=localstatedir ;;
  2046. + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  2047. + | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  2048. + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  2049. + localstatedir=$ac_optarg ;;
  2050. +
  2051. + -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  2052. + ac_prev=mandir ;;
  2053. + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  2054. + mandir=$ac_optarg ;;
  2055. +
  2056. + -nfp | --nfp | --nf)
  2057. + # Obsolete; use --without-fp.
  2058. + with_fp=no ;;
  2059. +
  2060. + -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  2061. + | --no-cr | --no-c | -n)
  2062. + no_create=yes ;;
  2063. +
  2064. + -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  2065. + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  2066. + no_recursion=yes ;;
  2067. +
  2068. + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  2069. + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  2070. + | --oldin | --oldi | --old | --ol | --o)
  2071. + ac_prev=oldincludedir ;;
  2072. + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  2073. + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  2074. + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  2075. + oldincludedir=$ac_optarg ;;
  2076. +
  2077. + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  2078. + ac_prev=prefix ;;
  2079. + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  2080. + prefix=$ac_optarg ;;
  2081. +
  2082. + -program-prefix | --program-prefix | --program-prefi | --program-pref \
  2083. + | --program-pre | --program-pr | --program-p)
  2084. + ac_prev=program_prefix ;;
  2085. + -program-prefix=* | --program-prefix=* | --program-prefi=* \
  2086. + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  2087. + program_prefix=$ac_optarg ;;
  2088. +
  2089. + -program-suffix | --program-suffix | --program-suffi | --program-suff \
  2090. + | --program-suf | --program-su | --program-s)
  2091. + ac_prev=program_suffix ;;
  2092. + -program-suffix=* | --program-suffix=* | --program-suffi=* \
  2093. + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  2094. + program_suffix=$ac_optarg ;;
  2095. +
  2096. + -program-transform-name | --program-transform-name \
  2097. + | --program-transform-nam | --program-transform-na \
  2098. + | --program-transform-n | --program-transform- \
  2099. + | --program-transform | --program-transfor \
  2100. + | --program-transfo | --program-transf \
  2101. + | --program-trans | --program-tran \
  2102. + | --progr-tra | --program-tr | --program-t)
  2103. + ac_prev=program_transform_name ;;
  2104. + -program-transform-name=* | --program-transform-name=* \
  2105. + | --program-transform-nam=* | --program-transform-na=* \
  2106. + | --program-transform-n=* | --program-transform-=* \
  2107. + | --program-transform=* | --program-transfor=* \
  2108. + | --program-transfo=* | --program-transf=* \
  2109. + | --program-trans=* | --program-tran=* \
  2110. + | --progr-tra=* | --program-tr=* | --program-t=*)
  2111. + program_transform_name=$ac_optarg ;;
  2112. +
  2113. + -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  2114. + | -silent | --silent | --silen | --sile | --sil)
  2115. + silent=yes ;;
  2116. +
  2117. + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  2118. + ac_prev=sbindir ;;
  2119. + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  2120. + | --sbi=* | --sb=*)
  2121. + sbindir=$ac_optarg ;;
  2122. +
  2123. + -sharedstatedir | --sharedstatedir | --sharedstatedi \
  2124. + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  2125. + | --sharedst | --shareds | --shared | --share | --shar \
  2126. + | --sha | --sh)
  2127. + ac_prev=sharedstatedir ;;
  2128. + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  2129. + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  2130. + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  2131. + | --sha=* | --sh=*)
  2132. + sharedstatedir=$ac_optarg ;;
  2133. +
  2134. + -site | --site | --sit)
  2135. + ac_prev=site ;;
  2136. + -site=* | --site=* | --sit=*)
  2137. + site=$ac_optarg ;;
  2138. +
  2139. + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  2140. + ac_prev=srcdir ;;
  2141. + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  2142. + srcdir=$ac_optarg ;;
  2143. +
  2144. + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  2145. + | --syscon | --sysco | --sysc | --sys | --sy)
  2146. + ac_prev=sysconfdir ;;
  2147. + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  2148. + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  2149. + sysconfdir=$ac_optarg ;;
  2150. +
  2151. + -target | --target | --targe | --targ | --tar | --ta | --t)
  2152. + ac_prev=target_alias ;;
  2153. + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  2154. + target_alias=$ac_optarg ;;
  2155. +
  2156. + -v | -verbose | --verbose | --verbos | --verbo | --verb)
  2157. + verbose=yes ;;
  2158. +
  2159. + -version | --version | --versio | --versi | --vers | -V)
  2160. + ac_init_version=: ;;
  2161. +
  2162. + -with-* | --with-*)
  2163. + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
  2164. + # Reject names that are not valid shell variable names.
  2165. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
  2166. + { echo "$as_me: error: invalid package name: $ac_package" >&2
  2167. + { (exit 1); exit 1; }; }
  2168. + ac_package=`echo $ac_package| sed 's/-/_/g'`
  2169. + case $ac_option in
  2170. + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
  2171. + *) ac_optarg=yes ;;
  2172. + esac
  2173. + eval "with_$ac_package='$ac_optarg'" ;;
  2174. +
  2175. + -without-* | --without-*)
  2176. + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
  2177. + # Reject names that are not valid shell variable names.
  2178. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
  2179. + { echo "$as_me: error: invalid package name: $ac_package" >&2
  2180. + { (exit 1); exit 1; }; }
  2181. + ac_package=`echo $ac_package | sed 's/-/_/g'`
  2182. + eval "with_$ac_package=no" ;;
  2183. +
  2184. + --x)
  2185. + # Obsolete; use --with-x.
  2186. + with_x=yes ;;
  2187. +
  2188. + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  2189. + | --x-incl | --x-inc | --x-in | --x-i)
  2190. + ac_prev=x_includes ;;
  2191. + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  2192. + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  2193. + x_includes=$ac_optarg ;;
  2194. +
  2195. + -x-libraries | --x-libraries | --x-librarie | --x-librari \
  2196. + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  2197. + ac_prev=x_libraries ;;
  2198. + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  2199. + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  2200. + x_libraries=$ac_optarg ;;
  2201. +
  2202. + -*) { echo "$as_me: error: unrecognized option: $ac_option
  2203. +Try \`$0 --help' for more information." >&2
  2204. + { (exit 1); exit 1; }; }
  2205. + ;;
  2206. +
  2207. + *=*)
  2208. + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
  2209. + # Reject names that are not valid shell variable names.
  2210. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
  2211. + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
  2212. + { (exit 1); exit 1; }; }
  2213. + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
  2214. + eval "$ac_envvar='$ac_optarg'"
  2215. + export $ac_envvar ;;
  2216. +
  2217. + *)
  2218. + # FIXME: should be removed in autoconf 3.0.
  2219. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2
  2220. + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
  2221. + echo "$as_me: WARNING: invalid host type: $ac_option" >&2
  2222. + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
  2223. + ;;
  2224. +
  2225. + esac
  2226. +done
  2227. +
  2228. +if test -n "$ac_prev"; then
  2229. + ac_option=--`echo $ac_prev | sed 's/_/-/g'`
  2230. + { echo "$as_me: error: missing argument to $ac_option" >&2
  2231. + { (exit 1); exit 1; }; }
  2232. +fi
  2233. +
  2234. +# Be sure to have absolute paths.
  2235. +for ac_var in exec_prefix prefix
  2236. +do
  2237. + eval ac_val=$`echo $ac_var`
  2238. + case $ac_val in
  2239. + [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
  2240. + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
  2241. + { (exit 1); exit 1; }; };;
  2242. + esac
  2243. +done
  2244. +
  2245. +# Be sure to have absolute paths.
  2246. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
  2247. + localstatedir libdir includedir oldincludedir infodir mandir
  2248. +do
  2249. + eval ac_val=$`echo $ac_var`
  2250. + case $ac_val in
  2251. + [\\/$]* | ?:[\\/]* ) ;;
  2252. + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
  2253. + { (exit 1); exit 1; }; };;
  2254. + esac
  2255. +done
  2256. +
  2257. +# There might be people who depend on the old broken behavior: `$host'
  2258. +# used to hold the argument of --host etc.
  2259. +# FIXME: To remove some day.
  2260. +build=$build_alias
  2261. +host=$host_alias
  2262. +target=$target_alias
  2263. +
  2264. +# FIXME: To remove some day.
  2265. +if test "x$host_alias" != x; then
  2266. + if test "x$build_alias" = x; then
  2267. + cross_compiling=maybe
  2268. + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
  2269. + If a cross compiler is detected then cross compile mode will be used." >&2
  2270. + elif test "x$build_alias" != "x$host_alias"; then
  2271. + cross_compiling=yes
  2272. + fi
  2273. +fi
  2274. +
  2275. +ac_tool_prefix=
  2276. +test -n "$host_alias" && ac_tool_prefix=$host_alias-
  2277. +
  2278. +test "$silent" = yes && exec 6>/dev/null
  2279. +
  2280. +
  2281. +# Find the source files, if location was not specified.
  2282. +if test -z "$srcdir"; then
  2283. + ac_srcdir_defaulted=yes
  2284. + # Try the directory containing this script, then its parent.
  2285. + ac_confdir=`(dirname "$0") 2>/dev/null ||
  2286. +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  2287. + X"$0" : 'X\(//\)[^/]' \| \
  2288. + X"$0" : 'X\(//\)$' \| \
  2289. + X"$0" : 'X\(/\)' \| \
  2290. + . : '\(.\)' 2>/dev/null ||
  2291. +echo X"$0" |
  2292. + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  2293. + /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  2294. + /^X\(\/\/\)$/{ s//\1/; q; }
  2295. + /^X\(\/\).*/{ s//\1/; q; }
  2296. + s/.*/./; q'`
  2297. + srcdir=$ac_confdir
  2298. + if test ! -r $srcdir/$ac_unique_file; then
  2299. + srcdir=..
  2300. + fi
  2301. +else
  2302. + ac_srcdir_defaulted=no
  2303. +fi
  2304. +if test ! -r $srcdir/$ac_unique_file; then
  2305. + if test "$ac_srcdir_defaulted" = yes; then
  2306. + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
  2307. + { (exit 1); exit 1; }; }
  2308. + else
  2309. + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
  2310. + { (exit 1); exit 1; }; }
  2311. + fi
  2312. +fi
  2313. +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
  2314. + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
  2315. + { (exit 1); exit 1; }; }
  2316. +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
  2317. +ac_env_build_alias_set=${build_alias+set}
  2318. +ac_env_build_alias_value=$build_alias
  2319. +ac_cv_env_build_alias_set=${build_alias+set}
  2320. +ac_cv_env_build_alias_value=$build_alias
  2321. +ac_env_host_alias_set=${host_alias+set}
  2322. +ac_env_host_alias_value=$host_alias
  2323. +ac_cv_env_host_alias_set=${host_alias+set}
  2324. +ac_cv_env_host_alias_value=$host_alias
  2325. +ac_env_target_alias_set=${target_alias+set}
  2326. +ac_env_target_alias_value=$target_alias
  2327. +ac_cv_env_target_alias_set=${target_alias+set}
  2328. +ac_cv_env_target_alias_value=$target_alias
  2329. +ac_env_CC_set=${CC+set}
  2330. +ac_env_CC_value=$CC
  2331. +ac_cv_env_CC_set=${CC+set}
  2332. +ac_cv_env_CC_value=$CC
  2333. +ac_env_CFLAGS_set=${CFLAGS+set}
  2334. +ac_env_CFLAGS_value=$CFLAGS
  2335. +ac_cv_env_CFLAGS_set=${CFLAGS+set}
  2336. +ac_cv_env_CFLAGS_value=$CFLAGS
  2337. +ac_env_LDFLAGS_set=${LDFLAGS+set}
  2338. +ac_env_LDFLAGS_value=$LDFLAGS
  2339. +ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
  2340. +ac_cv_env_LDFLAGS_value=$LDFLAGS
  2341. +ac_env_CPPFLAGS_set=${CPPFLAGS+set}
  2342. +ac_env_CPPFLAGS_value=$CPPFLAGS
  2343. +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
  2344. +ac_cv_env_CPPFLAGS_value=$CPPFLAGS
  2345. +
  2346. +#
  2347. +# Report the --help message.
  2348. +#
  2349. +if test "$ac_init_help" = "long"; then
  2350. + # Omit some internal or obsolete options to make the list less imposing.
  2351. + # This message is too long to be a string in the A/UX 3.1 sh.
  2352. + cat <<_ACEOF
  2353. +\`configure' configures this package to adapt to many kinds of systems.
  2354. +
  2355. +Usage: $0 [OPTION]... [VAR=VALUE]...
  2356. +
  2357. +To assign environment variables (e.g., CC, CFLAGS...), specify them as
  2358. +VAR=VALUE. See below for descriptions of some of the useful variables.
  2359. +
  2360. +Defaults for the options are specified in brackets.
  2361. +
  2362. +Configuration:
  2363. + -h, --help display this help and exit
  2364. + --help=short display options specific to this package
  2365. + --help=recursive display the short help of all the included packages
  2366. + -V, --version display version information and exit
  2367. + -q, --quiet, --silent do not print \`checking...' messages
  2368. + --cache-file=FILE cache test results in FILE [disabled]
  2369. + -C, --config-cache alias for \`--cache-file=config.cache'
  2370. + -n, --no-create do not create output files
  2371. + --srcdir=DIR find the sources in DIR [configure dir or \`..']
  2372. +
  2373. +_ACEOF
  2374. +
  2375. + cat <<_ACEOF
  2376. +Installation directories:
  2377. + --prefix=PREFIX install architecture-independent files in PREFIX
  2378. + [$ac_default_prefix]
  2379. + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
  2380. + [PREFIX]
  2381. +
  2382. +By default, \`make install' will install all the files in
  2383. +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
  2384. +an installation prefix other than \`$ac_default_prefix' using \`--prefix',
  2385. +for instance \`--prefix=\$HOME'.
  2386. +
  2387. +For better control, use the options below.
  2388. +
  2389. +Fine tuning of the installation directories:
  2390. + --bindir=DIR user executables [EPREFIX/bin]
  2391. + --sbindir=DIR system admin executables [EPREFIX/sbin]
  2392. + --libexecdir=DIR program executables [EPREFIX/libexec]
  2393. + --datadir=DIR read-only architecture-independent data [PREFIX/share]
  2394. + --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
  2395. + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
  2396. + --localstatedir=DIR modifiable single-machine data [PREFIX/var]
  2397. + --libdir=DIR object code libraries [EPREFIX/lib]
  2398. + --includedir=DIR C header files [PREFIX/include]
  2399. + --oldincludedir=DIR C header files for non-gcc [/usr/include]
  2400. + --infodir=DIR info documentation [PREFIX/info]
  2401. + --mandir=DIR man documentation [PREFIX/man]
  2402. +_ACEOF
  2403. +
  2404. + cat <<\_ACEOF
  2405. +
  2406. +Program names:
  2407. + --program-prefix=PREFIX prepend PREFIX to installed program names
  2408. + --program-suffix=SUFFIX append SUFFIX to installed program names
  2409. + --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  2410. +_ACEOF
  2411. +fi
  2412. +
  2413. +if test -n "$ac_init_help"; then
  2414. +
  2415. + cat <<\_ACEOF
  2416. +
  2417. +Optional Features:
  2418. + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
  2419. + --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
  2420. + --disable-dependency-tracking speeds up one-time build
  2421. + --enable-dependency-tracking do not reject slow dependency extractors
  2422. +
  2423. +Some influential environment variables:
  2424. + CC C compiler command
  2425. + CFLAGS C compiler flags
  2426. + LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
  2427. + nonstandard directory <lib dir>
  2428. + CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
  2429. + headers in a nonstandard directory <include dir>
  2430. +
  2431. +Use these variables to override the choices made by `configure' or to help
  2432. +it to find libraries and programs with nonstandard names/locations.
  2433. +
  2434. +_ACEOF
  2435. +fi
  2436. +
  2437. +if test "$ac_init_help" = "recursive"; then
  2438. + # If there are subdirs, report their specific --help.
  2439. + ac_popdir=`pwd`
  2440. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
  2441. + test -d $ac_dir || continue
  2442. + ac_builddir=.
  2443. +
  2444. +if test "$ac_dir" != .; then
  2445. + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
  2446. + # A "../" for each directory in $ac_dir_suffix.
  2447. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
  2448. +else
  2449. + ac_dir_suffix= ac_top_builddir=
  2450. +fi
  2451. +
  2452. +case $srcdir in
  2453. + .) # No --srcdir option. We are building in place.
  2454. + ac_srcdir=.
  2455. + if test -z "$ac_top_builddir"; then
  2456. + ac_top_srcdir=.
  2457. + else
  2458. + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
  2459. + fi ;;
  2460. + [\\/]* | ?:[\\/]* ) # Absolute path.
  2461. + ac_srcdir=$srcdir$ac_dir_suffix;
  2462. + ac_top_srcdir=$srcdir ;;
  2463. + *) # Relative path.
  2464. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
  2465. + ac_top_srcdir=$ac_top_builddir$srcdir ;;
  2466. +esac
  2467. +
  2468. +# Do not use `cd foo && pwd` to compute absolute paths, because
  2469. +# the directories may not exist.
  2470. +case `pwd` in
  2471. +.) ac_abs_builddir="$ac_dir";;
  2472. +*)
  2473. + case "$ac_dir" in
  2474. + .) ac_abs_builddir=`pwd`;;
  2475. + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
  2476. + *) ac_abs_builddir=`pwd`/"$ac_dir";;
  2477. + esac;;
  2478. +esac
  2479. +case $ac_abs_builddir in
  2480. +.) ac_abs_top_builddir=${ac_top_builddir}.;;
  2481. +*)
  2482. + case ${ac_top_builddir}. in
  2483. + .) ac_abs_top_builddir=$ac_abs_builddir;;
  2484. + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
  2485. + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
  2486. + esac;;
  2487. +esac
  2488. +case $ac_abs_builddir in
  2489. +.) ac_abs_srcdir=$ac_srcdir;;
  2490. +*)
  2491. + case $ac_srcdir in
  2492. + .) ac_abs_srcdir=$ac_abs_builddir;;
  2493. + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
  2494. + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
  2495. + esac;;
  2496. +esac
  2497. +case $ac_abs_builddir in
  2498. +.) ac_abs_top_srcdir=$ac_top_srcdir;;
  2499. +*)
  2500. + case $ac_top_srcdir in
  2501. + .) ac_abs_top_srcdir=$ac_abs_builddir;;
  2502. + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
  2503. + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
  2504. + esac;;
  2505. +esac
  2506. +
  2507. + cd $ac_dir
  2508. + # Check for guested configure; otherwise get Cygnus style configure.
  2509. + if test -f $ac_srcdir/configure.gnu; then
  2510. + echo
  2511. + $SHELL $ac_srcdir/configure.gnu --help=recursive
  2512. + elif test -f $ac_srcdir/configure; then
  2513. + echo
  2514. + $SHELL $ac_srcdir/configure --help=recursive
  2515. + elif test -f $ac_srcdir/configure.ac ||
  2516. + test -f $ac_srcdir/configure.in; then
  2517. + echo
  2518. + $ac_configure --help
  2519. + else
  2520. + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
  2521. + fi
  2522. + cd "$ac_popdir"
  2523. + done
  2524. +fi
  2525. +
  2526. +test -n "$ac_init_help" && exit 0
  2527. +if $ac_init_version; then
  2528. + cat <<\_ACEOF
  2529. +
  2530. +Copyright (C) 2003 Free Software Foundation, Inc.
  2531. +This configure script is free software; the Free Software Foundation
  2532. +gives unlimited permission to copy, distribute and modify it.
  2533. +_ACEOF
  2534. + exit 0
  2535. +fi
  2536. +exec 5>config.log
  2537. +cat >&5 <<_ACEOF
  2538. +This file contains any messages produced by compilers while
  2539. +running configure, to aid debugging if configure makes a mistake.
  2540. +
  2541. +It was created by $as_me, which was
  2542. +generated by GNU Autoconf 2.59. Invocation command line was
  2543. +
  2544. + $ $0 $@
  2545. +
  2546. +_ACEOF
  2547. +{
  2548. +cat <<_ASUNAME
  2549. +## --------- ##
  2550. +## Platform. ##
  2551. +## --------- ##
  2552. +
  2553. +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
  2554. +uname -m = `(uname -m) 2>/dev/null || echo unknown`
  2555. +uname -r = `(uname -r) 2>/dev/null || echo unknown`
  2556. +uname -s = `(uname -s) 2>/dev/null || echo unknown`
  2557. +uname -v = `(uname -v) 2>/dev/null || echo unknown`
  2558. +
  2559. +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
  2560. +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
  2561. +
  2562. +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
  2563. +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
  2564. +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
  2565. +hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
  2566. +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
  2567. +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
  2568. +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
  2569. +
  2570. +_ASUNAME
  2571. +
  2572. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  2573. +for as_dir in $PATH
  2574. +do
  2575. + IFS=$as_save_IFS
  2576. + test -z "$as_dir" && as_dir=.
  2577. + echo "PATH: $as_dir"
  2578. +done
  2579. +
  2580. +} >&5
  2581. +
  2582. +cat >&5 <<_ACEOF
  2583. +
  2584. +
  2585. +## ----------- ##
  2586. +## Core tests. ##
  2587. +## ----------- ##
  2588. +
  2589. +_ACEOF
  2590. +
  2591. +
  2592. +# Keep a trace of the command line.
  2593. +# Strip out --no-create and --no-recursion so they do not pile up.
  2594. +# Strip out --silent because we don't want to record it for future runs.
  2595. +# Also quote any args containing shell meta-characters.
  2596. +# Make two passes to allow for proper duplicate-argument suppression.
  2597. +ac_configure_args=
  2598. +ac_configure_args0=
  2599. +ac_configure_args1=
  2600. +ac_sep=
  2601. +ac_must_keep_next=false
  2602. +for ac_pass in 1 2
  2603. +do
  2604. + for ac_arg
  2605. + do
  2606. + case $ac_arg in
  2607. + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
  2608. + -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  2609. + | -silent | --silent | --silen | --sile | --sil)
  2610. + continue ;;
  2611. + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
  2612. + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
  2613. + esac
  2614. + case $ac_pass in
  2615. + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
  2616. + 2)
  2617. + ac_configure_args1="$ac_configure_args1 '$ac_arg'"
  2618. + if test $ac_must_keep_next = true; then
  2619. + ac_must_keep_next=false # Got value, back to normal.
  2620. + else
  2621. + case $ac_arg in
  2622. + *=* | --config-cache | -C | -disable-* | --disable-* \
  2623. + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
  2624. + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
  2625. + | -with-* | --with-* | -without-* | --without-* | --x)
  2626. + case "$ac_configure_args0 " in
  2627. + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
  2628. + esac
  2629. + ;;
  2630. + -* ) ac_must_keep_next=true ;;
  2631. + esac
  2632. + fi
  2633. + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
  2634. + # Get rid of the leading space.
  2635. + ac_sep=" "
  2636. + ;;
  2637. + esac
  2638. + done
  2639. +done
  2640. +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
  2641. +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
  2642. +
  2643. +# When interrupted or exit'd, cleanup temporary files, and complete
  2644. +# config.log. We remove comments because anyway the quotes in there
  2645. +# would cause problems or look ugly.
  2646. +# WARNING: Be sure not to use single quotes in there, as some shells,
  2647. +# such as our DU 5.0 friend, will then `close' the trap.
  2648. +trap 'exit_status=$?
  2649. + # Save into config.log some information that might help in debugging.
  2650. + {
  2651. + echo
  2652. +
  2653. + cat <<\_ASBOX
  2654. +## ---------------- ##
  2655. +## Cache variables. ##
  2656. +## ---------------- ##
  2657. +_ASBOX
  2658. + echo
  2659. + # The following way of writing the cache mishandles newlines in values,
  2660. +{
  2661. + (set) 2>&1 |
  2662. + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
  2663. + *ac_space=\ *)
  2664. + sed -n \
  2665. + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
  2666. + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
  2667. + ;;
  2668. + *)
  2669. + sed -n \
  2670. + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
  2671. + ;;
  2672. + esac;
  2673. +}
  2674. + echo
  2675. +
  2676. + cat <<\_ASBOX
  2677. +## ----------------- ##
  2678. +## Output variables. ##
  2679. +## ----------------- ##
  2680. +_ASBOX
  2681. + echo
  2682. + for ac_var in $ac_subst_vars
  2683. + do
  2684. + eval ac_val=$`echo $ac_var`
  2685. + echo "$ac_var='"'"'$ac_val'"'"'"
  2686. + done | sort
  2687. + echo
  2688. +
  2689. + if test -n "$ac_subst_files"; then
  2690. + cat <<\_ASBOX
  2691. +## ------------- ##
  2692. +## Output files. ##
  2693. +## ------------- ##
  2694. +_ASBOX
  2695. + echo
  2696. + for ac_var in $ac_subst_files
  2697. + do
  2698. + eval ac_val=$`echo $ac_var`
  2699. + echo "$ac_var='"'"'$ac_val'"'"'"
  2700. + done | sort
  2701. + echo
  2702. + fi
  2703. +
  2704. + if test -s confdefs.h; then
  2705. + cat <<\_ASBOX
  2706. +## ----------- ##
  2707. +## confdefs.h. ##
  2708. +## ----------- ##
  2709. +_ASBOX
  2710. + echo
  2711. + sed "/^$/d" confdefs.h | sort
  2712. + echo
  2713. + fi
  2714. + test "$ac_signal" != 0 &&
  2715. + echo "$as_me: caught signal $ac_signal"
  2716. + echo "$as_me: exit $exit_status"
  2717. + } >&5
  2718. + rm -f core *.core &&
  2719. + rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
  2720. + exit $exit_status
  2721. + ' 0
  2722. +for ac_signal in 1 2 13 15; do
  2723. + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
  2724. +done
  2725. +ac_signal=0
  2726. +
  2727. +# confdefs.h avoids OS command line length limits that DEFS can exceed.
  2728. +rm -rf conftest* confdefs.h
  2729. +# AIX cpp loses on an empty file, so make sure it contains at least a newline.
  2730. +echo >confdefs.h
  2731. +
  2732. +# Predefined preprocessor variables.
  2733. +
  2734. +cat >>confdefs.h <<_ACEOF
  2735. +#define PACKAGE_NAME "$PACKAGE_NAME"
  2736. +_ACEOF
  2737. +
  2738. +
  2739. +cat >>confdefs.h <<_ACEOF
  2740. +#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
  2741. +_ACEOF
  2742. +
  2743. +
  2744. +cat >>confdefs.h <<_ACEOF
  2745. +#define PACKAGE_VERSION "$PACKAGE_VERSION"
  2746. +_ACEOF
  2747. +
  2748. +
  2749. +cat >>confdefs.h <<_ACEOF
  2750. +#define PACKAGE_STRING "$PACKAGE_STRING"
  2751. +_ACEOF
  2752. +
  2753. +
  2754. +cat >>confdefs.h <<_ACEOF
  2755. +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
  2756. +_ACEOF
  2757. +
  2758. +
  2759. +# Let the site file select an alternate cache file if it wants to.
  2760. +# Prefer explicitly selected file to automatically selected ones.
  2761. +if test -z "$CONFIG_SITE"; then
  2762. + if test "x$prefix" != xNONE; then
  2763. + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  2764. + else
  2765. + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  2766. + fi
  2767. +fi
  2768. +for ac_site_file in $CONFIG_SITE; do
  2769. + if test -r "$ac_site_file"; then
  2770. + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
  2771. +echo "$as_me: loading site script $ac_site_file" >&6;}
  2772. + sed 's/^/| /' "$ac_site_file" >&5
  2773. + . "$ac_site_file"
  2774. + fi
  2775. +done
  2776. +
  2777. +if test -r "$cache_file"; then
  2778. + # Some versions of bash will fail to source /dev/null (special
  2779. + # files actually), so we avoid doing that.
  2780. + if test -f "$cache_file"; then
  2781. + { echo "$as_me:$LINENO: loading cache $cache_file" >&5
  2782. +echo "$as_me: loading cache $cache_file" >&6;}
  2783. + case $cache_file in
  2784. + [\\/]* | ?:[\\/]* ) . $cache_file;;
  2785. + *) . ./$cache_file;;
  2786. + esac
  2787. + fi
  2788. +else
  2789. + { echo "$as_me:$LINENO: creating cache $cache_file" >&5
  2790. +echo "$as_me: creating cache $cache_file" >&6;}
  2791. + >$cache_file
  2792. +fi
  2793. +
  2794. +# Check that the precious variables saved in the cache have kept the same
  2795. +# value.
  2796. +ac_cache_corrupted=false
  2797. +for ac_var in `(set) 2>&1 |
  2798. + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
  2799. + eval ac_old_set=\$ac_cv_env_${ac_var}_set
  2800. + eval ac_new_set=\$ac_env_${ac_var}_set
  2801. + eval ac_old_val="\$ac_cv_env_${ac_var}_value"
  2802. + eval ac_new_val="\$ac_env_${ac_var}_value"
  2803. + case $ac_old_set,$ac_new_set in
  2804. + set,)
  2805. + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
  2806. +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
  2807. + ac_cache_corrupted=: ;;
  2808. + ,set)
  2809. + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
  2810. +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
  2811. + ac_cache_corrupted=: ;;
  2812. + ,);;
  2813. + *)
  2814. + if test "x$ac_old_val" != "x$ac_new_val"; then
  2815. + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
  2816. +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
  2817. + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
  2818. +echo "$as_me: former value: $ac_old_val" >&2;}
  2819. + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
  2820. +echo "$as_me: current value: $ac_new_val" >&2;}
  2821. + ac_cache_corrupted=:
  2822. + fi;;
  2823. + esac
  2824. + # Pass precious variables to config.status.
  2825. + if test "$ac_new_set" = set; then
  2826. + case $ac_new_val in
  2827. + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
  2828. + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
  2829. + *) ac_arg=$ac_var=$ac_new_val ;;
  2830. + esac
  2831. + case " $ac_configure_args " in
  2832. + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
  2833. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  2834. + esac
  2835. + fi
  2836. +done
  2837. +if $ac_cache_corrupted; then
  2838. + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
  2839. +echo "$as_me: error: changes in the environment can compromise the build" >&2;}
  2840. + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
  2841. +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
  2842. + { (exit 1); exit 1; }; }
  2843. +fi
  2844. +
  2845. +ac_ext=c
  2846. +ac_cpp='$CPP $CPPFLAGS'
  2847. +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  2848. +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  2849. +ac_compiler_gnu=$ac_cv_c_compiler_gnu
  2850. +
  2851. +
  2852. +
  2853. +
  2854. +
  2855. +
  2856. +
  2857. +
  2858. +
  2859. +
  2860. +
  2861. +
  2862. +
  2863. +
  2864. +
  2865. +
  2866. +
  2867. +
  2868. +
  2869. +am__api_version="1.8"
  2870. +ac_aux_dir=
  2871. +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  2872. + if test -f $ac_dir/install-sh; then
  2873. + ac_aux_dir=$ac_dir
  2874. + ac_install_sh="$ac_aux_dir/install-sh -c"
  2875. + break
  2876. + elif test -f $ac_dir/install.sh; then
  2877. + ac_aux_dir=$ac_dir
  2878. + ac_install_sh="$ac_aux_dir/install.sh -c"
  2879. + break
  2880. + elif test -f $ac_dir/shtool; then
  2881. + ac_aux_dir=$ac_dir
  2882. + ac_install_sh="$ac_aux_dir/shtool install -c"
  2883. + break
  2884. + fi
  2885. +done
  2886. +if test -z "$ac_aux_dir"; then
  2887. + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
  2888. +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
  2889. + { (exit 1); exit 1; }; }
  2890. +fi
  2891. +ac_config_guess="$SHELL $ac_aux_dir/config.guess"
  2892. +ac_config_sub="$SHELL $ac_aux_dir/config.sub"
  2893. +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
  2894. +
  2895. +# Find a good install program. We prefer a C program (faster),
  2896. +# so one script is as good as another. But avoid the broken or
  2897. +# incompatible versions:
  2898. +# SysV /etc/install, /usr/sbin/install
  2899. +# SunOS /usr/etc/install
  2900. +# IRIX /sbin/install
  2901. +# AIX /bin/install
  2902. +# AmigaOS /C/install, which installs bootblocks on floppy discs
  2903. +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  2904. +# AFS /usr/afsws/bin/install, which mishandles nonexistent args
  2905. +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  2906. +# OS/2's system install, which has a completely different semantic
  2907. +# ./install, which can be erroneously created by make from ./install.sh.
  2908. +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
  2909. +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
  2910. +if test -z "$INSTALL"; then
  2911. +if test "${ac_cv_path_install+set}" = set; then
  2912. + echo $ECHO_N "(cached) $ECHO_C" >&6
  2913. +else
  2914. + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  2915. +for as_dir in $PATH
  2916. +do
  2917. + IFS=$as_save_IFS
  2918. + test -z "$as_dir" && as_dir=.
  2919. + # Account for people who put trailing slashes in PATH elements.
  2920. +case $as_dir/ in
  2921. + ./ | .// | /cC/* | \
  2922. + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
  2923. + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
  2924. + /usr/ucb/* ) ;;
  2925. + *)
  2926. + # OSF1 and SCO ODT 3.0 have their own names for install.
  2927. + # Don't use installbsd from OSF since it installs stuff as root
  2928. + # by default.
  2929. + for ac_prog in ginstall scoinst install; do
  2930. + for ac_exec_ext in '' $ac_executable_extensions; do
  2931. + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
  2932. + if test $ac_prog = install &&
  2933. + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
  2934. + # AIX install. It has an incompatible calling convention.
  2935. + :
  2936. + elif test $ac_prog = install &&
  2937. + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
  2938. + # program-specific install script used by HP pwplus--don't use.
  2939. + :
  2940. + else
  2941. + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
  2942. + break 3
  2943. + fi
  2944. + fi
  2945. + done
  2946. + done
  2947. + ;;
  2948. +esac
  2949. +done
  2950. +
  2951. +
  2952. +fi
  2953. + if test "${ac_cv_path_install+set}" = set; then
  2954. + INSTALL=$ac_cv_path_install
  2955. + else
  2956. + # As a last resort, use the slow shell script. We don't cache a
  2957. + # path for INSTALL within a source directory, because that will
  2958. + # break other packages using the cache if that directory is
  2959. + # removed, or if the path is relative.
  2960. + INSTALL=$ac_install_sh
  2961. + fi
  2962. +fi
  2963. +echo "$as_me:$LINENO: result: $INSTALL" >&5
  2964. +echo "${ECHO_T}$INSTALL" >&6
  2965. +
  2966. +# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  2967. +# It thinks the first close brace ends the variable substitution.
  2968. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  2969. +
  2970. +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
  2971. +
  2972. +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  2973. +
  2974. +echo "$as_me:$LINENO: checking whether build environment is sane" >&5
  2975. +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
  2976. +# Just in case
  2977. +sleep 1
  2978. +echo timestamp > conftest.file
  2979. +# Do `set' in a subshell so we don't clobber the current shell's
  2980. +# arguments. Must try -L first in case configure is actually a
  2981. +# symlink; some systems play weird games with the mod time of symlinks
  2982. +# (eg FreeBSD returns the mod time of the symlink's containing
  2983. +# directory).
  2984. +if (
  2985. + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
  2986. + if test "$*" = "X"; then
  2987. + # -L didn't work.
  2988. + set X `ls -t $srcdir/configure conftest.file`
  2989. + fi
  2990. + rm -f conftest.file
  2991. + if test "$*" != "X $srcdir/configure conftest.file" \
  2992. + && test "$*" != "X conftest.file $srcdir/configure"; then
  2993. +
  2994. + # If neither matched, then we have a broken ls. This can happen
  2995. + # if, for instance, CONFIG_SHELL is bash and it inherits a
  2996. + # broken ls alias from the environment. This has actually
  2997. + # happened. Such a system could not be considered "sane".
  2998. + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
  2999. +alias in your environment" >&5
  3000. +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
  3001. +alias in your environment" >&2;}
  3002. + { (exit 1); exit 1; }; }
  3003. + fi
  3004. +
  3005. + test "$2" = conftest.file
  3006. + )
  3007. +then
  3008. + # Ok.
  3009. + :
  3010. +else
  3011. + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
  3012. +Check your system clock" >&5
  3013. +echo "$as_me: error: newly created file is older than distributed files!
  3014. +Check your system clock" >&2;}
  3015. + { (exit 1); exit 1; }; }
  3016. +fi
  3017. +echo "$as_me:$LINENO: result: yes" >&5
  3018. +echo "${ECHO_T}yes" >&6
  3019. +test "$program_prefix" != NONE &&
  3020. + program_transform_name="s,^,$program_prefix,;$program_transform_name"
  3021. +# Use a double $ so make ignores it.
  3022. +test "$program_suffix" != NONE &&
  3023. + program_transform_name="s,\$,$program_suffix,;$program_transform_name"
  3024. +# Double any \ or $. echo might interpret backslashes.
  3025. +# By default was `s,x,x', remove it if useless.
  3026. +cat <<\_ACEOF >conftest.sed
  3027. +s/[\\$]/&&/g;s/;s,x,x,$//
  3028. +_ACEOF
  3029. +program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
  3030. +rm conftest.sed
  3031. +
  3032. +# expand $ac_aux_dir to an absolute path
  3033. +am_aux_dir=`cd $ac_aux_dir && pwd`
  3034. +
  3035. +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
  3036. +# Use eval to expand $SHELL
  3037. +if eval "$MISSING --run true"; then
  3038. + am_missing_run="$MISSING --run "
  3039. +else
  3040. + am_missing_run=
  3041. + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
  3042. +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
  3043. +fi
  3044. +
  3045. +if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
  3046. + # Keeping the `.' argument allows $(mkdir_p) to be used without
  3047. + # argument. Indeed, we sometimes output rules like
  3048. + # $(mkdir_p) $(somedir)
  3049. + # where $(somedir) is conditionally defined.
  3050. + # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
  3051. + # expensive solution, as it forces Make to start a sub-shell.)
  3052. + mkdir_p='mkdir -p -- .'
  3053. +else
  3054. + # On NextStep and OpenStep, the `mkdir' command does not
  3055. + # recognize any option. It will interpret all options as
  3056. + # directories to create, and then abort because `.' already
  3057. + # exists.
  3058. + for d in ./-p ./--version;
  3059. + do
  3060. + test -d $d && rmdir $d
  3061. + done
  3062. + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
  3063. + if test -f "$ac_aux_dir/mkinstalldirs"; then
  3064. + mkdir_p='$(mkinstalldirs)'
  3065. + else
  3066. + mkdir_p='$(install_sh) -d'
  3067. + fi
  3068. +fi
  3069. +
  3070. +for ac_prog in gawk mawk nawk awk
  3071. +do
  3072. + # Extract the first word of "$ac_prog", so it can be a program name with args.
  3073. +set dummy $ac_prog; ac_word=$2
  3074. +echo "$as_me:$LINENO: checking for $ac_word" >&5
  3075. +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
  3076. +if test "${ac_cv_prog_AWK+set}" = set; then
  3077. + echo $ECHO_N "(cached) $ECHO_C" >&6
  3078. +else
  3079. + if test -n "$AWK"; then
  3080. + ac_cv_prog_AWK="$AWK" # Let the user override the test.
  3081. +else
  3082. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3083. +for as_dir in $PATH
  3084. +do
  3085. + IFS=$as_save_IFS
  3086. + test -z "$as_dir" && as_dir=.
  3087. + for ac_exec_ext in '' $ac_executable_extensions; do
  3088. + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  3089. + ac_cv_prog_AWK="$ac_prog"
  3090. + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
  3091. + break 2
  3092. + fi
  3093. +done
  3094. +done
  3095. +
  3096. +fi
  3097. +fi
  3098. +AWK=$ac_cv_prog_AWK
  3099. +if test -n "$AWK"; then
  3100. + echo "$as_me:$LINENO: result: $AWK" >&5
  3101. +echo "${ECHO_T}$AWK" >&6
  3102. +else
  3103. + echo "$as_me:$LINENO: result: no" >&5
  3104. +echo "${ECHO_T}no" >&6
  3105. +fi
  3106. +
  3107. + test -n "$AWK" && break
  3108. +done
  3109. +
  3110. +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
  3111. +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
  3112. +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
  3113. +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
  3114. + echo $ECHO_N "(cached) $ECHO_C" >&6
  3115. +else
  3116. + cat >conftest.make <<\_ACEOF
  3117. +all:
  3118. + @echo 'ac_maketemp="$(MAKE)"'
  3119. +_ACEOF
  3120. +# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  3121. +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
  3122. +if test -n "$ac_maketemp"; then
  3123. + eval ac_cv_prog_make_${ac_make}_set=yes
  3124. +else
  3125. + eval ac_cv_prog_make_${ac_make}_set=no
  3126. +fi
  3127. +rm -f conftest.make
  3128. +fi
  3129. +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  3130. + echo "$as_me:$LINENO: result: yes" >&5
  3131. +echo "${ECHO_T}yes" >&6
  3132. + SET_MAKE=
  3133. +else
  3134. + echo "$as_me:$LINENO: result: no" >&5
  3135. +echo "${ECHO_T}no" >&6
  3136. + SET_MAKE="MAKE=${MAKE-make}"
  3137. +fi
  3138. +
  3139. +rm -rf .tst 2>/dev/null
  3140. +mkdir .tst 2>/dev/null
  3141. +if test -d .tst; then
  3142. + am__leading_dot=.
  3143. +else
  3144. + am__leading_dot=_
  3145. +fi
  3146. +rmdir .tst 2>/dev/null
  3147. +
  3148. +# test to see if srcdir already configured
  3149. +if test "`cd $srcdir && pwd`" != "`pwd`" &&
  3150. + test -f $srcdir/config.status; then
  3151. + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
  3152. +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
  3153. + { (exit 1); exit 1; }; }
  3154. +fi
  3155. +
  3156. +# test whether we have cygpath
  3157. +if test -z "$CYGPATH_W"; then
  3158. + if (cygpath --version) >/dev/null 2>/dev/null; then
  3159. + CYGPATH_W='cygpath -w'
  3160. + else
  3161. + CYGPATH_W=echo
  3162. + fi
  3163. +fi
  3164. +
  3165. +
  3166. +# Define the identity of the package.
  3167. + PACKAGE=genext2fs
  3168. + VERSION=1.3
  3169. +
  3170. +
  3171. +cat >>confdefs.h <<_ACEOF
  3172. +#define PACKAGE "$PACKAGE"
  3173. +_ACEOF
  3174. +
  3175. +
  3176. +cat >>confdefs.h <<_ACEOF
  3177. +#define VERSION "$VERSION"
  3178. +_ACEOF
  3179. +
  3180. +# Some tools Automake needs.
  3181. +
  3182. +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
  3183. +
  3184. +
  3185. +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
  3186. +
  3187. +
  3188. +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
  3189. +
  3190. +
  3191. +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
  3192. +
  3193. +
  3194. +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
  3195. +
  3196. +
  3197. +AMTAR=${AMTAR-"${am_missing_run}tar"}
  3198. +
  3199. +install_sh=${install_sh-"$am_aux_dir/install-sh"}
  3200. +
  3201. +# Installed binaries are usually stripped using `strip' when the user
  3202. +# run `make install-strip'. However `strip' might not be the right
  3203. +# tool to use in cross-compilation environments, therefore Automake
  3204. +# will honor the `STRIP' environment variable to overrule this program.
  3205. +if test "$cross_compiling" != no; then
  3206. + if test -n "$ac_tool_prefix"; then
  3207. + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
  3208. +set dummy ${ac_tool_prefix}strip; ac_word=$2
  3209. +echo "$as_me:$LINENO: checking for $ac_word" >&5
  3210. +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
  3211. +if test "${ac_cv_prog_STRIP+set}" = set; then
  3212. + echo $ECHO_N "(cached) $ECHO_C" >&6
  3213. +else
  3214. + if test -n "$STRIP"; then
  3215. + ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
  3216. +else
  3217. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3218. +for as_dir in $PATH
  3219. +do
  3220. + IFS=$as_save_IFS
  3221. + test -z "$as_dir" && as_dir=.
  3222. + for ac_exec_ext in '' $ac_executable_extensions; do
  3223. + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  3224. + ac_cv_prog_STRIP="${ac_tool_prefix}strip"
  3225. + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
  3226. + break 2
  3227. + fi
  3228. +done
  3229. +done
  3230. +
  3231. +fi
  3232. +fi
  3233. +STRIP=$ac_cv_prog_STRIP
  3234. +if test -n "$STRIP"; then
  3235. + echo "$as_me:$LINENO: result: $STRIP" >&5
  3236. +echo "${ECHO_T}$STRIP" >&6
  3237. +else
  3238. + echo "$as_me:$LINENO: result: no" >&5
  3239. +echo "${ECHO_T}no" >&6
  3240. +fi
  3241. +
  3242. +fi
  3243. +if test -z "$ac_cv_prog_STRIP"; then
  3244. + ac_ct_STRIP=$STRIP
  3245. + # Extract the first word of "strip", so it can be a program name with args.
  3246. +set dummy strip; ac_word=$2
  3247. +echo "$as_me:$LINENO: checking for $ac_word" >&5
  3248. +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
  3249. +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
  3250. + echo $ECHO_N "(cached) $ECHO_C" >&6
  3251. +else
  3252. + if test -n "$ac_ct_STRIP"; then
  3253. + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
  3254. +else
  3255. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3256. +for as_dir in $PATH
  3257. +do
  3258. + IFS=$as_save_IFS
  3259. + test -z "$as_dir" && as_dir=.
  3260. + for ac_exec_ext in '' $ac_executable_extensions; do
  3261. + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  3262. + ac_cv_prog_ac_ct_STRIP="strip"
  3263. + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
  3264. + break 2
  3265. + fi
  3266. +done
  3267. +done
  3268. +
  3269. + test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
  3270. +fi
  3271. +fi
  3272. +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
  3273. +if test -n "$ac_ct_STRIP"; then
  3274. + echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
  3275. +echo "${ECHO_T}$ac_ct_STRIP" >&6
  3276. +else
  3277. + echo "$as_me:$LINENO: result: no" >&5
  3278. +echo "${ECHO_T}no" >&6
  3279. +fi
  3280. +
  3281. + STRIP=$ac_ct_STRIP
  3282. +else
  3283. + STRIP="$ac_cv_prog_STRIP"
  3284. +fi
  3285. +
  3286. +fi
  3287. +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
  3288. +
  3289. +# We need awk for the "check" target. The system "awk" is bad on
  3290. +# some platforms.
  3291. +
  3292. +
  3293. +
  3294. +ac_ext=c
  3295. +ac_cpp='$CPP $CPPFLAGS'
  3296. +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  3297. +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  3298. +ac_compiler_gnu=$ac_cv_c_compiler_gnu
  3299. +if test -n "$ac_tool_prefix"; then
  3300. + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
  3301. +set dummy ${ac_tool_prefix}gcc; ac_word=$2
  3302. +echo "$as_me:$LINENO: checking for $ac_word" >&5
  3303. +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
  3304. +if test "${ac_cv_prog_CC+set}" = set; then
  3305. + echo $ECHO_N "(cached) $ECHO_C" >&6
  3306. +else
  3307. + if test -n "$CC"; then
  3308. + ac_cv_prog_CC="$CC" # Let the user override the test.
  3309. +else
  3310. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3311. +for as_dir in $PATH
  3312. +do
  3313. + IFS=$as_save_IFS
  3314. + test -z "$as_dir" && as_dir=.
  3315. + for ac_exec_ext in '' $ac_executable_extensions; do
  3316. + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  3317. + ac_cv_prog_CC="${ac_tool_prefix}gcc"
  3318. + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
  3319. + break 2
  3320. + fi
  3321. +done
  3322. +done
  3323. +
  3324. +fi
  3325. +fi
  3326. +CC=$ac_cv_prog_CC
  3327. +if test -n "$CC"; then
  3328. + echo "$as_me:$LINENO: result: $CC" >&5
  3329. +echo "${ECHO_T}$CC" >&6
  3330. +else
  3331. + echo "$as_me:$LINENO: result: no" >&5
  3332. +echo "${ECHO_T}no" >&6
  3333. +fi
  3334. +
  3335. +fi
  3336. +if test -z "$ac_cv_prog_CC"; then
  3337. + ac_ct_CC=$CC
  3338. + # Extract the first word of "gcc", so it can be a program name with args.
  3339. +set dummy gcc; ac_word=$2
  3340. +echo "$as_me:$LINENO: checking for $ac_word" >&5
  3341. +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
  3342. +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  3343. + echo $ECHO_N "(cached) $ECHO_C" >&6
  3344. +else
  3345. + if test -n "$ac_ct_CC"; then
  3346. + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
  3347. +else
  3348. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3349. +for as_dir in $PATH
  3350. +do
  3351. + IFS=$as_save_IFS
  3352. + test -z "$as_dir" && as_dir=.
  3353. + for ac_exec_ext in '' $ac_executable_extensions; do
  3354. + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  3355. + ac_cv_prog_ac_ct_CC="gcc"
  3356. + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
  3357. + break 2
  3358. + fi
  3359. +done
  3360. +done
  3361. +
  3362. +fi
  3363. +fi
  3364. +ac_ct_CC=$ac_cv_prog_ac_ct_CC
  3365. +if test -n "$ac_ct_CC"; then
  3366. + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
  3367. +echo "${ECHO_T}$ac_ct_CC" >&6
  3368. +else
  3369. + echo "$as_me:$LINENO: result: no" >&5
  3370. +echo "${ECHO_T}no" >&6
  3371. +fi
  3372. +
  3373. + CC=$ac_ct_CC
  3374. +else
  3375. + CC="$ac_cv_prog_CC"
  3376. +fi
  3377. +
  3378. +if test -z "$CC"; then
  3379. + if test -n "$ac_tool_prefix"; then
  3380. + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
  3381. +set dummy ${ac_tool_prefix}cc; ac_word=$2
  3382. +echo "$as_me:$LINENO: checking for $ac_word" >&5
  3383. +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
  3384. +if test "${ac_cv_prog_CC+set}" = set; then
  3385. + echo $ECHO_N "(cached) $ECHO_C" >&6
  3386. +else
  3387. + if test -n "$CC"; then
  3388. + ac_cv_prog_CC="$CC" # Let the user override the test.
  3389. +else
  3390. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3391. +for as_dir in $PATH
  3392. +do
  3393. + IFS=$as_save_IFS
  3394. + test -z "$as_dir" && as_dir=.
  3395. + for ac_exec_ext in '' $ac_executable_extensions; do
  3396. + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  3397. + ac_cv_prog_CC="${ac_tool_prefix}cc"
  3398. + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
  3399. + break 2
  3400. + fi
  3401. +done
  3402. +done
  3403. +
  3404. +fi
  3405. +fi
  3406. +CC=$ac_cv_prog_CC
  3407. +if test -n "$CC"; then
  3408. + echo "$as_me:$LINENO: result: $CC" >&5
  3409. +echo "${ECHO_T}$CC" >&6
  3410. +else
  3411. + echo "$as_me:$LINENO: result: no" >&5
  3412. +echo "${ECHO_T}no" >&6
  3413. +fi
  3414. +
  3415. +fi
  3416. +if test -z "$ac_cv_prog_CC"; then
  3417. + ac_ct_CC=$CC
  3418. + # Extract the first word of "cc", so it can be a program name with args.
  3419. +set dummy cc; ac_word=$2
  3420. +echo "$as_me:$LINENO: checking for $ac_word" >&5
  3421. +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
  3422. +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  3423. + echo $ECHO_N "(cached) $ECHO_C" >&6
  3424. +else
  3425. + if test -n "$ac_ct_CC"; then
  3426. + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
  3427. +else
  3428. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3429. +for as_dir in $PATH
  3430. +do
  3431. + IFS=$as_save_IFS
  3432. + test -z "$as_dir" && as_dir=.
  3433. + for ac_exec_ext in '' $ac_executable_extensions; do
  3434. + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  3435. + ac_cv_prog_ac_ct_CC="cc"
  3436. + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
  3437. + break 2
  3438. + fi
  3439. +done
  3440. +done
  3441. +
  3442. +fi
  3443. +fi
  3444. +ac_ct_CC=$ac_cv_prog_ac_ct_CC
  3445. +if test -n "$ac_ct_CC"; then
  3446. + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
  3447. +echo "${ECHO_T}$ac_ct_CC" >&6
  3448. +else
  3449. + echo "$as_me:$LINENO: result: no" >&5
  3450. +echo "${ECHO_T}no" >&6
  3451. +fi
  3452. +
  3453. + CC=$ac_ct_CC
  3454. +else
  3455. + CC="$ac_cv_prog_CC"
  3456. +fi
  3457. +
  3458. +fi
  3459. +if test -z "$CC"; then
  3460. + # Extract the first word of "cc", so it can be a program name with args.
  3461. +set dummy cc; ac_word=$2
  3462. +echo "$as_me:$LINENO: checking for $ac_word" >&5
  3463. +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
  3464. +if test "${ac_cv_prog_CC+set}" = set; then
  3465. + echo $ECHO_N "(cached) $ECHO_C" >&6
  3466. +else
  3467. + if test -n "$CC"; then
  3468. + ac_cv_prog_CC="$CC" # Let the user override the test.
  3469. +else
  3470. + ac_prog_rejected=no
  3471. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3472. +for as_dir in $PATH
  3473. +do
  3474. + IFS=$as_save_IFS
  3475. + test -z "$as_dir" && as_dir=.
  3476. + for ac_exec_ext in '' $ac_executable_extensions; do
  3477. + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  3478. + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
  3479. + ac_prog_rejected=yes
  3480. + continue
  3481. + fi
  3482. + ac_cv_prog_CC="cc"
  3483. + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
  3484. + break 2
  3485. + fi
  3486. +done
  3487. +done
  3488. +
  3489. +if test $ac_prog_rejected = yes; then
  3490. + # We found a bogon in the path, so make sure we never use it.
  3491. + set dummy $ac_cv_prog_CC
  3492. + shift
  3493. + if test $# != 0; then
  3494. + # We chose a different compiler from the bogus one.
  3495. + # However, it has the same basename, so the bogon will be chosen
  3496. + # first if we set CC to just the basename; use the full file name.
  3497. + shift
  3498. + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
  3499. + fi
  3500. +fi
  3501. +fi
  3502. +fi
  3503. +CC=$ac_cv_prog_CC
  3504. +if test -n "$CC"; then
  3505. + echo "$as_me:$LINENO: result: $CC" >&5
  3506. +echo "${ECHO_T}$CC" >&6
  3507. +else
  3508. + echo "$as_me:$LINENO: result: no" >&5
  3509. +echo "${ECHO_T}no" >&6
  3510. +fi
  3511. +
  3512. +fi
  3513. +if test -z "$CC"; then
  3514. + if test -n "$ac_tool_prefix"; then
  3515. + for ac_prog in cl
  3516. + do
  3517. + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
  3518. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2
  3519. +echo "$as_me:$LINENO: checking for $ac_word" >&5
  3520. +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
  3521. +if test "${ac_cv_prog_CC+set}" = set; then
  3522. + echo $ECHO_N "(cached) $ECHO_C" >&6
  3523. +else
  3524. + if test -n "$CC"; then
  3525. + ac_cv_prog_CC="$CC" # Let the user override the test.
  3526. +else
  3527. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3528. +for as_dir in $PATH
  3529. +do
  3530. + IFS=$as_save_IFS
  3531. + test -z "$as_dir" && as_dir=.
  3532. + for ac_exec_ext in '' $ac_executable_extensions; do
  3533. + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  3534. + ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
  3535. + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
  3536. + break 2
  3537. + fi
  3538. +done
  3539. +done
  3540. +
  3541. +fi
  3542. +fi
  3543. +CC=$ac_cv_prog_CC
  3544. +if test -n "$CC"; then
  3545. + echo "$as_me:$LINENO: result: $CC" >&5
  3546. +echo "${ECHO_T}$CC" >&6
  3547. +else
  3548. + echo "$as_me:$LINENO: result: no" >&5
  3549. +echo "${ECHO_T}no" >&6
  3550. +fi
  3551. +
  3552. + test -n "$CC" && break
  3553. + done
  3554. +fi
  3555. +if test -z "$CC"; then
  3556. + ac_ct_CC=$CC
  3557. + for ac_prog in cl
  3558. +do
  3559. + # Extract the first word of "$ac_prog", so it can be a program name with args.
  3560. +set dummy $ac_prog; ac_word=$2
  3561. +echo "$as_me:$LINENO: checking for $ac_word" >&5
  3562. +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
  3563. +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  3564. + echo $ECHO_N "(cached) $ECHO_C" >&6
  3565. +else
  3566. + if test -n "$ac_ct_CC"; then
  3567. + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
  3568. +else
  3569. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3570. +for as_dir in $PATH
  3571. +do
  3572. + IFS=$as_save_IFS
  3573. + test -z "$as_dir" && as_dir=.
  3574. + for ac_exec_ext in '' $ac_executable_extensions; do
  3575. + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  3576. + ac_cv_prog_ac_ct_CC="$ac_prog"
  3577. + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
  3578. + break 2
  3579. + fi
  3580. +done
  3581. +done
  3582. +
  3583. +fi
  3584. +fi
  3585. +ac_ct_CC=$ac_cv_prog_ac_ct_CC
  3586. +if test -n "$ac_ct_CC"; then
  3587. + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
  3588. +echo "${ECHO_T}$ac_ct_CC" >&6
  3589. +else
  3590. + echo "$as_me:$LINENO: result: no" >&5
  3591. +echo "${ECHO_T}no" >&6
  3592. +fi
  3593. +
  3594. + test -n "$ac_ct_CC" && break
  3595. +done
  3596. +
  3597. + CC=$ac_ct_CC
  3598. +fi
  3599. +
  3600. +fi
  3601. +
  3602. +
  3603. +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
  3604. +See \`config.log' for more details." >&5
  3605. +echo "$as_me: error: no acceptable C compiler found in \$PATH
  3606. +See \`config.log' for more details." >&2;}
  3607. + { (exit 1); exit 1; }; }
  3608. +
  3609. +# Provide some information about the compiler.
  3610. +echo "$as_me:$LINENO:" \
  3611. + "checking for C compiler version" >&5
  3612. +ac_compiler=`set X $ac_compile; echo $2`
  3613. +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
  3614. + (eval $ac_compiler --version </dev/null >&5) 2>&5
  3615. + ac_status=$?
  3616. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  3617. + (exit $ac_status); }
  3618. +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
  3619. + (eval $ac_compiler -v </dev/null >&5) 2>&5
  3620. + ac_status=$?
  3621. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  3622. + (exit $ac_status); }
  3623. +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
  3624. + (eval $ac_compiler -V </dev/null >&5) 2>&5
  3625. + ac_status=$?
  3626. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  3627. + (exit $ac_status); }
  3628. +
  3629. +cat >conftest.$ac_ext <<_ACEOF
  3630. +/* confdefs.h. */
  3631. +_ACEOF
  3632. +cat confdefs.h >>conftest.$ac_ext
  3633. +cat >>conftest.$ac_ext <<_ACEOF
  3634. +/* end confdefs.h. */
  3635. +
  3636. +int
  3637. +main ()
  3638. +{
  3639. +
  3640. + ;
  3641. + return 0;
  3642. +}
  3643. +_ACEOF
  3644. +ac_clean_files_save=$ac_clean_files
  3645. +ac_clean_files="$ac_clean_files a.out a.exe b.out"
  3646. +# Try to create an executable without -o first, disregard a.out.
  3647. +# It will help us diagnose broken compilers, and finding out an intuition
  3648. +# of exeext.
  3649. +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
  3650. +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
  3651. +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
  3652. +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
  3653. + (eval $ac_link_default) 2>&5
  3654. + ac_status=$?
  3655. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  3656. + (exit $ac_status); }; then
  3657. + # Find the output, starting from the most likely. This scheme is
  3658. +# not robust to junk in `.', hence go to wildcards (a.*) only as a last
  3659. +# resort.
  3660. +
  3661. +# Be careful to initialize this variable, since it used to be cached.
  3662. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
  3663. +ac_cv_exeext=
  3664. +# b.out is created by i960 compilers.
  3665. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
  3666. +do
  3667. + test -f "$ac_file" || continue
  3668. + case $ac_file in
  3669. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
  3670. + ;;
  3671. + conftest.$ac_ext )
  3672. + # This is the source file.
  3673. + ;;
  3674. + [ab].out )
  3675. + # We found the default executable, but exeext='' is most
  3676. + # certainly right.
  3677. + break;;
  3678. + *.* )
  3679. + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
  3680. + # FIXME: I believe we export ac_cv_exeext for Libtool,
  3681. + # but it would be cool to find out if it's true. Does anybody
  3682. + # maintain Libtool? --akim.
  3683. + export ac_cv_exeext
  3684. + break;;
  3685. + * )
  3686. + break;;
  3687. + esac
  3688. +done
  3689. +else
  3690. + echo "$as_me: failed program was:" >&5
  3691. +sed 's/^/| /' conftest.$ac_ext >&5
  3692. +
  3693. +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
  3694. +See \`config.log' for more details." >&5
  3695. +echo "$as_me: error: C compiler cannot create executables
  3696. +See \`config.log' for more details." >&2;}
  3697. + { (exit 77); exit 77; }; }
  3698. +fi
  3699. +
  3700. +ac_exeext=$ac_cv_exeext
  3701. +echo "$as_me:$LINENO: result: $ac_file" >&5
  3702. +echo "${ECHO_T}$ac_file" >&6
  3703. +
  3704. +# Check the compiler produces executables we can run. If not, either
  3705. +# the compiler is broken, or we cross compile.
  3706. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5
  3707. +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
  3708. +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
  3709. +# If not cross compiling, check that we can run a simple program.
  3710. +if test "$cross_compiling" != yes; then
  3711. + if { ac_try='./$ac_file'
  3712. + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  3713. + (eval $ac_try) 2>&5
  3714. + ac_status=$?
  3715. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  3716. + (exit $ac_status); }; }; then
  3717. + cross_compiling=no
  3718. + else
  3719. + if test "$cross_compiling" = maybe; then
  3720. + cross_compiling=yes
  3721. + else
  3722. + { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
  3723. +If you meant to cross compile, use \`--host'.
  3724. +See \`config.log' for more details." >&5
  3725. +echo "$as_me: error: cannot run C compiled programs.
  3726. +If you meant to cross compile, use \`--host'.
  3727. +See \`config.log' for more details." >&2;}
  3728. + { (exit 1); exit 1; }; }
  3729. + fi
  3730. + fi
  3731. +fi
  3732. +echo "$as_me:$LINENO: result: yes" >&5
  3733. +echo "${ECHO_T}yes" >&6
  3734. +
  3735. +rm -f a.out a.exe conftest$ac_cv_exeext b.out
  3736. +ac_clean_files=$ac_clean_files_save
  3737. +# Check the compiler produces executables we can run. If not, either
  3738. +# the compiler is broken, or we cross compile.
  3739. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
  3740. +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
  3741. +echo "$as_me:$LINENO: result: $cross_compiling" >&5
  3742. +echo "${ECHO_T}$cross_compiling" >&6
  3743. +
  3744. +echo "$as_me:$LINENO: checking for suffix of executables" >&5
  3745. +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
  3746. +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  3747. + (eval $ac_link) 2>&5
  3748. + ac_status=$?
  3749. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  3750. + (exit $ac_status); }; then
  3751. + # If both `conftest.exe' and `conftest' are `present' (well, observable)
  3752. +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
  3753. +# work properly (i.e., refer to `conftest.exe'), while it won't with
  3754. +# `rm'.
  3755. +for ac_file in conftest.exe conftest conftest.*; do
  3756. + test -f "$ac_file" || continue
  3757. + case $ac_file in
  3758. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
  3759. + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
  3760. + export ac_cv_exeext
  3761. + break;;
  3762. + * ) break;;
  3763. + esac
  3764. +done
  3765. +else
  3766. + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
  3767. +See \`config.log' for more details." >&5
  3768. +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
  3769. +See \`config.log' for more details." >&2;}
  3770. + { (exit 1); exit 1; }; }
  3771. +fi
  3772. +
  3773. +rm -f conftest$ac_cv_exeext
  3774. +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
  3775. +echo "${ECHO_T}$ac_cv_exeext" >&6
  3776. +
  3777. +rm -f conftest.$ac_ext
  3778. +EXEEXT=$ac_cv_exeext
  3779. +ac_exeext=$EXEEXT
  3780. +echo "$as_me:$LINENO: checking for suffix of object files" >&5
  3781. +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
  3782. +if test "${ac_cv_objext+set}" = set; then
  3783. + echo $ECHO_N "(cached) $ECHO_C" >&6
  3784. +else
  3785. + cat >conftest.$ac_ext <<_ACEOF
  3786. +/* confdefs.h. */
  3787. +_ACEOF
  3788. +cat confdefs.h >>conftest.$ac_ext
  3789. +cat >>conftest.$ac_ext <<_ACEOF
  3790. +/* end confdefs.h. */
  3791. +
  3792. +int
  3793. +main ()
  3794. +{
  3795. +
  3796. + ;
  3797. + return 0;
  3798. +}
  3799. +_ACEOF
  3800. +rm -f conftest.o conftest.obj
  3801. +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  3802. + (eval $ac_compile) 2>&5
  3803. + ac_status=$?
  3804. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  3805. + (exit $ac_status); }; then
  3806. + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
  3807. + case $ac_file in
  3808. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
  3809. + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
  3810. + break;;
  3811. + esac
  3812. +done
  3813. +else
  3814. + echo "$as_me: failed program was:" >&5
  3815. +sed 's/^/| /' conftest.$ac_ext >&5
  3816. +
  3817. +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
  3818. +See \`config.log' for more details." >&5
  3819. +echo "$as_me: error: cannot compute suffix of object files: cannot compile
  3820. +See \`config.log' for more details." >&2;}
  3821. + { (exit 1); exit 1; }; }
  3822. +fi
  3823. +
  3824. +rm -f conftest.$ac_cv_objext conftest.$ac_ext
  3825. +fi
  3826. +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
  3827. +echo "${ECHO_T}$ac_cv_objext" >&6
  3828. +OBJEXT=$ac_cv_objext
  3829. +ac_objext=$OBJEXT
  3830. +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
  3831. +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
  3832. +if test "${ac_cv_c_compiler_gnu+set}" = set; then
  3833. + echo $ECHO_N "(cached) $ECHO_C" >&6
  3834. +else
  3835. + cat >conftest.$ac_ext <<_ACEOF
  3836. +/* confdefs.h. */
  3837. +_ACEOF
  3838. +cat confdefs.h >>conftest.$ac_ext
  3839. +cat >>conftest.$ac_ext <<_ACEOF
  3840. +/* end confdefs.h. */
  3841. +
  3842. +int
  3843. +main ()
  3844. +{
  3845. +#ifndef __GNUC__
  3846. + choke me
  3847. +#endif
  3848. +
  3849. + ;
  3850. + return 0;
  3851. +}
  3852. +_ACEOF
  3853. +rm -f conftest.$ac_objext
  3854. +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  3855. + (eval $ac_compile) 2>conftest.er1
  3856. + ac_status=$?
  3857. + grep -v '^ *+' conftest.er1 >conftest.err
  3858. + rm -f conftest.er1
  3859. + cat conftest.err >&5
  3860. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  3861. + (exit $ac_status); } &&
  3862. + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
  3863. + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  3864. + (eval $ac_try) 2>&5
  3865. + ac_status=$?
  3866. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  3867. + (exit $ac_status); }; } &&
  3868. + { ac_try='test -s conftest.$ac_objext'
  3869. + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  3870. + (eval $ac_try) 2>&5
  3871. + ac_status=$?
  3872. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  3873. + (exit $ac_status); }; }; then
  3874. + ac_compiler_gnu=yes
  3875. +else
  3876. + echo "$as_me: failed program was:" >&5
  3877. +sed 's/^/| /' conftest.$ac_ext >&5
  3878. +
  3879. +ac_compiler_gnu=no
  3880. +fi
  3881. +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  3882. +ac_cv_c_compiler_gnu=$ac_compiler_gnu
  3883. +
  3884. +fi
  3885. +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
  3886. +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
  3887. +GCC=`test $ac_compiler_gnu = yes && echo yes`
  3888. +ac_test_CFLAGS=${CFLAGS+set}
  3889. +ac_save_CFLAGS=$CFLAGS
  3890. +CFLAGS="-g"
  3891. +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
  3892. +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
  3893. +if test "${ac_cv_prog_cc_g+set}" = set; then
  3894. + echo $ECHO_N "(cached) $ECHO_C" >&6
  3895. +else
  3896. + cat >conftest.$ac_ext <<_ACEOF
  3897. +/* confdefs.h. */
  3898. +_ACEOF
  3899. +cat confdefs.h >>conftest.$ac_ext
  3900. +cat >>conftest.$ac_ext <<_ACEOF
  3901. +/* end confdefs.h. */
  3902. +
  3903. +int
  3904. +main ()
  3905. +{
  3906. +
  3907. + ;
  3908. + return 0;
  3909. +}
  3910. +_ACEOF
  3911. +rm -f conftest.$ac_objext
  3912. +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  3913. + (eval $ac_compile) 2>conftest.er1
  3914. + ac_status=$?
  3915. + grep -v '^ *+' conftest.er1 >conftest.err
  3916. + rm -f conftest.er1
  3917. + cat conftest.err >&5
  3918. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  3919. + (exit $ac_status); } &&
  3920. + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
  3921. + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  3922. + (eval $ac_try) 2>&5
  3923. + ac_status=$?
  3924. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  3925. + (exit $ac_status); }; } &&
  3926. + { ac_try='test -s conftest.$ac_objext'
  3927. + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  3928. + (eval $ac_try) 2>&5
  3929. + ac_status=$?
  3930. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  3931. + (exit $ac_status); }; }; then
  3932. + ac_cv_prog_cc_g=yes
  3933. +else
  3934. + echo "$as_me: failed program was:" >&5
  3935. +sed 's/^/| /' conftest.$ac_ext >&5
  3936. +
  3937. +ac_cv_prog_cc_g=no
  3938. +fi
  3939. +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  3940. +fi
  3941. +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
  3942. +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
  3943. +if test "$ac_test_CFLAGS" = set; then
  3944. + CFLAGS=$ac_save_CFLAGS
  3945. +elif test $ac_cv_prog_cc_g = yes; then
  3946. + if test "$GCC" = yes; then
  3947. + CFLAGS="-g -O2"
  3948. + else
  3949. + CFLAGS="-g"
  3950. + fi
  3951. +else
  3952. + if test "$GCC" = yes; then
  3953. + CFLAGS="-O2"
  3954. + else
  3955. + CFLAGS=
  3956. + fi
  3957. +fi
  3958. +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
  3959. +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
  3960. +if test "${ac_cv_prog_cc_stdc+set}" = set; then
  3961. + echo $ECHO_N "(cached) $ECHO_C" >&6
  3962. +else
  3963. + ac_cv_prog_cc_stdc=no
  3964. +ac_save_CC=$CC
  3965. +cat >conftest.$ac_ext <<_ACEOF
  3966. +/* confdefs.h. */
  3967. +_ACEOF
  3968. +cat confdefs.h >>conftest.$ac_ext
  3969. +cat >>conftest.$ac_ext <<_ACEOF
  3970. +/* end confdefs.h. */
  3971. +#include <stdarg.h>
  3972. +#include <stdio.h>
  3973. +#include <sys/types.h>
  3974. +#include <sys/stat.h>
  3975. +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
  3976. +struct buf { int x; };
  3977. +FILE * (*rcsopen) (struct buf *, struct stat *, int);
  3978. +static char *e (p, i)
  3979. + char **p;
  3980. + int i;
  3981. +{
  3982. + return p[i];
  3983. +}
  3984. +static char *f (char * (*g) (char **, int), char **p, ...)
  3985. +{
  3986. + char *s;
  3987. + va_list v;
  3988. + va_start (v,p);
  3989. + s = g (p, va_arg (v,int));
  3990. + va_end (v);
  3991. + return s;
  3992. +}
  3993. +
  3994. +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
  3995. + function prototypes and stuff, but not '\xHH' hex character constants.
  3996. + These don't provoke an error unfortunately, instead are silently treated
  3997. + as 'x'. The following induces an error, until -std1 is added to get
  3998. + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
  3999. + array size at least. It's necessary to write '\x00'==0 to get something
  4000. + that's true only with -std1. */
  4001. +int osf4_cc_array ['\x00' == 0 ? 1 : -1];
  4002. +
  4003. +int test (int i, double x);
  4004. +struct s1 {int (*f) (int a);};
  4005. +struct s2 {int (*f) (double a);};
  4006. +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
  4007. +int argc;
  4008. +char **argv;
  4009. +int
  4010. +main ()
  4011. +{
  4012. +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
  4013. + ;
  4014. + return 0;
  4015. +}
  4016. +_ACEOF
  4017. +# Don't try gcc -ansi; that turns off useful extensions and
  4018. +# breaks some systems' header files.
  4019. +# AIX -qlanglvl=ansi
  4020. +# Ultrix and OSF/1 -std1
  4021. +# HP-UX 10.20 and later -Ae
  4022. +# HP-UX older versions -Aa -D_HPUX_SOURCE
  4023. +# SVR4 -Xc -D__EXTENSIONS__
  4024. +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
  4025. +do
  4026. + CC="$ac_save_CC $ac_arg"
  4027. + rm -f conftest.$ac_objext
  4028. +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  4029. + (eval $ac_compile) 2>conftest.er1
  4030. + ac_status=$?
  4031. + grep -v '^ *+' conftest.er1 >conftest.err
  4032. + rm -f conftest.er1
  4033. + cat conftest.err >&5
  4034. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  4035. + (exit $ac_status); } &&
  4036. + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
  4037. + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  4038. + (eval $ac_try) 2>&5
  4039. + ac_status=$?
  4040. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  4041. + (exit $ac_status); }; } &&
  4042. + { ac_try='test -s conftest.$ac_objext'
  4043. + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  4044. + (eval $ac_try) 2>&5
  4045. + ac_status=$?
  4046. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  4047. + (exit $ac_status); }; }; then
  4048. + ac_cv_prog_cc_stdc=$ac_arg
  4049. +break
  4050. +else
  4051. + echo "$as_me: failed program was:" >&5
  4052. +sed 's/^/| /' conftest.$ac_ext >&5
  4053. +
  4054. +fi
  4055. +rm -f conftest.err conftest.$ac_objext
  4056. +done
  4057. +rm -f conftest.$ac_ext conftest.$ac_objext
  4058. +CC=$ac_save_CC
  4059. +
  4060. +fi
  4061. +
  4062. +case "x$ac_cv_prog_cc_stdc" in
  4063. + x|xno)
  4064. + echo "$as_me:$LINENO: result: none needed" >&5
  4065. +echo "${ECHO_T}none needed" >&6 ;;
  4066. + *)
  4067. + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
  4068. +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
  4069. + CC="$CC $ac_cv_prog_cc_stdc" ;;
  4070. +esac
  4071. +
  4072. +# Some people use a C++ compiler to compile C. Since we use `exit',
  4073. +# in C++ we need to declare it. In case someone uses the same compiler
  4074. +# for both compiling C and C++ we need to have the C++ compiler decide
  4075. +# the declaration of exit, since it's the most demanding environment.
  4076. +cat >conftest.$ac_ext <<_ACEOF
  4077. +#ifndef __cplusplus
  4078. + choke me
  4079. +#endif
  4080. +_ACEOF
  4081. +rm -f conftest.$ac_objext
  4082. +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  4083. + (eval $ac_compile) 2>conftest.er1
  4084. + ac_status=$?
  4085. + grep -v '^ *+' conftest.er1 >conftest.err
  4086. + rm -f conftest.er1
  4087. + cat conftest.err >&5
  4088. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  4089. + (exit $ac_status); } &&
  4090. + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
  4091. + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  4092. + (eval $ac_try) 2>&5
  4093. + ac_status=$?
  4094. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  4095. + (exit $ac_status); }; } &&
  4096. + { ac_try='test -s conftest.$ac_objext'
  4097. + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  4098. + (eval $ac_try) 2>&5
  4099. + ac_status=$?
  4100. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  4101. + (exit $ac_status); }; }; then
  4102. + for ac_declaration in \
  4103. + '' \
  4104. + 'extern "C" void std::exit (int) throw (); using std::exit;' \
  4105. + 'extern "C" void std::exit (int); using std::exit;' \
  4106. + 'extern "C" void exit (int) throw ();' \
  4107. + 'extern "C" void exit (int);' \
  4108. + 'void exit (int);'
  4109. +do
  4110. + cat >conftest.$ac_ext <<_ACEOF
  4111. +/* confdefs.h. */
  4112. +_ACEOF
  4113. +cat confdefs.h >>conftest.$ac_ext
  4114. +cat >>conftest.$ac_ext <<_ACEOF
  4115. +/* end confdefs.h. */
  4116. +$ac_declaration
  4117. +#include <stdlib.h>
  4118. +int
  4119. +main ()
  4120. +{
  4121. +exit (42);
  4122. + ;
  4123. + return 0;
  4124. +}
  4125. +_ACEOF
  4126. +rm -f conftest.$ac_objext
  4127. +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  4128. + (eval $ac_compile) 2>conftest.er1
  4129. + ac_status=$?
  4130. + grep -v '^ *+' conftest.er1 >conftest.err
  4131. + rm -f conftest.er1
  4132. + cat conftest.err >&5
  4133. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  4134. + (exit $ac_status); } &&
  4135. + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
  4136. + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  4137. + (eval $ac_try) 2>&5
  4138. + ac_status=$?
  4139. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  4140. + (exit $ac_status); }; } &&
  4141. + { ac_try='test -s conftest.$ac_objext'
  4142. + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  4143. + (eval $ac_try) 2>&5
  4144. + ac_status=$?
  4145. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  4146. + (exit $ac_status); }; }; then
  4147. + :
  4148. +else
  4149. + echo "$as_me: failed program was:" >&5
  4150. +sed 's/^/| /' conftest.$ac_ext >&5
  4151. +
  4152. +continue
  4153. +fi
  4154. +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  4155. + cat >conftest.$ac_ext <<_ACEOF
  4156. +/* confdefs.h. */
  4157. +_ACEOF
  4158. +cat confdefs.h >>conftest.$ac_ext
  4159. +cat >>conftest.$ac_ext <<_ACEOF
  4160. +/* end confdefs.h. */
  4161. +$ac_declaration
  4162. +int
  4163. +main ()
  4164. +{
  4165. +exit (42);
  4166. + ;
  4167. + return 0;
  4168. +}
  4169. +_ACEOF
  4170. +rm -f conftest.$ac_objext
  4171. +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  4172. + (eval $ac_compile) 2>conftest.er1
  4173. + ac_status=$?
  4174. + grep -v '^ *+' conftest.er1 >conftest.err
  4175. + rm -f conftest.er1
  4176. + cat conftest.err >&5
  4177. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  4178. + (exit $ac_status); } &&
  4179. + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
  4180. + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  4181. + (eval $ac_try) 2>&5
  4182. + ac_status=$?
  4183. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  4184. + (exit $ac_status); }; } &&
  4185. + { ac_try='test -s conftest.$ac_objext'
  4186. + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  4187. + (eval $ac_try) 2>&5
  4188. + ac_status=$?
  4189. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  4190. + (exit $ac_status); }; }; then
  4191. + break
  4192. +else
  4193. + echo "$as_me: failed program was:" >&5
  4194. +sed 's/^/| /' conftest.$ac_ext >&5
  4195. +
  4196. +fi
  4197. +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  4198. +done
  4199. +rm -f conftest*
  4200. +if test -n "$ac_declaration"; then
  4201. + echo '#ifdef __cplusplus' >>confdefs.h
  4202. + echo $ac_declaration >>confdefs.h
  4203. + echo '#endif' >>confdefs.h
  4204. +fi
  4205. +
  4206. +else
  4207. + echo "$as_me: failed program was:" >&5
  4208. +sed 's/^/| /' conftest.$ac_ext >&5
  4209. +
  4210. +fi
  4211. +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  4212. +ac_ext=c
  4213. +ac_cpp='$CPP $CPPFLAGS'
  4214. +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  4215. +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  4216. +ac_compiler_gnu=$ac_cv_c_compiler_gnu
  4217. +DEPDIR="${am__leading_dot}deps"
  4218. +
  4219. + ac_config_commands="$ac_config_commands depfiles"
  4220. +
  4221. +
  4222. +am_make=${MAKE-make}
  4223. +cat > confinc << 'END'
  4224. +am__doit:
  4225. + @echo done
  4226. +.PHONY: am__doit
  4227. +END
  4228. +# If we don't find an include directive, just comment out the code.
  4229. +echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
  4230. +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
  4231. +am__include="#"
  4232. +am__quote=
  4233. +_am_result=none
  4234. +# First try GNU make style include.
  4235. +echo "include confinc" > confmf
  4236. +# We grep out `Entering directory' and `Leaving directory'
  4237. +# messages which can occur if `w' ends up in MAKEFLAGS.
  4238. +# In particular we don't look at `^make:' because GNU make might
  4239. +# be invoked under some other name (usually "gmake"), in which
  4240. +# case it prints its new name instead of `make'.
  4241. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
  4242. + am__include=include
  4243. + am__quote=
  4244. + _am_result=GNU
  4245. +fi
  4246. +# Now try BSD make style include.
  4247. +if test "$am__include" = "#"; then
  4248. + echo '.include "confinc"' > confmf
  4249. + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
  4250. + am__include=.include
  4251. + am__quote="\""
  4252. + _am_result=BSD
  4253. + fi
  4254. +fi
  4255. +
  4256. +
  4257. +echo "$as_me:$LINENO: result: $_am_result" >&5
  4258. +echo "${ECHO_T}$_am_result" >&6
  4259. +rm -f confinc confmf
  4260. +
  4261. +# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
  4262. +if test "${enable_dependency_tracking+set}" = set; then
  4263. + enableval="$enable_dependency_tracking"
  4264. +
  4265. +fi;
  4266. +if test "x$enable_dependency_tracking" != xno; then
  4267. + am_depcomp="$ac_aux_dir/depcomp"
  4268. + AMDEPBACKSLASH='\'
  4269. +fi
  4270. +
  4271. +
  4272. +if test "x$enable_dependency_tracking" != xno; then
  4273. + AMDEP_TRUE=
  4274. + AMDEP_FALSE='#'
  4275. +else
  4276. + AMDEP_TRUE='#'
  4277. + AMDEP_FALSE=
  4278. +fi
  4279. +
  4280. +
  4281. +
  4282. +
  4283. +depcc="$CC" am_compiler_list=
  4284. +
  4285. +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
  4286. +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
  4287. +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
  4288. + echo $ECHO_N "(cached) $ECHO_C" >&6
  4289. +else
  4290. + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  4291. + # We make a subdir and do the tests there. Otherwise we can end up
  4292. + # making bogus files that we don't know about and never remove. For
  4293. + # instance it was reported that on HP-UX the gcc test will end up
  4294. + # making a dummy file named `D' -- because `-MD' means `put the output
  4295. + # in D'.
  4296. + mkdir conftest.dir
  4297. + # Copy depcomp to subdir because otherwise we won't find it if we're
  4298. + # using a relative directory.
  4299. + cp "$am_depcomp" conftest.dir
  4300. + cd conftest.dir
  4301. + # We will build objects and dependencies in a subdirectory because
  4302. + # it helps to detect inapplicable dependency modes. For instance
  4303. + # both Tru64's cc and ICC support -MD to output dependencies as a
  4304. + # side effect of compilation, but ICC will put the dependencies in
  4305. + # the current directory while Tru64 will put them in the object
  4306. + # directory.
  4307. + mkdir sub
  4308. +
  4309. + am_cv_CC_dependencies_compiler_type=none
  4310. + if test "$am_compiler_list" = ""; then
  4311. + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
  4312. + fi
  4313. + for depmode in $am_compiler_list; do
  4314. + # Setup a source with many dependencies, because some compilers
  4315. + # like to wrap large dependency lists on column 80 (with \), and
  4316. + # we should not choose a depcomp mode which is confused by this.
  4317. + #
  4318. + # We need to recreate these files for each test, as the compiler may
  4319. + # overwrite some of them when testing with obscure command lines.
  4320. + # This happens at least with the AIX C compiler.
  4321. + : > sub/conftest.c
  4322. + for i in 1 2 3 4 5 6; do
  4323. + echo '#include "conftst'$i'.h"' >> sub/conftest.c
  4324. + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
  4325. + # Solaris 8's {/usr,}/bin/sh.
  4326. + touch sub/conftst$i.h
  4327. + done
  4328. + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  4329. +
  4330. + case $depmode in
  4331. + nosideeffect)
  4332. + # after this tag, mechanisms are not by side-effect, so they'll
  4333. + # only be used when explicitly requested
  4334. + if test "x$enable_dependency_tracking" = xyes; then
  4335. + continue
  4336. + else
  4337. + break
  4338. + fi
  4339. + ;;
  4340. + none) break ;;
  4341. + esac
  4342. + # We check with `-c' and `-o' for the sake of the "dashmstdout"
  4343. + # mode. It turns out that the SunPro C++ compiler does not properly
  4344. + # handle `-M -o', and we need to detect this.
  4345. + if depmode=$depmode \
  4346. + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
  4347. + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  4348. + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
  4349. + >/dev/null 2>conftest.err &&
  4350. + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  4351. + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
  4352. + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  4353. + # icc doesn't choke on unknown options, it will just issue warnings
  4354. + # or remarks (even with -Werror). So we grep stderr for any message
  4355. + # that says an option was ignored or not supported.
  4356. + # When given -MP, icc 7.0 and 7.1 complain thusly:
  4357. + # icc: Command line warning: ignoring option '-M'; no argument required
  4358. + # The diagnosis changed in icc 8.0:
  4359. + # icc: Command line remark: option '-MP' not supported
  4360. + if (grep 'ignoring option' conftest.err ||
  4361. + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  4362. + am_cv_CC_dependencies_compiler_type=$depmode
  4363. + break
  4364. + fi
  4365. + fi
  4366. + done
  4367. +
  4368. + cd ..
  4369. + rm -rf conftest.dir
  4370. +else
  4371. + am_cv_CC_dependencies_compiler_type=none
  4372. +fi
  4373. +
  4374. +fi
  4375. +echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
  4376. +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
  4377. +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
  4378. +
  4379. +
  4380. +
  4381. +if
  4382. + test "x$enable_dependency_tracking" != xno \
  4383. + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
  4384. + am__fastdepCC_TRUE=
  4385. + am__fastdepCC_FALSE='#'
  4386. +else
  4387. + am__fastdepCC_TRUE='#'
  4388. + am__fastdepCC_FALSE=
  4389. +fi
  4390. +
  4391. +
  4392. +# Find a good install program. We prefer a C program (faster),
  4393. +# so one script is as good as another. But avoid the broken or
  4394. +# incompatible versions:
  4395. +# SysV /etc/install, /usr/sbin/install
  4396. +# SunOS /usr/etc/install
  4397. +# IRIX /sbin/install
  4398. +# AIX /bin/install
  4399. +# AmigaOS /C/install, which installs bootblocks on floppy discs
  4400. +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  4401. +# AFS /usr/afsws/bin/install, which mishandles nonexistent args
  4402. +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  4403. +# OS/2's system install, which has a completely different semantic
  4404. +# ./install, which can be erroneously created by make from ./install.sh.
  4405. +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
  4406. +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
  4407. +if test -z "$INSTALL"; then
  4408. +if test "${ac_cv_path_install+set}" = set; then
  4409. + echo $ECHO_N "(cached) $ECHO_C" >&6
  4410. +else
  4411. + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  4412. +for as_dir in $PATH
  4413. +do
  4414. + IFS=$as_save_IFS
  4415. + test -z "$as_dir" && as_dir=.
  4416. + # Account for people who put trailing slashes in PATH elements.
  4417. +case $as_dir/ in
  4418. + ./ | .// | /cC/* | \
  4419. + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
  4420. + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
  4421. + /usr/ucb/* ) ;;
  4422. + *)
  4423. + # OSF1 and SCO ODT 3.0 have their own names for install.
  4424. + # Don't use installbsd from OSF since it installs stuff as root
  4425. + # by default.
  4426. + for ac_prog in ginstall scoinst install; do
  4427. + for ac_exec_ext in '' $ac_executable_extensions; do
  4428. + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
  4429. + if test $ac_prog = install &&
  4430. + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
  4431. + # AIX install. It has an incompatible calling convention.
  4432. + :
  4433. + elif test $ac_prog = install &&
  4434. + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
  4435. + # program-specific install script used by HP pwplus--don't use.
  4436. + :
  4437. + else
  4438. + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
  4439. + break 3
  4440. + fi
  4441. + fi
  4442. + done
  4443. + done
  4444. + ;;
  4445. +esac
  4446. +done
  4447. +
  4448. +
  4449. +fi
  4450. + if test "${ac_cv_path_install+set}" = set; then
  4451. + INSTALL=$ac_cv_path_install
  4452. + else
  4453. + # As a last resort, use the slow shell script. We don't cache a
  4454. + # path for INSTALL within a source directory, because that will
  4455. + # break other packages using the cache if that directory is
  4456. + # removed, or if the path is relative.
  4457. + INSTALL=$ac_install_sh
  4458. + fi
  4459. +fi
  4460. +echo "$as_me:$LINENO: result: $INSTALL" >&5
  4461. +echo "${ECHO_T}$INSTALL" >&6
  4462. +
  4463. +# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  4464. +# It thinks the first close brace ends the variable substitution.
  4465. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  4466. +
  4467. +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
  4468. +
  4469. +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  4470. +
  4471. + ac_config_files="$ac_config_files Makefile"
  4472. +cat >confcache <<\_ACEOF
  4473. +# This file is a shell script that caches the results of configure
  4474. +# tests run on this system so they can be shared between configure
  4475. +# scripts and configure runs, see configure's option --config-cache.
  4476. +# It is not useful on other systems. If it contains results you don't
  4477. +# want to keep, you may remove or edit it.
  4478. +#
  4479. +# config.status only pays attention to the cache file if you give it
  4480. +# the --recheck option to rerun configure.
  4481. +#
  4482. +# `ac_cv_env_foo' variables (set or unset) will be overridden when
  4483. +# loading this file, other *unset* `ac_cv_foo' will be assigned the
  4484. +# following values.
  4485. +
  4486. +_ACEOF
  4487. +
  4488. +# The following way of writing the cache mishandles newlines in values,
  4489. +# but we know of no workaround that is simple, portable, and efficient.
  4490. +# So, don't put newlines in cache variables' values.
  4491. +# Ultrix sh set writes to stderr and can't be redirected directly,
  4492. +# and sets the high bit in the cache file unless we assign to the vars.
  4493. +{
  4494. + (set) 2>&1 |
  4495. + case `(ac_space=' '; set | grep ac_space) 2>&1` in
  4496. + *ac_space=\ *)
  4497. + # `set' does not quote correctly, so add quotes (double-quote
  4498. + # substitution turns \\\\ into \\, and sed turns \\ into \).
  4499. + sed -n \
  4500. + "s/'/'\\\\''/g;
  4501. + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
  4502. + ;;
  4503. + *)
  4504. + # `set' quotes correctly as required by POSIX, so do not add quotes.
  4505. + sed -n \
  4506. + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
  4507. + ;;
  4508. + esac;
  4509. +} |
  4510. + sed '
  4511. + t clear
  4512. + : clear
  4513. + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
  4514. + t end
  4515. + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
  4516. + : end' >>confcache
  4517. +if diff $cache_file confcache >/dev/null 2>&1; then :; else
  4518. + if test -w $cache_file; then
  4519. + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
  4520. + cat confcache >$cache_file
  4521. + else
  4522. + echo "not updating unwritable cache $cache_file"
  4523. + fi
  4524. +fi
  4525. +rm -f confcache
  4526. +
  4527. +test "x$prefix" = xNONE && prefix=$ac_default_prefix
  4528. +# Let make expand exec_prefix.
  4529. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  4530. +
  4531. +# VPATH may cause trouble with some makes, so we remove $(srcdir),
  4532. +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
  4533. +# trailing colons and then remove the whole line if VPATH becomes empty
  4534. +# (actually we leave an empty line to preserve line numbers).
  4535. +if test "x$srcdir" = x.; then
  4536. + ac_vpsub='/^[ ]*VPATH[ ]*=/{
  4537. +s/:*\$(srcdir):*/:/;
  4538. +s/:*\${srcdir}:*/:/;
  4539. +s/:*@srcdir@:*/:/;
  4540. +s/^\([^=]*=[ ]*\):*/\1/;
  4541. +s/:*$//;
  4542. +s/^[^=]*=[ ]*$//;
  4543. +}'
  4544. +fi
  4545. +
  4546. +# Transform confdefs.h into DEFS.
  4547. +# Protect against shell expansion while executing Makefile rules.
  4548. +# Protect against Makefile macro expansion.
  4549. +#
  4550. +# If the first sed substitution is executed (which looks for macros that
  4551. +# take arguments), then we branch to the quote section. Otherwise,
  4552. +# look for a macro that doesn't take arguments.
  4553. +cat >confdef2opt.sed <<\_ACEOF
  4554. +t clear
  4555. +: clear
  4556. +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
  4557. +t quote
  4558. +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
  4559. +t quote
  4560. +d
  4561. +: quote
  4562. +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
  4563. +s,\[,\\&,g
  4564. +s,\],\\&,g
  4565. +s,\$,$$,g
  4566. +p
  4567. +_ACEOF
  4568. +# We use echo to avoid assuming a particular line-breaking character.
  4569. +# The extra dot is to prevent the shell from consuming trailing
  4570. +# line-breaks from the sub-command output. A line-break within
  4571. +# single-quotes doesn't work because, if this script is created in a
  4572. +# platform that uses two characters for line-breaks (e.g., DOS), tr
  4573. +# would break.
  4574. +ac_LF_and_DOT=`echo; echo .`
  4575. +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
  4576. +rm -f confdef2opt.sed
  4577. +
  4578. +
  4579. +ac_libobjs=
  4580. +ac_ltlibobjs=
  4581. +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
  4582. + # 1. Remove the extension, and $U if already installed.
  4583. + ac_i=`echo "$ac_i" |
  4584. + sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
  4585. + # 2. Add them.
  4586. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
  4587. + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
  4588. +done
  4589. +LIBOBJS=$ac_libobjs
  4590. +
  4591. +LTLIBOBJS=$ac_ltlibobjs
  4592. +
  4593. +
  4594. +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
  4595. + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
  4596. +Usually this means the macro was only invoked conditionally." >&5
  4597. +echo "$as_me: error: conditional \"AMDEP\" was never defined.
  4598. +Usually this means the macro was only invoked conditionally." >&2;}
  4599. + { (exit 1); exit 1; }; }
  4600. +fi
  4601. +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
  4602. + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
  4603. +Usually this means the macro was only invoked conditionally." >&5
  4604. +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
  4605. +Usually this means the macro was only invoked conditionally." >&2;}
  4606. + { (exit 1); exit 1; }; }
  4607. +fi
  4608. +
  4609. +: ${CONFIG_STATUS=./config.status}
  4610. +ac_clean_files_save=$ac_clean_files
  4611. +ac_clean_files="$ac_clean_files $CONFIG_STATUS"
  4612. +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
  4613. +echo "$as_me: creating $CONFIG_STATUS" >&6;}
  4614. +cat >$CONFIG_STATUS <<_ACEOF
  4615. +#! $SHELL
  4616. +# Generated by $as_me.
  4617. +# Run this file to recreate the current configuration.
  4618. +# Compiler output produced by configure, useful for debugging
  4619. +# configure, is in config.log if it exists.
  4620. +
  4621. +debug=false
  4622. +ac_cs_recheck=false
  4623. +ac_cs_silent=false
  4624. +SHELL=\${CONFIG_SHELL-$SHELL}
  4625. +_ACEOF
  4626. +
  4627. +cat >>$CONFIG_STATUS <<\_ACEOF
  4628. +## --------------------- ##
  4629. +## M4sh Initialization. ##
  4630. +## --------------------- ##
  4631. +
  4632. +# Be Bourne compatible
  4633. +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  4634. + emulate sh
  4635. + NULLCMD=:
  4636. + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
  4637. + # is contrary to our usage. Disable this feature.
  4638. + alias -g '${1+"$@"}'='"$@"'
  4639. +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
  4640. + set -o posix
  4641. +fi
  4642. +DUALCASE=1; export DUALCASE # for MKS sh
  4643. +
  4644. +# Support unset when possible.
  4645. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  4646. + as_unset=unset
  4647. +else
  4648. + as_unset=false
  4649. +fi
  4650. +
  4651. +
  4652. +# Work around bugs in pre-3.0 UWIN ksh.
  4653. +$as_unset ENV MAIL MAILPATH
  4654. +PS1='$ '
  4655. +PS2='> '
  4656. +PS4='+ '
  4657. +
  4658. +# NLS nuisances.
  4659. +for as_var in \
  4660. + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
  4661. + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
  4662. + LC_TELEPHONE LC_TIME
  4663. +do
  4664. + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
  4665. + eval $as_var=C; export $as_var
  4666. + else
  4667. + $as_unset $as_var
  4668. + fi
  4669. +done
  4670. +
  4671. +# Required to use basename.
  4672. +if expr a : '\(a\)' >/dev/null 2>&1; then
  4673. + as_expr=expr
  4674. +else
  4675. + as_expr=false
  4676. +fi
  4677. +
  4678. +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
  4679. + as_basename=basename
  4680. +else
  4681. + as_basename=false
  4682. +fi
  4683. +
  4684. +
  4685. +# Name of the executable.
  4686. +as_me=`$as_basename "$0" ||
  4687. +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
  4688. + X"$0" : 'X\(//\)$' \| \
  4689. + X"$0" : 'X\(/\)$' \| \
  4690. + . : '\(.\)' 2>/dev/null ||
  4691. +echo X/"$0" |
  4692. + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
  4693. + /^X\/\(\/\/\)$/{ s//\1/; q; }
  4694. + /^X\/\(\/\).*/{ s//\1/; q; }
  4695. + s/.*/./; q'`
  4696. +
  4697. +
  4698. +# PATH needs CR, and LINENO needs CR and PATH.
  4699. +# Avoid depending upon Character Ranges.
  4700. +as_cr_letters='abcdefghijklmnopqrstuvwxyz'
  4701. +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  4702. +as_cr_Letters=$as_cr_letters$as_cr_LETTERS
  4703. +as_cr_digits='0123456789'
  4704. +as_cr_alnum=$as_cr_Letters$as_cr_digits
  4705. +
  4706. +# The user is always right.
  4707. +if test "${PATH_SEPARATOR+set}" != set; then
  4708. + echo "#! /bin/sh" >conf$$.sh
  4709. + echo "exit 0" >>conf$$.sh
  4710. + chmod +x conf$$.sh
  4711. + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
  4712. + PATH_SEPARATOR=';'
  4713. + else
  4714. + PATH_SEPARATOR=:
  4715. + fi
  4716. + rm -f conf$$.sh
  4717. +fi
  4718. +
  4719. +
  4720. + as_lineno_1=$LINENO
  4721. + as_lineno_2=$LINENO
  4722. + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
  4723. + test "x$as_lineno_1" != "x$as_lineno_2" &&
  4724. + test "x$as_lineno_3" = "x$as_lineno_2" || {
  4725. + # Find who we are. Look in the path if we contain no path at all
  4726. + # relative or not.
  4727. + case $0 in
  4728. + *[\\/]* ) as_myself=$0 ;;
  4729. + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  4730. +for as_dir in $PATH
  4731. +do
  4732. + IFS=$as_save_IFS
  4733. + test -z "$as_dir" && as_dir=.
  4734. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
  4735. +done
  4736. +
  4737. + ;;
  4738. + esac
  4739. + # We did not find ourselves, most probably we were run as `sh COMMAND'
  4740. + # in which case we are not to be found in the path.
  4741. + if test "x$as_myself" = x; then
  4742. + as_myself=$0
  4743. + fi
  4744. + if test ! -f "$as_myself"; then
  4745. + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
  4746. +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
  4747. + { (exit 1); exit 1; }; }
  4748. + fi
  4749. + case $CONFIG_SHELL in
  4750. + '')
  4751. + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  4752. +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
  4753. +do
  4754. + IFS=$as_save_IFS
  4755. + test -z "$as_dir" && as_dir=.
  4756. + for as_base in sh bash ksh sh5; do
  4757. + case $as_dir in
  4758. + /*)
  4759. + if ("$as_dir/$as_base" -c '
  4760. + as_lineno_1=$LINENO
  4761. + as_lineno_2=$LINENO
  4762. + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
  4763. + test "x$as_lineno_1" != "x$as_lineno_2" &&
  4764. + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
  4765. + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
  4766. + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
  4767. + CONFIG_SHELL=$as_dir/$as_base
  4768. + export CONFIG_SHELL
  4769. + exec "$CONFIG_SHELL" "$0" ${1+"$@"}
  4770. + fi;;
  4771. + esac
  4772. + done
  4773. +done
  4774. +;;
  4775. + esac
  4776. +
  4777. + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
  4778. + # uniformly replaced by the line number. The first 'sed' inserts a
  4779. + # line-number line before each line; the second 'sed' does the real
  4780. + # work. The second script uses 'N' to pair each line-number line
  4781. + # with the numbered line, and appends trailing '-' during
  4782. + # substitution so that $LINENO is not a special case at line end.
  4783. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
  4784. + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
  4785. + sed '=' <$as_myself |
  4786. + sed '
  4787. + N
  4788. + s,$,-,
  4789. + : loop
  4790. + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
  4791. + t loop
  4792. + s,-$,,
  4793. + s,^['$as_cr_digits']*\n,,
  4794. + ' >$as_me.lineno &&
  4795. + chmod +x $as_me.lineno ||
  4796. + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
  4797. +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
  4798. + { (exit 1); exit 1; }; }
  4799. +
  4800. + # Don't try to exec as it changes $[0], causing all sort of problems
  4801. + # (the dirname of $[0] is not the place where we might find the
  4802. + # original and so on. Autoconf is especially sensible to this).
  4803. + . ./$as_me.lineno
  4804. + # Exit status is that of the last command.
  4805. + exit
  4806. +}
  4807. +
  4808. +
  4809. +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
  4810. + *c*,-n*) ECHO_N= ECHO_C='
  4811. +' ECHO_T=' ' ;;
  4812. + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
  4813. + *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
  4814. +esac
  4815. +
  4816. +if expr a : '\(a\)' >/dev/null 2>&1; then
  4817. + as_expr=expr
  4818. +else
  4819. + as_expr=false
  4820. +fi
  4821. +
  4822. +rm -f conf$$ conf$$.exe conf$$.file
  4823. +echo >conf$$.file
  4824. +if ln -s conf$$.file conf$$ 2>/dev/null; then
  4825. + # We could just check for DJGPP; but this test a) works b) is more generic
  4826. + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
  4827. + if test -f conf$$.exe; then
  4828. + # Don't use ln at all; we don't have any links
  4829. + as_ln_s='cp -p'
  4830. + else
  4831. + as_ln_s='ln -s'
  4832. + fi
  4833. +elif ln conf$$.file conf$$ 2>/dev/null; then
  4834. + as_ln_s=ln
  4835. +else
  4836. + as_ln_s='cp -p'
  4837. +fi
  4838. +rm -f conf$$ conf$$.exe conf$$.file
  4839. +
  4840. +if mkdir -p . 2>/dev/null; then
  4841. + as_mkdir_p=:
  4842. +else
  4843. + test -d ./-p && rmdir ./-p
  4844. + as_mkdir_p=false
  4845. +fi
  4846. +
  4847. +as_executable_p="test -f"
  4848. +
  4849. +# Sed expression to map a string onto a valid CPP name.
  4850. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
  4851. +
  4852. +# Sed expression to map a string onto a valid variable name.
  4853. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
  4854. +
  4855. +
  4856. +# IFS
  4857. +# We need space, tab and new line, in precisely that order.
  4858. +as_nl='
  4859. +'
  4860. +IFS=" $as_nl"
  4861. +
  4862. +# CDPATH.
  4863. +$as_unset CDPATH
  4864. +
  4865. +exec 6>&1
  4866. +
  4867. +# Open the log real soon, to keep \$[0] and so on meaningful, and to
  4868. +# report actual input values of CONFIG_FILES etc. instead of their
  4869. +# values after options handling. Logging --version etc. is OK.
  4870. +exec 5>>config.log
  4871. +{
  4872. + echo
  4873. + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
  4874. +## Running $as_me. ##
  4875. +_ASBOX
  4876. +} >&5
  4877. +cat >&5 <<_CSEOF
  4878. +
  4879. +This file was extended by $as_me, which was
  4880. +generated by GNU Autoconf 2.59. Invocation command line was
  4881. +
  4882. + CONFIG_FILES = $CONFIG_FILES
  4883. + CONFIG_HEADERS = $CONFIG_HEADERS
  4884. + CONFIG_LINKS = $CONFIG_LINKS
  4885. + CONFIG_COMMANDS = $CONFIG_COMMANDS
  4886. + $ $0 $@
  4887. +
  4888. +_CSEOF
  4889. +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
  4890. +echo >&5
  4891. +_ACEOF
  4892. +
  4893. +# Files that config.status was made for.
  4894. +if test -n "$ac_config_files"; then
  4895. + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
  4896. +fi
  4897. +
  4898. +if test -n "$ac_config_headers"; then
  4899. + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
  4900. +fi
  4901. +
  4902. +if test -n "$ac_config_links"; then
  4903. + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
  4904. +fi
  4905. +
  4906. +if test -n "$ac_config_commands"; then
  4907. + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
  4908. +fi
  4909. +
  4910. +cat >>$CONFIG_STATUS <<\_ACEOF
  4911. +
  4912. +ac_cs_usage="\
  4913. +\`$as_me' instantiates files from templates according to the
  4914. +current configuration.
  4915. +
  4916. +Usage: $0 [OPTIONS] [FILE]...
  4917. +
  4918. + -h, --help print this help, then exit
  4919. + -V, --version print version number, then exit
  4920. + -q, --quiet do not print progress messages
  4921. + -d, --debug don't remove temporary files
  4922. + --recheck update $as_me by reconfiguring in the same conditions
  4923. + --file=FILE[:TEMPLATE]
  4924. + instantiate the configuration file FILE
  4925. +
  4926. +Configuration files:
  4927. +$config_files
  4928. +
  4929. +Configuration commands:
  4930. +$config_commands
  4931. +
  4932. +Report bugs to <bug-autoconf@gnu.org>."
  4933. +_ACEOF
  4934. +
  4935. +cat >>$CONFIG_STATUS <<_ACEOF
  4936. +ac_cs_version="\\
  4937. +config.status
  4938. +configured by $0, generated by GNU Autoconf 2.59,
  4939. + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
  4940. +
  4941. +Copyright (C) 2003 Free Software Foundation, Inc.
  4942. +This config.status script is free software; the Free Software Foundation
  4943. +gives unlimited permission to copy, distribute and modify it."
  4944. +srcdir=$srcdir
  4945. +INSTALL="$INSTALL"
  4946. +_ACEOF
  4947. +
  4948. +cat >>$CONFIG_STATUS <<\_ACEOF
  4949. +# If no file are specified by the user, then we need to provide default
  4950. +# value. By we need to know if files were specified by the user.
  4951. +ac_need_defaults=:
  4952. +while test $# != 0
  4953. +do
  4954. + case $1 in
  4955. + --*=*)
  4956. + ac_option=`expr "x$1" : 'x\([^=]*\)='`
  4957. + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
  4958. + ac_shift=:
  4959. + ;;
  4960. + -*)
  4961. + ac_option=$1
  4962. + ac_optarg=$2
  4963. + ac_shift=shift
  4964. + ;;
  4965. + *) # This is not an option, so the user has probably given explicit
  4966. + # arguments.
  4967. + ac_option=$1
  4968. + ac_need_defaults=false;;
  4969. + esac
  4970. +
  4971. + case $ac_option in
  4972. + # Handling of the options.
  4973. +_ACEOF
  4974. +cat >>$CONFIG_STATUS <<\_ACEOF
  4975. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  4976. + ac_cs_recheck=: ;;
  4977. + --version | --vers* | -V )
  4978. + echo "$ac_cs_version"; exit 0 ;;
  4979. + --he | --h)
  4980. + # Conflict between --help and --header
  4981. + { { echo "$as_me:$LINENO: error: ambiguous option: $1
  4982. +Try \`$0 --help' for more information." >&5
  4983. +echo "$as_me: error: ambiguous option: $1
  4984. +Try \`$0 --help' for more information." >&2;}
  4985. + { (exit 1); exit 1; }; };;
  4986. + --help | --hel | -h )
  4987. + echo "$ac_cs_usage"; exit 0 ;;
  4988. + --debug | --d* | -d )
  4989. + debug=: ;;
  4990. + --file | --fil | --fi | --f )
  4991. + $ac_shift
  4992. + CONFIG_FILES="$CONFIG_FILES $ac_optarg"
  4993. + ac_need_defaults=false;;
  4994. + --header | --heade | --head | --hea )
  4995. + $ac_shift
  4996. + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
  4997. + ac_need_defaults=false;;
  4998. + -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  4999. + | -silent | --silent | --silen | --sile | --sil | --si | --s)
  5000. + ac_cs_silent=: ;;
  5001. +
  5002. + # This is an error.
  5003. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
  5004. +Try \`$0 --help' for more information." >&5
  5005. +echo "$as_me: error: unrecognized option: $1
  5006. +Try \`$0 --help' for more information." >&2;}
  5007. + { (exit 1); exit 1; }; } ;;
  5008. +
  5009. + *) ac_config_targets="$ac_config_targets $1" ;;
  5010. +
  5011. + esac
  5012. + shift
  5013. +done
  5014. +
  5015. +ac_configure_extra_args=
  5016. +
  5017. +if $ac_cs_silent; then
  5018. + exec 6>/dev/null
  5019. + ac_configure_extra_args="$ac_configure_extra_args --silent"
  5020. +fi
  5021. +
  5022. +_ACEOF
  5023. +cat >>$CONFIG_STATUS <<_ACEOF
  5024. +if \$ac_cs_recheck; then
  5025. + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
  5026. + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
  5027. +fi
  5028. +
  5029. +_ACEOF
  5030. +
  5031. +cat >>$CONFIG_STATUS <<_ACEOF
  5032. +#
  5033. +# INIT-COMMANDS section.
  5034. +#
  5035. +
  5036. +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
  5037. +
  5038. +_ACEOF
  5039. +
  5040. +
  5041. +
  5042. +cat >>$CONFIG_STATUS <<\_ACEOF
  5043. +for ac_config_target in $ac_config_targets
  5044. +do
  5045. + case "$ac_config_target" in
  5046. + # Handling of arguments.
  5047. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
  5048. + "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
  5049. + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
  5050. +echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
  5051. + { (exit 1); exit 1; }; };;
  5052. + esac
  5053. +done
  5054. +
  5055. +# If the user did not use the arguments to specify the items to instantiate,
  5056. +# then the envvar interface is used. Set only those that are not.
  5057. +# We use the long form for the default assignment because of an extremely
  5058. +# bizarre bug on SunOS 4.1.3.
  5059. +if $ac_need_defaults; then
  5060. + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
  5061. + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
  5062. +fi
  5063. +
  5064. +# Have a temporary directory for convenience. Make it in the build tree
  5065. +# simply because there is no reason to put it here, and in addition,
  5066. +# creating and moving files from /tmp can sometimes cause problems.
  5067. +# Create a temporary directory, and hook for its removal unless debugging.
  5068. +$debug ||
  5069. +{
  5070. + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
  5071. + trap '{ (exit 1); exit 1; }' 1 2 13 15
  5072. +}
  5073. +
  5074. +# Create a (secure) tmp directory for tmp files.
  5075. +
  5076. +{
  5077. + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
  5078. + test -n "$tmp" && test -d "$tmp"
  5079. +} ||
  5080. +{
  5081. + tmp=./confstat$$-$RANDOM
  5082. + (umask 077 && mkdir $tmp)
  5083. +} ||
  5084. +{
  5085. + echo "$me: cannot create a temporary directory in ." >&2
  5086. + { (exit 1); exit 1; }
  5087. +}
  5088. +
  5089. +_ACEOF
  5090. +
  5091. +cat >>$CONFIG_STATUS <<_ACEOF
  5092. +
  5093. +#
  5094. +# CONFIG_FILES section.
  5095. +#
  5096. +
  5097. +# No need to generate the scripts if there are no CONFIG_FILES.
  5098. +# This happens for instance when ./config.status config.h
  5099. +if test -n "\$CONFIG_FILES"; then
  5100. + # Protect against being on the right side of a sed subst in config.status.
  5101. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
  5102. + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
  5103. +s,@SHELL@,$SHELL,;t t
  5104. +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
  5105. +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
  5106. +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
  5107. +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
  5108. +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
  5109. +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
  5110. +s,@exec_prefix@,$exec_prefix,;t t
  5111. +s,@prefix@,$prefix,;t t
  5112. +s,@program_transform_name@,$program_transform_name,;t t
  5113. +s,@bindir@,$bindir,;t t
  5114. +s,@sbindir@,$sbindir,;t t
  5115. +s,@libexecdir@,$libexecdir,;t t
  5116. +s,@datadir@,$datadir,;t t
  5117. +s,@sysconfdir@,$sysconfdir,;t t
  5118. +s,@sharedstatedir@,$sharedstatedir,;t t
  5119. +s,@localstatedir@,$localstatedir,;t t
  5120. +s,@libdir@,$libdir,;t t
  5121. +s,@includedir@,$includedir,;t t
  5122. +s,@oldincludedir@,$oldincludedir,;t t
  5123. +s,@infodir@,$infodir,;t t
  5124. +s,@mandir@,$mandir,;t t
  5125. +s,@build_alias@,$build_alias,;t t
  5126. +s,@host_alias@,$host_alias,;t t
  5127. +s,@target_alias@,$target_alias,;t t
  5128. +s,@DEFS@,$DEFS,;t t
  5129. +s,@ECHO_C@,$ECHO_C,;t t
  5130. +s,@ECHO_N@,$ECHO_N,;t t
  5131. +s,@ECHO_T@,$ECHO_T,;t t
  5132. +s,@LIBS@,$LIBS,;t t
  5133. +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
  5134. +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
  5135. +s,@INSTALL_DATA@,$INSTALL_DATA,;t t
  5136. +s,@CYGPATH_W@,$CYGPATH_W,;t t
  5137. +s,@PACKAGE@,$PACKAGE,;t t
  5138. +s,@VERSION@,$VERSION,;t t
  5139. +s,@ACLOCAL@,$ACLOCAL,;t t
  5140. +s,@AUTOCONF@,$AUTOCONF,;t t
  5141. +s,@AUTOMAKE@,$AUTOMAKE,;t t
  5142. +s,@AUTOHEADER@,$AUTOHEADER,;t t
  5143. +s,@MAKEINFO@,$MAKEINFO,;t t
  5144. +s,@AMTAR@,$AMTAR,;t t
  5145. +s,@install_sh@,$install_sh,;t t
  5146. +s,@STRIP@,$STRIP,;t t
  5147. +s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
  5148. +s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
  5149. +s,@mkdir_p@,$mkdir_p,;t t
  5150. +s,@AWK@,$AWK,;t t
  5151. +s,@SET_MAKE@,$SET_MAKE,;t t
  5152. +s,@am__leading_dot@,$am__leading_dot,;t t
  5153. +s,@CC@,$CC,;t t
  5154. +s,@CFLAGS@,$CFLAGS,;t t
  5155. +s,@LDFLAGS@,$LDFLAGS,;t t
  5156. +s,@CPPFLAGS@,$CPPFLAGS,;t t
  5157. +s,@ac_ct_CC@,$ac_ct_CC,;t t
  5158. +s,@EXEEXT@,$EXEEXT,;t t
  5159. +s,@OBJEXT@,$OBJEXT,;t t
  5160. +s,@DEPDIR@,$DEPDIR,;t t
  5161. +s,@am__include@,$am__include,;t t
  5162. +s,@am__quote@,$am__quote,;t t
  5163. +s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
  5164. +s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
  5165. +s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
  5166. +s,@CCDEPMODE@,$CCDEPMODE,;t t
  5167. +s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
  5168. +s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
  5169. +s,@LIBOBJS@,$LIBOBJS,;t t
  5170. +s,@LTLIBOBJS@,$LTLIBOBJS,;t t
  5171. +CEOF
  5172. +
  5173. +_ACEOF
  5174. +
  5175. + cat >>$CONFIG_STATUS <<\_ACEOF
  5176. + # Split the substitutions into bite-sized pieces for seds with
  5177. + # small command number limits, like on Digital OSF/1 and HP-UX.
  5178. + ac_max_sed_lines=48
  5179. + ac_sed_frag=1 # Number of current file.
  5180. + ac_beg=1 # First line for current file.
  5181. + ac_end=$ac_max_sed_lines # Line after last line for current file.
  5182. + ac_more_lines=:
  5183. + ac_sed_cmds=
  5184. + while $ac_more_lines; do
  5185. + if test $ac_beg -gt 1; then
  5186. + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
  5187. + else
  5188. + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
  5189. + fi
  5190. + if test ! -s $tmp/subs.frag; then
  5191. + ac_more_lines=false
  5192. + else
  5193. + # The purpose of the label and of the branching condition is to
  5194. + # speed up the sed processing (if there are no `@' at all, there
  5195. + # is no need to browse any of the substitutions).
  5196. + # These are the two extra sed commands mentioned above.
  5197. + (echo ':t
  5198. + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
  5199. + if test -z "$ac_sed_cmds"; then
  5200. + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
  5201. + else
  5202. + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
  5203. + fi
  5204. + ac_sed_frag=`expr $ac_sed_frag + 1`
  5205. + ac_beg=$ac_end
  5206. + ac_end=`expr $ac_end + $ac_max_sed_lines`
  5207. + fi
  5208. + done
  5209. + if test -z "$ac_sed_cmds"; then
  5210. + ac_sed_cmds=cat
  5211. + fi
  5212. +fi # test -n "$CONFIG_FILES"
  5213. +
  5214. +_ACEOF
  5215. +cat >>$CONFIG_STATUS <<\_ACEOF
  5216. +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
  5217. + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  5218. + case $ac_file in
  5219. + - | *:- | *:-:* ) # input from stdin
  5220. + cat >$tmp/stdin
  5221. + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
  5222. + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  5223. + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
  5224. + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  5225. + * ) ac_file_in=$ac_file.in ;;
  5226. + esac
  5227. +
  5228. + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
  5229. + ac_dir=`(dirname "$ac_file") 2>/dev/null ||
  5230. +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  5231. + X"$ac_file" : 'X\(//\)[^/]' \| \
  5232. + X"$ac_file" : 'X\(//\)$' \| \
  5233. + X"$ac_file" : 'X\(/\)' \| \
  5234. + . : '\(.\)' 2>/dev/null ||
  5235. +echo X"$ac_file" |
  5236. + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  5237. + /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  5238. + /^X\(\/\/\)$/{ s//\1/; q; }
  5239. + /^X\(\/\).*/{ s//\1/; q; }
  5240. + s/.*/./; q'`
  5241. + { if $as_mkdir_p; then
  5242. + mkdir -p "$ac_dir"
  5243. + else
  5244. + as_dir="$ac_dir"
  5245. + as_dirs=
  5246. + while test ! -d "$as_dir"; do
  5247. + as_dirs="$as_dir $as_dirs"
  5248. + as_dir=`(dirname "$as_dir") 2>/dev/null ||
  5249. +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  5250. + X"$as_dir" : 'X\(//\)[^/]' \| \
  5251. + X"$as_dir" : 'X\(//\)$' \| \
  5252. + X"$as_dir" : 'X\(/\)' \| \
  5253. + . : '\(.\)' 2>/dev/null ||
  5254. +echo X"$as_dir" |
  5255. + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  5256. + /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  5257. + /^X\(\/\/\)$/{ s//\1/; q; }
  5258. + /^X\(\/\).*/{ s//\1/; q; }
  5259. + s/.*/./; q'`
  5260. + done
  5261. + test ! -n "$as_dirs" || mkdir $as_dirs
  5262. + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
  5263. +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
  5264. + { (exit 1); exit 1; }; }; }
  5265. +
  5266. + ac_builddir=.
  5267. +
  5268. +if test "$ac_dir" != .; then
  5269. + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
  5270. + # A "../" for each directory in $ac_dir_suffix.
  5271. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
  5272. +else
  5273. + ac_dir_suffix= ac_top_builddir=
  5274. +fi
  5275. +
  5276. +case $srcdir in
  5277. + .) # No --srcdir option. We are building in place.
  5278. + ac_srcdir=.
  5279. + if test -z "$ac_top_builddir"; then
  5280. + ac_top_srcdir=.
  5281. + else
  5282. + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
  5283. + fi ;;
  5284. + [\\/]* | ?:[\\/]* ) # Absolute path.
  5285. + ac_srcdir=$srcdir$ac_dir_suffix;
  5286. + ac_top_srcdir=$srcdir ;;
  5287. + *) # Relative path.
  5288. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
  5289. + ac_top_srcdir=$ac_top_builddir$srcdir ;;
  5290. +esac
  5291. +
  5292. +# Do not use `cd foo && pwd` to compute absolute paths, because
  5293. +# the directories may not exist.
  5294. +case `pwd` in
  5295. +.) ac_abs_builddir="$ac_dir";;
  5296. +*)
  5297. + case "$ac_dir" in
  5298. + .) ac_abs_builddir=`pwd`;;
  5299. + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
  5300. + *) ac_abs_builddir=`pwd`/"$ac_dir";;
  5301. + esac;;
  5302. +esac
  5303. +case $ac_abs_builddir in
  5304. +.) ac_abs_top_builddir=${ac_top_builddir}.;;
  5305. +*)
  5306. + case ${ac_top_builddir}. in
  5307. + .) ac_abs_top_builddir=$ac_abs_builddir;;
  5308. + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
  5309. + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
  5310. + esac;;
  5311. +esac
  5312. +case $ac_abs_builddir in
  5313. +.) ac_abs_srcdir=$ac_srcdir;;
  5314. +*)
  5315. + case $ac_srcdir in
  5316. + .) ac_abs_srcdir=$ac_abs_builddir;;
  5317. + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
  5318. + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
  5319. + esac;;
  5320. +esac
  5321. +case $ac_abs_builddir in
  5322. +.) ac_abs_top_srcdir=$ac_top_srcdir;;
  5323. +*)
  5324. + case $ac_top_srcdir in
  5325. + .) ac_abs_top_srcdir=$ac_abs_builddir;;
  5326. + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
  5327. + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
  5328. + esac;;
  5329. +esac
  5330. +
  5331. +
  5332. + case $INSTALL in
  5333. + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
  5334. + *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
  5335. + esac
  5336. +
  5337. + # Let's still pretend it is `configure' which instantiates (i.e., don't
  5338. + # use $as_me), people would be surprised to read:
  5339. + # /* config.h. Generated by config.status. */
  5340. + if test x"$ac_file" = x-; then
  5341. + configure_input=
  5342. + else
  5343. + configure_input="$ac_file. "
  5344. + fi
  5345. + configure_input=$configure_input"Generated from `echo $ac_file_in |
  5346. + sed 's,.*/,,'` by configure."
  5347. +
  5348. + # First look for the input files in the build tree, otherwise in the
  5349. + # src tree.
  5350. + ac_file_inputs=`IFS=:
  5351. + for f in $ac_file_in; do
  5352. + case $f in
  5353. + -) echo $tmp/stdin ;;
  5354. + [\\/$]*)
  5355. + # Absolute (can't be DOS-style, as IFS=:)
  5356. + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
  5357. +echo "$as_me: error: cannot find input file: $f" >&2;}
  5358. + { (exit 1); exit 1; }; }
  5359. + echo "$f";;
  5360. + *) # Relative
  5361. + if test -f "$f"; then
  5362. + # Build tree
  5363. + echo "$f"
  5364. + elif test -f "$srcdir/$f"; then
  5365. + # Source tree
  5366. + echo "$srcdir/$f"
  5367. + else
  5368. + # /dev/null tree
  5369. + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
  5370. +echo "$as_me: error: cannot find input file: $f" >&2;}
  5371. + { (exit 1); exit 1; }; }
  5372. + fi;;
  5373. + esac
  5374. + done` || { (exit 1); exit 1; }
  5375. +
  5376. + if test x"$ac_file" != x-; then
  5377. + { echo "$as_me:$LINENO: creating $ac_file" >&5
  5378. +echo "$as_me: creating $ac_file" >&6;}
  5379. + rm -f "$ac_file"
  5380. + fi
  5381. +_ACEOF
  5382. +cat >>$CONFIG_STATUS <<_ACEOF
  5383. + sed "$ac_vpsub
  5384. +$extrasub
  5385. +_ACEOF
  5386. +cat >>$CONFIG_STATUS <<\_ACEOF
  5387. +:t
  5388. +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
  5389. +s,@configure_input@,$configure_input,;t t
  5390. +s,@srcdir@,$ac_srcdir,;t t
  5391. +s,@abs_srcdir@,$ac_abs_srcdir,;t t
  5392. +s,@top_srcdir@,$ac_top_srcdir,;t t
  5393. +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
  5394. +s,@builddir@,$ac_builddir,;t t
  5395. +s,@abs_builddir@,$ac_abs_builddir,;t t
  5396. +s,@top_builddir@,$ac_top_builddir,;t t
  5397. +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
  5398. +s,@INSTALL@,$ac_INSTALL,;t t
  5399. +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
  5400. + rm -f $tmp/stdin
  5401. + if test x"$ac_file" != x-; then
  5402. + mv $tmp/out $ac_file
  5403. + else
  5404. + cat $tmp/out
  5405. + rm -f $tmp/out
  5406. + fi
  5407. +
  5408. +done
  5409. +_ACEOF
  5410. +cat >>$CONFIG_STATUS <<\_ACEOF
  5411. +
  5412. +#
  5413. +# CONFIG_COMMANDS section.
  5414. +#
  5415. +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
  5416. + ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
  5417. + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
  5418. + ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
  5419. +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  5420. + X"$ac_dest" : 'X\(//\)[^/]' \| \
  5421. + X"$ac_dest" : 'X\(//\)$' \| \
  5422. + X"$ac_dest" : 'X\(/\)' \| \
  5423. + . : '\(.\)' 2>/dev/null ||
  5424. +echo X"$ac_dest" |
  5425. + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  5426. + /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  5427. + /^X\(\/\/\)$/{ s//\1/; q; }
  5428. + /^X\(\/\).*/{ s//\1/; q; }
  5429. + s/.*/./; q'`
  5430. + { if $as_mkdir_p; then
  5431. + mkdir -p "$ac_dir"
  5432. + else
  5433. + as_dir="$ac_dir"
  5434. + as_dirs=
  5435. + while test ! -d "$as_dir"; do
  5436. + as_dirs="$as_dir $as_dirs"
  5437. + as_dir=`(dirname "$as_dir") 2>/dev/null ||
  5438. +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  5439. + X"$as_dir" : 'X\(//\)[^/]' \| \
  5440. + X"$as_dir" : 'X\(//\)$' \| \
  5441. + X"$as_dir" : 'X\(/\)' \| \
  5442. + . : '\(.\)' 2>/dev/null ||
  5443. +echo X"$as_dir" |
  5444. + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  5445. + /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  5446. + /^X\(\/\/\)$/{ s//\1/; q; }
  5447. + /^X\(\/\).*/{ s//\1/; q; }
  5448. + s/.*/./; q'`
  5449. + done
  5450. + test ! -n "$as_dirs" || mkdir $as_dirs
  5451. + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
  5452. +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
  5453. + { (exit 1); exit 1; }; }; }
  5454. +
  5455. + ac_builddir=.
  5456. +
  5457. +if test "$ac_dir" != .; then
  5458. + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
  5459. + # A "../" for each directory in $ac_dir_suffix.
  5460. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
  5461. +else
  5462. + ac_dir_suffix= ac_top_builddir=
  5463. +fi
  5464. +
  5465. +case $srcdir in
  5466. + .) # No --srcdir option. We are building in place.
  5467. + ac_srcdir=.
  5468. + if test -z "$ac_top_builddir"; then
  5469. + ac_top_srcdir=.
  5470. + else
  5471. + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
  5472. + fi ;;
  5473. + [\\/]* | ?:[\\/]* ) # Absolute path.
  5474. + ac_srcdir=$srcdir$ac_dir_suffix;
  5475. + ac_top_srcdir=$srcdir ;;
  5476. + *) # Relative path.
  5477. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
  5478. + ac_top_srcdir=$ac_top_builddir$srcdir ;;
  5479. +esac
  5480. +
  5481. +# Do not use `cd foo && pwd` to compute absolute paths, because
  5482. +# the directories may not exist.
  5483. +case `pwd` in
  5484. +.) ac_abs_builddir="$ac_dir";;
  5485. +*)
  5486. + case "$ac_dir" in
  5487. + .) ac_abs_builddir=`pwd`;;
  5488. + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
  5489. + *) ac_abs_builddir=`pwd`/"$ac_dir";;
  5490. + esac;;
  5491. +esac
  5492. +case $ac_abs_builddir in
  5493. +.) ac_abs_top_builddir=${ac_top_builddir}.;;
  5494. +*)
  5495. + case ${ac_top_builddir}. in
  5496. + .) ac_abs_top_builddir=$ac_abs_builddir;;
  5497. + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
  5498. + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
  5499. + esac;;
  5500. +esac
  5501. +case $ac_abs_builddir in
  5502. +.) ac_abs_srcdir=$ac_srcdir;;
  5503. +*)
  5504. + case $ac_srcdir in
  5505. + .) ac_abs_srcdir=$ac_abs_builddir;;
  5506. + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
  5507. + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
  5508. + esac;;
  5509. +esac
  5510. +case $ac_abs_builddir in
  5511. +.) ac_abs_top_srcdir=$ac_top_srcdir;;
  5512. +*)
  5513. + case $ac_top_srcdir in
  5514. + .) ac_abs_top_srcdir=$ac_abs_builddir;;
  5515. + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
  5516. + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
  5517. + esac;;
  5518. +esac
  5519. +
  5520. +
  5521. + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
  5522. +echo "$as_me: executing $ac_dest commands" >&6;}
  5523. + case $ac_dest in
  5524. + depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
  5525. + # Strip MF so we end up with the name of the file.
  5526. + mf=`echo "$mf" | sed -e 's/:.*$//'`
  5527. + # Check whether this is an Automake generated Makefile or not.
  5528. + # We used to match only the files named `Makefile.in', but
  5529. + # some people rename them; so instead we look at the file content.
  5530. + # Grep'ing the first line is not enough: some people post-process
  5531. + # each Makefile.in and add a new line on top of each file to say so.
  5532. + # So let's grep whole file.
  5533. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
  5534. + dirpart=`(dirname "$mf") 2>/dev/null ||
  5535. +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  5536. + X"$mf" : 'X\(//\)[^/]' \| \
  5537. + X"$mf" : 'X\(//\)$' \| \
  5538. + X"$mf" : 'X\(/\)' \| \
  5539. + . : '\(.\)' 2>/dev/null ||
  5540. +echo X"$mf" |
  5541. + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  5542. + /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  5543. + /^X\(\/\/\)$/{ s//\1/; q; }
  5544. + /^X\(\/\).*/{ s//\1/; q; }
  5545. + s/.*/./; q'`
  5546. + else
  5547. + continue
  5548. + fi
  5549. + grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
  5550. + # Extract the definition of DEP_FILES from the Makefile without
  5551. + # running `make'.
  5552. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  5553. + test -z "$DEPDIR" && continue
  5554. + # When using ansi2knr, U may be empty or an underscore; expand it
  5555. + U=`sed -n 's/^U = //p' < "$mf"`
  5556. + test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
  5557. + # We invoke sed twice because it is the simplest approach to
  5558. + # changing $(DEPDIR) to its actual value in the expansion.
  5559. + for file in `sed -n '
  5560. + /^DEP_FILES = .*\\\\$/ {
  5561. + s/^DEP_FILES = //
  5562. + :loop
  5563. + s/\\\\$//
  5564. + p
  5565. + n
  5566. + /\\\\$/ b loop
  5567. + p
  5568. + }
  5569. + /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
  5570. + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
  5571. + # Make sure the directory exists.
  5572. + test -f "$dirpart/$file" && continue
  5573. + fdir=`(dirname "$file") 2>/dev/null ||
  5574. +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  5575. + X"$file" : 'X\(//\)[^/]' \| \
  5576. + X"$file" : 'X\(//\)$' \| \
  5577. + X"$file" : 'X\(/\)' \| \
  5578. + . : '\(.\)' 2>/dev/null ||
  5579. +echo X"$file" |
  5580. + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  5581. + /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  5582. + /^X\(\/\/\)$/{ s//\1/; q; }
  5583. + /^X\(\/\).*/{ s//\1/; q; }
  5584. + s/.*/./; q'`
  5585. + { if $as_mkdir_p; then
  5586. + mkdir -p $dirpart/$fdir
  5587. + else
  5588. + as_dir=$dirpart/$fdir
  5589. + as_dirs=
  5590. + while test ! -d "$as_dir"; do
  5591. + as_dirs="$as_dir $as_dirs"
  5592. + as_dir=`(dirname "$as_dir") 2>/dev/null ||
  5593. +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  5594. + X"$as_dir" : 'X\(//\)[^/]' \| \
  5595. + X"$as_dir" : 'X\(//\)$' \| \
  5596. + X"$as_dir" : 'X\(/\)' \| \
  5597. + . : '\(.\)' 2>/dev/null ||
  5598. +echo X"$as_dir" |
  5599. + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  5600. + /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  5601. + /^X\(\/\/\)$/{ s//\1/; q; }
  5602. + /^X\(\/\).*/{ s//\1/; q; }
  5603. + s/.*/./; q'`
  5604. + done
  5605. + test ! -n "$as_dirs" || mkdir $as_dirs
  5606. + fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
  5607. +echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
  5608. + { (exit 1); exit 1; }; }; }
  5609. +
  5610. + # echo "creating $dirpart/$file"
  5611. + echo '# dummy' > "$dirpart/$file"
  5612. + done
  5613. +done
  5614. + ;;
  5615. + esac
  5616. +done
  5617. +_ACEOF
  5618. +
  5619. +cat >>$CONFIG_STATUS <<\_ACEOF
  5620. +
  5621. +{ (exit 0); exit 0; }
  5622. +_ACEOF
  5623. +chmod +x $CONFIG_STATUS
  5624. +ac_clean_files=$ac_clean_files_save
  5625. +
  5626. +
  5627. +# configure is writing to config.log, and then calls config.status.
  5628. +# config.status does its own redirection, appending to config.log.
  5629. +# Unfortunately, on DOS this fails, as config.log is still kept open
  5630. +# by configure, so config.status won't be able to write to it; its
  5631. +# output is simply discarded. So we exec the FD to /dev/null,
  5632. +# effectively closing config.log, so it can be properly (re)opened and
  5633. +# appended to by config.status. When coming back to configure, we
  5634. +# need to make the FD available again.
  5635. +if test "$no_create" != yes; then
  5636. + ac_cs_success=:
  5637. + ac_config_status_args=
  5638. + test "$silent" = yes &&
  5639. + ac_config_status_args="$ac_config_status_args --quiet"
  5640. + exec 5>/dev/null
  5641. + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
  5642. + exec 5>>config.log
  5643. + # Use ||, not &&, to avoid exiting from the if with $? = 1, which
  5644. + # would make configure fail if this is the last instruction.
  5645. + $ac_cs_success || { (exit 1); exit 1; }
  5646. +fi
  5647. +
  5648. diff --exclude CVS -urN genext2fs-1.3.orig/configure.in genext2fs/configure.in
  5649. --- genext2fs-1.3.orig/configure.in 1969-12-31 17:00:00.000000000 -0700
  5650. +++ genext2fs/configure.in 2001-05-02 12:20:05.000000000 -0600
  5651. @@ -0,0 +1,5 @@
  5652. +AC_INIT(genext2fs.c)
  5653. +AM_INIT_AUTOMAKE(genext2fs,1.3)
  5654. +AC_PROG_CC
  5655. +AC_PROG_INSTALL
  5656. +AC_OUTPUT(Makefile)
  5657. diff --exclude CVS -urN genext2fs-1.3.orig/debian/changelog genext2fs/debian/changelog
  5658. --- genext2fs-1.3.orig/debian/changelog 1969-12-31 17:00:00.000000000 -0700
  5659. +++ genext2fs/debian/changelog 2001-07-26 22:41:25.000000000 -0600
  5660. @@ -0,0 +1,9 @@
  5661. +genext2fs (1.3-1) unstable; urgency=low
  5662. +
  5663. + * Initial Release. (closes: #105263)
  5664. +
  5665. + -- David Kimdon <dwhedon@debian.org> Sat, 14 Jul 2001 13:24:49 -0700
  5666. +
  5667. +Local variables:
  5668. +mode: debian-changelog
  5669. +End:
  5670. diff --exclude CVS -urN genext2fs-1.3.orig/debian/control genext2fs/debian/control
  5671. --- genext2fs-1.3.orig/debian/control 1969-12-31 17:00:00.000000000 -0700
  5672. +++ genext2fs/debian/control 2001-07-16 18:01:00.000000000 -0600
  5673. @@ -0,0 +1,19 @@
  5674. +Source: genext2fs
  5675. +Section: admin
  5676. +Priority: optional
  5677. +Maintainer: David Kimdon <dwhedon@debian.org>
  5678. +Build-Depends: debhelper (>> 3.0.0)
  5679. +Standards-Version: 3.5.2
  5680. +
  5681. +Package: genext2fs
  5682. +Architecture: any
  5683. +Depends: ${shlibs:Depends}
  5684. +Description: ext2 filesystem generator for embedded systems
  5685. + `genext2fs' is meant to generate an ext2 filesystem
  5686. + as a normal (non-root) user. It doesn't require you to mount
  5687. + the image file to copy files on it. It doesn't even require
  5688. + you to be the superuser to make device nodes.
  5689. + .
  5690. + Warning ! `genext2fs' has been designed for embedded
  5691. + systems. As such, it will generate a filesystem for single-user
  5692. + usage: all files/directories/etc... will belong to UID/GID 0
  5693. diff --exclude CVS -urN genext2fs-1.3.orig/debian/copyright genext2fs/debian/copyright
  5694. --- genext2fs-1.3.orig/debian/copyright 1969-12-31 17:00:00.000000000 -0700
  5695. +++ genext2fs/debian/copyright 2001-07-16 18:01:00.000000000 -0600
  5696. @@ -0,0 +1,15 @@
  5697. +This package was debianized by David Kimdon <dwhedon@debian.org> on
  5698. +Sat, 14 Jul 2001 13:24:49 -0700.
  5699. +
  5700. +It was downloaded from http://freshmeat.net/projects/genext2fs/
  5701. +Upstream Author(s): Xavier Bestel <xbestel@aplio.fr>
  5702. +
  5703. +Copyright (C) 2000 Xavier Bestel <xavier.bestel@free.fr>
  5704. +
  5705. +This program is free software; you can redistribute it and/or
  5706. +modify it under the terms of the GNU General Public License
  5707. +as published by the Free Software Foundation; version
  5708. +2 of the License.
  5709. +
  5710. +On Debian systems, the complete text of the GNU General Public
  5711. +License can be found in /usr/share/common-licenses/GPL file.
  5712. diff --exclude CVS -urN genext2fs-1.3.orig/debian/rules genext2fs/debian/rules
  5713. --- genext2fs-1.3.orig/debian/rules 1969-12-31 17:00:00.000000000 -0700
  5714. +++ genext2fs/debian/rules 2001-07-27 09:08:16.000000000 -0600
  5715. @@ -0,0 +1,69 @@
  5716. +#!/usr/bin/make -f
  5717. +# Sample debian/rules that uses debhelper.
  5718. +# GNU copyright 1997 to 1999 by Joey Hess.
  5719. +
  5720. +# Uncomment this to turn on verbose mode.
  5721. +#export DH_VERBOSE=1
  5722. +
  5723. +# This is the debhelper compatability version to use.
  5724. +export DH_COMPAT=2
  5725. +
  5726. +configure: configure-stamp
  5727. +configure-stamp:
  5728. + dh_testdir
  5729. + # Add here commands to configure the package.
  5730. + # ./configure --prefix=/usr --mandir=/usr/share/man/
  5731. +
  5732. + touch configure-stamp
  5733. +
  5734. +build: configure-stamp build-stamp
  5735. +build-stamp:
  5736. + dh_testdir
  5737. +
  5738. + # Add here commands to compile the package.
  5739. + $(MAKE)
  5740. +
  5741. + touch build-stamp
  5742. +
  5743. +clean:
  5744. + dh_testdir
  5745. + dh_testroot
  5746. + rm -f build-stamp configure-stamp
  5747. +
  5748. + # Add here commands to clean up after the build process.
  5749. + -$(MAKE) clean
  5750. +
  5751. + dh_clean
  5752. +
  5753. +install: build
  5754. + dh_testdir
  5755. + dh_testroot
  5756. + dh_clean -k
  5757. + dh_installdirs
  5758. +
  5759. + # Add here commands to install the package into debian/genext2fs.
  5760. + $(MAKE) install DESTDIR=`pwd`/debian/genext2fs
  5761. +
  5762. +
  5763. +# Build architecture-independent files here.
  5764. +binary-indep: build install
  5765. +# We have nothing to do by default.
  5766. +
  5767. +# Build architecture-dependent files here.
  5768. +binary-arch: build install
  5769. + dh_testdir
  5770. + dh_testroot
  5771. + dh_installdocs
  5772. + dh_installchangelogs
  5773. + dh_link
  5774. + dh_strip
  5775. + dh_compress
  5776. + dh_fixperms
  5777. + dh_installdeb
  5778. + dh_shlibdeps
  5779. + dh_gencontrol
  5780. + dh_md5sums
  5781. + dh_builddeb
  5782. +
  5783. +binary: binary-indep binary-arch
  5784. +.PHONY: build clean binary-indep binary-arch binary install configure
  5785. diff --exclude CVS -urN genext2fs-1.3.orig/depcomp genext2fs/depcomp
  5786. --- genext2fs-1.3.orig/depcomp 1969-12-31 17:00:00.000000000 -0700
  5787. +++ genext2fs/depcomp 2004-12-27 13:03:47.000000000 -0700
  5788. @@ -0,0 +1,526 @@
  5789. +#! /bin/sh
  5790. +# depcomp - compile a program generating dependencies as side-effects
  5791. +
  5792. +scriptversion=2004-04-25.13
  5793. +
  5794. +# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
  5795. +
  5796. +# This program is free software; you can redistribute it and/or modify
  5797. +# it under the terms of the GNU General Public License as published by
  5798. +# the Free Software Foundation; either version 2, or (at your option)
  5799. +# any later version.
  5800. +
  5801. +# This program is distributed in the hope that it will be useful,
  5802. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  5803. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  5804. +# GNU General Public License for more details.
  5805. +
  5806. +# You should have received a copy of the GNU General Public License
  5807. +# along with this program; if not, write to the Free Software
  5808. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  5809. +# 02111-1307, USA.
  5810. +
  5811. +# As a special exception to the GNU General Public License, if you
  5812. +# distribute this file as part of a program that contains a
  5813. +# configuration script generated by Autoconf, you may include it under
  5814. +# the same distribution terms that you use for the rest of that program.
  5815. +
  5816. +# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
  5817. +
  5818. +case $1 in
  5819. + '')
  5820. + echo "$0: No command. Try \`$0 --help' for more information." 1>&2
  5821. + exit 1;
  5822. + ;;
  5823. + -h | --h*)
  5824. + cat <<\EOF
  5825. +Usage: depcomp [--help] [--version] PROGRAM [ARGS]
  5826. +
  5827. +Run PROGRAMS ARGS to compile a file, generating dependencies
  5828. +as side-effects.
  5829. +
  5830. +Environment variables:
  5831. + depmode Dependency tracking mode.
  5832. + source Source file read by `PROGRAMS ARGS'.
  5833. + object Object file output by `PROGRAMS ARGS'.
  5834. + depfile Dependency file to output.
  5835. + tmpdepfile Temporary file to use when outputing dependencies.
  5836. + libtool Whether libtool is used (yes/no).
  5837. +
  5838. +Report bugs to <bug-automake@gnu.org>.
  5839. +EOF
  5840. + exit 0
  5841. + ;;
  5842. + -v | --v*)
  5843. + echo "depcomp $scriptversion"
  5844. + exit 0
  5845. + ;;
  5846. +esac
  5847. +
  5848. +if test -z "$depmode" || test -z "$source" || test -z "$object"; then
  5849. + echo "depcomp: Variables source, object and depmode must be set" 1>&2
  5850. + exit 1
  5851. +fi
  5852. +# `libtool' can also be set to `yes' or `no'.
  5853. +
  5854. +if test -z "$depfile"; then
  5855. + base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
  5856. + dir=`echo "$object" | sed 's,/.*$,/,'`
  5857. + if test "$dir" = "$object"; then
  5858. + dir=
  5859. + fi
  5860. + # FIXME: should be _deps on DOS.
  5861. + depfile="$dir.deps/$base"
  5862. +fi
  5863. +
  5864. +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
  5865. +
  5866. +rm -f "$tmpdepfile"
  5867. +
  5868. +# Some modes work just like other modes, but use different flags. We
  5869. +# parameterize here, but still list the modes in the big case below,
  5870. +# to make depend.m4 easier to write. Note that we *cannot* use a case
  5871. +# here, because this file can only contain one case statement.
  5872. +if test "$depmode" = hp; then
  5873. + # HP compiler uses -M and no extra arg.
  5874. + gccflag=-M
  5875. + depmode=gcc
  5876. +fi
  5877. +
  5878. +if test "$depmode" = dashXmstdout; then
  5879. + # This is just like dashmstdout with a different argument.
  5880. + dashmflag=-xM
  5881. + depmode=dashmstdout
  5882. +fi
  5883. +
  5884. +case "$depmode" in
  5885. +gcc3)
  5886. +## gcc 3 implements dependency tracking that does exactly what
  5887. +## we want. Yay! Note: for some reason libtool 1.4 doesn't like
  5888. +## it if -MD -MP comes after the -MF stuff. Hmm.
  5889. + "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
  5890. + stat=$?
  5891. + if test $stat -eq 0; then :
  5892. + else
  5893. + rm -f "$tmpdepfile"
  5894. + exit $stat
  5895. + fi
  5896. + mv "$tmpdepfile" "$depfile"
  5897. + ;;
  5898. +
  5899. +gcc)
  5900. +## There are various ways to get dependency output from gcc. Here's
  5901. +## why we pick this rather obscure method:
  5902. +## - Don't want to use -MD because we'd like the dependencies to end
  5903. +## up in a subdir. Having to rename by hand is ugly.
  5904. +## (We might end up doing this anyway to support other compilers.)
  5905. +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
  5906. +## -MM, not -M (despite what the docs say).
  5907. +## - Using -M directly means running the compiler twice (even worse
  5908. +## than renaming).
  5909. + if test -z "$gccflag"; then
  5910. + gccflag=-MD,
  5911. + fi
  5912. + "$@" -Wp,"$gccflag$tmpdepfile"
  5913. + stat=$?
  5914. + if test $stat -eq 0; then :
  5915. + else
  5916. + rm -f "$tmpdepfile"
  5917. + exit $stat
  5918. + fi
  5919. + rm -f "$depfile"
  5920. + echo "$object : \\" > "$depfile"
  5921. + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
  5922. +## The second -e expression handles DOS-style file names with drive letters.
  5923. + sed -e 's/^[^:]*: / /' \
  5924. + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
  5925. +## This next piece of magic avoids the `deleted header file' problem.
  5926. +## The problem is that when a header file which appears in a .P file
  5927. +## is deleted, the dependency causes make to die (because there is
  5928. +## typically no way to rebuild the header). We avoid this by adding
  5929. +## dummy dependencies for each header file. Too bad gcc doesn't do
  5930. +## this for us directly.
  5931. + tr ' ' '
  5932. +' < "$tmpdepfile" |
  5933. +## Some versions of gcc put a space before the `:'. On the theory
  5934. +## that the space means something, we add a space to the output as
  5935. +## well.
  5936. +## Some versions of the HPUX 10.20 sed can't process this invocation
  5937. +## correctly. Breaking it into two sed invocations is a workaround.
  5938. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
  5939. + rm -f "$tmpdepfile"
  5940. + ;;
  5941. +
  5942. +hp)
  5943. + # This case exists only to let depend.m4 do its work. It works by
  5944. + # looking at the text of this script. This case will never be run,
  5945. + # since it is checked for above.
  5946. + exit 1
  5947. + ;;
  5948. +
  5949. +sgi)
  5950. + if test "$libtool" = yes; then
  5951. + "$@" "-Wp,-MDupdate,$tmpdepfile"
  5952. + else
  5953. + "$@" -MDupdate "$tmpdepfile"
  5954. + fi
  5955. + stat=$?
  5956. + if test $stat -eq 0; then :
  5957. + else
  5958. + rm -f "$tmpdepfile"
  5959. + exit $stat
  5960. + fi
  5961. + rm -f "$depfile"
  5962. +
  5963. + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
  5964. + echo "$object : \\" > "$depfile"
  5965. +
  5966. + # Clip off the initial element (the dependent). Don't try to be
  5967. + # clever and replace this with sed code, as IRIX sed won't handle
  5968. + # lines with more than a fixed number of characters (4096 in
  5969. + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
  5970. + # the IRIX cc adds comments like `#:fec' to the end of the
  5971. + # dependency line.
  5972. + tr ' ' '
  5973. +' < "$tmpdepfile" \
  5974. + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
  5975. + tr '
  5976. +' ' ' >> $depfile
  5977. + echo >> $depfile
  5978. +
  5979. + # The second pass generates a dummy entry for each header file.
  5980. + tr ' ' '
  5981. +' < "$tmpdepfile" \
  5982. + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
  5983. + >> $depfile
  5984. + else
  5985. + # The sourcefile does not contain any dependencies, so just
  5986. + # store a dummy comment line, to avoid errors with the Makefile
  5987. + # "include basename.Plo" scheme.
  5988. + echo "#dummy" > "$depfile"
  5989. + fi
  5990. + rm -f "$tmpdepfile"
  5991. + ;;
  5992. +
  5993. +aix)
  5994. + # The C for AIX Compiler uses -M and outputs the dependencies
  5995. + # in a .u file. In older versions, this file always lives in the
  5996. + # current directory. Also, the AIX compiler puts `$object:' at the
  5997. + # start of each line; $object doesn't have directory information.
  5998. + # Version 6 uses the directory in both cases.
  5999. + stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
  6000. + tmpdepfile="$stripped.u"
  6001. + if test "$libtool" = yes; then
  6002. + "$@" -Wc,-M
  6003. + else
  6004. + "$@" -M
  6005. + fi
  6006. + stat=$?
  6007. +
  6008. + if test -f "$tmpdepfile"; then :
  6009. + else
  6010. + stripped=`echo "$stripped" | sed 's,^.*/,,'`
  6011. + tmpdepfile="$stripped.u"
  6012. + fi
  6013. +
  6014. + if test $stat -eq 0; then :
  6015. + else
  6016. + rm -f "$tmpdepfile"
  6017. + exit $stat
  6018. + fi
  6019. +
  6020. + if test -f "$tmpdepfile"; then
  6021. + outname="$stripped.o"
  6022. + # Each line is of the form `foo.o: dependent.h'.
  6023. + # Do two passes, one to just change these to
  6024. + # `$object: dependent.h' and one to simply `dependent.h:'.
  6025. + sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
  6026. + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
  6027. + else
  6028. + # The sourcefile does not contain any dependencies, so just
  6029. + # store a dummy comment line, to avoid errors with the Makefile
  6030. + # "include basename.Plo" scheme.
  6031. + echo "#dummy" > "$depfile"
  6032. + fi
  6033. + rm -f "$tmpdepfile"
  6034. + ;;
  6035. +
  6036. +icc)
  6037. + # Intel's C compiler understands `-MD -MF file'. However on
  6038. + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
  6039. + # ICC 7.0 will fill foo.d with something like
  6040. + # foo.o: sub/foo.c
  6041. + # foo.o: sub/foo.h
  6042. + # which is wrong. We want:
  6043. + # sub/foo.o: sub/foo.c
  6044. + # sub/foo.o: sub/foo.h
  6045. + # sub/foo.c:
  6046. + # sub/foo.h:
  6047. + # ICC 7.1 will output
  6048. + # foo.o: sub/foo.c sub/foo.h
  6049. + # and will wrap long lines using \ :
  6050. + # foo.o: sub/foo.c ... \
  6051. + # sub/foo.h ... \
  6052. + # ...
  6053. +
  6054. + "$@" -MD -MF "$tmpdepfile"
  6055. + stat=$?
  6056. + if test $stat -eq 0; then :
  6057. + else
  6058. + rm -f "$tmpdepfile"
  6059. + exit $stat
  6060. + fi
  6061. + rm -f "$depfile"
  6062. + # Each line is of the form `foo.o: dependent.h',
  6063. + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
  6064. + # Do two passes, one to just change these to
  6065. + # `$object: dependent.h' and one to simply `dependent.h:'.
  6066. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
  6067. + # Some versions of the HPUX 10.20 sed can't process this invocation
  6068. + # correctly. Breaking it into two sed invocations is a workaround.
  6069. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
  6070. + sed -e 's/$/ :/' >> "$depfile"
  6071. + rm -f "$tmpdepfile"
  6072. + ;;
  6073. +
  6074. +tru64)
  6075. + # The Tru64 compiler uses -MD to generate dependencies as a side
  6076. + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
  6077. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
  6078. + # dependencies in `foo.d' instead, so we check for that too.
  6079. + # Subdirectories are respected.
  6080. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
  6081. + test "x$dir" = "x$object" && dir=
  6082. + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
  6083. +
  6084. + if test "$libtool" = yes; then
  6085. + # Dependencies are output in .lo.d with libtool 1.4.
  6086. + # They are output in .o.d with libtool 1.5.
  6087. + tmpdepfile1="$dir.libs/$base.lo.d"
  6088. + tmpdepfile2="$dir.libs/$base.o.d"
  6089. + tmpdepfile3="$dir.libs/$base.d"
  6090. + "$@" -Wc,-MD
  6091. + else
  6092. + tmpdepfile1="$dir$base.o.d"
  6093. + tmpdepfile2="$dir$base.d"
  6094. + tmpdepfile3="$dir$base.d"
  6095. + "$@" -MD
  6096. + fi
  6097. +
  6098. + stat=$?
  6099. + if test $stat -eq 0; then :
  6100. + else
  6101. + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
  6102. + exit $stat
  6103. + fi
  6104. +
  6105. + if test -f "$tmpdepfile1"; then
  6106. + tmpdepfile="$tmpdepfile1"
  6107. + elif test -f "$tmpdepfile2"; then
  6108. + tmpdepfile="$tmpdepfile2"
  6109. + else
  6110. + tmpdepfile="$tmpdepfile3"
  6111. + fi
  6112. + if test -f "$tmpdepfile"; then
  6113. + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
  6114. + # That's a tab and a space in the [].
  6115. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
  6116. + else
  6117. + echo "#dummy" > "$depfile"
  6118. + fi
  6119. + rm -f "$tmpdepfile"
  6120. + ;;
  6121. +
  6122. +#nosideeffect)
  6123. + # This comment above is used by automake to tell side-effect
  6124. + # dependency tracking mechanisms from slower ones.
  6125. +
  6126. +dashmstdout)
  6127. + # Important note: in order to support this mode, a compiler *must*
  6128. + # always write the preprocessed file to stdout, regardless of -o.
  6129. + "$@" || exit $?
  6130. +
  6131. + # Remove the call to Libtool.
  6132. + if test "$libtool" = yes; then
  6133. + while test $1 != '--mode=compile'; do
  6134. + shift
  6135. + done
  6136. + shift
  6137. + fi
  6138. +
  6139. + # Remove `-o $object'.
  6140. + IFS=" "
  6141. + for arg
  6142. + do
  6143. + case $arg in
  6144. + -o)
  6145. + shift
  6146. + ;;
  6147. + $object)
  6148. + shift
  6149. + ;;
  6150. + *)
  6151. + set fnord "$@" "$arg"
  6152. + shift # fnord
  6153. + shift # $arg
  6154. + ;;
  6155. + esac
  6156. + done
  6157. +
  6158. + test -z "$dashmflag" && dashmflag=-M
  6159. + # Require at least two characters before searching for `:'
  6160. + # in the target name. This is to cope with DOS-style filenames:
  6161. + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
  6162. + "$@" $dashmflag |
  6163. + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
  6164. + rm -f "$depfile"
  6165. + cat < "$tmpdepfile" > "$depfile"
  6166. + tr ' ' '
  6167. +' < "$tmpdepfile" | \
  6168. +## Some versions of the HPUX 10.20 sed can't process this invocation
  6169. +## correctly. Breaking it into two sed invocations is a workaround.
  6170. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
  6171. + rm -f "$tmpdepfile"
  6172. + ;;
  6173. +
  6174. +dashXmstdout)
  6175. + # This case only exists to satisfy depend.m4. It is never actually
  6176. + # run, as this mode is specially recognized in the preamble.
  6177. + exit 1
  6178. + ;;
  6179. +
  6180. +makedepend)
  6181. + "$@" || exit $?
  6182. + # Remove any Libtool call
  6183. + if test "$libtool" = yes; then
  6184. + while test $1 != '--mode=compile'; do
  6185. + shift
  6186. + done
  6187. + shift
  6188. + fi
  6189. + # X makedepend
  6190. + shift
  6191. + cleared=no
  6192. + for arg in "$@"; do
  6193. + case $cleared in
  6194. + no)
  6195. + set ""; shift
  6196. + cleared=yes ;;
  6197. + esac
  6198. + case "$arg" in
  6199. + -D*|-I*)
  6200. + set fnord "$@" "$arg"; shift ;;
  6201. + # Strip any option that makedepend may not understand. Remove
  6202. + # the object too, otherwise makedepend will parse it as a source file.
  6203. + -*|$object)
  6204. + ;;
  6205. + *)
  6206. + set fnord "$@" "$arg"; shift ;;
  6207. + esac
  6208. + done
  6209. + obj_suffix="`echo $object | sed 's/^.*\././'`"
  6210. + touch "$tmpdepfile"
  6211. + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
  6212. + rm -f "$depfile"
  6213. + cat < "$tmpdepfile" > "$depfile"
  6214. + sed '1,2d' "$tmpdepfile" | tr ' ' '
  6215. +' | \
  6216. +## Some versions of the HPUX 10.20 sed can't process this invocation
  6217. +## correctly. Breaking it into two sed invocations is a workaround.
  6218. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
  6219. + rm -f "$tmpdepfile" "$tmpdepfile".bak
  6220. + ;;
  6221. +
  6222. +cpp)
  6223. + # Important note: in order to support this mode, a compiler *must*
  6224. + # always write the preprocessed file to stdout.
  6225. + "$@" || exit $?
  6226. +
  6227. + # Remove the call to Libtool.
  6228. + if test "$libtool" = yes; then
  6229. + while test $1 != '--mode=compile'; do
  6230. + shift
  6231. + done
  6232. + shift
  6233. + fi
  6234. +
  6235. + # Remove `-o $object'.
  6236. + IFS=" "
  6237. + for arg
  6238. + do
  6239. + case $arg in
  6240. + -o)
  6241. + shift
  6242. + ;;
  6243. + $object)
  6244. + shift
  6245. + ;;
  6246. + *)
  6247. + set fnord "$@" "$arg"
  6248. + shift # fnord
  6249. + shift # $arg
  6250. + ;;
  6251. + esac
  6252. + done
  6253. +
  6254. + "$@" -E |
  6255. + sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
  6256. + sed '$ s: \\$::' > "$tmpdepfile"
  6257. + rm -f "$depfile"
  6258. + echo "$object : \\" > "$depfile"
  6259. + cat < "$tmpdepfile" >> "$depfile"
  6260. + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
  6261. + rm -f "$tmpdepfile"
  6262. + ;;
  6263. +
  6264. +msvisualcpp)
  6265. + # Important note: in order to support this mode, a compiler *must*
  6266. + # always write the preprocessed file to stdout, regardless of -o,
  6267. + # because we must use -o when running libtool.
  6268. + "$@" || exit $?
  6269. + IFS=" "
  6270. + for arg
  6271. + do
  6272. + case "$arg" in
  6273. + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
  6274. + set fnord "$@"
  6275. + shift
  6276. + shift
  6277. + ;;
  6278. + *)
  6279. + set fnord "$@" "$arg"
  6280. + shift
  6281. + shift
  6282. + ;;
  6283. + esac
  6284. + done
  6285. + "$@" -E |
  6286. + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
  6287. + rm -f "$depfile"
  6288. + echo "$object : \\" > "$depfile"
  6289. + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
  6290. + echo " " >> "$depfile"
  6291. + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
  6292. + rm -f "$tmpdepfile"
  6293. + ;;
  6294. +
  6295. +none)
  6296. + exec "$@"
  6297. + ;;
  6298. +
  6299. +*)
  6300. + echo "Unknown depmode $depmode" 1>&2
  6301. + exit 1
  6302. + ;;
  6303. +esac
  6304. +
  6305. +exit 0
  6306. +
  6307. +# Local Variables:
  6308. +# mode: shell-script
  6309. +# sh-indentation: 2
  6310. +# eval: (add-hook 'write-file-hooks 'time-stamp)
  6311. +# time-stamp-start: "scriptversion="
  6312. +# time-stamp-format: "%:y-%02m-%02d.%02H"
  6313. +# time-stamp-end: "$"
  6314. +# End:
  6315. diff --exclude CVS -urN genext2fs-1.3.orig/dev.txt genext2fs/dev.txt
  6316. --- genext2fs-1.3.orig/dev.txt 2000-09-28 09:03:19.000000000 -0600
  6317. +++ genext2fs/dev.txt 1969-12-31 17:00:00.000000000 -0700
  6318. @@ -1,94 +0,0 @@
  6319. -drwx /dev
  6320. -crw- 10,190 /dev/lcd
  6321. -crw- 10,191 /dev/splc781
  6322. -crw- 4,0 /dev/console
  6323. -crw- 5,64 /dev/cua0
  6324. -crw- 5,65 /dev/cua1
  6325. -crw- 5,66 /dev/cua2
  6326. -crw- 5,70 /dev/cua6
  6327. -crw- 5,71 /dev/cua7
  6328. -crw- 5,72 /dev/cua8
  6329. -crw- 5,73 /dev/cua9
  6330. -crw- 29,0 /dev/fb0
  6331. -crw- 29,32 /dev/fb1
  6332. -crw- 1,2 /dev/kmem
  6333. -crw- 1,1 /dev/mem
  6334. -crw- 1,3 /dev/null
  6335. -crw- 2,2 /dev/ptyp2
  6336. -crw- 2,3 /dev/ptyp3
  6337. -crw- 2,5 /dev/ptyp5
  6338. -crw- 2,4 /dev/ptyp4
  6339. -crw- 10,178 /dev/triokb
  6340. -crw- 2,0 /dev/ptyp0
  6341. -crw- 2,6 /dev/ptyp6
  6342. -crw- 2,7 /dev/ptyp7
  6343. -crw- 2,8 /dev/ptyp8
  6344. -crw- 2,9 /dev/ptyp9
  6345. -crw- 2,10 /dev/ptypa
  6346. -crw- 2,11 /dev/ptypb
  6347. -crw- 2,12 /dev/ptypc
  6348. -crw- 2,13 /dev/ptypd
  6349. -crw- 2,14 /dev/ptype
  6350. -crw- 2,15 /dev/ptypf
  6351. -brw- 1,0 /dev/ram0
  6352. -brw- 1,1 /dev/ram1
  6353. -brw- 1,2 /dev/ram2
  6354. -brw- 1,3 /dev/ram3
  6355. -br-- 31,0 /dev/rom0
  6356. -brw- 31,1 /dev/rom1
  6357. -brw- 31,2 /dev/rom2
  6358. -brw- 31,3 /dev/rom3
  6359. -crw- 5,0 /dev/tty
  6360. -crw- 4,0 /dev/tty0
  6361. -crwx 4,1 /dev/tty1
  6362. -crwx 4,2 /dev/tty2
  6363. -crwx 4,3 /dev/tty3
  6364. -crwx 4,4 /dev/tty4
  6365. -crw- 4,5 /dev/tty5
  6366. -crwx 4,6 /dev/tty6
  6367. -crw- 4,7 /dev/tty7
  6368. -crw- 4,8 /dev/tty8
  6369. -crw- 4,9 /dev/tty9
  6370. -crw- 4,64 /dev/ttyS0
  6371. -crw- 4,65 /dev/ttyS1
  6372. -crw- 4,66 /dev/ttyS2
  6373. -crw- 4,67 /dev/ttyS3
  6374. -crw- 4,68 /dev/ttyS4
  6375. -crw- 4,69 /dev/ttyS5
  6376. -crw- 4,70 /dev/ttyS6
  6377. -crw- 4,71 /dev/ttyS7
  6378. -crw- 4,72 /dev/ttyS8
  6379. -crw- 4,73 /dev/ttyS9
  6380. -crw- 3,0 /dev/ttyp0
  6381. -crw- 3,1 /dev/ttyp1
  6382. -crw- 3,2 /dev/ttyp2
  6383. -crw- 3,3 /dev/ttyp3
  6384. -crw- 3,4 /dev/ttyp4
  6385. -crw- 3,5 /dev/ttyp5
  6386. -crw- 3,6 /dev/ttyp6
  6387. -crw- 3,7 /dev/ttyp7
  6388. -crw- 3,8 /dev/ttyp8
  6389. -crw- 3,9 /dev/ttyp9
  6390. -crw- 3,10 /dev/ttypa
  6391. -crw- 3,11 /dev/ttypb
  6392. -crw- 3,12 /dev/ttypc
  6393. -crw- 3,13 /dev/ttypd
  6394. -crw- 3,14 /dev/ttype
  6395. -crw- 3,15 /dev/ttypf
  6396. -crw- 1,5 /dev/zero
  6397. -crwx 10,111 /dev/dtedrv
  6398. -crwx 4,110 /dev/ttyM
  6399. -crw- 77,1 /dev/tssnd
  6400. -crw- 77,2 /dev/tstone
  6401. -crw- 2,1 /dev/ptyp1
  6402. -crwx 10,180 /dev/triohook
  6403. -crw- 90,0 /dev/mtd0
  6404. -brw- 44,0 /dev/ftl0
  6405. -crw- 10,175 /dev/tporta
  6406. -crw- 10,176 /dev/tportb
  6407. -crwx 10,100 /dev/softmodem
  6408. -crwx 10,101 /dev/softmodem_signals
  6409. -crwx 10,181 /dev/triovoice
  6410. -crw- 5,67 /dev/cua3
  6411. -crw- 5,68 /dev/cua4
  6412. -crw- 5,69 /dev/cua5
  6413. diff --exclude CVS -urN genext2fs-1.3.orig/device_table.txt genext2fs/device_table.txt
  6414. --- genext2fs-1.3.orig/device_table.txt 1969-12-31 17:00:00.000000000 -0700
  6415. +++ genext2fs/device_table.txt 2004-10-24 02:43:50.000000000 -0600
  6416. @@ -0,0 +1,129 @@
  6417. +# When building a target filesystem, it is desirable to not have to
  6418. +# become root and then run 'mknod' a thousand times. Using a device
  6419. +# table you can create device nodes and directories "on the fly".
  6420. +#
  6421. +# This is a sample device table file for use with genext2fs. You can
  6422. +# do all sorts of interesting things with a device table file. For
  6423. +# example, if you want to adjust the permissions on a particular file
  6424. +# you can just add an entry like:
  6425. +# /sbin/foobar f 2755 0 0 - - - - -
  6426. +# and (assuming the file /sbin/foobar exists) it will be made setuid
  6427. +# root (regardless of what its permissions are on the host filesystem.
  6428. +# Furthermore, you can use a single table entry to create a many device
  6429. +# minors. For example, if I wanted to create /dev/hda and /dev/hda[0-15]
  6430. +# I could just use the following two table entries:
  6431. +# /dev/hda b 640 0 0 3 0 0 0 -
  6432. +# /dev/hda b 640 0 0 3 1 1 1 15
  6433. +#
  6434. +# Device table entries take the form of:
  6435. +# <name> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>
  6436. +# where name is the file name, type can be one of:
  6437. +# f A regular file
  6438. +# d Directory
  6439. +# c Character special device file
  6440. +# b Block special device file
  6441. +# p Fifo (named pipe)
  6442. +# uid is the user id for the target file, gid is the group id for the
  6443. +# target file. The rest of the entries (major, minor, etc) apply only
  6444. +# to device special files.
  6445. +
  6446. +# Have fun
  6447. +# -Erik Andersen <andersen@codepoet.org>
  6448. +#
  6449. +
  6450. +#<name> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>
  6451. +/dev d 755 0 0 - - - - -
  6452. +/dev/mem c 640 0 0 1 1 0 0 -
  6453. +/dev/kmem c 640 0 0 1 2 0 0 -
  6454. +/dev/null c 640 0 0 1 3 0 0 -
  6455. +/dev/zero c 640 0 0 1 5 0 0 -
  6456. +/dev/random c 640 0 0 1 8 0 0 -
  6457. +/dev/urandom c 640 0 0 1 9 0 0 -
  6458. +/dev/tty c 666 0 0 5 0 0 0 -
  6459. +/dev/tty c 666 0 0 4 0 0 1 6
  6460. +/dev/console c 640 0 0 5 1 0 0 -
  6461. +/dev/ram b 640 0 0 1 1 0 0 -
  6462. +/dev/ram b 640 0 0 1 0 0 1 4
  6463. +/dev/loop b 640 0 0 7 0 0 1 2
  6464. +/dev/ptmx c 666 0 0 5 2 0 0 -
  6465. +#/dev/ttyS c 640 0 0 4 64 0 1 4
  6466. +#/dev/psaux c 640 0 0 10 1 0 0 -
  6467. +#/dev/rtc c 640 0 0 10 135 0 0 -
  6468. +
  6469. +# Adjust permissions on some normal files
  6470. +#/etc/shadow f 600 0 0 - - - - -
  6471. +#/bin/tinylogin f 4755 0 0 - - - - -
  6472. +
  6473. +# User-mode Linux stuff
  6474. +/dev/ubda b 640 0 0 98 0 0 0 -
  6475. +/dev/ubda b 640 0 0 98 1 1 1 15
  6476. +
  6477. +# IDE Devices
  6478. +/dev/hda b 640 0 0 3 0 0 0 -
  6479. +/dev/hda b 640 0 0 3 1 1 1 15
  6480. +/dev/hdb b 640 0 0 3 64 0 0 -
  6481. +/dev/hdb b 640 0 0 3 65 1 1 15
  6482. +#/dev/hdc b 640 0 0 22 0 0 0 -
  6483. +#/dev/hdc b 640 0 0 22 1 1 1 15
  6484. +#/dev/hdd b 640 0 0 22 64 0 0 -
  6485. +#/dev/hdd b 640 0 0 22 65 1 1 15
  6486. +#/dev/hde b 640 0 0 33 0 0 0 -
  6487. +#/dev/hde b 640 0 0 33 1 1 1 15
  6488. +#/dev/hdf b 640 0 0 33 64 0 0 -
  6489. +#/dev/hdf b 640 0 0 33 65 1 1 15
  6490. +#/dev/hdg b 640 0 0 34 0 0 0 -
  6491. +#/dev/hdg b 640 0 0 34 1 1 1 15
  6492. +#/dev/hdh b 640 0 0 34 64 0 0 -
  6493. +#/dev/hdh b 640 0 0 34 65 1 1 15
  6494. +
  6495. +# SCSI Devices
  6496. +#/dev/sda b 640 0 0 8 0 0 0 -
  6497. +#/dev/sda b 640 0 0 8 1 1 1 15
  6498. +#/dev/sdb b 640 0 0 8 16 0 0 -
  6499. +#/dev/sdb b 640 0 0 8 17 1 1 15
  6500. +#/dev/sdc b 640 0 0 8 32 0 0 -
  6501. +#/dev/sdc b 640 0 0 8 33 1 1 15
  6502. +#/dev/sdd b 640 0 0 8 48 0 0 -
  6503. +#/dev/sdd b 640 0 0 8 49 1 1 15
  6504. +#/dev/sde b 640 0 0 8 64 0 0 -
  6505. +#/dev/sde b 640 0 0 8 65 1 1 15
  6506. +#/dev/sdf b 640 0 0 8 80 0 0 -
  6507. +#/dev/sdf b 640 0 0 8 81 1 1 15
  6508. +#/dev/sdg b 640 0 0 8 96 0 0 -
  6509. +#/dev/sdg b 640 0 0 8 97 1 1 15
  6510. +#/dev/sdh b 640 0 0 8 112 0 0 -
  6511. +#/dev/sdh b 640 0 0 8 113 1 1 15
  6512. +#/dev/sg c 640 0 0 21 0 0 1 15
  6513. +#/dev/scd b 640 0 0 11 0 0 1 15
  6514. +#/dev/st c 640 0 0 9 0 0 1 8
  6515. +#/dev/nst c 640 0 0 9 128 0 1 8
  6516. +#/dev/st c 640 0 0 9 32 1 1 4
  6517. +#/dev/st c 640 0 0 9 64 1 1 4
  6518. +#/dev/st c 640 0 0 9 96 1 1 4
  6519. +
  6520. +# Floppy disk devices
  6521. +#/dev/fd b 640 0 0 2 0 0 1 2
  6522. +#/dev/fd0d360 b 640 0 0 2 4 0 0 -
  6523. +#/dev/fd1d360 b 640 0 0 2 5 0 0 -
  6524. +#/dev/fd0h1200 b 640 0 0 2 8 0 0 -
  6525. +#/dev/fd1h1200 b 640 0 0 2 9 0 0 -
  6526. +#/dev/fd0u1440 b 640 0 0 2 28 0 0 -
  6527. +#/dev/fd1u1440 b 640 0 0 2 29 0 0 -
  6528. +#/dev/fd0u2880 b 640 0 0 2 32 0 0 -
  6529. +#/dev/fd1u2880 b 640 0 0 2 33 0 0 -
  6530. +
  6531. +# All the proprietary cdrom devices in the world
  6532. +#/dev/aztcd b 640 0 0 29 0 0 0 -
  6533. +#/dev/bpcd b 640 0 0 41 0 0 0 -
  6534. +#/dev/capi20 c 640 0 0 68 0 0 1 2
  6535. +#/dev/cdu31a b 640 0 0 15 0 0 0 -
  6536. +#/dev/cdu535 b 640 0 0 24 0 0 0 -
  6537. +#/dev/cm206cd b 640 0 0 32 0 0 0 -
  6538. +#/dev/sjcd b 640 0 0 18 0 0 0 -
  6539. +#/dev/sonycd b 640 0 0 15 0 0 0 -
  6540. +#/dev/gscd b 640 0 0 16 0 0 0 -
  6541. +#/dev/sbpcd b 640 0 0 25 0 0 0 -
  6542. +#/dev/sbpcd b 640 0 0 25 0 0 1 4
  6543. +#/dev/mcd b 640 0 0 23 0 0 0 -
  6544. +#/dev/optcd b 640 0 0 17 0 0 0 -
  6545. +
  6546. diff --exclude CVS -urN genext2fs-1.3.orig/genext2fs.8 genext2fs/genext2fs.8
  6547. --- genext2fs-1.3.orig/genext2fs.8 1969-12-31 17:00:00.000000000 -0700
  6548. +++ genext2fs/genext2fs.8 2004-10-24 02:43:50.000000000 -0600
  6549. @@ -0,0 +1,129 @@
  6550. +.\" Hey, EMACS: -*- nroff -*-
  6551. +.\" First parameter, NAME, should be all caps
  6552. +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
  6553. +.\" other parameters are allowed: see man(7), man(1)
  6554. +.TH GENEXT2FS 8 "July 14, 2001"
  6555. +.\" Please adjust this date whenever revising the manpage.
  6556. +.\"
  6557. +.\" Some roff macros, for reference:
  6558. +.\" .nh disable hyphenation
  6559. +.\" .hy enable hyphenation
  6560. +.\" .ad l left justify
  6561. +.\" .ad b justify to both left and right margins
  6562. +.\" .nf disable filling
  6563. +.\" .fi enable filling
  6564. +.\" .br insert line break
  6565. +.\" .sp <n> insert n+1 empty lines
  6566. +.\" for manpage-specific macros, see man(7)
  6567. +.SH NAME
  6568. +genext2fs \- ext2 filesystem generator for embedded systems
  6569. +.SH SYNOPSIS
  6570. +.B genext2fs
  6571. +.RI [ options ] " image"
  6572. +.SH DESCRIPTION
  6573. +\fBgenext2fs\fP generates an ext2 filesystem
  6574. +as a normal (non-root) user. It doesn't require you to mount
  6575. +the image file to copy files on it. It doesn't even require
  6576. +you to be the superuser to make device nodes.
  6577. +.SH WARNING
  6578. +\fBgenext2fs\fP has been designed for embedded
  6579. +systems. As such, it will generate a filesystem for single-user
  6580. +usage: all files/directories/etc... will belong to UID/GID 0
  6581. +.SH OPTIONS
  6582. +.TP
  6583. +.BI -x \ image
  6584. +Use this image as a starting point
  6585. +.TP
  6586. +.BI -d \ directory
  6587. +Add this directory as source
  6588. +.TP
  6589. +.BI -f \ FILE
  6590. +.TP
  6591. +.BI -D \ FILE
  6592. +Uses the named FILE as a device table file, to create device
  6593. +nodes and directories "on the fly".
  6594. +.TP
  6595. +.BI -b \ blocks
  6596. +Size in blocks
  6597. +.TP
  6598. +.BI -i \ inodes
  6599. +Number of inodes
  6600. +.TP
  6601. +.BI -r \ reserved
  6602. +Number of reserved blocks
  6603. +.TP
  6604. +.BI -g \ path
  6605. +Generate a block map file for this path
  6606. +.TP
  6607. +.BI -e \ value
  6608. +Fill unallocated blocks with value
  6609. +.TP
  6610. +.BI -z
  6611. +Make files with holes
  6612. +.TP
  6613. +.BI -U
  6614. +Squash owners making all files be owned by root
  6615. +.TP
  6616. +.BI -P
  6617. +Squash permissions on all files
  6618. +.TP
  6619. +.BI -q
  6620. +Squash permissions and owners (same as -P -U)
  6621. +.TP
  6622. +.BI -v
  6623. +Print resulting filesystem structure
  6624. +.TP
  6625. +.BI -h
  6626. +Display help
  6627. +.TP
  6628. +.SH EXAMPLES
  6629. +
  6630. +.EX
  6631. +.B
  6632. + genext2fs -b 1440 -d src /dev/fd0
  6633. +.EE
  6634. +
  6635. +All files in the
  6636. +.I src
  6637. +directory will be written to
  6638. +.B /dev/fd0
  6639. +as a new ext2 filesystem image. You can then mount the floppy as
  6640. +usual.
  6641. +
  6642. +.EX
  6643. +.B
  6644. + genext2fs -b 1024 -d src -D device_table.txt flashdisk.img
  6645. +.EE
  6646. +
  6647. +This example builds a filesystem from all the files in
  6648. +.I src
  6649. +, then device nodes are created based on the content the device_table file
  6650. +.I dev.txt.
  6651. +An example device file follows:
  6652. +
  6653. +.EX
  6654. + #<name> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>
  6655. + /dev d 755 0 0 - - - - -
  6656. + /dev/mem c 640 0 0 1 1 0 0 -
  6657. + /dev/tty c 666 0 0 5 0 0 0 -
  6658. + /dev/tty c 666 0 0 4 0 0 1 6
  6659. + /dev/loop b 640 0 0 7 0 0 1 2
  6660. + /dev/hda b 640 0 0 3 0 0 0 -
  6661. + /dev/hda b 640 0 0 3 1 1 1 16
  6662. +.EE
  6663. +
  6664. +This device table creates the /dev directory, a character device
  6665. +node /dev/mem (major 1, minor 1), it also creates /dev/tty,
  6666. +/dev/tty[0-5], /dev/loop[0-1], /dev/hda, and /dev/hda0 to /dev/hda15
  6667. +.SH BUGS
  6668. +\fBgenext2fs\fP does not support hard links. Hard links present in the input
  6669. +tree will be represented as separate files in the ext2 image.
  6670. +
  6671. +.SH SEE ALSO
  6672. +.BR mkfs (8),
  6673. +.BR genromfs (8),
  6674. +.BR mkisofs (8).
  6675. +.br
  6676. +.SH AUTHOR
  6677. +This manual page was written by David Kimdon <dwhedon@debian.org>,
  6678. +for the Debian GNU/Linux system (but may be used by others).
  6679. diff --exclude CVS -urN genext2fs-1.3.orig/genext2fs.c genext2fs/genext2fs.c
  6680. --- genext2fs-1.3.orig/genext2fs.c 2001-06-18 02:11:32.000000000 -0600
  6681. +++ genext2fs/genext2fs.c 2004-12-08 04:51:42.000000000 -0700
  6682. @@ -1,8 +1,14 @@
  6683. +/* vi: set sw=8 ts=8: */
  6684. // genext2fs.c
  6685. //
  6686. // ext2 filesystem generator for embedded systems
  6687. // Copyright (C) 2000 Xavier Bestel <xavier.bestel@free.fr>
  6688. //
  6689. +// 'du' portions taken from coreutils/du.c in busybox:
  6690. +// Copyright (C) 1999,2000 by Lineo, inc. and John Beppu
  6691. +// Copyright (C) 1999,2000,2001 by John Beppu <beppu@codepoet.org>
  6692. +// Copyright (C) 2002 Edward Betts <edward@debian.org>
  6693. +//
  6694. // This program is free software; you can redistribute it and/or
  6695. // modify it under the terms of the GNU General Public License
  6696. // as published by the Free Software Foundation; version
  6697. @@ -26,6 +32,23 @@
  6698. // Bugfix: getcwd values for Solaris xavier.gueguen@col.bsf.alcatel.fr
  6699. // Bugfix: ANSI scanf for non-GNU C xavier.gueguen@col.bsf.alcatel.fr
  6700. // 28 Jun 2001 Bugfix: getcwd differs for Solaris/GNU mike@sowbug.com
  6701. +// 8 Mar 2002 Bugfix: endianness swap of x-indirects
  6702. +// 23 Mar 2002 Bugfix: test for IFCHR or IFBLK was flawed
  6703. +// 10 Oct 2002 Added comments,makefile targets, vsundar@ixiacom.com
  6704. +// endianess swap assert check.
  6705. +// Copyright (C) 2002 Ixia communications
  6706. +// 12 Oct 2002 Added support for triple indirection vsundar@ixiacom.com
  6707. +// Copyright (C) 2002 Ixia communications
  6708. +// 14 Oct 2002 Added support for groups vsundar@ixiacom.com
  6709. +// Copyright (C) 2002 Ixia communications
  6710. +// 5 Jan 2003 Bugfixes: reserved inodes should be set vsundar@usc.edu
  6711. +// only in the first group; directory names
  6712. +// need to be null padded at the end; and
  6713. +// number of blocks per group should be a
  6714. +// multiple of 8. Updated md5 values.
  6715. +// 6 Jan 2003 Erik Andersen <andersee@debian.org> added
  6716. +// mkfs.jffs2 compatible device table support,
  6717. +// along with -q, -P, -U
  6718. // `genext2fs' is a mean to generate an ext2 filesystem
  6719. @@ -33,10 +56,6 @@
  6720. // the image file to copy files on it. It doesn't even require
  6721. // you to be the superuser to make device nodes.
  6722. //
  6723. -// Warning ! `genext2fs' has been designed for embedded
  6724. -// systems. As such, it will generate a filesystem for single-user
  6725. -// usage: all files/directories/etc... will belong to UID/GID 0
  6726. -//
  6727. // Example usage:
  6728. //
  6729. // # genext2fs -b 1440 -d srcdir /dev/fd0
  6730. @@ -45,41 +64,131 @@
  6731. // a new ext2 filesystem image. You can then mount the floppy as
  6732. // usual.
  6733. //
  6734. -// # genext2fs -b 1024 -d builddir -f devices.txt flashdisk.img
  6735. +// # genext2fs -b 1024 -d builddir -D device_table.txt flashdisk.img
  6736. //
  6737. // This one would build a filesystem from all the files in builddir,
  6738. -// then would read a devices list and make apropriate nodes. The
  6739. -// format for the device list is:
  6740. -//
  6741. -// drwx /dev
  6742. -// crw- 10,190 /dev/lcd
  6743. -// brw- 1,0 /dev/ram0
  6744. -//
  6745. -// This device list builds the /dev directory, a character device
  6746. -// node /dev/lcd (major 10, minor 190) and a block device node
  6747. -// /dev/ram0 (major 1, minor 0)
  6748. -
  6749. +// then would read the device_table.txt file and make apropriate nodes.
  6750. +// The format for the device table file is covered in detail in the sample
  6751. +// device_table.txt file provided with the genext2fs source.
  6752. +#define _GNU_SOURCE
  6753. #include <stdio.h>
  6754. #include <stdlib.h>
  6755. #include <string.h>
  6756. #include <dirent.h>
  6757. +#include <libgen.h>
  6758. #include <stdarg.h>
  6759. #include <unistd.h>
  6760. #include <sys/stat.h>
  6761. +#include <assert.h>
  6762. +#include <time.h>
  6763. +#include <ctype.h>
  6764. +#include <errno.h>
  6765. +#include <fcntl.h>
  6766. +#include <sys/types.h>
  6767. +#include <getopt.h>
  6768. +
  6769. +struct stats {
  6770. + unsigned long nblocks;
  6771. + unsigned long ninodes;
  6772. +};
  6773. +
  6774. +#if 0
  6775. +#define HASH_SIZE 311 /* Should be prime */
  6776. +#define hash_inode(i) ((i) % HASH_SIZE)
  6777. +
  6778. +typedef struct ino_dev_hash_bucket_struct {
  6779. + struct ino_dev_hash_bucket_struct *next;
  6780. + ino_t ino;
  6781. + dev_t dev;
  6782. + char name[1];
  6783. +} ino_dev_hashtable_bucket_t;
  6784. +
  6785. +static ino_dev_hashtable_bucket_t *ino_dev_hashtable[HASH_SIZE];
  6786. +
  6787. +static int is_in_ino_dev_hashtable(const struct stat *statbuf, char **name)
  6788. +{
  6789. + ino_dev_hashtable_bucket_t *bucket;
  6790. +
  6791. + bucket = ino_dev_hashtable[hash_inode(statbuf->st_ino)];
  6792. + while (bucket != NULL) {
  6793. + if ((bucket->ino == statbuf->st_ino) &&
  6794. + (bucket->dev == statbuf->st_dev))
  6795. + {
  6796. + if (name) *name = bucket->name;
  6797. + return 1;
  6798. + }
  6799. + bucket = bucket->next;
  6800. + }
  6801. + return 0;
  6802. +}
  6803. +/* Add statbuf to statbuf hash table */
  6804. +static void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name)
  6805. +{
  6806. + int i;
  6807. + size_t s;
  6808. + ino_dev_hashtable_bucket_t *bucket;
  6809. +
  6810. + i = hash_inode(statbuf->st_ino);
  6811. + s = name ? strlen(name) : 0;
  6812. + bucket = malloc(sizeof(ino_dev_hashtable_bucket_t) + s);
  6813. + bucket->ino = statbuf->st_ino;
  6814. + bucket->dev = statbuf->st_dev;
  6815. + if (name)
  6816. + strcpy(bucket->name, name);
  6817. + else
  6818. + bucket->name[0] = '\0';
  6819. + bucket->next = ino_dev_hashtable[i];
  6820. + ino_dev_hashtable[i] = bucket;
  6821. +}
  6822. +/* Clear statbuf hash table */
  6823. +static void reset_ino_dev_hashtable(void)
  6824. +{
  6825. + int i;
  6826. + ino_dev_hashtable_bucket_t *bucket;
  6827. + for (i = 0; i < HASH_SIZE; i++) {
  6828. + while (ino_dev_hashtable[i] != NULL) {
  6829. + bucket = ino_dev_hashtable[i]->next;
  6830. + free(ino_dev_hashtable[i]);
  6831. + ino_dev_hashtable[i] = bucket;
  6832. + }
  6833. + }
  6834. +}
  6835. +
  6836. +static int count_ino_in_hashtable(void)
  6837. +{
  6838. + long count = 0;
  6839. + int i;
  6840. +
  6841. + for (i = 0; i < HASH_SIZE; i++) {
  6842. + ino_dev_hashtable_bucket_t *bucket = ino_dev_hashtable[i];
  6843. + while (bucket != NULL) {
  6844. + count++;
  6845. + bucket = bucket->next;
  6846. + }
  6847. + }
  6848. +
  6849. + return count;
  6850. +}
  6851. +#endif
  6852. // block size
  6853. #define BLOCKSIZE 1024
  6854. #define BLOCKS_PER_GROUP 8192
  6855. #define BYTES_PER_INODE (8*BLOCKSIZE)
  6856. -#define RESERVED_INODES 5/100
  6857. +/* Percentage of blocks that are reserved.*/
  6858. +#define RESERVED_BLOCKS 5/100
  6859. +#define MAX_RESERVED_BLOCKS 25/100
  6860. // inode block size (why is it != BLOCKSIZE ?!?)
  6861. +/* The field i_blocks in the ext2 inode stores the number of data blocks
  6862. + but in terms of 512 bytes. That is what INODE_BLOCKSIZE represents.
  6863. + INOBLK is the number of such blocks in an actual disk block */
  6864. #define INODE_BLOCKSIZE 512
  6865. #define INOBLK (BLOCKSIZE / INODE_BLOCKSIZE)
  6866. @@ -115,18 +224,20 @@
  6867. // file modes
  6868. #define FM_IFMT 0xF000 // format mask
  6869. -#define FM_IFLNK 0xA000 // socket
  6870. -#define FM_IFSOCK 0xC000 // symbolic link
  6871. +#define FM_IFLNK 0xA000 // symbolic link
  6872. +#define FM_IFSOCK 0xC000 // socket
  6873. #define FM_IFREG 0x8000 // regular file
  6874. #define FM_IFBLK 0x6000 // block device
  6875. #define FM_IFDIR 0x4000 // directory
  6876. #define FM_IFCHR 0x2000 // character device
  6877. #define FM_IFIFO 0x1000 // fifo
  6878. +#define FM_IMASK 0x0FFF // all perms
  6879. #define FM_ISUID 0x0800 // SUID
  6880. #define FM_ISGID 0x0400 // SGID
  6881. #define FM_ISVTX 0x0200 // sticky bit
  6882. +
  6883. #define FM_IRWXU 0x01C0 // user mask
  6884. #define FM_IRUSR 0x0100 // read
  6885. #define FM_IWUSR 0x0080 // write
  6886. @@ -147,6 +258,39 @@
  6887. #define OP_HOLES 0x01 // make files with holes
  6888. +/* Defines for accessing group details */
  6889. +
  6890. +// Number of groups in the filesystem
  6891. +#define GRP_NBGROUPS(fs) (((fs)->sb.s_blocks_count+(fs)->sb.s_blocks_per_group-1)/(fs)->sb.s_blocks_per_group)
  6892. +
  6893. +// Get group block bitmap (bbm) given the group number
  6894. +#define GRP_GET_GROUP_BBM(fs,grp) ( get_blk((fs),(fs)->gd[(grp)].bg_block_bitmap) )
  6895. +
  6896. +// Get group inode bitmap (ibm) given the group number
  6897. +#define GRP_GET_GROUP_IBM(fs,grp) ( get_blk((fs),(fs)->gd[(grp)].bg_inode_bitmap) )
  6898. +
  6899. +// Given an inode number find the group it belongs to
  6900. +#define GRP_GROUP_OF_INODE(fs,nod) ( ((nod)-1) / (fs)->sb.s_inodes_per_group)
  6901. +
  6902. +//Given an inode number get the inode bitmap that covers it
  6903. +#define GRP_GET_INODE_BITMAP(fs,nod) \
  6904. + ( GRP_GET_GROUP_IBM((fs),GRP_GROUP_OF_INODE((fs),(nod))) )
  6905. +
  6906. +//Given an inode number find its offset within the inode bitmap that covers it
  6907. +#define GRP_IBM_OFFSET(fs,nod) \
  6908. + ( (nod) - GRP_GROUP_OF_INODE((fs),(nod))*(fs)->sb.s_inodes_per_group )
  6909. +
  6910. +// Given a block number find the group it belongs to
  6911. +#define GRP_GROUP_OF_BLOCK(fs,blk) ( ((blk)-1) / (fs)->sb.s_blocks_per_group)
  6912. +
  6913. +//Given a block number get the block bitmap that covers it
  6914. +#define GRP_GET_BLOCK_BITMAP(fs,blk) \
  6915. + ( GRP_GET_GROUP_BBM((fs),GRP_GROUP_OF_BLOCK((fs),(blk))) )
  6916. +
  6917. +//Given a block number find its offset within the block bitmap that covers it
  6918. +#define GRP_BBM_OFFSET(fs,blk) \
  6919. + ( (blk) - GRP_GROUP_OF_BLOCK((fs),(blk))*(fs)->sb.s_blocks_per_group )
  6920. +
  6921. // used types
  6922. @@ -176,7 +320,7 @@
  6923. #define SCANF_PREFIX "511"
  6924. #define SCANF_STRING(s) (s = malloc(512))
  6925. #define GETCWD_SIZE -1
  6926. -inline int snprintf(char *str, size_t n, const char *fmt, ...)
  6927. +static inline int snprintf(char *str, size_t n, const char *fmt, ...)
  6928. {
  6929. int ret;
  6930. va_list ap;
  6931. @@ -190,12 +334,12 @@
  6932. // endianness swap
  6933. -inline uint16 swab16(uint16 val)
  6934. +static inline uint16 swab16(uint16 val)
  6935. {
  6936. return (val >> 8) | (val << 8);
  6937. }
  6938. -inline uint32 swab32(uint32 val)
  6939. +static inline uint32 swab32(uint32 val)
  6940. {
  6941. return ((val>>24) | ((val>>8)&0xFF00) |
  6942. ((val<<8)&0xFF0000) | (val<<24));
  6943. @@ -287,7 +431,6 @@
  6944. {
  6945. groupdescriptor_decl
  6946. uint32 bg_reserved[3];
  6947. - uint32 bg_pad_to_bk[(BLOCKSIZE-32)/sizeof(uint32)];
  6948. } groupdescriptor;
  6949. typedef struct
  6950. @@ -304,6 +447,32 @@
  6951. typedef uint8 block[BLOCKSIZE];
  6952. +/* blockwalker fields:
  6953. + The blockwalker is used to access all the blocks of a file (including
  6954. + the indirection blocks) through repeated calls to walk_bw.
  6955. +
  6956. + bpdir -> index into the inode->i_block[]. Indicates level of indirection.
  6957. + bnum -> total number of blocks so far accessed. including indirection
  6958. + blocks.
  6959. + bpind,bpdind,bptind -> index into indirection blocks.
  6960. +
  6961. + bpind, bpdind, bptind do *NOT* index into single, double and triple
  6962. + indirect blocks resp. as you might expect from their names. Instead
  6963. + they are in order the 1st, 2nd & 3rd index to be used
  6964. +
  6965. + As an example..
  6966. + To access data block number 70000:
  6967. + bpdir: 15 (we are doing triple indirection)
  6968. + bpind: 0 ( index into the triple indirection block)
  6969. + bpdind: 16 ( index into the double indirection block)
  6970. + bptind: 99 ( index into the single indirection block)
  6971. + 70000 = 12 + 256 + 256*256 + 16*256 + 100 (indexing starts from zero)
  6972. +
  6973. + So,for double indirection bpind will index into the double indirection
  6974. + block and bpdind into the single indirection block. For single indirection
  6975. + only bpind will be used.
  6976. +*/
  6977. +
  6978. typedef struct
  6979. {
  6980. uint32 bnum;
  6981. @@ -313,15 +482,14 @@
  6982. uint32 bptind;
  6983. } blockwalker;
  6984. +
  6985. +/* Filesystem structure that support groups */
  6986. #if BLOCKSIZE == 1024
  6987. typedef struct
  6988. {
  6989. - block zero; // The famous block 0
  6990. - superblock sb; // The superblock
  6991. - groupdescriptor gd; // The group desciptor
  6992. - block bbm; // The block bitmap
  6993. - block ibm; // The inode bitmap
  6994. - inode itab[0]; // The inode table
  6995. + block zero; // The famous block 0
  6996. + superblock sb; // The superblock
  6997. + groupdescriptor gd[0]; // The group descriptors
  6998. } filesystem;
  6999. #else
  7000. #error UNHANDLED BLOCKSIZE
  7001. @@ -345,35 +513,35 @@
  7002. #define udecl32(x) this->x = swab32(this->x);
  7003. #define utdecl32(x,n) { int i; for(i=0; i<n; i++) this->x[i] = swab32(this->x[i]); }
  7004. -void swap_sb(superblock *sb)
  7005. +static void swap_sb(superblock *sb)
  7006. {
  7007. #define this sb
  7008. superblock_decl
  7009. #undef this
  7010. }
  7011. -void swap_gd(groupdescriptor *gd)
  7012. +static void swap_gd(groupdescriptor *gd)
  7013. {
  7014. #define this gd
  7015. groupdescriptor_decl
  7016. #undef this
  7017. }
  7018. -void swap_nod(inode *nod)
  7019. +static void swap_nod(inode *nod)
  7020. {
  7021. #define this nod
  7022. inode_decl
  7023. #undef this
  7024. }
  7025. -void swap_dir(directory *dir)
  7026. +static void swap_dir(directory *dir)
  7027. {
  7028. #define this dir
  7029. directory_decl
  7030. #undef this
  7031. }
  7032. -void swap_block(block b)
  7033. +static void swap_block(block b)
  7034. {
  7035. int i;
  7036. uint32 *blk = (uint32*)b;
  7037. @@ -389,67 +557,158 @@
  7038. #undef udecl32
  7039. #undef utdecl32
  7040. -char * argv0;
  7041. +static char * app_name;
  7042. +static const char *const memory_exhausted = "memory exhausted";
  7043. // error (un)handling
  7044. -inline void errexit(const char *fmt, ...)
  7045. +static void verror_msg(const char *s, va_list p)
  7046. {
  7047. - va_list ap;
  7048. - fprintf(stderr, "%s: ", argv0);
  7049. - va_start(ap, fmt);
  7050. - vfprintf(stderr, fmt, ap);
  7051. - va_end(ap);
  7052. - fprintf(stderr, "\n");
  7053. - exit(1);
  7054. + fflush(stdout);
  7055. + fprintf(stderr, "%s: ", app_name);
  7056. + vfprintf(stderr, s, p);
  7057. +}
  7058. +static void error_msg(const char *s, ...)
  7059. +{
  7060. + va_list p;
  7061. + va_start(p, s);
  7062. + verror_msg(s, p);
  7063. + va_end(p);
  7064. + putc('\n', stderr);
  7065. +}
  7066. +
  7067. +static void error_msg_and_die(const char *s, ...)
  7068. +{
  7069. + va_list p;
  7070. + va_start(p, s);
  7071. + verror_msg(s, p);
  7072. + va_end(p);
  7073. + putc('\n', stderr);
  7074. + exit(EXIT_FAILURE);
  7075. +}
  7076. +
  7077. +static void vperror_msg(const char *s, va_list p)
  7078. +{
  7079. + int err = errno;
  7080. + if (s == 0)
  7081. + s = "";
  7082. + verror_msg(s, p);
  7083. + if (*s)
  7084. + s = ": ";
  7085. + fprintf(stderr, "%s%s\n", s, strerror(err));
  7086. +}
  7087. +#if 0
  7088. +static void perror_msg(const char *s, ...)
  7089. +{
  7090. + va_list p;
  7091. + va_start(p, s);
  7092. + vperror_msg(s, p);
  7093. + va_end(p);
  7094. +}
  7095. +#endif
  7096. +static void perror_msg_and_die(const char *s, ...)
  7097. +{
  7098. + va_list p;
  7099. + va_start(p, s);
  7100. + vperror_msg(s, p);
  7101. + va_end(p);
  7102. + exit(EXIT_FAILURE);
  7103. +}
  7104. +
  7105. +static FILE *xfopen(const char *path, const char *mode)
  7106. +{
  7107. + FILE *fp;
  7108. + if ((fp = fopen(path, mode)) == NULL)
  7109. + perror_msg_and_die("%s", path);
  7110. + return fp;
  7111. +}
  7112. +
  7113. +static char *xstrdup(const char *s)
  7114. +{
  7115. + char *t;
  7116. +
  7117. + if (s == NULL)
  7118. + return NULL;
  7119. + t = strdup(s);
  7120. + if (t == NULL)
  7121. + error_msg_and_die(memory_exhausted);
  7122. + return t;
  7123. }
  7124. -inline void pexit(const char * fname)
  7125. +static void *xrealloc(void *ptr, size_t size)
  7126. {
  7127. - fprintf(stderr, "%s: ", argv0);
  7128. - perror(fname);
  7129. - exit(1);
  7130. + ptr = realloc(ptr, size);
  7131. + if (ptr == NULL && size != 0)
  7132. + error_msg_and_die(memory_exhausted);
  7133. + return ptr;
  7134. +}
  7135. +
  7136. +static char *xreadlink(const char *path)
  7137. +{
  7138. + static const int GROWBY = 80; /* how large we will grow strings by */
  7139. +
  7140. + char *buf = NULL;
  7141. + int bufsize = 0, readsize = 0;
  7142. +
  7143. + do {
  7144. + buf = xrealloc(buf, bufsize += GROWBY);
  7145. + readsize = readlink(path, buf, bufsize); /* 1st try */
  7146. + if (readsize == -1) {
  7147. + perror_msg_and_die("%s:%s", app_name, path);
  7148. + }
  7149. + }
  7150. + while (bufsize < readsize + 1);
  7151. +
  7152. + buf[readsize] = '\0';
  7153. + return buf;
  7154. }
  7155. // printf helper macro
  7156. #define plural(a) (a), ((a) > 1) ? "s" : ""
  7157. // temporary working block
  7158. -inline uint8 * get_workblk(void)
  7159. +static inline uint8 * get_workblk(void)
  7160. {
  7161. - static block b;
  7162. + unsigned char* b=calloc(1,BLOCKSIZE);
  7163. return b;
  7164. }
  7165. -inline void free_workblk(block b)
  7166. +static inline void free_workblk(block b)
  7167. {
  7168. + free(b);
  7169. }
  7170. -// rounds a quantity up to a blocksize
  7171. -uint32 rndup(uint32 qty, uint32 siz)
  7172. +/* Rounds qty upto a multiple of siz. siz should be a power of 2 */
  7173. +static uint32 rndup(uint32 qty, uint32 siz)
  7174. {
  7175. return (qty + (siz - 1)) & ~(siz - 1);
  7176. }
  7177. // check if something is allocated in the bitmap
  7178. -inline uint32 allocated(block b, uint32 item)
  7179. +static inline uint32 allocated(block b, uint32 item)
  7180. {
  7181. return b[(item-1) / 8] & (1 << ((item-1) % 8));
  7182. }
  7183. // return a given block from a filesystem
  7184. -inline uint8 * get_blk(filesystem *fs, uint32 blk)
  7185. +static inline uint8 * get_blk(filesystem *fs, uint32 blk)
  7186. {
  7187. return (uint8*)fs + blk*BLOCKSIZE;
  7188. }
  7189. // return a given inode from a filesystem
  7190. -inline inode * get_nod(filesystem *fs, uint32 nod)
  7191. +static inline inode * get_nod(filesystem *fs, uint32 nod)
  7192. {
  7193. - return &fs->itab[nod-1];
  7194. + int grp,offset;
  7195. + inode *itab;
  7196. +
  7197. + offset = GRP_IBM_OFFSET(fs,nod);
  7198. + grp = GRP_GROUP_OF_INODE(fs,nod);
  7199. + itab = (inode *)get_blk(fs, fs->gd[grp].bg_inode_table);
  7200. + return itab+offset-1;
  7201. }
  7202. // allocate a given block/inode in the bitmap
  7203. // allocate first free if item == 0
  7204. -uint32 allocate(block b, uint32 item)
  7205. +static uint32 allocate(block b, uint32 item)
  7206. {
  7207. if(!item)
  7208. {
  7209. @@ -473,39 +732,67 @@
  7210. }
  7211. // deallocate a given block/inode
  7212. -void deallocate(block b, uint32 item)
  7213. +static void deallocate(block b, uint32 item)
  7214. {
  7215. b[(item-1) / 8] &= ~(1 << ((item-1) % 8));
  7216. }
  7217. // allocate a block
  7218. -uint32 alloc_blk(filesystem *fs)
  7219. +static uint32 alloc_blk(filesystem *fs, uint32 nod)
  7220. {
  7221. - uint32 bk;
  7222. - if(!(bk = allocate(fs->bbm, 0)))
  7223. - errexit("couldn't allocate a block (no free space)");
  7224. - if(!(fs->gd.bg_free_blocks_count--))
  7225. - errexit("group descr. free blocks count == 0 (corrupted fs?)");
  7226. + uint32 bk=0;
  7227. + uint32 grp,nbgroups;
  7228. +
  7229. + grp = nod/fs->sb.s_inodes_per_group;
  7230. + nbgroups = ( fs->sb.s_blocks_count - fs->sb.s_first_data_block + fs->sb.s_blocks_per_group -1 ) /
  7231. + fs->sb.s_blocks_per_group;
  7232. + if(!(bk = allocate(get_blk(fs,fs->gd[grp].bg_block_bitmap), 0))) {
  7233. + for(grp=0;grp<nbgroups && !bk;grp++)
  7234. + bk=allocate(get_blk(fs,fs->gd[grp].bg_block_bitmap),0);
  7235. + grp--;
  7236. + }
  7237. + if (!bk)
  7238. + error_msg_and_die("couldn't allocate a block (no free space)");
  7239. + if(!(fs->gd[grp].bg_free_blocks_count--))
  7240. + error_msg_and_die("group descr %d. free blocks count == 0 (corrupted fs?)",grp);
  7241. if(!(fs->sb.s_free_blocks_count--))
  7242. - errexit("superblock free blocks count == 0 (corrupted fs?)");
  7243. - return bk;
  7244. + error_msg_and_die("superblock free blocks count == 0 (corrupted fs?)");
  7245. + return fs->sb.s_blocks_per_group*grp + bk;
  7246. }
  7247. // allocate an inode
  7248. -uint32 alloc_nod(filesystem *fs)
  7249. +static uint32 alloc_nod(filesystem *fs)
  7250. {
  7251. - uint32 nod;
  7252. - if(!(nod = allocate(fs->ibm, 0)))
  7253. - errexit("couldn't allocate an inode (no free inode)");
  7254. - if(!(fs->gd.bg_free_inodes_count--))
  7255. - errexit("group descr. free blocks count == 0 (corrupted fs?)");
  7256. + uint32 nod=0,best_group=0;
  7257. + uint32 grp,nbgroups,avefreei;
  7258. +
  7259. + nbgroups = ( fs->sb.s_blocks_count - fs->sb.s_first_data_block + fs->sb.s_blocks_per_group -1 ) /
  7260. + fs->sb.s_blocks_per_group;
  7261. +
  7262. + /* Distribute inodes amongst all the blocks */
  7263. + /* For every block group with more than average number of free inodes */
  7264. + /* find the one with the most free blocks and allocate node there */
  7265. + /* Idea from find_group_dir in fs/ext2/ialloc.c in 2.4.19 kernel */
  7266. + /* We do it for all inodes. */
  7267. + avefreei = fs->sb.s_free_inodes_count / nbgroups;
  7268. + for(grp=0;grp<nbgroups && !nod;grp++) {
  7269. + if (fs->gd[grp].bg_free_inodes_count < avefreei)
  7270. + continue;
  7271. + if (!best_group ||
  7272. + fs->gd[grp].bg_free_blocks_count > fs->gd[best_group].bg_free_blocks_count)
  7273. + best_group = grp;
  7274. + }
  7275. + if (!(nod = allocate(get_blk(fs,fs->gd[best_group].bg_inode_bitmap),0)))
  7276. + error_msg_and_die("couldn't allocate an inode (no free inode)");
  7277. + if(!(fs->gd[best_group].bg_free_inodes_count--))
  7278. + error_msg_and_die("group descr. free blocks count == 0 (corrupted fs?)");
  7279. if(!(fs->sb.s_free_inodes_count--))
  7280. - errexit("superblock free blocks count == 0 (corrupted fs?)");
  7281. - return nod;
  7282. + error_msg_and_die("superblock free blocks count == 0 (corrupted fs?)");
  7283. + return fs->sb.s_inodes_per_group*best_group+nod;
  7284. }
  7285. // print a bitmap allocation
  7286. -void print_bm(block b, uint32 max)
  7287. +static void print_bm(block b, uint32 max)
  7288. {
  7289. uint32 i;
  7290. printf("----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0\n");
  7291. @@ -520,7 +807,7 @@
  7292. }
  7293. // initalize a blockwalker (iterator for blocks list)
  7294. -void init_bw(filesystem *fs, uint32 nod, blockwalker *bw)
  7295. +static void init_bw(filesystem *fs, uint32 nod, blockwalker *bw)
  7296. {
  7297. bw->bnum = 0;
  7298. bw->bpdir = EXT2_INIT_BLOCK;
  7299. @@ -529,7 +816,7 @@
  7300. // return next block of inode (WALK_END for end)
  7301. // if create>0, append a newly allocated block at the end
  7302. // if hole!=0, create a hole in the file
  7303. -uint32 walk_bw(filesystem *fs, uint32 nod, blockwalker *bw, uint32 *create, uint32 hole)
  7304. +static uint32 walk_bw(filesystem *fs, uint32 nod, blockwalker *bw, uint32 *create, uint32 hole)
  7305. {
  7306. uint32 *bkref = 0;
  7307. uint32 *b;
  7308. @@ -546,14 +833,14 @@
  7309. {
  7310. bkref = &get_nod(fs, nod)->i_block[bw->bpdir = 0];
  7311. if(extend) // allocate first block
  7312. - *bkref = hole ? 0 : alloc_blk(fs);
  7313. + *bkref = hole ? 0 : alloc_blk(fs,nod);
  7314. }
  7315. // direct block
  7316. else if(bw->bpdir < EXT2_NDIR_BLOCKS)
  7317. {
  7318. bkref = &get_nod(fs, nod)->i_block[++bw->bpdir];
  7319. if(extend) // allocate block
  7320. - *bkref = hole ? 0 : alloc_blk(fs);
  7321. + *bkref = hole ? 0 : alloc_blk(fs,nod);
  7322. }
  7323. // first block in indirect block
  7324. else if(bw->bpdir == EXT2_NDIR_BLOCKS)
  7325. @@ -562,11 +849,11 @@
  7326. bw->bpdir = EXT2_IND_BLOCK;
  7327. bw->bpind = 0;
  7328. if(extend) // allocate indirect block
  7329. - get_nod(fs, nod)->i_block[bw->bpdir] = alloc_blk(fs);
  7330. + get_nod(fs, nod)->i_block[bw->bpdir] = alloc_blk(fs,nod);
  7331. b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]);
  7332. bkref = &b[bw->bpind];
  7333. if(extend) // allocate first block
  7334. - *bkref = hole ? 0 : alloc_blk(fs);
  7335. + *bkref = hole ? 0 : alloc_blk(fs,nod);
  7336. }
  7337. // block in indirect block
  7338. else if((bw->bpdir == EXT2_IND_BLOCK) && (bw->bpind < BLOCKSIZE/4 - 1))
  7339. @@ -575,7 +862,7 @@
  7340. b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]);
  7341. bkref = &b[bw->bpind];
  7342. if(extend) // allocate block
  7343. - *bkref = hole ? 0 : alloc_blk(fs);
  7344. + *bkref = hole ? 0 : alloc_blk(fs,nod);
  7345. }
  7346. // first block in first indirect block in first double indirect block
  7347. else if(bw->bpdir == EXT2_IND_BLOCK)
  7348. @@ -585,14 +872,14 @@
  7349. bw->bpind = 0;
  7350. bw->bpdind = 0;
  7351. if(extend) // allocate double indirect block
  7352. - get_nod(fs, nod)->i_block[bw->bpdir] = alloc_blk(fs);
  7353. + get_nod(fs, nod)->i_block[bw->bpdir] = alloc_blk(fs,nod);
  7354. b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]);
  7355. if(extend) // allocate first indirect block
  7356. - b[bw->bpind] = alloc_blk(fs);
  7357. + b[bw->bpind] = alloc_blk(fs,nod);
  7358. b = (uint32*)get_blk(fs, b[bw->bpind]);
  7359. bkref = &b[bw->bpdind];
  7360. if(extend) // allocate first block
  7361. - *bkref = hole ? 0 : alloc_blk(fs);
  7362. + *bkref = hole ? 0 : alloc_blk(fs,nod);
  7363. }
  7364. // block in indirect block in double indirect block
  7365. else if((bw->bpdir == EXT2_DIND_BLOCK) && (bw->bpdind < BLOCKSIZE/4 - 1))
  7366. @@ -602,7 +889,7 @@
  7367. b = (uint32*)get_blk(fs, b[bw->bpind]);
  7368. bkref = &b[bw->bpdind];
  7369. if(extend) // allocate block
  7370. - *bkref = hole ? 0 : alloc_blk(fs);
  7371. + *bkref = hole ? 0 : alloc_blk(fs,nod);
  7372. }
  7373. // first block in indirect block in double indirect block
  7374. else if((bw->bpdir == EXT2_DIND_BLOCK) && (bw->bpind < BLOCKSIZE/4 - 1))
  7375. @@ -612,20 +899,100 @@
  7376. bw->bpind++;
  7377. b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]);
  7378. if(extend) // allocate indirect block
  7379. - b[bw->bpind] = alloc_blk(fs);
  7380. + b[bw->bpind] = alloc_blk(fs,nod);
  7381. b = (uint32*)get_blk(fs, b[bw->bpind]);
  7382. bkref = &b[bw->bpdind];
  7383. if(extend) // allocate first block
  7384. - *bkref = hole ? 0 : alloc_blk(fs);
  7385. + *bkref = hole ? 0 : alloc_blk(fs,nod);
  7386. + }
  7387. +
  7388. + /* Adding support for triple indirection */
  7389. + /* Just starting triple indirection. Allocate the indirection
  7390. + blocks and the first data block
  7391. + */
  7392. + else if (bw->bpdir == EXT2_DIND_BLOCK)
  7393. + {
  7394. + bw->bnum += 3;
  7395. + bw->bpdir = EXT2_TIND_BLOCK;
  7396. + bw->bpind = 0;
  7397. + bw->bpdind = 0;
  7398. + bw->bptind = 0;
  7399. + if(extend) // allocate triple indirect block
  7400. + get_nod(fs, nod)->i_block[bw->bpdir] = alloc_blk(fs,nod);
  7401. + b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]);
  7402. + if(extend) // allocate first double indirect block
  7403. + b[bw->bpind] = alloc_blk(fs,nod);
  7404. + b = (uint32*)get_blk(fs, b[bw->bpind]);
  7405. + if(extend) // allocate first indirect block
  7406. + b[bw->bpdind] = alloc_blk(fs,nod);
  7407. + b = (uint32*)get_blk(fs, b[bw->bpdind]);
  7408. + bkref = &b[bw->bptind];
  7409. + if(extend) // allocate first data block
  7410. + *bkref = hole ? 0 : alloc_blk(fs,nod);
  7411. + }
  7412. + /* Still processing a single indirect block down the indirection
  7413. + chain.Allocate a data block for it
  7414. + */
  7415. + else if ( (bw->bpdir == EXT2_TIND_BLOCK) &&
  7416. + (bw->bptind < BLOCKSIZE/4 -1) )
  7417. + {
  7418. + bw->bptind++;
  7419. + b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]);
  7420. + b = (uint32*)get_blk(fs, b[bw->bpind]);
  7421. + b = (uint32*)get_blk(fs, b[bw->bpdind]);
  7422. + bkref = &b[bw->bptind];
  7423. + if(extend) // allocate data block
  7424. + *bkref = hole ? 0 : alloc_blk(fs,nod);
  7425. + }
  7426. + /* Finished processing a single indirect block. But still in the
  7427. + same double indirect block. Allocate new single indirect block
  7428. + for it and a data block
  7429. + */
  7430. + else if ( (bw->bpdir == EXT2_TIND_BLOCK) &&
  7431. + (bw->bpdind < BLOCKSIZE/4 -1) )
  7432. + {
  7433. + bw->bnum++;
  7434. + bw->bptind = 0;
  7435. + bw->bpdind++;
  7436. + b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]);
  7437. + b = (uint32*)get_blk(fs, b[bw->bpind]);
  7438. + if (extend) // allocate single indirect block
  7439. + b[bw->bpdind] = alloc_blk(fs,nod);
  7440. + b = (uint32*)get_blk(fs, b[bw->bpdind]);
  7441. + bkref = &b[bw->bptind];
  7442. + if(extend) // allocate first data block
  7443. + *bkref = hole ? 0 : alloc_blk(fs,nod);
  7444. + }
  7445. + /* Finished processing a double indirect block. Allocate the next
  7446. + double indirect block and the single,data blocks for it
  7447. + */
  7448. + else if ( (bw->bpdir == EXT2_TIND_BLOCK) &&
  7449. + (bw->bpind < BLOCKSIZE/4 - 1) )
  7450. + {
  7451. + bw->bnum += 2;
  7452. + bw->bpdind = 0;
  7453. + bw->bptind = 0;
  7454. + bw->bpind++;
  7455. + b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]);
  7456. + if(extend) // allocate double indirect block
  7457. + b[bw->bpind] = alloc_blk(fs,nod);
  7458. + b = (uint32*)get_blk(fs, b[bw->bpind]);
  7459. + if(extend) // allocate single indirect block
  7460. + b[bw->bpdind] = alloc_blk(fs,nod);
  7461. + b = (uint32*)get_blk(fs, b[bw->bpdind]);
  7462. + bkref = &b[bw->bptind];
  7463. + if(extend) // allocate first block
  7464. + *bkref = hole ? 0 : alloc_blk(fs,nod);
  7465. }
  7466. - // I don't do triple indirect - it's such a small filesystem ...
  7467. else
  7468. - errexit("file too big ! blocks list for inode %d extends past double indirect blocks!", nod);
  7469. + error_msg_and_die("file too big !");
  7470. + /* End change for walking triple indirection */
  7471. +
  7472. if(*bkref)
  7473. {
  7474. bw->bnum++;
  7475. - if(!allocated(fs->bbm, *bkref))
  7476. - errexit("[block %d of inode %d is unallocated !]", *bkref, nod);
  7477. + if(!allocated(GRP_GET_BLOCK_BITMAP(fs,*bkref), GRP_BBM_OFFSET(fs,*bkref)))
  7478. + error_msg_and_die("[block %d of inode %d is unallocated !]", *bkref, nod);
  7479. }
  7480. if(extend)
  7481. get_nod(fs, nod)->i_blocks = bw->bnum * INOBLK;
  7482. @@ -633,7 +1000,7 @@
  7483. }
  7484. // add blocks to an inode (file/dir/etc...)
  7485. -void extend_blk(filesystem *fs, uint32 nod, block b, int amount)
  7486. +static void extend_blk(filesystem *fs, uint32 nod, block b, int amount)
  7487. {
  7488. int create = amount;
  7489. blockwalker bw, lbw;
  7490. @@ -662,24 +1029,35 @@
  7491. }
  7492. }
  7493. +static void truncate_nod(filesystem *fs, uint32 nod)
  7494. +{
  7495. + inode *node = get_nod(fs, nod);
  7496. +assert(!node->i_size);
  7497. +#warning truncate_nod() no yet implemented
  7498. +}
  7499. +
  7500. // link an entry (inode #) to a directory
  7501. -void add2dir(filesystem *fs, uint32 dnod, uint32 nod, const char* name)
  7502. +static void add2dir(filesystem *fs, uint32 dnod, uint32 nod, const char* name)
  7503. {
  7504. blockwalker bw;
  7505. uint32 bk;
  7506. uint8 *b;
  7507. directory *d;
  7508. int reclen, nlen;
  7509. - if((get_nod(fs, dnod)->i_mode & FM_IFMT) != FM_IFDIR)
  7510. - errexit("can't add '%s' to a non-directory", name);
  7511. + inode *node;
  7512. + inode *pnode;
  7513. +
  7514. + pnode = get_nod(fs, dnod);
  7515. + if((pnode->i_mode & FM_IFMT) != FM_IFDIR)
  7516. + error_msg_and_die("can't add '%s' to a non-directory", name);
  7517. if(!*name)
  7518. - errexit("bad name '%s' (not meaningful)", name);
  7519. + error_msg_and_die("can't create an inode with an empty name");
  7520. if(strchr(name, '/'))
  7521. - errexit("bad name '%s' (contains a slash)", name);
  7522. + error_msg_and_die("bad name '%s' (contains a slash)", name);
  7523. nlen = strlen(name);
  7524. reclen = sizeof(directory) + rndup(nlen, 4);
  7525. if(reclen > BLOCKSIZE)
  7526. - errexit("bad name '%s' (too long)", name);
  7527. + error_msg_and_die("bad name '%s' (too long)", name);
  7528. init_bw(fs, dnod, &bw);
  7529. while((bk = walk_bw(fs, dnod, &bw, 0, 0)) != WALK_END) // for all blocks in dir
  7530. {
  7531. @@ -691,7 +1069,8 @@
  7532. if((!d->d_inode) && (d->d_rec_len >= reclen))
  7533. {
  7534. d->d_inode = nod;
  7535. - get_nod(fs, nod)->i_links_count++;
  7536. + node = get_nod(fs, nod);
  7537. + node->i_links_count++;
  7538. d->d_name_len = nlen;
  7539. strncpy(d->d_name, name, nlen);
  7540. return;
  7541. @@ -705,7 +1084,8 @@
  7542. d = (directory*) (((int8*)d) + d->d_rec_len);
  7543. d->d_rec_len = reclen;
  7544. d->d_inode = nod;
  7545. - get_nod(fs, nod)->i_links_count++;
  7546. + node = get_nod(fs, nod);
  7547. + node->i_links_count++;
  7548. d->d_name_len = nlen;
  7549. strncpy(d->d_name, name, nlen);
  7550. return;
  7551. @@ -716,7 +1096,8 @@
  7552. b = get_workblk();
  7553. d = (directory*)b;
  7554. d->d_inode = nod;
  7555. - get_nod(fs, nod)->i_links_count++;
  7556. + node = get_nod(fs, nod);
  7557. + node->i_links_count++;
  7558. d->d_rec_len = BLOCKSIZE;
  7559. d->d_name_len = nlen;
  7560. strncpy(d->d_name, name, nlen);
  7561. @@ -726,7 +1107,7 @@
  7562. }
  7563. // find an entry in a directory
  7564. -uint32 find_dir(filesystem *fs, uint32 nod, const char * name)
  7565. +static uint32 find_dir(filesystem *fs, uint32 nod, const char * name)
  7566. {
  7567. blockwalker bw;
  7568. uint32 bk;
  7569. @@ -745,9 +1126,9 @@
  7570. }
  7571. // find the inode of a full path
  7572. -uint32 find_path(filesystem *fs, uint32 nod, const char * name)
  7573. +static uint32 find_path(filesystem *fs, uint32 nod, const char * name)
  7574. {
  7575. - char *p, *n, *n2 = strdup(name);
  7576. + char *p, *n, *n2 = xstrdup(name);
  7577. n = n2;
  7578. while(*n == '/')
  7579. {
  7580. @@ -769,28 +1150,62 @@
  7581. return nod;
  7582. }
  7583. -// make a full-fledged directory (i.e. with "." & "..")
  7584. -uint32 mkdir_fs(filesystem *fs, uint32 parent_nod, const char *name, uint32 mode)
  7585. +// create a simple inode
  7586. +static uint32 mknod_fs(filesystem *fs, uint32 parent_nod, const char *name, uint32 mode, uint16 uid, uint16 gid, uint8 major, uint8 minor, uint32 ctime, uint32 mtime)
  7587. {
  7588. uint32 nod;
  7589. + inode *node;
  7590. if((nod = find_dir(fs, parent_nod, name)))
  7591. - return nod;
  7592. - nod = alloc_nod(fs);
  7593. - get_nod(fs, nod)->i_mode = FM_IFDIR | mode;
  7594. - add2dir(fs, parent_nod, nod, name);
  7595. - add2dir(fs, nod, nod, ".");
  7596. - add2dir(fs, nod, parent_nod, "..");
  7597. - fs->gd.bg_used_dirs_count++;
  7598. + {
  7599. + node = get_nod(fs, nod);
  7600. + if((node->i_mode & FM_IFMT) != (mode & FM_IFMT))
  7601. + error_msg_and_die("node '%s' already exists and isn't of the same type", name);
  7602. + node->i_mode = mode;
  7603. + }
  7604. + else
  7605. + {
  7606. + nod = alloc_nod(fs);
  7607. + node = get_nod(fs, nod);
  7608. + node->i_mode = mode;
  7609. + add2dir(fs, parent_nod, nod, name);
  7610. + switch(mode & FM_IFMT)
  7611. + {
  7612. + case FM_IFLNK:
  7613. + mode = FM_IFLNK | FM_IRWXU | FM_IRWXG | FM_IRWXO;
  7614. + break;
  7615. + case FM_IFBLK:
  7616. + case FM_IFCHR:
  7617. + ((uint8*)get_nod(fs, nod)->i_block)[0] = minor;
  7618. + ((uint8*)get_nod(fs, nod)->i_block)[1] = major;
  7619. + break;
  7620. + case FM_IFDIR:
  7621. + add2dir(fs, nod, nod, ".");
  7622. + add2dir(fs, nod, parent_nod, "..");
  7623. + fs->gd[GRP_GROUP_OF_INODE(fs,nod)].bg_used_dirs_count++;
  7624. + break;
  7625. + }
  7626. + }
  7627. + node->i_uid = uid;
  7628. + node->i_gid = gid;
  7629. + node->i_atime = mtime;
  7630. + node->i_ctime = ctime;
  7631. + node->i_mtime = mtime;
  7632. return nod;
  7633. }
  7634. +// make a full-fledged directory (i.e. with "." & "..")
  7635. +static inline uint32 mkdir_fs(filesystem *fs, uint32 parent_nod, const char *name, uint32 mode,
  7636. + uid_t uid, gid_t gid, uint32 ctime, uint32 mtime)
  7637. +{
  7638. + return mknod_fs(fs, parent_nod, name, mode|FM_IFDIR, uid, gid, 0, 0, ctime, mtime);
  7639. +}
  7640. +
  7641. // make a symlink
  7642. -uint32 mklink_fs(filesystem *fs, uint32 parent_nod, const char *name, size_t size, uint8 * b)
  7643. +static uint32 mklink_fs(filesystem *fs, uint32 parent_nod, const char *name, size_t size, uint8 *b, uid_t uid, gid_t gid, uint32 ctime, uint32 mtime)
  7644. {
  7645. - uint32 nod = alloc_nod(fs);
  7646. - get_nod(fs, nod)->i_mode = FM_IFLNK | FM_IRWXU | FM_IRWXG | FM_IRWXO;
  7647. + uint32 nod = mknod_fs(fs, parent_nod, name, FM_IFLNK | FM_IRWXU | FM_IRWXG | FM_IRWXO, uid, gid, 0, 0, ctime, mtime);
  7648. + truncate_nod(fs, nod);
  7649. get_nod(fs, nod)->i_size = size;
  7650. - add2dir(fs, parent_nod, nod, name);
  7651. if(size <= 4 * (EXT2_TIND_BLOCK+1))
  7652. {
  7653. strncpy((char*)get_nod(fs, nod)->i_block, (char*)b, size);
  7654. @@ -801,228 +1216,361 @@
  7655. }
  7656. // make a file from a FILE*
  7657. -uint32 mkfile_fs(filesystem *fs, uint32 parent_nod, const char *name, uint32 mode, size_t size, FILE *f)
  7658. +static uint32 mkfile_fs(filesystem *fs, uint32 parent_nod, const char *name, uint32 mode, size_t size, FILE *f, uid_t uid, gid_t gid, uint32 ctime, uint32 mtime)
  7659. {
  7660. uint8 * b;
  7661. - uint32 nod = alloc_nod(fs);
  7662. - get_nod(fs, nod)->i_mode = FM_IFREG | mode;
  7663. + uint32 nod = mknod_fs(fs, parent_nod, name, mode|FM_IFREG, uid, gid, 0, 0, ctime, mtime);
  7664. + truncate_nod(fs, nod);
  7665. get_nod(fs, nod)->i_size = size;
  7666. - add2dir(fs, parent_nod, nod, name);
  7667. if(!(b = (uint8*)malloc(rndup(size, BLOCKSIZE))))
  7668. - errexit("not enough mem to read file '%s'", name);
  7669. + error_msg_and_die("not enough mem to read file '%s'", name);
  7670. memset(b, 0,rndup(size, BLOCKSIZE));
  7671. if(f)
  7672. - fread(b, size, 1, f);
  7673. + fread(b, size, 1, f); // FIXME: ugly. use mmap() ...
  7674. else
  7675. - memset(b, 0, size);
  7676. + memset(b, 0, size); // .. or handle b = 0
  7677. extend_blk(fs, nod, b, rndup(size, BLOCKSIZE) / BLOCKSIZE);
  7678. free(b);
  7679. return nod;
  7680. }
  7681. // retrieves a mode info from a struct stat
  7682. -uint32 get_mode(struct stat *st)
  7683. +static uint32 get_mode(struct stat *st)
  7684. {
  7685. uint32 mode = 0;
  7686. +
  7687. if(st->st_mode & S_IRUSR)
  7688. - mode |= FM_IRUSR | FM_IRGRP | FM_IROTH;
  7689. + mode |= FM_IRUSR;
  7690. if(st->st_mode & S_IWUSR)
  7691. - mode |= FM_IWUSR | FM_IWGRP | FM_IWOTH;
  7692. + mode |= FM_IWUSR;
  7693. if(st->st_mode & S_IXUSR)
  7694. - mode |= FM_IXUSR | FM_IXGRP | FM_IXOTH;
  7695. + mode |= FM_IXUSR;
  7696. + if(st->st_mode & S_IRGRP)
  7697. + mode |= FM_IRGRP;
  7698. + if(st->st_mode & S_IWGRP)
  7699. + mode |= FM_IWGRP;
  7700. + if(st->st_mode & S_IXGRP)
  7701. + mode |= FM_IXGRP;
  7702. + if(st->st_mode & S_IROTH)
  7703. + mode |= FM_IROTH;
  7704. + if(st->st_mode & S_IWOTH)
  7705. + mode |= FM_IWOTH;
  7706. + if(st->st_mode & S_IXOTH)
  7707. + mode |= FM_IXOTH;
  7708. + if(st->st_mode & S_ISUID)
  7709. + mode |= FM_ISUID;
  7710. + if(st->st_mode & S_ISGID)
  7711. + mode |= FM_ISGID;
  7712. + if(st->st_mode & S_ISVTX)
  7713. + mode |= FM_ISVTX;
  7714. return mode;
  7715. }
  7716. -// retrieves a mode info from a string
  7717. -uint32 get_modestr(const char *p)
  7718. -{
  7719. - uint32 mode = 0;
  7720. - if(p[0] == 'r')
  7721. - mode |= FM_IRUSR | FM_IRGRP | FM_IROTH;
  7722. - if(p[1] == 'w')
  7723. - mode |= FM_IWUSR | FM_IWGRP | FM_IWOTH;
  7724. - if(p[2] == 'x' || p[2] == 's')
  7725. - mode |= FM_IXUSR | FM_IXGRP | FM_IXOTH;
  7726. - return mode;
  7727. -}
  7728. -
  7729. -// basename of a path - free me
  7730. -char * basename(const char * fullpath)
  7731. -{
  7732. - char * p = strrchr(fullpath, '/');
  7733. - return strdup(p ? p + 1 : fullpath);
  7734. -}
  7735. -
  7736. -// dirname of a path - free me
  7737. -char * dirname(const char * fullpath)
  7738. -{
  7739. - char * p, * n = strdup(fullpath);
  7740. - if((p = strrchr(n, '/')))
  7741. - *(p+1) = 0;
  7742. - else
  7743. - *n = 0;
  7744. - return n;
  7745. -}
  7746. +// add or fixup entries to the filesystem from a text file
  7747. +/* device table entries take the form of:
  7748. + <path> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>
  7749. + /dev/mem c 640 0 0 1 1 0 0 -
  7750. +
  7751. + type can be one of:
  7752. + f A regular file
  7753. + d Directory
  7754. + c Character special device file
  7755. + b Block special device file
  7756. + p Fifo (named pipe)
  7757. +
  7758. + I don't bother with symlinks (permissions are irrelevant), hard
  7759. + links (special cases of regular files), or sockets (why bother).
  7760. +
  7761. + Regular files must exist in the target root directory. If a char,
  7762. + block, fifo, or directory does not exist, it will be created.
  7763. +*/
  7764. +
  7765. +static void add2fs_from_file(filesystem *fs, uint32 this_nod, FILE * fh, int squash_uids, int squash_perms, struct stats *stats)
  7766. +{
  7767. + unsigned long mode, uid, gid, major, minor;
  7768. + unsigned long start, increment, count;
  7769. + uint32 nod, ctime, mtime;
  7770. + char *c, type, *path = NULL, *path2 = NULL, *dir, *name, *line = NULL;
  7771. + size_t len;
  7772. + struct stat st;
  7773. + int nbargs, lineno = 0;
  7774. -// adds entries to the filesystem from a text file
  7775. -void add2fs_from_file(filesystem *fs, uint32 this_nod, FILE * fh)
  7776. -{
  7777. - uint32 mode;
  7778. - uint32 nod, nod2;
  7779. - char cmod[11], *path, *name, *dir;
  7780. - int major, minor;
  7781. - while(fscanf(fh, "%10s", cmod))
  7782. - {
  7783. - if(feof(fh))
  7784. - break;
  7785. - mode = get_modestr(cmod + 1);
  7786. - switch(*cmod)
  7787. + fstat(fileno(fh), &st);
  7788. + ctime = st.st_ctime;
  7789. + mtime = st.st_mtime;
  7790. + while(getline(&line, &len, fh) >= 0)
  7791. + {
  7792. + mode = uid = gid = major = minor = 0;
  7793. + start = 0; increment = 1; count = 0;
  7794. + lineno++;
  7795. + if((c = strchr(line, '#')))
  7796. + *c = 0;
  7797. + free(path); path = NULL;
  7798. + free(path2); path2 = NULL;
  7799. + nbargs = sscanf (line, "%" SCANF_PREFIX "s %c %lo %lu %lu %lu %lu %lu %lu %lu",
  7800. + SCANF_STRING(path), &type, &mode, &uid, &gid, &major, &minor,
  7801. + &start, &increment, &count);
  7802. + if(nbargs < 3)
  7803. {
  7804. - case 'd':
  7805. - fscanf(fh, "%" SCANF_PREFIX "s\n", SCANF_STRING(path));
  7806. - break;
  7807. - case 'c':
  7808. - mode |= FM_IFCHR;
  7809. - fscanf(fh, "%i, %i %" SCANF_PREFIX "s\n", &major, &minor, SCANF_STRING(path));
  7810. - break;
  7811. - case 'b':
  7812. - mode |= FM_IFBLK;
  7813. - fscanf(fh, "%i, %i %" SCANF_PREFIX "s\n", &major, &minor, SCANF_STRING(path));
  7814. - break;
  7815. - case '#':
  7816. - while(fgetc(fh) != '\n');
  7817. - continue;
  7818. - default:
  7819. - errexit("malformed text input file");
  7820. + if(nbargs > 0)
  7821. + error_msg("device table line %d skipped: bad format for entry '%s'", lineno, path);
  7822. + continue;
  7823. }
  7824. - name = basename(path);
  7825. - dir = dirname(path);
  7826. - free(path);
  7827. - if(!(nod = find_path(fs, this_nod, dir)))
  7828. - errexit("can't find directory '%s' to create '%s''", dir, name);
  7829. - free(dir);
  7830. - if((!strcmp(name, ".")) || (!strcmp(name, "..")))
  7831. + if(stats)
  7832. {
  7833. - free(name);
  7834. - continue;
  7835. + stats->ninodes += count ? count : 1;
  7836. }
  7837. - switch(*cmod)
  7838. + else
  7839. {
  7840. - case 'd':
  7841. - mkdir_fs(fs, nod, name, mode);
  7842. - break;
  7843. - case 'c':
  7844. - case 'b':
  7845. - nod2 = alloc_nod(fs);
  7846. - get_nod(fs, nod2)->i_mode = mode;
  7847. - ((uint8*)get_nod(fs, nod2)->i_block)[0] = minor;
  7848. - ((uint8*)get_nod(fs, nod2)->i_block)[1] = major;
  7849. - add2dir(fs, nod, nod2, name);
  7850. - break;
  7851. + if(squash_uids)
  7852. + uid = gid = 0;
  7853. + if(squash_perms)
  7854. + mode &= ~(FM_IRWXG | FM_IRWXO);
  7855. + mode &= FM_IMASK;
  7856. + path2 = strdup(path);
  7857. + name = basename(path);
  7858. + dir = dirname(path2);
  7859. + if(!(nod = find_path(fs, this_nod, dir)))
  7860. + {
  7861. + error_msg("device table line %d skipped: can't find directory '%s' to create '%s''", lineno, dir, name);
  7862. + continue;
  7863. + }
  7864. + if((!strcmp(name, ".")) || (!strcmp(name, "..")))
  7865. + {
  7866. + error_msg("device table line %d skipped", lineno);
  7867. + continue;
  7868. + }
  7869. +
  7870. + switch (type)
  7871. + {
  7872. + case 'd':
  7873. + mode |= FM_IFDIR;
  7874. + break;
  7875. + case 'f':
  7876. + mode |= FM_IFREG;
  7877. + break;
  7878. + case 'p':
  7879. + mode |= FM_IFIFO;
  7880. + break;
  7881. + case 'c':
  7882. + mode |= FM_IFCHR;
  7883. + break;
  7884. + case 'b':
  7885. + mode |= FM_IFBLK;
  7886. + break;
  7887. + default:
  7888. + error_msg("device table line %d skipped: bad type '%c' for entry '%s'", lineno, type, name);
  7889. + continue;
  7890. + }
  7891. + if(count > 0)
  7892. + {
  7893. + char *dname;
  7894. + unsigned i, len;
  7895. + len = strlen(name) + 10;
  7896. + dname = malloc(len + 1);
  7897. + for(i = start; i < count; i++)
  7898. + {
  7899. + snprintf(dname, len, "%s%u", name, i);
  7900. + mknod_fs(fs, nod, dname, mode, uid, gid, major, minor + (i * increment - start), ctime, mtime);
  7901. + }
  7902. + free(dname);
  7903. + }
  7904. + else
  7905. + mknod_fs(fs, nod, name, mode, uid, gid, major, minor, ctime, mtime);
  7906. }
  7907. - free(name);
  7908. }
  7909. + free(line);
  7910. + free(path);
  7911. + free(path2);
  7912. }
  7913. // adds a tree of entries to the filesystem from current dir
  7914. -void add2fs_from_dir(filesystem *fs, uint32 this_nod)
  7915. +static void add2fs_from_dir(filesystem *fs, uint32 this_nod, int squash_uids, int squash_perms, struct stats *stats)
  7916. {
  7917. uint32 nod;
  7918. + uint32 uid, gid, mode, ctime, mtime;
  7919. + const char *name;
  7920. FILE *fh;
  7921. DIR *dh;
  7922. struct dirent *dent;
  7923. struct stat st;
  7924. uint8 *b;
  7925. if(!(dh = opendir(".")))
  7926. - pexit(".");
  7927. + perror_msg_and_die(".");
  7928. while((dent = readdir(dh)))
  7929. {
  7930. if((!strcmp(dent->d_name, ".")) || (!strcmp(dent->d_name, "..")))
  7931. continue;
  7932. lstat(dent->d_name, &st);
  7933. - switch(st.st_mode & S_IFMT)
  7934. - {
  7935. - case S_IFCHR:
  7936. - case S_IFBLK:
  7937. - nod = alloc_nod(fs);
  7938. - get_nod(fs, nod)->i_mode = (((st.st_mode & S_IFMT) == S_IFCHR) ? FM_IFCHR : FM_IFBLK) | get_mode(&st);
  7939. - ((uint8*)get_nod(fs, nod)->i_block)[0] = (st.st_rdev & 0xff);
  7940. - ((uint8*)get_nod(fs, nod)->i_block)[1] = (st.st_rdev >> 8);
  7941. - add2dir(fs, this_nod, nod, dent->d_name);
  7942. - break;
  7943. - case S_IFLNK:
  7944. - if(!(b = (uint8*)malloc(rndup(st.st_size, BLOCKSIZE))))
  7945. - errexit("out of memory");
  7946. - if(readlink(dent->d_name, (char*)b, st.st_size) < 0)
  7947. - pexit(dent->d_name);
  7948. - mklink_fs(fs, this_nod, dent->d_name, st.st_size, b);
  7949. - free(b);
  7950. - break;
  7951. - case S_IFREG:
  7952. - if(!(fh = fopen(dent->d_name, "r")))
  7953. - pexit(dent->d_name);
  7954. - mkfile_fs(fs, this_nod, dent->d_name, get_mode(&st), st.st_size, fh);
  7955. - fclose(fh);
  7956. - break;
  7957. - case S_IFDIR:
  7958. - nod = mkdir_fs(fs, this_nod, dent->d_name, get_mode(&st));
  7959. - if(chdir(dent->d_name) < 0)
  7960. - pexit(dent->d_name);
  7961. - add2fs_from_dir(fs, nod);
  7962. - chdir("..");
  7963. - break;
  7964. - default:
  7965. - fprintf(stderr, "ignoring entry %s", dent->d_name);
  7966. - }
  7967. + uid = st.st_uid;
  7968. + gid = st.st_gid;
  7969. + ctime = st.st_ctime;
  7970. + mtime = st.st_mtime;
  7971. + name = dent->d_name;
  7972. + mode = get_mode(&st);
  7973. + if(squash_uids)
  7974. + uid = gid = 0;
  7975. + if(squash_perms)
  7976. + mode &= ~(FM_IRWXG | FM_IRWXO);
  7977. + if(stats)
  7978. + switch(st.st_mode & S_IFMT)
  7979. + {
  7980. + case S_IFLNK:
  7981. + case S_IFREG:
  7982. + if((st.st_mode & S_IFMT) == S_IFREG || st.st_size > 4 * (EXT2_TIND_BLOCK+1))
  7983. + stats->nblocks += (st.st_size + BLOCKSIZE - 1) / BLOCKSIZE;
  7984. + case S_IFCHR:
  7985. + case S_IFBLK:
  7986. + case S_IFIFO:
  7987. + stats->ninodes++;
  7988. + break;
  7989. + case S_IFDIR:
  7990. + stats->ninodes++;
  7991. + if(chdir(dent->d_name) < 0)
  7992. + perror_msg_and_die(dent->d_name);
  7993. + add2fs_from_dir(fs, nod, squash_uids, squash_perms, stats);
  7994. + chdir("..");
  7995. + break;
  7996. + default:
  7997. + break;
  7998. + }
  7999. + else
  8000. + switch(st.st_mode & S_IFMT)
  8001. + {
  8002. + case S_IFCHR:
  8003. + mknod_fs(fs, this_nod, name, mode|FM_IFCHR, uid, gid, st.st_rdev >> 8, st.st_rdev & 0xff, ctime, mtime);
  8004. + break;
  8005. + case S_IFBLK:
  8006. + mknod_fs(fs, this_nod, name, mode|FM_IFBLK, uid, gid, st.st_rdev >> 8, st.st_rdev & 0xff, ctime, mtime);
  8007. + break;
  8008. + case S_IFIFO:
  8009. + mknod_fs(fs, this_nod, name, mode|FM_IFIFO, uid, gid, 0, 0, ctime, mtime);
  8010. + break;
  8011. + case S_IFLNK:
  8012. + b = xreadlink(dent->d_name);
  8013. + mklink_fs(fs, this_nod, name, st.st_size, b, uid, gid, ctime, mtime);
  8014. + free(b);
  8015. + break;
  8016. + case S_IFREG:
  8017. + fh = xfopen(dent->d_name, "r");
  8018. + mkfile_fs(fs, this_nod, name, mode, st.st_size, fh, uid, gid, ctime, mtime);
  8019. + fclose(fh);
  8020. + break;
  8021. + case S_IFDIR:
  8022. + nod = mkdir_fs(fs, this_nod, name, mode, uid, gid, ctime, mtime);
  8023. + if(chdir(dent->d_name) < 0)
  8024. + perror_msg_and_die(name);
  8025. + add2fs_from_dir(fs, nod, squash_uids, squash_perms, stats);
  8026. + chdir("..");
  8027. + break;
  8028. + default:
  8029. + error_msg("ignoring entry %s", name);
  8030. + }
  8031. }
  8032. closedir(dh);
  8033. }
  8034. // endianness swap of x-indirect blocks
  8035. -void swap_goodblocks(filesystem *fs, inode *nod)
  8036. +static void swap_goodblocks(filesystem *fs, inode *nod)
  8037. {
  8038. - int i;
  8039. + int i,j,done=0;
  8040. + uint32 *b,*b2;
  8041. +
  8042. int nblk = nod->i_blocks / INOBLK;
  8043. - if((nod->i_size && !nblk) || (nod->i_mode & (FM_IFBLK | FM_IFCHR)))
  8044. + if((nod->i_size && !nblk) || ((nod->i_mode & FM_IFBLK) == FM_IFBLK) || ((nod->i_mode & FM_IFCHR) == FM_IFCHR))
  8045. for(i = 0; i <= EXT2_TIND_BLOCK; i++)
  8046. nod->i_block[i] = swab32(nod->i_block[i]);
  8047. if(nblk <= EXT2_IND_BLOCK)
  8048. return;
  8049. swap_block(get_blk(fs, nod->i_block[EXT2_IND_BLOCK]));
  8050. - if(nblk <= EXT2_IND_BLOCK + BLOCKSIZE/4)
  8051. + if(nblk <= EXT2_DIND_BLOCK + BLOCKSIZE/4)
  8052. return;
  8053. + /* Currently this will fail b'cos the number of blocks as stored
  8054. + in i_blocks also includes the indirection blocks (see
  8055. + walk_bw). But this function assumes that i_blocks only
  8056. + stores the count of data blocks ( Actually according to
  8057. + "Understanding the Linux Kernel" (Table 17-3 p502 1st Ed)
  8058. + i_blocks IS supposed to store the count of data blocks). so
  8059. + with a file of size 268K nblk would be 269.The above check
  8060. + will be false even though double indirection hasn't been
  8061. + started.This is benign as 0 means block 0 which has been
  8062. + zeroed out and therefore points back to itself from any offset
  8063. + */
  8064. + // FIXME: I have fixed that, but I have the feeling the rest of
  8065. + // ths function needs to be fixed for the same reasons - Xav
  8066. + assert(nod->i_block[EXT2_DIND_BLOCK] != 0);
  8067. for(i = 0; i < BLOCKSIZE/4; i++)
  8068. - if(nblk > EXT2_IND_BLOCK + BLOCKSIZE/4 + i)
  8069. + if(nblk > EXT2_IND_BLOCK + BLOCKSIZE/4 + (BLOCKSIZE/4)*i )
  8070. swap_block(get_blk(fs, ((uint32*)get_blk(fs, nod->i_block[EXT2_DIND_BLOCK]))[i]));
  8071. swap_block(get_blk(fs, nod->i_block[EXT2_DIND_BLOCK]));
  8072. if(nblk <= EXT2_IND_BLOCK + BLOCKSIZE/4 + BLOCKSIZE/4 * BLOCKSIZE/4)
  8073. return;
  8074. - errexit("too big file on the filesystem");
  8075. + /* Adding support for triple indirection */
  8076. + b = (uint32*)get_blk(fs,nod->i_block[EXT2_TIND_BLOCK]);
  8077. + for(i=0;i < BLOCKSIZE/4 && !done ; i++) {
  8078. + b2 = (uint32*)get_blk(fs,b[i]);
  8079. + for(j=0; j<BLOCKSIZE/4;j++) {
  8080. + if (nblk > ( EXT2_IND_BLOCK + BLOCKSIZE/4 +
  8081. + (BLOCKSIZE/4)*(BLOCKSIZE/4) +
  8082. + i*(BLOCKSIZE/4)*(BLOCKSIZE/4) +
  8083. + j*(BLOCKSIZE/4)) )
  8084. + swap_block(get_blk(fs,b2[j]));
  8085. + else {
  8086. + done = 1;
  8087. + break;
  8088. + }
  8089. + }
  8090. + swap_block((uint8 *)b2);
  8091. + }
  8092. + swap_block((uint8 *)b);
  8093. + return;
  8094. }
  8095. -void swap_badblocks(filesystem *fs, inode *nod)
  8096. +static void swap_badblocks(filesystem *fs, inode *nod)
  8097. {
  8098. - int i;
  8099. + int i,j,done=0;
  8100. + uint32 *b,*b2;
  8101. +
  8102. int nblk = nod->i_blocks / INOBLK;
  8103. - if((nod->i_size && !nblk) || (nod->i_mode & (FM_IFBLK | FM_IFCHR)))
  8104. + if((nod->i_size && !nblk) || ((nod->i_mode & FM_IFBLK) == FM_IFBLK) || ((nod->i_mode & FM_IFCHR) == FM_IFCHR))
  8105. for(i = 0; i <= EXT2_TIND_BLOCK; i++)
  8106. nod->i_block[i] = swab32(nod->i_block[i]);
  8107. if(nblk <= EXT2_IND_BLOCK)
  8108. return;
  8109. swap_block(get_blk(fs, nod->i_block[EXT2_IND_BLOCK]));
  8110. - if(nblk <= EXT2_IND_BLOCK + BLOCKSIZE/4)
  8111. + if(nblk <= EXT2_DIND_BLOCK + BLOCKSIZE/4)
  8112. return;
  8113. + /* See comment in swap_goodblocks */
  8114. + assert(nod->i_block[EXT2_DIND_BLOCK] != 0);
  8115. swap_block(get_blk(fs, nod->i_block[EXT2_DIND_BLOCK]));
  8116. for(i = 0; i < BLOCKSIZE/4; i++)
  8117. - if(nblk > EXT2_IND_BLOCK + BLOCKSIZE/4 + i)
  8118. + if(nblk > EXT2_IND_BLOCK + BLOCKSIZE/4 + (BLOCKSIZE/4)*i )
  8119. swap_block(get_blk(fs, ((uint32*)get_blk(fs, nod->i_block[EXT2_DIND_BLOCK]))[i]));
  8120. if(nblk <= EXT2_IND_BLOCK + BLOCKSIZE/4 + BLOCKSIZE/4 * BLOCKSIZE/4)
  8121. return;
  8122. - errexit("too big file on the filesystem");
  8123. + /* Adding support for triple indirection */
  8124. + b = (uint32*)get_blk(fs,nod->i_block[EXT2_TIND_BLOCK]);
  8125. + swap_block((uint8 *)b);
  8126. + for(i=0;i < BLOCKSIZE/4 && !done ; i++) {
  8127. + b2 = (uint32*)get_blk(fs,b[i]);
  8128. + swap_block((uint8 *)b2);
  8129. + for(j=0; j<BLOCKSIZE/4;j++) {
  8130. + if (nblk > ( EXT2_IND_BLOCK + BLOCKSIZE/4 +
  8131. + (BLOCKSIZE/4)*(BLOCKSIZE/4) +
  8132. + i*(BLOCKSIZE/4)*(BLOCKSIZE/4) +
  8133. + j*(BLOCKSIZE/4)) )
  8134. + swap_block(get_blk(fs,b2[j]));
  8135. + else {
  8136. + done = 1;
  8137. + break;
  8138. + }
  8139. + }
  8140. + }
  8141. + return;
  8142. }
  8143. // endianness swap of the whole filesystem
  8144. -void swap_goodfs(filesystem *fs)
  8145. +static void swap_goodfs(filesystem *fs)
  8146. {
  8147. int i;
  8148. for(i = 1; i < fs->sb.s_inodes_count; i++)
  8149. @@ -1045,15 +1593,17 @@
  8150. swap_goodblocks(fs, nod);
  8151. swap_nod(nod);
  8152. }
  8153. - swap_gd(&fs->gd);
  8154. + for(i=0;i<GRP_NBGROUPS(fs);i++)
  8155. + swap_gd(&(fs->gd[i]));
  8156. swap_sb(&fs->sb);
  8157. }
  8158. -void swap_badfs(filesystem *fs)
  8159. +static void swap_badfs(filesystem *fs)
  8160. {
  8161. int i;
  8162. swap_sb(&fs->sb);
  8163. - swap_gd(&fs->gd);
  8164. + for(i=0;i<GRP_NBGROUPS(fs);i++)
  8165. + swap_gd(&(fs->gd[i]));
  8166. for(i = 1; i < fs->sb.s_inodes_count; i++)
  8167. {
  8168. inode *nod = get_nod(fs, i);
  8169. @@ -1077,60 +1627,123 @@
  8170. }
  8171. // initialize an empty filesystem
  8172. -filesystem * init_fs(int nbblocks, int nbinodes, int nbresrvd, int holes)
  8173. +static filesystem * init_fs(int nbblocks, int nbinodes, int nbresrvd, int holes)
  8174. {
  8175. int i;
  8176. filesystem *fs;
  8177. directory *d;
  8178. uint8 * b;
  8179. uint32 nod;
  8180. + uint32 nbgroups,nbinodes_per_group,overhead_per_group,free_blocks,
  8181. + free_blocks_per_group,nbblocks_per_group;
  8182. + uint32 gd,itbl,ibmpos,bbmpos,itblpos;
  8183. + int j;
  8184. + uint8 *bbm,*ibm;
  8185. + inode *itab0;
  8186. + uint32 now = time(NULL);
  8187. if(nbblocks < 16) // totally arbitrary
  8188. - errexit("too small filesystem");
  8189. - if(nbblocks >BLOCKS_PER_GROUP) // I build only one group
  8190. - errexit("too big filesystem");
  8191. + error_msg_and_die("too small filesystem");
  8192. +
  8193. + /* nbblocks is the total number of blocks in the filesystem. First
  8194. + * calculate the size of each group assuming each group has
  8195. + * BLOCKS_PER_GROUP blocks (which is the maximum). Then recalculate
  8196. + * blocks per group so that each group (except possibly the last one)
  8197. + * has the same number of blocks. nbinodes is the total number of
  8198. + * inodes in the system. These are divided between all groups.
  8199. + * Then calculate the overhead blocks - inode table blocks, bitmap
  8200. + * blocks, group descriptor blocks etc.
  8201. + */
  8202. +
  8203. + nbgroups = (nbblocks + BLOCKS_PER_GROUP - 1) / BLOCKS_PER_GROUP;
  8204. + nbblocks_per_group = rndup((nbblocks + nbgroups - 1)/nbgroups, 8);
  8205. + nbinodes_per_group = rndup((nbinodes + nbgroups - 1)/nbgroups,
  8206. + (BLOCKSIZE/sizeof(inode)));
  8207. + if (nbinodes_per_group < 16)
  8208. + nbinodes_per_group = 16; //minimum number b'cos the first 10 are reserved
  8209. +
  8210. + gd = rndup(nbgroups*sizeof(groupdescriptor),BLOCKSIZE)/BLOCKSIZE;
  8211. + itbl = nbinodes_per_group * sizeof(inode)/BLOCKSIZE;
  8212. + overhead_per_group = 3 /*sb,ibm,bbm*/ + itbl + gd;
  8213. + free_blocks = nbblocks - overhead_per_group*nbgroups - 1 /*boot block*/;
  8214. + free_blocks_per_group = nbblocks_per_group - overhead_per_group;
  8215. +
  8216. if(!(fs = (filesystem*)calloc(nbblocks, BLOCKSIZE)))
  8217. - errexit("not enough memory for filesystem");
  8218. + error_msg_and_die("not enough memory for filesystem");
  8219. // create the superblock for an empty filesystem
  8220. - fs->sb.s_inodes_count = rndup(nbinodes, BLOCKSIZE/sizeof(inode));
  8221. + fs->sb.s_inodes_count = nbinodes_per_group * nbgroups;
  8222. fs->sb.s_blocks_count = nbblocks;
  8223. fs->sb.s_r_blocks_count = nbresrvd;
  8224. - fs->sb.s_free_blocks_count = nbblocks;
  8225. + fs->sb.s_free_blocks_count = free_blocks;
  8226. fs->sb.s_free_inodes_count = fs->sb.s_inodes_count - EXT2_FIRST_INO + 1;
  8227. fs->sb.s_first_data_block = (BLOCKSIZE == 1024);
  8228. fs->sb.s_log_block_size = BLOCKSIZE >> 11;
  8229. fs->sb.s_log_frag_size = BLOCKSIZE >> 11;
  8230. - fs->sb.s_blocks_per_group = BLOCKS_PER_GROUP;
  8231. - fs->sb.s_frags_per_group = BLOCKS_PER_GROUP;
  8232. - fs->sb.s_inodes_per_group = fs->sb.s_inodes_count;
  8233. + fs->sb.s_blocks_per_group = nbblocks_per_group;
  8234. + fs->sb.s_frags_per_group = nbblocks_per_group;
  8235. + fs->sb.s_inodes_per_group = nbinodes_per_group;
  8236. fs->sb.s_magic = EXT2_MAGIC_NUMBER;
  8237. // set up groupdescriptors
  8238. - fs->sb.s_free_blocks_count -= 5 + fs->sb.s_inodes_count * sizeof(inode) / BLOCKSIZE;
  8239. - fs->gd.bg_free_blocks_count = fs->sb.s_free_blocks_count;
  8240. - fs->gd.bg_free_inodes_count = fs->sb.s_free_inodes_count;
  8241. - fs->gd.bg_used_dirs_count = 1;
  8242. - fs->gd.bg_block_bitmap = 3;
  8243. - fs->gd.bg_inode_bitmap = 4;
  8244. - fs->gd.bg_inode_table = 5;
  8245. -
  8246. - // mark non-filesystem blocks and inodes as allocated
  8247. - for(i = fs->sb.s_blocks_count; i <= BLOCKSIZE * 8; i++)
  8248. - allocate(fs->bbm, i);
  8249. - for(i = fs->sb.s_inodes_count + 1; i <= BLOCKSIZE * 8; i++)
  8250. - allocate(fs->ibm, i);
  8251. -
  8252. - // mark system blocsk and inodes as allocated
  8253. - for(i = 1; i <= 4 + fs->sb.s_inodes_count * sizeof(inode) / BLOCKSIZE; i++)
  8254. - allocate(fs->bbm, i);
  8255. - for(i = 1; i < EXT2_FIRST_INO; i++)
  8256. - allocate(fs->ibm, i);
  8257. + for(i = 0,bbmpos=2+gd,ibmpos=3+gd,itblpos =4+gd;
  8258. + i<nbgroups;
  8259. + i++, bbmpos += nbblocks_per_group,ibmpos += nbblocks_per_group,
  8260. + itblpos += nbblocks_per_group) {
  8261. +
  8262. + if(free_blocks > free_blocks_per_group) {
  8263. + fs->gd[i].bg_free_blocks_count = free_blocks_per_group;
  8264. + free_blocks -= free_blocks_per_group;
  8265. + } else {
  8266. + fs->gd[i].bg_free_blocks_count = free_blocks;
  8267. + free_blocks = 0; // this is the last block group
  8268. + }
  8269. + if(i)
  8270. + fs->gd[i].bg_free_inodes_count = nbinodes_per_group;
  8271. + else
  8272. + fs->gd[i].bg_free_inodes_count = nbinodes_per_group -
  8273. + EXT2_FIRST_INO + 2;
  8274. + fs->gd[i].bg_used_dirs_count = 0;
  8275. + fs->gd[i].bg_block_bitmap = bbmpos;
  8276. + fs->gd[i].bg_inode_bitmap = ibmpos;
  8277. + fs->gd[i].bg_inode_table = itblpos;
  8278. + }
  8279. +
  8280. + /* Mark non-filesystem blocks and inodes as allocated */
  8281. + /* Mark system blocks and inodes as allocated */
  8282. + for(i = 0; i<nbgroups;i++) {
  8283. +
  8284. + /* Block bitmap */
  8285. + bbm = get_blk(fs,fs->gd[i].bg_block_bitmap);
  8286. + //non-filesystem blocks
  8287. + for(j = fs->gd[i].bg_free_blocks_count
  8288. + + overhead_per_group + 1; j <= BLOCKSIZE * 8; j++)
  8289. + allocate(bbm, j);
  8290. + //system blocks
  8291. + for(j = 1; j <= overhead_per_group; j++)
  8292. + allocate(bbm, j);
  8293. +
  8294. + /* Inode bitmap */
  8295. + ibm = get_blk(fs,fs->gd[i].bg_inode_bitmap);
  8296. + //non-filesystem inodes
  8297. + for(j = fs->sb.s_inodes_per_group+1; j <= BLOCKSIZE * 8; j++)
  8298. + allocate(ibm, j);
  8299. + //system inodes
  8300. + if(i == 0)
  8301. + for(j = 1; j < EXT2_FIRST_INO; j++)
  8302. + allocate(ibm, j);
  8303. + }
  8304. // make root inode and directory
  8305. - fs->itab[EXT2_ROOT_INO-1].i_mode = FM_IFDIR | FM_IRWXU | FM_IRWXG | FM_IRWXO;
  8306. - fs->itab[EXT2_ROOT_INO-1].i_size = BLOCKSIZE;
  8307. - fs->itab[EXT2_ROOT_INO-1].i_links_count = 2;
  8308. + /* We have groups now. Add the root filesystem in group 0 */
  8309. + /* Also increment the directory count for group 0 */
  8310. + fs->gd[0].bg_free_inodes_count--;
  8311. + fs->gd[0].bg_used_dirs_count = 1;
  8312. + itab0 = (inode *)get_blk(fs,fs->gd[0].bg_inode_table);
  8313. + itab0[EXT2_ROOT_INO-1].i_mode = FM_IFDIR | FM_IRWXU | FM_IRGRP | FM_IROTH | FM_IXGRP | FM_IXOTH;
  8314. + itab0[EXT2_ROOT_INO-1].i_size = BLOCKSIZE;
  8315. + itab0[EXT2_ROOT_INO-1].i_links_count = 2;
  8316. +
  8317. b = get_workblk();
  8318. d = (directory*)b;
  8319. d->d_inode = EXT2_ROOT_INO;
  8320. @@ -1147,9 +1760,14 @@
  8321. // make lost+found directory and reserve blocks
  8322. if(fs->sb.s_r_blocks_count)
  8323. {
  8324. - nod = mkdir_fs(fs, EXT2_ROOT_INO, "lost+found", FM_IRWXU | FM_IRWXG | FM_IRWXO);
  8325. + nod = mkdir_fs(fs, EXT2_ROOT_INO, "lost+found", FM_IRWXU, 0, 0, now, now);
  8326. memset(b, 0, BLOCKSIZE);
  8327. ((directory*)b)->d_rec_len = BLOCKSIZE;
  8328. + /* We run into problems with e2fsck if directory lost+found grows
  8329. + * bigger than this. Need to find out why this happens - sundar
  8330. + */
  8331. + if (fs->sb.s_r_blocks_count > fs->sb.s_blocks_count * MAX_RESERVED_BLOCKS )
  8332. + fs->sb.s_r_blocks_count = fs->sb.s_blocks_count * MAX_RESERVED_BLOCKS;
  8333. for(i = 1; i < fs->sb.s_r_blocks_count; i++)
  8334. extend_blk(fs, nod, b, 1);
  8335. get_nod(fs, nod)->i_size = fs->sb.s_r_blocks_count * BLOCKSIZE;
  8336. @@ -1168,36 +1786,34 @@
  8337. }
  8338. // loads a filesystem from disk
  8339. -filesystem * load_fs(FILE * fh, int swapit)
  8340. +static filesystem * load_fs(FILE * fh, int swapit)
  8341. {
  8342. size_t fssize;
  8343. filesystem *fs;
  8344. if((fseek(fh, 0, SEEK_END) < 0) || ((fssize = ftell(fh)) < 0))
  8345. - pexit("input filesystem image");
  8346. + perror_msg_and_die("input filesystem image");
  8347. rewind(fh);
  8348. fssize = (fssize + BLOCKSIZE - 1) / BLOCKSIZE;
  8349. if(fssize < 16) // totally arbitrary
  8350. - errexit("too small filesystem");
  8351. - if(fssize > BLOCKS_PER_GROUP) // I build only one group
  8352. - errexit("too big filesystem");
  8353. + error_msg_and_die("too small filesystem");
  8354. if(!(fs = (filesystem*)calloc(fssize, BLOCKSIZE)))
  8355. - errexit("not enough memory for filesystem");
  8356. + error_msg_and_die("not enough memory for filesystem");
  8357. if(fread(fs, BLOCKSIZE, fssize, fh) != fssize)
  8358. - pexit("input filesystem image");
  8359. + perror_msg_and_die("input filesystem image");
  8360. if(swapit)
  8361. swap_badfs(fs);
  8362. if(fs->sb.s_rev_level || (fs->sb.s_magic != EXT2_MAGIC_NUMBER))
  8363. - errexit("not a suitable ext2 filesystem");
  8364. + error_msg_and_die("not a suitable ext2 filesystem");
  8365. return fs;
  8366. }
  8367. -void free_fs(filesystem *fs)
  8368. +static void free_fs(filesystem *fs)
  8369. {
  8370. free(fs);
  8371. }
  8372. // just walk through blocks list
  8373. -void flist_blocks(filesystem *fs, uint32 nod, FILE *fh)
  8374. +static void flist_blocks(filesystem *fs, uint32 nod, FILE *fh)
  8375. {
  8376. blockwalker bw;
  8377. uint32 bk;
  8378. @@ -1208,7 +1824,7 @@
  8379. }
  8380. // walk through blocks list
  8381. -void list_blocks(filesystem *fs, uint32 nod)
  8382. +static void list_blocks(filesystem *fs, uint32 nod)
  8383. {
  8384. int bn = 0;
  8385. blockwalker bw;
  8386. @@ -1221,7 +1837,7 @@
  8387. }
  8388. // saves blocks to FILE*
  8389. -void write_blocks(filesystem *fs, uint32 nod, FILE* f)
  8390. +static void write_blocks(filesystem *fs, uint32 nod, FILE* f)
  8391. {
  8392. blockwalker bw;
  8393. uint32 bk;
  8394. @@ -1230,15 +1846,15 @@
  8395. while((bk = walk_bw(fs, nod, &bw, 0, 0)) != WALK_END)
  8396. {
  8397. if(fsize <= 0)
  8398. - errexit("wrong size while saving inode %d", nod);
  8399. + error_msg_and_die("wrong size while saving inode %d", nod);
  8400. if(fwrite(get_blk(fs, bk), (fsize > BLOCKSIZE) ? BLOCKSIZE : fsize, 1, f) != 1)
  8401. - errexit("error while saving inode %d", nod);
  8402. + error_msg_and_die("error while saving inode %d", nod);
  8403. fsize -= BLOCKSIZE;
  8404. }
  8405. }
  8406. // hexdumps blocks to a FILE*
  8407. -void hexdump_blocks(filesystem *fs, uint32 nod, FILE* f)
  8408. +static void hexdump_blocks(filesystem *fs, uint32 nod, FILE* f)
  8409. {
  8410. blockwalker bw;
  8411. uint32 bk;
  8412. @@ -1250,7 +1866,7 @@
  8413. {
  8414. int i, j;
  8415. if(fsize <= 0)
  8416. - errexit("wrong size while saving inode %d", nod);
  8417. + error_msg_and_die("wrong size while saving inode %d", nod);
  8418. b = get_blk(fs, bk);
  8419. for(i = 0; i < 64; i++)
  8420. {
  8421. @@ -1273,7 +1889,7 @@
  8422. }
  8423. // print block/char device minor and major
  8424. -void print_dev(filesystem *fs, uint32 nod)
  8425. +static void print_dev(filesystem *fs, uint32 nod)
  8426. {
  8427. int minor, major;
  8428. minor = ((uint8*)get_nod(fs, nod)->i_block)[0];
  8429. @@ -1282,7 +1898,7 @@
  8430. }
  8431. // print an inode as a directory
  8432. -void print_dir(filesystem *fs, uint32 nod)
  8433. +static void print_dir(filesystem *fs, uint32 nod)
  8434. {
  8435. blockwalker bw;
  8436. uint32 bk;
  8437. @@ -1306,7 +1922,7 @@
  8438. }
  8439. // print a symbolic link
  8440. -void print_link(filesystem *fs, uint32 nod)
  8441. +static void print_link(filesystem *fs, uint32 nod)
  8442. {
  8443. if(!get_nod(fs, nod)->i_blocks)
  8444. printf("links to '%s'\n", (char*)get_nod(fs, nod)->i_block);
  8445. @@ -1319,7 +1935,7 @@
  8446. }
  8447. // make a ls-like printout of permissions
  8448. -void make_perms(uint32 mode, char perms[11])
  8449. +static void make_perms(uint32 mode, char perms[11])
  8450. {
  8451. strcpy(perms, "----------");
  8452. if(mode & FM_IRUSR)
  8453. @@ -1378,7 +1994,7 @@
  8454. }
  8455. // print an inode
  8456. -void print_inode(filesystem *fs, uint32 nod)
  8457. +static void print_inode(filesystem *fs, uint32 nod)
  8458. {
  8459. char *s;
  8460. char perms[11];
  8461. @@ -1406,7 +2022,7 @@
  8462. s = (nod >= EXT2_FIRST_INO) ? "normal" : "unknown reserved";
  8463. }
  8464. printf("inode %d (%s, %d links): ", nod, s, get_nod(fs, nod)->i_links_count);
  8465. - if(!allocated(fs->ibm, nod))
  8466. + if(!allocated(GRP_GET_INODE_BITMAP(fs,nod), GRP_IBM_OFFSET(fs,nod)))
  8467. {
  8468. printf("unallocated\n");
  8469. return;
  8470. @@ -1440,58 +2056,76 @@
  8471. default:
  8472. list_blocks(fs, nod);
  8473. }
  8474. + printf("Done with inode %d\n",nod);
  8475. }
  8476. // describes various fields in a filesystem
  8477. -void print_fs(filesystem *fs)
  8478. +static void print_fs(filesystem *fs)
  8479. {
  8480. int i;
  8481. - printf("%d blocks (%d free, %d reserved), first data block: %d\n", fs->sb.s_blocks_count, fs->sb.s_free_blocks_count, fs->sb.s_r_blocks_count, fs->sb.s_first_data_block);
  8482. - printf("%d inodes (%d free)\n", fs->sb.s_inodes_count, fs->sb.s_free_inodes_count);
  8483. - printf("block size = %d, frag size = %d\n", fs->sb.s_log_block_size ? (fs->sb.s_log_block_size << 11) : 1024, fs->sb.s_log_frag_size ? (fs->sb.s_log_frag_size << 11) : 1024);
  8484. - printf("%d blocks per group, %d frags per group, %d inodes per group\n", fs->sb.s_blocks_per_group, fs->sb.s_frags_per_group, fs->sb.s_inodes_per_group);
  8485. - printf("block bitmap: block %d, inode bitmap: block %d, inode table: block %d\n", fs->gd.bg_block_bitmap, fs->gd.bg_inode_bitmap, fs->gd.bg_inode_table);
  8486. - printf("block bitmap allocation:\n");
  8487. - print_bm(fs->bbm, fs->sb.s_blocks_count);
  8488. - printf("inode bitmap allocation:\n");
  8489. - print_bm(fs->ibm, fs->sb.s_inodes_count);
  8490. - for(i=1; i<=fs->sb.s_inodes_count; i++)
  8491. - if(allocated(fs->ibm, i))
  8492. - print_inode(fs, i);
  8493. + uint8 *ibm;
  8494. +
  8495. + printf("%d blocks (%d free, %d reserved), first data block: %d\n",
  8496. + fs->sb.s_blocks_count, fs->sb.s_free_blocks_count,
  8497. + fs->sb.s_r_blocks_count, fs->sb.s_first_data_block);
  8498. + printf("%d inodes (%d free)\n", fs->sb.s_inodes_count,
  8499. + fs->sb.s_free_inodes_count);
  8500. + printf("block size = %d, frag size = %d\n",
  8501. + fs->sb.s_log_block_size ? (fs->sb.s_log_block_size << 11) : 1024,
  8502. + fs->sb.s_log_frag_size ? (fs->sb.s_log_frag_size << 11) : 1024);
  8503. + printf("number of groups: %d\n",GRP_NBGROUPS(fs));
  8504. + printf("%d blocks per group,%d frags per group,%d inodes per group\n",
  8505. + fs->sb.s_blocks_per_group, fs->sb.s_frags_per_group,
  8506. + fs->sb.s_inodes_per_group);
  8507. + printf("Size of inode table: %d blocks\n",
  8508. + fs->sb.s_inodes_per_group * sizeof(inode)/BLOCKSIZE);
  8509. + for (i = 0; i < GRP_NBGROUPS(fs); i++) {
  8510. + printf("Group No: %d\n", i+1);
  8511. + printf("block bitmap: block %d,inode bitmap: block %d, inode table: block %d\n",
  8512. + fs->gd[i].bg_block_bitmap, fs->gd[i].bg_inode_bitmap,
  8513. + fs->gd[i].bg_inode_table);
  8514. + printf("block bitmap allocation:\n");
  8515. + print_bm(GRP_GET_GROUP_BBM(fs, i),fs->sb.s_blocks_per_group);
  8516. + printf("inode bitmap allocation:\n");
  8517. + ibm = GRP_GET_GROUP_IBM(fs, i);
  8518. + print_bm(ibm, fs->sb.s_inodes_per_group);
  8519. + for (i = 1; i <= fs->sb.s_inodes_per_group; i++)
  8520. + if (allocated(ibm, i))
  8521. + print_inode(fs, i);
  8522. + }
  8523. }
  8524. -void dump_fs(filesystem *fs, FILE * fh, int swapit)
  8525. +static void dump_fs(filesystem *fs, FILE * fh, int swapit)
  8526. {
  8527. int nbblocks = fs->sb.s_blocks_count;
  8528. fs->sb.s_reserved[200] = 0;
  8529. if(swapit)
  8530. swap_goodfs(fs);
  8531. if(fwrite(fs, BLOCKSIZE, nbblocks, fh) < nbblocks)
  8532. - pexit("output filesystem image");
  8533. + perror_msg_and_die("output filesystem image");
  8534. if(swapit)
  8535. swap_badfs(fs);
  8536. }
  8537. -void showhelp(void)
  8538. +static void showhelp(void)
  8539. {
  8540. fprintf(stderr, "Usage: %s [options] image\n"
  8541. "Create an ext2 filesystem image from directories/files\n\n"
  8542. - " -x image Use this image as a starting point\n"
  8543. - " -d directory Add this directory as source\n"
  8544. - " -f file Add nodes (e.g. devices) from this spec file\n"
  8545. - " -b blocks Size in blocks\n"
  8546. - " -i inodes Number of inodes\n"
  8547. - " -r reserved Number of reserved blocks\n"
  8548. - " -g path Generate a block map file for this path\n"
  8549. - " -e value Fill unallocated blocks with value\n"
  8550. - " -z Make files with holes\n"
  8551. - " -v Print resulting filesystem structure\n"
  8552. - " -h Show this help\n\n"
  8553. - "Example of spec file:\n"
  8554. - "drwx /dev\n"
  8555. - "crw- 10,190 /dev/lcd\n"
  8556. - "brw- 1,0 /dev/ram0\n\n"
  8557. - "Report bugs to xavier.bestel@free.fr\n", argv0);
  8558. + " -x image Use this image as a starting point\n"
  8559. + " -d directory Add this directory as source\n"
  8560. + " -b blocks Size in blocks\n"
  8561. + " -i inodes Number of inodes\n"
  8562. + " -r reserved Number of reserved blocks\n"
  8563. + " -g path Generate a block map file for this path\n"
  8564. + " -e value Fill unallocated blocks with value\n"
  8565. + " -z Make files with holes\n"
  8566. + " -D,-f Use the named FILE as a device table file\n"
  8567. + " -q Squash permissions and owners making all files be owned by root\n"
  8568. + " -U Squash owners making all files be owned by root\n"
  8569. + " -P Squash permissions on all files\n"
  8570. + " -v Print resulting filesystem structure\n"
  8571. + " -h Show this help\n\n"
  8572. + "Report bugs to genext2fs-devel@lists.sourceforge.net\n", app_name);
  8573. }
  8574. #define MAX_DOPT 128
  8575. @@ -1507,6 +2141,8 @@
  8576. int nbblocks = -1;
  8577. int nbinodes = -1;
  8578. int nbresrvd = -1;
  8579. + int tmp_nbblocks = -1;
  8580. + int tmp_nbinodes = -1;
  8581. char * fsout = "-";
  8582. char * fsin = 0;
  8583. char * dopt[MAX_DOPT];
  8584. @@ -1516,19 +2152,17 @@
  8585. int verbose = 0;
  8586. int holes = 0;
  8587. int emptyval = 0;
  8588. + int squash_uids = 0;
  8589. + int squash_perms = 0;
  8590. uint16 endian = 1;
  8591. int bigendian = !*(char*)&endian;
  8592. filesystem *fs;
  8593. int i;
  8594. int c;
  8595. + struct stats stats;
  8596. - argv0 = argv[0];
  8597. - if(argc <= 1)
  8598. - {
  8599. - showhelp();
  8600. - exit(1);
  8601. - }
  8602. - while((c = getopt(argc, argv, "x:f:d:b:i:r:g:e:zvh")) != EOF)
  8603. + app_name = argv[0];
  8604. + while((c = getopt(argc, argv, "x:d:b:i:r:g:e:zvhD:f:qUP")) != EOF)
  8605. switch(c)
  8606. {
  8607. case 'x':
  8608. @@ -1536,6 +2170,7 @@
  8609. break;
  8610. case 'd':
  8611. case 'f':
  8612. + case 'D':
  8613. dopt[didx++] = optarg;
  8614. break;
  8615. case 'b':
  8616. @@ -1556,6 +2191,16 @@
  8617. case 'z':
  8618. holes = 1;
  8619. break;
  8620. + case 'q':
  8621. + squash_uids = 1;
  8622. + squash_perms = 1;
  8623. + break;
  8624. + case 'U':
  8625. + squash_uids = 1;
  8626. + break;
  8627. + case 'P':
  8628. + squash_perms = 1;
  8629. + break;
  8630. case 'v':
  8631. verbose = 1;
  8632. break;
  8633. @@ -1565,17 +2210,16 @@
  8634. default:
  8635. exit(1);
  8636. }
  8637. +
  8638. if(optind < (argc - 1))
  8639. - errexit("too many arguments");
  8640. + error_msg_and_die("too many arguments");
  8641. if(optind == (argc - 1))
  8642. fsout = argv[optind];
  8643. if(fsin)
  8644. {
  8645. if(strcmp(fsin, "-"))
  8646. {
  8647. - FILE * fh = fopen(fsin, "r");
  8648. - if(!fh)
  8649. - pexit(fsin);
  8650. + FILE * fh = xfopen(fsin, "r");
  8651. fs = load_fs(fh, bigendian);
  8652. fclose(fh);
  8653. }
  8654. @@ -1584,12 +2228,55 @@
  8655. }
  8656. else
  8657. {
  8658. + stats.ninodes = 0;
  8659. + stats.nblocks = 0;
  8660. + for(i = 0; i < didx; i++)
  8661. + {
  8662. + struct stat st;
  8663. + FILE *fh;
  8664. + char *pdir;
  8665. + stat(dopt[i], &st);
  8666. + switch(st.st_mode & S_IFMT)
  8667. + {
  8668. + case S_IFREG:
  8669. + fh = xfopen(dopt[i], "r");
  8670. + add2fs_from_file(fs, EXT2_ROOT_INO, fh, squash_uids, squash_perms, &stats);
  8671. + fclose(fh);
  8672. + break;
  8673. + case S_IFDIR:
  8674. + if(!(pdir = getcwd(0, GETCWD_SIZE)))
  8675. + perror_msg_and_die(dopt[i]);
  8676. + if(chdir(dopt[i]) < 0)
  8677. + perror_msg_and_die(dopt[i]);
  8678. + add2fs_from_dir(fs, EXT2_ROOT_INO, squash_uids, squash_perms, &stats);
  8679. + if(chdir(pdir) < 0)
  8680. + perror_msg_and_die(pdir);
  8681. + free(pdir);
  8682. + break;
  8683. + default:
  8684. + error_msg_and_die("%s in neither a file nor a directory", dopt[i]);
  8685. + }
  8686. + }
  8687. +
  8688. + tmp_nbinodes = stats.ninodes + EXT2_FIRST_INO + 1;
  8689. + tmp_nbblocks = stats.nblocks; // FIXME: should add space taken by inodes too
  8690. +
  8691. + if(tmp_nbblocks > nbblocks)
  8692. + {
  8693. + printf("number of blocks too low, increasing to %d\n",tmp_nbblocks);
  8694. + nbblocks = tmp_nbblocks;
  8695. + }
  8696. + if(tmp_nbinodes > nbinodes)
  8697. + {
  8698. + printf("number of inodes too low, increasing to %d\n",tmp_nbinodes);
  8699. + nbinodes = tmp_nbinodes;
  8700. + }
  8701. if(nbblocks == -1)
  8702. - errexit("filesystem size unspecified");
  8703. + error_msg_and_die("filesystem size unspecified");
  8704. if(nbinodes == -1)
  8705. nbinodes = nbblocks * BLOCKSIZE / rndup(BYTES_PER_INODE, BLOCKSIZE);
  8706. if(nbresrvd == -1)
  8707. - nbresrvd = nbblocks * RESERVED_INODES;
  8708. + nbresrvd = nbblocks * RESERVED_BLOCKS;
  8709. fs = init_fs(nbblocks, nbinodes, nbresrvd, holes);
  8710. }
  8711. for(i = 0; i < didx; i++)
  8712. @@ -1601,28 +2288,27 @@
  8713. switch(st.st_mode & S_IFMT)
  8714. {
  8715. case S_IFREG:
  8716. - if(!(fh = fopen(dopt[i], "r")))
  8717. - pexit(dopt[i]);
  8718. - add2fs_from_file(fs, EXT2_ROOT_INO, fh);
  8719. + fh = xfopen(dopt[i], "r");
  8720. + add2fs_from_file(fs, EXT2_ROOT_INO, fh, squash_uids, squash_perms, NULL);
  8721. fclose(fh);
  8722. break;
  8723. case S_IFDIR:
  8724. if(!(pdir = getcwd(0, GETCWD_SIZE)))
  8725. - pexit(dopt[i]);
  8726. + perror_msg_and_die(dopt[i]);
  8727. if(chdir(dopt[i]) < 0)
  8728. - pexit(dopt[i]);
  8729. - add2fs_from_dir(fs, EXT2_ROOT_INO);
  8730. + perror_msg_and_die(dopt[i]);
  8731. + add2fs_from_dir(fs, EXT2_ROOT_INO, squash_uids, squash_perms, NULL);
  8732. if(chdir(pdir) < 0)
  8733. - pexit(pdir);
  8734. + perror_msg_and_die(pdir);
  8735. free(pdir);
  8736. break;
  8737. default:
  8738. - errexit("%s in neither a file nor a directory", dopt[i]);
  8739. + error_msg_and_die("%s in neither a file nor a directory", dopt[i]);
  8740. }
  8741. }
  8742. if(emptyval)
  8743. for(i = 1; i < fs->sb.s_blocks_count; i++)
  8744. - if(!allocated(fs->bbm, i))
  8745. + if(!allocated(GRP_GET_BLOCK_BITMAP(fs,i),GRP_BBM_OFFSET(fs,i)))
  8746. memset(get_blk(fs, i), emptyval, BLOCKSIZE);
  8747. if(verbose)
  8748. print_fs(fs);
  8749. @@ -1633,25 +2319,23 @@
  8750. char *p;
  8751. FILE *fh;
  8752. if(!(nod = find_path(fs, EXT2_ROOT_INO, gopt[i])))
  8753. - errexit("path %s not found in filesystem", gopt[i]);
  8754. + error_msg_and_die("path %s not found in filesystem", gopt[i]);
  8755. while((p = strchr(gopt[i], '/')))
  8756. *p = '_';
  8757. snprintf(fname, MAX_FILENAME-1, "%s.blk", gopt[i]);
  8758. - if(!(fh = fopen(fname, "w")))
  8759. - pexit(fname);
  8760. + fh = xfopen(fname, "w");
  8761. fprintf(fh, "%d:", get_nod(fs, nod)->i_size);
  8762. flist_blocks(fs, nod, fh);
  8763. fclose(fh);
  8764. }
  8765. if(strcmp(fsout, "-"))
  8766. {
  8767. - FILE * fh = fopen(fsout, "w");
  8768. - if(!fh)
  8769. - pexit(fsout);
  8770. + FILE * fh = xfopen(fsout, "w");
  8771. dump_fs(fs, fh, bigendian);
  8772. fclose(fh);
  8773. }
  8774. else
  8775. dump_fs(fs, stdout, bigendian);
  8776. + free_fs(fs);
  8777. return 0;
  8778. }
  8779. diff --exclude CVS -urN genext2fs-1.3.orig/install-sh genext2fs/install-sh
  8780. --- genext2fs-1.3.orig/install-sh 1969-12-31 17:00:00.000000000 -0700
  8781. +++ genext2fs/install-sh 2004-12-27 13:03:47.000000000 -0700
  8782. @@ -0,0 +1,325 @@
  8783. +#!/bin/sh
  8784. +# install - install a program, script, or datafile
  8785. +
  8786. +scriptversion=2004-04-01.17
  8787. +
  8788. +# This originates from X11R5 (mit/util/scripts/install.sh), which was
  8789. +# later released in X11R6 (xc/config/util/install.sh) with the
  8790. +# following copyright and license.
  8791. +#
  8792. +# Copyright (C) 1994 X Consortium
  8793. +#
  8794. +# Permission is hereby granted, free of charge, to any person obtaining a copy
  8795. +# of this software and associated documentation files (the "Software"), to
  8796. +# deal in the Software without restriction, including without limitation the
  8797. +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  8798. +# sell copies of the Software, and to permit persons to whom the Software is
  8799. +# furnished to do so, subject to the following conditions:
  8800. +#
  8801. +# The above copyright notice and this permission notice shall be included in
  8802. +# all copies or substantial portions of the Software.
  8803. +#
  8804. +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  8805. +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  8806. +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  8807. +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  8808. +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
  8809. +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  8810. +#
  8811. +# Except as contained in this notice, the name of the X Consortium shall not
  8812. +# be used in advertising or otherwise to promote the sale, use or other deal-
  8813. +# ings in this Software without prior written authorization from the X Consor-
  8814. +# tium.
  8815. +#
  8816. +#
  8817. +# FSF changes to this file are in the public domain.
  8818. +#
  8819. +# Calling this script install-sh is preferred over install.sh, to prevent
  8820. +# `make' implicit rules from creating a file called install from it
  8821. +# when there is no Makefile.
  8822. +#
  8823. +# This script is compatible with the BSD install script, but was written
  8824. +# from scratch. It can only install one file at a time, a restriction
  8825. +# shared with many OS's install programs.
  8826. +
  8827. +# set DOITPROG to echo to test this script
  8828. +
  8829. +# Don't use :- since 4.3BSD and earlier shells don't like it.
  8830. +doit="${DOITPROG-}"
  8831. +
  8832. +# put in absolute paths if you don't have them in your path; or use env. vars.
  8833. +
  8834. +mvprog="${MVPROG-mv}"
  8835. +cpprog="${CPPROG-cp}"
  8836. +chmodprog="${CHMODPROG-chmod}"
  8837. +chownprog="${CHOWNPROG-chown}"
  8838. +chgrpprog="${CHGRPPROG-chgrp}"
  8839. +stripprog="${STRIPPROG-strip}"
  8840. +rmprog="${RMPROG-rm}"
  8841. +mkdirprog="${MKDIRPROG-mkdir}"
  8842. +
  8843. +transformbasename=
  8844. +transform_arg=
  8845. +instcmd="$mvprog"
  8846. +chmodcmd="$chmodprog 0755"
  8847. +chowncmd=
  8848. +chgrpcmd=
  8849. +stripcmd=
  8850. +rmcmd="$rmprog -f"
  8851. +mvcmd="$mvprog"
  8852. +src=
  8853. +dst=
  8854. +dir_arg=
  8855. +
  8856. +usage="Usage: $0 [OPTION]... SRCFILE DSTFILE
  8857. + or: $0 [OPTION]... SRCFILES... DIRECTORY
  8858. + or: $0 -d DIRECTORIES...
  8859. +
  8860. +In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default.
  8861. +In the second, create the directory path DIR.
  8862. +
  8863. +Options:
  8864. +-b=TRANSFORMBASENAME
  8865. +-c copy source (using $cpprog) instead of moving (using $mvprog).
  8866. +-d create directories instead of installing files.
  8867. +-g GROUP $chgrp installed files to GROUP.
  8868. +-m MODE $chmod installed files to MODE.
  8869. +-o USER $chown installed files to USER.
  8870. +-s strip installed files (using $stripprog).
  8871. +-t=TRANSFORM
  8872. +--help display this help and exit.
  8873. +--version display version info and exit.
  8874. +
  8875. +Environment variables override the default commands:
  8876. + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
  8877. +"
  8878. +
  8879. +while test -n "$1"; do
  8880. + case $1 in
  8881. + -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
  8882. + shift
  8883. + continue;;
  8884. +
  8885. + -c) instcmd=$cpprog
  8886. + shift
  8887. + continue;;
  8888. +
  8889. + -d) dir_arg=true
  8890. + shift
  8891. + continue;;
  8892. +
  8893. + -g) chgrpcmd="$chgrpprog $2"
  8894. + shift
  8895. + shift
  8896. + continue;;
  8897. +
  8898. + --help) echo "$usage"; exit 0;;
  8899. +
  8900. + -m) chmodcmd="$chmodprog $2"
  8901. + shift
  8902. + shift
  8903. + continue;;
  8904. +
  8905. + -o) chowncmd="$chownprog $2"
  8906. + shift
  8907. + shift
  8908. + continue;;
  8909. +
  8910. + -s) stripcmd=$stripprog
  8911. + shift
  8912. + continue;;
  8913. +
  8914. + -t=*) transformarg=`echo $1 | sed 's/-t=//'`
  8915. + shift
  8916. + continue;;
  8917. +
  8918. + --version) echo "$0 $scriptversion"; exit 0;;
  8919. +
  8920. + *) # When -d is used, all remaining arguments are directories to create.
  8921. + test -n "$dir_arg" && break
  8922. + # Otherwise, the last argument is the destination. Remove it from $@.
  8923. + for arg
  8924. + do
  8925. + if test -n "$dstarg"; then
  8926. + # $@ is not empty: it contains at least $arg.
  8927. + set fnord "$@" "$dstarg"
  8928. + shift # fnord
  8929. + fi
  8930. + shift # arg
  8931. + dstarg=$arg
  8932. + done
  8933. + break;;
  8934. + esac
  8935. +done
  8936. +
  8937. +if test -z "$1"; then
  8938. + if test -z "$dir_arg"; then
  8939. + echo "$0: no input file specified." >&2
  8940. + exit 1
  8941. + fi
  8942. + # It's OK to call `install-sh -d' without argument.
  8943. + # This can happen when creating conditional directories.
  8944. + exit 0
  8945. +fi
  8946. +
  8947. +for src
  8948. +do
  8949. + # Protect names starting with `-'.
  8950. + case $src in
  8951. + -*) src=./$src ;;
  8952. + esac
  8953. +
  8954. + if test -n "$dir_arg"; then
  8955. + dst=$src
  8956. + src=
  8957. +
  8958. + if test -d "$dst"; then
  8959. + instcmd=:
  8960. + chmodcmd=
  8961. + else
  8962. + instcmd=$mkdirprog
  8963. + fi
  8964. + else
  8965. + # Waiting for this to be detected by the "$instcmd $src $dsttmp" command
  8966. + # might cause directories to be created, which would be especially bad
  8967. + # if $src (and thus $dsttmp) contains '*'.
  8968. + if test ! -f "$src" && test ! -d "$src"; then
  8969. + echo "$0: $src does not exist." >&2
  8970. + exit 1
  8971. + fi
  8972. +
  8973. + if test -z "$dstarg"; then
  8974. + echo "$0: no destination specified." >&2
  8975. + exit 1
  8976. + fi
  8977. +
  8978. + dst=$dstarg
  8979. + # Protect names starting with `-'.
  8980. + case $dst in
  8981. + -*) dst=./$dst ;;
  8982. + esac
  8983. +
  8984. + # If destination is a directory, append the input filename; won't work
  8985. + # if double slashes aren't ignored.
  8986. + if test -d "$dst"; then
  8987. + dst=$dst/`basename "$src"`
  8988. + fi
  8989. + fi
  8990. +
  8991. + # This sed command emulates the dirname command.
  8992. + dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
  8993. +
  8994. + # Make sure that the destination directory exists.
  8995. +
  8996. + # Skip lots of stat calls in the usual case.
  8997. + if test ! -d "$dstdir"; then
  8998. + defaultIFS='
  8999. + '
  9000. + IFS="${IFS-$defaultIFS}"
  9001. +
  9002. + oIFS=$IFS
  9003. + # Some sh's can't handle IFS=/ for some reason.
  9004. + IFS='%'
  9005. + set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
  9006. + IFS=$oIFS
  9007. +
  9008. + pathcomp=
  9009. +
  9010. + while test $# -ne 0 ; do
  9011. + pathcomp=$pathcomp$1
  9012. + shift
  9013. + if test ! -d "$pathcomp"; then
  9014. + $mkdirprog "$pathcomp" || lasterr=$?
  9015. + # mkdir can fail with a `File exist' error in case several
  9016. + # install-sh are creating the directory concurrently. This
  9017. + # is OK.
  9018. + test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; }
  9019. + fi
  9020. + pathcomp=$pathcomp/
  9021. + done
  9022. + fi
  9023. +
  9024. + if test -n "$dir_arg"; then
  9025. + $doit $instcmd "$dst" \
  9026. + && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
  9027. + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
  9028. + && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
  9029. + && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
  9030. +
  9031. + else
  9032. + # If we're going to rename the final executable, determine the name now.
  9033. + if test -z "$transformarg"; then
  9034. + dstfile=`basename "$dst"`
  9035. + else
  9036. + dstfile=`basename "$dst" $transformbasename \
  9037. + | sed $transformarg`$transformbasename
  9038. + fi
  9039. +
  9040. + # don't allow the sed command to completely eliminate the filename.
  9041. + test -z "$dstfile" && dstfile=`basename "$dst"`
  9042. +
  9043. + # Make a couple of temp file names in the proper directory.
  9044. + dsttmp=$dstdir/_inst.$$_
  9045. + rmtmp=$dstdir/_rm.$$_
  9046. +
  9047. + # Trap to clean up those temp files at exit.
  9048. + trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
  9049. + trap '(exit $?); exit' 1 2 13 15
  9050. +
  9051. + # Move or copy the file name to the temp name
  9052. + $doit $instcmd "$src" "$dsttmp" &&
  9053. +
  9054. + # and set any options; do chmod last to preserve setuid bits.
  9055. + #
  9056. + # If any of these fail, we abort the whole thing. If we want to
  9057. + # ignore errors from any of these, just make sure not to ignore
  9058. + # errors from the above "$doit $instcmd $src $dsttmp" command.
  9059. + #
  9060. + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
  9061. + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
  9062. + && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
  9063. + && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
  9064. +
  9065. + # Now rename the file to the real destination.
  9066. + { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
  9067. + || {
  9068. + # The rename failed, perhaps because mv can't rename something else
  9069. + # to itself, or perhaps because mv is so ancient that it does not
  9070. + # support -f.
  9071. +
  9072. + # Now remove or move aside any old file at destination location.
  9073. + # We try this two ways since rm can't unlink itself on some
  9074. + # systems and the destination file might be busy for other
  9075. + # reasons. In this case, the final cleanup might fail but the new
  9076. + # file should still install successfully.
  9077. + {
  9078. + if test -f "$dstdir/$dstfile"; then
  9079. + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
  9080. + || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
  9081. + || {
  9082. + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
  9083. + (exit 1); exit
  9084. + }
  9085. + else
  9086. + :
  9087. + fi
  9088. + } &&
  9089. +
  9090. + # Now rename the file to the real destination.
  9091. + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
  9092. + }
  9093. + }
  9094. + fi || { (exit 1); exit; }
  9095. +done
  9096. +
  9097. +# The final little trick to "correctly" pass the exit status to the exit trap.
  9098. +{
  9099. + (exit 0); exit
  9100. +}
  9101. +
  9102. +# Local variables:
  9103. +# eval: (add-hook 'write-file-hooks 'time-stamp)
  9104. +# time-stamp-start: "scriptversion="
  9105. +# time-stamp-format: "%:y-%02m-%02d.%02H"
  9106. +# time-stamp-end: "$"
  9107. +# End:
  9108. diff --exclude CVS -urN genext2fs-1.3.orig/missing genext2fs/missing
  9109. --- genext2fs-1.3.orig/missing 1969-12-31 17:00:00.000000000 -0700
  9110. +++ genext2fs/missing 2004-12-27 13:03:47.000000000 -0700
  9111. @@ -0,0 +1,360 @@
  9112. +#! /bin/sh
  9113. +# Common stub for a few missing GNU programs while installing.
  9114. +
  9115. +scriptversion=2003-09-02.23
  9116. +
  9117. +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003
  9118. +# Free Software Foundation, Inc.
  9119. +# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
  9120. +
  9121. +# This program is free software; you can redistribute it and/or modify
  9122. +# it under the terms of the GNU General Public License as published by
  9123. +# the Free Software Foundation; either version 2, or (at your option)
  9124. +# any later version.
  9125. +
  9126. +# This program is distributed in the hope that it will be useful,
  9127. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  9128. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9129. +# GNU General Public License for more details.
  9130. +
  9131. +# You should have received a copy of the GNU General Public License
  9132. +# along with this program; if not, write to the Free Software
  9133. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  9134. +# 02111-1307, USA.
  9135. +
  9136. +# As a special exception to the GNU General Public License, if you
  9137. +# distribute this file as part of a program that contains a
  9138. +# configuration script generated by Autoconf, you may include it under
  9139. +# the same distribution terms that you use for the rest of that program.
  9140. +
  9141. +if test $# -eq 0; then
  9142. + echo 1>&2 "Try \`$0 --help' for more information"
  9143. + exit 1
  9144. +fi
  9145. +
  9146. +run=:
  9147. +
  9148. +# In the cases where this matters, `missing' is being run in the
  9149. +# srcdir already.
  9150. +if test -f configure.ac; then
  9151. + configure_ac=configure.ac
  9152. +else
  9153. + configure_ac=configure.in
  9154. +fi
  9155. +
  9156. +msg="missing on your system"
  9157. +
  9158. +case "$1" in
  9159. +--run)
  9160. + # Try to run requested program, and just exit if it succeeds.
  9161. + run=
  9162. + shift
  9163. + "$@" && exit 0
  9164. + # Exit code 63 means version mismatch. This often happens
  9165. + # when the user try to use an ancient version of a tool on
  9166. + # a file that requires a minimum version. In this case we
  9167. + # we should proceed has if the program had been absent, or
  9168. + # if --run hadn't been passed.
  9169. + if test $? = 63; then
  9170. + run=:
  9171. + msg="probably too old"
  9172. + fi
  9173. + ;;
  9174. +esac
  9175. +
  9176. +# If it does not exist, or fails to run (possibly an outdated version),
  9177. +# try to emulate it.
  9178. +case "$1" in
  9179. +
  9180. + -h|--h|--he|--hel|--help)
  9181. + echo "\
  9182. +$0 [OPTION]... PROGRAM [ARGUMENT]...
  9183. +
  9184. +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
  9185. +error status if there is no known handling for PROGRAM.
  9186. +
  9187. +Options:
  9188. + -h, --help display this help and exit
  9189. + -v, --version output version information and exit
  9190. + --run try to run the given command, and emulate it if it fails
  9191. +
  9192. +Supported PROGRAM values:
  9193. + aclocal touch file \`aclocal.m4'
  9194. + autoconf touch file \`configure'
  9195. + autoheader touch file \`config.h.in'
  9196. + automake touch all \`Makefile.in' files
  9197. + bison create \`y.tab.[ch]', if possible, from existing .[ch]
  9198. + flex create \`lex.yy.c', if possible, from existing .c
  9199. + help2man touch the output file
  9200. + lex create \`lex.yy.c', if possible, from existing .c
  9201. + makeinfo touch the output file
  9202. + tar try tar, gnutar, gtar, then tar without non-portable flags
  9203. + yacc create \`y.tab.[ch]', if possible, from existing .[ch]
  9204. +
  9205. +Send bug reports to <bug-automake@gnu.org>."
  9206. + ;;
  9207. +
  9208. + -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
  9209. + echo "missing $scriptversion (GNU Automake)"
  9210. + ;;
  9211. +
  9212. + -*)
  9213. + echo 1>&2 "$0: Unknown \`$1' option"
  9214. + echo 1>&2 "Try \`$0 --help' for more information"
  9215. + exit 1
  9216. + ;;
  9217. +
  9218. + aclocal*)
  9219. + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
  9220. + # We have it, but it failed.
  9221. + exit 1
  9222. + fi
  9223. +
  9224. + echo 1>&2 "\
  9225. +WARNING: \`$1' is $msg. You should only need it if
  9226. + you modified \`acinclude.m4' or \`${configure_ac}'. You might want
  9227. + to install the \`Automake' and \`Perl' packages. Grab them from
  9228. + any GNU archive site."
  9229. + touch aclocal.m4
  9230. + ;;
  9231. +
  9232. + autoconf)
  9233. + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
  9234. + # We have it, but it failed.
  9235. + exit 1
  9236. + fi
  9237. +
  9238. + echo 1>&2 "\
  9239. +WARNING: \`$1' is $msg. You should only need it if
  9240. + you modified \`${configure_ac}'. You might want to install the
  9241. + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
  9242. + archive site."
  9243. + touch configure
  9244. + ;;
  9245. +
  9246. + autoheader)
  9247. + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
  9248. + # We have it, but it failed.
  9249. + exit 1
  9250. + fi
  9251. +
  9252. + echo 1>&2 "\
  9253. +WARNING: \`$1' is $msg. You should only need it if
  9254. + you modified \`acconfig.h' or \`${configure_ac}'. You might want
  9255. + to install the \`Autoconf' and \`GNU m4' packages. Grab them
  9256. + from any GNU archive site."
  9257. + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
  9258. + test -z "$files" && files="config.h"
  9259. + touch_files=
  9260. + for f in $files; do
  9261. + case "$f" in
  9262. + *:*) touch_files="$touch_files "`echo "$f" |
  9263. + sed -e 's/^[^:]*://' -e 's/:.*//'`;;
  9264. + *) touch_files="$touch_files $f.in";;
  9265. + esac
  9266. + done
  9267. + touch $touch_files
  9268. + ;;
  9269. +
  9270. + automake*)
  9271. + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
  9272. + # We have it, but it failed.
  9273. + exit 1
  9274. + fi
  9275. +
  9276. + echo 1>&2 "\
  9277. +WARNING: \`$1' is $msg. You should only need it if
  9278. + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
  9279. + You might want to install the \`Automake' and \`Perl' packages.
  9280. + Grab them from any GNU archive site."
  9281. + find . -type f -name Makefile.am -print |
  9282. + sed 's/\.am$/.in/' |
  9283. + while read f; do touch "$f"; done
  9284. + ;;
  9285. +
  9286. + autom4te)
  9287. + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
  9288. + # We have it, but it failed.
  9289. + exit 1
  9290. + fi
  9291. +
  9292. + echo 1>&2 "\
  9293. +WARNING: \`$1' is needed, but is $msg.
  9294. + You might have modified some files without having the
  9295. + proper tools for further handling them.
  9296. + You can get \`$1' as part of \`Autoconf' from any GNU
  9297. + archive site."
  9298. +
  9299. + file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
  9300. + test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
  9301. + if test -f "$file"; then
  9302. + touch $file
  9303. + else
  9304. + test -z "$file" || exec >$file
  9305. + echo "#! /bin/sh"
  9306. + echo "# Created by GNU Automake missing as a replacement of"
  9307. + echo "# $ $@"
  9308. + echo "exit 0"
  9309. + chmod +x $file
  9310. + exit 1
  9311. + fi
  9312. + ;;
  9313. +
  9314. + bison|yacc)
  9315. + echo 1>&2 "\
  9316. +WARNING: \`$1' $msg. You should only need it if
  9317. + you modified a \`.y' file. You may need the \`Bison' package
  9318. + in order for those modifications to take effect. You can get
  9319. + \`Bison' from any GNU archive site."
  9320. + rm -f y.tab.c y.tab.h
  9321. + if [ $# -ne 1 ]; then
  9322. + eval LASTARG="\${$#}"
  9323. + case "$LASTARG" in
  9324. + *.y)
  9325. + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
  9326. + if [ -f "$SRCFILE" ]; then
  9327. + cp "$SRCFILE" y.tab.c
  9328. + fi
  9329. + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
  9330. + if [ -f "$SRCFILE" ]; then
  9331. + cp "$SRCFILE" y.tab.h
  9332. + fi
  9333. + ;;
  9334. + esac
  9335. + fi
  9336. + if [ ! -f y.tab.h ]; then
  9337. + echo >y.tab.h
  9338. + fi
  9339. + if [ ! -f y.tab.c ]; then
  9340. + echo 'main() { return 0; }' >y.tab.c
  9341. + fi
  9342. + ;;
  9343. +
  9344. + lex|flex)
  9345. + echo 1>&2 "\
  9346. +WARNING: \`$1' is $msg. You should only need it if
  9347. + you modified a \`.l' file. You may need the \`Flex' package
  9348. + in order for those modifications to take effect. You can get
  9349. + \`Flex' from any GNU archive site."
  9350. + rm -f lex.yy.c
  9351. + if [ $# -ne 1 ]; then
  9352. + eval LASTARG="\${$#}"
  9353. + case "$LASTARG" in
  9354. + *.l)
  9355. + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
  9356. + if [ -f "$SRCFILE" ]; then
  9357. + cp "$SRCFILE" lex.yy.c
  9358. + fi
  9359. + ;;
  9360. + esac
  9361. + fi
  9362. + if [ ! -f lex.yy.c ]; then
  9363. + echo 'main() { return 0; }' >lex.yy.c
  9364. + fi
  9365. + ;;
  9366. +
  9367. + help2man)
  9368. + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
  9369. + # We have it, but it failed.
  9370. + exit 1
  9371. + fi
  9372. +
  9373. + echo 1>&2 "\
  9374. +WARNING: \`$1' is $msg. You should only need it if
  9375. + you modified a dependency of a manual page. You may need the
  9376. + \`Help2man' package in order for those modifications to take
  9377. + effect. You can get \`Help2man' from any GNU archive site."
  9378. +
  9379. + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
  9380. + if test -z "$file"; then
  9381. + file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
  9382. + fi
  9383. + if [ -f "$file" ]; then
  9384. + touch $file
  9385. + else
  9386. + test -z "$file" || exec >$file
  9387. + echo ".ab help2man is required to generate this page"
  9388. + exit 1
  9389. + fi
  9390. + ;;
  9391. +
  9392. + makeinfo)
  9393. + if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
  9394. + # We have makeinfo, but it failed.
  9395. + exit 1
  9396. + fi
  9397. +
  9398. + echo 1>&2 "\
  9399. +WARNING: \`$1' is $msg. You should only need it if
  9400. + you modified a \`.texi' or \`.texinfo' file, or any other file
  9401. + indirectly affecting the aspect of the manual. The spurious
  9402. + call might also be the consequence of using a buggy \`make' (AIX,
  9403. + DU, IRIX). You might want to install the \`Texinfo' package or
  9404. + the \`GNU make' package. Grab either from any GNU archive site."
  9405. + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
  9406. + if test -z "$file"; then
  9407. + file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
  9408. + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
  9409. + fi
  9410. + touch $file
  9411. + ;;
  9412. +
  9413. + tar)
  9414. + shift
  9415. + if test -n "$run"; then
  9416. + echo 1>&2 "ERROR: \`tar' requires --run"
  9417. + exit 1
  9418. + fi
  9419. +
  9420. + # We have already tried tar in the generic part.
  9421. + # Look for gnutar/gtar before invocation to avoid ugly error
  9422. + # messages.
  9423. + if (gnutar --version > /dev/null 2>&1); then
  9424. + gnutar "$@" && exit 0
  9425. + fi
  9426. + if (gtar --version > /dev/null 2>&1); then
  9427. + gtar "$@" && exit 0
  9428. + fi
  9429. + firstarg="$1"
  9430. + if shift; then
  9431. + case "$firstarg" in
  9432. + *o*)
  9433. + firstarg=`echo "$firstarg" | sed s/o//`
  9434. + tar "$firstarg" "$@" && exit 0
  9435. + ;;
  9436. + esac
  9437. + case "$firstarg" in
  9438. + *h*)
  9439. + firstarg=`echo "$firstarg" | sed s/h//`
  9440. + tar "$firstarg" "$@" && exit 0
  9441. + ;;
  9442. + esac
  9443. + fi
  9444. +
  9445. + echo 1>&2 "\
  9446. +WARNING: I can't seem to be able to run \`tar' with the given arguments.
  9447. + You may want to install GNU tar or Free paxutils, or check the
  9448. + command line arguments."
  9449. + exit 1
  9450. + ;;
  9451. +
  9452. + *)
  9453. + echo 1>&2 "\
  9454. +WARNING: \`$1' is needed, and is $msg.
  9455. + You might have modified some files without having the
  9456. + proper tools for further handling them. Check the \`README' file,
  9457. + it often tells you about the needed prerequisites for installing
  9458. + this package. You may also peek at any GNU archive site, in case
  9459. + some other package would contain this missing \`$1' program."
  9460. + exit 1
  9461. + ;;
  9462. +esac
  9463. +
  9464. +exit 0
  9465. +
  9466. +# Local variables:
  9467. +# eval: (add-hook 'write-file-hooks 'time-stamp)
  9468. +# time-stamp-start: "scriptversion="
  9469. +# time-stamp-format: "%:y-%02m-%02d.%02H"
  9470. +# time-stamp-end: "$"
  9471. +# End:
  9472. diff --exclude CVS -urN genext2fs-1.3.orig/test-mount.sh genext2fs/test-mount.sh
  9473. --- genext2fs-1.3.orig/test-mount.sh 1969-12-31 17:00:00.000000000 -0700
  9474. +++ genext2fs/test-mount.sh 2004-10-24 02:43:50.000000000 -0600
  9475. @@ -0,0 +1,96 @@
  9476. +#!/bin/sh
  9477. +set -e
  9478. +
  9479. +cleanup () {
  9480. + set +e
  9481. + umount mnt 2>/dev/null
  9482. + rm -rf mnt ext2.img lsout fout test 2>/dev/null
  9483. +}
  9484. +
  9485. +# dtest - Uses the -d directory option of genext2fs
  9486. +# Creates an image with a file of given size and verifies it
  9487. +# Usage: dtest file-size number-of-blocks
  9488. +dtest () {
  9489. + size=$1; blocks=$2;fname=$size
  9490. + echo "Testing with file of size $size "
  9491. + mkdir -p test
  9492. + cd test
  9493. + dd if=/dev/zero of=file.$1 bs=1 count=$size
  9494. + cd ..
  9495. + ./genext2fs -b $blocks -d test ext2.img
  9496. + md5=`md5sum ext2.img | cut -f1 -d " "`
  9497. + if ! /sbin/e2fsck -fn ext2.img ; then
  9498. + echo "fsck failed"
  9499. + echo FAILED
  9500. + cleanup
  9501. + exit 1
  9502. + fi
  9503. + mkdir -p mnt
  9504. + if ! mount -t ext2 -o loop ext2.img mnt; then
  9505. + echo FAILED
  9506. + cleanup
  9507. + exit 1
  9508. + fi
  9509. + if (! [ -f mnt/file.$fname ]) || \
  9510. + [ $fname != "`ls -al mnt | grep file.$fname |awk '{print $5}'`" ] ; then
  9511. + echo FAILED
  9512. + cleanup
  9513. + exit 1
  9514. + fi
  9515. + echo PASSED "(md5 checksum for the image: $md5)"
  9516. + cleanup
  9517. +}
  9518. +
  9519. +# ftest - Uses the -f spec-file option of genext2fs
  9520. +# Creates an image with the devices mentioned in the given spec
  9521. +# file and verifies it
  9522. +# Usage: ftest spec-file number-of-blocks
  9523. +ftest () {
  9524. + fname=$1; blocks=$2;
  9525. + echo "Testing with devices file $fname"
  9526. + ./genext2fs -b $blocks -f $fname ext2.img
  9527. + md5=`md5sum ext2.img | cut -f 1 -d " "`
  9528. + if ! /sbin/e2fsck -fn ext2.img ; then
  9529. + echo "fsck failed"
  9530. + echo FAILED
  9531. + cleanup
  9532. + exit 1
  9533. + fi
  9534. + mkdir -p mnt
  9535. + if ! mount -t ext2 -o loop ext2.img mnt; then
  9536. + echo FAILED
  9537. + cleanup
  9538. + exit 1
  9539. + fi
  9540. + if ! [ -d mnt/dev ] ; then
  9541. + echo FAILED
  9542. + cleanup
  9543. + exit 1
  9544. + fi
  9545. + cat dev.txt | grep ^[bc] | \
  9546. + awk '{print $1substr($1,2)substr($1,2),$2,$3}'| \
  9547. + sort -d -k3.6 > fout
  9548. + ls -al mnt/dev | grep ^[bc] | \
  9549. + awk '{ print $1,$5$6,"/dev/"$10}' | \
  9550. + sort -d -k3.6 > lsout
  9551. + if ! diff fout lsout ; then
  9552. + echo FAILED
  9553. + cleanup
  9554. + exit 1
  9555. + fi
  9556. + echo PASSED "(md5 checksum for the image: $md5)"
  9557. + cleanup
  9558. +}
  9559. +
  9560. +dtest 0 4096
  9561. +dtest 0 8193
  9562. +dtest 0 8194
  9563. +dtest 1 4096
  9564. +dtest 12288 4096
  9565. +dtest 274432 4096
  9566. +dtest 8388608 9000
  9567. +dtest 16777216 20000
  9568. +
  9569. +ftest dev.txt 4096
  9570. +
  9571. +exit 0
  9572. diff --exclude CVS -urN genext2fs-1.3.orig/test.sh genext2fs/test.sh
  9573. --- genext2fs-1.3.orig/test.sh 1969-12-31 17:00:00.000000000 -0700
  9574. +++ genext2fs/test.sh 2004-10-24 02:43:50.000000000 -0600
  9575. @@ -0,0 +1,53 @@
  9576. +#!/bin/sh
  9577. +set -e
  9578. +
  9579. +# dtest - Uses the -d directory option of genext2fs
  9580. +# Creates an image with a file of given size and verifies it
  9581. +# Usage: dtest file-size number-of-blocks correct-checksum
  9582. +dtest () {
  9583. + size=$1; blocks=$2; checksum=$3
  9584. + echo "Testing with file of size $size "
  9585. + mkdir -p test
  9586. + cd test
  9587. + dd if=/dev/zero of=file.$1 bs=1 count=$size
  9588. + cd ..
  9589. + ./genext2fs -b $blocks -d test ext2.img
  9590. + md5=`md5sum ext2.img | cut -d" " -f1`
  9591. + rm -rf ext2.img test
  9592. + if [ $md5 == $checksum ] ; then
  9593. + echo PASSED
  9594. + else
  9595. + echo FAILED
  9596. + exit 1
  9597. + fi
  9598. +}
  9599. +
  9600. +# ftest - Uses the -f spec-file option of genext2fs
  9601. +# Creates an image with the devices mentioned in the given spec
  9602. +# file and verifies it
  9603. +# Usage: ftest spec-file number-of-blocks correct-checksum
  9604. +ftest () {
  9605. + fname=$1; blocks=$2; checksum=$3
  9606. + echo "Testing with devices file $fname"
  9607. + ./genext2fs -b $blocks -f $fname ext2.img
  9608. + md5=`md5sum ext2.img | cut -d" " -f1`
  9609. + rm -rf ext2.img
  9610. + if [ $md5 == $checksum ] ; then
  9611. + echo PASSED
  9612. + else
  9613. + echo FAILED
  9614. + exit 1
  9615. + fi
  9616. +}
  9617. +
  9618. +dtest 0 4096 491a43ab93c2e5c186c9f1f72d88e5c5
  9619. +dtest 0 8193 6289224f0b7f151994479ba156c43505
  9620. +dtest 0 8194 3272c43c25e8d0c3768935861a643a65
  9621. +dtest 1 4096 5ee24486d33af88c63080b09d8cadfb5
  9622. +dtest 12288 4096 494498364defdc27b2770d1f9c1e3387
  9623. +dtest 274432 4096 65c4bd8d30bf563fa5434119a12abff1
  9624. +dtest 8388608 9000 9a49b0461ee236b7fd7c452fb6a1f2dc
  9625. +dtest 16777216 20000 91e16429c901b68d30f783263f0611b7
  9626. +
  9627. +ftest dev.txt 4096 921ee9343b0759e16ad8d979d7dd16ec
  9628. +exit 0