Summary: | use AS_IF, AS_CASE instead of if/fi and case/esac | ||
---|---|---|---|
Product: | Telepathy | Reporter: | Simon McVittie <smcv> |
Component: | tp-glib | Assignee: | Simon McVittie <smcv> |
Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | normal | ||
Priority: | medium | Keywords: | patch |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | review+ | ||
i915 platform: | i915 features: | ||
Attachments: |
1/3] configure.ac: don't rely on test -a
2/3] configure.ac: use AS_IF instead of if/then/[else/]fi 3/3] configure.ac: use AS_CASE instead of case/esac |
Description
Simon McVittie
2012-08-13 16:19:04 UTC
Created attachment 65501 [details] [review] 1/3] configure.ac: don't rely on test -a test EXPR -a EXPR is a common extension (present in bash, dash etc.), but is not guaranteed by POSIX. Created attachment 65502 [details] [review] 2/3] configure.ac: use AS_IF instead of if/then/[else/]fi AS_IF is always safe, whereas if/fi usually works in practice, but sometimes fails to do the right thing with Autoconf macro dependencies. See <https://bugzilla.gnome.org/show_bug.cgi?id=681413> for more information. Created attachment 65503 [details] [review] 3/3] configure.ac: use AS_CASE instead of case/esac This is the same as AS_IF, but for "case". It's safer for the same reasons. I've edited http://telepathy.freedesktop.org/wiki/Style to recommend AS_IF, AS_CASE. Hilarious. ┏━╸┏━┓ ┏━┓╻ ╻┏━╸┏━┓╺┳┓ ┃╺┓┃ ┃ ┣━┫┣━┫┣╸ ┣━┫ ┃┃ ┗━┛┗━┛ ╹ ╹╹ ╹┗━╸╹ ╹╺┻┛ Fixed in git for 0.19.7, thanks. I've opened many clones for our other non-obsolete Autotools projects. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.