├── .coveragerc ├── .gitignore ├── COPYING ├── Makefile.in ├── README.md ├── configure ├── configure.in ├── init ├── arch │ ├── .keep │ └── systemd │ │ ├── libvirt-wakeonlan.conf │ │ └── system │ │ └── libvirt-wakeonlan.service ├── debian │ ├── .keep │ ├── default │ │ └── libvirt-wakeonlan │ └── init │ │ └── libvirt-wakeonlan.conf ├── gentoo │ ├── conf.d │ │ └── libvirt-wakeonlan │ └── init.d │ │ └── libvirt-wakeonlan └── redhat │ ├── init.d │ └── libvirt-wakeonlan │ └── sysconfig │ └── libvirt-wakeonlan ├── install-sh ├── libvirtwol.py ├── lvwolutils.py ├── packages ├── arch │ ├── .keep │ ├── PKGBUILD │ └── changelog ├── debian │ ├── README.Debian │ ├── README.source │ ├── changelog │ ├── compat │ ├── control │ ├── copyright │ ├── docs │ ├── rules │ └── source │ │ └── format ├── gentoo │ └── libvirt-wakeonlan.ebuild └── redhat │ ├── BUILD │ └── .keep │ ├── BUILDROOT │ └── .keep │ ├── RPMS │ └── .keep │ ├── SOURCES │ └── .keep │ ├── SPECS │ ├── .keep │ └── libvirt-wakeonlan.spec │ └── SRPMS │ └── .keep ├── pre-commit.py ├── reportissues.py └── testing ├── full-test.sh ├── test_libvirtwol.py └── test_lvwolutils.py /.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | omit = testing/test_*,pre-commit.py,reportissues.py 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | .coverage 3 | htmlcov 4 | Makefile 5 | config.log 6 | config.status 7 | .DS_Store 8 | .*swp 9 | -------------------------------------------------------------------------------- /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 GNU GENERAL PUBLIC LICENSE 622 | Version 3, 29 June 2007 623 | 624 | Copyright (C) 2007 Free Software Foundation, Inc. 625 | Everyone is permitted to copy and distribute verbatim copies 626 | of this license document, but changing it is not allowed. 627 | 628 | Preamble 629 | 630 | The GNU General Public License is a free, copyleft license for 631 | software and other kinds of works. 632 | 633 | The licenses for most software and other practical works are designed 634 | to take away your freedom to share and change the works. By contrast, 635 | the GNU General Public License is intended to guarantee your freedom to 636 | share and change all versions of a program--to make sure it remains free 637 | software for all its users. We, the Free Software Foundation, use the 638 | GNU General Public License for most of our software; it applies also to 639 | any other work released this way by its authors. You can apply it to 640 | your programs, too. 641 | 642 | When we speak of free software, we are referring to freedom, not 643 | price. Our General Public Licenses are designed to make sure that you 644 | have the freedom to distribute copies of free software (and charge for 645 | them if you wish), that you receive source code or can get it if you 646 | want it, that you can change the software or use pieces of it in new 647 | free programs, and that you know you can do these things. 648 | 649 | To protect your rights, we need to prevent others from denying you 650 | these rights or asking you to surrender the rights. Therefore, you have 651 | certain responsibilities if you distribute copies of the software, or if 652 | you modify it: responsibilities to respect the freedom of others. 653 | 654 | For example, if you distribute copies of such a program, whether 655 | gratis or for a fee, you must pass on to the recipients the same 656 | freedoms that you received. You must make sure that they, too, receive 657 | or can get the source code. And you must show them these terms so they 658 | know their rights. 659 | 660 | Developers that use the GNU GPL protect your rights with two steps: 661 | (1) assert copyright on the software, and (2) offer you this License 662 | giving you legal permission to copy, distribute and/or modify it. 663 | 664 | For the developers' and authors' protection, the GPL clearly explains 665 | that there is no warranty for this free software. For both users' and 666 | authors' sake, the GPL requires that modified versions be marked as 667 | changed, so that their problems will not be attributed erroneously to 668 | authors of previous versions. 669 | 670 | Some devices are designed to deny users access to install or run 671 | modified versions of the software inside them, although the manufacturer 672 | can do so. This is fundamentally incompatible with the aim of 673 | protecting users' freedom to change the software. The systematic 674 | pattern of such abuse occurs in the area of products for individuals to 675 | use, which is precisely where it is most unacceptable. Therefore, we 676 | have designed this version of the GPL to prohibit the practice for those 677 | products. If such problems arise substantially in other domains, we 678 | stand ready to extend this provision to those domains in future versions 679 | of the GPL, as needed to protect the freedom of users. 680 | 681 | Finally, every program is threatened constantly by software patents. 682 | States should not allow patents to restrict development and use of 683 | software on general-purpose computers, but in those that do, we wish to 684 | avoid the special danger that patents applied to a free program could 685 | make it effectively proprietary. To prevent this, the GPL assures that 686 | patents cannot be used to render the program non-free. 687 | 688 | The precise terms and conditions for copying, distribution and 689 | modification follow. 690 | 691 | TERMS AND CONDITIONS 692 | 693 | 0. Definitions. 694 | 695 | "This License" refers to version 3 of the GNU General Public License. 696 | 697 | "Copyright" also means copyright-like laws that apply to other kinds of 698 | works, such as semiconductor masks. 699 | 700 | "The Program" refers to any copyrightable work licensed under this 701 | License. Each licensee is addressed as "you". "Licensees" and 702 | "recipients" may be individuals or organizations. 703 | 704 | To "modify" a work means to copy from or adapt all or part of the work 705 | in a fashion requiring copyright permission, other than the making of an 706 | exact copy. The resulting work is called a "modified version" of the 707 | earlier work or a work "based on" the earlier work. 708 | 709 | A "covered work" means either the unmodified Program or a work based 710 | on the Program. 711 | 712 | To "propagate" a work means to do anything with it that, without 713 | permission, would make you directly or secondarily liable for 714 | infringement under applicable copyright law, except executing it on a 715 | computer or modifying a private copy. Propagation includes copying, 716 | distribution (with or without modification), making available to the 717 | public, and in some countries other activities as well. 718 | 719 | To "convey" a work means any kind of propagation that enables other 720 | parties to make or receive copies. Mere interaction with a user through 721 | a computer network, with no transfer of a copy, is not conveying. 722 | 723 | An interactive user interface displays "Appropriate Legal Notices" 724 | to the extent that it includes a convenient and prominently visible 725 | feature that (1) displays an appropriate copyright notice, and (2) 726 | tells the user that there is no warranty for the work (except to the 727 | extent that warranties are provided), that licensees may convey the 728 | work under this License, and how to view a copy of this License. If 729 | the interface presents a list of user commands or options, such as a 730 | menu, a prominent item in the list meets this criterion. 731 | 732 | 1. Source Code. 733 | 734 | The "source code" for a work means the preferred form of the work 735 | for making modifications to it. "Object code" means any non-source 736 | form of a work. 737 | 738 | A "Standard Interface" means an interface that either is an official 739 | standard defined by a recognized standards body, or, in the case of 740 | interfaces specified for a particular programming language, one that 741 | is widely used among developers working in that language. 742 | 743 | The "System Libraries" of an executable work include anything, other 744 | than the work as a whole, that (a) is included in the normal form of 745 | packaging a Major Component, but which is not part of that Major 746 | Component, and (b) serves only to enable use of the work with that 747 | Major Component, or to implement a Standard Interface for which an 748 | implementation is available to the public in source code form. A 749 | "Major Component", in this context, means a major essential component 750 | (kernel, window system, and so on) of the specific operating system 751 | (if any) on which the executable work runs, or a compiler used to 752 | produce the work, or an object code interpreter used to run it. 753 | 754 | The "Corresponding Source" for a work in object code form means all 755 | the source code needed to generate, install, and (for an executable 756 | work) run the object code and to modify the work, including scripts to 757 | control those activities. However, it does not include the work's 758 | System Libraries, or general-purpose tools or generally available free 759 | programs which are used unmodified in performing those activities but 760 | which are not part of the work. For example, Corresponding Source 761 | includes interface definition files associated with source files for 762 | the work, and the source code for shared libraries and dynamically 763 | linked subprograms that the work is specifically designed to require, 764 | such as by intimate data communication or control flow between those 765 | subprograms and other parts of the work. 766 | 767 | The Corresponding Source need not include anything that users 768 | can regenerate automatically from other parts of the Corresponding 769 | Source. 770 | 771 | The Corresponding Source for a work in source code form is that 772 | same work. 773 | 774 | 2. Basic Permissions. 775 | 776 | All rights granted under this License are granted for the term of 777 | copyright on the Program, and are irrevocable provided the stated 778 | conditions are met. This License explicitly affirms your unlimited 779 | permission to run the unmodified Program. The output from running a 780 | covered work is covered by this License only if the output, given its 781 | content, constitutes a covered work. This License acknowledges your 782 | rights of fair use or other equivalent, as provided by copyright law. 783 | 784 | You may make, run and propagate covered works that you do not 785 | convey, without conditions so long as your license otherwise remains 786 | in force. You may convey covered works to others for the sole purpose 787 | of having them make modifications exclusively for you, or provide you 788 | with facilities for running those works, provided that you comply with 789 | the terms of this License in conveying all material for which you do 790 | not control copyright. Those thus making or running the covered works 791 | for you must do so exclusively on your behalf, under your direction 792 | and control, on terms that prohibit them from making any copies of 793 | your copyrighted material outside their relationship with you. 794 | 795 | Conveying under any other circumstances is permitted solely under 796 | the conditions stated below. Sublicensing is not allowed; section 10 797 | makes it unnecessary. 798 | 799 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 800 | 801 | No covered work shall be deemed part of an effective technological 802 | measure under any applicable law fulfilling obligations under article 803 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 804 | similar laws prohibiting or restricting circumvention of such 805 | measures. 806 | 807 | When you convey a covered work, you waive any legal power to forbid 808 | circumvention of technological measures to the extent such circumvention 809 | is effected by exercising rights under this License with respect to 810 | the covered work, and you disclaim any intention to limit operation or 811 | modification of the work as a means of enforcing, against the work's 812 | users, your or third parties' legal rights to forbid circumvention of 813 | technological measures. 814 | 815 | 4. Conveying Verbatim Copies. 816 | 817 | You may convey verbatim copies of the Program's source code as you 818 | receive it, in any medium, provided that you conspicuously and 819 | appropriately publish on each copy an appropriate copyright notice; 820 | keep intact all notices stating that this License and any 821 | non-permissive terms added in accord with section 7 apply to the code; 822 | keep intact all notices of the absence of any warranty; and give all 823 | recipients a copy of this License along with the Program. 824 | 825 | You may charge any price or no price for each copy that you convey, 826 | and you may offer support or warranty protection for a fee. 827 | 828 | 5. Conveying Modified Source Versions. 829 | 830 | You may convey a work based on the Program, or the modifications to 831 | produce it from the Program, in the form of source code under the 832 | terms of section 4, provided that you also meet all of these conditions: 833 | 834 | a) The work must carry prominent notices stating that you modified 835 | it, and giving a relevant date. 836 | 837 | b) The work must carry prominent notices stating that it is 838 | released under this License and any conditions added under section 839 | 7. This requirement modifies the requirement in section 4 to 840 | "keep intact all notices". 841 | 842 | c) You must license the entire work, as a whole, under this 843 | License to anyone who comes into possession of a copy. This 844 | License will therefore apply, along with any applicable section 7 845 | additional terms, to the whole of the work, and all its parts, 846 | regardless of how they are packaged. This License gives no 847 | permission to license the work in any other way, but it does not 848 | invalidate such permission if you have separately received it. 849 | 850 | d) If the work has interactive user interfaces, each must display 851 | Appropriate Legal Notices; however, if the Program has interactive 852 | interfaces that do not display Appropriate Legal Notices, your 853 | work need not make them do so. 854 | 855 | A compilation of a covered work with other separate and independent 856 | works, which are not by their nature extensions of the covered work, 857 | and which are not combined with it such as to form a larger program, 858 | in or on a volume of a storage or distribution medium, is called an 859 | "aggregate" if the compilation and its resulting copyright are not 860 | used to limit the access or legal rights of the compilation's users 861 | beyond what the individual works permit. Inclusion of a covered work 862 | in an aggregate does not cause this License to apply to the other 863 | parts of the aggregate. 864 | 865 | 6. Conveying Non-Source Forms. 866 | 867 | You may convey a covered work in object code form under the terms 868 | of sections 4 and 5, provided that you also convey the 869 | machine-readable Corresponding Source under the terms of this License, 870 | in one of these ways: 871 | 872 | a) Convey the object code in, or embodied in, a physical product 873 | (including a physical distribution medium), accompanied by the 874 | Corresponding Source fixed on a durable physical medium 875 | customarily used for software interchange. 876 | 877 | b) Convey the object code in, or embodied in, a physical product 878 | (including a physical distribution medium), accompanied by a 879 | written offer, valid for at least three years and valid for as 880 | long as you offer spare parts or customer support for that product 881 | model, to give anyone who possesses the object code either (1) a 882 | copy of the Corresponding Source for all the software in the 883 | product that is covered by this License, on a durable physical 884 | medium customarily used for software interchange, for a price no 885 | more than your reasonable cost of physically performing this 886 | conveying of source, or (2) access to copy the 887 | Corresponding Source from a network server at no charge. 888 | 889 | c) Convey individual copies of the object code with a copy of the 890 | written offer to provide the Corresponding Source. This 891 | alternative is allowed only occasionally and noncommercially, and 892 | only if you received the object code with such an offer, in accord 893 | with subsection 6b. 894 | 895 | d) Convey the object code by offering access from a designated 896 | place (gratis or for a charge), and offer equivalent access to the 897 | Corresponding Source in the same way through the same place at no 898 | further charge. You need not require recipients to copy the 899 | Corresponding Source along with the object code. If the place to 900 | copy the object code is a network server, the Corresponding Source 901 | may be on a different server (operated by you or a third party) 902 | that supports equivalent copying facilities, provided you maintain 903 | clear directions next to the object code saying where to find the 904 | Corresponding Source. Regardless of what server hosts the 905 | Corresponding Source, you remain obligated to ensure that it is 906 | available for as long as needed to satisfy these requirements. 907 | 908 | e) Convey the object code using peer-to-peer transmission, provided 909 | you inform other peers where the object code and Corresponding 910 | Source of the work are being offered to the general public at no 911 | charge under subsection 6d. 912 | 913 | A separable portion of the object code, whose source code is excluded 914 | from the Corresponding Source as a System Library, need not be 915 | included in conveying the object code work. 916 | 917 | A "User Product" is either (1) a "consumer product", which means any 918 | tangible personal property which is normally used for personal, family, 919 | or household purposes, or (2) anything designed or sold for incorporation 920 | into a dwelling. In determining whether a product is a consumer product, 921 | doubtful cases shall be resolved in favor of coverage. For a particular 922 | product received by a particular user, "normally used" refers to a 923 | typical or common use of that class of product, regardless of the status 924 | of the particular user or of the way in which the particular user 925 | actually uses, or expects or is expected to use, the product. A product 926 | is a consumer product regardless of whether the product has substantial 927 | commercial, industrial or non-consumer uses, unless such uses represent 928 | the only significant mode of use of the product. 929 | 930 | "Installation Information" for a User Product means any methods, 931 | procedures, authorization keys, or other information required to install 932 | and execute modified versions of a covered work in that User Product from 933 | a modified version of its Corresponding Source. The information must 934 | suffice to ensure that the continued functioning of the modified object 935 | code is in no case prevented or interfered with solely because 936 | modification has been made. 937 | 938 | If you convey an object code work under this section in, or with, or 939 | specifically for use in, a User Product, and the conveying occurs as 940 | part of a transaction in which the right of possession and use of the 941 | User Product is transferred to the recipient in perpetuity or for a 942 | fixed term (regardless of how the transaction is characterized), the 943 | Corresponding Source conveyed under this section must be accompanied 944 | by the Installation Information. But this requirement does not apply 945 | if neither you nor any third party retains the ability to install 946 | modified object code on the User Product (for example, the work has 947 | been installed in ROM). 948 | 949 | The requirement to provide Installation Information does not include a 950 | requirement to continue to provide support service, warranty, or updates 951 | for a work that has been modified or installed by the recipient, or for 952 | the User Product in which it has been modified or installed. Access to a 953 | network may be denied when the modification itself materially and 954 | adversely affects the operation of the network or violates the rules and 955 | protocols for communication across the network. 956 | 957 | Corresponding Source conveyed, and Installation Information provided, 958 | in accord with this section must be in a format that is publicly 959 | documented (and with an implementation available to the public in 960 | source code form), and must require no special password or key for 961 | unpacking, reading or copying. 962 | 963 | 7. Additional Terms. 964 | 965 | "Additional permissions" are terms that supplement the terms of this 966 | License by making exceptions from one or more of its conditions. 967 | Additional permissions that are applicable to the entire Program shall 968 | be treated as though they were included in this License, to the extent 969 | that they are valid under applicable law. If additional permissions 970 | apply only to part of the Program, that part may be used separately 971 | under those permissions, but the entire Program remains governed by 972 | this License without regard to the additional permissions. 973 | 974 | When you convey a copy of a covered work, you may at your option 975 | remove any additional permissions from that copy, or from any part of 976 | it. (Additional permissions may be written to require their own 977 | removal in certain cases when you modify the work.) You may place 978 | additional permissions on material, added by you to a covered work, 979 | for which you have or can give appropriate copyright permission. 980 | 981 | Notwithstanding any other provision of this License, for material you 982 | add to a covered work, you may (if authorized by the copyright holders of 983 | that material) supplement the terms of this License with terms: 984 | 985 | a) Disclaiming warranty or limiting liability differently from the 986 | terms of sections 15 and 16 of this License; or 987 | 988 | b) Requiring preservation of specified reasonable legal notices or 989 | author attributions in that material or in the Appropriate Legal 990 | Notices displayed by works containing it; or 991 | 992 | c) Prohibiting misrepresentation of the origin of that material, or 993 | requiring that modified versions of such material be marked in 994 | reasonable ways as different from the original version; or 995 | 996 | d) Limiting the use for publicity purposes of names of licensors or 997 | authors of the material; or 998 | 999 | e) Declining to grant rights under trademark law for use of some 1000 | trade names, trademarks, or service marks; or 1001 | 1002 | f) Requiring indemnification of licensors and authors of that 1003 | material by anyone who conveys the material (or modified versions of 1004 | it) with contractual assumptions of liability to the recipient, for 1005 | any liability that these contractual assumptions directly impose on 1006 | those licensors and authors. 1007 | 1008 | All other non-permissive additional terms are considered "further 1009 | restrictions" within the meaning of section 10. If the Program as you 1010 | received it, or any part of it, contains a notice stating that it is 1011 | governed by this License along with a term that is a further 1012 | restriction, you may remove that term. If a license document contains 1013 | a further restriction but permits relicensing or conveying under this 1014 | License, you may add to a covered work material governed by the terms 1015 | of that license document, provided that the further restriction does 1016 | not survive such relicensing or conveying. 1017 | 1018 | If you add terms to a covered work in accord with this section, you 1019 | must place, in the relevant source files, a statement of the 1020 | additional terms that apply to those files, or a notice indicating 1021 | where to find the applicable terms. 1022 | 1023 | Additional terms, permissive or non-permissive, may be stated in the 1024 | form of a separately written license, or stated as exceptions; 1025 | the above requirements apply either way. 1026 | 1027 | 8. Termination. 1028 | 1029 | You may not propagate or modify a covered work except as expressly 1030 | provided under this License. Any attempt otherwise to propagate or 1031 | modify it is void, and will automatically terminate your rights under 1032 | this License (including any patent licenses granted under the third 1033 | paragraph of section 11). 1034 | 1035 | However, if you cease all violation of this License, then your 1036 | license from a particular copyright holder is reinstated (a) 1037 | provisionally, unless and until the copyright holder explicitly and 1038 | finally terminates your license, and (b) permanently, if the copyright 1039 | holder fails to notify you of the violation by some reasonable means 1040 | prior to 60 days after the cessation. 1041 | 1042 | Moreover, your license from a particular copyright holder is 1043 | reinstated permanently if the copyright holder notifies you of the 1044 | violation by some reasonable means, this is the first time you have 1045 | received notice of violation of this License (for any work) from that 1046 | copyright holder, and you cure the violation prior to 30 days after 1047 | your receipt of the notice. 1048 | 1049 | Termination of your rights under this section does not terminate the 1050 | licenses of parties who have received copies or rights from you under 1051 | this License. If your rights have been terminated and not permanently 1052 | reinstated, you do not qualify to receive new licenses for the same 1053 | material under section 10. 1054 | 1055 | 9. Acceptance Not Required for Having Copies. 1056 | 1057 | You are not required to accept this License in order to receive or 1058 | run a copy of the Program. Ancillary propagation of a covered work 1059 | occurring solely as a consequence of using peer-to-peer transmission 1060 | to receive a copy likewise does not require acceptance. However, 1061 | nothing other than this License grants you permission to propagate or 1062 | modify any covered work. These actions infringe copyright if you do 1063 | not accept this License. Therefore, by modifying or propagating a 1064 | covered work, you indicate your acceptance of this License to do so. 1065 | 1066 | 10. Automatic Licensing of Downstream Recipients. 1067 | 1068 | Each time you convey a covered work, the recipient automatically 1069 | receives a license from the original licensors, to run, modify and 1070 | propagate that work, subject to this License. You are not responsible 1071 | for enforcing compliance by third parties with this License. 1072 | 1073 | An "entity transaction" is a transaction transferring control of an 1074 | organization, or substantially all assets of one, or subdividing an 1075 | organization, or merging organizations. If propagation of a covered 1076 | work results from an entity transaction, each party to that 1077 | transaction who receives a copy of the work also receives whatever 1078 | licenses to the work the party's predecessor in interest had or could 1079 | give under the previous paragraph, plus a right to possession of the 1080 | Corresponding Source of the work from the predecessor in interest, if 1081 | the predecessor has it or can get it with reasonable efforts. 1082 | 1083 | You may not impose any further restrictions on the exercise of the 1084 | rights granted or affirmed under this License. For example, you may 1085 | not impose a license fee, royalty, or other charge for exercise of 1086 | rights granted under this License, and you may not initiate litigation 1087 | (including a cross-claim or counterclaim in a lawsuit) alleging that 1088 | any patent claim is infringed by making, using, selling, offering for 1089 | sale, or importing the Program or any portion of it. 1090 | 1091 | 11. Patents. 1092 | 1093 | A "contributor" is a copyright holder who authorizes use under this 1094 | License of the Program or a work on which the Program is based. The 1095 | work thus licensed is called the contributor's "contributor version". 1096 | 1097 | A contributor's "essential patent claims" are all patent claims 1098 | owned or controlled by the contributor, whether already acquired or 1099 | hereafter acquired, that would be infringed by some manner, permitted 1100 | by this License, of making, using, or selling its contributor version, 1101 | but do not include claims that would be infringed only as a 1102 | consequence of further modification of the contributor version. For 1103 | purposes of this definition, "control" includes the right to grant 1104 | patent sublicenses in a manner consistent with the requirements of 1105 | this License. 1106 | 1107 | Each contributor grants you a non-exclusive, worldwide, royalty-free 1108 | patent license under the contributor's essential patent claims, to 1109 | make, use, sell, offer for sale, import and otherwise run, modify and 1110 | propagate the contents of its contributor version. 1111 | 1112 | In the following three paragraphs, a "patent license" is any express 1113 | agreement or commitment, however denominated, not to enforce a patent 1114 | (such as an express permission to practice a patent or covenant not to 1115 | sue for patent infringement). To "grant" such a patent license to a 1116 | party means to make such an agreement or commitment not to enforce a 1117 | patent against the party. 1118 | 1119 | If you convey a covered work, knowingly relying on a patent license, 1120 | and the Corresponding Source of the work is not available for anyone 1121 | to copy, free of charge and under the terms of this License, through a 1122 | publicly available network server or other readily accessible means, 1123 | then you must either (1) cause the Corresponding Source to be so 1124 | available, or (2) arrange to deprive yourself of the benefit of the 1125 | patent license for this particular work, or (3) arrange, in a manner 1126 | consistent with the requirements of this License, to extend the patent 1127 | license to downstream recipients. "Knowingly relying" means you have 1128 | actual knowledge that, but for the patent license, your conveying the 1129 | covered work in a country, or your recipient's use of the covered work 1130 | in a country, would infringe one or more identifiable patents in that 1131 | country that you have reason to believe are valid. 1132 | 1133 | If, pursuant to or in connection with a single transaction or 1134 | arrangement, you convey, or propagate by procuring conveyance of, a 1135 | covered work, and grant a patent license to some of the parties 1136 | receiving the covered work authorizing them to use, propagate, modify 1137 | or convey a specific copy of the covered work, then the patent license 1138 | you grant is automatically extended to all recipients of the covered 1139 | work and works based on it. 1140 | 1141 | A patent license is "discriminatory" if it does not include within 1142 | the scope of its coverage, prohibits the exercise of, or is 1143 | conditioned on the non-exercise of one or more of the rights that are 1144 | specifically granted under this License. You may not convey a covered 1145 | work if you are a party to an arrangement with a third party that is 1146 | in the business of distributing software, under which you make payment 1147 | to the third party based on the extent of your activity of conveying 1148 | the work, and under which the third party grants, to any of the 1149 | parties who would receive the covered work from you, a discriminatory 1150 | patent license (a) in connection with copies of the covered work 1151 | conveyed by you (or copies made from those copies), or (b) primarily 1152 | for and in connection with specific products or compilations that 1153 | contain the covered work, unless you entered into that arrangement, 1154 | or that patent license was granted, prior to 28 March 2007. 1155 | 1156 | Nothing in this License shall be construed as excluding or limiting 1157 | any implied license or other defenses to infringement that may 1158 | otherwise be available to you under applicable patent law. 1159 | 1160 | 12. No Surrender of Others' Freedom. 1161 | 1162 | If conditions are imposed on you (whether by court order, agreement or 1163 | otherwise) that contradict the conditions of this License, they do not 1164 | excuse you from the conditions of this License. If you cannot convey a 1165 | covered work so as to satisfy simultaneously your obligations under this 1166 | License and any other pertinent obligations, then as a consequence you may 1167 | not convey it at all. For example, if you agree to terms that obligate you 1168 | to collect a royalty for further conveying from those to whom you convey 1169 | the Program, the only way you could satisfy both those terms and this 1170 | License would be to refrain entirely from conveying the Program. 1171 | 1172 | 13. Use with the GNU Affero General Public License. 1173 | 1174 | Notwithstanding any other provision of this License, you have 1175 | permission to link or combine any covered work with a work licensed 1176 | under version 3 of the GNU Affero General Public License into a single 1177 | combined work, and to convey the resulting work. The terms of this 1178 | License will continue to apply to the part which is the covered work, 1179 | but the special requirements of the GNU Affero General Public License, 1180 | section 13, concerning interaction through a network will apply to the 1181 | combination as such. 1182 | 1183 | 14. Revised Versions of this License. 1184 | 1185 | The Free Software Foundation may publish revised and/or new versions of 1186 | the GNU General Public License from time to time. Such new versions will 1187 | be similar in spirit to the present version, but may differ in detail to 1188 | address new problems or concerns. 1189 | 1190 | Each version is given a distinguishing version number. If the 1191 | Program specifies that a certain numbered version of the GNU General 1192 | Public License "or any later version" applies to it, you have the 1193 | option of following the terms and conditions either of that numbered 1194 | version or of any later version published by the Free Software 1195 | Foundation. If the Program does not specify a version number of the 1196 | GNU General Public License, you may choose any version ever published 1197 | by the Free Software Foundation. 1198 | 1199 | If the Program specifies that a proxy can decide which future 1200 | versions of the GNU General Public License can be used, that proxy's 1201 | public statement of acceptance of a version permanently authorizes you 1202 | to choose that version for the Program. 1203 | 1204 | Later license versions may give you additional or different 1205 | permissions. However, no additional obligations are imposed on any 1206 | author or copyright holder as a result of your choosing to follow a 1207 | later version. 1208 | 1209 | 15. Disclaimer of Warranty. 1210 | 1211 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 1212 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 1213 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 1214 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 1215 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 1216 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 1217 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 1218 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 1219 | 1220 | 16. Limitation of Liability. 1221 | 1222 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 1223 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 1224 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 1225 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 1226 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 1227 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 1228 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 1229 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 1230 | SUCH DAMAGES. 1231 | 1232 | 17. Interpretation of Sections 15 and 16. 1233 | 1234 | If the disclaimer of warranty and limitation of liability provided 1235 | above cannot be given local legal effect according to their terms, 1236 | reviewing courts shall apply local law that most closely approximates 1237 | an absolute waiver of all civil liability in connection with the 1238 | Program, unless a warranty or assumption of liability accompanies a 1239 | copy of the Program in return for a fee. 1240 | 1241 | END OF TERMS AND CONDITIONS 1242 | -------------------------------------------------------------------------------- /Makefile.in: -------------------------------------------------------------------------------- 1 | prefix = $(DESTDIR)@prefix@ 2 | srcdir = @srcdir@ 3 | INSTALL = @INSTALL@ 4 | 5 | all: libvirtwol.py 6 | 7 | install: all 8 | mkdir -p ${prefix}/share/libvirt-wakeonlan/testing 9 | ${INSTALL} ${srcdir}/*.py ${prefix}/share/libvirt-wakeonlan/ 10 | ${INSTALL} ${srcdir}/testing/* ${prefix}/share/libvirt-wakeonlan/testing/ 11 | 12 | # gentoo 13 | if [ -f /etc/gentoo-release ] ; then \ 14 | mkdir -p $(DESTDIR)/etc/init.d $(DESTDIR)/etc/conf.d; \ 15 | ${INSTALL} ${srcdir}/init/gentoo/init.d/libvirt-wakeonlan $(DESTDIR)/etc/init.d/libvirt-wakeonlan; \ 16 | ${INSTALL} ${srcdir}/init/gentoo/conf.d/libvirt-wakeonlan $(DESTDIR)/etc/conf.d/libvirt-wakeonlan; \ 17 | fi 18 | 19 | # redhat 20 | if [ -f /etc/redhat-release ] ; then \ 21 | mkdir -p $(DESTDIR)/etc/init.d $(DESTDIR)/etc/sysconfig; \ 22 | ${INSTALL} ${srcdir}/init/redhat/init.d/libvirt-wakeonlan $(DESTDIR)/etc/init.d/libvirt-wakeonlan; \ 23 | ${INSTALL} ${srcdir}/init/redhat/sysconfig/libvirt-wakeonlan $(DESTDIR)/etc/sysconfig/libvirt-wakeonlan; \ 24 | fi 25 | 26 | # debian 27 | if [ -f /etc/debian_version ] ; then \ 28 | mkdir -p $(DESTDIR)/etc/init $(DESTDIR)/etc/default; \ 29 | find $(DESTDIR) -type d; \ 30 | ${INSTALL} ${srcdir}/init/debian/init/libvirt-wakeonlan.conf $(DESTDIR)/etc/init/libvirt-wakeonlan.conf; \ 31 | ${INSTALL} ${srcdir}/init/debian/default/libvirt-wakeonlan $(DESTDIR)/etc/default/libvirt-wakeonlan; \ 32 | fi 33 | 34 | # arch 35 | if [ -f /etc/arch-release ] ; then \ 36 | mkdir -p ${prefix}/lib/systemd/system $(DESTDIR)/etc/systemd; \ 37 | ${INSTALL} ${srcdir}/init/arch/systemd/system/libvirt-wakeonlan.service ${prefix}/lib/systemd/system/libvirt-wakeonlan.service; \ 38 | ${INSTALL} ${srcdir}/init/arch/systemd/libvirt-wakeonlan.conf $(DESTDIR)/etc/systemd/libvirt-wakeonlan.conf; \ 39 | fi -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | INTRODUCTION 2 | ============ 3 | libvirt-wakeonlan is a daemon which listens for wake on lan packets and starts libvirt based virtual machines. 4 | 5 | INSTALLATION 6 | ============ 7 | 8 | RPM/DEB/Ebuild INSTALL ( Recommended ) 9 | ================================ 10 | 11 | Download and install the package for your distro from http://lvwol.niftiestsoftware.com ( coming soon ). 12 | 13 | Refer to your own specific distribution instructions for how to install the package. Once installed, the daemon is installed as a standard service, 14 | refer to your distribution information on how to start and stop services, and ( if desired ) how to have it run automatically on boot. 15 | 16 | SOURCE INSTALL 17 | ============== 18 | 19 | Clone the git repo: 20 | 21 | git clone git://github.com/simoncadman/libvirt-wakeonlan.git 22 | 23 | cd libvirt-wakeonlan/ 24 | ./configure 25 | make install 26 | 27 | Run the daemon ( eg. service libvirt-wakeonlan start ). 28 | 29 | CONFIGURATION 30 | ============= 31 | 32 | libvirt-wakeonlan listens on eth0 by default for Wake-on-lan packets, to change this, there is a configuration file for the libvirt-wakeonlan 33 | service ( in /etc/conf.d/ on Gentoo, /etc/sysconfig on Fedora and /etc/default on Debian ), within it is a parameter called 34 | "LIBVIRTDWOL_INTERFACE" which specifies the interface used. 35 | 36 | DEVELOPING 37 | ========== 38 | 39 | Before commiting to the git repository you should set up the pre-commit hook, this ensures the version numbers in the scripts are updated: 40 | 41 | ln -s ../../pre-commit.py .git/hooks/pre-commit 42 | 43 | Copyright 44 | ========= 45 | 46 | Software and icon are copyright Simon Cadman and licenced under GNU GPL v3 ( http://www.gnu.org/licenses/gpl.html ). -------------------------------------------------------------------------------- /configure: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Guess values for system-dependent variables and create Makefiles. 3 | # Generated by GNU Autoconf 2.68 for libvirt-wakeonlan 20120415. 4 | # 5 | # Report bugs to . 6 | # 7 | # 8 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 9 | # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software 10 | # Foundation, Inc. 11 | # 12 | # 13 | # This configure script is free software; the Free Software Foundation 14 | # gives unlimited permission to copy, distribute and modify it. 15 | ## -------------------- ## 16 | ## M4sh Initialization. ## 17 | ## -------------------- ## 18 | 19 | # Be more Bourne compatible 20 | DUALCASE=1; export DUALCASE # for MKS sh 21 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 22 | emulate sh 23 | NULLCMD=: 24 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 25 | # is contrary to our usage. Disable this feature. 26 | alias -g '${1+"$@"}'='"$@"' 27 | setopt NO_GLOB_SUBST 28 | else 29 | case `(set -o) 2>/dev/null` in #( 30 | *posix*) : 31 | set -o posix ;; #( 32 | *) : 33 | ;; 34 | esac 35 | fi 36 | 37 | 38 | as_nl=' 39 | ' 40 | export as_nl 41 | # Printing a long string crashes Solaris 7 /usr/bin/printf. 42 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 43 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 44 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo 45 | # Prefer a ksh shell builtin over an external printf program on Solaris, 46 | # but without wasting forks for bash or zsh. 47 | if test -z "$BASH_VERSION$ZSH_VERSION" \ 48 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 49 | as_echo='print -r --' 50 | as_echo_n='print -rn --' 51 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 52 | as_echo='printf %s\n' 53 | as_echo_n='printf %s' 54 | else 55 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then 56 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' 57 | as_echo_n='/usr/ucb/echo -n' 58 | else 59 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 60 | as_echo_n_body='eval 61 | arg=$1; 62 | case $arg in #( 63 | *"$as_nl"*) 64 | expr "X$arg" : "X\\(.*\\)$as_nl"; 65 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 66 | esac; 67 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 68 | ' 69 | export as_echo_n_body 70 | as_echo_n='sh -c $as_echo_n_body as_echo' 71 | fi 72 | export as_echo_body 73 | as_echo='sh -c $as_echo_body as_echo' 74 | fi 75 | 76 | # The user is always right. 77 | if test "${PATH_SEPARATOR+set}" != set; then 78 | PATH_SEPARATOR=: 79 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 80 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 81 | PATH_SEPARATOR=';' 82 | } 83 | fi 84 | 85 | 86 | # IFS 87 | # We need space, tab and new line, in precisely that order. Quoting is 88 | # there to prevent editors from complaining about space-tab. 89 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word 90 | # splitting by setting IFS to empty value.) 91 | IFS=" "" $as_nl" 92 | 93 | # Find who we are. Look in the path if we contain no directory separator. 94 | as_myself= 95 | case $0 in #(( 96 | *[\\/]* ) as_myself=$0 ;; 97 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 98 | for as_dir in $PATH 99 | do 100 | IFS=$as_save_IFS 101 | test -z "$as_dir" && as_dir=. 102 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 103 | done 104 | IFS=$as_save_IFS 105 | 106 | ;; 107 | esac 108 | # We did not find ourselves, most probably we were run as `sh COMMAND' 109 | # in which case we are not to be found in the path. 110 | if test "x$as_myself" = x; then 111 | as_myself=$0 112 | fi 113 | if test ! -f "$as_myself"; then 114 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 115 | exit 1 116 | fi 117 | 118 | # Unset variables that we do not need and which cause bugs (e.g. in 119 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" 120 | # suppresses any "Segmentation fault" message there. '((' could 121 | # trigger a bug in pdksh 5.2.14. 122 | for as_var in BASH_ENV ENV MAIL MAILPATH 123 | do eval test x\${$as_var+set} = xset \ 124 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 125 | done 126 | PS1='$ ' 127 | PS2='> ' 128 | PS4='+ ' 129 | 130 | # NLS nuisances. 131 | LC_ALL=C 132 | export LC_ALL 133 | LANGUAGE=C 134 | export LANGUAGE 135 | 136 | # CDPATH. 137 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH 138 | 139 | if test "x$CONFIG_SHELL" = x; then 140 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : 141 | emulate sh 142 | NULLCMD=: 143 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which 144 | # is contrary to our usage. Disable this feature. 145 | alias -g '\${1+\"\$@\"}'='\"\$@\"' 146 | setopt NO_GLOB_SUBST 147 | else 148 | case \`(set -o) 2>/dev/null\` in #( 149 | *posix*) : 150 | set -o posix ;; #( 151 | *) : 152 | ;; 153 | esac 154 | fi 155 | " 156 | as_required="as_fn_return () { (exit \$1); } 157 | as_fn_success () { as_fn_return 0; } 158 | as_fn_failure () { as_fn_return 1; } 159 | as_fn_ret_success () { return 0; } 160 | as_fn_ret_failure () { return 1; } 161 | 162 | exitcode=0 163 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } 164 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } 165 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } 166 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } 167 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : 168 | 169 | else 170 | exitcode=1; echo positional parameters were not saved. 171 | fi 172 | test x\$exitcode = x0 || exit 1" 173 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO 174 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO 175 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && 176 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" 177 | if (eval "$as_required") 2>/dev/null; then : 178 | as_have_required=yes 179 | else 180 | as_have_required=no 181 | fi 182 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : 183 | 184 | else 185 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 186 | as_found=false 187 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH 188 | do 189 | IFS=$as_save_IFS 190 | test -z "$as_dir" && as_dir=. 191 | as_found=: 192 | case $as_dir in #( 193 | /*) 194 | for as_base in sh bash ksh sh5; do 195 | # Try only shells that exist, to save several forks. 196 | as_shell=$as_dir/$as_base 197 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && 198 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : 199 | CONFIG_SHELL=$as_shell as_have_required=yes 200 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : 201 | break 2 202 | fi 203 | fi 204 | done;; 205 | esac 206 | as_found=false 207 | done 208 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && 209 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : 210 | CONFIG_SHELL=$SHELL as_have_required=yes 211 | fi; } 212 | IFS=$as_save_IFS 213 | 214 | 215 | if test "x$CONFIG_SHELL" != x; then : 216 | # We cannot yet assume a decent shell, so we have to provide a 217 | # neutralization value for shells without unset; and this also 218 | # works around shells that cannot unset nonexistent variables. 219 | # Preserve -v and -x to the replacement shell. 220 | BASH_ENV=/dev/null 221 | ENV=/dev/null 222 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 223 | export CONFIG_SHELL 224 | case $- in # (((( 225 | *v*x* | *x*v* ) as_opts=-vx ;; 226 | *v* ) as_opts=-v ;; 227 | *x* ) as_opts=-x ;; 228 | * ) as_opts= ;; 229 | esac 230 | exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} 231 | fi 232 | 233 | if test x$as_have_required = xno; then : 234 | $as_echo "$0: This script requires a shell more modern than all" 235 | $as_echo "$0: the shells that I found on your system." 236 | if test x${ZSH_VERSION+set} = xset ; then 237 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" 238 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." 239 | else 240 | $as_echo "$0: Please tell bug-autoconf@gnu.org and 241 | $0: src@niftiestsoftware.com about your system, including 242 | $0: any error possibly output before this message. Then 243 | $0: install a modern shell, or manually run the script 244 | $0: under such a shell if you do have one." 245 | fi 246 | exit 1 247 | fi 248 | fi 249 | fi 250 | SHELL=${CONFIG_SHELL-/bin/sh} 251 | export SHELL 252 | # Unset more variables known to interfere with behavior of common tools. 253 | CLICOLOR_FORCE= GREP_OPTIONS= 254 | unset CLICOLOR_FORCE GREP_OPTIONS 255 | 256 | ## --------------------- ## 257 | ## M4sh Shell Functions. ## 258 | ## --------------------- ## 259 | # as_fn_unset VAR 260 | # --------------- 261 | # Portably unset VAR. 262 | as_fn_unset () 263 | { 264 | { eval $1=; unset $1;} 265 | } 266 | as_unset=as_fn_unset 267 | 268 | # as_fn_set_status STATUS 269 | # ----------------------- 270 | # Set $? to STATUS, without forking. 271 | as_fn_set_status () 272 | { 273 | return $1 274 | } # as_fn_set_status 275 | 276 | # as_fn_exit STATUS 277 | # ----------------- 278 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 279 | as_fn_exit () 280 | { 281 | set +e 282 | as_fn_set_status $1 283 | exit $1 284 | } # as_fn_exit 285 | 286 | # as_fn_mkdir_p 287 | # ------------- 288 | # Create "$as_dir" as a directory, including parents if necessary. 289 | as_fn_mkdir_p () 290 | { 291 | 292 | case $as_dir in #( 293 | -*) as_dir=./$as_dir;; 294 | esac 295 | test -d "$as_dir" || eval $as_mkdir_p || { 296 | as_dirs= 297 | while :; do 298 | case $as_dir in #( 299 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 300 | *) as_qdir=$as_dir;; 301 | esac 302 | as_dirs="'$as_qdir' $as_dirs" 303 | as_dir=`$as_dirname -- "$as_dir" || 304 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 305 | X"$as_dir" : 'X\(//\)[^/]' \| \ 306 | X"$as_dir" : 'X\(//\)$' \| \ 307 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 308 | $as_echo X"$as_dir" | 309 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 310 | s//\1/ 311 | q 312 | } 313 | /^X\(\/\/\)[^/].*/{ 314 | s//\1/ 315 | q 316 | } 317 | /^X\(\/\/\)$/{ 318 | s//\1/ 319 | q 320 | } 321 | /^X\(\/\).*/{ 322 | s//\1/ 323 | q 324 | } 325 | s/.*/./; q'` 326 | test -d "$as_dir" && break 327 | done 328 | test -z "$as_dirs" || eval "mkdir $as_dirs" 329 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 330 | 331 | 332 | } # as_fn_mkdir_p 333 | # as_fn_append VAR VALUE 334 | # ---------------------- 335 | # Append the text in VALUE to the end of the definition contained in VAR. Take 336 | # advantage of any shell optimizations that allow amortized linear growth over 337 | # repeated appends, instead of the typical quadratic growth present in naive 338 | # implementations. 339 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 340 | eval 'as_fn_append () 341 | { 342 | eval $1+=\$2 343 | }' 344 | else 345 | as_fn_append () 346 | { 347 | eval $1=\$$1\$2 348 | } 349 | fi # as_fn_append 350 | 351 | # as_fn_arith ARG... 352 | # ------------------ 353 | # Perform arithmetic evaluation on the ARGs, and store the result in the 354 | # global $as_val. Take advantage of shells that can avoid forks. The arguments 355 | # must be portable across $(()) and expr. 356 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 357 | eval 'as_fn_arith () 358 | { 359 | as_val=$(( $* )) 360 | }' 361 | else 362 | as_fn_arith () 363 | { 364 | as_val=`expr "$@" || test $? -eq 1` 365 | } 366 | fi # as_fn_arith 367 | 368 | 369 | # as_fn_error STATUS ERROR [LINENO LOG_FD] 370 | # ---------------------------------------- 371 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 372 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the 373 | # script with STATUS, using 1 if that was 0. 374 | as_fn_error () 375 | { 376 | as_status=$1; test $as_status -eq 0 && as_status=1 377 | if test "$4"; then 378 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 379 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 380 | fi 381 | $as_echo "$as_me: error: $2" >&2 382 | as_fn_exit $as_status 383 | } # as_fn_error 384 | 385 | if expr a : '\(a\)' >/dev/null 2>&1 && 386 | test "X`expr 00001 : '.*\(...\)'`" = X001; then 387 | as_expr=expr 388 | else 389 | as_expr=false 390 | fi 391 | 392 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 393 | as_basename=basename 394 | else 395 | as_basename=false 396 | fi 397 | 398 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 399 | as_dirname=dirname 400 | else 401 | as_dirname=false 402 | fi 403 | 404 | as_me=`$as_basename -- "$0" || 405 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 406 | X"$0" : 'X\(//\)$' \| \ 407 | X"$0" : 'X\(/\)' \| . 2>/dev/null || 408 | $as_echo X/"$0" | 409 | sed '/^.*\/\([^/][^/]*\)\/*$/{ 410 | s//\1/ 411 | q 412 | } 413 | /^X\/\(\/\/\)$/{ 414 | s//\1/ 415 | q 416 | } 417 | /^X\/\(\/\).*/{ 418 | s//\1/ 419 | q 420 | } 421 | s/.*/./; q'` 422 | 423 | # Avoid depending upon Character Ranges. 424 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' 425 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 426 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS 427 | as_cr_digits='0123456789' 428 | as_cr_alnum=$as_cr_Letters$as_cr_digits 429 | 430 | 431 | as_lineno_1=$LINENO as_lineno_1a=$LINENO 432 | as_lineno_2=$LINENO as_lineno_2a=$LINENO 433 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && 434 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { 435 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) 436 | sed -n ' 437 | p 438 | /[$]LINENO/= 439 | ' <$as_myself | 440 | sed ' 441 | s/[$]LINENO.*/&-/ 442 | t lineno 443 | b 444 | :lineno 445 | N 446 | :loop 447 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ 448 | t loop 449 | s/-\n.*// 450 | ' >$as_me.lineno && 451 | chmod +x "$as_me.lineno" || 452 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } 453 | 454 | # Don't try to exec as it changes $[0], causing all sort of problems 455 | # (the dirname of $[0] is not the place where we might find the 456 | # original and so on. Autoconf is especially sensitive to this). 457 | . "./$as_me.lineno" 458 | # Exit status is that of the last command. 459 | exit 460 | } 461 | 462 | ECHO_C= ECHO_N= ECHO_T= 463 | case `echo -n x` in #((((( 464 | -n*) 465 | case `echo 'xy\c'` in 466 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. 467 | xy) ECHO_C='\c';; 468 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 469 | ECHO_T=' ';; 470 | esac;; 471 | *) 472 | ECHO_N='-n';; 473 | esac 474 | 475 | rm -f conf$$ conf$$.exe conf$$.file 476 | if test -d conf$$.dir; then 477 | rm -f conf$$.dir/conf$$.file 478 | else 479 | rm -f conf$$.dir 480 | mkdir conf$$.dir 2>/dev/null 481 | fi 482 | if (echo >conf$$.file) 2>/dev/null; then 483 | if ln -s conf$$.file conf$$ 2>/dev/null; then 484 | as_ln_s='ln -s' 485 | # ... but there are two gotchas: 486 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 487 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 488 | # In both cases, we have to default to `cp -p'. 489 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 490 | as_ln_s='cp -p' 491 | elif ln conf$$.file conf$$ 2>/dev/null; then 492 | as_ln_s=ln 493 | else 494 | as_ln_s='cp -p' 495 | fi 496 | else 497 | as_ln_s='cp -p' 498 | fi 499 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 500 | rmdir conf$$.dir 2>/dev/null 501 | 502 | if mkdir -p . 2>/dev/null; then 503 | as_mkdir_p='mkdir -p "$as_dir"' 504 | else 505 | test -d ./-p && rmdir ./-p 506 | as_mkdir_p=false 507 | fi 508 | 509 | if test -x / >/dev/null 2>&1; then 510 | as_test_x='test -x' 511 | else 512 | if ls -dL / >/dev/null 2>&1; then 513 | as_ls_L_option=L 514 | else 515 | as_ls_L_option= 516 | fi 517 | as_test_x=' 518 | eval sh -c '\'' 519 | if test -d "$1"; then 520 | test -d "$1/."; 521 | else 522 | case $1 in #( 523 | -*)set "./$1";; 524 | esac; 525 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( 526 | ???[sx]*):;;*)false;;esac;fi 527 | '\'' sh 528 | ' 529 | fi 530 | as_executable_p=$as_test_x 531 | 532 | # Sed expression to map a string onto a valid CPP name. 533 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 534 | 535 | # Sed expression to map a string onto a valid variable name. 536 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 537 | 538 | 539 | test -n "$DJDIR" || exec 7<&0 &1 541 | 542 | # Name of the host. 543 | # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, 544 | # so uname gets run too. 545 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` 546 | 547 | # 548 | # Initializations. 549 | # 550 | ac_default_prefix=/usr/local 551 | ac_clean_files= 552 | ac_config_libobj_dir=. 553 | LIBOBJS= 554 | cross_compiling=no 555 | subdirs= 556 | MFLAGS= 557 | MAKEFLAGS= 558 | 559 | # Identity of this package. 560 | PACKAGE_NAME='libvirt-wakeonlan' 561 | PACKAGE_TARNAME='libvirt-wakeonlan' 562 | PACKAGE_VERSION='20120415' 563 | PACKAGE_STRING='libvirt-wakeonlan 20120415' 564 | PACKAGE_BUGREPORT='src@niftiestsoftware.com' 565 | PACKAGE_URL='' 566 | 567 | ac_subst_vars='LTLIBOBJS 568 | LIBOBJS 569 | INSTALL_DATA 570 | INSTALL_SCRIPT 571 | INSTALL_PROGRAM 572 | target_alias 573 | host_alias 574 | build_alias 575 | LIBS 576 | ECHO_T 577 | ECHO_N 578 | ECHO_C 579 | DEFS 580 | mandir 581 | localedir 582 | libdir 583 | psdir 584 | pdfdir 585 | dvidir 586 | htmldir 587 | infodir 588 | docdir 589 | oldincludedir 590 | includedir 591 | localstatedir 592 | sharedstatedir 593 | sysconfdir 594 | datadir 595 | datarootdir 596 | libexecdir 597 | sbindir 598 | bindir 599 | program_transform_name 600 | prefix 601 | exec_prefix 602 | PACKAGE_URL 603 | PACKAGE_BUGREPORT 604 | PACKAGE_STRING 605 | PACKAGE_VERSION 606 | PACKAGE_TARNAME 607 | PACKAGE_NAME 608 | PATH_SEPARATOR 609 | SHELL' 610 | ac_subst_files='' 611 | ac_user_opts=' 612 | enable_option_checking 613 | ' 614 | ac_precious_vars='build_alias 615 | host_alias 616 | target_alias' 617 | 618 | 619 | # Initialize some variables set by options. 620 | ac_init_help= 621 | ac_init_version=false 622 | ac_unrecognized_opts= 623 | ac_unrecognized_sep= 624 | # The variables have the same names as the options, with 625 | # dashes changed to underlines. 626 | cache_file=/dev/null 627 | exec_prefix=NONE 628 | no_create= 629 | no_recursion= 630 | prefix=NONE 631 | program_prefix=NONE 632 | program_suffix=NONE 633 | program_transform_name=s,x,x, 634 | silent= 635 | site= 636 | srcdir= 637 | verbose= 638 | x_includes=NONE 639 | x_libraries=NONE 640 | 641 | # Installation directory options. 642 | # These are left unexpanded so users can "make install exec_prefix=/foo" 643 | # and all the variables that are supposed to be based on exec_prefix 644 | # by default will actually change. 645 | # Use braces instead of parens because sh, perl, etc. also accept them. 646 | # (The list follows the same order as the GNU Coding Standards.) 647 | bindir='${exec_prefix}/bin' 648 | sbindir='${exec_prefix}/sbin' 649 | libexecdir='${exec_prefix}/libexec' 650 | datarootdir='${prefix}/share' 651 | datadir='${datarootdir}' 652 | sysconfdir='${prefix}/etc' 653 | sharedstatedir='${prefix}/com' 654 | localstatedir='${prefix}/var' 655 | includedir='${prefix}/include' 656 | oldincludedir='/usr/include' 657 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' 658 | infodir='${datarootdir}/info' 659 | htmldir='${docdir}' 660 | dvidir='${docdir}' 661 | pdfdir='${docdir}' 662 | psdir='${docdir}' 663 | libdir='${exec_prefix}/lib' 664 | localedir='${datarootdir}/locale' 665 | mandir='${datarootdir}/man' 666 | 667 | ac_prev= 668 | ac_dashdash= 669 | for ac_option 670 | do 671 | # If the previous option needs an argument, assign it. 672 | if test -n "$ac_prev"; then 673 | eval $ac_prev=\$ac_option 674 | ac_prev= 675 | continue 676 | fi 677 | 678 | case $ac_option in 679 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; 680 | *=) ac_optarg= ;; 681 | *) ac_optarg=yes ;; 682 | esac 683 | 684 | # Accept the important Cygnus configure options, so we can diagnose typos. 685 | 686 | case $ac_dashdash$ac_option in 687 | --) 688 | ac_dashdash=yes ;; 689 | 690 | -bindir | --bindir | --bindi | --bind | --bin | --bi) 691 | ac_prev=bindir ;; 692 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) 693 | bindir=$ac_optarg ;; 694 | 695 | -build | --build | --buil | --bui | --bu) 696 | ac_prev=build_alias ;; 697 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) 698 | build_alias=$ac_optarg ;; 699 | 700 | -cache-file | --cache-file | --cache-fil | --cache-fi \ 701 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) 702 | ac_prev=cache_file ;; 703 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ 704 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) 705 | cache_file=$ac_optarg ;; 706 | 707 | --config-cache | -C) 708 | cache_file=config.cache ;; 709 | 710 | -datadir | --datadir | --datadi | --datad) 711 | ac_prev=datadir ;; 712 | -datadir=* | --datadir=* | --datadi=* | --datad=*) 713 | datadir=$ac_optarg ;; 714 | 715 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ 716 | | --dataroo | --dataro | --datar) 717 | ac_prev=datarootdir ;; 718 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ 719 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) 720 | datarootdir=$ac_optarg ;; 721 | 722 | -disable-* | --disable-*) 723 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` 724 | # Reject names that are not valid shell variable names. 725 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 726 | as_fn_error $? "invalid feature name: $ac_useropt" 727 | ac_useropt_orig=$ac_useropt 728 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 729 | case $ac_user_opts in 730 | *" 731 | "enable_$ac_useropt" 732 | "*) ;; 733 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" 734 | ac_unrecognized_sep=', ';; 735 | esac 736 | eval enable_$ac_useropt=no ;; 737 | 738 | -docdir | --docdir | --docdi | --doc | --do) 739 | ac_prev=docdir ;; 740 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) 741 | docdir=$ac_optarg ;; 742 | 743 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) 744 | ac_prev=dvidir ;; 745 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) 746 | dvidir=$ac_optarg ;; 747 | 748 | -enable-* | --enable-*) 749 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` 750 | # Reject names that are not valid shell variable names. 751 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 752 | as_fn_error $? "invalid feature name: $ac_useropt" 753 | ac_useropt_orig=$ac_useropt 754 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 755 | case $ac_user_opts in 756 | *" 757 | "enable_$ac_useropt" 758 | "*) ;; 759 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" 760 | ac_unrecognized_sep=', ';; 761 | esac 762 | eval enable_$ac_useropt=\$ac_optarg ;; 763 | 764 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ 765 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ 766 | | --exec | --exe | --ex) 767 | ac_prev=exec_prefix ;; 768 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ 769 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ 770 | | --exec=* | --exe=* | --ex=*) 771 | exec_prefix=$ac_optarg ;; 772 | 773 | -gas | --gas | --ga | --g) 774 | # Obsolete; use --with-gas. 775 | with_gas=yes ;; 776 | 777 | -help | --help | --hel | --he | -h) 778 | ac_init_help=long ;; 779 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) 780 | ac_init_help=recursive ;; 781 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) 782 | ac_init_help=short ;; 783 | 784 | -host | --host | --hos | --ho) 785 | ac_prev=host_alias ;; 786 | -host=* | --host=* | --hos=* | --ho=*) 787 | host_alias=$ac_optarg ;; 788 | 789 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) 790 | ac_prev=htmldir ;; 791 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ 792 | | --ht=*) 793 | htmldir=$ac_optarg ;; 794 | 795 | -includedir | --includedir | --includedi | --included | --include \ 796 | | --includ | --inclu | --incl | --inc) 797 | ac_prev=includedir ;; 798 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ 799 | | --includ=* | --inclu=* | --incl=* | --inc=*) 800 | includedir=$ac_optarg ;; 801 | 802 | -infodir | --infodir | --infodi | --infod | --info | --inf) 803 | ac_prev=infodir ;; 804 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) 805 | infodir=$ac_optarg ;; 806 | 807 | -libdir | --libdir | --libdi | --libd) 808 | ac_prev=libdir ;; 809 | -libdir=* | --libdir=* | --libdi=* | --libd=*) 810 | libdir=$ac_optarg ;; 811 | 812 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ 813 | | --libexe | --libex | --libe) 814 | ac_prev=libexecdir ;; 815 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ 816 | | --libexe=* | --libex=* | --libe=*) 817 | libexecdir=$ac_optarg ;; 818 | 819 | -localedir | --localedir | --localedi | --localed | --locale) 820 | ac_prev=localedir ;; 821 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) 822 | localedir=$ac_optarg ;; 823 | 824 | -localstatedir | --localstatedir | --localstatedi | --localstated \ 825 | | --localstate | --localstat | --localsta | --localst | --locals) 826 | ac_prev=localstatedir ;; 827 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ 828 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 829 | localstatedir=$ac_optarg ;; 830 | 831 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) 832 | ac_prev=mandir ;; 833 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) 834 | mandir=$ac_optarg ;; 835 | 836 | -nfp | --nfp | --nf) 837 | # Obsolete; use --without-fp. 838 | with_fp=no ;; 839 | 840 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 841 | | --no-cr | --no-c | -n) 842 | no_create=yes ;; 843 | 844 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 845 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) 846 | no_recursion=yes ;; 847 | 848 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ 849 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ 850 | | --oldin | --oldi | --old | --ol | --o) 851 | ac_prev=oldincludedir ;; 852 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ 853 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ 854 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) 855 | oldincludedir=$ac_optarg ;; 856 | 857 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) 858 | ac_prev=prefix ;; 859 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) 860 | prefix=$ac_optarg ;; 861 | 862 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ 863 | | --program-pre | --program-pr | --program-p) 864 | ac_prev=program_prefix ;; 865 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ 866 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) 867 | program_prefix=$ac_optarg ;; 868 | 869 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ 870 | | --program-suf | --program-su | --program-s) 871 | ac_prev=program_suffix ;; 872 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ 873 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) 874 | program_suffix=$ac_optarg ;; 875 | 876 | -program-transform-name | --program-transform-name \ 877 | | --program-transform-nam | --program-transform-na \ 878 | | --program-transform-n | --program-transform- \ 879 | | --program-transform | --program-transfor \ 880 | | --program-transfo | --program-transf \ 881 | | --program-trans | --program-tran \ 882 | | --progr-tra | --program-tr | --program-t) 883 | ac_prev=program_transform_name ;; 884 | -program-transform-name=* | --program-transform-name=* \ 885 | | --program-transform-nam=* | --program-transform-na=* \ 886 | | --program-transform-n=* | --program-transform-=* \ 887 | | --program-transform=* | --program-transfor=* \ 888 | | --program-transfo=* | --program-transf=* \ 889 | | --program-trans=* | --program-tran=* \ 890 | | --progr-tra=* | --program-tr=* | --program-t=*) 891 | program_transform_name=$ac_optarg ;; 892 | 893 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) 894 | ac_prev=pdfdir ;; 895 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) 896 | pdfdir=$ac_optarg ;; 897 | 898 | -psdir | --psdir | --psdi | --psd | --ps) 899 | ac_prev=psdir ;; 900 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) 901 | psdir=$ac_optarg ;; 902 | 903 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 904 | | -silent | --silent | --silen | --sile | --sil) 905 | silent=yes ;; 906 | 907 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 908 | ac_prev=sbindir ;; 909 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ 910 | | --sbi=* | --sb=*) 911 | sbindir=$ac_optarg ;; 912 | 913 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ 914 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ 915 | | --sharedst | --shareds | --shared | --share | --shar \ 916 | | --sha | --sh) 917 | ac_prev=sharedstatedir ;; 918 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ 919 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ 920 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ 921 | | --sha=* | --sh=*) 922 | sharedstatedir=$ac_optarg ;; 923 | 924 | -site | --site | --sit) 925 | ac_prev=site ;; 926 | -site=* | --site=* | --sit=*) 927 | site=$ac_optarg ;; 928 | 929 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) 930 | ac_prev=srcdir ;; 931 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) 932 | srcdir=$ac_optarg ;; 933 | 934 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ 935 | | --syscon | --sysco | --sysc | --sys | --sy) 936 | ac_prev=sysconfdir ;; 937 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ 938 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) 939 | sysconfdir=$ac_optarg ;; 940 | 941 | -target | --target | --targe | --targ | --tar | --ta | --t) 942 | ac_prev=target_alias ;; 943 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) 944 | target_alias=$ac_optarg ;; 945 | 946 | -v | -verbose | --verbose | --verbos | --verbo | --verb) 947 | verbose=yes ;; 948 | 949 | -version | --version | --versio | --versi | --vers | -V) 950 | ac_init_version=: ;; 951 | 952 | -with-* | --with-*) 953 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` 954 | # Reject names that are not valid shell variable names. 955 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 956 | as_fn_error $? "invalid package name: $ac_useropt" 957 | ac_useropt_orig=$ac_useropt 958 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 959 | case $ac_user_opts in 960 | *" 961 | "with_$ac_useropt" 962 | "*) ;; 963 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" 964 | ac_unrecognized_sep=', ';; 965 | esac 966 | eval with_$ac_useropt=\$ac_optarg ;; 967 | 968 | -without-* | --without-*) 969 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` 970 | # Reject names that are not valid shell variable names. 971 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 972 | as_fn_error $? "invalid package name: $ac_useropt" 973 | ac_useropt_orig=$ac_useropt 974 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 975 | case $ac_user_opts in 976 | *" 977 | "with_$ac_useropt" 978 | "*) ;; 979 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" 980 | ac_unrecognized_sep=', ';; 981 | esac 982 | eval with_$ac_useropt=no ;; 983 | 984 | --x) 985 | # Obsolete; use --with-x. 986 | with_x=yes ;; 987 | 988 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ 989 | | --x-incl | --x-inc | --x-in | --x-i) 990 | ac_prev=x_includes ;; 991 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ 992 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) 993 | x_includes=$ac_optarg ;; 994 | 995 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ 996 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) 997 | ac_prev=x_libraries ;; 998 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ 999 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 1000 | x_libraries=$ac_optarg ;; 1001 | 1002 | -*) as_fn_error $? "unrecognized option: \`$ac_option' 1003 | Try \`$0 --help' for more information" 1004 | ;; 1005 | 1006 | *=*) 1007 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` 1008 | # Reject names that are not valid shell variable names. 1009 | case $ac_envvar in #( 1010 | '' | [0-9]* | *[!_$as_cr_alnum]* ) 1011 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; 1012 | esac 1013 | eval $ac_envvar=\$ac_optarg 1014 | export $ac_envvar ;; 1015 | 1016 | *) 1017 | # FIXME: should be removed in autoconf 3.0. 1018 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 1019 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 1020 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 1021 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" 1022 | ;; 1023 | 1024 | esac 1025 | done 1026 | 1027 | if test -n "$ac_prev"; then 1028 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` 1029 | as_fn_error $? "missing argument to $ac_option" 1030 | fi 1031 | 1032 | if test -n "$ac_unrecognized_opts"; then 1033 | case $enable_option_checking in 1034 | no) ;; 1035 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; 1036 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; 1037 | esac 1038 | fi 1039 | 1040 | # Check all directory arguments for consistency. 1041 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ 1042 | datadir sysconfdir sharedstatedir localstatedir includedir \ 1043 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 1044 | libdir localedir mandir 1045 | do 1046 | eval ac_val=\$$ac_var 1047 | # Remove trailing slashes. 1048 | case $ac_val in 1049 | */ ) 1050 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` 1051 | eval $ac_var=\$ac_val;; 1052 | esac 1053 | # Be sure to have absolute directory names. 1054 | case $ac_val in 1055 | [\\/$]* | ?:[\\/]* ) continue;; 1056 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; 1057 | esac 1058 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" 1059 | done 1060 | 1061 | # There might be people who depend on the old broken behavior: `$host' 1062 | # used to hold the argument of --host etc. 1063 | # FIXME: To remove some day. 1064 | build=$build_alias 1065 | host=$host_alias 1066 | target=$target_alias 1067 | 1068 | # FIXME: To remove some day. 1069 | if test "x$host_alias" != x; then 1070 | if test "x$build_alias" = x; then 1071 | cross_compiling=maybe 1072 | $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. 1073 | If a cross compiler is detected then cross compile mode will be used" >&2 1074 | elif test "x$build_alias" != "x$host_alias"; then 1075 | cross_compiling=yes 1076 | fi 1077 | fi 1078 | 1079 | ac_tool_prefix= 1080 | test -n "$host_alias" && ac_tool_prefix=$host_alias- 1081 | 1082 | test "$silent" = yes && exec 6>/dev/null 1083 | 1084 | 1085 | ac_pwd=`pwd` && test -n "$ac_pwd" && 1086 | ac_ls_di=`ls -di .` && 1087 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || 1088 | as_fn_error $? "working directory cannot be determined" 1089 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || 1090 | as_fn_error $? "pwd does not report name of working directory" 1091 | 1092 | 1093 | # Find the source files, if location was not specified. 1094 | if test -z "$srcdir"; then 1095 | ac_srcdir_defaulted=yes 1096 | # Try the directory containing this script, then the parent directory. 1097 | ac_confdir=`$as_dirname -- "$as_myself" || 1098 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 1099 | X"$as_myself" : 'X\(//\)[^/]' \| \ 1100 | X"$as_myself" : 'X\(//\)$' \| \ 1101 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || 1102 | $as_echo X"$as_myself" | 1103 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 1104 | s//\1/ 1105 | q 1106 | } 1107 | /^X\(\/\/\)[^/].*/{ 1108 | s//\1/ 1109 | q 1110 | } 1111 | /^X\(\/\/\)$/{ 1112 | s//\1/ 1113 | q 1114 | } 1115 | /^X\(\/\).*/{ 1116 | s//\1/ 1117 | q 1118 | } 1119 | s/.*/./; q'` 1120 | srcdir=$ac_confdir 1121 | if test ! -r "$srcdir/$ac_unique_file"; then 1122 | srcdir=.. 1123 | fi 1124 | else 1125 | ac_srcdir_defaulted=no 1126 | fi 1127 | if test ! -r "$srcdir/$ac_unique_file"; then 1128 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." 1129 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" 1130 | fi 1131 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" 1132 | ac_abs_confdir=`( 1133 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" 1134 | pwd)` 1135 | # When building in place, set srcdir=. 1136 | if test "$ac_abs_confdir" = "$ac_pwd"; then 1137 | srcdir=. 1138 | fi 1139 | # Remove unnecessary trailing slashes from srcdir. 1140 | # Double slashes in file names in object file debugging info 1141 | # mess up M-x gdb in Emacs. 1142 | case $srcdir in 1143 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; 1144 | esac 1145 | for ac_var in $ac_precious_vars; do 1146 | eval ac_env_${ac_var}_set=\${${ac_var}+set} 1147 | eval ac_env_${ac_var}_value=\$${ac_var} 1148 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} 1149 | eval ac_cv_env_${ac_var}_value=\$${ac_var} 1150 | done 1151 | 1152 | # 1153 | # Report the --help message. 1154 | # 1155 | if test "$ac_init_help" = "long"; then 1156 | # Omit some internal or obsolete options to make the list less imposing. 1157 | # This message is too long to be a string in the A/UX 3.1 sh. 1158 | cat <<_ACEOF 1159 | \`configure' configures libvirt-wakeonlan 20120415 to adapt to many kinds of systems. 1160 | 1161 | Usage: $0 [OPTION]... [VAR=VALUE]... 1162 | 1163 | To assign environment variables (e.g., CC, CFLAGS...), specify them as 1164 | VAR=VALUE. See below for descriptions of some of the useful variables. 1165 | 1166 | Defaults for the options are specified in brackets. 1167 | 1168 | Configuration: 1169 | -h, --help display this help and exit 1170 | --help=short display options specific to this package 1171 | --help=recursive display the short help of all the included packages 1172 | -V, --version display version information and exit 1173 | -q, --quiet, --silent do not print \`checking ...' messages 1174 | --cache-file=FILE cache test results in FILE [disabled] 1175 | -C, --config-cache alias for \`--cache-file=config.cache' 1176 | -n, --no-create do not create output files 1177 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] 1178 | 1179 | Installation directories: 1180 | --prefix=PREFIX install architecture-independent files in PREFIX 1181 | [$ac_default_prefix] 1182 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 1183 | [PREFIX] 1184 | 1185 | By default, \`make install' will install all the files in 1186 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify 1187 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', 1188 | for instance \`--prefix=\$HOME'. 1189 | 1190 | For better control, use the options below. 1191 | 1192 | Fine tuning of the installation directories: 1193 | --bindir=DIR user executables [EPREFIX/bin] 1194 | --sbindir=DIR system admin executables [EPREFIX/sbin] 1195 | --libexecdir=DIR program executables [EPREFIX/libexec] 1196 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] 1197 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 1198 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] 1199 | --libdir=DIR object code libraries [EPREFIX/lib] 1200 | --includedir=DIR C header files [PREFIX/include] 1201 | --oldincludedir=DIR C header files for non-gcc [/usr/include] 1202 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] 1203 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] 1204 | --infodir=DIR info documentation [DATAROOTDIR/info] 1205 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] 1206 | --mandir=DIR man documentation [DATAROOTDIR/man] 1207 | --docdir=DIR documentation root 1208 | [DATAROOTDIR/doc/libvirt-wakeonlan] 1209 | --htmldir=DIR html documentation [DOCDIR] 1210 | --dvidir=DIR dvi documentation [DOCDIR] 1211 | --pdfdir=DIR pdf documentation [DOCDIR] 1212 | --psdir=DIR ps documentation [DOCDIR] 1213 | _ACEOF 1214 | 1215 | cat <<\_ACEOF 1216 | _ACEOF 1217 | fi 1218 | 1219 | if test -n "$ac_init_help"; then 1220 | case $ac_init_help in 1221 | short | recursive ) echo "Configuration of libvirt-wakeonlan 20120415:";; 1222 | esac 1223 | cat <<\_ACEOF 1224 | 1225 | Report bugs to . 1226 | _ACEOF 1227 | ac_status=$? 1228 | fi 1229 | 1230 | if test "$ac_init_help" = "recursive"; then 1231 | # If there are subdirs, report their specific --help. 1232 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue 1233 | test -d "$ac_dir" || 1234 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || 1235 | continue 1236 | ac_builddir=. 1237 | 1238 | case "$ac_dir" in 1239 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 1240 | *) 1241 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 1242 | # A ".." for each directory in $ac_dir_suffix. 1243 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 1244 | case $ac_top_builddir_sub in 1245 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 1246 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 1247 | esac ;; 1248 | esac 1249 | ac_abs_top_builddir=$ac_pwd 1250 | ac_abs_builddir=$ac_pwd$ac_dir_suffix 1251 | # for backward compatibility: 1252 | ac_top_builddir=$ac_top_build_prefix 1253 | 1254 | case $srcdir in 1255 | .) # We are building in place. 1256 | ac_srcdir=. 1257 | ac_top_srcdir=$ac_top_builddir_sub 1258 | ac_abs_top_srcdir=$ac_pwd ;; 1259 | [\\/]* | ?:[\\/]* ) # Absolute name. 1260 | ac_srcdir=$srcdir$ac_dir_suffix; 1261 | ac_top_srcdir=$srcdir 1262 | ac_abs_top_srcdir=$srcdir ;; 1263 | *) # Relative name. 1264 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 1265 | ac_top_srcdir=$ac_top_build_prefix$srcdir 1266 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 1267 | esac 1268 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 1269 | 1270 | cd "$ac_dir" || { ac_status=$?; continue; } 1271 | # Check for guested configure. 1272 | if test -f "$ac_srcdir/configure.gnu"; then 1273 | echo && 1274 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive 1275 | elif test -f "$ac_srcdir/configure"; then 1276 | echo && 1277 | $SHELL "$ac_srcdir/configure" --help=recursive 1278 | else 1279 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 1280 | fi || ac_status=$? 1281 | cd "$ac_pwd" || { ac_status=$?; break; } 1282 | done 1283 | fi 1284 | 1285 | test -n "$ac_init_help" && exit $ac_status 1286 | if $ac_init_version; then 1287 | cat <<\_ACEOF 1288 | libvirt-wakeonlan configure 20120415 1289 | generated by GNU Autoconf 2.68 1290 | 1291 | Copyright (C) 2010 Free Software Foundation, Inc. 1292 | This configure script is free software; the Free Software Foundation 1293 | gives unlimited permission to copy, distribute and modify it. 1294 | _ACEOF 1295 | exit 1296 | fi 1297 | 1298 | ## ------------------------ ## 1299 | ## Autoconf initialization. ## 1300 | ## ------------------------ ## 1301 | cat >config.log <<_ACEOF 1302 | This file contains any messages produced by compilers while 1303 | running configure, to aid debugging if configure makes a mistake. 1304 | 1305 | It was created by libvirt-wakeonlan $as_me 20120415, which was 1306 | generated by GNU Autoconf 2.68. Invocation command line was 1307 | 1308 | $ $0 $@ 1309 | 1310 | _ACEOF 1311 | exec 5>>config.log 1312 | { 1313 | cat <<_ASUNAME 1314 | ## --------- ## 1315 | ## Platform. ## 1316 | ## --------- ## 1317 | 1318 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` 1319 | uname -m = `(uname -m) 2>/dev/null || echo unknown` 1320 | uname -r = `(uname -r) 2>/dev/null || echo unknown` 1321 | uname -s = `(uname -s) 2>/dev/null || echo unknown` 1322 | uname -v = `(uname -v) 2>/dev/null || echo unknown` 1323 | 1324 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` 1325 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` 1326 | 1327 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` 1328 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` 1329 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` 1330 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` 1331 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` 1332 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` 1333 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` 1334 | 1335 | _ASUNAME 1336 | 1337 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1338 | for as_dir in $PATH 1339 | do 1340 | IFS=$as_save_IFS 1341 | test -z "$as_dir" && as_dir=. 1342 | $as_echo "PATH: $as_dir" 1343 | done 1344 | IFS=$as_save_IFS 1345 | 1346 | } >&5 1347 | 1348 | cat >&5 <<_ACEOF 1349 | 1350 | 1351 | ## ----------- ## 1352 | ## Core tests. ## 1353 | ## ----------- ## 1354 | 1355 | _ACEOF 1356 | 1357 | 1358 | # Keep a trace of the command line. 1359 | # Strip out --no-create and --no-recursion so they do not pile up. 1360 | # Strip out --silent because we don't want to record it for future runs. 1361 | # Also quote any args containing shell meta-characters. 1362 | # Make two passes to allow for proper duplicate-argument suppression. 1363 | ac_configure_args= 1364 | ac_configure_args0= 1365 | ac_configure_args1= 1366 | ac_must_keep_next=false 1367 | for ac_pass in 1 2 1368 | do 1369 | for ac_arg 1370 | do 1371 | case $ac_arg in 1372 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; 1373 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 1374 | | -silent | --silent | --silen | --sile | --sil) 1375 | continue ;; 1376 | *\'*) 1377 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 1378 | esac 1379 | case $ac_pass in 1380 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 1381 | 2) 1382 | as_fn_append ac_configure_args1 " '$ac_arg'" 1383 | if test $ac_must_keep_next = true; then 1384 | ac_must_keep_next=false # Got value, back to normal. 1385 | else 1386 | case $ac_arg in 1387 | *=* | --config-cache | -C | -disable-* | --disable-* \ 1388 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ 1389 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ 1390 | | -with-* | --with-* | -without-* | --without-* | --x) 1391 | case "$ac_configure_args0 " in 1392 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; 1393 | esac 1394 | ;; 1395 | -* ) ac_must_keep_next=true ;; 1396 | esac 1397 | fi 1398 | as_fn_append ac_configure_args " '$ac_arg'" 1399 | ;; 1400 | esac 1401 | done 1402 | done 1403 | { ac_configure_args0=; unset ac_configure_args0;} 1404 | { ac_configure_args1=; unset ac_configure_args1;} 1405 | 1406 | # When interrupted or exit'd, cleanup temporary files, and complete 1407 | # config.log. We remove comments because anyway the quotes in there 1408 | # would cause problems or look ugly. 1409 | # WARNING: Use '\'' to represent an apostrophe within the trap. 1410 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. 1411 | trap 'exit_status=$? 1412 | # Save into config.log some information that might help in debugging. 1413 | { 1414 | echo 1415 | 1416 | $as_echo "## ---------------- ## 1417 | ## Cache variables. ## 1418 | ## ---------------- ##" 1419 | echo 1420 | # The following way of writing the cache mishandles newlines in values, 1421 | ( 1422 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do 1423 | eval ac_val=\$$ac_var 1424 | case $ac_val in #( 1425 | *${as_nl}*) 1426 | case $ac_var in #( 1427 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 1428 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 1429 | esac 1430 | case $ac_var in #( 1431 | _ | IFS | as_nl) ;; #( 1432 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 1433 | *) { eval $ac_var=; unset $ac_var;} ;; 1434 | esac ;; 1435 | esac 1436 | done 1437 | (set) 2>&1 | 1438 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( 1439 | *${as_nl}ac_space=\ *) 1440 | sed -n \ 1441 | "s/'\''/'\''\\\\'\'''\''/g; 1442 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" 1443 | ;; #( 1444 | *) 1445 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 1446 | ;; 1447 | esac | 1448 | sort 1449 | ) 1450 | echo 1451 | 1452 | $as_echo "## ----------------- ## 1453 | ## Output variables. ## 1454 | ## ----------------- ##" 1455 | echo 1456 | for ac_var in $ac_subst_vars 1457 | do 1458 | eval ac_val=\$$ac_var 1459 | case $ac_val in 1460 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 1461 | esac 1462 | $as_echo "$ac_var='\''$ac_val'\''" 1463 | done | sort 1464 | echo 1465 | 1466 | if test -n "$ac_subst_files"; then 1467 | $as_echo "## ------------------- ## 1468 | ## File substitutions. ## 1469 | ## ------------------- ##" 1470 | echo 1471 | for ac_var in $ac_subst_files 1472 | do 1473 | eval ac_val=\$$ac_var 1474 | case $ac_val in 1475 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 1476 | esac 1477 | $as_echo "$ac_var='\''$ac_val'\''" 1478 | done | sort 1479 | echo 1480 | fi 1481 | 1482 | if test -s confdefs.h; then 1483 | $as_echo "## ----------- ## 1484 | ## confdefs.h. ## 1485 | ## ----------- ##" 1486 | echo 1487 | cat confdefs.h 1488 | echo 1489 | fi 1490 | test "$ac_signal" != 0 && 1491 | $as_echo "$as_me: caught signal $ac_signal" 1492 | $as_echo "$as_me: exit $exit_status" 1493 | } >&5 1494 | rm -f core *.core core.conftest.* && 1495 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && 1496 | exit $exit_status 1497 | ' 0 1498 | for ac_signal in 1 2 13 15; do 1499 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal 1500 | done 1501 | ac_signal=0 1502 | 1503 | # confdefs.h avoids OS command line length limits that DEFS can exceed. 1504 | rm -f -r conftest* confdefs.h 1505 | 1506 | $as_echo "/* confdefs.h */" > confdefs.h 1507 | 1508 | # Predefined preprocessor variables. 1509 | 1510 | cat >>confdefs.h <<_ACEOF 1511 | #define PACKAGE_NAME "$PACKAGE_NAME" 1512 | _ACEOF 1513 | 1514 | cat >>confdefs.h <<_ACEOF 1515 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" 1516 | _ACEOF 1517 | 1518 | cat >>confdefs.h <<_ACEOF 1519 | #define PACKAGE_VERSION "$PACKAGE_VERSION" 1520 | _ACEOF 1521 | 1522 | cat >>confdefs.h <<_ACEOF 1523 | #define PACKAGE_STRING "$PACKAGE_STRING" 1524 | _ACEOF 1525 | 1526 | cat >>confdefs.h <<_ACEOF 1527 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" 1528 | _ACEOF 1529 | 1530 | cat >>confdefs.h <<_ACEOF 1531 | #define PACKAGE_URL "$PACKAGE_URL" 1532 | _ACEOF 1533 | 1534 | 1535 | # Let the site file select an alternate cache file if it wants to. 1536 | # Prefer an explicitly selected file to automatically selected ones. 1537 | ac_site_file1=NONE 1538 | ac_site_file2=NONE 1539 | if test -n "$CONFIG_SITE"; then 1540 | # We do not want a PATH search for config.site. 1541 | case $CONFIG_SITE in #(( 1542 | -*) ac_site_file1=./$CONFIG_SITE;; 1543 | */*) ac_site_file1=$CONFIG_SITE;; 1544 | *) ac_site_file1=./$CONFIG_SITE;; 1545 | esac 1546 | elif test "x$prefix" != xNONE; then 1547 | ac_site_file1=$prefix/share/config.site 1548 | ac_site_file2=$prefix/etc/config.site 1549 | else 1550 | ac_site_file1=$ac_default_prefix/share/config.site 1551 | ac_site_file2=$ac_default_prefix/etc/config.site 1552 | fi 1553 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" 1554 | do 1555 | test "x$ac_site_file" = xNONE && continue 1556 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then 1557 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 1558 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} 1559 | sed 's/^/| /' "$ac_site_file" >&5 1560 | . "$ac_site_file" \ 1561 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 1562 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 1563 | as_fn_error $? "failed to load site script $ac_site_file 1564 | See \`config.log' for more details" "$LINENO" 5; } 1565 | fi 1566 | done 1567 | 1568 | if test -r "$cache_file"; then 1569 | # Some versions of bash will fail to source /dev/null (special files 1570 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. 1571 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then 1572 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 1573 | $as_echo "$as_me: loading cache $cache_file" >&6;} 1574 | case $cache_file in 1575 | [\\/]* | ?:[\\/]* ) . "$cache_file";; 1576 | *) . "./$cache_file";; 1577 | esac 1578 | fi 1579 | else 1580 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 1581 | $as_echo "$as_me: creating cache $cache_file" >&6;} 1582 | >$cache_file 1583 | fi 1584 | 1585 | # Check that the precious variables saved in the cache have kept the same 1586 | # value. 1587 | ac_cache_corrupted=false 1588 | for ac_var in $ac_precious_vars; do 1589 | eval ac_old_set=\$ac_cv_env_${ac_var}_set 1590 | eval ac_new_set=\$ac_env_${ac_var}_set 1591 | eval ac_old_val=\$ac_cv_env_${ac_var}_value 1592 | eval ac_new_val=\$ac_env_${ac_var}_value 1593 | case $ac_old_set,$ac_new_set in 1594 | set,) 1595 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 1596 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} 1597 | ac_cache_corrupted=: ;; 1598 | ,set) 1599 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 1600 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} 1601 | ac_cache_corrupted=: ;; 1602 | ,);; 1603 | *) 1604 | if test "x$ac_old_val" != "x$ac_new_val"; then 1605 | # differences in whitespace do not lead to failure. 1606 | ac_old_val_w=`echo x $ac_old_val` 1607 | ac_new_val_w=`echo x $ac_new_val` 1608 | if test "$ac_old_val_w" != "$ac_new_val_w"; then 1609 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 1610 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} 1611 | ac_cache_corrupted=: 1612 | else 1613 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 1614 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} 1615 | eval $ac_var=\$ac_old_val 1616 | fi 1617 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 1618 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} 1619 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 1620 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} 1621 | fi;; 1622 | esac 1623 | # Pass precious variables to config.status. 1624 | if test "$ac_new_set" = set; then 1625 | case $ac_new_val in 1626 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; 1627 | *) ac_arg=$ac_var=$ac_new_val ;; 1628 | esac 1629 | case " $ac_configure_args " in 1630 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. 1631 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; 1632 | esac 1633 | fi 1634 | done 1635 | if $ac_cache_corrupted; then 1636 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 1637 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 1638 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 1639 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} 1640 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 1641 | fi 1642 | ## -------------------- ## 1643 | ## Main body of script. ## 1644 | ## -------------------- ## 1645 | 1646 | ac_ext=c 1647 | ac_cpp='$CPP $CPPFLAGS' 1648 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 1649 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 1650 | ac_compiler_gnu=$ac_cv_c_compiler_gnu 1651 | 1652 | 1653 | ac_aux_dir= 1654 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do 1655 | if test -f "$ac_dir/install-sh"; then 1656 | ac_aux_dir=$ac_dir 1657 | ac_install_sh="$ac_aux_dir/install-sh -c" 1658 | break 1659 | elif test -f "$ac_dir/install.sh"; then 1660 | ac_aux_dir=$ac_dir 1661 | ac_install_sh="$ac_aux_dir/install.sh -c" 1662 | break 1663 | elif test -f "$ac_dir/shtool"; then 1664 | ac_aux_dir=$ac_dir 1665 | ac_install_sh="$ac_aux_dir/shtool install -c" 1666 | break 1667 | fi 1668 | done 1669 | if test -z "$ac_aux_dir"; then 1670 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 1671 | fi 1672 | 1673 | # These three variables are undocumented and unsupported, 1674 | # and are intended to be withdrawn in a future Autoconf release. 1675 | # They can cause serious problems if a builder's source tree is in a directory 1676 | # whose full name contains unusual characters. 1677 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. 1678 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. 1679 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. 1680 | 1681 | 1682 | # Find a good install program. We prefer a C program (faster), 1683 | # so one script is as good as another. But avoid the broken or 1684 | # incompatible versions: 1685 | # SysV /etc/install, /usr/sbin/install 1686 | # SunOS /usr/etc/install 1687 | # IRIX /sbin/install 1688 | # AIX /bin/install 1689 | # AmigaOS /C/install, which installs bootblocks on floppy discs 1690 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag 1691 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args 1692 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" 1693 | # OS/2's system install, which has a completely different semantic 1694 | # ./install, which can be erroneously created by make from ./install.sh. 1695 | # Reject install programs that cannot install multiple files. 1696 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 1697 | $as_echo_n "checking for a BSD-compatible install... " >&6; } 1698 | if test -z "$INSTALL"; then 1699 | if ${ac_cv_path_install+:} false; then : 1700 | $as_echo_n "(cached) " >&6 1701 | else 1702 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1703 | for as_dir in $PATH 1704 | do 1705 | IFS=$as_save_IFS 1706 | test -z "$as_dir" && as_dir=. 1707 | # Account for people who put trailing slashes in PATH elements. 1708 | case $as_dir/ in #(( 1709 | ./ | .// | /[cC]/* | \ 1710 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ 1711 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ 1712 | /usr/ucb/* ) ;; 1713 | *) 1714 | # OSF1 and SCO ODT 3.0 have their own names for install. 1715 | # Don't use installbsd from OSF since it installs stuff as root 1716 | # by default. 1717 | for ac_prog in ginstall scoinst install; do 1718 | for ac_exec_ext in '' $ac_executable_extensions; do 1719 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then 1720 | if test $ac_prog = install && 1721 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then 1722 | # AIX install. It has an incompatible calling convention. 1723 | : 1724 | elif test $ac_prog = install && 1725 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then 1726 | # program-specific install script used by HP pwplus--don't use. 1727 | : 1728 | else 1729 | rm -rf conftest.one conftest.two conftest.dir 1730 | echo one > conftest.one 1731 | echo two > conftest.two 1732 | mkdir conftest.dir 1733 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && 1734 | test -s conftest.one && test -s conftest.two && 1735 | test -s conftest.dir/conftest.one && 1736 | test -s conftest.dir/conftest.two 1737 | then 1738 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" 1739 | break 3 1740 | fi 1741 | fi 1742 | fi 1743 | done 1744 | done 1745 | ;; 1746 | esac 1747 | 1748 | done 1749 | IFS=$as_save_IFS 1750 | 1751 | rm -rf conftest.one conftest.two conftest.dir 1752 | 1753 | fi 1754 | if test "${ac_cv_path_install+set}" = set; then 1755 | INSTALL=$ac_cv_path_install 1756 | else 1757 | # As a last resort, use the slow shell script. Don't cache a 1758 | # value for INSTALL within a source directory, because that will 1759 | # break other packages using the cache if that directory is 1760 | # removed, or if the value is a relative name. 1761 | INSTALL=$ac_install_sh 1762 | fi 1763 | fi 1764 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 1765 | $as_echo "$INSTALL" >&6; } 1766 | 1767 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. 1768 | # It thinks the first close brace ends the variable substitution. 1769 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' 1770 | 1771 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' 1772 | 1773 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' 1774 | 1775 | 1776 | # Checks for header files. 1777 | 1778 | # Checks for typedefs, structures, and compiler characteristics. 1779 | 1780 | # Checks for library functions. 1781 | 1782 | ac_config_files="$ac_config_files " 1783 | 1784 | ac_config_files="$ac_config_files Makefile" 1785 | 1786 | cat >confcache <<\_ACEOF 1787 | # This file is a shell script that caches the results of configure 1788 | # tests run on this system so they can be shared between configure 1789 | # scripts and configure runs, see configure's option --config-cache. 1790 | # It is not useful on other systems. If it contains results you don't 1791 | # want to keep, you may remove or edit it. 1792 | # 1793 | # config.status only pays attention to the cache file if you give it 1794 | # the --recheck option to rerun configure. 1795 | # 1796 | # `ac_cv_env_foo' variables (set or unset) will be overridden when 1797 | # loading this file, other *unset* `ac_cv_foo' will be assigned the 1798 | # following values. 1799 | 1800 | _ACEOF 1801 | 1802 | # The following way of writing the cache mishandles newlines in values, 1803 | # but we know of no workaround that is simple, portable, and efficient. 1804 | # So, we kill variables containing newlines. 1805 | # Ultrix sh set writes to stderr and can't be redirected directly, 1806 | # and sets the high bit in the cache file unless we assign to the vars. 1807 | ( 1808 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do 1809 | eval ac_val=\$$ac_var 1810 | case $ac_val in #( 1811 | *${as_nl}*) 1812 | case $ac_var in #( 1813 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 1814 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 1815 | esac 1816 | case $ac_var in #( 1817 | _ | IFS | as_nl) ;; #( 1818 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 1819 | *) { eval $ac_var=; unset $ac_var;} ;; 1820 | esac ;; 1821 | esac 1822 | done 1823 | 1824 | (set) 2>&1 | 1825 | case $as_nl`(ac_space=' '; set) 2>&1` in #( 1826 | *${as_nl}ac_space=\ *) 1827 | # `set' does not quote correctly, so add quotes: double-quote 1828 | # substitution turns \\\\ into \\, and sed turns \\ into \. 1829 | sed -n \ 1830 | "s/'/'\\\\''/g; 1831 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" 1832 | ;; #( 1833 | *) 1834 | # `set' quotes correctly as required by POSIX, so do not add quotes. 1835 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 1836 | ;; 1837 | esac | 1838 | sort 1839 | ) | 1840 | sed ' 1841 | /^ac_cv_env_/b end 1842 | t clear 1843 | :clear 1844 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ 1845 | t end 1846 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ 1847 | :end' >>confcache 1848 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else 1849 | if test -w "$cache_file"; then 1850 | if test "x$cache_file" != "x/dev/null"; then 1851 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 1852 | $as_echo "$as_me: updating cache $cache_file" >&6;} 1853 | if test ! -f "$cache_file" || test -h "$cache_file"; then 1854 | cat confcache >"$cache_file" 1855 | else 1856 | case $cache_file in #( 1857 | */* | ?:*) 1858 | mv -f confcache "$cache_file"$$ && 1859 | mv -f "$cache_file"$$ "$cache_file" ;; #( 1860 | *) 1861 | mv -f confcache "$cache_file" ;; 1862 | esac 1863 | fi 1864 | fi 1865 | else 1866 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 1867 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} 1868 | fi 1869 | fi 1870 | rm -f confcache 1871 | 1872 | test "x$prefix" = xNONE && prefix=$ac_default_prefix 1873 | # Let make expand exec_prefix. 1874 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 1875 | 1876 | # Transform confdefs.h into DEFS. 1877 | # Protect against shell expansion while executing Makefile rules. 1878 | # Protect against Makefile macro expansion. 1879 | # 1880 | # If the first sed substitution is executed (which looks for macros that 1881 | # take arguments), then branch to the quote section. Otherwise, 1882 | # look for a macro that doesn't take arguments. 1883 | ac_script=' 1884 | :mline 1885 | /\\$/{ 1886 | N 1887 | s,\\\n,, 1888 | b mline 1889 | } 1890 | t clear 1891 | :clear 1892 | s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g 1893 | t quote 1894 | s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g 1895 | t quote 1896 | b any 1897 | :quote 1898 | s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g 1899 | s/\[/\\&/g 1900 | s/\]/\\&/g 1901 | s/\$/$$/g 1902 | H 1903 | :any 1904 | ${ 1905 | g 1906 | s/^\n// 1907 | s/\n/ /g 1908 | p 1909 | } 1910 | ' 1911 | DEFS=`sed -n "$ac_script" confdefs.h` 1912 | 1913 | 1914 | ac_libobjs= 1915 | ac_ltlibobjs= 1916 | U= 1917 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 1918 | # 1. Remove the extension, and $U if already installed. 1919 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' 1920 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` 1921 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR 1922 | # will be set to the directory where LIBOBJS objects are built. 1923 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" 1924 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' 1925 | done 1926 | LIBOBJS=$ac_libobjs 1927 | 1928 | LTLIBOBJS=$ac_ltlibobjs 1929 | 1930 | 1931 | 1932 | : "${CONFIG_STATUS=./config.status}" 1933 | ac_write_fail=0 1934 | ac_clean_files_save=$ac_clean_files 1935 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" 1936 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 1937 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} 1938 | as_write_fail=0 1939 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 1940 | #! $SHELL 1941 | # Generated by $as_me. 1942 | # Run this file to recreate the current configuration. 1943 | # Compiler output produced by configure, useful for debugging 1944 | # configure, is in config.log if it exists. 1945 | 1946 | debug=false 1947 | ac_cs_recheck=false 1948 | ac_cs_silent=false 1949 | 1950 | SHELL=\${CONFIG_SHELL-$SHELL} 1951 | export SHELL 1952 | _ASEOF 1953 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 1954 | ## -------------------- ## 1955 | ## M4sh Initialization. ## 1956 | ## -------------------- ## 1957 | 1958 | # Be more Bourne compatible 1959 | DUALCASE=1; export DUALCASE # for MKS sh 1960 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 1961 | emulate sh 1962 | NULLCMD=: 1963 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 1964 | # is contrary to our usage. Disable this feature. 1965 | alias -g '${1+"$@"}'='"$@"' 1966 | setopt NO_GLOB_SUBST 1967 | else 1968 | case `(set -o) 2>/dev/null` in #( 1969 | *posix*) : 1970 | set -o posix ;; #( 1971 | *) : 1972 | ;; 1973 | esac 1974 | fi 1975 | 1976 | 1977 | as_nl=' 1978 | ' 1979 | export as_nl 1980 | # Printing a long string crashes Solaris 7 /usr/bin/printf. 1981 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1982 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 1983 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo 1984 | # Prefer a ksh shell builtin over an external printf program on Solaris, 1985 | # but without wasting forks for bash or zsh. 1986 | if test -z "$BASH_VERSION$ZSH_VERSION" \ 1987 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 1988 | as_echo='print -r --' 1989 | as_echo_n='print -rn --' 1990 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 1991 | as_echo='printf %s\n' 1992 | as_echo_n='printf %s' 1993 | else 1994 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then 1995 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' 1996 | as_echo_n='/usr/ucb/echo -n' 1997 | else 1998 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 1999 | as_echo_n_body='eval 2000 | arg=$1; 2001 | case $arg in #( 2002 | *"$as_nl"*) 2003 | expr "X$arg" : "X\\(.*\\)$as_nl"; 2004 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 2005 | esac; 2006 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 2007 | ' 2008 | export as_echo_n_body 2009 | as_echo_n='sh -c $as_echo_n_body as_echo' 2010 | fi 2011 | export as_echo_body 2012 | as_echo='sh -c $as_echo_body as_echo' 2013 | fi 2014 | 2015 | # The user is always right. 2016 | if test "${PATH_SEPARATOR+set}" != set; then 2017 | PATH_SEPARATOR=: 2018 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 2019 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 2020 | PATH_SEPARATOR=';' 2021 | } 2022 | fi 2023 | 2024 | 2025 | # IFS 2026 | # We need space, tab and new line, in precisely that order. Quoting is 2027 | # there to prevent editors from complaining about space-tab. 2028 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word 2029 | # splitting by setting IFS to empty value.) 2030 | IFS=" "" $as_nl" 2031 | 2032 | # Find who we are. Look in the path if we contain no directory separator. 2033 | as_myself= 2034 | case $0 in #(( 2035 | *[\\/]* ) as_myself=$0 ;; 2036 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2037 | for as_dir in $PATH 2038 | do 2039 | IFS=$as_save_IFS 2040 | test -z "$as_dir" && as_dir=. 2041 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 2042 | done 2043 | IFS=$as_save_IFS 2044 | 2045 | ;; 2046 | esac 2047 | # We did not find ourselves, most probably we were run as `sh COMMAND' 2048 | # in which case we are not to be found in the path. 2049 | if test "x$as_myself" = x; then 2050 | as_myself=$0 2051 | fi 2052 | if test ! -f "$as_myself"; then 2053 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 2054 | exit 1 2055 | fi 2056 | 2057 | # Unset variables that we do not need and which cause bugs (e.g. in 2058 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" 2059 | # suppresses any "Segmentation fault" message there. '((' could 2060 | # trigger a bug in pdksh 5.2.14. 2061 | for as_var in BASH_ENV ENV MAIL MAILPATH 2062 | do eval test x\${$as_var+set} = xset \ 2063 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 2064 | done 2065 | PS1='$ ' 2066 | PS2='> ' 2067 | PS4='+ ' 2068 | 2069 | # NLS nuisances. 2070 | LC_ALL=C 2071 | export LC_ALL 2072 | LANGUAGE=C 2073 | export LANGUAGE 2074 | 2075 | # CDPATH. 2076 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH 2077 | 2078 | 2079 | # as_fn_error STATUS ERROR [LINENO LOG_FD] 2080 | # ---------------------------------------- 2081 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 2082 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the 2083 | # script with STATUS, using 1 if that was 0. 2084 | as_fn_error () 2085 | { 2086 | as_status=$1; test $as_status -eq 0 && as_status=1 2087 | if test "$4"; then 2088 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2089 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 2090 | fi 2091 | $as_echo "$as_me: error: $2" >&2 2092 | as_fn_exit $as_status 2093 | } # as_fn_error 2094 | 2095 | 2096 | # as_fn_set_status STATUS 2097 | # ----------------------- 2098 | # Set $? to STATUS, without forking. 2099 | as_fn_set_status () 2100 | { 2101 | return $1 2102 | } # as_fn_set_status 2103 | 2104 | # as_fn_exit STATUS 2105 | # ----------------- 2106 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 2107 | as_fn_exit () 2108 | { 2109 | set +e 2110 | as_fn_set_status $1 2111 | exit $1 2112 | } # as_fn_exit 2113 | 2114 | # as_fn_unset VAR 2115 | # --------------- 2116 | # Portably unset VAR. 2117 | as_fn_unset () 2118 | { 2119 | { eval $1=; unset $1;} 2120 | } 2121 | as_unset=as_fn_unset 2122 | # as_fn_append VAR VALUE 2123 | # ---------------------- 2124 | # Append the text in VALUE to the end of the definition contained in VAR. Take 2125 | # advantage of any shell optimizations that allow amortized linear growth over 2126 | # repeated appends, instead of the typical quadratic growth present in naive 2127 | # implementations. 2128 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 2129 | eval 'as_fn_append () 2130 | { 2131 | eval $1+=\$2 2132 | }' 2133 | else 2134 | as_fn_append () 2135 | { 2136 | eval $1=\$$1\$2 2137 | } 2138 | fi # as_fn_append 2139 | 2140 | # as_fn_arith ARG... 2141 | # ------------------ 2142 | # Perform arithmetic evaluation on the ARGs, and store the result in the 2143 | # global $as_val. Take advantage of shells that can avoid forks. The arguments 2144 | # must be portable across $(()) and expr. 2145 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 2146 | eval 'as_fn_arith () 2147 | { 2148 | as_val=$(( $* )) 2149 | }' 2150 | else 2151 | as_fn_arith () 2152 | { 2153 | as_val=`expr "$@" || test $? -eq 1` 2154 | } 2155 | fi # as_fn_arith 2156 | 2157 | 2158 | if expr a : '\(a\)' >/dev/null 2>&1 && 2159 | test "X`expr 00001 : '.*\(...\)'`" = X001; then 2160 | as_expr=expr 2161 | else 2162 | as_expr=false 2163 | fi 2164 | 2165 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 2166 | as_basename=basename 2167 | else 2168 | as_basename=false 2169 | fi 2170 | 2171 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 2172 | as_dirname=dirname 2173 | else 2174 | as_dirname=false 2175 | fi 2176 | 2177 | as_me=`$as_basename -- "$0" || 2178 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 2179 | X"$0" : 'X\(//\)$' \| \ 2180 | X"$0" : 'X\(/\)' \| . 2>/dev/null || 2181 | $as_echo X/"$0" | 2182 | sed '/^.*\/\([^/][^/]*\)\/*$/{ 2183 | s//\1/ 2184 | q 2185 | } 2186 | /^X\/\(\/\/\)$/{ 2187 | s//\1/ 2188 | q 2189 | } 2190 | /^X\/\(\/\).*/{ 2191 | s//\1/ 2192 | q 2193 | } 2194 | s/.*/./; q'` 2195 | 2196 | # Avoid depending upon Character Ranges. 2197 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' 2198 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 2199 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS 2200 | as_cr_digits='0123456789' 2201 | as_cr_alnum=$as_cr_Letters$as_cr_digits 2202 | 2203 | ECHO_C= ECHO_N= ECHO_T= 2204 | case `echo -n x` in #((((( 2205 | -n*) 2206 | case `echo 'xy\c'` in 2207 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. 2208 | xy) ECHO_C='\c';; 2209 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 2210 | ECHO_T=' ';; 2211 | esac;; 2212 | *) 2213 | ECHO_N='-n';; 2214 | esac 2215 | 2216 | rm -f conf$$ conf$$.exe conf$$.file 2217 | if test -d conf$$.dir; then 2218 | rm -f conf$$.dir/conf$$.file 2219 | else 2220 | rm -f conf$$.dir 2221 | mkdir conf$$.dir 2>/dev/null 2222 | fi 2223 | if (echo >conf$$.file) 2>/dev/null; then 2224 | if ln -s conf$$.file conf$$ 2>/dev/null; then 2225 | as_ln_s='ln -s' 2226 | # ... but there are two gotchas: 2227 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 2228 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 2229 | # In both cases, we have to default to `cp -p'. 2230 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 2231 | as_ln_s='cp -p' 2232 | elif ln conf$$.file conf$$ 2>/dev/null; then 2233 | as_ln_s=ln 2234 | else 2235 | as_ln_s='cp -p' 2236 | fi 2237 | else 2238 | as_ln_s='cp -p' 2239 | fi 2240 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 2241 | rmdir conf$$.dir 2>/dev/null 2242 | 2243 | 2244 | # as_fn_mkdir_p 2245 | # ------------- 2246 | # Create "$as_dir" as a directory, including parents if necessary. 2247 | as_fn_mkdir_p () 2248 | { 2249 | 2250 | case $as_dir in #( 2251 | -*) as_dir=./$as_dir;; 2252 | esac 2253 | test -d "$as_dir" || eval $as_mkdir_p || { 2254 | as_dirs= 2255 | while :; do 2256 | case $as_dir in #( 2257 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 2258 | *) as_qdir=$as_dir;; 2259 | esac 2260 | as_dirs="'$as_qdir' $as_dirs" 2261 | as_dir=`$as_dirname -- "$as_dir" || 2262 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 2263 | X"$as_dir" : 'X\(//\)[^/]' \| \ 2264 | X"$as_dir" : 'X\(//\)$' \| \ 2265 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 2266 | $as_echo X"$as_dir" | 2267 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 2268 | s//\1/ 2269 | q 2270 | } 2271 | /^X\(\/\/\)[^/].*/{ 2272 | s//\1/ 2273 | q 2274 | } 2275 | /^X\(\/\/\)$/{ 2276 | s//\1/ 2277 | q 2278 | } 2279 | /^X\(\/\).*/{ 2280 | s//\1/ 2281 | q 2282 | } 2283 | s/.*/./; q'` 2284 | test -d "$as_dir" && break 2285 | done 2286 | test -z "$as_dirs" || eval "mkdir $as_dirs" 2287 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 2288 | 2289 | 2290 | } # as_fn_mkdir_p 2291 | if mkdir -p . 2>/dev/null; then 2292 | as_mkdir_p='mkdir -p "$as_dir"' 2293 | else 2294 | test -d ./-p && rmdir ./-p 2295 | as_mkdir_p=false 2296 | fi 2297 | 2298 | if test -x / >/dev/null 2>&1; then 2299 | as_test_x='test -x' 2300 | else 2301 | if ls -dL / >/dev/null 2>&1; then 2302 | as_ls_L_option=L 2303 | else 2304 | as_ls_L_option= 2305 | fi 2306 | as_test_x=' 2307 | eval sh -c '\'' 2308 | if test -d "$1"; then 2309 | test -d "$1/."; 2310 | else 2311 | case $1 in #( 2312 | -*)set "./$1";; 2313 | esac; 2314 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( 2315 | ???[sx]*):;;*)false;;esac;fi 2316 | '\'' sh 2317 | ' 2318 | fi 2319 | as_executable_p=$as_test_x 2320 | 2321 | # Sed expression to map a string onto a valid CPP name. 2322 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 2323 | 2324 | # Sed expression to map a string onto a valid variable name. 2325 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 2326 | 2327 | 2328 | exec 6>&1 2329 | ## ----------------------------------- ## 2330 | ## Main body of $CONFIG_STATUS script. ## 2331 | ## ----------------------------------- ## 2332 | _ASEOF 2333 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 2334 | 2335 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2336 | # Save the log message, to keep $0 and so on meaningful, and to 2337 | # report actual input values of CONFIG_FILES etc. instead of their 2338 | # values after options handling. 2339 | ac_log=" 2340 | This file was extended by libvirt-wakeonlan $as_me 20120415, which was 2341 | generated by GNU Autoconf 2.68. Invocation command line was 2342 | 2343 | CONFIG_FILES = $CONFIG_FILES 2344 | CONFIG_HEADERS = $CONFIG_HEADERS 2345 | CONFIG_LINKS = $CONFIG_LINKS 2346 | CONFIG_COMMANDS = $CONFIG_COMMANDS 2347 | $ $0 $@ 2348 | 2349 | on `(hostname || uname -n) 2>/dev/null | sed 1q` 2350 | " 2351 | 2352 | _ACEOF 2353 | 2354 | case $ac_config_files in *" 2355 | "*) set x $ac_config_files; shift; ac_config_files=$*;; 2356 | esac 2357 | 2358 | 2359 | 2360 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 2361 | # Files that config.status was made for. 2362 | config_files="$ac_config_files" 2363 | 2364 | _ACEOF 2365 | 2366 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2367 | ac_cs_usage="\ 2368 | \`$as_me' instantiates files and other configuration actions 2369 | from templates according to the current configuration. Unless the files 2370 | and actions are specified as TAGs, all are instantiated by default. 2371 | 2372 | Usage: $0 [OPTION]... [TAG]... 2373 | 2374 | -h, --help print this help, then exit 2375 | -V, --version print version number and configuration settings, then exit 2376 | --config print configuration, then exit 2377 | -q, --quiet, --silent 2378 | do not print progress messages 2379 | -d, --debug don't remove temporary files 2380 | --recheck update $as_me by reconfiguring in the same conditions 2381 | --file=FILE[:TEMPLATE] 2382 | instantiate the configuration file FILE 2383 | 2384 | Configuration files: 2385 | $config_files 2386 | 2387 | Report bugs to ." 2388 | 2389 | _ACEOF 2390 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 2391 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" 2392 | ac_cs_version="\\ 2393 | libvirt-wakeonlan config.status 20120415 2394 | configured by $0, generated by GNU Autoconf 2.68, 2395 | with options \\"\$ac_cs_config\\" 2396 | 2397 | Copyright (C) 2010 Free Software Foundation, Inc. 2398 | This config.status script is free software; the Free Software Foundation 2399 | gives unlimited permission to copy, distribute and modify it." 2400 | 2401 | ac_pwd='$ac_pwd' 2402 | srcdir='$srcdir' 2403 | INSTALL='$INSTALL' 2404 | test -n "\$AWK" || AWK=awk 2405 | _ACEOF 2406 | 2407 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2408 | # The default lists apply if the user does not specify any file. 2409 | ac_need_defaults=: 2410 | while test $# != 0 2411 | do 2412 | case $1 in 2413 | --*=?*) 2414 | ac_option=`expr "X$1" : 'X\([^=]*\)='` 2415 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` 2416 | ac_shift=: 2417 | ;; 2418 | --*=) 2419 | ac_option=`expr "X$1" : 'X\([^=]*\)='` 2420 | ac_optarg= 2421 | ac_shift=: 2422 | ;; 2423 | *) 2424 | ac_option=$1 2425 | ac_optarg=$2 2426 | ac_shift=shift 2427 | ;; 2428 | esac 2429 | 2430 | case $ac_option in 2431 | # Handling of the options. 2432 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 2433 | ac_cs_recheck=: ;; 2434 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) 2435 | $as_echo "$ac_cs_version"; exit ;; 2436 | --config | --confi | --conf | --con | --co | --c ) 2437 | $as_echo "$ac_cs_config"; exit ;; 2438 | --debug | --debu | --deb | --de | --d | -d ) 2439 | debug=: ;; 2440 | --file | --fil | --fi | --f ) 2441 | $ac_shift 2442 | case $ac_optarg in 2443 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 2444 | '') as_fn_error $? "missing file argument" ;; 2445 | esac 2446 | as_fn_append CONFIG_FILES " '$ac_optarg'" 2447 | ac_need_defaults=false;; 2448 | --he | --h | --help | --hel | -h ) 2449 | $as_echo "$ac_cs_usage"; exit ;; 2450 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 2451 | | -silent | --silent | --silen | --sile | --sil | --si | --s) 2452 | ac_cs_silent=: ;; 2453 | 2454 | # This is an error. 2455 | -*) as_fn_error $? "unrecognized option: \`$1' 2456 | Try \`$0 --help' for more information." ;; 2457 | 2458 | *) as_fn_append ac_config_targets " $1" 2459 | ac_need_defaults=false ;; 2460 | 2461 | esac 2462 | shift 2463 | done 2464 | 2465 | ac_configure_extra_args= 2466 | 2467 | if $ac_cs_silent; then 2468 | exec 6>/dev/null 2469 | ac_configure_extra_args="$ac_configure_extra_args --silent" 2470 | fi 2471 | 2472 | _ACEOF 2473 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 2474 | if \$ac_cs_recheck; then 2475 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion 2476 | shift 2477 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 2478 | CONFIG_SHELL='$SHELL' 2479 | export CONFIG_SHELL 2480 | exec "\$@" 2481 | fi 2482 | 2483 | _ACEOF 2484 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2485 | exec 5>>config.log 2486 | { 2487 | echo 2488 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 2489 | ## Running $as_me. ## 2490 | _ASBOX 2491 | $as_echo "$ac_log" 2492 | } >&5 2493 | 2494 | _ACEOF 2495 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 2496 | _ACEOF 2497 | 2498 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2499 | 2500 | # Handling of arguments. 2501 | for ac_config_target in $ac_config_targets 2502 | do 2503 | case $ac_config_target in 2504 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; 2505 | 2506 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 2507 | esac 2508 | done 2509 | 2510 | 2511 | # If the user did not use the arguments to specify the items to instantiate, 2512 | # then the envvar interface is used. Set only those that are not. 2513 | # We use the long form for the default assignment because of an extremely 2514 | # bizarre bug on SunOS 4.1.3. 2515 | if $ac_need_defaults; then 2516 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files 2517 | fi 2518 | 2519 | # Have a temporary directory for convenience. Make it in the build tree 2520 | # simply because there is no reason against having it here, and in addition, 2521 | # creating and moving files from /tmp can sometimes cause problems. 2522 | # Hook for its removal unless debugging. 2523 | # Note that there is a small window in which the directory will not be cleaned: 2524 | # after its creation but before its name has been assigned to `$tmp'. 2525 | $debug || 2526 | { 2527 | tmp= ac_tmp= 2528 | trap 'exit_status=$? 2529 | : "${ac_tmp:=$tmp}" 2530 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status 2531 | ' 0 2532 | trap 'as_fn_exit 1' 1 2 13 15 2533 | } 2534 | # Create a (secure) tmp directory for tmp files. 2535 | 2536 | { 2537 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && 2538 | test -d "$tmp" 2539 | } || 2540 | { 2541 | tmp=./conf$$-$RANDOM 2542 | (umask 077 && mkdir "$tmp") 2543 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 2544 | ac_tmp=$tmp 2545 | 2546 | # Set up the scripts for CONFIG_FILES section. 2547 | # No need to generate them if there are no CONFIG_FILES. 2548 | # This happens for instance with `./config.status config.h'. 2549 | if test -n "$CONFIG_FILES"; then 2550 | 2551 | 2552 | ac_cr=`echo X | tr X '\015'` 2553 | # On cygwin, bash can eat \r inside `` if the user requested igncr. 2554 | # But we know of no other shell where ac_cr would be empty at this 2555 | # point, so we can use a bashism as a fallback. 2556 | if test "x$ac_cr" = x; then 2557 | eval ac_cr=\$\'\\r\' 2558 | fi 2559 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` 2560 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then 2561 | ac_cs_awk_cr='\\r' 2562 | else 2563 | ac_cs_awk_cr=$ac_cr 2564 | fi 2565 | 2566 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && 2567 | _ACEOF 2568 | 2569 | 2570 | { 2571 | echo "cat >conf$$subs.awk <<_ACEOF" && 2572 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && 2573 | echo "_ACEOF" 2574 | } >conf$$subs.sh || 2575 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 2576 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` 2577 | ac_delim='%!_!# ' 2578 | for ac_last_try in false false false false false :; do 2579 | . ./conf$$subs.sh || 2580 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 2581 | 2582 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` 2583 | if test $ac_delim_n = $ac_delim_num; then 2584 | break 2585 | elif $ac_last_try; then 2586 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 2587 | else 2588 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 2589 | fi 2590 | done 2591 | rm -f conf$$subs.sh 2592 | 2593 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 2594 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && 2595 | _ACEOF 2596 | sed -n ' 2597 | h 2598 | s/^/S["/; s/!.*/"]=/ 2599 | p 2600 | g 2601 | s/^[^!]*!// 2602 | :repl 2603 | t repl 2604 | s/'"$ac_delim"'$// 2605 | t delim 2606 | :nl 2607 | h 2608 | s/\(.\{148\}\)..*/\1/ 2609 | t more1 2610 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ 2611 | p 2612 | n 2613 | b repl 2614 | :more1 2615 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 2616 | p 2617 | g 2618 | s/.\{148\}// 2619 | t nl 2620 | :delim 2621 | h 2622 | s/\(.\{148\}\)..*/\1/ 2623 | t more2 2624 | s/["\\]/\\&/g; s/^/"/; s/$/"/ 2625 | p 2626 | b 2627 | :more2 2628 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 2629 | p 2630 | g 2631 | s/.\{148\}// 2632 | t delim 2633 | ' >$CONFIG_STATUS || ac_write_fail=1 2639 | rm -f conf$$subs.awk 2640 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 2641 | _ACAWK 2642 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && 2643 | for (key in S) S_is_set[key] = 1 2644 | FS = "" 2645 | 2646 | } 2647 | { 2648 | line = $ 0 2649 | nfields = split(line, field, "@") 2650 | substed = 0 2651 | len = length(field[1]) 2652 | for (i = 2; i < nfields; i++) { 2653 | key = field[i] 2654 | keylen = length(key) 2655 | if (S_is_set[key]) { 2656 | value = S[key] 2657 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) 2658 | len += length(value) + length(field[++i]) 2659 | substed = 1 2660 | } else 2661 | len += 1 + keylen 2662 | } 2663 | 2664 | print line 2665 | } 2666 | 2667 | _ACAWK 2668 | _ACEOF 2669 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2670 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then 2671 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" 2672 | else 2673 | cat 2674 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ 2675 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 2676 | _ACEOF 2677 | 2678 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), 2679 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and 2680 | # trailing colons and then remove the whole line if VPATH becomes empty 2681 | # (actually we leave an empty line to preserve line numbers). 2682 | if test "x$srcdir" = x.; then 2683 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ 2684 | h 2685 | s/// 2686 | s/^/:/ 2687 | s/[ ]*$/:/ 2688 | s/:\$(srcdir):/:/g 2689 | s/:\${srcdir}:/:/g 2690 | s/:@srcdir@:/:/g 2691 | s/^:*// 2692 | s/:*$// 2693 | x 2694 | s/\(=[ ]*\).*/\1/ 2695 | G 2696 | s/\n// 2697 | s/^[^=]*=[ ]*$// 2698 | }' 2699 | fi 2700 | 2701 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2702 | fi # test -n "$CONFIG_FILES" 2703 | 2704 | 2705 | eval set X " :F $CONFIG_FILES " 2706 | shift 2707 | for ac_tag 2708 | do 2709 | case $ac_tag in 2710 | :[FHLC]) ac_mode=$ac_tag; continue;; 2711 | esac 2712 | case $ac_mode$ac_tag in 2713 | :[FHL]*:*);; 2714 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; 2715 | :[FH]-) ac_tag=-:-;; 2716 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; 2717 | esac 2718 | ac_save_IFS=$IFS 2719 | IFS=: 2720 | set x $ac_tag 2721 | IFS=$ac_save_IFS 2722 | shift 2723 | ac_file=$1 2724 | shift 2725 | 2726 | case $ac_mode in 2727 | :L) ac_source=$1;; 2728 | :[FH]) 2729 | ac_file_inputs= 2730 | for ac_f 2731 | do 2732 | case $ac_f in 2733 | -) ac_f="$ac_tmp/stdin";; 2734 | *) # Look for the file first in the build tree, then in the source tree 2735 | # (if the path is not absolute). The absolute path cannot be DOS-style, 2736 | # because $ac_f cannot contain `:'. 2737 | test -f "$ac_f" || 2738 | case $ac_f in 2739 | [\\/$]*) false;; 2740 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; 2741 | esac || 2742 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; 2743 | esac 2744 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac 2745 | as_fn_append ac_file_inputs " '$ac_f'" 2746 | done 2747 | 2748 | # Let's still pretend it is `configure' which instantiates (i.e., don't 2749 | # use $as_me), people would be surprised to read: 2750 | # /* config.h. Generated by config.status. */ 2751 | configure_input='Generated from '` 2752 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' 2753 | `' by configure.' 2754 | if test x"$ac_file" != x-; then 2755 | configure_input="$ac_file. $configure_input" 2756 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 2757 | $as_echo "$as_me: creating $ac_file" >&6;} 2758 | fi 2759 | # Neutralize special characters interpreted by sed in replacement strings. 2760 | case $configure_input in #( 2761 | *\&* | *\|* | *\\* ) 2762 | ac_sed_conf_input=`$as_echo "$configure_input" | 2763 | sed 's/[\\\\&|]/\\\\&/g'`;; #( 2764 | *) ac_sed_conf_input=$configure_input;; 2765 | esac 2766 | 2767 | case $ac_tag in 2768 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ 2769 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; 2770 | esac 2771 | ;; 2772 | esac 2773 | 2774 | ac_dir=`$as_dirname -- "$ac_file" || 2775 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 2776 | X"$ac_file" : 'X\(//\)[^/]' \| \ 2777 | X"$ac_file" : 'X\(//\)$' \| \ 2778 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || 2779 | $as_echo X"$ac_file" | 2780 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 2781 | s//\1/ 2782 | q 2783 | } 2784 | /^X\(\/\/\)[^/].*/{ 2785 | s//\1/ 2786 | q 2787 | } 2788 | /^X\(\/\/\)$/{ 2789 | s//\1/ 2790 | q 2791 | } 2792 | /^X\(\/\).*/{ 2793 | s//\1/ 2794 | q 2795 | } 2796 | s/.*/./; q'` 2797 | as_dir="$ac_dir"; as_fn_mkdir_p 2798 | ac_builddir=. 2799 | 2800 | case "$ac_dir" in 2801 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 2802 | *) 2803 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 2804 | # A ".." for each directory in $ac_dir_suffix. 2805 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 2806 | case $ac_top_builddir_sub in 2807 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 2808 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 2809 | esac ;; 2810 | esac 2811 | ac_abs_top_builddir=$ac_pwd 2812 | ac_abs_builddir=$ac_pwd$ac_dir_suffix 2813 | # for backward compatibility: 2814 | ac_top_builddir=$ac_top_build_prefix 2815 | 2816 | case $srcdir in 2817 | .) # We are building in place. 2818 | ac_srcdir=. 2819 | ac_top_srcdir=$ac_top_builddir_sub 2820 | ac_abs_top_srcdir=$ac_pwd ;; 2821 | [\\/]* | ?:[\\/]* ) # Absolute name. 2822 | ac_srcdir=$srcdir$ac_dir_suffix; 2823 | ac_top_srcdir=$srcdir 2824 | ac_abs_top_srcdir=$srcdir ;; 2825 | *) # Relative name. 2826 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 2827 | ac_top_srcdir=$ac_top_build_prefix$srcdir 2828 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 2829 | esac 2830 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 2831 | 2832 | 2833 | case $ac_mode in 2834 | :F) 2835 | # 2836 | # CONFIG_FILE 2837 | # 2838 | 2839 | case $INSTALL in 2840 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; 2841 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; 2842 | esac 2843 | _ACEOF 2844 | 2845 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2846 | # If the template does not know about datarootdir, expand it. 2847 | # FIXME: This hack should be removed a few years after 2.60. 2848 | ac_datarootdir_hack=; ac_datarootdir_seen= 2849 | ac_sed_dataroot=' 2850 | /datarootdir/ { 2851 | p 2852 | q 2853 | } 2854 | /@datadir@/p 2855 | /@docdir@/p 2856 | /@infodir@/p 2857 | /@localedir@/p 2858 | /@mandir@/p' 2859 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in 2860 | *datarootdir*) ac_datarootdir_seen=yes;; 2861 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) 2862 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 2863 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} 2864 | _ACEOF 2865 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 2866 | ac_datarootdir_hack=' 2867 | s&@datadir@&$datadir&g 2868 | s&@docdir@&$docdir&g 2869 | s&@infodir@&$infodir&g 2870 | s&@localedir@&$localedir&g 2871 | s&@mandir@&$mandir&g 2872 | s&\\\${datarootdir}&$datarootdir&g' ;; 2873 | esac 2874 | _ACEOF 2875 | 2876 | # Neutralize VPATH when `$srcdir' = `.'. 2877 | # Shell code in configure.ac might set extrasub. 2878 | # FIXME: do we really want to maintain this feature? 2879 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 2880 | ac_sed_extra="$ac_vpsub 2881 | $extrasub 2882 | _ACEOF 2883 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2884 | :t 2885 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b 2886 | s|@configure_input@|$ac_sed_conf_input|;t t 2887 | s&@top_builddir@&$ac_top_builddir_sub&;t t 2888 | s&@top_build_prefix@&$ac_top_build_prefix&;t t 2889 | s&@srcdir@&$ac_srcdir&;t t 2890 | s&@abs_srcdir@&$ac_abs_srcdir&;t t 2891 | s&@top_srcdir@&$ac_top_srcdir&;t t 2892 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t 2893 | s&@builddir@&$ac_builddir&;t t 2894 | s&@abs_builddir@&$ac_abs_builddir&;t t 2895 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t 2896 | s&@INSTALL@&$ac_INSTALL&;t t 2897 | $ac_datarootdir_hack 2898 | " 2899 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ 2900 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 2901 | 2902 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && 2903 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && 2904 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ 2905 | "$ac_tmp/out"`; test -z "$ac_out"; } && 2906 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' 2907 | which seems to be undefined. Please make sure it is defined" >&5 2908 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' 2909 | which seems to be undefined. Please make sure it is defined" >&2;} 2910 | 2911 | rm -f "$ac_tmp/stdin" 2912 | case $ac_file in 2913 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; 2914 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; 2915 | esac \ 2916 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 2917 | ;; 2918 | 2919 | 2920 | 2921 | esac 2922 | 2923 | done # for ac_tag 2924 | 2925 | 2926 | as_fn_exit 0 2927 | _ACEOF 2928 | ac_clean_files=$ac_clean_files_save 2929 | 2930 | test $ac_write_fail = 0 || 2931 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 2932 | 2933 | 2934 | # configure is writing to config.log, and then calls config.status. 2935 | # config.status does its own redirection, appending to config.log. 2936 | # Unfortunately, on DOS this fails, as config.log is still kept open 2937 | # by configure, so config.status won't be able to write to it; its 2938 | # output is simply discarded. So we exec the FD to /dev/null, 2939 | # effectively closing config.log, so it can be properly (re)opened and 2940 | # appended to by config.status. When coming back to configure, we 2941 | # need to make the FD available again. 2942 | if test "$no_create" != yes; then 2943 | ac_cs_success=: 2944 | ac_config_status_args= 2945 | test "$silent" = yes && 2946 | ac_config_status_args="$ac_config_status_args --quiet" 2947 | exec 5>/dev/null 2948 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false 2949 | exec 5>>config.log 2950 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which 2951 | # would make configure fail if this is the last instruction. 2952 | $ac_cs_success || as_fn_exit 1 2953 | fi 2954 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then 2955 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 2956 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} 2957 | fi 2958 | 2959 | -------------------------------------------------------------------------------- /configure.in: -------------------------------------------------------------------------------- 1 | # -*- Autoconf -*- 2 | # Process this file with autoconf to produce a configure script. 3 | 4 | AC_PREREQ([2.68]) 5 | AC_INIT([libvirt-wakeonlan], [20120415], [src@niftiestsoftware.com]) 6 | AC_PROG_INSTALL 7 | 8 | # Checks for header files. 9 | 10 | # Checks for typedefs, structures, and compiler characteristics. 11 | 12 | # Checks for library functions. 13 | 14 | AC_CONFIG_FILES() 15 | AC_OUTPUT(Makefile) 16 | -------------------------------------------------------------------------------- /init/arch/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simoncadman/libvirt-wakeonlan/a28782b6e690f1ba2eaefcc683befde3164206a4/init/arch/.keep -------------------------------------------------------------------------------- /init/arch/systemd/libvirt-wakeonlan.conf: -------------------------------------------------------------------------------- 1 | LIBVIRTDWOL_INTERFACE="eth0" -------------------------------------------------------------------------------- /init/arch/systemd/system/libvirt-wakeonlan.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Starts KVM instances from wake on lan packets 3 | 4 | [Service] 5 | WorkingDirectory=/usr/share/libvirt-wakeonlan 6 | ExecStart=/usr/share/libvirt-wakeonlan/libvirtwol.py $LIBVIRTDWOL_INTERFACE 7 | Type=simple 8 | 9 | [Unit] 10 | Requires=libvirt 11 | After=libvirt -------------------------------------------------------------------------------- /init/debian/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simoncadman/libvirt-wakeonlan/a28782b6e690f1ba2eaefcc683befde3164206a4/init/debian/.keep -------------------------------------------------------------------------------- /init/debian/default/libvirt-wakeonlan: -------------------------------------------------------------------------------- 1 | LIBVIRTDWOL_INTERFACE="eth0" -------------------------------------------------------------------------------- /init/debian/init/libvirt-wakeonlan.conf: -------------------------------------------------------------------------------- 1 | # libvirt-wakeonlan - Starts KVM instances from wake on lan packets 2 | 3 | description "Starts KVM instances from wake on lan packets" 4 | author "Simon Cadman " 5 | 6 | # When to start the service 7 | start on starting libvirt-bin 8 | 9 | # When to stop the service 10 | start on stopping libvirt-bin 11 | 12 | # Automatically restart process if crashed 13 | respawn 14 | 15 | chdir /usr/share/libvirt-wakeonlan/ 16 | 17 | # Start the process 18 | script 19 | . /etc/default/libvirt-wakeonlan 20 | exec ./libvirtwol.py $LIBVIRTDWOL_INTERFACE 21 | end script -------------------------------------------------------------------------------- /init/gentoo/conf.d/libvirt-wakeonlan: -------------------------------------------------------------------------------- 1 | # /etc/conf.d/libvirt-wakeonlan 2 | 3 | LIBVIRTDWOL_INTERFACE="eth0" 4 | 5 | -------------------------------------------------------------------------------- /init/gentoo/init.d/libvirt-wakeonlan: -------------------------------------------------------------------------------- 1 | #!/sbin/runscript 2 | 3 | description="Starts libvirt instances from wake on lan packets" 4 | 5 | depend() { 6 | need net 7 | after libvirtd 8 | } 9 | 10 | start() { 11 | ebegin "Starting libvirt-wakeonlan" 12 | start-stop-daemon --start \ 13 | --background -m \ 14 | --pidfile=/var/run/libvirt-wakeonlan.pid \ 15 | -d /usr/share/libvirt-wakeonlan \ 16 | --exec /usr/share/libvirt-wakeonlan/libvirtwol.py -- ${LIBVIRTDWOL_INTERFACE} 17 | eend $? 18 | } 19 | 20 | stop() { 21 | 22 | ebegin "Stopping libvirt-wakeonlan" 23 | 24 | start-stop-daemon --stop --quiet --pidfile=/var/run/libvirt-wakeonlan.pid 25 | eend $? 26 | } 27 | 28 | -------------------------------------------------------------------------------- /init/redhat/init.d/libvirt-wakeonlan: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # libvirt-wakeonlan, listens for wake on lan packets and starts libvirt based virtual machines 4 | # 5 | # chkconfig: 2345 20 80 6 | # description: listens for wake on lan packets and starts libvirt based virtual machines 7 | 8 | ### BEGIN INIT INFO 9 | # Required-Start: $network 10 | ### END INIT INFO 11 | 12 | # Source function library. 13 | . /etc/rc.d/init.d/functions 14 | 15 | exec="/usr/share/libvirt-wakeonlan/libvirtwol.py" 16 | prog="libvirt-wakeonlan" 17 | 18 | [ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog 19 | 20 | lockfile=/var/lock/subsys/$prog 21 | pidfile=/var/run/$proc.pid 22 | 23 | start() { 24 | [ -x $exec ] || exit 5 25 | echo -n $"Starting $prog: " 26 | # if not running, start it up here, usually something like "daemon $exec" 27 | cd /usr/share/libvirt-wakeonlan 28 | daemon $exec $LIBVIRTDWOL_INTERFACE 29 | retval=$? 30 | echo 31 | [ $retval -eq 0 ] && touch $lockfile 32 | return $retval 33 | } 34 | 35 | stop() { 36 | echo -n $"Stopping $prog: " 37 | # stop it here, often "killproc $prog" 38 | killproc $prog 39 | retval=$? 40 | echo 41 | [ $retval -eq 0 ] && rm -f $lockfile 42 | return $retval 43 | } 44 | 45 | restart() { 46 | stop 47 | start 48 | } 49 | 50 | reload() { 51 | restart 52 | } 53 | 54 | force_reload() { 55 | restart 56 | } 57 | 58 | rh_status() { 59 | # run checks to determine if the service is running or use generic status 60 | status $prog 61 | } 62 | 63 | rh_status_q() { 64 | rh_status >/dev/null 2>&1 65 | } 66 | 67 | 68 | case "$1" in 69 | start) 70 | rh_status_q && exit 0 71 | $1 72 | ;; 73 | stop) 74 | rh_status_q || exit 0 75 | $1 76 | ;; 77 | restart) 78 | $1 79 | ;; 80 | reload) 81 | rh_status_q || exit 7 82 | $1 83 | ;; 84 | force-reload) 85 | force_reload 86 | ;; 87 | status) 88 | rh_status 89 | ;; 90 | condrestart|try-restart) 91 | rh_status_q || exit 0 92 | restart 93 | ;; 94 | *) 95 | echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" 96 | exit 2 97 | esac 98 | exit $? 99 | -------------------------------------------------------------------------------- /init/redhat/sysconfig/libvirt-wakeonlan: -------------------------------------------------------------------------------- 1 | # /etc/sysconfig/libvirt-wakeonlan 2 | 3 | LIBVIRTDWOL_INTERFACE="eth0" 4 | 5 | -------------------------------------------------------------------------------- /install-sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # install - install a program, script, or datafile 3 | 4 | scriptversion=2009-04-28.21; # UTC 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-time-zone: "UTC" 519 | # time-stamp-end: "; # UTC" 520 | # End: 521 | -------------------------------------------------------------------------------- /libvirtwol.py: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | "true" '''\' 3 | if command -v python2 > /dev/null; then 4 | exec python2 "$0" "$@" 5 | else 6 | exec python "$0" "$@" 7 | fi 8 | exit $? 9 | ''' 10 | # LibVirt Wake On Lan 11 | # Copyright (C) 2012 Simon Cadman 12 | # 13 | # This program 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 3 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, see . 25 | import pcap 26 | import sys 27 | import socket 28 | import struct 29 | import string 30 | import libvirt 31 | import logging 32 | from xml.dom import minidom 33 | 34 | 35 | class LibVirtWakeOnLan: 36 | 37 | @staticmethod 38 | def StartServerByMACAddress(mac): 39 | conn = libvirt.open(None) 40 | if conn is None: 41 | logging.error('Failed to open connection to the hypervisor') 42 | sys.exit(1) 43 | 44 | domains = conn.listDefinedDomains() 45 | for domainName in domains: 46 | domain = conn.lookupByName(domainName) 47 | params = [] 48 | # TODO - replace with api calls to fetch network interfaces 49 | xml = minidom.parseString(domain.XMLDesc(0)) 50 | devices = xml.documentElement.getElementsByTagName("devices") 51 | for device in devices: 52 | for interface in device.getElementsByTagName("interface"): 53 | macadd = interface.getElementsByTagName("mac") 54 | foundmac = macadd[0].getAttribute("address") 55 | if foundmac == mac: 56 | logging.info("Waking up %s", domainName) 57 | domain.create() 58 | return True 59 | logging.info("Didn't find a VM with MAC address %s", mac) 60 | return False 61 | 62 | @staticmethod 63 | def GetMACAddress(s): 64 | if len(s) == 110: 65 | bytes = map(lambda x: '%.2x' % x, map(ord, s)) 66 | counted = 0 67 | macpart = 0 68 | maccounted = 0 69 | macaddress = None 70 | newmac = "" 71 | 72 | for byte in bytes: 73 | if counted < 6: 74 | # find 6 repetitions of 255 75 | if byte == "ff": 76 | counted += 1 77 | else: 78 | # find 16 repititions of 48 bit mac 79 | macpart += 1 80 | if newmac != "": 81 | newmac += ":" 82 | 83 | newmac += byte 84 | 85 | if macpart is 6 and macaddress is None: 86 | macaddress = newmac 87 | 88 | if macpart is 6: 89 | if macaddress != newmac: 90 | return None 91 | newmac = "" 92 | macpart = 0 93 | maccounted += 1 94 | 95 | if counted == 6 and maccounted == 16: 96 | return macaddress 97 | 98 | @staticmethod 99 | def DecodeIPPacket(s): 100 | if len(s) < 20: 101 | return None 102 | d = {} 103 | d['version'] = (ord(s[0]) & 0xf0) >> 4 104 | d['header_len'] = ord(s[0]) & 0x0f 105 | d['tos'] = ord(s[1]) 106 | d['total_len'] = socket.ntohs(struct.unpack('H', s[2:4])[0]) 107 | d['id'] = socket.ntohs(struct.unpack('H', s[4:6])[0]) 108 | d['flags'] = (ord(s[6]) & 0xe0) >> 5 109 | d['fragment_offset'] = socket.ntohs(struct.unpack('H', s[6:8])[0] & 0x1f) 110 | d['ttl'] = ord(s[8]) 111 | d['protocol'] = ord(s[9]) 112 | d['checksum'] = socket.ntohs(struct.unpack('H', s[10:12])[0]) 113 | d['source_address'] = pcap.ntoa(struct.unpack('i', s[12:16])[0]) 114 | d['destination_address'] = pcap.ntoa(struct.unpack('i', s[16:20])[0]) 115 | if d['header_len'] > 5: 116 | d['options'] = s[20:4 * (d['header_len'] - 5)] 117 | else: 118 | d['options'] = None 119 | d['data'] = s[4 * d['header_len']:] 120 | return d 121 | 122 | @staticmethod 123 | def InspectIPPacket(pktlen, data, timestamp): 124 | if not data: 125 | return 126 | decoded = LibVirtWakeOnLan.DecodeIPPacket(data[14:]) 127 | macaddress = LibVirtWakeOnLan.GetMACAddress(decoded['data']) 128 | if not macaddress: 129 | return 130 | return LibVirtWakeOnLan.StartServerByMACAddress(macaddress) 131 | 132 | if __name__ == '__main__': 133 | from lvwolutils import Utils 134 | Utils.SetupLogging() 135 | 136 | # line below is replaced on commit 137 | LVWOLVersion = "20140814 231218" 138 | Utils.ShowVersion(LVWOLVersion) 139 | 140 | if len(sys.argv) < 2: 141 | print('usage: libvirtwol ') 142 | sys.exit(0) 143 | 144 | interface = sys.argv[1] 145 | p = pcap.pcapObject() 146 | net, mask = pcap.lookupnet(interface) 147 | p.open_live(interface, 1600, 0, 100) 148 | p.setfilter('udp and port 7 or port 9', 0, 0) 149 | 150 | try: 151 | while 1: 152 | p.dispatch(1, LibVirtWakeOnLan.InspectIPPacket) 153 | except KeyboardInterrupt: 154 | pass 155 | -------------------------------------------------------------------------------- /lvwolutils.py: -------------------------------------------------------------------------------- 1 | # LibVirt Wake On Lan 2 | # Copyright (C) 2014 Simon Cadman 3 | # 4 | # This program is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation, either version 3 of the License, or 7 | # (at your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program. If not, see . 16 | 17 | import logging 18 | import sys 19 | 20 | 21 | class Utils(object): 22 | logpath = '/var/log/libvirt/libvirtwakeonlan.log' 23 | 24 | @staticmethod 25 | def SetupLogging(logpath=None): 26 | returnValue = True 27 | logformat = "%(asctime)s|%(levelname)s|%(message)s" 28 | dateformat = "%Y-%m-%d %H:%M:%S" 29 | if logpath is None: 30 | logpath = Utils.logpath 31 | try: 32 | logging.basicConfig( 33 | filename=logpath, 34 | level=logging.INFO, 35 | format=logformat, 36 | datefmt=dateformat) 37 | except Exception: 38 | logging.basicConfig( 39 | level=logging.INFO, 40 | format=logformat, 41 | datefmt=dateformat) 42 | logging.error("Unable to write to log file " + logpath) 43 | returnValue = False 44 | return returnValue 45 | 46 | @staticmethod 47 | def ShowVersion(Version): 48 | if len(sys.argv) == 2 and sys.argv[1] == 'version': 49 | print "LibVirt Wake-On-Lan Version " + Version 50 | sys.exit(0) 51 | return False 52 | -------------------------------------------------------------------------------- /packages/arch/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simoncadman/libvirt-wakeonlan/a28782b6e690f1ba2eaefcc683befde3164206a4/packages/arch/.keep -------------------------------------------------------------------------------- /packages/arch/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Simon Cadman 2 | pkgname=libvirt-wakeonlan 3 | pkgver=20140809 4 | pkgrel=1 5 | pkgdesc="Starts KVM instances from wake on lan packets" 6 | arch=('any') 7 | url="http://lvwol.niftiestsoftware.com" 8 | license=('GPL3') 9 | depends=('libvirt-python' 'libvirt' 'pylibpcap') 10 | makedepends=('git') 11 | changelog=changelog 12 | source=() 13 | md5sums=() 14 | _gitroot="git://github.com/simoncadman/libvirt-wakeonlan.git" 15 | _gitversion="689eeeca3d63276d802e00af5a7c716ea14db783" 16 | 17 | 18 | build() { 19 | git clone $_gitroot "$srcdir/$pkgname-$pkgver" 20 | cd "$srcdir/$pkgname-$pkgver" 21 | git checkout $_gitversion 22 | ./configure --prefix=/usr 23 | make 24 | } 25 | 26 | package() { 27 | cd "$srcdir/$pkgname-$pkgver" 28 | make DESTDIR="$pkgdir/" install 29 | } 30 | 31 | # vim:set ts=2 sw=2 et: 32 | -------------------------------------------------------------------------------- /packages/arch/changelog: -------------------------------------------------------------------------------- 1 | 2014-08-09 Simon Cadman 2 | 3 | * 20140809 : 4 | Arch package created 5 | 6 | -- simon cadman Sat, 09 Aug 2014 17:19:49 +0000 7 | -------------------------------------------------------------------------------- /packages/debian/README.Debian: -------------------------------------------------------------------------------- 1 | libvirt-wakeonlan for Debian 2 | ------------------------- 3 | 4 | Start the daemon, and any wake-on-lan packet will start the VM with the MAC address. 5 | 6 | -- simon cadman Sun, 10 Aug 2014 15:58:10 +0000 7 | -------------------------------------------------------------------------------- /packages/debian/README.source: -------------------------------------------------------------------------------- 1 | INTRODUCTION 2 | ============ 3 | libvirt-wakeonlan is a daemon which listens for wake on lan packets and starts libvirt based virtual machines. 4 | 5 | INSTALLATION 6 | ============ 7 | 8 | RPM/DEB/Ebuild INSTALL ( Recommended ) 9 | ================================ 10 | 11 | Download and install the package for your distro from http://lvwol.niftiestsoftware.com ( coming soon ). 12 | 13 | Refer to your own specific distribution instructions for how to install the package. Once installed, the daemon is installed as a standard service, 14 | refer to your distribution information on how to start and stop services, and ( if desired ) how to have it run automatically on boot. 15 | 16 | SOURCE INSTALL 17 | ============== 18 | 19 | Clone the git repo: 20 | 21 | git clone git://github.com/simoncadman/libvirt-wakeonlan.git 22 | 23 | cd libvirt-wakeonlan/ 24 | ./configure 25 | make install 26 | 27 | Run the daemon ( eg. service libvirt-wakeonlan start ). 28 | 29 | CONFIGURATION 30 | ============= 31 | 32 | libvirt-wakeonlan listens on eth0 by default for Wake-on-lan packets, to change this, there is a configuration file for the libvirt-wakeonlan 33 | service ( in /etc/conf.d/ on Gentoo, /etc/sysconfig on Fedora and /etc/default on Debian ), within it is a parameter called 34 | "LIBVIRTDWOL_INTERFACE" which specifies the interface used. 35 | 36 | DEVELOPING 37 | ========== 38 | 39 | Before commiting to the git repository you should set up the pre-commit hook, this ensures the version numbers in the scripts are updated: 40 | 41 | ln -s ../../pre-commit.py .git/hooks/pre-commit 42 | 43 | Copyright 44 | ========= 45 | 46 | Software and icon are copyright Simon Cadman and licenced under GNU GPL v3 ( http://www.gnu.org/licenses/gpl.html ). -------------------------------------------------------------------------------- /packages/debian/changelog: -------------------------------------------------------------------------------- 1 | libvirt-wakeonlan (20140810-1) precise; urgency=low 2 | 3 | Deb package release 4 | 5 | -- simon cadman Sun, 10 Aug 2014 15:18:59 +0000 6 | -------------------------------------------------------------------------------- /packages/debian/compat: -------------------------------------------------------------------------------- 1 | 8 2 | -------------------------------------------------------------------------------- /packages/debian/control: -------------------------------------------------------------------------------- 1 | Source: libvirt-wakeonlan 2 | Section: net 3 | Priority: extra 4 | Maintainer: simon cadman 5 | Build-Depends: debhelper (>= 8.0.0), autotools-dev 6 | Standards-Version: 3.9.3 7 | Homepage: http://lvwol.niftiestsoftware.com/ 8 | Vcs-Git: git://github.com/simoncadman/libvirt-wakeonlan.git 9 | Vcs-Browser: https://github.com/simoncadman/libvirt-wakeonlan 10 | 11 | Package: libvirt-wakeonlan 12 | Architecture: all 13 | Depends: ${misc:Depends}, python2.7|python2.6, python-libvirt, libvirt-bin, python-libpcap 14 | Description: Starts KVM instances from wake on lan packets 15 | Starts KVM instances from wake on lan packets 16 | -------------------------------------------------------------------------------- /packages/debian/copyright: -------------------------------------------------------------------------------- 1 | This package was debianized by Simon Cadman 2 | 10th August 2014 3 | 4 | Upstream Author: Simon Cadman 5 | 6 | Copyright: 7 | Copyright (C) 2012-2014 src@niftiestsoftware.com 8 | 9 | License: GPL-3 10 | 11 | This program is free software: you can redistribute it and/or modify 12 | it under the terms of the GNU General Public License as published by 13 | the Free Software Foundation, either version 3 of the License, or 14 | (at your option) any later version. 15 | 16 | This program is distributed in the hope that it will be useful, 17 | but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program. If not, see . */ 23 | 24 | On Debian systems, the complete text of the GNU General Public License 25 | can be found in `/usr/share/common-licenses/GPL'. 26 | 27 | Manual Copyright (C) 1992, 1993, 1996, 2002, 2005, 2006, 2007, 2008, 28 | 2009, 2010 Free Software Foundation, Inc. 29 | 30 | Permission is granted to copy, distribute and/or modify this 31 | document under the terms of the GNU Free Documentation License, 32 | Version 1.3 or any later version published by the Free Software 33 | Foundation; with no Invariant Sections, with no Front-Cover Texts, 34 | and with no Back-Cover Texts. A copy of the license is included 35 | in the section entitled "GNU Free Documentation License". 36 | 37 | On Debian systems, the complete text of the GNU Free Documentation 38 | License can be found in `/usr/share/common-licenses/GFDL'. 39 | -------------------------------------------------------------------------------- /packages/debian/docs: -------------------------------------------------------------------------------- 1 | README.md 2 | -------------------------------------------------------------------------------- /packages/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | 4 | # Uncomment this to turn on verbose mode. 5 | export DH_VERBOSE=1 6 | %: 7 | dh $@ -------------------------------------------------------------------------------- /packages/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /packages/gentoo/libvirt-wakeonlan.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Simon Cadman 2 | # $Header: $ 3 | 4 | EAPI="2" 5 | inherit git-2 eutils 6 | 7 | DESCRIPTION="Starts KVM instances from wake on lan packets" 8 | HOMEPAGE="https://lvwol.niftiestsoftware.com" 9 | EGIT_REPO_URI="git://github.com/simoncadman/libvirt-wakeonlan.git" 10 | EGIT_COMMIT="97910a36fe06c67c1621614fb09346e7bc379564" 11 | LICENSE="GPL-3" 12 | SLOT="0" 13 | KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64 ~amd64-fbsd ~x86-fbsd" 14 | IUSE="" 15 | DEPEND=">=dev-lang/python-2.6 16 | || ( app-emulation/libvirt[python] dev-python/libvirt-python ) 17 | dev-python/pylibpcap 18 | " 19 | S=${WORKDIR}/${P} 20 | 21 | src_install() { 22 | einstall DESTDIR="${D}" install 23 | } 24 | 25 | -------------------------------------------------------------------------------- /packages/redhat/BUILD/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simoncadman/libvirt-wakeonlan/a28782b6e690f1ba2eaefcc683befde3164206a4/packages/redhat/BUILD/.keep -------------------------------------------------------------------------------- /packages/redhat/BUILDROOT/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simoncadman/libvirt-wakeonlan/a28782b6e690f1ba2eaefcc683befde3164206a4/packages/redhat/BUILDROOT/.keep -------------------------------------------------------------------------------- /packages/redhat/RPMS/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simoncadman/libvirt-wakeonlan/a28782b6e690f1ba2eaefcc683befde3164206a4/packages/redhat/RPMS/.keep -------------------------------------------------------------------------------- /packages/redhat/SOURCES/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simoncadman/libvirt-wakeonlan/a28782b6e690f1ba2eaefcc683befde3164206a4/packages/redhat/SOURCES/.keep -------------------------------------------------------------------------------- /packages/redhat/SPECS/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simoncadman/libvirt-wakeonlan/a28782b6e690f1ba2eaefcc683befde3164206a4/packages/redhat/SPECS/.keep -------------------------------------------------------------------------------- /packages/redhat/SPECS/libvirt-wakeonlan.spec: -------------------------------------------------------------------------------- 1 | Name: libvirt-wakeonlan 2 | Version: %{_version} 3 | Release: 1 4 | Summary: Starts KVM instances from wake on lan packets 5 | 6 | License: GPLv3+ 7 | URL: http://lvwol.niftiestsoftware.com 8 | Source0: http://lvwol.niftiestsoftware.com/libvirt-wakeonlan-%{_version}.tar.bz2 9 | 10 | BuildArch: noarch 11 | BuildRequires: make 12 | Requires: libvirt-python,libvirt,pylibpcap 13 | 14 | %description 15 | Daemon that starts KVM instances from wake on lan packets. 16 | 17 | %prep 18 | %setup -q 19 | 20 | %build 21 | %configure 22 | make %{?_smp_mflags} 23 | 24 | %install 25 | rm -rf $RPM_BUILD_ROOT 26 | make install DESTDIR=$RPM_BUILD_ROOT 27 | 28 | %files 29 | %attr(644, root, root) %{_usr}/share/libvirt-wakeonlan/*.py 30 | %attr(644, root, root) %{_usr}/share/libvirt-wakeonlan/*.pyc 31 | %attr(644, root, root) %{_usr}/share/libvirt-wakeonlan/*.pyo 32 | %attr(755, root, root) %{_usr}/share/libvirt-wakeonlan/testing/*.sh 33 | %attr(644, root, root) %{_usr}/share/libvirt-wakeonlan/testing/*.py 34 | %attr(644, root, root) %{_usr}/share/libvirt-wakeonlan/testing/*.pyc 35 | %attr(644, root, root) %{_usr}/share/libvirt-wakeonlan/testing/*.pyo 36 | %attr(744, root, root) %{_sysconfdir}/init.d/libvirt-wakeonlan 37 | %attr(744, root, root) %{_sysconfdir}/sysconfig/libvirt-wakeonlan 38 | %attr(755, root, root) %{_usr}/share/libvirt-wakeonlan/libvirtwol.py 39 | 40 | %changelog 41 | * Sat Aug 09 2014 Simon Cadman 20140809-1) 42 | - RPM package release 43 | -------------------------------------------------------------------------------- /packages/redhat/SRPMS/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simoncadman/libvirt-wakeonlan/a28782b6e690f1ba2eaefcc683befde3164206a4/packages/redhat/SRPMS/.keep -------------------------------------------------------------------------------- /pre-commit.py: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | "true" '''\' 3 | if command -v python2 > /dev/null; then 4 | exec python2 "$0" "$@" 5 | else 6 | exec python "$0" "$@" 7 | fi 8 | exit $? 9 | ''' 10 | 11 | # LibVirt Wake On Lan 12 | # Copyright (C) 2012 Simon Cadman 13 | # 14 | # This program is free software: you can redistribute it and/or modify 15 | # it under the terms of the GNU General Public License as published by 16 | # the Free Software Foundation, either version 3 of the License, or 17 | # (at your option) any later version. 18 | # 19 | # This program is distributed in the hope that it will be useful, 20 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | # GNU General Public License for more details. 23 | # 24 | # You should have received a copy of the GNU General Public License 25 | # along with this program. If not, see . 26 | 27 | if __name__ == '__main__': # pragma: no cover 28 | 29 | import fileinput 30 | import re 31 | import sys 32 | import subprocess 33 | import os 34 | from datetime import datetime 35 | 36 | searchRegex = 'LVWOLVersion = "(\d)+ (\d){6}"' 37 | replaceValue = 'LVWOLVersion = "' + \ 38 | datetime.utcnow().strftime('%Y%m%d %H%M%S') + '"' 39 | 40 | p = subprocess.Popen( 41 | ["git", 42 | "diff", 43 | "--cached", 44 | "--name-only"], 45 | stdout=subprocess.PIPE) 46 | output = p.communicate()[0] 47 | result = p.returncode 48 | if result != 0: 49 | sys.exit(result) 50 | alteredfiles = output.split("\n") 51 | for alteredfile in alteredfiles: 52 | if len(alteredfile) > 0 and os.path.exists(alteredfile) and alteredfile.endswith('.py'): 53 | p2 = subprocess.Popen( 54 | ["pep8", 55 | "--max-line-length=100", 56 | alteredfile], 57 | stdout=subprocess.PIPE) 58 | pep8output = p2.communicate()[0].strip() 59 | if p2.returncode != 0: 60 | print alteredfile, "failed pep8 check:" 61 | print pep8output 62 | testfile = open(alteredfile, "r") 63 | fileNeedsUpdating = False 64 | for line in testfile: 65 | if '# line below is replaced on commit' in line: 66 | fileNeedsUpdating = True 67 | break 68 | testfile.close() 69 | 70 | if fileNeedsUpdating: 71 | replaceLine = False 72 | for line in fileinput.input(alteredfile, inplace=1): 73 | if replaceLine: 74 | line = re.sub(searchRegex, replaceValue, line) 75 | if '# line below is replaced on commit' in line: 76 | replaceLine = True 77 | else: 78 | replaceLine = False 79 | sys.stdout.write(line) 80 | 81 | p = subprocess.Popen( 82 | ["git", 83 | "add", 84 | alteredfile.lstrip('-')], 85 | stdout=subprocess.PIPE) 86 | output = p.communicate()[0] 87 | result = p.returncode 88 | if result != 0: 89 | sys.exit(result) 90 | -------------------------------------------------------------------------------- /reportissues.py: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | "true" '''\' 3 | if command -v python2 > /dev/null; then 4 | exec python2 "$0" "$@" 5 | else 6 | exec python "$0" "$@" 7 | fi 8 | exit $? 9 | ''' 10 | 11 | # LibVirt Wake On Lan - Print via Google Cloud Print 12 | # Copyright (C) 2013 Simon Cadman 13 | # 14 | # This program is free software: you can redistribute it and/or modify 15 | # it under the terms of the GNU General Public License as published by 16 | # the Free Software Foundation, either version 3 of the License, or 17 | # (at your option) any later version. 18 | # 19 | # This program is distributed in the hope that it will be useful, 20 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | # GNU General Public License for more details. 23 | # 24 | # You should have received a copy of the GNU General Public License 25 | # along with this program. If not, see . 26 | 27 | if __name__ == '__main__': # pragma: no cover 28 | 29 | from lvwolutils import Utils 30 | from libvirtwol import LibVirtWakeOnLan 31 | import libvirt 32 | import sys 33 | from xml.dom import minidom 34 | Utils.SetupLogging() 35 | 36 | # line below is replaced on commit 37 | LVWOLVersion = "20140809 101221" 38 | Utils.ShowVersion(LVWOLVersion) 39 | 40 | # add debug output here 41 | print "LibVirt Wake-On-Lan Version " + LVWOLVersion 42 | conn = libvirt.open(None) 43 | if conn is None: 44 | print 'Failed to open connection to the hypervisor' 45 | sys.exit(1) 46 | 47 | domains = conn.listDefinedDomains() 48 | print "%i VMs found" % len(domains) 49 | for domainName in domains: 50 | domain = conn.lookupByName(domainName) 51 | params = [] 52 | # TODO - replace with api calls to fetch network interfaces 53 | xml = minidom.parseString(domain.XMLDesc(0)) 54 | devices = xml.documentElement.getElementsByTagName("devices") 55 | foundcards = [] 56 | for device in devices: 57 | for interface in device.getElementsByTagName("interface"): 58 | foundcards.append(interface) 59 | print "%s - %i network card(s):" % (domainName, len(foundcards)) 60 | for foundcard in foundcards: 61 | macadd = interface.getElementsByTagName("mac") 62 | foundmac = macadd[0].getAttribute("address") 63 | source = interface.getElementsByTagName("source") 64 | sourcebridge = source[0].getAttribute("bridge") 65 | model = interface.getElementsByTagName("model") 66 | modeltype = model[0].getAttribute("type") 67 | address = interface.getElementsByTagName("address") 68 | addresstype = address[0].getAttribute("type") 69 | print "MAC address '%s', source bridge '%s', model type '%s', address type '%s'" \ 70 | % (foundmac, sourcebridge, modeltype, addresstype) 71 | if len(sys.argv) == 2 and sys.argv[1] == "xml": 72 | print domain.XMLDesc(0) 73 | print "" 74 | -------------------------------------------------------------------------------- /testing/full-test.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | set -e 4 | 5 | cd "`dirname $0`/../" 6 | 7 | if [[ $1 == "" ]]; then 8 | echo "This script is designed to be ran when creating packages, it shouldn't normally be ran by end users" 9 | exit 1 10 | fi 11 | 12 | export name="$1" 13 | export category="$2" 14 | export testconfig="$5" 15 | 16 | ls -al /usr/share/libvirt-wakeonlan 17 | py.test2 -rxs --cov-report xml --cov . || py.test -rxs --cov-report xml --cov . 18 | 19 | exit 0 20 | 21 | # start and stop daemon 22 | 23 | # gentoo 24 | if [[ -f /etc/gentoo-release ]] ; then 25 | /etc/init.d/libvirt-wakeonlan start 26 | /etc/init.d/libvirt-wakeonlan stop 27 | fi 28 | 29 | # redhat 30 | if [[ -f /etc/redhat-release ]] ; then 31 | service libvirt-wakeonlan start 32 | service libvirt-wakeonlan stop 33 | fi 34 | 35 | # debian 36 | if [[ -f /etc/debian-release || -f /etc/debian_version ]] ; then 37 | service libvirt-wakeonlan start 38 | service libvirt-wakeonlan stop 39 | fi 40 | 41 | # arch 42 | if [[ -f /etc/arch-release ]] ; then 43 | systemctl start libvirt-wakeonlan 44 | systemctl stop libvirt-wakeonlan 45 | fi 46 | 47 | exit 0 -------------------------------------------------------------------------------- /testing/test_libvirtwol.py: -------------------------------------------------------------------------------- 1 | # LibVirt Wake On Lan 2 | # Copyright (C) 2014 Simon Cadman 3 | # 4 | # This program is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation, either version 3 of the License, or 7 | # (at your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program. If not, see . 16 | import os 17 | import sys 18 | import pytest 19 | import base64 20 | sys.path.insert(0, ".") 21 | 22 | from libvirtwol import LibVirtWakeOnLan 23 | 24 | 25 | def test_StartServerByMACAddress(): 26 | pass 27 | 28 | 29 | def test_GetMACAddress(): 30 | testdata = "7ZMABwBuwov////////erb7vsz/erb7vsz/erb7vsz/erb7vsz/erb7vsz/erb7vsz/" 31 | testdata += "erb7vsz/erb7vsz/erb7vsz/erb7vsz/erb7vsz/erb7vsz/erb7vsz/erb7vsz/erb7vsz/erb7vsz8=" 32 | assert LibVirtWakeOnLan.GetMACAddress(base64.b64decode(testdata)) == "de:ad:be:ef:b3:3f" 33 | 34 | 35 | def test_InvalidGetMACAddress(): 36 | testdata = "dGVzdHBhY2tldAo=" 37 | assert LibVirtWakeOnLan.GetMACAddress(base64.b64decode(testdata)) is None 38 | 39 | 40 | def test_DecodeInvalidPacket(): 41 | testdata = "quiev2Moh7jahXoo3ai" 42 | assert LibVirtWakeOnLan.DecodeIPPacket(testdata) is None 43 | 44 | 45 | def test_DecodeIPPacket(): 46 | testdata = "Pa3ieZi4zejah1eiPh9e" 47 | assert LibVirtWakeOnLan.DecodeIPPacket(testdata) is not None 48 | 49 | 50 | def test_InspectIPPacketNoMAC(): 51 | pass 52 | 53 | 54 | def test_InspectIPPacketWithMAC(): 55 | pass 56 | -------------------------------------------------------------------------------- /testing/test_lvwolutils.py: -------------------------------------------------------------------------------- 1 | # LibVirt Wake On Lan 2 | # Copyright (C) 2014 Simon Cadman 3 | # 4 | # This program is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation, either version 3 of the License, or 7 | # (at your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program. If not, see . 16 | import os 17 | import logging 18 | import sys 19 | import pytest 20 | import struct 21 | sys.path.insert(0, ".") 22 | 23 | from lvwolutils import Utils 24 | 25 | 26 | def teardown_function(function): 27 | logging.shutdown() 28 | reload(logging) 29 | 30 | 31 | def test_SetupLogging(): 32 | testLogFile = '/tmp/test.log' 33 | assert os.path.exists(testLogFile) is False 34 | assert Utils.SetupLogging(testLogFile) is True 35 | logging.error('test_setupLogging error test') 36 | assert os.path.exists(testLogFile) is True 37 | os.unlink(testLogFile) 38 | 39 | 40 | def test_SetupLoggingDefault(): 41 | testLogFile = '/tmp/test.log' 42 | assert os.path.exists(testLogFile) is False 43 | Utils.logpath = testLogFile 44 | assert Utils.SetupLogging() is True 45 | logging.error('test_setupLogging error test') 46 | assert os.path.exists(testLogFile) is True 47 | os.unlink(testLogFile) 48 | 49 | 50 | def test_SetupLoggingFails(): 51 | testLogFile = '/tmp/dirthatdoesntexist/test.log' 52 | assert os.path.exists(testLogFile) is False 53 | assert Utils.SetupLogging(testLogFile) is False 54 | assert os.path.exists(testLogFile) is False 55 | 56 | 57 | def test_showVersion(): 58 | assert Utils.ShowVersion("12345") is False 59 | sys.argv = ['testfile', 'version'] 60 | with pytest.raises(SystemExit): 61 | Utils.ShowVersion("12345") 62 | --------------------------------------------------------------------------------