├── AUTHORS ├── COPYING ├── ChangeLog ├── INSTALL ├── Makefile.am ├── Makefile.in ├── NEWS ├── README ├── ROADMAP ├── TODO ├── aclocal.m4 ├── compile ├── config.guess ├── config.h.in ├── config.sub ├── configure ├── configure.ac ├── debian ├── changelog ├── compat ├── control ├── copyright ├── docs └── rules ├── depcomp ├── install-sh ├── md5.c ├── md5.h ├── missing ├── xmount.1 ├── xmount.c ├── xmount.h └── xmount.spec /AUTHORS: -------------------------------------------------------------------------------- 1 | Gillen Daniel 2 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | For a full list of changes please refer to the source files. 2 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | See README for detailed instructions 2 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | ##Process this file with automake to create Makefile.in 2 | bin_PROGRAMS = xmount 3 | man_MANS = xmount.1 4 | xmount_SOURCES = md5.c xmount.c 5 | xmount_CFLAGS = -fno-strict-aliasing -D_LARGEFILE64_SOURCE $(fuse_CFLAGS) 6 | LIBS += $(fuse_LIBS) 7 | # Link against the not installed static libaff and libewf 8 | #xmount_LDADD = libaff/lib/.libs/libafflib.a libewf/libewf/.libs/libewf.a /usr/lib/libssl.a /usr/lib/libcrypto.a -lstdc++ -lz 9 | #xmount_CFLAGS += -Ilibewf/include 10 | # To build on OSX using osxfuse 11 | #xmount_LDADD = libaff/lib/.libs/libafflib.a libewf/libewf/.libs/libewf.a -lstdc++ -lz -losxfuse 12 | #xmount_CFLAGS += -I/usr/local/include/osxfuse/ -D_FILE_OFFSET_BITS=64 -------------------------------------------------------------------------------- /Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.11.1 from Makefile.am. 2 | # @configure_input@ 3 | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 5 | # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, 6 | # Inc. 7 | # This Makefile.in is free software; the Free Software Foundation 8 | # gives unlimited permission to copy and/or distribute it, 9 | # with or without modifications, as long as this notice is preserved. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 13 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 14 | # PARTICULAR PURPOSE. 15 | 16 | @SET_MAKE@ 17 | 18 | VPATH = @srcdir@ 19 | pkgdatadir = $(datadir)/@PACKAGE@ 20 | pkgincludedir = $(includedir)/@PACKAGE@ 21 | pkglibdir = $(libdir)/@PACKAGE@ 22 | pkglibexecdir = $(libexecdir)/@PACKAGE@ 23 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 24 | install_sh_DATA = $(install_sh) -c -m 644 25 | install_sh_PROGRAM = $(install_sh) -c 26 | install_sh_SCRIPT = $(install_sh) -c 27 | INSTALL_HEADER = $(INSTALL_DATA) 28 | transform = $(program_transform_name) 29 | NORMAL_INSTALL = : 30 | PRE_INSTALL = : 31 | POST_INSTALL = : 32 | NORMAL_UNINSTALL = : 33 | PRE_UNINSTALL = : 34 | POST_UNINSTALL = : 35 | bin_PROGRAMS = xmount$(EXEEXT) 36 | subdir = . 37 | DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ 38 | $(srcdir)/Makefile.in $(srcdir)/config.h.in \ 39 | $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ 40 | TODO compile config.guess config.sub depcomp install-sh \ 41 | missing 42 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 43 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac 44 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 45 | $(ACLOCAL_M4) 46 | am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ 47 | configure.lineno config.status.lineno 48 | mkinstalldirs = $(install_sh) -d 49 | CONFIG_HEADER = config.h 50 | CONFIG_CLEAN_FILES = 51 | CONFIG_CLEAN_VPATH_FILES = 52 | am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" 53 | PROGRAMS = $(bin_PROGRAMS) 54 | am_xmount_OBJECTS = xmount-md5.$(OBJEXT) xmount-xmount.$(OBJEXT) 55 | xmount_OBJECTS = $(am_xmount_OBJECTS) 56 | xmount_LDADD = $(LDADD) 57 | xmount_LINK = $(CCLD) $(xmount_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ 58 | $(LDFLAGS) -o $@ 59 | DEFAULT_INCLUDES = -I.@am__isrc@ 60 | depcomp = $(SHELL) $(top_srcdir)/depcomp 61 | am__depfiles_maybe = depfiles 62 | am__mv = mv -f 63 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 64 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 65 | CCLD = $(CC) 66 | LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 67 | SOURCES = $(xmount_SOURCES) 68 | DIST_SOURCES = $(xmount_SOURCES) 69 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; 70 | am__vpath_adj = case $$p in \ 71 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ 72 | *) f=$$p;; \ 73 | esac; 74 | am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; 75 | am__install_max = 40 76 | am__nobase_strip_setup = \ 77 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` 78 | am__nobase_strip = \ 79 | for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" 80 | am__nobase_list = $(am__nobase_strip_setup); \ 81 | for p in $$list; do echo "$$p $$p"; done | \ 82 | sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ 83 | $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ 84 | if (++n[$$2] == $(am__install_max)) \ 85 | { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ 86 | END { for (dir in files) print dir, files[dir] }' 87 | am__base_list = \ 88 | sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ 89 | sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' 90 | man1dir = $(mandir)/man1 91 | NROFF = nroff 92 | MANS = $(man_MANS) 93 | ETAGS = etags 94 | CTAGS = ctags 95 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 96 | distdir = $(PACKAGE)-$(VERSION) 97 | top_distdir = $(distdir) 98 | am__remove_distdir = \ 99 | { test ! -d "$(distdir)" \ 100 | || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ 101 | && rm -fr "$(distdir)"; }; } 102 | DIST_ARCHIVES = $(distdir).tar.gz 103 | GZIP_ENV = --best 104 | distuninstallcheck_listfiles = find . -type f -print 105 | distcleancheck_listfiles = find . -type f -print 106 | ACLOCAL = @ACLOCAL@ 107 | AMTAR = @AMTAR@ 108 | AUTOCONF = @AUTOCONF@ 109 | AUTOHEADER = @AUTOHEADER@ 110 | AUTOMAKE = @AUTOMAKE@ 111 | AWK = @AWK@ 112 | CC = @CC@ 113 | CCDEPMODE = @CCDEPMODE@ 114 | CFLAGS = @CFLAGS@ 115 | CPP = @CPP@ 116 | CPPFLAGS = @CPPFLAGS@ 117 | CYGPATH_W = @CYGPATH_W@ 118 | DEFS = @DEFS@ 119 | DEPDIR = @DEPDIR@ 120 | ECHO_C = @ECHO_C@ 121 | ECHO_N = @ECHO_N@ 122 | ECHO_T = @ECHO_T@ 123 | EGREP = @EGREP@ 124 | EXEEXT = @EXEEXT@ 125 | GREP = @GREP@ 126 | INSTALL = @INSTALL@ 127 | INSTALL_DATA = @INSTALL_DATA@ 128 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ 129 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ 130 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 131 | LDFLAGS = @LDFLAGS@ 132 | LIBOBJS = @LIBOBJS@ 133 | LIBS = @LIBS@ $(fuse_LIBS) 134 | LTLIBOBJS = @LTLIBOBJS@ 135 | MAKEINFO = @MAKEINFO@ 136 | MKDIR_P = @MKDIR_P@ 137 | OBJEXT = @OBJEXT@ 138 | PACKAGE = @PACKAGE@ 139 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 140 | PACKAGE_NAME = @PACKAGE_NAME@ 141 | PACKAGE_STRING = @PACKAGE_STRING@ 142 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 143 | PACKAGE_URL = @PACKAGE_URL@ 144 | PACKAGE_VERSION = @PACKAGE_VERSION@ 145 | PATH_SEPARATOR = @PATH_SEPARATOR@ 146 | PKG_CONFIG = @PKG_CONFIG@ 147 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ 148 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ 149 | SET_MAKE = @SET_MAKE@ 150 | SHELL = @SHELL@ 151 | STRIP = @STRIP@ 152 | VERSION = @VERSION@ 153 | abs_builddir = @abs_builddir@ 154 | abs_srcdir = @abs_srcdir@ 155 | abs_top_builddir = @abs_top_builddir@ 156 | abs_top_srcdir = @abs_top_srcdir@ 157 | ac_ct_CC = @ac_ct_CC@ 158 | am__include = @am__include@ 159 | am__leading_dot = @am__leading_dot@ 160 | am__quote = @am__quote@ 161 | am__tar = @am__tar@ 162 | am__untar = @am__untar@ 163 | bindir = @bindir@ 164 | build_alias = @build_alias@ 165 | builddir = @builddir@ 166 | datadir = @datadir@ 167 | datarootdir = @datarootdir@ 168 | docdir = @docdir@ 169 | dvidir = @dvidir@ 170 | exec_prefix = @exec_prefix@ 171 | fuse_CFLAGS = @fuse_CFLAGS@ 172 | fuse_LIBS = @fuse_LIBS@ 173 | host_alias = @host_alias@ 174 | htmldir = @htmldir@ 175 | includedir = @includedir@ 176 | infodir = @infodir@ 177 | install_sh = @install_sh@ 178 | libdir = @libdir@ 179 | libexecdir = @libexecdir@ 180 | localedir = @localedir@ 181 | localstatedir = @localstatedir@ 182 | mandir = @mandir@ 183 | mkdir_p = @mkdir_p@ 184 | oldincludedir = @oldincludedir@ 185 | pdfdir = @pdfdir@ 186 | prefix = @prefix@ 187 | program_transform_name = @program_transform_name@ 188 | psdir = @psdir@ 189 | sbindir = @sbindir@ 190 | sharedstatedir = @sharedstatedir@ 191 | srcdir = @srcdir@ 192 | sysconfdir = @sysconfdir@ 193 | target_alias = @target_alias@ 194 | top_build_prefix = @top_build_prefix@ 195 | top_builddir = @top_builddir@ 196 | top_srcdir = @top_srcdir@ 197 | man_MANS = xmount.1 198 | xmount_SOURCES = md5.c xmount.c 199 | xmount_CFLAGS = -fno-strict-aliasing -D_LARGEFILE64_SOURCE $(fuse_CFLAGS) 200 | all: config.h 201 | $(MAKE) $(AM_MAKEFLAGS) all-am 202 | 203 | .SUFFIXES: 204 | .SUFFIXES: .c .o .obj 205 | am--refresh: 206 | @: 207 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 208 | @for dep in $?; do \ 209 | case '$(am__configure_deps)' in \ 210 | *$$dep*) \ 211 | echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ 212 | $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ 213 | && exit 0; \ 214 | exit 1;; \ 215 | esac; \ 216 | done; \ 217 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ 218 | $(am__cd) $(top_srcdir) && \ 219 | $(AUTOMAKE) --gnu Makefile 220 | .PRECIOUS: Makefile 221 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 222 | @case '$?' in \ 223 | *config.status*) \ 224 | echo ' $(SHELL) ./config.status'; \ 225 | $(SHELL) ./config.status;; \ 226 | *) \ 227 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ 228 | cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ 229 | esac; 230 | 231 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 232 | $(SHELL) ./config.status --recheck 233 | 234 | $(top_srcdir)/configure: $(am__configure_deps) 235 | $(am__cd) $(srcdir) && $(AUTOCONF) 236 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) 237 | $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) 238 | $(am__aclocal_m4_deps): 239 | 240 | config.h: stamp-h1 241 | @if test ! -f $@; then \ 242 | rm -f stamp-h1; \ 243 | $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ 244 | else :; fi 245 | 246 | stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status 247 | @rm -f stamp-h1 248 | cd $(top_builddir) && $(SHELL) ./config.status config.h 249 | $(srcdir)/config.h.in: $(am__configure_deps) 250 | ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) 251 | rm -f stamp-h1 252 | touch $@ 253 | 254 | distclean-hdr: 255 | -rm -f config.h stamp-h1 256 | install-binPROGRAMS: $(bin_PROGRAMS) 257 | @$(NORMAL_INSTALL) 258 | test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" 259 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ 260 | for p in $$list; do echo "$$p $$p"; done | \ 261 | sed 's/$(EXEEXT)$$//' | \ 262 | while read p p1; do if test -f $$p; \ 263 | then echo "$$p"; echo "$$p"; else :; fi; \ 264 | done | \ 265 | sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ 266 | -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ 267 | sed 'N;N;N;s,\n, ,g' | \ 268 | $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ 269 | { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ 270 | if ($$2 == $$4) files[d] = files[d] " " $$1; \ 271 | else { print "f", $$3 "/" $$4, $$1; } } \ 272 | END { for (d in files) print "f", d, files[d] }' | \ 273 | while read type dir files; do \ 274 | if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ 275 | test -z "$$files" || { \ 276 | echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ 277 | $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ 278 | } \ 279 | ; done 280 | 281 | uninstall-binPROGRAMS: 282 | @$(NORMAL_UNINSTALL) 283 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ 284 | files=`for p in $$list; do echo "$$p"; done | \ 285 | sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ 286 | -e 's/$$/$(EXEEXT)/' `; \ 287 | test -n "$$list" || exit 0; \ 288 | echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ 289 | cd "$(DESTDIR)$(bindir)" && rm -f $$files 290 | 291 | clean-binPROGRAMS: 292 | -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) 293 | xmount$(EXEEXT): $(xmount_OBJECTS) $(xmount_DEPENDENCIES) 294 | @rm -f xmount$(EXEEXT) 295 | $(xmount_LINK) $(xmount_OBJECTS) $(xmount_LDADD) $(LIBS) 296 | 297 | mostlyclean-compile: 298 | -rm -f *.$(OBJEXT) 299 | 300 | distclean-compile: 301 | -rm -f *.tab.c 302 | 303 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmount-md5.Po@am__quote@ 304 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmount-xmount.Po@am__quote@ 305 | 306 | .c.o: 307 | @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< 308 | @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 309 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 310 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 311 | @am__fastdepCC_FALSE@ $(COMPILE) -c $< 312 | 313 | .c.obj: 314 | @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` 315 | @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 316 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 317 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 318 | @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` 319 | 320 | xmount-md5.o: md5.c 321 | @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmount_CFLAGS) $(CFLAGS) -MT xmount-md5.o -MD -MP -MF $(DEPDIR)/xmount-md5.Tpo -c -o xmount-md5.o `test -f 'md5.c' || echo '$(srcdir)/'`md5.c 322 | @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xmount-md5.Tpo $(DEPDIR)/xmount-md5.Po 323 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='md5.c' object='xmount-md5.o' libtool=no @AMDEPBACKSLASH@ 324 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 325 | @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmount_CFLAGS) $(CFLAGS) -c -o xmount-md5.o `test -f 'md5.c' || echo '$(srcdir)/'`md5.c 326 | 327 | xmount-md5.obj: md5.c 328 | @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmount_CFLAGS) $(CFLAGS) -MT xmount-md5.obj -MD -MP -MF $(DEPDIR)/xmount-md5.Tpo -c -o xmount-md5.obj `if test -f 'md5.c'; then $(CYGPATH_W) 'md5.c'; else $(CYGPATH_W) '$(srcdir)/md5.c'; fi` 329 | @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xmount-md5.Tpo $(DEPDIR)/xmount-md5.Po 330 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='md5.c' object='xmount-md5.obj' libtool=no @AMDEPBACKSLASH@ 331 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 332 | @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmount_CFLAGS) $(CFLAGS) -c -o xmount-md5.obj `if test -f 'md5.c'; then $(CYGPATH_W) 'md5.c'; else $(CYGPATH_W) '$(srcdir)/md5.c'; fi` 333 | 334 | xmount-xmount.o: xmount.c 335 | @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmount_CFLAGS) $(CFLAGS) -MT xmount-xmount.o -MD -MP -MF $(DEPDIR)/xmount-xmount.Tpo -c -o xmount-xmount.o `test -f 'xmount.c' || echo '$(srcdir)/'`xmount.c 336 | @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xmount-xmount.Tpo $(DEPDIR)/xmount-xmount.Po 337 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xmount.c' object='xmount-xmount.o' libtool=no @AMDEPBACKSLASH@ 338 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 339 | @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmount_CFLAGS) $(CFLAGS) -c -o xmount-xmount.o `test -f 'xmount.c' || echo '$(srcdir)/'`xmount.c 340 | 341 | xmount-xmount.obj: xmount.c 342 | @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmount_CFLAGS) $(CFLAGS) -MT xmount-xmount.obj -MD -MP -MF $(DEPDIR)/xmount-xmount.Tpo -c -o xmount-xmount.obj `if test -f 'xmount.c'; then $(CYGPATH_W) 'xmount.c'; else $(CYGPATH_W) '$(srcdir)/xmount.c'; fi` 343 | @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xmount-xmount.Tpo $(DEPDIR)/xmount-xmount.Po 344 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xmount.c' object='xmount-xmount.obj' libtool=no @AMDEPBACKSLASH@ 345 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 346 | @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmount_CFLAGS) $(CFLAGS) -c -o xmount-xmount.obj `if test -f 'xmount.c'; then $(CYGPATH_W) 'xmount.c'; else $(CYGPATH_W) '$(srcdir)/xmount.c'; fi` 347 | install-man1: $(man_MANS) 348 | @$(NORMAL_INSTALL) 349 | test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" 350 | @list=''; test -n "$(man1dir)" || exit 0; \ 351 | { for i in $$list; do echo "$$i"; done; \ 352 | l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ 353 | sed -n '/\.1[a-z]*$$/p'; \ 354 | } | while read p; do \ 355 | if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ 356 | echo "$$d$$p"; echo "$$p"; \ 357 | done | \ 358 | sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ 359 | -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ 360 | sed 'N;N;s,\n, ,g' | { \ 361 | list=; while read file base inst; do \ 362 | if test "$$base" = "$$inst"; then list="$$list $$file"; else \ 363 | echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ 364 | $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ 365 | fi; \ 366 | done; \ 367 | for i in $$list; do echo "$$i"; done | $(am__base_list) | \ 368 | while read files; do \ 369 | test -z "$$files" || { \ 370 | echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ 371 | $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ 372 | done; } 373 | 374 | uninstall-man1: 375 | @$(NORMAL_UNINSTALL) 376 | @list=''; test -n "$(man1dir)" || exit 0; \ 377 | files=`{ for i in $$list; do echo "$$i"; done; \ 378 | l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ 379 | sed -n '/\.1[a-z]*$$/p'; \ 380 | } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ 381 | -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ 382 | test -z "$$files" || { \ 383 | echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ 384 | cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } 385 | 386 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) 387 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ 388 | unique=`for i in $$list; do \ 389 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 390 | done | \ 391 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ 392 | END { if (nonempty) { for (i in files) print i; }; }'`; \ 393 | mkid -fID $$unique 394 | tags: TAGS 395 | 396 | TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ 397 | $(TAGS_FILES) $(LISP) 398 | set x; \ 399 | here=`pwd`; \ 400 | list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ 401 | unique=`for i in $$list; do \ 402 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 403 | done | \ 404 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ 405 | END { if (nonempty) { for (i in files) print i; }; }'`; \ 406 | shift; \ 407 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ 408 | test -n "$$unique" || unique=$$empty_fix; \ 409 | if test $$# -gt 0; then \ 410 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 411 | "$$@" $$unique; \ 412 | else \ 413 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 414 | $$unique; \ 415 | fi; \ 416 | fi 417 | ctags: CTAGS 418 | CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ 419 | $(TAGS_FILES) $(LISP) 420 | list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ 421 | unique=`for i in $$list; do \ 422 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 423 | done | \ 424 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ 425 | END { if (nonempty) { for (i in files) print i; }; }'`; \ 426 | test -z "$(CTAGS_ARGS)$$unique" \ 427 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ 428 | $$unique 429 | 430 | GTAGS: 431 | here=`$(am__cd) $(top_builddir) && pwd` \ 432 | && $(am__cd) $(top_srcdir) \ 433 | && gtags -i $(GTAGS_ARGS) "$$here" 434 | 435 | distclean-tags: 436 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags 437 | 438 | distdir: $(DISTFILES) 439 | @list='$(MANS)'; if test -n "$$list"; then \ 440 | list=`for p in $$list; do \ 441 | if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ 442 | if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ 443 | if test -n "$$list" && \ 444 | grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ 445 | echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ 446 | grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ 447 | echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ 448 | echo " typically \`make maintainer-clean' will remove them" >&2; \ 449 | exit 1; \ 450 | else :; fi; \ 451 | else :; fi 452 | $(am__remove_distdir) 453 | test -d "$(distdir)" || mkdir "$(distdir)" 454 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 455 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 456 | list='$(DISTFILES)'; \ 457 | dist_files=`for file in $$list; do echo $$file; done | \ 458 | sed -e "s|^$$srcdirstrip/||;t" \ 459 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ 460 | case $$dist_files in \ 461 | */*) $(MKDIR_P) `echo "$$dist_files" | \ 462 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ 463 | sort -u` ;; \ 464 | esac; \ 465 | for file in $$dist_files; do \ 466 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 467 | if test -d $$d/$$file; then \ 468 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 469 | if test -d "$(distdir)/$$file"; then \ 470 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 471 | fi; \ 472 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 473 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ 474 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 475 | fi; \ 476 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ 477 | else \ 478 | test -f "$(distdir)/$$file" \ 479 | || cp -p $$d/$$file "$(distdir)/$$file" \ 480 | || exit 1; \ 481 | fi; \ 482 | done 483 | -test -n "$(am__skip_mode_fix)" \ 484 | || find "$(distdir)" -type d ! -perm -755 \ 485 | -exec chmod u+rwx,go+rx {} \; -o \ 486 | ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ 487 | ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ 488 | ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ 489 | || chmod -R a+r "$(distdir)" 490 | dist-gzip: distdir 491 | tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz 492 | $(am__remove_distdir) 493 | 494 | dist-bzip2: distdir 495 | tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 496 | $(am__remove_distdir) 497 | 498 | dist-lzma: distdir 499 | tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma 500 | $(am__remove_distdir) 501 | 502 | dist-xz: distdir 503 | tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz 504 | $(am__remove_distdir) 505 | 506 | dist-tarZ: distdir 507 | tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z 508 | $(am__remove_distdir) 509 | 510 | dist-shar: distdir 511 | shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz 512 | $(am__remove_distdir) 513 | 514 | dist-zip: distdir 515 | -rm -f $(distdir).zip 516 | zip -rq $(distdir).zip $(distdir) 517 | $(am__remove_distdir) 518 | 519 | dist dist-all: distdir 520 | tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz 521 | $(am__remove_distdir) 522 | 523 | # This target untars the dist file and tries a VPATH configuration. Then 524 | # it guarantees that the distribution is self-contained by making another 525 | # tarfile. 526 | distcheck: dist 527 | case '$(DIST_ARCHIVES)' in \ 528 | *.tar.gz*) \ 529 | GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ 530 | *.tar.bz2*) \ 531 | bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ 532 | *.tar.lzma*) \ 533 | lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ 534 | *.tar.xz*) \ 535 | xz -dc $(distdir).tar.xz | $(am__untar) ;;\ 536 | *.tar.Z*) \ 537 | uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ 538 | *.shar.gz*) \ 539 | GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ 540 | *.zip*) \ 541 | unzip $(distdir).zip ;;\ 542 | esac 543 | chmod -R a-w $(distdir); chmod a+w $(distdir) 544 | mkdir $(distdir)/_build 545 | mkdir $(distdir)/_inst 546 | chmod a-w $(distdir) 547 | test -d $(distdir)/_build || exit 0; \ 548 | dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ 549 | && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ 550 | && am__cwd=`pwd` \ 551 | && $(am__cd) $(distdir)/_build \ 552 | && ../configure --srcdir=.. --prefix="$$dc_install_base" \ 553 | $(DISTCHECK_CONFIGURE_FLAGS) \ 554 | && $(MAKE) $(AM_MAKEFLAGS) \ 555 | && $(MAKE) $(AM_MAKEFLAGS) dvi \ 556 | && $(MAKE) $(AM_MAKEFLAGS) check \ 557 | && $(MAKE) $(AM_MAKEFLAGS) install \ 558 | && $(MAKE) $(AM_MAKEFLAGS) installcheck \ 559 | && $(MAKE) $(AM_MAKEFLAGS) uninstall \ 560 | && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ 561 | distuninstallcheck \ 562 | && chmod -R a-w "$$dc_install_base" \ 563 | && ({ \ 564 | (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ 565 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ 566 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ 567 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ 568 | distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ 569 | } || { rm -rf "$$dc_destdir"; exit 1; }) \ 570 | && rm -rf "$$dc_destdir" \ 571 | && $(MAKE) $(AM_MAKEFLAGS) dist \ 572 | && rm -rf $(DIST_ARCHIVES) \ 573 | && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ 574 | && cd "$$am__cwd" \ 575 | || exit 1 576 | $(am__remove_distdir) 577 | @(echo "$(distdir) archives ready for distribution: "; \ 578 | list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ 579 | sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' 580 | distuninstallcheck: 581 | @$(am__cd) '$(distuninstallcheck_dir)' \ 582 | && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ 583 | || { echo "ERROR: files left after uninstall:" ; \ 584 | if test -n "$(DESTDIR)"; then \ 585 | echo " (check DESTDIR support)"; \ 586 | fi ; \ 587 | $(distuninstallcheck_listfiles) ; \ 588 | exit 1; } >&2 589 | distcleancheck: distclean 590 | @if test '$(srcdir)' = . ; then \ 591 | echo "ERROR: distcleancheck can only run from a VPATH build" ; \ 592 | exit 1 ; \ 593 | fi 594 | @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ 595 | || { echo "ERROR: files left in build directory after distclean:" ; \ 596 | $(distcleancheck_listfiles) ; \ 597 | exit 1; } >&2 598 | check-am: all-am 599 | check: check-am 600 | all-am: Makefile $(PROGRAMS) $(MANS) config.h 601 | installdirs: 602 | for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ 603 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ 604 | done 605 | install: install-am 606 | install-exec: install-exec-am 607 | install-data: install-data-am 608 | uninstall: uninstall-am 609 | 610 | install-am: all-am 611 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 612 | 613 | installcheck: installcheck-am 614 | install-strip: 615 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 616 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 617 | `test -z '$(STRIP)' || \ 618 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install 619 | mostlyclean-generic: 620 | 621 | clean-generic: 622 | 623 | distclean-generic: 624 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 625 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 626 | 627 | maintainer-clean-generic: 628 | @echo "This command is intended for maintainers to use" 629 | @echo "it deletes files that may require special tools to rebuild." 630 | clean: clean-am 631 | 632 | clean-am: clean-binPROGRAMS clean-generic mostlyclean-am 633 | 634 | distclean: distclean-am 635 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) 636 | -rm -rf ./$(DEPDIR) 637 | -rm -f Makefile 638 | distclean-am: clean-am distclean-compile distclean-generic \ 639 | distclean-hdr distclean-tags 640 | 641 | dvi: dvi-am 642 | 643 | dvi-am: 644 | 645 | html: html-am 646 | 647 | html-am: 648 | 649 | info: info-am 650 | 651 | info-am: 652 | 653 | install-data-am: install-man 654 | 655 | install-dvi: install-dvi-am 656 | 657 | install-dvi-am: 658 | 659 | install-exec-am: install-binPROGRAMS 660 | 661 | install-html: install-html-am 662 | 663 | install-html-am: 664 | 665 | install-info: install-info-am 666 | 667 | install-info-am: 668 | 669 | install-man: install-man1 670 | 671 | install-pdf: install-pdf-am 672 | 673 | install-pdf-am: 674 | 675 | install-ps: install-ps-am 676 | 677 | install-ps-am: 678 | 679 | installcheck-am: 680 | 681 | maintainer-clean: maintainer-clean-am 682 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) 683 | -rm -rf $(top_srcdir)/autom4te.cache 684 | -rm -rf ./$(DEPDIR) 685 | -rm -f Makefile 686 | maintainer-clean-am: distclean-am maintainer-clean-generic 687 | 688 | mostlyclean: mostlyclean-am 689 | 690 | mostlyclean-am: mostlyclean-compile mostlyclean-generic 691 | 692 | pdf: pdf-am 693 | 694 | pdf-am: 695 | 696 | ps: ps-am 697 | 698 | ps-am: 699 | 700 | uninstall-am: uninstall-binPROGRAMS uninstall-man 701 | 702 | uninstall-man: uninstall-man1 703 | 704 | .MAKE: all install-am install-strip 705 | 706 | .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ 707 | clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \ 708 | dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ 709 | distcheck distclean distclean-compile distclean-generic \ 710 | distclean-hdr distclean-tags distcleancheck distdir \ 711 | distuninstallcheck dvi dvi-am html html-am info info-am \ 712 | install install-am install-binPROGRAMS install-data \ 713 | install-data-am install-dvi install-dvi-am install-exec \ 714 | install-exec-am install-html install-html-am install-info \ 715 | install-info-am install-man install-man1 install-pdf \ 716 | install-pdf-am install-ps install-ps-am install-strip \ 717 | installcheck installcheck-am installdirs maintainer-clean \ 718 | maintainer-clean-generic mostlyclean mostlyclean-compile \ 719 | mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ 720 | uninstall-am uninstall-binPROGRAMS uninstall-man \ 721 | uninstall-man1 722 | 723 | # Link against the not installed static libaff and libewf 724 | #xmount_LDADD = libaff/lib/.libs/libafflib.a libewf/libewf/.libs/libewf.a /usr/lib/libssl.a /usr/lib/libcrypto.a -lstdc++ -lz 725 | #xmount_CFLAGS += -Ilibewf/include 726 | 727 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 728 | # Otherwise a system limit (for SysV at least) may be exceeded. 729 | .NOEXPORT: 730 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | This file lists the most important changes to the previous released version. 2 | For a full list of changes please refer to the source files. 3 | 4 | New for version 0.5.0: 5 | - Added support for VHD emulation. 6 | 7 | New for version 0.4.6: 8 | - Added support for libewf v2 9 | 10 | New for version 0.4.5: 11 | - Show the name of the mounted file in mount output 12 | 13 | New for version 0.4.4: 14 | - Fixed a bug that prevents VirtualBox 3.2.8 or above from recognising the 15 | generated VDIs. 16 | 17 | New for version 0.4.1: 18 | - Code cleanups and some minor bugfixes 19 | 20 | New for version 0.4.0: 21 | - AFFLIB support for input images 22 | - AFFLIB and LIBEWF are now statically linked to xmount 23 | 24 | New for version 0.3.2: 25 | - Automatic addition of FUSE's "-o allow_other" option if it is supported. 26 | 27 | New for version 0.3.1: 28 | - Some bugfixes for VMDK emulation (Still experimental) 29 | - It is now possible to specify whether VMDK disks are attached to the IDE 30 | or SCSI bus. (Output type vmdk or vmdks) 31 | 32 | New for version 0.3.0: 33 | - Added experimental support for VMDK emulation 34 | 35 | New for version 0.2.3: 36 | - Virtual write support finally fixed 37 | 38 | New for version 0.2.2: 39 | - Fixed yet another bug in virtual write support 40 | 41 | New for version 0.2.1: 42 | - Fixed a bug in virtual write support 43 | 44 | New for version 0.2.0: 45 | - Name changed from mountewf to xmount 46 | - Support for multiple input image formats (DD and EWF) 47 | - Support for virtual write access 48 | 49 | New for version 0.1.2: 50 | - Added random generator initialisation (Makes it possible to use more than 1 51 | mounted vdi in VBox) 52 | 53 | New for version 0.1.1: 54 | - Fixed some severe bugs 55 | 56 | New for version 0.1.0: 57 | - First release 58 | - Support for emulation of dd and vdi files 59 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | XMOUNT README FILE 2 | 3 | Table of contents 4 | 0.0 Author and license stuff 5 | 1.0 What is xmount? - A short description 6 | 2.0 A deeper view of things 7 | 2.1 Emulated DD file 8 | 2.2 Emulated VDI file 9 | 2.3 Emulated VMDK file 10 | 2.4 Emulated VHD file 11 | 2.5 Virtual write access 12 | 3.0 Installation instructions 13 | 3.1 Prerequisits 14 | 3.1 Install from a package 15 | 3.2 Install from source 16 | 4.0 xmount command line parameters 17 | 4.1 xmount usage examples 18 | 19 | 0.0 Author and license stuff 20 | xmount Copyright (c) 2008-2012 by Gillen Daniel 21 | 22 | This program is free software: you can redistribute it and/or modify it under 23 | the terms of the GNU General Public License as published by the Free Software 24 | Foundation, either version 3 of the License, or (at your option) any later 25 | version. 26 | 27 | This program is distributed in the hope that it will be useful, but WITHOUT 28 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 29 | FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 30 | 31 | You should have received a copy of the GNU General Public License along with 32 | this program. If not, see . 33 | 34 | --- 35 | 36 | Due to AFFLIB, I have to mention that: 37 | 38 | This product includes software developed by Simson L. Garfinkel and Basis 39 | Technology Corp. 40 | 41 | 1.0 What is xmount? - A short description 42 | xmount allows you to convert on-the-fly between multiple input and output 43 | harddisk image types. xmount creates a virtual file system using FUSE 44 | (Filesystem in Userspace) that contains a virtual representation of the input 45 | image. The virtual representation can be in raw DD, VirtualBox's virtual disk 46 | file format, Microsoft's Virtual Hard Disk Image format or in VmWare's VMDK 47 | file format. Input images can be raw DD, EWF (Expert Witness Compression 48 | Format) or AFF (Advanced Forensic Format) files. In addition, xmount also 49 | supports virtual write access to the output files that is redirected to a 50 | cache file. This makes it possible to boot acquired harddisk images using 51 | QEMU, KVM, VirtualBox, VmWare or alike. 52 | 53 | 2.0 A deeper view of things 54 | 2.1 Emulated DD file 55 | This is the standard data representation used by xmount. It is a file 56 | containing the raw data contained in the input image file. 57 | 58 | 2.2 Emulated VDI file 59 | When using the "--out vdi" command line parameter, a VirtualBox disk file 60 | is emulated. This means that xmount builds a virtual VDI header and prepends 61 | it to the raw data contained in the input image. The VDI file can be used in 62 | VirtualBox as a virtual disk file. 63 | 64 | 2.3 Emulated VMDK file 65 | When using the "--out vmdk(s)" command line paramter, a VMWare virtual disk 66 | file will be emulated. This mainly consists in building a VMDK descriptor 67 | file that will access an emulated DD file. You can use this VMDK file to 68 | add your input image as virtual disk to a VMWare virtual machine. "vmdk" is 69 | a VMWare disk attached to the IDE bus and "vmdks" is attached to the SCSI 70 | bus. 71 | 72 | When emulating VMDK files to be used in VMWare, you have to enable 73 | "user_allow_other" in /etc/fuse.conf or run xmount and VmWare as root. 74 | 75 | WARNING: VMDK support should be considered experimental and currently the 76 | VMDK descriptor file isn't cached. 77 | 78 | 2.4 Emulated VHD file 79 | When using the "--out vhd" command line parameter, a Virtual Hard Disk Image 80 | file is emulated by appending to the raw data a valid VHD footer. Valid here 81 | means as described in Microsoft's Virtual Hard Disk Image Format specs v1. 82 | 83 | 2.5 Virtual write access 84 | By using the "--cache " command line parameter, xmount allows 85 | you to change data in the emulated image files. All changes are written to a 86 | separate cache file. No data will ever be written to the original input 87 | image files! Write access is limited to change existing data. It isn't 88 | possible to change the emulated image's file size (no append or truncate)! 89 | The same cache file can be used with different output image formats without 90 | loosing changed data. 91 | 92 | 3.0 Installation instructions 93 | To install xmount, you can use a prebuild package for your distribution or 94 | you can build xmount from source. The two methods are described in the 95 | following sections. 96 | 97 | 3.1 Prerequisits 98 | SYSTEM: 99 | Some sort of Linux with a recent kernel (2.6.x or above). 100 | FUSE: 101 | Your os must support FUSE and have the appropriate libraries installed. 102 | (See http://fuse.sourceforge.net/ for more informations). To be able to 103 | install from source, you also need the FUSE header files. 104 | LIBEWF: 105 | To enable EWF input image support. Get it from 106 | http://sourceforge.net/projects/libewf/ 107 | LIBAFF: 108 | To enable AFF input image support. Get it from http://www.afflib.org/ 109 | 110 | 3.2 Install from a package 111 | Chances are I provide prebuild binary packages for Debian / Ubuntu. In this 112 | case, you only have to fire up your distribution's package manager and 113 | install xmount. See https://www.pinguin.lu for more informations and 114 | download links. 115 | 116 | 3.3 Install from source 117 | After having checked the prerequisits, you should be able to compile and 118 | install xmount by simply issuing the following three commands: 119 | 120 | # ./configure 121 | # make 122 | # make install 123 | 124 | 4.0 xmount command line parameters 125 | xmount [[fopts] [mopts]] [ [...]] 126 | 127 | fopts: 128 | -d : Enable FUSE's and xmount's debug mode. 129 | -s : Run single threaded. 130 | -o no_allow_other : Disable automatic addition of FUSE's allow_other option. 131 | -o : Specify fuse mount options. Will also disable automatic 132 | addition of FUSE's allow_other option! 133 | mopts: 134 | --cache : Enable virtual write support and set cachefile to use. 135 | --in : Input image format. can be "dd", "ewf". 136 | --info : Print out some infos about used compiler and libraries. 137 | --out : Output image format. can be "dd", "vdi", "vhd", "vmdk(s)". 138 | --owcache : Same as --cache but overwrites existing cache. 139 | --rw : Same as --cache . 140 | --version : Same as --info. 141 | INFO: Input and output image type defaults to "dd" if not specified. 142 | ifile: 143 | Input image file. If you use EWF files, you have to specify all image 144 | segments! (If your shell supports it, you can use .E?? as file extension 145 | to specify them all) 146 | mntp: 147 | Mount point where virtual files should be located. 148 | 149 | 4.1 xmount usage examples 150 | To xmount an EWF harddisk image from your acquired disk as a raw DD image 151 | under /mnt, use the following command: 152 | 153 | xmount --in ewf ./acquired_disk.E?? /mnt 154 | 155 | To xmount the same ewf image as vdi file, you would use a command like this: 156 | 157 | xmount --in ewf --out vdi ./acquired_disk.E?? /mnt 158 | 159 | And to enable virtual write support on a raw DD input image xmounted as VDI 160 | file: 161 | 162 | xmount --out vdi --cache ./acquired_disk.cache ./acquired_disk.dd /mnt 163 | 164 | -------------------------------------------------------------------------------- /ROADMAP: -------------------------------------------------------------------------------- 1 | This file lists upcomming changes to xmount. 2 | 3 | - Stable support of VMDK files 4 | - New cache file version to support some new features 5 | 6 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | For a list of things that still have to be done see the file ROADMAP 2 | -------------------------------------------------------------------------------- /compile: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Wrapper for compilers which do not understand `-c -o'. 3 | 4 | scriptversion=2005-05-14.22 5 | 6 | # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. 7 | # Written by Tom Tromey . 8 | # 9 | # This program is free software; you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation; either version 2, or (at your option) 12 | # any later version. 13 | # 14 | # This program is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with this program; if not, write to the Free Software 21 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 22 | 23 | # As a special exception to the GNU General Public License, if you 24 | # distribute this file as part of a program that contains a 25 | # configuration script generated by Autoconf, you may include it under 26 | # the same distribution terms that you use for the rest of that program. 27 | 28 | # This file is maintained in Automake, please report 29 | # bugs to or send patches to 30 | # . 31 | 32 | case $1 in 33 | '') 34 | echo "$0: No command. Try \`$0 --help' for more information." 1>&2 35 | exit 1; 36 | ;; 37 | -h | --h*) 38 | cat <<\EOF 39 | Usage: compile [--help] [--version] PROGRAM [ARGS] 40 | 41 | Wrapper for compilers which do not understand `-c -o'. 42 | Remove `-o dest.o' from ARGS, run PROGRAM with the remaining 43 | arguments, and rename the output as expected. 44 | 45 | If you are trying to build a whole package this is not the 46 | right script to run: please start by reading the file `INSTALL'. 47 | 48 | Report bugs to . 49 | EOF 50 | exit $? 51 | ;; 52 | -v | --v*) 53 | echo "compile $scriptversion" 54 | exit $? 55 | ;; 56 | esac 57 | 58 | ofile= 59 | cfile= 60 | eat= 61 | 62 | for arg 63 | do 64 | if test -n "$eat"; then 65 | eat= 66 | else 67 | case $1 in 68 | -o) 69 | # configure might choose to run compile as `compile cc -o foo foo.c'. 70 | # So we strip `-o arg' only if arg is an object. 71 | eat=1 72 | case $2 in 73 | *.o | *.obj) 74 | ofile=$2 75 | ;; 76 | *) 77 | set x "$@" -o "$2" 78 | shift 79 | ;; 80 | esac 81 | ;; 82 | *.c) 83 | cfile=$1 84 | set x "$@" "$1" 85 | shift 86 | ;; 87 | *) 88 | set x "$@" "$1" 89 | shift 90 | ;; 91 | esac 92 | fi 93 | shift 94 | done 95 | 96 | if test -z "$ofile" || test -z "$cfile"; then 97 | # If no `-o' option was seen then we might have been invoked from a 98 | # pattern rule where we don't need one. That is ok -- this is a 99 | # normal compilation that the losing compiler can handle. If no 100 | # `.c' file was seen then we are probably linking. That is also 101 | # ok. 102 | exec "$@" 103 | fi 104 | 105 | # Name of file we expect compiler to create. 106 | cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` 107 | 108 | # Create the lock directory. 109 | # Note: use `[/.-]' here to ensure that we don't use the same name 110 | # that we are using for the .o file. Also, base the name on the expected 111 | # object file name, since that is what matters with a parallel build. 112 | lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d 113 | while true; do 114 | if mkdir "$lockdir" >/dev/null 2>&1; then 115 | break 116 | fi 117 | sleep 1 118 | done 119 | # FIXME: race condition here if user kills between mkdir and trap. 120 | trap "rmdir '$lockdir'; exit 1" 1 2 15 121 | 122 | # Run the compile. 123 | "$@" 124 | ret=$? 125 | 126 | if test -f "$cofile"; then 127 | mv "$cofile" "$ofile" 128 | elif test -f "${cofile}bj"; then 129 | mv "${cofile}bj" "$ofile" 130 | fi 131 | 132 | rmdir "$lockdir" 133 | exit $ret 134 | 135 | # Local Variables: 136 | # mode: shell-script 137 | # sh-indentation: 2 138 | # eval: (add-hook 'write-file-hooks 'time-stamp) 139 | # time-stamp-start: "scriptversion=" 140 | # time-stamp-format: "%:y-%02m-%02d.%02H" 141 | # time-stamp-end: "$" 142 | # End: 143 | -------------------------------------------------------------------------------- /config.h.in: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.ac by autoheader. */ 2 | 3 | /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ 4 | #undef HAVE_DOPRNT 5 | 6 | /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ 7 | #undef HAVE_FSEEKO 8 | 9 | /* Define to 1 if you have the header file. */ 10 | #undef HAVE_INTTYPES_H 11 | 12 | /* Define to 1 if you have the `afflib' library (-lafflib). */ 13 | #undef HAVE_LIBAFFLIB 14 | 15 | /* Define to 1 if you have the `crypto' library (-lcrypto). */ 16 | #undef HAVE_LIBCRYPTO 17 | 18 | /* Define to 1 if you have the `ewf' library (-lewf). */ 19 | #undef HAVE_LIBEWF 20 | 21 | /* Define to 1 if your system has a GNU libc compatible `malloc' function, and 22 | to 0 otherwise. */ 23 | #undef HAVE_MALLOC 24 | 25 | /* Define to 1 if you have the header file. */ 26 | #undef HAVE_MEMORY_H 27 | 28 | /* Define to 1 if you have the `memset' function. */ 29 | #undef HAVE_MEMSET 30 | 31 | /* Define to 1 if your system has a GNU libc compatible `realloc' function, 32 | and to 0 otherwise. */ 33 | #undef HAVE_REALLOC 34 | 35 | /* Define to 1 if you have the header file. */ 36 | #undef HAVE_STDINT_H 37 | 38 | /* Define to 1 if you have the header file. */ 39 | #undef HAVE_STDLIB_H 40 | 41 | /* Define to 1 if you have the header file. */ 42 | #undef HAVE_STRINGS_H 43 | 44 | /* Define to 1 if you have the header file. */ 45 | #undef HAVE_STRING_H 46 | 47 | /* Define to 1 if you have the `strrchr' function. */ 48 | #undef HAVE_STRRCHR 49 | 50 | /* Define to 1 if you have the header file. */ 51 | #undef HAVE_SYS_STAT_H 52 | 53 | /* Define to 1 if you have the header file. */ 54 | #undef HAVE_SYS_TYPES_H 55 | 56 | /* Define to 1 if you have the header file. */ 57 | #undef HAVE_UNISTD_H 58 | 59 | /* Define to 1 if you have the `vprintf' function. */ 60 | #undef HAVE_VPRINTF 61 | 62 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 63 | #undef NO_MINUS_C_MINUS_O 64 | 65 | /* Name of package */ 66 | #undef PACKAGE 67 | 68 | /* Define to the address where bug reports for this package should be sent. */ 69 | #undef PACKAGE_BUGREPORT 70 | 71 | /* Define to the full name of this package. */ 72 | #undef PACKAGE_NAME 73 | 74 | /* Define to the full name and version of this package. */ 75 | #undef PACKAGE_STRING 76 | 77 | /* Define to the one symbol short name of this package. */ 78 | #undef PACKAGE_TARNAME 79 | 80 | /* Define to the home page for this package. */ 81 | #undef PACKAGE_URL 82 | 83 | /* Define to the version of this package. */ 84 | #undef PACKAGE_VERSION 85 | 86 | /* Define to 1 if you have the ANSI C header files. */ 87 | #undef STDC_HEADERS 88 | 89 | /* Version number of package */ 90 | #undef VERSION 91 | 92 | /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ 93 | #undef _LARGEFILE_SOURCE 94 | 95 | /* Define for Solaris 2.5.1 so the uint32_t typedef from , 96 | , or is not used. If the typedef were allowed, the 97 | #define below would cause a syntax error. */ 98 | #undef _UINT32_T 99 | 100 | /* Define for Solaris 2.5.1 so the uint64_t typedef from , 101 | , or is not used. If the typedef were allowed, the 102 | #define below would cause a syntax error. */ 103 | #undef _UINT64_T 104 | 105 | /* Define for Solaris 2.5.1 so the uint8_t typedef from , 106 | , or is not used. If the typedef were allowed, the 107 | #define below would cause a syntax error. */ 108 | #undef _UINT8_T 109 | 110 | /* Define to empty if `const' does not conform to ANSI C. */ 111 | #undef const 112 | 113 | /* Define to the type of a signed integer type of width exactly 64 bits if 114 | such a type exists and the standard includes do not define it. */ 115 | #undef int64_t 116 | 117 | /* Define to rpl_malloc if the replacement function should be used. */ 118 | #undef malloc 119 | 120 | /* Define to `long int' if does not define. */ 121 | #undef off_t 122 | 123 | /* Define to rpl_realloc if the replacement function should be used. */ 124 | #undef realloc 125 | 126 | /* Define to `unsigned int' if does not define. */ 127 | #undef size_t 128 | 129 | /* Define to `int' if does not define. */ 130 | #undef ssize_t 131 | 132 | /* Define to the type of an unsigned integer type of width exactly 16 bits if 133 | such a type exists and the standard includes do not define it. */ 134 | #undef uint16_t 135 | 136 | /* Define to the type of an unsigned integer type of width exactly 32 bits if 137 | such a type exists and the standard includes do not define it. */ 138 | #undef uint32_t 139 | 140 | /* Define to the type of an unsigned integer type of width exactly 64 bits if 141 | such a type exists and the standard includes do not define it. */ 142 | #undef uint64_t 143 | 144 | /* Define to the type of an unsigned integer type of width exactly 8 bits if 145 | such a type exists and the standard includes do not define it. */ 146 | #undef uint8_t 147 | -------------------------------------------------------------------------------- /config.sub: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Configuration validation subroutine script. 3 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 5 | # Free Software Foundation, Inc. 6 | 7 | timestamp='2009-04-17' 8 | 9 | # This file is (in principle) common to ALL GNU software. 10 | # The presence of a machine in this file suggests that SOME GNU software 11 | # can handle that machine. It does not imply ALL GNU software can. 12 | # 13 | # This file is free software; you can redistribute it and/or modify 14 | # it under the terms of the GNU General Public License as published by 15 | # the Free Software Foundation; either version 2 of the License, or 16 | # (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 26 | # 02110-1301, USA. 27 | # 28 | # As a special exception to the GNU General Public License, if you 29 | # distribute this file as part of a program that contains a 30 | # configuration script generated by Autoconf, you may include it under 31 | # the same distribution terms that you use for the rest of that program. 32 | 33 | 34 | # Please send patches to . Submit a context 35 | # diff and a properly formatted ChangeLog entry. 36 | # 37 | # Configuration subroutine to validate and canonicalize a configuration type. 38 | # Supply the specified configuration type as an argument. 39 | # If it is invalid, we print an error message on stderr and exit with code 1. 40 | # Otherwise, we print the canonical config type on stdout and succeed. 41 | 42 | # This file is supposed to be the same for all GNU packages 43 | # and recognize all the CPU types, system types and aliases 44 | # that are meaningful with *any* GNU software. 45 | # Each package is responsible for reporting which valid configurations 46 | # it does not support. The user should be able to distinguish 47 | # a failure to support a valid configuration from a meaningless 48 | # configuration. 49 | 50 | # The goal of this file is to map all the various variations of a given 51 | # machine specification into a single specification in the form: 52 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM 53 | # or in some cases, the newer four-part form: 54 | # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM 55 | # It is wrong to echo any other type of specification. 56 | 57 | me=`echo "$0" | sed -e 's,.*/,,'` 58 | 59 | usage="\ 60 | Usage: $0 [OPTION] CPU-MFR-OPSYS 61 | $0 [OPTION] ALIAS 62 | 63 | Canonicalize a configuration name. 64 | 65 | Operation modes: 66 | -h, --help print this help, then exit 67 | -t, --time-stamp print date of last modification, then exit 68 | -v, --version print version number, then exit 69 | 70 | Report bugs and patches to ." 71 | 72 | version="\ 73 | GNU config.sub ($timestamp) 74 | 75 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 76 | 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 77 | 78 | This is free software; see the source for copying conditions. There is NO 79 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 80 | 81 | help=" 82 | Try \`$me --help' for more information." 83 | 84 | # Parse command line 85 | while test $# -gt 0 ; do 86 | case $1 in 87 | --time-stamp | --time* | -t ) 88 | echo "$timestamp" ; exit ;; 89 | --version | -v ) 90 | echo "$version" ; exit ;; 91 | --help | --h* | -h ) 92 | echo "$usage"; exit ;; 93 | -- ) # Stop option processing 94 | shift; break ;; 95 | - ) # Use stdin as input. 96 | break ;; 97 | -* ) 98 | echo "$me: invalid option $1$help" 99 | exit 1 ;; 100 | 101 | *local*) 102 | # First pass through any local machine types. 103 | echo $1 104 | exit ;; 105 | 106 | * ) 107 | break ;; 108 | esac 109 | done 110 | 111 | case $# in 112 | 0) echo "$me: missing argument$help" >&2 113 | exit 1;; 114 | 1) ;; 115 | *) echo "$me: too many arguments$help" >&2 116 | exit 1;; 117 | esac 118 | 119 | # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). 120 | # Here we must recognize all the valid KERNEL-OS combinations. 121 | maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 122 | case $maybe_os in 123 | nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ 124 | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ 125 | kopensolaris*-gnu* | \ 126 | storm-chaos* | os2-emx* | rtmk-nova*) 127 | os=-$maybe_os 128 | basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 129 | ;; 130 | *) 131 | basic_machine=`echo $1 | sed 's/-[^-]*$//'` 132 | if [ $basic_machine != $1 ] 133 | then os=`echo $1 | sed 's/.*-/-/'` 134 | else os=; fi 135 | ;; 136 | esac 137 | 138 | ### Let's recognize common machines as not being operating systems so 139 | ### that things like config.sub decstation-3100 work. We also 140 | ### recognize some manufacturers as not being operating systems, so we 141 | ### can provide default operating systems below. 142 | case $os in 143 | -sun*os*) 144 | # Prevent following clause from handling this invalid input. 145 | ;; 146 | -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ 147 | -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ 148 | -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ 149 | -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 150 | -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 151 | -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 152 | -apple | -axis | -knuth | -cray) 153 | os= 154 | basic_machine=$1 155 | ;; 156 | -sim | -cisco | -oki | -wec | -winbond) 157 | os= 158 | basic_machine=$1 159 | ;; 160 | -scout) 161 | ;; 162 | -wrs) 163 | os=-vxworks 164 | basic_machine=$1 165 | ;; 166 | -chorusos*) 167 | os=-chorusos 168 | basic_machine=$1 169 | ;; 170 | -chorusrdb) 171 | os=-chorusrdb 172 | basic_machine=$1 173 | ;; 174 | -hiux*) 175 | os=-hiuxwe2 176 | ;; 177 | -sco6) 178 | os=-sco5v6 179 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 180 | ;; 181 | -sco5) 182 | os=-sco3.2v5 183 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 184 | ;; 185 | -sco4) 186 | os=-sco3.2v4 187 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 188 | ;; 189 | -sco3.2.[4-9]*) 190 | os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` 191 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 192 | ;; 193 | -sco3.2v[4-9]*) 194 | # Don't forget version if it is 3.2v4 or newer. 195 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 196 | ;; 197 | -sco5v6*) 198 | # Don't forget version if it is 3.2v4 or newer. 199 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 200 | ;; 201 | -sco*) 202 | os=-sco3.2v2 203 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 204 | ;; 205 | -udk*) 206 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 207 | ;; 208 | -isc) 209 | os=-isc2.2 210 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 211 | ;; 212 | -clix*) 213 | basic_machine=clipper-intergraph 214 | ;; 215 | -isc*) 216 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 217 | ;; 218 | -lynx*) 219 | os=-lynxos 220 | ;; 221 | -ptx*) 222 | basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` 223 | ;; 224 | -windowsnt*) 225 | os=`echo $os | sed -e 's/windowsnt/winnt/'` 226 | ;; 227 | -psos*) 228 | os=-psos 229 | ;; 230 | -mint | -mint[0-9]*) 231 | basic_machine=m68k-atari 232 | os=-mint 233 | ;; 234 | esac 235 | 236 | # Decode aliases for certain CPU-COMPANY combinations. 237 | case $basic_machine in 238 | # Recognize the basic CPU types without company name. 239 | # Some are omitted here because they have special meanings below. 240 | 1750a | 580 \ 241 | | a29k \ 242 | | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 243 | | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 244 | | am33_2.0 \ 245 | | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ 246 | | bfin \ 247 | | c4x | clipper \ 248 | | d10v | d30v | dlx | dsp16xx \ 249 | | fido | fr30 | frv \ 250 | | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 251 | | i370 | i860 | i960 | ia64 \ 252 | | ip2k | iq2000 \ 253 | | lm32 \ 254 | | m32c | m32r | m32rle | m68000 | m68k | m88k \ 255 | | maxq | mb | microblaze | mcore | mep | metag \ 256 | | mips | mipsbe | mipseb | mipsel | mipsle \ 257 | | mips16 \ 258 | | mips64 | mips64el \ 259 | | mips64octeon | mips64octeonel \ 260 | | mips64orion | mips64orionel \ 261 | | mips64r5900 | mips64r5900el \ 262 | | mips64vr | mips64vrel \ 263 | | mips64vr4100 | mips64vr4100el \ 264 | | mips64vr4300 | mips64vr4300el \ 265 | | mips64vr5000 | mips64vr5000el \ 266 | | mips64vr5900 | mips64vr5900el \ 267 | | mipsisa32 | mipsisa32el \ 268 | | mipsisa32r2 | mipsisa32r2el \ 269 | | mipsisa64 | mipsisa64el \ 270 | | mipsisa64r2 | mipsisa64r2el \ 271 | | mipsisa64sb1 | mipsisa64sb1el \ 272 | | mipsisa64sr71k | mipsisa64sr71kel \ 273 | | mipstx39 | mipstx39el \ 274 | | mn10200 | mn10300 \ 275 | | moxie \ 276 | | mt \ 277 | | msp430 \ 278 | | nios | nios2 \ 279 | | ns16k | ns32k \ 280 | | or32 \ 281 | | pdp10 | pdp11 | pj | pjl \ 282 | | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ 283 | | pyramid \ 284 | | score \ 285 | | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 286 | | sh64 | sh64le \ 287 | | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ 288 | | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 289 | | spu | strongarm \ 290 | | tahoe | thumb | tic4x | tic80 | tron \ 291 | | v850 | v850e \ 292 | | we32k \ 293 | | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ 294 | | z8k | z80) 295 | basic_machine=$basic_machine-unknown 296 | ;; 297 | m6811 | m68hc11 | m6812 | m68hc12) 298 | # Motorola 68HC11/12. 299 | basic_machine=$basic_machine-unknown 300 | os=-none 301 | ;; 302 | m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 303 | ;; 304 | ms1) 305 | basic_machine=mt-unknown 306 | ;; 307 | 308 | # We use `pc' rather than `unknown' 309 | # because (1) that's what they normally are, and 310 | # (2) the word "unknown" tends to confuse beginning users. 311 | i*86 | x86_64) 312 | basic_machine=$basic_machine-pc 313 | ;; 314 | # Object if more than one company name word. 315 | *-*-*) 316 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 317 | exit 1 318 | ;; 319 | # Recognize the basic CPU types with company name. 320 | 580-* \ 321 | | a29k-* \ 322 | | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 323 | | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 324 | | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ 325 | | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 326 | | avr-* | avr32-* \ 327 | | bfin-* | bs2000-* \ 328 | | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ 329 | | clipper-* | craynv-* | cydra-* \ 330 | | d10v-* | d30v-* | dlx-* \ 331 | | elxsi-* \ 332 | | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ 333 | | h8300-* | h8500-* \ 334 | | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 335 | | i*86-* | i860-* | i960-* | ia64-* \ 336 | | ip2k-* | iq2000-* \ 337 | | lm32-* \ 338 | | m32c-* | m32r-* | m32rle-* \ 339 | | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 340 | | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ 341 | | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 342 | | mips16-* \ 343 | | mips64-* | mips64el-* \ 344 | | mips64octeon-* | mips64octeonel-* \ 345 | | mips64orion-* | mips64orionel-* \ 346 | | mips64r5900-* | mips64r5900el-* \ 347 | | mips64vr-* | mips64vrel-* \ 348 | | mips64vr4100-* | mips64vr4100el-* \ 349 | | mips64vr4300-* | mips64vr4300el-* \ 350 | | mips64vr5000-* | mips64vr5000el-* \ 351 | | mips64vr5900-* | mips64vr5900el-* \ 352 | | mipsisa32-* | mipsisa32el-* \ 353 | | mipsisa32r2-* | mipsisa32r2el-* \ 354 | | mipsisa64-* | mipsisa64el-* \ 355 | | mipsisa64r2-* | mipsisa64r2el-* \ 356 | | mipsisa64sb1-* | mipsisa64sb1el-* \ 357 | | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 358 | | mipstx39-* | mipstx39el-* \ 359 | | mmix-* \ 360 | | mt-* \ 361 | | msp430-* \ 362 | | nios-* | nios2-* \ 363 | | none-* | np1-* | ns16k-* | ns32k-* \ 364 | | orion-* \ 365 | | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 366 | | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ 367 | | pyramid-* \ 368 | | romp-* | rs6000-* \ 369 | | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ 370 | | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 371 | | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 372 | | sparclite-* \ 373 | | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ 374 | | tahoe-* | thumb-* \ 375 | | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ 376 | | tron-* \ 377 | | v850-* | v850e-* | vax-* \ 378 | | we32k-* \ 379 | | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ 380 | | xstormy16-* | xtensa*-* \ 381 | | ymp-* \ 382 | | z8k-* | z80-*) 383 | ;; 384 | # Recognize the basic CPU types without company name, with glob match. 385 | xtensa*) 386 | basic_machine=$basic_machine-unknown 387 | ;; 388 | # Recognize the various machine names and aliases which stand 389 | # for a CPU type and a company and sometimes even an OS. 390 | 386bsd) 391 | basic_machine=i386-unknown 392 | os=-bsd 393 | ;; 394 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 395 | basic_machine=m68000-att 396 | ;; 397 | 3b*) 398 | basic_machine=we32k-att 399 | ;; 400 | a29khif) 401 | basic_machine=a29k-amd 402 | os=-udi 403 | ;; 404 | abacus) 405 | basic_machine=abacus-unknown 406 | ;; 407 | adobe68k) 408 | basic_machine=m68010-adobe 409 | os=-scout 410 | ;; 411 | alliant | fx80) 412 | basic_machine=fx80-alliant 413 | ;; 414 | altos | altos3068) 415 | basic_machine=m68k-altos 416 | ;; 417 | am29k) 418 | basic_machine=a29k-none 419 | os=-bsd 420 | ;; 421 | amd64) 422 | basic_machine=x86_64-pc 423 | ;; 424 | amd64-*) 425 | basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` 426 | ;; 427 | amdahl) 428 | basic_machine=580-amdahl 429 | os=-sysv 430 | ;; 431 | amiga | amiga-*) 432 | basic_machine=m68k-unknown 433 | ;; 434 | amigaos | amigados) 435 | basic_machine=m68k-unknown 436 | os=-amigaos 437 | ;; 438 | amigaunix | amix) 439 | basic_machine=m68k-unknown 440 | os=-sysv4 441 | ;; 442 | apollo68) 443 | basic_machine=m68k-apollo 444 | os=-sysv 445 | ;; 446 | apollo68bsd) 447 | basic_machine=m68k-apollo 448 | os=-bsd 449 | ;; 450 | aros) 451 | basic_machine=i386-pc 452 | os=-aros 453 | ;; 454 | aux) 455 | basic_machine=m68k-apple 456 | os=-aux 457 | ;; 458 | balance) 459 | basic_machine=ns32k-sequent 460 | os=-dynix 461 | ;; 462 | blackfin) 463 | basic_machine=bfin-unknown 464 | os=-linux 465 | ;; 466 | blackfin-*) 467 | basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` 468 | os=-linux 469 | ;; 470 | c90) 471 | basic_machine=c90-cray 472 | os=-unicos 473 | ;; 474 | cegcc) 475 | basic_machine=arm-unknown 476 | os=-cegcc 477 | ;; 478 | convex-c1) 479 | basic_machine=c1-convex 480 | os=-bsd 481 | ;; 482 | convex-c2) 483 | basic_machine=c2-convex 484 | os=-bsd 485 | ;; 486 | convex-c32) 487 | basic_machine=c32-convex 488 | os=-bsd 489 | ;; 490 | convex-c34) 491 | basic_machine=c34-convex 492 | os=-bsd 493 | ;; 494 | convex-c38) 495 | basic_machine=c38-convex 496 | os=-bsd 497 | ;; 498 | cray | j90) 499 | basic_machine=j90-cray 500 | os=-unicos 501 | ;; 502 | craynv) 503 | basic_machine=craynv-cray 504 | os=-unicosmp 505 | ;; 506 | cr16) 507 | basic_machine=cr16-unknown 508 | os=-elf 509 | ;; 510 | crds | unos) 511 | basic_machine=m68k-crds 512 | ;; 513 | crisv32 | crisv32-* | etraxfs*) 514 | basic_machine=crisv32-axis 515 | ;; 516 | cris | cris-* | etrax*) 517 | basic_machine=cris-axis 518 | ;; 519 | crx) 520 | basic_machine=crx-unknown 521 | os=-elf 522 | ;; 523 | da30 | da30-*) 524 | basic_machine=m68k-da30 525 | ;; 526 | decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 527 | basic_machine=mips-dec 528 | ;; 529 | decsystem10* | dec10*) 530 | basic_machine=pdp10-dec 531 | os=-tops10 532 | ;; 533 | decsystem20* | dec20*) 534 | basic_machine=pdp10-dec 535 | os=-tops20 536 | ;; 537 | delta | 3300 | motorola-3300 | motorola-delta \ 538 | | 3300-motorola | delta-motorola) 539 | basic_machine=m68k-motorola 540 | ;; 541 | delta88) 542 | basic_machine=m88k-motorola 543 | os=-sysv3 544 | ;; 545 | dicos) 546 | basic_machine=i686-pc 547 | os=-dicos 548 | ;; 549 | djgpp) 550 | basic_machine=i586-pc 551 | os=-msdosdjgpp 552 | ;; 553 | dpx20 | dpx20-*) 554 | basic_machine=rs6000-bull 555 | os=-bosx 556 | ;; 557 | dpx2* | dpx2*-bull) 558 | basic_machine=m68k-bull 559 | os=-sysv3 560 | ;; 561 | ebmon29k) 562 | basic_machine=a29k-amd 563 | os=-ebmon 564 | ;; 565 | elxsi) 566 | basic_machine=elxsi-elxsi 567 | os=-bsd 568 | ;; 569 | encore | umax | mmax) 570 | basic_machine=ns32k-encore 571 | ;; 572 | es1800 | OSE68k | ose68k | ose | OSE) 573 | basic_machine=m68k-ericsson 574 | os=-ose 575 | ;; 576 | fx2800) 577 | basic_machine=i860-alliant 578 | ;; 579 | genix) 580 | basic_machine=ns32k-ns 581 | ;; 582 | gmicro) 583 | basic_machine=tron-gmicro 584 | os=-sysv 585 | ;; 586 | go32) 587 | basic_machine=i386-pc 588 | os=-go32 589 | ;; 590 | h3050r* | hiux*) 591 | basic_machine=hppa1.1-hitachi 592 | os=-hiuxwe2 593 | ;; 594 | h8300hms) 595 | basic_machine=h8300-hitachi 596 | os=-hms 597 | ;; 598 | h8300xray) 599 | basic_machine=h8300-hitachi 600 | os=-xray 601 | ;; 602 | h8500hms) 603 | basic_machine=h8500-hitachi 604 | os=-hms 605 | ;; 606 | harris) 607 | basic_machine=m88k-harris 608 | os=-sysv3 609 | ;; 610 | hp300-*) 611 | basic_machine=m68k-hp 612 | ;; 613 | hp300bsd) 614 | basic_machine=m68k-hp 615 | os=-bsd 616 | ;; 617 | hp300hpux) 618 | basic_machine=m68k-hp 619 | os=-hpux 620 | ;; 621 | hp3k9[0-9][0-9] | hp9[0-9][0-9]) 622 | basic_machine=hppa1.0-hp 623 | ;; 624 | hp9k2[0-9][0-9] | hp9k31[0-9]) 625 | basic_machine=m68000-hp 626 | ;; 627 | hp9k3[2-9][0-9]) 628 | basic_machine=m68k-hp 629 | ;; 630 | hp9k6[0-9][0-9] | hp6[0-9][0-9]) 631 | basic_machine=hppa1.0-hp 632 | ;; 633 | hp9k7[0-79][0-9] | hp7[0-79][0-9]) 634 | basic_machine=hppa1.1-hp 635 | ;; 636 | hp9k78[0-9] | hp78[0-9]) 637 | # FIXME: really hppa2.0-hp 638 | basic_machine=hppa1.1-hp 639 | ;; 640 | hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 641 | # FIXME: really hppa2.0-hp 642 | basic_machine=hppa1.1-hp 643 | ;; 644 | hp9k8[0-9][13679] | hp8[0-9][13679]) 645 | basic_machine=hppa1.1-hp 646 | ;; 647 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) 648 | basic_machine=hppa1.0-hp 649 | ;; 650 | hppa-next) 651 | os=-nextstep3 652 | ;; 653 | hppaosf) 654 | basic_machine=hppa1.1-hp 655 | os=-osf 656 | ;; 657 | hppro) 658 | basic_machine=hppa1.1-hp 659 | os=-proelf 660 | ;; 661 | i370-ibm* | ibm*) 662 | basic_machine=i370-ibm 663 | ;; 664 | # I'm not sure what "Sysv32" means. Should this be sysv3.2? 665 | i*86v32) 666 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 667 | os=-sysv32 668 | ;; 669 | i*86v4*) 670 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 671 | os=-sysv4 672 | ;; 673 | i*86v) 674 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 675 | os=-sysv 676 | ;; 677 | i*86sol2) 678 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 679 | os=-solaris2 680 | ;; 681 | i386mach) 682 | basic_machine=i386-mach 683 | os=-mach 684 | ;; 685 | i386-vsta | vsta) 686 | basic_machine=i386-unknown 687 | os=-vsta 688 | ;; 689 | iris | iris4d) 690 | basic_machine=mips-sgi 691 | case $os in 692 | -irix*) 693 | ;; 694 | *) 695 | os=-irix4 696 | ;; 697 | esac 698 | ;; 699 | isi68 | isi) 700 | basic_machine=m68k-isi 701 | os=-sysv 702 | ;; 703 | m68knommu) 704 | basic_machine=m68k-unknown 705 | os=-linux 706 | ;; 707 | m68knommu-*) 708 | basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` 709 | os=-linux 710 | ;; 711 | m88k-omron*) 712 | basic_machine=m88k-omron 713 | ;; 714 | magnum | m3230) 715 | basic_machine=mips-mips 716 | os=-sysv 717 | ;; 718 | merlin) 719 | basic_machine=ns32k-utek 720 | os=-sysv 721 | ;; 722 | mingw32) 723 | basic_machine=i386-pc 724 | os=-mingw32 725 | ;; 726 | mingw32ce) 727 | basic_machine=arm-unknown 728 | os=-mingw32ce 729 | ;; 730 | miniframe) 731 | basic_machine=m68000-convergent 732 | ;; 733 | *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) 734 | basic_machine=m68k-atari 735 | os=-mint 736 | ;; 737 | mips3*-*) 738 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` 739 | ;; 740 | mips3*) 741 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 742 | ;; 743 | monitor) 744 | basic_machine=m68k-rom68k 745 | os=-coff 746 | ;; 747 | morphos) 748 | basic_machine=powerpc-unknown 749 | os=-morphos 750 | ;; 751 | msdos) 752 | basic_machine=i386-pc 753 | os=-msdos 754 | ;; 755 | ms1-*) 756 | basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` 757 | ;; 758 | mvs) 759 | basic_machine=i370-ibm 760 | os=-mvs 761 | ;; 762 | ncr3000) 763 | basic_machine=i486-ncr 764 | os=-sysv4 765 | ;; 766 | netbsd386) 767 | basic_machine=i386-unknown 768 | os=-netbsd 769 | ;; 770 | netwinder) 771 | basic_machine=armv4l-rebel 772 | os=-linux 773 | ;; 774 | news | news700 | news800 | news900) 775 | basic_machine=m68k-sony 776 | os=-newsos 777 | ;; 778 | news1000) 779 | basic_machine=m68030-sony 780 | os=-newsos 781 | ;; 782 | news-3600 | risc-news) 783 | basic_machine=mips-sony 784 | os=-newsos 785 | ;; 786 | necv70) 787 | basic_machine=v70-nec 788 | os=-sysv 789 | ;; 790 | next | m*-next ) 791 | basic_machine=m68k-next 792 | case $os in 793 | -nextstep* ) 794 | ;; 795 | -ns2*) 796 | os=-nextstep2 797 | ;; 798 | *) 799 | os=-nextstep3 800 | ;; 801 | esac 802 | ;; 803 | nh3000) 804 | basic_machine=m68k-harris 805 | os=-cxux 806 | ;; 807 | nh[45]000) 808 | basic_machine=m88k-harris 809 | os=-cxux 810 | ;; 811 | nindy960) 812 | basic_machine=i960-intel 813 | os=-nindy 814 | ;; 815 | mon960) 816 | basic_machine=i960-intel 817 | os=-mon960 818 | ;; 819 | nonstopux) 820 | basic_machine=mips-compaq 821 | os=-nonstopux 822 | ;; 823 | np1) 824 | basic_machine=np1-gould 825 | ;; 826 | nsr-tandem) 827 | basic_machine=nsr-tandem 828 | ;; 829 | op50n-* | op60c-*) 830 | basic_machine=hppa1.1-oki 831 | os=-proelf 832 | ;; 833 | openrisc | openrisc-*) 834 | basic_machine=or32-unknown 835 | ;; 836 | os400) 837 | basic_machine=powerpc-ibm 838 | os=-os400 839 | ;; 840 | OSE68000 | ose68000) 841 | basic_machine=m68000-ericsson 842 | os=-ose 843 | ;; 844 | os68k) 845 | basic_machine=m68k-none 846 | os=-os68k 847 | ;; 848 | pa-hitachi) 849 | basic_machine=hppa1.1-hitachi 850 | os=-hiuxwe2 851 | ;; 852 | paragon) 853 | basic_machine=i860-intel 854 | os=-osf 855 | ;; 856 | parisc) 857 | basic_machine=hppa-unknown 858 | os=-linux 859 | ;; 860 | parisc-*) 861 | basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` 862 | os=-linux 863 | ;; 864 | pbd) 865 | basic_machine=sparc-tti 866 | ;; 867 | pbb) 868 | basic_machine=m68k-tti 869 | ;; 870 | pc532 | pc532-*) 871 | basic_machine=ns32k-pc532 872 | ;; 873 | pc98) 874 | basic_machine=i386-pc 875 | ;; 876 | pc98-*) 877 | basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` 878 | ;; 879 | pentium | p5 | k5 | k6 | nexgen | viac3) 880 | basic_machine=i586-pc 881 | ;; 882 | pentiumpro | p6 | 6x86 | athlon | athlon_*) 883 | basic_machine=i686-pc 884 | ;; 885 | pentiumii | pentium2 | pentiumiii | pentium3) 886 | basic_machine=i686-pc 887 | ;; 888 | pentium4) 889 | basic_machine=i786-pc 890 | ;; 891 | pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 892 | basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` 893 | ;; 894 | pentiumpro-* | p6-* | 6x86-* | athlon-*) 895 | basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 896 | ;; 897 | pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 898 | basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 899 | ;; 900 | pentium4-*) 901 | basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` 902 | ;; 903 | pn) 904 | basic_machine=pn-gould 905 | ;; 906 | power) basic_machine=power-ibm 907 | ;; 908 | ppc) basic_machine=powerpc-unknown 909 | ;; 910 | ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 911 | ;; 912 | ppcle | powerpclittle | ppc-le | powerpc-little) 913 | basic_machine=powerpcle-unknown 914 | ;; 915 | ppcle-* | powerpclittle-*) 916 | basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` 917 | ;; 918 | ppc64) basic_machine=powerpc64-unknown 919 | ;; 920 | ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` 921 | ;; 922 | ppc64le | powerpc64little | ppc64-le | powerpc64-little) 923 | basic_machine=powerpc64le-unknown 924 | ;; 925 | ppc64le-* | powerpc64little-*) 926 | basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` 927 | ;; 928 | ps2) 929 | basic_machine=i386-ibm 930 | ;; 931 | pw32) 932 | basic_machine=i586-unknown 933 | os=-pw32 934 | ;; 935 | rdos) 936 | basic_machine=i386-pc 937 | os=-rdos 938 | ;; 939 | rom68k) 940 | basic_machine=m68k-rom68k 941 | os=-coff 942 | ;; 943 | rm[46]00) 944 | basic_machine=mips-siemens 945 | ;; 946 | rtpc | rtpc-*) 947 | basic_machine=romp-ibm 948 | ;; 949 | s390 | s390-*) 950 | basic_machine=s390-ibm 951 | ;; 952 | s390x | s390x-*) 953 | basic_machine=s390x-ibm 954 | ;; 955 | sa29200) 956 | basic_machine=a29k-amd 957 | os=-udi 958 | ;; 959 | sb1) 960 | basic_machine=mipsisa64sb1-unknown 961 | ;; 962 | sb1el) 963 | basic_machine=mipsisa64sb1el-unknown 964 | ;; 965 | sde) 966 | basic_machine=mipsisa32-sde 967 | os=-elf 968 | ;; 969 | sei) 970 | basic_machine=mips-sei 971 | os=-seiux 972 | ;; 973 | sequent) 974 | basic_machine=i386-sequent 975 | ;; 976 | sh) 977 | basic_machine=sh-hitachi 978 | os=-hms 979 | ;; 980 | sh5el) 981 | basic_machine=sh5le-unknown 982 | ;; 983 | sh64) 984 | basic_machine=sh64-unknown 985 | ;; 986 | sparclite-wrs | simso-wrs) 987 | basic_machine=sparclite-wrs 988 | os=-vxworks 989 | ;; 990 | sps7) 991 | basic_machine=m68k-bull 992 | os=-sysv2 993 | ;; 994 | spur) 995 | basic_machine=spur-unknown 996 | ;; 997 | st2000) 998 | basic_machine=m68k-tandem 999 | ;; 1000 | stratus) 1001 | basic_machine=i860-stratus 1002 | os=-sysv4 1003 | ;; 1004 | sun2) 1005 | basic_machine=m68000-sun 1006 | ;; 1007 | sun2os3) 1008 | basic_machine=m68000-sun 1009 | os=-sunos3 1010 | ;; 1011 | sun2os4) 1012 | basic_machine=m68000-sun 1013 | os=-sunos4 1014 | ;; 1015 | sun3os3) 1016 | basic_machine=m68k-sun 1017 | os=-sunos3 1018 | ;; 1019 | sun3os4) 1020 | basic_machine=m68k-sun 1021 | os=-sunos4 1022 | ;; 1023 | sun4os3) 1024 | basic_machine=sparc-sun 1025 | os=-sunos3 1026 | ;; 1027 | sun4os4) 1028 | basic_machine=sparc-sun 1029 | os=-sunos4 1030 | ;; 1031 | sun4sol2) 1032 | basic_machine=sparc-sun 1033 | os=-solaris2 1034 | ;; 1035 | sun3 | sun3-*) 1036 | basic_machine=m68k-sun 1037 | ;; 1038 | sun4) 1039 | basic_machine=sparc-sun 1040 | ;; 1041 | sun386 | sun386i | roadrunner) 1042 | basic_machine=i386-sun 1043 | ;; 1044 | sv1) 1045 | basic_machine=sv1-cray 1046 | os=-unicos 1047 | ;; 1048 | symmetry) 1049 | basic_machine=i386-sequent 1050 | os=-dynix 1051 | ;; 1052 | t3e) 1053 | basic_machine=alphaev5-cray 1054 | os=-unicos 1055 | ;; 1056 | t90) 1057 | basic_machine=t90-cray 1058 | os=-unicos 1059 | ;; 1060 | tic54x | c54x*) 1061 | basic_machine=tic54x-unknown 1062 | os=-coff 1063 | ;; 1064 | tic55x | c55x*) 1065 | basic_machine=tic55x-unknown 1066 | os=-coff 1067 | ;; 1068 | tic6x | c6x*) 1069 | basic_machine=tic6x-unknown 1070 | os=-coff 1071 | ;; 1072 | tile*) 1073 | basic_machine=tile-unknown 1074 | os=-linux-gnu 1075 | ;; 1076 | tx39) 1077 | basic_machine=mipstx39-unknown 1078 | ;; 1079 | tx39el) 1080 | basic_machine=mipstx39el-unknown 1081 | ;; 1082 | toad1) 1083 | basic_machine=pdp10-xkl 1084 | os=-tops20 1085 | ;; 1086 | tower | tower-32) 1087 | basic_machine=m68k-ncr 1088 | ;; 1089 | tpf) 1090 | basic_machine=s390x-ibm 1091 | os=-tpf 1092 | ;; 1093 | udi29k) 1094 | basic_machine=a29k-amd 1095 | os=-udi 1096 | ;; 1097 | ultra3) 1098 | basic_machine=a29k-nyu 1099 | os=-sym1 1100 | ;; 1101 | v810 | necv810) 1102 | basic_machine=v810-nec 1103 | os=-none 1104 | ;; 1105 | vaxv) 1106 | basic_machine=vax-dec 1107 | os=-sysv 1108 | ;; 1109 | vms) 1110 | basic_machine=vax-dec 1111 | os=-vms 1112 | ;; 1113 | vpp*|vx|vx-*) 1114 | basic_machine=f301-fujitsu 1115 | ;; 1116 | vxworks960) 1117 | basic_machine=i960-wrs 1118 | os=-vxworks 1119 | ;; 1120 | vxworks68) 1121 | basic_machine=m68k-wrs 1122 | os=-vxworks 1123 | ;; 1124 | vxworks29k) 1125 | basic_machine=a29k-wrs 1126 | os=-vxworks 1127 | ;; 1128 | w65*) 1129 | basic_machine=w65-wdc 1130 | os=-none 1131 | ;; 1132 | w89k-*) 1133 | basic_machine=hppa1.1-winbond 1134 | os=-proelf 1135 | ;; 1136 | xbox) 1137 | basic_machine=i686-pc 1138 | os=-mingw32 1139 | ;; 1140 | xps | xps100) 1141 | basic_machine=xps100-honeywell 1142 | ;; 1143 | ymp) 1144 | basic_machine=ymp-cray 1145 | os=-unicos 1146 | ;; 1147 | z8k-*-coff) 1148 | basic_machine=z8k-unknown 1149 | os=-sim 1150 | ;; 1151 | z80-*-coff) 1152 | basic_machine=z80-unknown 1153 | os=-sim 1154 | ;; 1155 | none) 1156 | basic_machine=none-none 1157 | os=-none 1158 | ;; 1159 | 1160 | # Here we handle the default manufacturer of certain CPU types. It is in 1161 | # some cases the only manufacturer, in others, it is the most popular. 1162 | w89k) 1163 | basic_machine=hppa1.1-winbond 1164 | ;; 1165 | op50n) 1166 | basic_machine=hppa1.1-oki 1167 | ;; 1168 | op60c) 1169 | basic_machine=hppa1.1-oki 1170 | ;; 1171 | romp) 1172 | basic_machine=romp-ibm 1173 | ;; 1174 | mmix) 1175 | basic_machine=mmix-knuth 1176 | ;; 1177 | rs6000) 1178 | basic_machine=rs6000-ibm 1179 | ;; 1180 | vax) 1181 | basic_machine=vax-dec 1182 | ;; 1183 | pdp10) 1184 | # there are many clones, so DEC is not a safe bet 1185 | basic_machine=pdp10-unknown 1186 | ;; 1187 | pdp11) 1188 | basic_machine=pdp11-dec 1189 | ;; 1190 | we32k) 1191 | basic_machine=we32k-att 1192 | ;; 1193 | sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) 1194 | basic_machine=sh-unknown 1195 | ;; 1196 | sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 1197 | basic_machine=sparc-sun 1198 | ;; 1199 | cydra) 1200 | basic_machine=cydra-cydrome 1201 | ;; 1202 | orion) 1203 | basic_machine=orion-highlevel 1204 | ;; 1205 | orion105) 1206 | basic_machine=clipper-highlevel 1207 | ;; 1208 | mac | mpw | mac-mpw) 1209 | basic_machine=m68k-apple 1210 | ;; 1211 | pmac | pmac-mpw) 1212 | basic_machine=powerpc-apple 1213 | ;; 1214 | *-unknown) 1215 | # Make sure to match an already-canonicalized machine name. 1216 | ;; 1217 | *) 1218 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 1219 | exit 1 1220 | ;; 1221 | esac 1222 | 1223 | # Here we canonicalize certain aliases for manufacturers. 1224 | case $basic_machine in 1225 | *-digital*) 1226 | basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` 1227 | ;; 1228 | *-commodore*) 1229 | basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` 1230 | ;; 1231 | *) 1232 | ;; 1233 | esac 1234 | 1235 | # Decode manufacturer-specific aliases for certain operating systems. 1236 | 1237 | if [ x"$os" != x"" ] 1238 | then 1239 | case $os in 1240 | # First match some system type aliases 1241 | # that might get confused with valid system types. 1242 | # -solaris* is a basic system type, with this one exception. 1243 | -solaris1 | -solaris1.*) 1244 | os=`echo $os | sed -e 's|solaris1|sunos4|'` 1245 | ;; 1246 | -solaris) 1247 | os=-solaris2 1248 | ;; 1249 | -svr4*) 1250 | os=-sysv4 1251 | ;; 1252 | -unixware*) 1253 | os=-sysv4.2uw 1254 | ;; 1255 | -gnu/linux*) 1256 | os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` 1257 | ;; 1258 | # First accept the basic system types. 1259 | # The portable systems comes first. 1260 | # Each alternative MUST END IN A *, to match a version number. 1261 | # -sysv* is not here because it comes later, after sysvr4. 1262 | -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 1263 | | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ 1264 | | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ 1265 | | -kopensolaris* \ 1266 | | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 1267 | | -aos* | -aros* \ 1268 | | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 1269 | | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 1270 | | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ 1271 | | -openbsd* | -solidbsd* \ 1272 | | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 1273 | | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 1274 | | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 1275 | | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 1276 | | -chorusos* | -chorusrdb* | -cegcc* \ 1277 | | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 1278 | | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ 1279 | | -uxpv* | -beos* | -mpeix* | -udk* \ 1280 | | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 1281 | | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 1282 | | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 1283 | | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 1284 | | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 1285 | | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 1286 | | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) 1287 | # Remember, each alternative MUST END IN *, to match a version number. 1288 | ;; 1289 | -qnx*) 1290 | case $basic_machine in 1291 | x86-* | i*86-*) 1292 | ;; 1293 | *) 1294 | os=-nto$os 1295 | ;; 1296 | esac 1297 | ;; 1298 | -nto-qnx*) 1299 | ;; 1300 | -nto*) 1301 | os=`echo $os | sed -e 's|nto|nto-qnx|'` 1302 | ;; 1303 | -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 1304 | | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ 1305 | | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 1306 | ;; 1307 | -mac*) 1308 | os=`echo $os | sed -e 's|mac|macos|'` 1309 | ;; 1310 | -linux-dietlibc) 1311 | os=-linux-dietlibc 1312 | ;; 1313 | -linux*) 1314 | os=`echo $os | sed -e 's|linux|linux-gnu|'` 1315 | ;; 1316 | -sunos5*) 1317 | os=`echo $os | sed -e 's|sunos5|solaris2|'` 1318 | ;; 1319 | -sunos6*) 1320 | os=`echo $os | sed -e 's|sunos6|solaris3|'` 1321 | ;; 1322 | -opened*) 1323 | os=-openedition 1324 | ;; 1325 | -os400*) 1326 | os=-os400 1327 | ;; 1328 | -wince*) 1329 | os=-wince 1330 | ;; 1331 | -osfrose*) 1332 | os=-osfrose 1333 | ;; 1334 | -osf*) 1335 | os=-osf 1336 | ;; 1337 | -utek*) 1338 | os=-bsd 1339 | ;; 1340 | -dynix*) 1341 | os=-bsd 1342 | ;; 1343 | -acis*) 1344 | os=-aos 1345 | ;; 1346 | -atheos*) 1347 | os=-atheos 1348 | ;; 1349 | -syllable*) 1350 | os=-syllable 1351 | ;; 1352 | -386bsd) 1353 | os=-bsd 1354 | ;; 1355 | -ctix* | -uts*) 1356 | os=-sysv 1357 | ;; 1358 | -nova*) 1359 | os=-rtmk-nova 1360 | ;; 1361 | -ns2 ) 1362 | os=-nextstep2 1363 | ;; 1364 | -nsk*) 1365 | os=-nsk 1366 | ;; 1367 | # Preserve the version number of sinix5. 1368 | -sinix5.*) 1369 | os=`echo $os | sed -e 's|sinix|sysv|'` 1370 | ;; 1371 | -sinix*) 1372 | os=-sysv4 1373 | ;; 1374 | -tpf*) 1375 | os=-tpf 1376 | ;; 1377 | -triton*) 1378 | os=-sysv3 1379 | ;; 1380 | -oss*) 1381 | os=-sysv3 1382 | ;; 1383 | -svr4) 1384 | os=-sysv4 1385 | ;; 1386 | -svr3) 1387 | os=-sysv3 1388 | ;; 1389 | -sysvr4) 1390 | os=-sysv4 1391 | ;; 1392 | # This must come after -sysvr4. 1393 | -sysv*) 1394 | ;; 1395 | -ose*) 1396 | os=-ose 1397 | ;; 1398 | -es1800*) 1399 | os=-ose 1400 | ;; 1401 | -xenix) 1402 | os=-xenix 1403 | ;; 1404 | -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1405 | os=-mint 1406 | ;; 1407 | -aros*) 1408 | os=-aros 1409 | ;; 1410 | -kaos*) 1411 | os=-kaos 1412 | ;; 1413 | -zvmoe) 1414 | os=-zvmoe 1415 | ;; 1416 | -dicos*) 1417 | os=-dicos 1418 | ;; 1419 | -none) 1420 | ;; 1421 | *) 1422 | # Get rid of the `-' at the beginning of $os. 1423 | os=`echo $os | sed 's/[^-]*-//'` 1424 | echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 1425 | exit 1 1426 | ;; 1427 | esac 1428 | else 1429 | 1430 | # Here we handle the default operating systems that come with various machines. 1431 | # The value should be what the vendor currently ships out the door with their 1432 | # machine or put another way, the most popular os provided with the machine. 1433 | 1434 | # Note that if you're going to try to match "-MANUFACTURER" here (say, 1435 | # "-sun"), then you have to tell the case statement up towards the top 1436 | # that MANUFACTURER isn't an operating system. Otherwise, code above 1437 | # will signal an error saying that MANUFACTURER isn't an operating 1438 | # system, and we'll never get to this point. 1439 | 1440 | case $basic_machine in 1441 | score-*) 1442 | os=-elf 1443 | ;; 1444 | spu-*) 1445 | os=-elf 1446 | ;; 1447 | *-acorn) 1448 | os=-riscix1.2 1449 | ;; 1450 | arm*-rebel) 1451 | os=-linux 1452 | ;; 1453 | arm*-semi) 1454 | os=-aout 1455 | ;; 1456 | c4x-* | tic4x-*) 1457 | os=-coff 1458 | ;; 1459 | # This must come before the *-dec entry. 1460 | pdp10-*) 1461 | os=-tops20 1462 | ;; 1463 | pdp11-*) 1464 | os=-none 1465 | ;; 1466 | *-dec | vax-*) 1467 | os=-ultrix4.2 1468 | ;; 1469 | m68*-apollo) 1470 | os=-domain 1471 | ;; 1472 | i386-sun) 1473 | os=-sunos4.0.2 1474 | ;; 1475 | m68000-sun) 1476 | os=-sunos3 1477 | # This also exists in the configure program, but was not the 1478 | # default. 1479 | # os=-sunos4 1480 | ;; 1481 | m68*-cisco) 1482 | os=-aout 1483 | ;; 1484 | mep-*) 1485 | os=-elf 1486 | ;; 1487 | mips*-cisco) 1488 | os=-elf 1489 | ;; 1490 | mips*-*) 1491 | os=-elf 1492 | ;; 1493 | or32-*) 1494 | os=-coff 1495 | ;; 1496 | *-tti) # must be before sparc entry or we get the wrong os. 1497 | os=-sysv3 1498 | ;; 1499 | sparc-* | *-sun) 1500 | os=-sunos4.1.1 1501 | ;; 1502 | *-be) 1503 | os=-beos 1504 | ;; 1505 | *-haiku) 1506 | os=-haiku 1507 | ;; 1508 | *-ibm) 1509 | os=-aix 1510 | ;; 1511 | *-knuth) 1512 | os=-mmixware 1513 | ;; 1514 | *-wec) 1515 | os=-proelf 1516 | ;; 1517 | *-winbond) 1518 | os=-proelf 1519 | ;; 1520 | *-oki) 1521 | os=-proelf 1522 | ;; 1523 | *-hp) 1524 | os=-hpux 1525 | ;; 1526 | *-hitachi) 1527 | os=-hiux 1528 | ;; 1529 | i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) 1530 | os=-sysv 1531 | ;; 1532 | *-cbm) 1533 | os=-amigaos 1534 | ;; 1535 | *-dg) 1536 | os=-dgux 1537 | ;; 1538 | *-dolphin) 1539 | os=-sysv3 1540 | ;; 1541 | m68k-ccur) 1542 | os=-rtu 1543 | ;; 1544 | m88k-omron*) 1545 | os=-luna 1546 | ;; 1547 | *-next ) 1548 | os=-nextstep 1549 | ;; 1550 | *-sequent) 1551 | os=-ptx 1552 | ;; 1553 | *-crds) 1554 | os=-unos 1555 | ;; 1556 | *-ns) 1557 | os=-genix 1558 | ;; 1559 | i370-*) 1560 | os=-mvs 1561 | ;; 1562 | *-next) 1563 | os=-nextstep3 1564 | ;; 1565 | *-gould) 1566 | os=-sysv 1567 | ;; 1568 | *-highlevel) 1569 | os=-bsd 1570 | ;; 1571 | *-encore) 1572 | os=-bsd 1573 | ;; 1574 | *-sgi) 1575 | os=-irix 1576 | ;; 1577 | *-siemens) 1578 | os=-sysv4 1579 | ;; 1580 | *-masscomp) 1581 | os=-rtu 1582 | ;; 1583 | f30[01]-fujitsu | f700-fujitsu) 1584 | os=-uxpv 1585 | ;; 1586 | *-rom68k) 1587 | os=-coff 1588 | ;; 1589 | *-*bug) 1590 | os=-coff 1591 | ;; 1592 | *-apple) 1593 | os=-macos 1594 | ;; 1595 | *-atari*) 1596 | os=-mint 1597 | ;; 1598 | *) 1599 | os=-none 1600 | ;; 1601 | esac 1602 | fi 1603 | 1604 | # Here we handle the case where we know the os, and the CPU type, but not the 1605 | # manufacturer. We pick the logical manufacturer. 1606 | vendor=unknown 1607 | case $basic_machine in 1608 | *-unknown) 1609 | case $os in 1610 | -riscix*) 1611 | vendor=acorn 1612 | ;; 1613 | -sunos*) 1614 | vendor=sun 1615 | ;; 1616 | -aix*) 1617 | vendor=ibm 1618 | ;; 1619 | -beos*) 1620 | vendor=be 1621 | ;; 1622 | -hpux*) 1623 | vendor=hp 1624 | ;; 1625 | -mpeix*) 1626 | vendor=hp 1627 | ;; 1628 | -hiux*) 1629 | vendor=hitachi 1630 | ;; 1631 | -unos*) 1632 | vendor=crds 1633 | ;; 1634 | -dgux*) 1635 | vendor=dg 1636 | ;; 1637 | -luna*) 1638 | vendor=omron 1639 | ;; 1640 | -genix*) 1641 | vendor=ns 1642 | ;; 1643 | -mvs* | -opened*) 1644 | vendor=ibm 1645 | ;; 1646 | -os400*) 1647 | vendor=ibm 1648 | ;; 1649 | -ptx*) 1650 | vendor=sequent 1651 | ;; 1652 | -tpf*) 1653 | vendor=ibm 1654 | ;; 1655 | -vxsim* | -vxworks* | -windiss*) 1656 | vendor=wrs 1657 | ;; 1658 | -aux*) 1659 | vendor=apple 1660 | ;; 1661 | -hms*) 1662 | vendor=hitachi 1663 | ;; 1664 | -mpw* | -macos*) 1665 | vendor=apple 1666 | ;; 1667 | -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1668 | vendor=atari 1669 | ;; 1670 | -vos*) 1671 | vendor=stratus 1672 | ;; 1673 | esac 1674 | basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` 1675 | ;; 1676 | esac 1677 | 1678 | echo $basic_machine$os 1679 | exit 1680 | 1681 | # Local variables: 1682 | # eval: (add-hook 'write-file-hooks 'time-stamp) 1683 | # time-stamp-start: "timestamp='" 1684 | # time-stamp-format: "%:y-%02m-%02d" 1685 | # time-stamp-end: "'" 1686 | # End: 1687 | -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | # Process this file with autoconf to produce a configure script. 2 | 3 | AC_PREREQ(2.61) 4 | AC_INIT([xmount], [0.5.0], [bugs@pinguin.lu]) 5 | AM_INIT_AUTOMAKE(@PACKAGE_NAME@, @PACKAGE_VERSION@) 6 | AC_CONFIG_SRCDIR([xmount.c]) 7 | AC_CONFIG_HEADER([config.h]) 8 | 9 | # Checks for programs. 10 | AC_PROG_CC 11 | AM_PROG_CC_C_O 12 | 13 | # Checks for libraries. 14 | ##AC_CHECK_LIB([fuse],[fuse_main],,AC_MSG_ERROR([No FUSE library found! Get it from http://fuse.sourceforge.net/])) 15 | #AC_CHECK_LIB([crypto],[SHA1_Init],,AC_MSG_ERROR([No CRYPTO library found! Get it from http://www.openssl.org/])) 16 | AC_CHECK_LIB([ewf],[libewf_handle_open],,AC_MSG_WARN([No EWF library found! EWF input support will be disabled.])) 17 | AC_CHECK_LIB([afflib],[af_open],,AC_MSG_WARN([No AFF library found! AFF input support will be disabled.])) 18 | 19 | # Checks for header files. 20 | AC_CHECK_HEADER([stdio.h],,AC_MSG_ERROR([No stdio.h header file found!])) 21 | AC_CHECK_HEADER([string.h],,AC_MSG_ERROR([No string.h header file found!])) 22 | AC_CHECK_HEADER([fcntl.h],,AC_MSG_ERROR([No fcntl.h header file found!])) 23 | AC_CHECK_HEADER([errno.h],,AC_MSG_ERROR([No errno.h header file found!])) 24 | #AC_CHECK_HEADER([inttypes.h],,AC_MSG_ERROR([No inttypes.h header file found!])) 25 | AC_CHECK_HEADER([stdint.h],,AC_MSG_ERROR([No stdint.h header file found!])) 26 | AC_CHECK_HEADER([unistd.h],,AC_MSG_ERROR([No unistd.h header file found!])) 27 | AC_CHECK_HEADER([sys/ioctl.h],,AC_MSG_ERROR([No sys/ioctl.h header file found!])) 28 | AC_CHECK_HEADER([linux/fs.h],,AC_MSG_WARN([No linux/fs.h header file found! If not building on Linux this can be ignored.])) 29 | AC_CHECK_HEADER([pthread.h],,AC_MSG_ERROR([No pthread.h header file found!])) 30 | AC_CHECK_HEADER([time.h],,AC_MSG_ERROR([No time.h header file found!])) 31 | AC_CHECK_HEADER([byteswap.h],,AC_MSG_WARN([No byteswap.h header file found! If not building on Linux this can be ignored.])) 32 | AC_CHECK_HEADER([endian.h],,AC_MSG_WARN([No endian.h header file found! If not building on Linux this can be ignored.])) 33 | ##AC_CHECK_HEADER([fuse/fuse.h],,AC_MSG_WARN([No fuse.h header file found! This could be a false positive!])) 34 | PKG_CHECK_MODULES([fuse],[fuse]) 35 | AC_CHECK_HEADER([libewf.h],,AC_MSG_WARN([No libewf.h header file found! EWF input support will be disabled.])) 36 | AC_CHECK_HEADER([afflib/afflib.h],,AC_MSG_WARN([No afflib.h header file found! AFF input support will be disabled.])) 37 | 38 | # Checks for typedefs, structures, and compiler characteristics. 39 | AC_C_CONST 40 | AC_TYPE_INT64_T 41 | AC_TYPE_OFF_T 42 | AC_TYPE_SIZE_T 43 | AC_TYPE_SSIZE_T 44 | AC_TYPE_UINT16_T 45 | AC_TYPE_UINT32_T 46 | AC_TYPE_UINT64_T 47 | AC_TYPE_UINT8_T 48 | 49 | # Checks for library functions. 50 | AC_FUNC_FSEEKO 51 | AC_PROG_GCC_TRADITIONAL 52 | AC_FUNC_MALLOC 53 | AC_FUNC_REALLOC 54 | AC_FUNC_VPRINTF 55 | AC_CHECK_FUNCS([memset strrchr]) 56 | 57 | AC_CONFIG_FILES([Makefile]) 58 | AC_OUTPUT 59 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | xmount (0.5.0-3) unstable; urgency=low 2 | 3 | * [cc92503] Adjust configure* for new libewf version 20130416-2 4 | * [4d80734] Bump Standards-Version to 3.9.4 5 | * [c725434] Add libbfio-dev to Build-Depends 6 | 7 | -- Michael Prokop Mon, 22 Jul 2013 14:07:06 +0200 8 | 9 | xmount (0.5.0-2) unstable; urgency=low 10 | 11 | * [3d6c4cd] Switch to debhelper7 minimal style and adjust 12 | Build-Depends and compat version accordingly 13 | * [5402096] Use Architecture: linux-any due to linux/fs.h being 14 | linux-only. Thanks to Ulrich Dangel + Axel Beckert for 15 | help in verification 16 | 17 | -- Michael Prokop Tue, 12 Jun 2012 00:24:19 +0200 18 | 19 | xmount (0.5.0-1) unstable; urgency=low 20 | 21 | * [1db6447] Merging upstream version 0.5.0 22 | * [200b105] Bump Standards-Version to 3.9.3. 23 | * [bfe7926] Drop duplicated libfuse-dev Build-Depends 24 | * [b66fd49] Update package description to match latest upstream 25 | development 26 | * [8c947ea] Transfer copyright file into dep5 format 27 | * [0038ca1] Add build-arch/build-indep targets 28 | * [da5bc8c] Call autoreconf before configure 29 | 30 | -- Michael Prokop Mon, 11 Jun 2012 20:13:42 +0200 31 | 32 | xmount (0.4.5-1) unstable; urgency=low 33 | 34 | * [5ec3492] Merging upstream version 0.4.5. 35 | * [feac9cb] Bump Standards-Version to 3.9.2. 36 | * [eb93b4a] Add libafflib-dev to Build-Depends. 37 | * [e44de3b] Add pkg-config to Build-Depends. 38 | * [3c16a7f] Add libfuse-dev to Build-Depends. 39 | 40 | -- Michael Prokop Fri, 24 Jun 2011 23:42:33 +0200 41 | 42 | xmount (0.4.4-1) unstable; urgency=low 43 | 44 | * [7c86bed] Merge new upstream version 0.4.4. 45 | * [6a5c49e] Bump Standards-Version to 3.9.1. 46 | * [7e1ac4b] Add libgnutls-dev to Build-Depends. 47 | 48 | -- Michael Prokop Wed, 16 Feb 2011 15:11:51 +0100 49 | 50 | xmount (0.3.3-1) unstable; urgency=low 51 | 52 | * New upstream version 0.3.3 (being a bugfix release addressing the 53 | "fopen64 implicitly converted to pointer" issue). [Closes: #542234] 54 | Thanks to Dann Frazier for the bugreport. 55 | * Bump Standard-Version to 3.8.3 (no further changes). 56 | 57 | -- Michael Prokop Wed, 19 Aug 2009 01:27:51 +0200 58 | 59 | xmount (0.3.2-1) unstable; urgency=low 60 | 61 | * New upstream version 0.3.2. 62 | * Slightly adjust package long description and copyright file. 63 | 64 | -- Michael Prokop Tue, 28 Jul 2009 11:13:04 +0200 65 | 66 | xmount (0.3.1-1) unstable; urgency=low 67 | 68 | * Initial release. [Closes: #536493] 69 | * Packaging based on work by upstream author, 70 | Gillen Daniel . 71 | 72 | -- Michael Prokop Fri, 10 Jul 2009 12:25:11 +0200 73 | 74 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 7 2 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: xmount 2 | Section: admin 3 | Priority: optional 4 | Maintainer: Michael Prokop 5 | Build-Depends: debhelper (>= 8), automake (>= 1.10), autoconf (>= 2.13), libfuse-dev (>= 2.7.1-2~bpo40+1), libewf-dev (>= 20080501), libgnutls-dev, libafflib-dev, pkg-config, libbfio-dev 6 | Standards-Version: 3.9.4 7 | Homepage: https://www.pinguin.lu/ 8 | Vcs-git: git://git.grml.org/xmount.git 9 | Vcs-Browser: http://git.grml.org/?p=xmount.git 10 | 11 | Package: xmount 12 | Architecture: linux-any 13 | Depends: ${shlibs:Depends}, ${misc:Depends} 14 | Description: tool to crossmount between multiple input and output harddisk images 15 | xmount allows you to convert on-the-fly between multiple input 16 | and output harddisk image types. xmount creates a virtual file 17 | system using FUSE (Filesystem in Userspace) that contains a 18 | virtual representation of the input harddisk image. The virtual 19 | representation can be in raw DD, VirtualBox's virtual disk file 20 | (VDI) format, Microsoft's Virtual Hard Disk Image format (VHD) 21 | or in VMware's VMDK format. Input harddisk images can be raw DD 22 | or EWF (Expert Witness Compression Format) or AFF (Advanced 23 | Forensic Format) files. In addition, xmount also supports 24 | virtual write access to the output files that is redirected to a 25 | cache file. This makes it for example possible to boot acquired 26 | harddisk images using QEMU, KVM, VirtualBox, VMware or alike. 27 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: xmount 3 | Upstream-Contact: Gillen Daniel 4 | Source: https://www.pinguin.lu/ 5 | 6 | Files: * 7 | Copyright: 2008-2012 Gillen Daniel 8 | License: GPL-3+ 9 | The full text of the GPL version 3 is distributed in 10 | /usr/share/common-licenses/GPL-3 on Debian systems. 11 | 12 | Files: md5.c md5.h 13 | Copyright: 1999 Aladdin Enterprises 14 | License: Zlib 15 | Copyright (C) 1999 Aladdin Enterprises. All rights reserved. 16 | . 17 | This software is provided 'as-is', without any express or implied 18 | warranty. In no event will the authors be held liable for any damages 19 | arising from the use of this software. 20 | . 21 | Permission is granted to anyone to use this software for any purpose, 22 | including commercial applications, and to alter it and redistribute it 23 | freely, subject to the following restrictions: 24 | . 25 | 1. The origin of this software must not be misrepresented; you must not 26 | claim that you wrote the original software. If you use this software 27 | in a product, an acknowledgment in the product documentation would be 28 | appreciated but is not required. 29 | 2. Altered source versions must be plainly marked as such, and must not be 30 | misrepresented as being the original software. 31 | 3. This notice may not be removed or altered from any source distribution. 32 | 33 | Files: debian/* 34 | Copyright: 2009-2012 Michael Prokop 35 | License: GPL-3+ 36 | The full text of the GPL version 3 is distributed in 37 | /usr/share/common-licenses/GPL-3 on Debian systems. 38 | -------------------------------------------------------------------------------- /debian/docs: -------------------------------------------------------------------------------- 1 | NEWS 2 | README 3 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | # Sample debian/rules that uses debhelper. 4 | # This file was originally written by Joey Hess and Craig Small. 5 | # As a special exception, when this file is copied by dh-make into a 6 | # dh-make output file, you may use that output file without restriction. 7 | # This special exception was added by Craig Small in version 0.37 of dh-make. 8 | 9 | # Uncomment this to turn on verbose mode. 10 | #export DH_VERBOSE=1 11 | 12 | %: 13 | dh $@ 14 | 15 | override_dh_auto_configure: 16 | autoreconf 17 | dh_auto_configure 18 | -------------------------------------------------------------------------------- /depcomp: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # depcomp - compile a program generating dependencies as side-effects 3 | 4 | scriptversion=2007-03-29.01 5 | 6 | # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software 7 | # Foundation, Inc. 8 | 9 | # This program is free software; you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation; either version 2, or (at your option) 12 | # any later version. 13 | 14 | # This program is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | 19 | # You should have received a copy of the GNU General Public License 20 | # along with this program; if not, write to the Free Software 21 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 22 | # 02110-1301, USA. 23 | 24 | # As a special exception to the GNU General Public License, if you 25 | # distribute this file as part of a program that contains a 26 | # configuration script generated by Autoconf, you may include it under 27 | # the same distribution terms that you use for the rest of that program. 28 | 29 | # Originally written by Alexandre Oliva . 30 | 31 | case $1 in 32 | '') 33 | echo "$0: No command. Try \`$0 --help' for more information." 1>&2 34 | exit 1; 35 | ;; 36 | -h | --h*) 37 | cat <<\EOF 38 | Usage: depcomp [--help] [--version] PROGRAM [ARGS] 39 | 40 | Run PROGRAMS ARGS to compile a file, generating dependencies 41 | as side-effects. 42 | 43 | Environment variables: 44 | depmode Dependency tracking mode. 45 | source Source file read by `PROGRAMS ARGS'. 46 | object Object file output by `PROGRAMS ARGS'. 47 | DEPDIR directory where to store dependencies. 48 | depfile Dependency file to output. 49 | tmpdepfile Temporary file to use when outputing dependencies. 50 | libtool Whether libtool is used (yes/no). 51 | 52 | Report bugs to . 53 | EOF 54 | exit $? 55 | ;; 56 | -v | --v*) 57 | echo "depcomp $scriptversion" 58 | exit $? 59 | ;; 60 | esac 61 | 62 | if test -z "$depmode" || test -z "$source" || test -z "$object"; then 63 | echo "depcomp: Variables source, object and depmode must be set" 1>&2 64 | exit 1 65 | fi 66 | 67 | # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. 68 | depfile=${depfile-`echo "$object" | 69 | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} 70 | tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} 71 | 72 | rm -f "$tmpdepfile" 73 | 74 | # Some modes work just like other modes, but use different flags. We 75 | # parameterize here, but still list the modes in the big case below, 76 | # to make depend.m4 easier to write. Note that we *cannot* use a case 77 | # here, because this file can only contain one case statement. 78 | if test "$depmode" = hp; then 79 | # HP compiler uses -M and no extra arg. 80 | gccflag=-M 81 | depmode=gcc 82 | fi 83 | 84 | if test "$depmode" = dashXmstdout; then 85 | # This is just like dashmstdout with a different argument. 86 | dashmflag=-xM 87 | depmode=dashmstdout 88 | fi 89 | 90 | case "$depmode" in 91 | gcc3) 92 | ## gcc 3 implements dependency tracking that does exactly what 93 | ## we want. Yay! Note: for some reason libtool 1.4 doesn't like 94 | ## it if -MD -MP comes after the -MF stuff. Hmm. 95 | ## Unfortunately, FreeBSD c89 acceptance of flags depends upon 96 | ## the command line argument order; so add the flags where they 97 | ## appear in depend2.am. Note that the slowdown incurred here 98 | ## affects only configure: in makefiles, %FASTDEP% shortcuts this. 99 | for arg 100 | do 101 | case $arg in 102 | -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; 103 | *) set fnord "$@" "$arg" ;; 104 | esac 105 | shift # fnord 106 | shift # $arg 107 | done 108 | "$@" 109 | stat=$? 110 | if test $stat -eq 0; then : 111 | else 112 | rm -f "$tmpdepfile" 113 | exit $stat 114 | fi 115 | mv "$tmpdepfile" "$depfile" 116 | ;; 117 | 118 | gcc) 119 | ## There are various ways to get dependency output from gcc. Here's 120 | ## why we pick this rather obscure method: 121 | ## - Don't want to use -MD because we'd like the dependencies to end 122 | ## up in a subdir. Having to rename by hand is ugly. 123 | ## (We might end up doing this anyway to support other compilers.) 124 | ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like 125 | ## -MM, not -M (despite what the docs say). 126 | ## - Using -M directly means running the compiler twice (even worse 127 | ## than renaming). 128 | if test -z "$gccflag"; then 129 | gccflag=-MD, 130 | fi 131 | "$@" -Wp,"$gccflag$tmpdepfile" 132 | stat=$? 133 | if test $stat -eq 0; then : 134 | else 135 | rm -f "$tmpdepfile" 136 | exit $stat 137 | fi 138 | rm -f "$depfile" 139 | echo "$object : \\" > "$depfile" 140 | alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz 141 | ## The second -e expression handles DOS-style file names with drive letters. 142 | sed -e 's/^[^:]*: / /' \ 143 | -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" 144 | ## This next piece of magic avoids the `deleted header file' problem. 145 | ## The problem is that when a header file which appears in a .P file 146 | ## is deleted, the dependency causes make to die (because there is 147 | ## typically no way to rebuild the header). We avoid this by adding 148 | ## dummy dependencies for each header file. Too bad gcc doesn't do 149 | ## this for us directly. 150 | tr ' ' ' 151 | ' < "$tmpdepfile" | 152 | ## Some versions of gcc put a space before the `:'. On the theory 153 | ## that the space means something, we add a space to the output as 154 | ## well. 155 | ## Some versions of the HPUX 10.20 sed can't process this invocation 156 | ## correctly. Breaking it into two sed invocations is a workaround. 157 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" 158 | rm -f "$tmpdepfile" 159 | ;; 160 | 161 | hp) 162 | # This case exists only to let depend.m4 do its work. It works by 163 | # looking at the text of this script. This case will never be run, 164 | # since it is checked for above. 165 | exit 1 166 | ;; 167 | 168 | sgi) 169 | if test "$libtool" = yes; then 170 | "$@" "-Wp,-MDupdate,$tmpdepfile" 171 | else 172 | "$@" -MDupdate "$tmpdepfile" 173 | fi 174 | stat=$? 175 | if test $stat -eq 0; then : 176 | else 177 | rm -f "$tmpdepfile" 178 | exit $stat 179 | fi 180 | rm -f "$depfile" 181 | 182 | if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files 183 | echo "$object : \\" > "$depfile" 184 | 185 | # Clip off the initial element (the dependent). Don't try to be 186 | # clever and replace this with sed code, as IRIX sed won't handle 187 | # lines with more than a fixed number of characters (4096 in 188 | # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; 189 | # the IRIX cc adds comments like `#:fec' to the end of the 190 | # dependency line. 191 | tr ' ' ' 192 | ' < "$tmpdepfile" \ 193 | | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ 194 | tr ' 195 | ' ' ' >> $depfile 196 | echo >> $depfile 197 | 198 | # The second pass generates a dummy entry for each header file. 199 | tr ' ' ' 200 | ' < "$tmpdepfile" \ 201 | | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ 202 | >> $depfile 203 | else 204 | # The sourcefile does not contain any dependencies, so just 205 | # store a dummy comment line, to avoid errors with the Makefile 206 | # "include basename.Plo" scheme. 207 | echo "#dummy" > "$depfile" 208 | fi 209 | rm -f "$tmpdepfile" 210 | ;; 211 | 212 | aix) 213 | # The C for AIX Compiler uses -M and outputs the dependencies 214 | # in a .u file. In older versions, this file always lives in the 215 | # current directory. Also, the AIX compiler puts `$object:' at the 216 | # start of each line; $object doesn't have directory information. 217 | # Version 6 uses the directory in both cases. 218 | dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` 219 | test "x$dir" = "x$object" && dir= 220 | base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` 221 | if test "$libtool" = yes; then 222 | tmpdepfile1=$dir$base.u 223 | tmpdepfile2=$base.u 224 | tmpdepfile3=$dir.libs/$base.u 225 | "$@" -Wc,-M 226 | else 227 | tmpdepfile1=$dir$base.u 228 | tmpdepfile2=$dir$base.u 229 | tmpdepfile3=$dir$base.u 230 | "$@" -M 231 | fi 232 | stat=$? 233 | 234 | if test $stat -eq 0; then : 235 | else 236 | rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" 237 | exit $stat 238 | fi 239 | 240 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" 241 | do 242 | test -f "$tmpdepfile" && break 243 | done 244 | if test -f "$tmpdepfile"; then 245 | # Each line is of the form `foo.o: dependent.h'. 246 | # Do two passes, one to just change these to 247 | # `$object: dependent.h' and one to simply `dependent.h:'. 248 | sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" 249 | # That's a tab and a space in the []. 250 | sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" 251 | else 252 | # The sourcefile does not contain any dependencies, so just 253 | # store a dummy comment line, to avoid errors with the Makefile 254 | # "include basename.Plo" scheme. 255 | echo "#dummy" > "$depfile" 256 | fi 257 | rm -f "$tmpdepfile" 258 | ;; 259 | 260 | icc) 261 | # Intel's C compiler understands `-MD -MF file'. However on 262 | # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c 263 | # ICC 7.0 will fill foo.d with something like 264 | # foo.o: sub/foo.c 265 | # foo.o: sub/foo.h 266 | # which is wrong. We want: 267 | # sub/foo.o: sub/foo.c 268 | # sub/foo.o: sub/foo.h 269 | # sub/foo.c: 270 | # sub/foo.h: 271 | # ICC 7.1 will output 272 | # foo.o: sub/foo.c sub/foo.h 273 | # and will wrap long lines using \ : 274 | # foo.o: sub/foo.c ... \ 275 | # sub/foo.h ... \ 276 | # ... 277 | 278 | "$@" -MD -MF "$tmpdepfile" 279 | stat=$? 280 | if test $stat -eq 0; then : 281 | else 282 | rm -f "$tmpdepfile" 283 | exit $stat 284 | fi 285 | rm -f "$depfile" 286 | # Each line is of the form `foo.o: dependent.h', 287 | # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. 288 | # Do two passes, one to just change these to 289 | # `$object: dependent.h' and one to simply `dependent.h:'. 290 | sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" 291 | # Some versions of the HPUX 10.20 sed can't process this invocation 292 | # correctly. Breaking it into two sed invocations is a workaround. 293 | sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | 294 | sed -e 's/$/ :/' >> "$depfile" 295 | rm -f "$tmpdepfile" 296 | ;; 297 | 298 | hp2) 299 | # The "hp" stanza above does not work with aCC (C++) and HP's ia64 300 | # compilers, which have integrated preprocessors. The correct option 301 | # to use with these is +Maked; it writes dependencies to a file named 302 | # 'foo.d', which lands next to the object file, wherever that 303 | # happens to be. 304 | # Much of this is similar to the tru64 case; see comments there. 305 | dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` 306 | test "x$dir" = "x$object" && dir= 307 | base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` 308 | if test "$libtool" = yes; then 309 | tmpdepfile1=$dir$base.d 310 | tmpdepfile2=$dir.libs/$base.d 311 | "$@" -Wc,+Maked 312 | else 313 | tmpdepfile1=$dir$base.d 314 | tmpdepfile2=$dir$base.d 315 | "$@" +Maked 316 | fi 317 | stat=$? 318 | if test $stat -eq 0; then : 319 | else 320 | rm -f "$tmpdepfile1" "$tmpdepfile2" 321 | exit $stat 322 | fi 323 | 324 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" 325 | do 326 | test -f "$tmpdepfile" && break 327 | done 328 | if test -f "$tmpdepfile"; then 329 | sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" 330 | # Add `dependent.h:' lines. 331 | sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" 332 | else 333 | echo "#dummy" > "$depfile" 334 | fi 335 | rm -f "$tmpdepfile" "$tmpdepfile2" 336 | ;; 337 | 338 | tru64) 339 | # The Tru64 compiler uses -MD to generate dependencies as a side 340 | # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. 341 | # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put 342 | # dependencies in `foo.d' instead, so we check for that too. 343 | # Subdirectories are respected. 344 | dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` 345 | test "x$dir" = "x$object" && dir= 346 | base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` 347 | 348 | if test "$libtool" = yes; then 349 | # With Tru64 cc, shared objects can also be used to make a 350 | # static library. This mechanism is used in libtool 1.4 series to 351 | # handle both shared and static libraries in a single compilation. 352 | # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. 353 | # 354 | # With libtool 1.5 this exception was removed, and libtool now 355 | # generates 2 separate objects for the 2 libraries. These two 356 | # compilations output dependencies in $dir.libs/$base.o.d and 357 | # in $dir$base.o.d. We have to check for both files, because 358 | # one of the two compilations can be disabled. We should prefer 359 | # $dir$base.o.d over $dir.libs/$base.o.d because the latter is 360 | # automatically cleaned when .libs/ is deleted, while ignoring 361 | # the former would cause a distcleancheck panic. 362 | tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 363 | tmpdepfile2=$dir$base.o.d # libtool 1.5 364 | tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 365 | tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 366 | "$@" -Wc,-MD 367 | else 368 | tmpdepfile1=$dir$base.o.d 369 | tmpdepfile2=$dir$base.d 370 | tmpdepfile3=$dir$base.d 371 | tmpdepfile4=$dir$base.d 372 | "$@" -MD 373 | fi 374 | 375 | stat=$? 376 | if test $stat -eq 0; then : 377 | else 378 | rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" 379 | exit $stat 380 | fi 381 | 382 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" 383 | do 384 | test -f "$tmpdepfile" && break 385 | done 386 | if test -f "$tmpdepfile"; then 387 | sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" 388 | # That's a tab and a space in the []. 389 | sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" 390 | else 391 | echo "#dummy" > "$depfile" 392 | fi 393 | rm -f "$tmpdepfile" 394 | ;; 395 | 396 | #nosideeffect) 397 | # This comment above is used by automake to tell side-effect 398 | # dependency tracking mechanisms from slower ones. 399 | 400 | dashmstdout) 401 | # Important note: in order to support this mode, a compiler *must* 402 | # always write the preprocessed file to stdout, regardless of -o. 403 | "$@" || exit $? 404 | 405 | # Remove the call to Libtool. 406 | if test "$libtool" = yes; then 407 | while test $1 != '--mode=compile'; do 408 | shift 409 | done 410 | shift 411 | fi 412 | 413 | # Remove `-o $object'. 414 | IFS=" " 415 | for arg 416 | do 417 | case $arg in 418 | -o) 419 | shift 420 | ;; 421 | $object) 422 | shift 423 | ;; 424 | *) 425 | set fnord "$@" "$arg" 426 | shift # fnord 427 | shift # $arg 428 | ;; 429 | esac 430 | done 431 | 432 | test -z "$dashmflag" && dashmflag=-M 433 | # Require at least two characters before searching for `:' 434 | # in the target name. This is to cope with DOS-style filenames: 435 | # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. 436 | "$@" $dashmflag | 437 | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" 438 | rm -f "$depfile" 439 | cat < "$tmpdepfile" > "$depfile" 440 | tr ' ' ' 441 | ' < "$tmpdepfile" | \ 442 | ## Some versions of the HPUX 10.20 sed can't process this invocation 443 | ## correctly. Breaking it into two sed invocations is a workaround. 444 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" 445 | rm -f "$tmpdepfile" 446 | ;; 447 | 448 | dashXmstdout) 449 | # This case only exists to satisfy depend.m4. It is never actually 450 | # run, as this mode is specially recognized in the preamble. 451 | exit 1 452 | ;; 453 | 454 | makedepend) 455 | "$@" || exit $? 456 | # Remove any Libtool call 457 | if test "$libtool" = yes; then 458 | while test $1 != '--mode=compile'; do 459 | shift 460 | done 461 | shift 462 | fi 463 | # X makedepend 464 | shift 465 | cleared=no 466 | for arg in "$@"; do 467 | case $cleared in 468 | no) 469 | set ""; shift 470 | cleared=yes ;; 471 | esac 472 | case "$arg" in 473 | -D*|-I*) 474 | set fnord "$@" "$arg"; shift ;; 475 | # Strip any option that makedepend may not understand. Remove 476 | # the object too, otherwise makedepend will parse it as a source file. 477 | -*|$object) 478 | ;; 479 | *) 480 | set fnord "$@" "$arg"; shift ;; 481 | esac 482 | done 483 | obj_suffix="`echo $object | sed 's/^.*\././'`" 484 | touch "$tmpdepfile" 485 | ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" 486 | rm -f "$depfile" 487 | cat < "$tmpdepfile" > "$depfile" 488 | sed '1,2d' "$tmpdepfile" | tr ' ' ' 489 | ' | \ 490 | ## Some versions of the HPUX 10.20 sed can't process this invocation 491 | ## correctly. Breaking it into two sed invocations is a workaround. 492 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" 493 | rm -f "$tmpdepfile" "$tmpdepfile".bak 494 | ;; 495 | 496 | cpp) 497 | # Important note: in order to support this mode, a compiler *must* 498 | # always write the preprocessed file to stdout. 499 | "$@" || exit $? 500 | 501 | # Remove the call to Libtool. 502 | if test "$libtool" = yes; then 503 | while test $1 != '--mode=compile'; do 504 | shift 505 | done 506 | shift 507 | fi 508 | 509 | # Remove `-o $object'. 510 | IFS=" " 511 | for arg 512 | do 513 | case $arg in 514 | -o) 515 | shift 516 | ;; 517 | $object) 518 | shift 519 | ;; 520 | *) 521 | set fnord "$@" "$arg" 522 | shift # fnord 523 | shift # $arg 524 | ;; 525 | esac 526 | done 527 | 528 | "$@" -E | 529 | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ 530 | -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | 531 | sed '$ s: \\$::' > "$tmpdepfile" 532 | rm -f "$depfile" 533 | echo "$object : \\" > "$depfile" 534 | cat < "$tmpdepfile" >> "$depfile" 535 | sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" 536 | rm -f "$tmpdepfile" 537 | ;; 538 | 539 | msvisualcpp) 540 | # Important note: in order to support this mode, a compiler *must* 541 | # always write the preprocessed file to stdout, regardless of -o, 542 | # because we must use -o when running libtool. 543 | "$@" || exit $? 544 | IFS=" " 545 | for arg 546 | do 547 | case "$arg" in 548 | "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") 549 | set fnord "$@" 550 | shift 551 | shift 552 | ;; 553 | *) 554 | set fnord "$@" "$arg" 555 | shift 556 | shift 557 | ;; 558 | esac 559 | done 560 | "$@" -E | 561 | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" 562 | rm -f "$depfile" 563 | echo "$object : \\" > "$depfile" 564 | . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" 565 | echo " " >> "$depfile" 566 | . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" 567 | rm -f "$tmpdepfile" 568 | ;; 569 | 570 | none) 571 | exec "$@" 572 | ;; 573 | 574 | *) 575 | echo "Unknown depmode $depmode" 1>&2 576 | exit 1 577 | ;; 578 | esac 579 | 580 | exit 0 581 | 582 | # Local Variables: 583 | # mode: shell-script 584 | # sh-indentation: 2 585 | # eval: (add-hook 'write-file-hooks 'time-stamp) 586 | # time-stamp-start: "scriptversion=" 587 | # time-stamp-format: "%:y-%02m-%02d.%02H" 588 | # time-stamp-end: "$" 589 | # End: 590 | -------------------------------------------------------------------------------- /install-sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # install - install a program, script, or datafile 3 | 4 | scriptversion=2006-12-25.00 5 | 6 | # This originates from X11R5 (mit/util/scripts/install.sh), which was 7 | # later released in X11R6 (xc/config/util/install.sh) with the 8 | # following copyright and license. 9 | # 10 | # Copyright (C) 1994 X Consortium 11 | # 12 | # Permission is hereby granted, free of charge, to any person obtaining a copy 13 | # of this software and associated documentation files (the "Software"), to 14 | # deal in the Software without restriction, including without limitation the 15 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 16 | # sell copies of the Software, and to permit persons to whom the Software is 17 | # furnished to do so, subject to the following conditions: 18 | # 19 | # The above copyright notice and this permission notice shall be included in 20 | # all copies or substantial portions of the Software. 21 | # 22 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 25 | # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 26 | # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- 27 | # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name of the X Consortium shall not 30 | # be used in advertising or otherwise to promote the sale, use or other deal- 31 | # ings in this Software without prior written authorization from the X Consor- 32 | # tium. 33 | # 34 | # 35 | # FSF changes to this file are in the public domain. 36 | # 37 | # Calling this script install-sh is preferred over install.sh, to prevent 38 | # `make' implicit rules from creating a file called install from it 39 | # when there is no Makefile. 40 | # 41 | # This script is compatible with the BSD install script, but was written 42 | # from scratch. 43 | 44 | nl=' 45 | ' 46 | IFS=" "" $nl" 47 | 48 | # set DOITPROG to echo to test this script 49 | 50 | # Don't use :- since 4.3BSD and earlier shells don't like it. 51 | doit=${DOITPROG-} 52 | if test -z "$doit"; then 53 | doit_exec=exec 54 | else 55 | doit_exec=$doit 56 | fi 57 | 58 | # Put in absolute file names if you don't have them in your path; 59 | # or use environment vars. 60 | 61 | chgrpprog=${CHGRPPROG-chgrp} 62 | chmodprog=${CHMODPROG-chmod} 63 | chownprog=${CHOWNPROG-chown} 64 | cmpprog=${CMPPROG-cmp} 65 | cpprog=${CPPROG-cp} 66 | mkdirprog=${MKDIRPROG-mkdir} 67 | mvprog=${MVPROG-mv} 68 | rmprog=${RMPROG-rm} 69 | stripprog=${STRIPPROG-strip} 70 | 71 | posix_glob='?' 72 | initialize_posix_glob=' 73 | test "$posix_glob" != "?" || { 74 | if (set -f) 2>/dev/null; then 75 | posix_glob= 76 | else 77 | posix_glob=: 78 | fi 79 | } 80 | ' 81 | 82 | posix_mkdir= 83 | 84 | # Desired mode of installed file. 85 | mode=0755 86 | 87 | chgrpcmd= 88 | chmodcmd=$chmodprog 89 | chowncmd= 90 | mvcmd=$mvprog 91 | rmcmd="$rmprog -f" 92 | stripcmd= 93 | 94 | src= 95 | dst= 96 | dir_arg= 97 | dst_arg= 98 | 99 | copy_on_change=false 100 | no_target_directory= 101 | 102 | usage="\ 103 | Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE 104 | or: $0 [OPTION]... SRCFILES... DIRECTORY 105 | or: $0 [OPTION]... -t DIRECTORY SRCFILES... 106 | or: $0 [OPTION]... -d DIRECTORIES... 107 | 108 | In the 1st form, copy SRCFILE to DSTFILE. 109 | In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. 110 | In the 4th, create DIRECTORIES. 111 | 112 | Options: 113 | --help display this help and exit. 114 | --version display version info and exit. 115 | 116 | -c (ignored) 117 | -C install only if different (preserve the last data modification time) 118 | -d create directories instead of installing files. 119 | -g GROUP $chgrpprog installed files to GROUP. 120 | -m MODE $chmodprog installed files to MODE. 121 | -o USER $chownprog installed files to USER. 122 | -s $stripprog installed files. 123 | -t DIRECTORY install into DIRECTORY. 124 | -T report an error if DSTFILE is a directory. 125 | 126 | Environment variables override the default commands: 127 | CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG 128 | RMPROG STRIPPROG 129 | " 130 | 131 | while test $# -ne 0; do 132 | case $1 in 133 | -c) ;; 134 | 135 | -C) copy_on_change=true;; 136 | 137 | -d) dir_arg=true;; 138 | 139 | -g) chgrpcmd="$chgrpprog $2" 140 | shift;; 141 | 142 | --help) echo "$usage"; exit $?;; 143 | 144 | -m) mode=$2 145 | case $mode in 146 | *' '* | *' '* | *' 147 | '* | *'*'* | *'?'* | *'['*) 148 | echo "$0: invalid mode: $mode" >&2 149 | exit 1;; 150 | esac 151 | shift;; 152 | 153 | -o) chowncmd="$chownprog $2" 154 | shift;; 155 | 156 | -s) stripcmd=$stripprog;; 157 | 158 | -t) dst_arg=$2 159 | shift;; 160 | 161 | -T) no_target_directory=true;; 162 | 163 | --version) echo "$0 $scriptversion"; exit $?;; 164 | 165 | --) shift 166 | break;; 167 | 168 | -*) echo "$0: invalid option: $1" >&2 169 | exit 1;; 170 | 171 | *) break;; 172 | esac 173 | shift 174 | done 175 | 176 | if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then 177 | # When -d is used, all remaining arguments are directories to create. 178 | # When -t is used, the destination is already specified. 179 | # Otherwise, the last argument is the destination. Remove it from $@. 180 | for arg 181 | do 182 | if test -n "$dst_arg"; then 183 | # $@ is not empty: it contains at least $arg. 184 | set fnord "$@" "$dst_arg" 185 | shift # fnord 186 | fi 187 | shift # arg 188 | dst_arg=$arg 189 | done 190 | fi 191 | 192 | if test $# -eq 0; then 193 | if test -z "$dir_arg"; then 194 | echo "$0: no input file specified." >&2 195 | exit 1 196 | fi 197 | # It's OK to call `install-sh -d' without argument. 198 | # This can happen when creating conditional directories. 199 | exit 0 200 | fi 201 | 202 | if test -z "$dir_arg"; then 203 | trap '(exit $?); exit' 1 2 13 15 204 | 205 | # Set umask so as not to create temps with too-generous modes. 206 | # However, 'strip' requires both read and write access to temps. 207 | case $mode in 208 | # Optimize common cases. 209 | *644) cp_umask=133;; 210 | *755) cp_umask=22;; 211 | 212 | *[0-7]) 213 | if test -z "$stripcmd"; then 214 | u_plus_rw= 215 | else 216 | u_plus_rw='% 200' 217 | fi 218 | cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; 219 | *) 220 | if test -z "$stripcmd"; then 221 | u_plus_rw= 222 | else 223 | u_plus_rw=,u+rw 224 | fi 225 | cp_umask=$mode$u_plus_rw;; 226 | esac 227 | fi 228 | 229 | for src 230 | do 231 | # Protect names starting with `-'. 232 | case $src in 233 | -*) src=./$src;; 234 | esac 235 | 236 | if test -n "$dir_arg"; then 237 | dst=$src 238 | dstdir=$dst 239 | test -d "$dstdir" 240 | dstdir_status=$? 241 | else 242 | 243 | # Waiting for this to be detected by the "$cpprog $src $dsttmp" command 244 | # might cause directories to be created, which would be especially bad 245 | # if $src (and thus $dsttmp) contains '*'. 246 | if test ! -f "$src" && test ! -d "$src"; then 247 | echo "$0: $src does not exist." >&2 248 | exit 1 249 | fi 250 | 251 | if test -z "$dst_arg"; then 252 | echo "$0: no destination specified." >&2 253 | exit 1 254 | fi 255 | 256 | dst=$dst_arg 257 | # Protect names starting with `-'. 258 | case $dst in 259 | -*) dst=./$dst;; 260 | esac 261 | 262 | # If destination is a directory, append the input filename; won't work 263 | # if double slashes aren't ignored. 264 | if test -d "$dst"; then 265 | if test -n "$no_target_directory"; then 266 | echo "$0: $dst_arg: Is a directory" >&2 267 | exit 1 268 | fi 269 | dstdir=$dst 270 | dst=$dstdir/`basename "$src"` 271 | dstdir_status=0 272 | else 273 | # Prefer dirname, but fall back on a substitute if dirname fails. 274 | dstdir=` 275 | (dirname "$dst") 2>/dev/null || 276 | expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 277 | X"$dst" : 'X\(//\)[^/]' \| \ 278 | X"$dst" : 'X\(//\)$' \| \ 279 | X"$dst" : 'X\(/\)' \| . 2>/dev/null || 280 | echo X"$dst" | 281 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 282 | s//\1/ 283 | q 284 | } 285 | /^X\(\/\/\)[^/].*/{ 286 | s//\1/ 287 | q 288 | } 289 | /^X\(\/\/\)$/{ 290 | s//\1/ 291 | q 292 | } 293 | /^X\(\/\).*/{ 294 | s//\1/ 295 | q 296 | } 297 | s/.*/./; q' 298 | ` 299 | 300 | test -d "$dstdir" 301 | dstdir_status=$? 302 | fi 303 | fi 304 | 305 | obsolete_mkdir_used=false 306 | 307 | if test $dstdir_status != 0; then 308 | case $posix_mkdir in 309 | '') 310 | # Create intermediate dirs using mode 755 as modified by the umask. 311 | # This is like FreeBSD 'install' as of 1997-10-28. 312 | umask=`umask` 313 | case $stripcmd.$umask in 314 | # Optimize common cases. 315 | *[2367][2367]) mkdir_umask=$umask;; 316 | .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; 317 | 318 | *[0-7]) 319 | mkdir_umask=`expr $umask + 22 \ 320 | - $umask % 100 % 40 + $umask % 20 \ 321 | - $umask % 10 % 4 + $umask % 2 322 | `;; 323 | *) mkdir_umask=$umask,go-w;; 324 | esac 325 | 326 | # With -d, create the new directory with the user-specified mode. 327 | # Otherwise, rely on $mkdir_umask. 328 | if test -n "$dir_arg"; then 329 | mkdir_mode=-m$mode 330 | else 331 | mkdir_mode= 332 | fi 333 | 334 | posix_mkdir=false 335 | case $umask in 336 | *[123567][0-7][0-7]) 337 | # POSIX mkdir -p sets u+wx bits regardless of umask, which 338 | # is incompatible with FreeBSD 'install' when (umask & 300) != 0. 339 | ;; 340 | *) 341 | tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ 342 | trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 343 | 344 | if (umask $mkdir_umask && 345 | exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 346 | then 347 | if test -z "$dir_arg" || { 348 | # Check for POSIX incompatibilities with -m. 349 | # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or 350 | # other-writeable bit of parent directory when it shouldn't. 351 | # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. 352 | ls_ld_tmpdir=`ls -ld "$tmpdir"` 353 | case $ls_ld_tmpdir in 354 | d????-?r-*) different_mode=700;; 355 | d????-?--*) different_mode=755;; 356 | *) false;; 357 | esac && 358 | $mkdirprog -m$different_mode -p -- "$tmpdir" && { 359 | ls_ld_tmpdir_1=`ls -ld "$tmpdir"` 360 | test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" 361 | } 362 | } 363 | then posix_mkdir=: 364 | fi 365 | rmdir "$tmpdir/d" "$tmpdir" 366 | else 367 | # Remove any dirs left behind by ancient mkdir implementations. 368 | rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null 369 | fi 370 | trap '' 0;; 371 | esac;; 372 | esac 373 | 374 | if 375 | $posix_mkdir && ( 376 | umask $mkdir_umask && 377 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" 378 | ) 379 | then : 380 | else 381 | 382 | # The umask is ridiculous, or mkdir does not conform to POSIX, 383 | # or it failed possibly due to a race condition. Create the 384 | # directory the slow way, step by step, checking for races as we go. 385 | 386 | case $dstdir in 387 | /*) prefix='/';; 388 | -*) prefix='./';; 389 | *) prefix='';; 390 | esac 391 | 392 | eval "$initialize_posix_glob" 393 | 394 | oIFS=$IFS 395 | IFS=/ 396 | $posix_glob set -f 397 | set fnord $dstdir 398 | shift 399 | $posix_glob set +f 400 | IFS=$oIFS 401 | 402 | prefixes= 403 | 404 | for d 405 | do 406 | test -z "$d" && continue 407 | 408 | prefix=$prefix$d 409 | if test -d "$prefix"; then 410 | prefixes= 411 | else 412 | if $posix_mkdir; then 413 | (umask=$mkdir_umask && 414 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break 415 | # Don't fail if two instances are running concurrently. 416 | test -d "$prefix" || exit 1 417 | else 418 | case $prefix in 419 | *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; 420 | *) qprefix=$prefix;; 421 | esac 422 | prefixes="$prefixes '$qprefix'" 423 | fi 424 | fi 425 | prefix=$prefix/ 426 | done 427 | 428 | if test -n "$prefixes"; then 429 | # Don't fail if two instances are running concurrently. 430 | (umask $mkdir_umask && 431 | eval "\$doit_exec \$mkdirprog $prefixes") || 432 | test -d "$dstdir" || exit 1 433 | obsolete_mkdir_used=true 434 | fi 435 | fi 436 | fi 437 | 438 | if test -n "$dir_arg"; then 439 | { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && 440 | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && 441 | { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || 442 | test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 443 | else 444 | 445 | # Make a couple of temp file names in the proper directory. 446 | dsttmp=$dstdir/_inst.$$_ 447 | rmtmp=$dstdir/_rm.$$_ 448 | 449 | # Trap to clean up those temp files at exit. 450 | trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 451 | 452 | # Copy the file name to the temp name. 453 | (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && 454 | 455 | # and set any options; do chmod last to preserve setuid bits. 456 | # 457 | # If any of these fail, we abort the whole thing. If we want to 458 | # ignore errors from any of these, just make sure not to ignore 459 | # errors from the above "$doit $cpprog $src $dsttmp" command. 460 | # 461 | { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && 462 | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && 463 | { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && 464 | { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && 465 | 466 | # If -C, don't bother to copy if it wouldn't change the file. 467 | if $copy_on_change && 468 | old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && 469 | new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && 470 | 471 | eval "$initialize_posix_glob" && 472 | $posix_glob set -f && 473 | set X $old && old=:$2:$4:$5:$6 && 474 | set X $new && new=:$2:$4:$5:$6 && 475 | $posix_glob set +f && 476 | 477 | test "$old" = "$new" && 478 | $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 479 | then 480 | rm -f "$dsttmp" 481 | else 482 | # Rename the file to the real destination. 483 | $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || 484 | 485 | # The rename failed, perhaps because mv can't rename something else 486 | # to itself, or perhaps because mv is so ancient that it does not 487 | # support -f. 488 | { 489 | # Now remove or move aside any old file at destination location. 490 | # We try this two ways since rm can't unlink itself on some 491 | # systems and the destination file might be busy for other 492 | # reasons. In this case, the final cleanup might fail but the new 493 | # file should still install successfully. 494 | { 495 | test ! -f "$dst" || 496 | $doit $rmcmd -f "$dst" 2>/dev/null || 497 | { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && 498 | { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } 499 | } || 500 | { echo "$0: cannot unlink or rename $dst" >&2 501 | (exit 1); exit 1 502 | } 503 | } && 504 | 505 | # Now rename the file to the real destination. 506 | $doit $mvcmd "$dsttmp" "$dst" 507 | } 508 | fi || exit 1 509 | 510 | trap '' 0 511 | fi 512 | done 513 | 514 | # Local variables: 515 | # eval: (add-hook 'write-file-hooks 'time-stamp) 516 | # time-stamp-start: "scriptversion=" 517 | # time-stamp-format: "%:y-%02m-%02d.%02H" 518 | # time-stamp-end: "$" 519 | # End: 520 | -------------------------------------------------------------------------------- /md5.c: -------------------------------------------------------------------------------- 1 | // This file has been copied 1:1 from the source of the Debian fdupes package into Guymager. 2 | // Only have been added this comment and the following include, no other changes. 3 | 4 | #include 5 | 6 | 7 | /* 8 | Copyright (C) 1999 Aladdin Enterprises. All rights reserved. 9 | 10 | This software is provided 'as-is', without any express or implied 11 | warranty. In no event will the authors be held liable for any damages 12 | arising from the use of this software. 13 | 14 | Permission is granted to anyone to use this software for any purpose, 15 | including commercial applications, and to alter it and redistribute it 16 | freely, subject to the following restrictions: 17 | 18 | 1. The origin of this software must not be misrepresented; you must not 19 | claim that you wrote the original software. If you use this software 20 | in a product, an acknowledgment in the product documentation would be 21 | appreciated but is not required. 22 | 2. Altered source versions must be plainly marked as such, and must not be 23 | misrepresented as being the original software. 24 | 3. This notice may not be removed or altered from any source distribution. 25 | 26 | L. Peter Deutsch 27 | ghost@aladdin.com 28 | 29 | */ 30 | /*$Id: md5.c $ */ 31 | /* 32 | Independent implementation of MD5 (RFC 1321). 33 | 34 | This code implements the MD5 Algorithm defined in RFC 1321. 35 | It is derived directly from the text of the RFC and not from the 36 | reference implementation. 37 | 38 | The original and principal author of md5.c is L. Peter Deutsch 39 | . Other authors are noted in the change history 40 | that follows (in reverse chronological order): 41 | 42 | 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. 43 | 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5). 44 | 1999-05-03 lpd Original version. 45 | */ 46 | 47 | #include "md5.h" 48 | 49 | #ifdef TEST 50 | /* 51 | * Compile with -DTEST to create a self-contained executable test program. 52 | * The test program should print out the same values as given in section 53 | * A.5 of RFC 1321, reproduced below. 54 | */ 55 | #include 56 | main() 57 | { 58 | static const char *const test[7] = { 59 | "", /*d41d8cd98f00b204e9800998ecf8427e*/ 60 | "a", /*0cc175b9c0f1b6a831c399e269772661*/ 61 | "abc", /*900150983cd24fb0d6963f7d28e17f72*/ 62 | "message digest", /*f96b697d7cb7938d525a2f31aaf161d0*/ 63 | "abcdefghijklmnopqrstuvwxyz", /*c3fcd3d76192e4007dfb496cca67e13b*/ 64 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", 65 | /*d174ab98d277d9f5a5611c2c9f419d9f*/ 66 | "12345678901234567890123456789012345678901234567890123456789012345678901234567890" /*57edf4a22be3c955ac49da2e2107b67a*/ 67 | }; 68 | int i; 69 | 70 | for (i = 0; i < 7; ++i) { 71 | md5_state_t state; 72 | md5_byte_t digest[16]; 73 | int di; 74 | 75 | md5_init(&state); 76 | md5_append(&state, (const md5_byte_t *)test[i], strlen(test[i])); 77 | md5_finish(&state, digest); 78 | printf("MD5 (\"%s\") = ", test[i]); 79 | for (di = 0; di < 16; ++di) 80 | printf("%02x", digest[di]); 81 | printf("\n"); 82 | } 83 | return 0; 84 | } 85 | #endif /* TEST */ 86 | 87 | 88 | /* 89 | * For reference, here is the program that computed the T values. 90 | */ 91 | #if 0 92 | #include 93 | main() 94 | { 95 | int i; 96 | for (i = 1; i <= 64; ++i) { 97 | unsigned long v = (unsigned long)(4294967296.0 * fabs(sin((double)i))); 98 | printf("#define T%d 0x%08lx\n", i, v); 99 | } 100 | return 0; 101 | } 102 | #endif 103 | /* 104 | * End of T computation program. 105 | */ 106 | #define T1 0xd76aa478 107 | #define T2 0xe8c7b756 108 | #define T3 0x242070db 109 | #define T4 0xc1bdceee 110 | #define T5 0xf57c0faf 111 | #define T6 0x4787c62a 112 | #define T7 0xa8304613 113 | #define T8 0xfd469501 114 | #define T9 0x698098d8 115 | #define T10 0x8b44f7af 116 | #define T11 0xffff5bb1 117 | #define T12 0x895cd7be 118 | #define T13 0x6b901122 119 | #define T14 0xfd987193 120 | #define T15 0xa679438e 121 | #define T16 0x49b40821 122 | #define T17 0xf61e2562 123 | #define T18 0xc040b340 124 | #define T19 0x265e5a51 125 | #define T20 0xe9b6c7aa 126 | #define T21 0xd62f105d 127 | #define T22 0x02441453 128 | #define T23 0xd8a1e681 129 | #define T24 0xe7d3fbc8 130 | #define T25 0x21e1cde6 131 | #define T26 0xc33707d6 132 | #define T27 0xf4d50d87 133 | #define T28 0x455a14ed 134 | #define T29 0xa9e3e905 135 | #define T30 0xfcefa3f8 136 | #define T31 0x676f02d9 137 | #define T32 0x8d2a4c8a 138 | #define T33 0xfffa3942 139 | #define T34 0x8771f681 140 | #define T35 0x6d9d6122 141 | #define T36 0xfde5380c 142 | #define T37 0xa4beea44 143 | #define T38 0x4bdecfa9 144 | #define T39 0xf6bb4b60 145 | #define T40 0xbebfbc70 146 | #define T41 0x289b7ec6 147 | #define T42 0xeaa127fa 148 | #define T43 0xd4ef3085 149 | #define T44 0x04881d05 150 | #define T45 0xd9d4d039 151 | #define T46 0xe6db99e5 152 | #define T47 0x1fa27cf8 153 | #define T48 0xc4ac5665 154 | #define T49 0xf4292244 155 | #define T50 0x432aff97 156 | #define T51 0xab9423a7 157 | #define T52 0xfc93a039 158 | #define T53 0x655b59c3 159 | #define T54 0x8f0ccc92 160 | #define T55 0xffeff47d 161 | #define T56 0x85845dd1 162 | #define T57 0x6fa87e4f 163 | #define T58 0xfe2ce6e0 164 | #define T59 0xa3014314 165 | #define T60 0x4e0811a1 166 | #define T61 0xf7537e82 167 | #define T62 0xbd3af235 168 | #define T63 0x2ad7d2bb 169 | #define T64 0xeb86d391 170 | 171 | static void 172 | md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/) 173 | { 174 | md5_word_t 175 | a = pms->abcd[0], b = pms->abcd[1], 176 | c = pms->abcd[2], d = pms->abcd[3]; 177 | md5_word_t t; 178 | 179 | #ifndef ARCH_IS_BIG_ENDIAN 180 | # define ARCH_IS_BIG_ENDIAN 1 /* slower, default implementation */ 181 | #endif 182 | #if ARCH_IS_BIG_ENDIAN 183 | 184 | /* 185 | * On big-endian machines, we must arrange the bytes in the right 186 | * order. (This also works on machines of unknown byte order.) 187 | */ 188 | md5_word_t X[16]; 189 | const md5_byte_t *xp = data; 190 | int i; 191 | 192 | for (i = 0; i < 16; ++i, xp += 4) 193 | X[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24); 194 | 195 | #else /* !ARCH_IS_BIG_ENDIAN */ 196 | 197 | /* 198 | * On little-endian machines, we can process properly aligned data 199 | * without copying it. 200 | */ 201 | md5_word_t xbuf[16]; 202 | const md5_word_t *X; 203 | 204 | if (!((data - (const md5_byte_t *)0) & 3)) { 205 | /* data are properly aligned */ 206 | X = (const md5_word_t *)data; 207 | } else { 208 | /* not aligned */ 209 | memcpy(xbuf, data, 64); 210 | X = xbuf; 211 | } 212 | #endif 213 | 214 | #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) 215 | 216 | /* Round 1. */ 217 | /* Let [abcd k s i] denote the operation 218 | a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */ 219 | #define F(x, y, z) (((x) & (y)) | (~(x) & (z))) 220 | #define SET(a, b, c, d, k, s, Ti)\ 221 | t = a + F(b,c,d) + X[k] + Ti;\ 222 | a = ROTATE_LEFT(t, s) + b 223 | /* Do the following 16 operations. */ 224 | SET(a, b, c, d, 0, 7, T1); 225 | SET(d, a, b, c, 1, 12, T2); 226 | SET(c, d, a, b, 2, 17, T3); 227 | SET(b, c, d, a, 3, 22, T4); 228 | SET(a, b, c, d, 4, 7, T5); 229 | SET(d, a, b, c, 5, 12, T6); 230 | SET(c, d, a, b, 6, 17, T7); 231 | SET(b, c, d, a, 7, 22, T8); 232 | SET(a, b, c, d, 8, 7, T9); 233 | SET(d, a, b, c, 9, 12, T10); 234 | SET(c, d, a, b, 10, 17, T11); 235 | SET(b, c, d, a, 11, 22, T12); 236 | SET(a, b, c, d, 12, 7, T13); 237 | SET(d, a, b, c, 13, 12, T14); 238 | SET(c, d, a, b, 14, 17, T15); 239 | SET(b, c, d, a, 15, 22, T16); 240 | #undef SET 241 | 242 | /* Round 2. */ 243 | /* Let [abcd k s i] denote the operation 244 | a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */ 245 | #define G(x, y, z) (((x) & (z)) | ((y) & ~(z))) 246 | #define SET(a, b, c, d, k, s, Ti)\ 247 | t = a + G(b,c,d) + X[k] + Ti;\ 248 | a = ROTATE_LEFT(t, s) + b 249 | /* Do the following 16 operations. */ 250 | SET(a, b, c, d, 1, 5, T17); 251 | SET(d, a, b, c, 6, 9, T18); 252 | SET(c, d, a, b, 11, 14, T19); 253 | SET(b, c, d, a, 0, 20, T20); 254 | SET(a, b, c, d, 5, 5, T21); 255 | SET(d, a, b, c, 10, 9, T22); 256 | SET(c, d, a, b, 15, 14, T23); 257 | SET(b, c, d, a, 4, 20, T24); 258 | SET(a, b, c, d, 9, 5, T25); 259 | SET(d, a, b, c, 14, 9, T26); 260 | SET(c, d, a, b, 3, 14, T27); 261 | SET(b, c, d, a, 8, 20, T28); 262 | SET(a, b, c, d, 13, 5, T29); 263 | SET(d, a, b, c, 2, 9, T30); 264 | SET(c, d, a, b, 7, 14, T31); 265 | SET(b, c, d, a, 12, 20, T32); 266 | #undef SET 267 | 268 | /* Round 3. */ 269 | /* Let [abcd k s t] denote the operation 270 | a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */ 271 | #define H(x, y, z) ((x) ^ (y) ^ (z)) 272 | #define SET(a, b, c, d, k, s, Ti)\ 273 | t = a + H(b,c,d) + X[k] + Ti;\ 274 | a = ROTATE_LEFT(t, s) + b 275 | /* Do the following 16 operations. */ 276 | SET(a, b, c, d, 5, 4, T33); 277 | SET(d, a, b, c, 8, 11, T34); 278 | SET(c, d, a, b, 11, 16, T35); 279 | SET(b, c, d, a, 14, 23, T36); 280 | SET(a, b, c, d, 1, 4, T37); 281 | SET(d, a, b, c, 4, 11, T38); 282 | SET(c, d, a, b, 7, 16, T39); 283 | SET(b, c, d, a, 10, 23, T40); 284 | SET(a, b, c, d, 13, 4, T41); 285 | SET(d, a, b, c, 0, 11, T42); 286 | SET(c, d, a, b, 3, 16, T43); 287 | SET(b, c, d, a, 6, 23, T44); 288 | SET(a, b, c, d, 9, 4, T45); 289 | SET(d, a, b, c, 12, 11, T46); 290 | SET(c, d, a, b, 15, 16, T47); 291 | SET(b, c, d, a, 2, 23, T48); 292 | #undef SET 293 | 294 | /* Round 4. */ 295 | /* Let [abcd k s t] denote the operation 296 | a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */ 297 | #define I(x, y, z) ((y) ^ ((x) | ~(z))) 298 | #define SET(a, b, c, d, k, s, Ti)\ 299 | t = a + I(b,c,d) + X[k] + Ti;\ 300 | a = ROTATE_LEFT(t, s) + b 301 | /* Do the following 16 operations. */ 302 | SET(a, b, c, d, 0, 6, T49); 303 | SET(d, a, b, c, 7, 10, T50); 304 | SET(c, d, a, b, 14, 15, T51); 305 | SET(b, c, d, a, 5, 21, T52); 306 | SET(a, b, c, d, 12, 6, T53); 307 | SET(d, a, b, c, 3, 10, T54); 308 | SET(c, d, a, b, 10, 15, T55); 309 | SET(b, c, d, a, 1, 21, T56); 310 | SET(a, b, c, d, 8, 6, T57); 311 | SET(d, a, b, c, 15, 10, T58); 312 | SET(c, d, a, b, 6, 15, T59); 313 | SET(b, c, d, a, 13, 21, T60); 314 | SET(a, b, c, d, 4, 6, T61); 315 | SET(d, a, b, c, 11, 10, T62); 316 | SET(c, d, a, b, 2, 15, T63); 317 | SET(b, c, d, a, 9, 21, T64); 318 | #undef SET 319 | 320 | /* Then perform the following additions. (That is increment each 321 | of the four registers by the value it had before this block 322 | was started.) */ 323 | pms->abcd[0] += a; 324 | pms->abcd[1] += b; 325 | pms->abcd[2] += c; 326 | pms->abcd[3] += d; 327 | } 328 | 329 | void 330 | md5_init(md5_state_t *pms) 331 | { 332 | pms->count[0] = pms->count[1] = 0; 333 | pms->abcd[0] = 0x67452301; 334 | pms->abcd[1] = 0xefcdab89; 335 | pms->abcd[2] = 0x98badcfe; 336 | pms->abcd[3] = 0x10325476; 337 | } 338 | 339 | void 340 | md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes) 341 | { 342 | const md5_byte_t *p = data; 343 | int left = nbytes; 344 | int offset = (pms->count[0] >> 3) & 63; 345 | md5_word_t nbits = (md5_word_t)(nbytes << 3); 346 | 347 | if (nbytes <= 0) 348 | return; 349 | 350 | /* Update the message length. */ 351 | pms->count[1] += nbytes >> 29; 352 | pms->count[0] += nbits; 353 | if (pms->count[0] < nbits) 354 | pms->count[1]++; 355 | 356 | /* Process an initial partial block. */ 357 | if (offset) { 358 | int copy = (offset + nbytes > 64 ? 64 - offset : nbytes); 359 | 360 | memcpy(pms->buf + offset, p, copy); 361 | if (offset + copy < 64) 362 | return; 363 | p += copy; 364 | left -= copy; 365 | md5_process(pms, pms->buf); 366 | } 367 | 368 | /* Process full blocks. */ 369 | for (; left >= 64; p += 64, left -= 64) 370 | md5_process(pms, p); 371 | 372 | /* Process a final partial block. */ 373 | if (left) 374 | memcpy(pms->buf, p, left); 375 | } 376 | 377 | void 378 | md5_finish(md5_state_t *pms, md5_byte_t digest[16]) 379 | { 380 | static const md5_byte_t pad[64] = { 381 | 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 382 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 383 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 384 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 385 | }; 386 | md5_byte_t data[8]; 387 | int i; 388 | 389 | /* Save the length before padding. */ 390 | for (i = 0; i < 8; ++i) 391 | data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3)); 392 | /* Pad to 56 bytes mod 64. */ 393 | md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1); 394 | /* Append the length. */ 395 | md5_append(pms, data, 8); 396 | for (i = 0; i < 16; ++i) 397 | digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3)); 398 | } 399 | -------------------------------------------------------------------------------- /md5.h: -------------------------------------------------------------------------------- 1 | // This file has been copied 1:1 from the source of the Debian fdupes package into Guymager. 2 | // Only has been added this comment, no other changes. 3 | 4 | /* 5 | Copyright (C) 1999 Aladdin Enterprises. All rights reserved. 6 | 7 | This software is provided 'as-is', without any express or implied 8 | warranty. In no event will the authors be held liable for any damages 9 | arising from the use of this software. 10 | 11 | Permission is granted to anyone to use this software for any purpose, 12 | including commercial applications, and to alter it and redistribute it 13 | freely, subject to the following restrictions: 14 | 15 | 1. The origin of this software must not be misrepresented; you must not 16 | claim that you wrote the original software. If you use this software 17 | in a product, an acknowledgment in the product documentation would be 18 | appreciated but is not required. 19 | 2. Altered source versions must be plainly marked as such, and must not be 20 | misrepresented as being the original software. 21 | 3. This notice may not be removed or altered from any source distribution. 22 | 23 | L. Peter Deutsch 24 | ghost@aladdin.com 25 | 26 | */ 27 | /*$Id: md5.h $ */ 28 | /* 29 | Independent implementation of MD5 (RFC 1321). 30 | 31 | This code implements the MD5 Algorithm defined in RFC 1321. 32 | It is derived directly from the text of the RFC and not from the 33 | reference implementation. 34 | 35 | The original and principal author of md5.h is L. Peter Deutsch 36 | . Other authors are noted in the change history 37 | that follows (in reverse chronological order): 38 | 39 | 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. 40 | 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5); 41 | added conditionalization for C++ compilation from Martin 42 | Purschke . 43 | 1999-05-03 lpd Original version. 44 | */ 45 | 46 | #ifndef md5_INCLUDED 47 | # define md5_INCLUDED 48 | 49 | /* 50 | * This code has some adaptations for the Ghostscript environment, but it 51 | * will compile and run correctly in any environment with 8-bit chars and 52 | * 32-bit ints. Specifically, it assumes that if the following are 53 | * defined, they have the same meaning as in Ghostscript: P1, P2, P3, 54 | * ARCH_IS_BIG_ENDIAN. 55 | */ 56 | 57 | typedef unsigned char md5_byte_t; /* 8-bit byte */ 58 | typedef unsigned int md5_word_t; /* 32-bit word */ 59 | 60 | /* Define the state of the MD5 Algorithm. */ 61 | typedef struct md5_state_s { 62 | md5_word_t count[2]; /* message length in bits, lsw first */ 63 | md5_word_t abcd[4]; /* digest buffer */ 64 | md5_byte_t buf[64]; /* accumulate block */ 65 | } md5_state_t; 66 | 67 | #ifdef __cplusplus 68 | extern "C" 69 | { 70 | #endif 71 | 72 | /* Initialize the algorithm. */ 73 | #ifdef P1 74 | void md5_init(P1(md5_state_t *pms)); 75 | #else 76 | void md5_init(md5_state_t *pms); 77 | #endif 78 | 79 | /* Append a string to the message. */ 80 | #ifdef P3 81 | void md5_append(P3(md5_state_t *pms, const md5_byte_t *data, int nbytes)); 82 | #else 83 | void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes); 84 | #endif 85 | 86 | /* Finish the message and return the digest. */ 87 | #ifdef P2 88 | void md5_finish(P2(md5_state_t *pms, md5_byte_t digest[16])); 89 | #else 90 | void md5_finish(md5_state_t *pms, md5_byte_t digest[16]); 91 | #endif 92 | 93 | #ifdef __cplusplus 94 | } /* end extern "C" */ 95 | #endif 96 | 97 | #endif /* md5_INCLUDED */ 98 | 99 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /missing: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Common stub for a few missing GNU programs while installing. 3 | 4 | scriptversion=2006-05-10.23 5 | 6 | # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 7 | # Free Software Foundation, Inc. 8 | # Originally by Fran,cois Pinard , 1996. 9 | 10 | # This program is free software; you can redistribute it and/or modify 11 | # it under the terms of the GNU General Public License as published by 12 | # the Free Software Foundation; either version 2, or (at your option) 13 | # any later version. 14 | 15 | # This program is distributed in the hope that it will be useful, 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | # GNU General Public License for more details. 19 | 20 | # You should have received a copy of the GNU General Public License 21 | # along with this program; if not, write to the Free Software 22 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 23 | # 02110-1301, USA. 24 | 25 | # As a special exception to the GNU General Public License, if you 26 | # distribute this file as part of a program that contains a 27 | # configuration script generated by Autoconf, you may include it under 28 | # the same distribution terms that you use for the rest of that program. 29 | 30 | if test $# -eq 0; then 31 | echo 1>&2 "Try \`$0 --help' for more information" 32 | exit 1 33 | fi 34 | 35 | run=: 36 | sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' 37 | sed_minuso='s/.* -o \([^ ]*\).*/\1/p' 38 | 39 | # In the cases where this matters, `missing' is being run in the 40 | # srcdir already. 41 | if test -f configure.ac; then 42 | configure_ac=configure.ac 43 | else 44 | configure_ac=configure.in 45 | fi 46 | 47 | msg="missing on your system" 48 | 49 | case $1 in 50 | --run) 51 | # Try to run requested program, and just exit if it succeeds. 52 | run= 53 | shift 54 | "$@" && exit 0 55 | # Exit code 63 means version mismatch. This often happens 56 | # when the user try to use an ancient version of a tool on 57 | # a file that requires a minimum version. In this case we 58 | # we should proceed has if the program had been absent, or 59 | # if --run hadn't been passed. 60 | if test $? = 63; then 61 | run=: 62 | msg="probably too old" 63 | fi 64 | ;; 65 | 66 | -h|--h|--he|--hel|--help) 67 | echo "\ 68 | $0 [OPTION]... PROGRAM [ARGUMENT]... 69 | 70 | Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an 71 | error status if there is no known handling for PROGRAM. 72 | 73 | Options: 74 | -h, --help display this help and exit 75 | -v, --version output version information and exit 76 | --run try to run the given command, and emulate it if it fails 77 | 78 | Supported PROGRAM values: 79 | aclocal touch file \`aclocal.m4' 80 | autoconf touch file \`configure' 81 | autoheader touch file \`config.h.in' 82 | autom4te touch the output file, or create a stub one 83 | automake touch all \`Makefile.in' files 84 | bison create \`y.tab.[ch]', if possible, from existing .[ch] 85 | flex create \`lex.yy.c', if possible, from existing .c 86 | help2man touch the output file 87 | lex create \`lex.yy.c', if possible, from existing .c 88 | makeinfo touch the output file 89 | tar try tar, gnutar, gtar, then tar without non-portable flags 90 | yacc create \`y.tab.[ch]', if possible, from existing .[ch] 91 | 92 | Send bug reports to ." 93 | exit $? 94 | ;; 95 | 96 | -v|--v|--ve|--ver|--vers|--versi|--versio|--version) 97 | echo "missing $scriptversion (GNU Automake)" 98 | exit $? 99 | ;; 100 | 101 | -*) 102 | echo 1>&2 "$0: Unknown \`$1' option" 103 | echo 1>&2 "Try \`$0 --help' for more information" 104 | exit 1 105 | ;; 106 | 107 | esac 108 | 109 | # Now exit if we have it, but it failed. Also exit now if we 110 | # don't have it and --version was passed (most likely to detect 111 | # the program). 112 | case $1 in 113 | lex|yacc) 114 | # Not GNU programs, they don't have --version. 115 | ;; 116 | 117 | tar) 118 | if test -n "$run"; then 119 | echo 1>&2 "ERROR: \`tar' requires --run" 120 | exit 1 121 | elif test "x$2" = "x--version" || test "x$2" = "x--help"; then 122 | exit 1 123 | fi 124 | ;; 125 | 126 | *) 127 | if test -z "$run" && ($1 --version) > /dev/null 2>&1; then 128 | # We have it, but it failed. 129 | exit 1 130 | elif test "x$2" = "x--version" || test "x$2" = "x--help"; then 131 | # Could not run --version or --help. This is probably someone 132 | # running `$TOOL --version' or `$TOOL --help' to check whether 133 | # $TOOL exists and not knowing $TOOL uses missing. 134 | exit 1 135 | fi 136 | ;; 137 | esac 138 | 139 | # If it does not exist, or fails to run (possibly an outdated version), 140 | # try to emulate it. 141 | case $1 in 142 | aclocal*) 143 | echo 1>&2 "\ 144 | WARNING: \`$1' is $msg. You should only need it if 145 | you modified \`acinclude.m4' or \`${configure_ac}'. You might want 146 | to install the \`Automake' and \`Perl' packages. Grab them from 147 | any GNU archive site." 148 | touch aclocal.m4 149 | ;; 150 | 151 | autoconf) 152 | echo 1>&2 "\ 153 | WARNING: \`$1' is $msg. You should only need it if 154 | you modified \`${configure_ac}'. You might want to install the 155 | \`Autoconf' and \`GNU m4' packages. Grab them from any GNU 156 | archive site." 157 | touch configure 158 | ;; 159 | 160 | autoheader) 161 | echo 1>&2 "\ 162 | WARNING: \`$1' is $msg. You should only need it if 163 | you modified \`acconfig.h' or \`${configure_ac}'. You might want 164 | to install the \`Autoconf' and \`GNU m4' packages. Grab them 165 | from any GNU archive site." 166 | files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` 167 | test -z "$files" && files="config.h" 168 | touch_files= 169 | for f in $files; do 170 | case $f in 171 | *:*) touch_files="$touch_files "`echo "$f" | 172 | sed -e 's/^[^:]*://' -e 's/:.*//'`;; 173 | *) touch_files="$touch_files $f.in";; 174 | esac 175 | done 176 | touch $touch_files 177 | ;; 178 | 179 | automake*) 180 | echo 1>&2 "\ 181 | WARNING: \`$1' is $msg. You should only need it if 182 | you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. 183 | You might want to install the \`Automake' and \`Perl' packages. 184 | Grab them from any GNU archive site." 185 | find . -type f -name Makefile.am -print | 186 | sed 's/\.am$/.in/' | 187 | while read f; do touch "$f"; done 188 | ;; 189 | 190 | autom4te) 191 | echo 1>&2 "\ 192 | WARNING: \`$1' is needed, but is $msg. 193 | You might have modified some files without having the 194 | proper tools for further handling them. 195 | You can get \`$1' as part of \`Autoconf' from any GNU 196 | archive site." 197 | 198 | file=`echo "$*" | sed -n "$sed_output"` 199 | test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` 200 | if test -f "$file"; then 201 | touch $file 202 | else 203 | test -z "$file" || exec >$file 204 | echo "#! /bin/sh" 205 | echo "# Created by GNU Automake missing as a replacement of" 206 | echo "# $ $@" 207 | echo "exit 0" 208 | chmod +x $file 209 | exit 1 210 | fi 211 | ;; 212 | 213 | bison|yacc) 214 | echo 1>&2 "\ 215 | WARNING: \`$1' $msg. You should only need it if 216 | you modified a \`.y' file. You may need the \`Bison' package 217 | in order for those modifications to take effect. You can get 218 | \`Bison' from any GNU archive site." 219 | rm -f y.tab.c y.tab.h 220 | if test $# -ne 1; then 221 | eval LASTARG="\${$#}" 222 | case $LASTARG in 223 | *.y) 224 | SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` 225 | if test -f "$SRCFILE"; then 226 | cp "$SRCFILE" y.tab.c 227 | fi 228 | SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` 229 | if test -f "$SRCFILE"; then 230 | cp "$SRCFILE" y.tab.h 231 | fi 232 | ;; 233 | esac 234 | fi 235 | if test ! -f y.tab.h; then 236 | echo >y.tab.h 237 | fi 238 | if test ! -f y.tab.c; then 239 | echo 'main() { return 0; }' >y.tab.c 240 | fi 241 | ;; 242 | 243 | lex|flex) 244 | echo 1>&2 "\ 245 | WARNING: \`$1' is $msg. You should only need it if 246 | you modified a \`.l' file. You may need the \`Flex' package 247 | in order for those modifications to take effect. You can get 248 | \`Flex' from any GNU archive site." 249 | rm -f lex.yy.c 250 | if test $# -ne 1; then 251 | eval LASTARG="\${$#}" 252 | case $LASTARG in 253 | *.l) 254 | SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` 255 | if test -f "$SRCFILE"; then 256 | cp "$SRCFILE" lex.yy.c 257 | fi 258 | ;; 259 | esac 260 | fi 261 | if test ! -f lex.yy.c; then 262 | echo 'main() { return 0; }' >lex.yy.c 263 | fi 264 | ;; 265 | 266 | help2man) 267 | echo 1>&2 "\ 268 | WARNING: \`$1' is $msg. You should only need it if 269 | you modified a dependency of a manual page. You may need the 270 | \`Help2man' package in order for those modifications to take 271 | effect. You can get \`Help2man' from any GNU archive site." 272 | 273 | file=`echo "$*" | sed -n "$sed_output"` 274 | test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` 275 | if test -f "$file"; then 276 | touch $file 277 | else 278 | test -z "$file" || exec >$file 279 | echo ".ab help2man is required to generate this page" 280 | exit 1 281 | fi 282 | ;; 283 | 284 | makeinfo) 285 | echo 1>&2 "\ 286 | WARNING: \`$1' is $msg. You should only need it if 287 | you modified a \`.texi' or \`.texinfo' file, or any other file 288 | indirectly affecting the aspect of the manual. The spurious 289 | call might also be the consequence of using a buggy \`make' (AIX, 290 | DU, IRIX). You might want to install the \`Texinfo' package or 291 | the \`GNU make' package. Grab either from any GNU archive site." 292 | # The file to touch is that specified with -o ... 293 | file=`echo "$*" | sed -n "$sed_output"` 294 | test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` 295 | if test -z "$file"; then 296 | # ... or it is the one specified with @setfilename ... 297 | infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` 298 | file=`sed -n ' 299 | /^@setfilename/{ 300 | s/.* \([^ ]*\) *$/\1/ 301 | p 302 | q 303 | }' $infile` 304 | # ... or it is derived from the source name (dir/f.texi becomes f.info) 305 | test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info 306 | fi 307 | # If the file does not exist, the user really needs makeinfo; 308 | # let's fail without touching anything. 309 | test -f $file || exit 1 310 | touch $file 311 | ;; 312 | 313 | tar) 314 | shift 315 | 316 | # We have already tried tar in the generic part. 317 | # Look for gnutar/gtar before invocation to avoid ugly error 318 | # messages. 319 | if (gnutar --version > /dev/null 2>&1); then 320 | gnutar "$@" && exit 0 321 | fi 322 | if (gtar --version > /dev/null 2>&1); then 323 | gtar "$@" && exit 0 324 | fi 325 | firstarg="$1" 326 | if shift; then 327 | case $firstarg in 328 | *o*) 329 | firstarg=`echo "$firstarg" | sed s/o//` 330 | tar "$firstarg" "$@" && exit 0 331 | ;; 332 | esac 333 | case $firstarg in 334 | *h*) 335 | firstarg=`echo "$firstarg" | sed s/h//` 336 | tar "$firstarg" "$@" && exit 0 337 | ;; 338 | esac 339 | fi 340 | 341 | echo 1>&2 "\ 342 | WARNING: I can't seem to be able to run \`tar' with the given arguments. 343 | You may want to install GNU tar or Free paxutils, or check the 344 | command line arguments." 345 | exit 1 346 | ;; 347 | 348 | *) 349 | echo 1>&2 "\ 350 | WARNING: \`$1' is needed, and is $msg. 351 | You might have modified some files without having the 352 | proper tools for further handling them. Check the \`README' file, 353 | it often tells you about the needed prerequisites for installing 354 | this package. You may also peek at any GNU archive site, in case 355 | some other package would contain this missing \`$1' program." 356 | exit 1 357 | ;; 358 | esac 359 | 360 | exit 0 361 | 362 | # Local variables: 363 | # eval: (add-hook 'write-file-hooks 'time-stamp) 364 | # time-stamp-start: "scriptversion=" 365 | # time-stamp-format: "%:y-%02m-%02d.%02H" 366 | # time-stamp-end: "$" 367 | # End: 368 | -------------------------------------------------------------------------------- /xmount.1: -------------------------------------------------------------------------------- 1 | .\" 2 | .TH "xmount" "1" "May 9, 2012" "Gillen Daniel" "xmount" 3 | .SH "NAME" 4 | xmount \- Tool to crossmount between multiple input and output harddisk image files 5 | 6 | .SH "SYNOPSIS" 7 | .B xmount 8 | [[fopts] [mopts]] [ [...]] 9 | .br 10 | 11 | .SH "DESCRIPTION" 12 | .B xmount 13 | allows you to convert on\-the\-fly between multiple input and output 14 | harddisk image types. xmount creates a virtual file system using FUSE 15 | (Filesystem in Userspace) that contains a virtual representation of the input 16 | image. The virtual representation can be in raw DD, VirtualBox's virtual disk 17 | file format, Microsoft's Virtual Hard Disk Image format or in VmWare's VMDK 18 | file format. Input images can be raw DD, EWF (Expert Witness Compression 19 | Format) or AFF (Advanced Forensic Format) files. In addition, xmount also 20 | supports virtual write access to the output files that is redirected to a 21 | cache file. This makes it possible to boot acquired harddisk images using 22 | QEMU, KVM, VirtualBox, VmWare or alike. 23 | .br 24 | 25 | .SH "OPTIONS" 26 | .B 27 | fopts: (Options specific to FUSE) 28 | \-d: Enable FUSE's and xmount's debug mode. 29 | \-h: Display this help message. 30 | \-s: Run single threaded. 31 | \-o no_allow_other: Disable automatic addition of FUSE's allow_other option. 32 | \-o : 33 | Specify fuse mount options. Will also disable automatic addition of FUSE's 34 | allow_other option! 35 | INFO: For VMDK emulation, you have to uncomment "user_allow_other" in 36 | /etc/fuse.conf or run xmount as root. 37 | .br 38 | .B 39 | mopts: (Options specific to xmount) 40 | \-\-cache : 41 | Enable virtual write support and set cachefile to use. 42 | \-\-in : 43 | Specify input image type. Type can be "dd" or "ewf". 44 | \-\-info : 45 | Print out some infos about used compiler and libraries. 46 | \-\-out : 47 | Specify output image type. Type can be "dd", "vdi", "vhd", "vmdk(s)". 48 | \-\-owcache : 49 | Same as \-\-cache but overwrites existing cache. 50 | \-\-rw : 51 | Same as \-\-cache. 52 | \-\-version : 53 | Same as \-\-info. 54 | INFO: Input and output image type defaults to "dd" if not specified. 55 | .br 56 | .B 57 | ifile: 58 | Input image file. If you use EWF files, you have to specify all image 59 | segments! (If your shell supports it, you can use .E?? as file 60 | extension to specify them files) 61 | .br 62 | .B 63 | mntp: 64 | Mount point where virtual files should be located. 65 | .br 66 | 67 | .SH "BUGS" 68 | Hopefully none. If you find any, please e\-mail to . 69 | 70 | .SH "EXAMPLE" 71 | To xmount an EWF image from your acquired disk as a raw DD image under /mnt, 72 | use the following command: 73 | 74 | xmount \-\-in ewf ./acquired_disk.E?? /mnt 75 | 76 | To xmount the same ewf image as vdi file, you would use a command like this: 77 | 78 | xmount \-\-in ewf \-\-out vdi ./acquired_disk.E?? /mnt 79 | 80 | And to enable virtual write support on a raw DD input image xmounted as VDI 81 | file: 82 | 83 | xmount \-\-out vdi --cache ./acquired_disk.cache ./acquired_disk.dd /mnt 84 | -------------------------------------------------------------------------------- /xmount.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * xmount Copyright (c) 2008-2012 by Gillen Daniel * 3 | * * 4 | * xmount is a small tool to "fuse mount" various image formats and enable * 5 | * virtual write access. * 6 | * * 7 | * This program is free software: you can redistribute it and/or modify it * 8 | * under the terms of the GNU General Public License as published by the Free * 9 | * Software Foundation, either version 3 of the License, or (at your option) * 10 | * any later version. * 11 | * * 12 | * This program is distributed in the hope that it will be useful, but WITHOUT * 13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * 14 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * 15 | * more details. * 16 | * * 17 | * You should have received a copy of the GNU General Public License along with * 18 | * this program. If not, see . * 19 | *******************************************************************************/ 20 | 21 | #define FUSE_USE_VERSION 26 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | #undef FALSE 28 | #undef TRUE 29 | #define FALSE 0 30 | #define TRUE 1 31 | 32 | #ifndef __APPLE__ 33 | #define FOPEN fopen64 34 | #else 35 | // Apple does use fopen for fopen64 too 36 | #define FOPEN fopen 37 | #endif 38 | 39 | /* 40 | * Constants 41 | */ 42 | #define IMAGE_INFO_HEADER "The following values have been extracted from " \ 43 | "the mounted image file:\n\n" 44 | 45 | /* 46 | * Virtual image types 47 | */ 48 | typedef enum TVirtImageType { 49 | /** Virtual image is a DD file */ 50 | TVirtImageType_DD, 51 | /** Virtual image is a DMG file */ 52 | TVirtImageType_DMG, 53 | /** Virtual image is a VDI file */ 54 | TVirtImageType_VDI, 55 | /** Virtual image is a VMDK file (IDE bus)*/ 56 | TVirtImageType_VMDK, 57 | /** Virtual image is a VMDK file (SCSI bus)*/ 58 | TVirtImageType_VMDKS, 59 | /** Virtual image is a VHD file*/ 60 | TVirtImageType_VHD 61 | } TVirtImageType; 62 | 63 | /* 64 | * Input image types 65 | */ 66 | typedef enum TOrigImageType { 67 | /** Input image is a DD file */ 68 | TOrigImageType_DD, 69 | /** Input image is an EWF file */ 70 | TOrigImageType_EWF, 71 | /** Input image is an AFF file */ 72 | TOrigImageType_AFF 73 | } TOrigImageType; 74 | 75 | /* 76 | * Various mountimg runtime options 77 | */ 78 | typedef struct TXMountConfData { 79 | /** Input image type */ 80 | TOrigImageType OrigImageType; 81 | /** Virtual image type */ 82 | TVirtImageType VirtImageType; 83 | /** Enable debug output */ 84 | uint32_t Debug; 85 | /** Path of virtual image file */ 86 | char *pVirtualImagePath; 87 | /** Path of virtual VMDK file */ 88 | char *pVirtualVmdkPath; 89 | /** Path of virtual image info file */ 90 | char *pVirtualImageInfoPath; 91 | /** Enable virtual write support */ 92 | uint32_t Writable; 93 | /** Overwrite existing cache */ 94 | uint32_t OverwriteCache; 95 | /** Cache file to save changes to */ 96 | char *pCacheFile; 97 | /** Size of input image */ 98 | uint64_t OrigImageSize; 99 | /** Size of virtual image */ 100 | uint64_t VirtImageSize; 101 | /** Partial MD5 hash of input image */ 102 | uint64_t InputHashLo; 103 | uint64_t InputHashHi; 104 | } __attribute__ ((packed)) TXMountConfData; 105 | 106 | /* 107 | * VDI Binary File Header structure 108 | */ 109 | #define VDI_FILE_COMMENT "<<< This is a virtual VDI image >>>" 110 | #define VDI_HEADER_COMMENT "This VDI was emulated using xmount v" \ 111 | PACKAGE_VERSION 112 | #define VDI_IMAGE_SIGNATURE 0xBEDA107F // 1:1 copy from hp 113 | #define VDI_IMAGE_VERSION 0x00010001 // Vers 1.1 114 | #define VDI_IMAGE_TYPE_FIXED 0x00000002 // Type 2 (fixed size) 115 | #define VDI_IMAGE_FLAGS 0 116 | #define VDI_IMAGE_BLOCK_SIZE (1024*1024) // 1 Megabyte 117 | typedef struct TVdiFileHeader { 118 | // ----- VDIPREHEADER ------ 119 | /** Just text info about image type, for eyes only. */ 120 | char szFileInfo[64]; 121 | /** The image signature (VDI_IMAGE_SIGNATURE). */ 122 | uint32_t u32Signature; 123 | /** The image version (VDI_IMAGE_VERSION). */ 124 | uint32_t u32Version; 125 | // ----- VDIHEADER1PLUS ----- 126 | /** Size of header structure in bytes. */ 127 | uint32_t cbHeader; 128 | /** The image type (VDI_IMAGE_TYPE_*). */ 129 | uint32_t u32Type; 130 | /** Image flags (VDI_IMAGE_FLAGS_*). */ 131 | uint32_t fFlags; 132 | /** Image comment. (UTF-8) */ 133 | char szComment[256]; 134 | /** Offset of Blocks array from the begining of image file. 135 | * Should be sector-aligned for HDD access optimization. */ 136 | uint32_t offBlocks; 137 | /** Offset of image data from the begining of image file. 138 | * Should be sector-aligned for HDD access optimization. */ 139 | uint32_t offData; 140 | /** Legacy image geometry (previous code stored PCHS there). */ 141 | /** Cylinders. */ 142 | uint32_t cCylinders; 143 | /** Heads. */ 144 | uint32_t cHeads; 145 | /** Sectors per track. */ 146 | uint32_t cSectors; 147 | /** Sector size. (bytes per sector) */ 148 | uint32_t cbSector; 149 | /** Was BIOS HDD translation mode, now unused. */ 150 | uint32_t u32Dummy; 151 | /** Size of disk (in bytes). */ 152 | uint64_t cbDisk; 153 | /** Block size. (For instance VDI_IMAGE_BLOCK_SIZE.) Must be a power of 2! */ 154 | uint32_t cbBlock; 155 | /** Size of additional service information of every data block. 156 | * Prepended before block data. May be 0. 157 | * Should be a power of 2 and sector-aligned for optimization reasons. */ 158 | uint32_t cbBlockExtra; 159 | /** Number of blocks. */ 160 | uint32_t cBlocks; 161 | /** Number of allocated blocks. */ 162 | uint32_t cBlocksAllocated; 163 | /** UUID of image. */ 164 | uint64_t uuidCreate_l; 165 | uint64_t uuidCreate_h; 166 | /** UUID of image's last modification. */ 167 | uint64_t uuidModify_l; 168 | uint64_t uuidModify_h; 169 | /** Only for secondary images - UUID of previous image. */ 170 | uint64_t uuidLinkage_l; 171 | uint64_t uuidLinkage_h; 172 | /** Only for secondary images - UUID of previous image's last modification. */ 173 | uint64_t uuidParentModify_l; 174 | uint64_t uuidParentModify_h; 175 | /** Padding to get 512 byte alignment */ 176 | uint64_t padding0; 177 | uint64_t padding1; 178 | uint64_t padding2; 179 | uint64_t padding3; 180 | uint64_t padding4; 181 | uint64_t padding5; 182 | uint64_t padding6; 183 | } __attribute__ ((packed)) TVdiFileHeader, *pTVdiFileHeader; 184 | 185 | // /** The way the UUID is declared by the DCE specification. */ 186 | // struct 187 | // { 188 | // uint32_t u32TimeLow; 189 | // uint16_t u16TimeMid; 190 | // uint16_t u16TimeHiAndVersion; 191 | // uint8_t u8ClockSeqHiAndReserved; 192 | // uint8_t u8ClockSeqLow; 193 | // uint8_t au8Node[6]; 194 | // } Gen; 195 | 196 | /* 197 | * VHD Binary File footer structure 198 | * 199 | * At the time of writing, the specs could be found here: 200 | * http://www.microsoft.com/downloads/details.aspx? 201 | * FamilyID=C2D03242-2FFB-48EF-A211-F0C44741109E 202 | * 203 | * Warning: All values are big-endian! 204 | */ 205 | // 206 | #ifdef __LP64__ 207 | #define VHD_IMAGE_HVAL_COOKIE 0x78697463656E6F63 // "conectix" 208 | #else 209 | #define VHD_IMAGE_HVAL_COOKIE 0x78697463656E6F63LL 210 | #endif 211 | #define VHD_IMAGE_HVAL_FEATURES 0x02000000 212 | #define VHD_IMAGE_HVAL_FILE_FORMAT_VERSION 0x00000100 213 | #ifdef __LP64__ 214 | #define VHD_IMAGE_HVAL_DATA_OFFSET 0xFFFFFFFFFFFFFFFF 215 | #else 216 | #define VHD_IMAGE_HVAL_DATA_OFFSET 0xFFFFFFFFFFFFFFFFLL 217 | #endif 218 | #define VHD_IMAGE_HVAL_CREATOR_APPLICATION 0x746E6D78 // "xmnt" 219 | #define VHD_IMAGE_HVAL_CREATOR_VERSION 0x00000500 220 | // This one is funny! According to VHD specs, I can only choose between Windows 221 | // and Macintosh. I'm going to choose the most common one. 222 | #define VHD_IMAGE_HVAL_CREATOR_HOST_OS 0x6B326957 // "Win2k" 223 | #define VHD_IMAGE_HVAL_DISK_TYPE 0x02000000 224 | // Seconds from January 1st, 1970 to January 1st, 2000 225 | #define VHD_IMAGE_TIME_CONVERSION_OFFSET 0x386D97E0 226 | typedef struct TVhdFileHeader { 227 | uint64_t cookie; 228 | uint32_t features; 229 | uint32_t file_format_version; 230 | uint64_t data_offset; 231 | uint32_t creation_time; 232 | uint32_t creator_app; 233 | uint32_t creator_ver; 234 | uint32_t creator_os; 235 | uint64_t size_original; 236 | uint64_t size_current; 237 | uint16_t disk_geometry_c; 238 | uint8_t disk_geometry_h; 239 | uint8_t disk_geometry_s; 240 | uint32_t disk_type; 241 | uint32_t checksum; 242 | uint64_t uuid_l; 243 | uint64_t uuid_h; 244 | uint8_t saved_state; 245 | char Reserved[427]; 246 | } __attribute__ ((packed)) TVhdFileHeader, *pTVhdFileHeader; 247 | 248 | /* 249 | * Cache file block index array element 250 | */ 251 | #ifdef __LP64__ 252 | #define CACHE_BLOCK_FREE 0xFFFFFFFFFFFFFFFF 253 | #else 254 | #define CACHE_BLOCK_FREE 0xFFFFFFFFFFFFFFFFLL 255 | #endif 256 | typedef struct TCacheFileBlockIndex { 257 | /** Set to 1 if block is assigned (This block has data in cache file) */ 258 | uint32_t Assigned; 259 | /** Offset to data in cache file */ 260 | uint64_t off_data; 261 | } __attribute__ ((packed)) TCacheFileBlockIndex, *pTCacheFileBlockIndex; 262 | 263 | /* 264 | * Cache file header structures 265 | */ 266 | #define CACHE_BLOCK_SIZE (1024*1024) // 1 megabyte 267 | #ifdef __LP64__ 268 | #define CACHE_FILE_SIGNATURE 0xFFFF746E756F6D78 // "xmount\xFF\xFF" 269 | #else 270 | #define CACHE_FILE_SIGNATURE 0xFFFF746E756F6D78LL 271 | #endif 272 | #define CUR_CACHE_FILE_VERSION 0x00000002 // Current cache file version 273 | #define HASH_AMOUNT (1024*1024)*10 // Amount of data used to construct a 274 | // "unique" hash for every input image 275 | // (10MByte) 276 | // Current header 277 | typedef struct TCacheFileHeader { 278 | /** Simple signature to identify cache files */ 279 | uint64_t FileSignature; 280 | /** Cache file version */ 281 | uint32_t CacheFileVersion; 282 | /** Cache block size */ 283 | uint64_t BlockSize; 284 | /** Total amount of cache blocks */ 285 | uint64_t BlockCount; 286 | /** Offset to the first block index array element */ 287 | uint64_t pBlockIndex; 288 | /** Set to 1 if VDI file header is cached */ 289 | uint32_t VdiFileHeaderCached; 290 | /** Offset to cached VDI file header */ 291 | uint64_t pVdiFileHeader; 292 | /** Set to 1 if VMDK file is cached */ 293 | uint32_t VmdkFileCached; 294 | /** Size of VMDK file */ 295 | uint64_t VmdkFileSize; 296 | /** Offset to cached VMDK file */ 297 | uint64_t pVmdkFile; 298 | 299 | /** Set to 1 if VHD header is cached */ 300 | uint32_t VhdFileHeaderCached; 301 | /** Offset to cached VHD header */ 302 | uint64_t pVhdFileHeader; 303 | 304 | /** Padding until offset 512 to ease further additions */ 305 | char HeaderPadding[432]; 306 | } __attribute__ ((packed)) TCacheFileHeader, *pTCacheFileHeader; 307 | 308 | // Old v1 header 309 | typedef struct TCacheFileHeader_v1 { 310 | /** Simple signature to identify cache files */ 311 | uint64_t FileSignature; 312 | /** Cache file version */ 313 | uint32_t CacheFileVersion; 314 | /** Total amount of cache blocks */ 315 | uint64_t BlockCount; 316 | /** Offset to the first block index array element */ 317 | uint64_t pBlockIndex; 318 | /** Set to 1 if VDI file header is cached */ 319 | uint32_t VdiFileHeaderCached; 320 | /** Offset to cached VDI file header */ 321 | uint64_t pVdiFileHeader; 322 | /** Set to 1 if VMDK file is cached */ 323 | } TCacheFileHeader_v1, *pTCacheFileHeader_v1; 324 | 325 | /* 326 | * Macros to ease debugging and error reporting 327 | */ 328 | #define LOG_ERROR(...) \ 329 | LogMessage("ERROR",(char*)__FUNCTION__,__LINE__,__VA_ARGS__); 330 | #define LOG_WARNING(...) \ 331 | LogMessage("WARNING",(char*)__FUNCTION__,__LINE__,__VA_ARGS__); 332 | #define LOG_DEBUG(...) { \ 333 | if(XMountConfData.Debug) \ 334 | LogMessage("DEBUG",(char*)__FUNCTION__,__LINE__,__VA_ARGS__); \ 335 | } 336 | 337 | /* 338 | * Macros to alloc or realloc memory and check whether it worked 339 | */ 340 | #define XMOUNT_MALLOC(var,var_type,size) { \ 341 | (var)=(var_type)malloc(size); \ 342 | if((var)==NULL) { \ 343 | LOG_ERROR("Couldn't allocate memmory!\n"); \ 344 | exit(1); \ 345 | } \ 346 | } 347 | #define XMOUNT_REALLOC(var,var_type,size) { \ 348 | (var)=(var_type)realloc((var),size); \ 349 | if((var)==NULL) { \ 350 | LOG_ERROR("Couldn't allocate memmory!\n"); \ 351 | exit(1); \ 352 | } \ 353 | } 354 | 355 | /* 356 | * Macros for some often used string functions 357 | */ 358 | #define XMOUNT_STRSET(var1,var2) { \ 359 | XMOUNT_MALLOC(var1,char*,strlen(var2)+1) \ 360 | strcpy(var1,var2); \ 361 | } 362 | #define XMOUNT_STRNSET(var1,var2,size) { \ 363 | XMOUNT_MALLOC(var1,char*,(size)+1) \ 364 | strncpy(var1,var2,size); \ 365 | (var1)[size]='\0'; \ 366 | } 367 | #define XMOUNT_STRAPP(var1,var2) { \ 368 | XMOUNT_REALLOC(var1,char*,strlen(var1)+strlen(var2)+1) \ 369 | strcpy((var1)+strlen(var1),var2); \ 370 | } 371 | #define XMOUNT_STRNAPP(var1,var2,size) { \ 372 | XMOUNT_REALLOC(var1,char*,strlen(var1)+(size)+1) \ 373 | (var1)[strlen(var1)+(size)]='\0'; \ 374 | strncpy((var1)+strlen(var1),var2,size); \ 375 | } 376 | 377 | /* 378 | * Macros for endian conversions 379 | */ 380 | // First we need to have the bswap functions 381 | #if HAVE_BYTESWAP_H 382 | #include 383 | #elif defined(HAVE_ENDIAN_H) 384 | #include 385 | #elif defined(__APPLE__) 386 | #include 387 | #define bswap_16 OSSwapInt16 388 | #define bswap_32 OSSwapInt32 389 | #define bswap_64 OSSwapInt64 390 | #else 391 | #define bswap_16(value) { \ 392 | ((((value) & 0xff) << 8) | ((value) >> 8)) \ 393 | } 394 | #define bswap_32(value) { \ 395 | (((uint32_t)bswap_16((uint16_t)((value) & 0xffff)) << 16) | \ 396 | (uint32_t)bswap_16((uint16_t)((value) >> 16))) \ 397 | } 398 | #define bswap_64(value) { \ 399 | (((uint64_t)bswap_32((uint32_t)((value) & 0xffffffff)) << 32) | \ 400 | (uint64_t)bswap_32((uint32_t)((value) >> 32))) \ 401 | } 402 | #endif 403 | // Next we need to know what endianess is used 404 | #if defined(__LITTLE_ENDIAN__) 405 | #define XMOUNT_BYTEORDER_LE 406 | #elif defined(__BIG_ENDIAN__) 407 | #define XMOUNT_BYTEORDER_BE 408 | #elif defined(__BYTE_ORDER__) 409 | #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ 410 | #define XMOUNT_BYTEORDER_LE 411 | #else 412 | #define XMOUNT_BYTEORDER_BE 413 | #endif 414 | #endif 415 | // And finally we can define the macros 416 | #ifdef XMOUNT_BYTEORDER_LE 417 | #ifndef be16toh 418 | #define be16toh(x) bswap_16(x) 419 | #endif 420 | #ifndef htobe16 421 | #define htobe16(x) bswap_16(x) 422 | #endif 423 | #ifndef be32toh 424 | #define be32toh(x) bswap_32(x) 425 | #endif 426 | #ifndef htobe32 427 | #define htobe32(x) bswap_32(x) 428 | #endif 429 | #ifndef be64toh 430 | #define be64toh(x) bswap_64(x) 431 | #endif 432 | #ifndef htobe64 433 | #define htobe64(x) bswap_64(x) 434 | #endif 435 | #ifndef le16toh 436 | #define le16toh(x) (x) 437 | #endif 438 | #ifndef htole16 439 | #define htole16(x) (x) 440 | #endif 441 | #ifndef le32toh 442 | #define le32toh(x) (x) 443 | #endif 444 | #ifndef htole32 445 | #define htole32(x) (x) 446 | #endif 447 | #ifndef le64toh 448 | #define le64toh(x) (x) 449 | #endif 450 | #ifndef htole64 451 | #define htole64(x) (x) 452 | #endif 453 | #else 454 | #ifndef be16toh 455 | #define be16toh(x) (x) 456 | #endif 457 | #ifndef htobe16 458 | #define htobe16(x) (x) 459 | #endif 460 | #ifndef be32toh 461 | #define be32toh(x) (x) 462 | #endif 463 | #ifndef htobe32 464 | #define htobe32(x) (x) 465 | #endif 466 | #ifndef be64toh 467 | #define be64toh(x) (x) 468 | #endif 469 | #ifndef htobe64 470 | #define htobe64(x) (x) 471 | #endif 472 | #ifndef le16toh 473 | #define le16toh(x) bswap_16(x) 474 | #endif 475 | #ifndef htole16 476 | #define htole16(x) bswap_16(x) 477 | #endif 478 | #ifndef le32toh 479 | #define le32toh(x) bswap_32(x) 480 | #endif 481 | #ifndef htole32 482 | #define htole32(x) bswap_32(x) 483 | #endif 484 | #ifndef le64toh 485 | #define le64toh(x) bswap_64(x) 486 | #endif 487 | #ifndef htole64 488 | #define htole64(x) bswap_64(x) 489 | #endif 490 | #endif 491 | 492 | /* 493 | ----- Change history ----- 494 | 20090226: * Added change history information to this file. 495 | * Added TVirtImageType enum to identify virtual image type. 496 | * Added TOrigImageType enum to identify input image type. 497 | * Added TMountimgConfData struct to hold various mountimg runtime 498 | options. 499 | * Renamed VDIFILEHEADER to TVdiFileHeader. 500 | 20090228: * Added LOG_ERROR and LOG_DEBUG macros 501 | * Added defines for various static VDI header values 502 | * Added defines for TRUE and FALSE 503 | 20090307: * Added defines for various static cache file header values 504 | * Added VdiFileHeaderCached and pVdiFileHeader values to be able to 505 | cache the VDI file header separatly. 506 | 20090519: * Added new cache file header structure and moved old one to 507 | TCacheFileHeader_v1. 508 | * New cache file structure includes VmdkFileCached and pVmdkFile to 509 | cache virtual VMDK file and makes room for further additions so 510 | current cache file version 2 cache files can be easily converted 511 | to newer ones. 512 | 20090814: * Added XMOUNT_MALLOC and XMOUNT_REALLOC macros. 513 | 20090816: * Added XMOUNT_STRSET, XMOUNT_STRNSET, XMOUNT_STRAPP and 514 | XMOUNT_STRNAPP macros. 515 | 20100324: * Added "__attribute__ ((packed))" to all header structs to prevent 516 | different sizes on i386 and amd64. 517 | 20111109: * Added TVirtImageType_DMG type. 518 | 20120130: * Added LOG_WARNING macro. 519 | 20120507: * Added TVhdFileHeader structure. 520 | 20120511: * Added endianess conversation macros 521 | */ 522 | -------------------------------------------------------------------------------- /xmount.spec: -------------------------------------------------------------------------------- 1 | %define debug_package %{nil} 2 | 3 | Name: xmount 4 | Summary: Tool to crossmount between multiple input and output harddisk images 5 | Version: 0.5.0 6 | Release: 1%{?dist} 7 | License: GPL 8 | Group: Applications/System 9 | URL: https://www.pinguin.lu/ 10 | Source0: %{name}-%{version}.tar.gz 11 | Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root 12 | Requires: fuse openssl zlib libewf afflib 13 | BuildRequires: fuse-devel libewf-devel >= 20110903 afflib-devel 14 | 15 | %description 16 | xmount allows you to convert on-the-fly between multiple input and output 17 | harddisk image types. xmount creates a virtual file system using FUSE 18 | (Filesystem in Userspace) that contains a virtual representation of the input 19 | harddisk image. The virtual representation can be in raw DD, VirtualBox's 20 | virtual disk file format, Microsoft's Virtual Hard Disk Image format or in 21 | VMware's VMDK format. Input harddisk images can be raw DD or EWF (Expert 22 | Witness Compression Format) files. In addition, xmount also supports virtual 23 | write access to the output files that is redirected to a cache file. This 24 | makes it for example possible to boot acquired harddisk images using QEMU, 25 | KVM, VirtualBox, VMware or alike. 26 | %prep 27 | %setup -q 28 | autoreconf 29 | 30 | %build 31 | %configure 32 | make 33 | 34 | %install 35 | rm -fr %{buildroot} 36 | 37 | %makeinstall 38 | 39 | %clean 40 | rm -fr %{buildroot} 41 | 42 | %post 43 | 44 | %preun 45 | 46 | %postun 47 | 48 | %files 49 | %defattr(-,root,root) 50 | %{_bindir}/* 51 | %{_mandir}/* 52 | %doc AUTHORS COPYING INSTALL NEWS README ROADMAP 53 | 54 | %changelog 55 | * Sun May 6 2012 Daniel Gillen 0.5.0-1 56 | * Release 0.5.0-1 57 | Added support for virtual VHD image file emulation 58 | 59 | --------------------------------------------------------------------------------