From patchwork Sun Jan 24 14:22:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony Liguori X-Patchwork-Id: 43594 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 50597B7CA6 for ; Mon, 25 Jan 2010 01:37:04 +1100 (EST) Received: from localhost ([127.0.0.1]:37472 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZ3PD-00029y-O5 for incoming@patchwork.ozlabs.org; Sun, 24 Jan 2010 09:25:35 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NZ3MN-0001Wk-7L for qemu-devel@nongnu.org; Sun, 24 Jan 2010 09:22:39 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NZ3MH-0001TF-V3 for qemu-devel@nongnu.org; Sun, 24 Jan 2010 09:22:38 -0500 Received: from [199.232.76.173] (port=51938 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZ3MH-0001TB-PD for qemu-devel@nongnu.org; Sun, 24 Jan 2010 09:22:33 -0500 Received: from e37.co.us.ibm.com ([32.97.110.158]:55189) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NZ3MH-0008Th-KR for qemu-devel@nongnu.org; Sun, 24 Jan 2010 09:22:33 -0500 Received: from d03relay05.boulder.ibm.com (d03relay05.boulder.ibm.com [9.17.195.107]) by e37.co.us.ibm.com (8.14.3/8.13.1) with ESMTP id o0OEL7wv030380 for ; Sun, 24 Jan 2010 07:21:07 -0700 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay05.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o0OEMRWo099310 for ; Sun, 24 Jan 2010 07:22:27 -0700 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o0OEMQKO028268 for ; Sun, 24 Jan 2010 07:22:26 -0700 Received: from localhost.localdomain (sig-9-65-101-121.mts.ibm.com [9.65.101.121]) by d03av04.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id o0OEMOq1028158; Sun, 24 Jan 2010 07:22:26 -0700 From: Anthony Liguori To: qemu-devel@nongnu.org Date: Sun, 24 Jan 2010 08:22:16 -0600 Message-Id: <1264342938-7363-2-git-send-email-aliguori@us.ibm.com> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1264342938-7363-1-git-send-email-aliguori@us.ibm.com> References: <1264342938-7363-1-git-send-email-aliguori@us.ibm.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Cc: Anthony Liguori Subject: [Qemu-devel] [PATCH 1/3] Support --sysconfdir in configure to specify path to configuration files (v3) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The default value is ${prefix}/etc/qemu. --sysconfdir can be used to override the default to an absolute path. The expectation is that when installed to /usr, --sysconfdir=/etc/qemu will be used. Signed-off-by: Anthony Liguori --- v2 -> v3 - default sysconfdir to ${prefix}/etc on unix, ${prefix} on win32 - set confdir to ${sysconfdir}/qemu on unix, ${sysconfdir} on win32 v1 -> v2 - rename to sysconf --- configure | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 5631bbb..379b536 100755 --- a/configure +++ b/configure @@ -32,6 +32,7 @@ cpu="" prefix="" interp_prefix="/usr/gnemul/qemu-%M" static="no" +sysconfdir="" sparc_cpu="" cross_prefix="" cc="gcc" @@ -453,6 +454,8 @@ for opt do ;; --static) static="yes" ;; + --sysconfdir) sysconfdir="$optarg" + ;; --disable-sdl) sdl="no" ;; --enable-sdl) sdl="yes" @@ -686,6 +689,7 @@ echo " --extra-ldflags=LDFLAGS append extra linker flags LDFLAGS" echo " --make=MAKE use specified make [$make]" echo " --install=INSTALL use specified install [$install]" echo " --static enable static build [$static]" +echo " --sysconfdir=PATH install config in PATH" echo " --enable-debug-tcg enable TCG debugging" echo " --disable-debug-tcg disable TCG debugging (default)" echo " --enable-debug enable common debug build options" @@ -1828,8 +1832,12 @@ if test "$mingw32" = "yes" ; then fi mansuffix="" datasuffix="" + confsuffix="" docsuffix="" binsuffix="" + if test -z "$sysconfdir" ; then + sysconfdir="${prefix}" + fi else if test -z "$prefix" ; then prefix="/usr/local" @@ -1838,6 +1846,9 @@ else datasuffix="/share/qemu" docsuffix="/share/doc/qemu" binsuffix="/bin" + if test -z "$sysconfdir" ; then + sysconfdir="${prefix}/etc" + fi fi echo "Install prefix $prefix" @@ -1914,6 +1925,11 @@ printf " '%s'" "$0" "$@" >> $config_host_mak echo >> $config_host_mak echo "CONFIG_QEMU_SHAREDIR=\"$prefix$datasuffix\"" >> $config_host_mak +if test "$mingw32" = "yes" ; then + echo "CONFIG_QEMU_CONFDIR=\"$sysconfdir\"" >> $config_host_mak +else + echo "CONFIG_QEMU_CONFDIR=\"${sysconfdir}/qemu\"" >> $config_host_mak +fi case "$cpu" in i386|x86_64|alpha|cris|hppa|ia64|m68k|microblaze|mips|mips64|ppc|ppc64|s390|s390x|sparc|sparc64) @@ -2159,6 +2175,7 @@ echo "prefix=$prefix" >> $config_host_mak echo "bindir=\${prefix}$binsuffix" >> $config_host_mak echo "mandir=\${prefix}$mansuffix" >> $config_host_mak echo "datadir=\${prefix}$datasuffix" >> $config_host_mak +echo "sysconfdir=$sysconfdir" >> $config_host_mak echo "docdir=\${prefix}$docsuffix" >> $config_host_mak echo "MAKE=$make" >> $config_host_mak echo "INSTALL=$install" >> $config_host_mak