From: Sebastian Harl Date: Mon, 10 Dec 2012 14:40:38 +0000 (+0100) Subject: sc_plugin.m4: Added support for dashes in plugin names to AC_SC_PLUGIN(). X-Git-Tag: sysdb-0.1.0~464 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=96957483b82c2a29eeada86b61647278a98cb6c8;p=sysdb.git sc_plugin.m4: Added support for dashes in plugin names to AC_SC_PLUGIN(). --- diff --git a/m4/sc_plugin.m4 b/m4/sc_plugin.m4 index bd55725..fccc087 100644 --- a/m4/sc_plugin.m4 +++ b/m4/sc_plugin.m4 @@ -69,7 +69,7 @@ AC_DEFUN([AC_SC_PLUGIN], ) if test "x$enable_plugin" = "xyes"; then if test "x$2" = "xyes" || test "x$force" = "xyes"; then - AC_DEFINE([HAVE_PLUGIN_]m4_toupper([$1]), 1, [Define to 1 if the $1 plugin is enabled.]) + AC_DEFINE([HAVE_PLUGIN_]m4_translit(m4_toupper([$1]),[-],[_]), 1, [Define to 1 if the $1 plugin is enabled.]) if test "x$2" != "xyes"; then dependency_warning="yes" fi @@ -78,8 +78,8 @@ AC_DEFUN([AC_SC_PLUGIN], enable_plugin="no (dependency error)" fi fi - AM_CONDITIONAL([BUILD_PLUGIN_]m4_toupper([$1]), test "x$enable_plugin" = "xyes") - enable_$1="$enable_plugin" + AM_CONDITIONAL([BUILD_PLUGIN_]m4_translit(m4_toupper([$1]),[-][_]), test "x$enable_plugin" = "xyes") + m4_translit(enable_$1,[-],[_])="$enable_plugin" ] )