mirror of
https://github.com/libuv/libuv
synced 2025-03-28 21:13:16 +00:00
build: fix building with old versions of autoconf
This commit is contained in:
parent
ba47e68824
commit
1759781c90
@ -16,6 +16,7 @@ AC_PREREQ(2.57)
|
|||||||
AC_INIT([libuv], [0.11.23], [https://github.com/joyent/libuv/issues])
|
AC_INIT([libuv], [0.11.23], [https://github.com/joyent/libuv/issues])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
m4_include([m4/libuv-extra-automake-flags.m4])
|
m4_include([m4/libuv-extra-automake-flags.m4])
|
||||||
|
m4_include([m4/as_case.m4])
|
||||||
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects] UV_EXTRA_AUTOMAKE_FLAGS)
|
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects] UV_EXTRA_AUTOMAKE_FLAGS)
|
||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
AC_ENABLE_SHARED
|
AC_ENABLE_SHARED
|
||||||
|
21
m4/as_case.m4
Normal file
21
m4/as_case.m4
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# AS_CASE(WORD, [PATTERN1], [IF-MATCHED1]...[DEFAULT])
|
||||||
|
# ----------------------------------------------------
|
||||||
|
# Expand into
|
||||||
|
# | case WORD in
|
||||||
|
# | PATTERN1) IF-MATCHED1 ;;
|
||||||
|
# | ...
|
||||||
|
# | *) DEFAULT ;;
|
||||||
|
# | esac
|
||||||
|
m4_define([_AS_CASE],
|
||||||
|
[m4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])],
|
||||||
|
[$#], 1, [ *) $1 ;;],
|
||||||
|
[$#], 2, [ $1) m4_default([$2], [:]) ;;],
|
||||||
|
[ $1) m4_default([$2], [:]) ;;
|
||||||
|
$0(m4_shiftn(2, $@))])dnl
|
||||||
|
])
|
||||||
|
m4_defun([AS_CASE],
|
||||||
|
[m4_ifval([$2$3],
|
||||||
|
[case $1 in
|
||||||
|
_AS_CASE(m4_shift($@))
|
||||||
|
esac])])
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user