|
1 | 1 | # =========================================================================== |
2 | | -# http://www.gnu.org/software/autoconf-archive/ax_append_flag.html |
| 2 | +# https://www.gnu.org/software/autoconf-archive/ax_append_flag.html |
3 | 3 | # =========================================================================== |
4 | 4 | # |
5 | 5 | # SYNOPSIS |
|
34 | 34 | # Public License for more details. |
35 | 35 | # |
36 | 36 | # You should have received a copy of the GNU General Public License along |
37 | | -# with this program. If not, see <http://www.gnu.org/licenses/>. |
| 37 | +# with this program. If not, see <https://www.gnu.org/licenses/>. |
38 | 38 | # |
39 | 39 | # As a special exception, the respective Autoconf Macro's copyright owner |
40 | 40 | # gives unlimited permission to copy, distribute and modify the configure |
|
49 | 49 | # modified version of the Autoconf Macro, you may extend this special |
50 | 50 | # exception to the GPL to apply to your modified version as well. |
51 | 51 |
|
52 | | -#serial 2 |
| 52 | +#serial 7 |
53 | 53 |
|
54 | 54 | AC_DEFUN([AX_APPEND_FLAG], |
55 | | -[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX |
56 | | -AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])dnl |
57 | | -AS_VAR_SET_IF(FLAGS, |
58 | | - [case " AS_VAR_GET(FLAGS) " in |
59 | | - *" $1 "*) |
60 | | - AC_RUN_LOG([: FLAGS already contains $1]) |
61 | | - ;; |
62 | | - *) |
63 | | - AC_RUN_LOG([: FLAGS="$FLAGS $1"]) |
64 | | - AS_VAR_SET(FLAGS, ["AS_VAR_GET(FLAGS) $1"]) |
65 | | - ;; |
66 | | - esac], |
67 | | - [AS_VAR_SET(FLAGS,["$1"])]) |
| 55 | +[dnl |
| 56 | +AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF |
| 57 | +AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])]) |
| 58 | +AS_VAR_SET_IF(FLAGS,[ |
| 59 | + AS_CASE([" AS_VAR_GET(FLAGS) "], |
| 60 | + [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])], |
| 61 | + [ |
| 62 | + AS_VAR_APPEND(FLAGS,[" $1"]) |
| 63 | + AC_RUN_LOG([: FLAGS="$FLAGS"]) |
| 64 | + ]) |
| 65 | + ], |
| 66 | + [ |
| 67 | + AS_VAR_SET(FLAGS,[$1]) |
| 68 | + AC_RUN_LOG([: FLAGS="$FLAGS"]) |
| 69 | + ]) |
68 | 70 | AS_VAR_POPDEF([FLAGS])dnl |
69 | 71 | ])dnl AX_APPEND_FLAG |
0 commit comments