Code

sc_plugin.m4: Added support for dashes in plugin names to AC_SC_PLUGIN().
authorSebastian Harl <sh@tokkee.org>
Mon, 10 Dec 2012 14:40:38 +0000 (15:40 +0100)
committerSebastian Harl <sh@tokkee.org>
Mon, 10 Dec 2012 14:40:38 +0000 (15:40 +0100)
m4/sc_plugin.m4

index bd55725ffc0807334e834389205ea14f807da403..fccc087c62cc79b6a8aaa8f573d6940510c1967c 100644 (file)
@@ -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"
        ]
 )