Blob Blame History Raw
From 7c266d416edbbe69a874f70732cea545cfe61dba Mon Sep 17 00:00:00 2001
Message-Id: <7c266d416edbbe69a874f70732cea545cfe61dba@dist-git>
From: Eric Blake <eblake@redhat.com>
Date: Wed, 26 Feb 2014 14:35:04 +0100
Subject: [PATCH] build: use --with-systemd-daemon as configure option

https://bugzilla.redhat.com/show_bug.cgi?id=1032695

Commit 68954fb added a configure option --with-systemd_daemon,
which violates the conventions of configure files preferring
dash in all option names.  This fixes it, before we hit a
release where the tarball is baked with an awkward name.

* m4/virt-lib.m4 (LIBVIRT_CHECK_LIB, LIBVIRT_CHECK_LIB_ALT)
(LIBVIRT_CHECK_PKG): Favor - over _ in configure option names.

Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit 25034b3c40fc7295511f80cad1d923b5f4efcb70)

Conflicts:
	m4/virt-lib.m4: Context, as f92c7e31 is not backported yet
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 m4/virt-lib.m4 | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/m4/virt-lib.m4 b/m4/virt-lib.m4
index 778cd40..57e6b31 100644
--- a/m4/virt-lib.m4
+++ b/m4/virt-lib.m4
@@ -1,7 +1,7 @@
 dnl
 dnl virt-lib.m4: Helper macros for checking for libraries
 dnl
-dnl Copyright (C) 2012-2013 Red Hat, Inc.
+dnl Copyright (C) 2012-2014 Red Hat, Inc.
 dnl
 dnl This library is free software; you can redistribute it and/or
 dnl modify it under the terms of the GNU Lesser General Public
@@ -54,15 +54,16 @@ AC_DEFUN([LIBVIRT_CHECK_LIB],[
   m4_pushdef([header_name], [$4])
 
   m4_pushdef([check_name_lc], m4_tolower(check_name))
+  m4_pushdef([check_name_dash], m4_translit(check_name_lc, [_], [-]))
 
   m4_pushdef([config_var], [WITH_]check_name)
   m4_pushdef([make_var], [WITH_]check_name)
   m4_pushdef([cflags_var], check_name[_CFLAGS])
   m4_pushdef([libs_var], check_name[_LIBS])
-  m4_pushdef([arg_var], [with-]check_name_lc)
+  m4_pushdef([arg_var], [with-]check_name_dash)
   m4_pushdef([with_var], [with_]check_name_lc)
 
-  AC_ARG_WITH(check_name_lc,
+  AC_ARG_WITH(check_name_dash,
     [AS_HELP_STRING([--arg_var],
                     [with lib]]m4_dquote(library_name)[[ support @<:@default=check@:>@])],
     [],[with_var][=check])
@@ -126,6 +127,7 @@ AC_DEFUN([LIBVIRT_CHECK_LIB],[
   m4_popdef([make_var])
   m4_popdef([config_var])
 
+  m4_popdef([check_name_dash])
   m4_popdef([check_name_lc])
 
   m4_popdef([header_name])
@@ -182,17 +184,18 @@ AC_DEFUN([LIBVIRT_CHECK_LIB_ALT],[
   m4_pushdef([header_name_alt], [$8])
 
   m4_pushdef([check_name_lc], m4_tolower(check_name))
+  m4_pushdef([check_name_dash], m4_translit(check_name_lc, [_], [-]))
 
   m4_pushdef([config_var], [WITH_]check_name)
   m4_pushdef([make_var], [WITH_]check_name)
   m4_pushdef([cflags_var], check_name[_CFLAGS])
   m4_pushdef([libs_var], check_name[_LIBS])
-  m4_pushdef([arg_var], [with-]check_name_lc)
+  m4_pushdef([arg_var], [with-]check_name_dash)
   m4_pushdef([with_var], [with_]check_name_lc)
   m4_pushdef([config_var_alt], [WITH_]check_name_alt)
   m4_pushdef([make_var_alt], [WITH_]check_name_alt)
 
-  AC_ARG_WITH(check_name_lc,
+  AC_ARG_WITH(check_name_dash,
     [AS_HELP_STRING([--arg_var],
                     [with lib]]m4_dquote(library_name)[[ support @<:@default=check@:>@])],
     [],[with_var][=check])
@@ -273,6 +276,7 @@ AC_DEFUN([LIBVIRT_CHECK_LIB_ALT],[
   m4_popdef([config_var])
 
   m4_popdef([check_name_lc])
+  m4_popdef([check_name_dash])
 
   m4_popdef([header_name_alt])
   m4_popdef([function_name_alt])
@@ -310,15 +314,16 @@ AC_DEFUN([LIBVIRT_CHECK_PKG],[
   m4_pushdef([pc_version], [$3])
 
   m4_pushdef([check_name_lc], m4_tolower(check_name))
+  m4_pushdef([check_name_dash], m4_translit(check_name_lc, [_], [-]))
 
   m4_pushdef([config_var], [WITH_]check_name)
   m4_pushdef([make_var], [WITH_]check_name)
   m4_pushdef([cflags_var], check_name[_CFLAGS])
   m4_pushdef([libs_var], check_name[_LIBS])
-  m4_pushdef([arg_var], [with-]check_name_lc)
+  m4_pushdef([arg_var], [with-]check_name_dash)
   m4_pushdef([with_var], [with_]check_name_lc)
 
-  AC_ARG_WITH(check_name_lc,
+  AC_ARG_WITH(check_name_dash,
     [AS_HELP_STRING([--arg_var],
                    [with ]]m4_dquote(pc_name)[[ (>= ]]m4_dquote(pc_version)[[) support @<:@default=check@:>@])],
     [],[with_var][=check])
@@ -353,6 +358,7 @@ AC_DEFUN([LIBVIRT_CHECK_PKG],[
   m4_popdef([config_var])
 
   m4_popdef([check_name_lc])
+  m4_popdef([check_name_dash])
 
   m4_popdef([pc_version])
   m4_popdef([pc_name])
-- 
1.9.0