dnl with_XXX configure shell var.
dnl
dnl LIBVIRT_CHECK_LIB([CHECK_NAME], [LIBRARY_NAME],
-dnl [FUNCTION_NAME], [HEADER_NAME])
+dnl [FUNCTION_NAME], [HEADER_NAME],
+dnl [FAIL_ACTION])
dnl
dnl CHECK_NAME: Suffix/prefix used for variables / flags, in uppercase.
dnl Used to set
dnl LIBRARY_NAME: base name of library to check for eg libXXX.so
dnl FUNCTION_NAME: function to check for in libXXX.so
dnl HEADER_NAME: header file to check for
+dnl FAIL_ACTION: overrides the default fail action
+dnl
dnl
dnl e.g.
dnl
m4_pushdef([library_name], [$2])
m4_pushdef([function_name], [$3])
m4_pushdef([header_name], [$4])
+ m4_pushdef([fail_action], [$5])
m4_pushdef([check_name_lc], m4_tolower(check_name))
CFLAGS=$old_CFLAGS
if test $fail = 1; then
- AC_MSG_ERROR([You must install the lib]library_name[ library & headers to compile libvirt])
+ m4_default(fail_action,
+ [AC_MSG_ERROR([You must install the lib]library_name[ library & headers to compile libvirt])])
else
if test "x$with_var" = "xyes" ; then
if test "x$libs_var" = 'x' ; then
m4_popdef([check_name_lc])
+ m4_popdef([fail_action])
m4_popdef([header_name])
m4_popdef([function_name])
m4_popdef([library_name])
dnl LIBVIRT_CHECK_LIB_ALT([CHECK_NAME], [LIBRARY_NAME],
dnl [FUNCTION_NAME], [HEADER_NAME],
dnl [CHECK_NAME_ALT, [LIBRARY_NAME_ALT],
-dnl [FUNCTION_NAME_ALT], [HEADER_NAME_ALT])
+dnl [FUNCTION_NAME_ALT], [HEADER_NAME_ALT],
+dnl [FAIL_ACTION])
dnl
dnl CHECK_NAME: Suffix/prefix used for variables / flags, in uppercase.
dnl Used to set
dnl LIBRARY_NAME_ALT: alternative library name to check for
dnl FUNCTION_NAME_ALT: alternative function name to check for
dnl HEADER_NAME_ALT: alternative header file to check for
+dnl FAIL_ACTION: overrides the default fail action
dnl
dnl e.g.
dnl
m4_pushdef([library_name_alt], [$6])
m4_pushdef([function_name_alt], [$7])
m4_pushdef([header_name_alt], [$8])
+ m4_pushdef([fail_action], [$9])
m4_pushdef([check_name_lc], m4_tolower(check_name))
CFLAGS=$old_CFLAGS
if test $fail = 1; then
- AC_MSG_ERROR([You must install the lib]library_name[ library & headers to compile libvirt])
+ m4_default(fail_action,
+ [AC_MSG_ERROR([You must install the lib]library_name[ library & headers to compile libvirt])])
else
if test "x$with_var" = "xyes" ; then
if test "x$libs_var" = 'x' ; then
m4_popdef([check_name_lc])
+ m4_popdef([fail_action])
m4_popdef([header_name_alt])
m4_popdef([function_name_alt])
m4_popdef([library_name_alt])
dnl config header var, WITH_XXXX make conditional and
dnl with_XXX configure shell var.
dnl
-dnl LIBVIRT_CHECK_PKG([CHECK_NAME], [PC_NAME], [PC_VERSION])
+dnl LIBVIRT_CHECK_PKG([CHECK_NAME], [PC_NAME], [PC_VERSION],
+dnl [FAIL_ACTION])
dnl
dnl CHECK_NAME: Suffix/prefix used for variables / flags, in uppercase.
dnl Used to set
dnl configure: with_xxx variable
dnl PC_NAME: Name of the pkg-config module
dnl PC_VERSION: Version of the pkg-config module
+dnl FAIL_ACTION: overrides the default fail action
dnl
dnl eg
dnl
m4_pushdef([check_name], [$1])
m4_pushdef([pc_name], [$2])
m4_pushdef([pc_version], [$3])
+ m4_pushdef([fail_action], [$4])
m4_pushdef([check_name_lc], m4_tolower(check_name))
fi
if test $fail = 1; then
- AC_MSG_ERROR([You must install the ]pc_name[ >= ]pc_version[ pkg-config module to compile libvirt])
+ m4_default(fail_action,
+ [AC_MSG_ERROR([You must install the ]pc_name[ >= ]pc_version[ pkg-config module to compile libvirt])])
fi
if test "x$with_var" = "xyes" ; then
m4_popdef([check_name_lc])
+ m4_popdef([fail_action])
m4_popdef([pc_version])
m4_popdef([pc_name])
m4_popdef([check_name])