Quentin Glidic | 9992bdc | 2016-04-23 12:02:58 +0200 | [diff] [blame] | 1 | dnl |
| 2 | dnl Copyright © 2016 Quentin “Sardem FF7” Glidic |
| 3 | dnl |
| 4 | dnl Permission is hereby granted, free of charge, to any person obtaining a |
| 5 | dnl copy of this software and associated documentation files (the "Software"), |
| 6 | dnl to deal in the Software without restriction, including without limitation |
| 7 | dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 8 | dnl and/or sell copies of the Software, and to permit persons to whom the |
| 9 | dnl Software is furnished to do so, subject to the following conditions: |
| 10 | dnl |
| 11 | dnl The above copyright notice and this permission notice (including the next |
| 12 | dnl paragraph) shall be included in all copies or substantial portions of the |
| 13 | dnl Software. |
| 14 | dnl |
| 15 | dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 16 | dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 | dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 18 | dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 19 | dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 20 | dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 21 | dnl DEALINGS IN THE SOFTWARE. |
| 22 | dnl |
| 23 | |
| 24 | dnl WESTON_SEARCH_LIBS(PREFIX, search-libs, function, [action-if-found], [action-if-not-found], [other-libraries]) |
| 25 | dnl WESTON_SEARCH_LIBS is a wrapper around AC_SEARCH_LIBS with a little difference: |
| 26 | dnl action-if-found is called even if no library is required |
| 27 | AC_DEFUN([WESTON_SEARCH_LIBS], [ |
| 28 | weston_save_LIBS=${LIBS} |
| 29 | AC_SEARCH_LIBS([$3], [$2], [$4], [$5], [$6]) |
| 30 | AS_CASE([${ac_cv_search_][$3][}], |
| 31 | ['none required'], [$4], |
| 32 | [no], [], |
| 33 | [$1][_LIBS=${ac_cv_search_][$3][}] |
| 34 | ) |
| 35 | AC_SUBST([$1][_LIBS]) |
| 36 | LIBS=${weston_save_LIBS} |
| 37 | ]) |