[13/14] configure: change meaning of --datadir to Autoconf convention
diff mbox

Message ID 1333128782-20589-14-git-send-email-ehabkost@redhat.com
State New
Headers show

Commit Message

Eduardo Habkost March 30, 2012, 5:33 p.m. UTC
Autoconf uses --datadir for the /usr/share directory, not the
program-specific subdirectory inside /usr/share. This changes configure
to match autoconf behavior.

Note that this will break compatibility with existing build scripts.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 configure |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

Comments

Paolo Bonzini April 4, 2012, 3:25 p.m. UTC | #1
Il 30/03/2012 19:33, Eduardo Habkost ha scritto:
> Autoconf uses --datadir for the /usr/share directory, not the
> program-specific subdirectory inside /usr/share. This changes configure
> to match autoconf behavior.
> 
> Note that this will break compatibility with existing build scripts.
> 
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
>  configure |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/configure b/configure
> index 5de58cb..b74efe2 100755
> --- a/configure
> +++ b/configure
> @@ -155,7 +155,7 @@ mingw32="no"
>  EXESUF=""
>  prefix="/usr/local"
>  mandir="\${prefix}/share/man"
> -qemu_datadir="\${prefix}/share/qemu"
> +datadir="\${prefix}/share"
>  qemu_docdir="\${prefix}/share/doc/qemu"
>  bindir="\${prefix}/bin"
>  libdir="\${prefix}/lib"
> @@ -521,7 +521,7 @@ EOF
>    fi
>    prefix="c:/Program Files/Qemu"
>    mandir="\${prefix}"
> -  qemu_datadir="\${prefix}"
> +  datadir="\${prefix}"
>    qemu_docdir="\${prefix}"
>    bindir="\${prefix}"
>    sysconfdir="\${prefix}"

This does not change anything because the next line is

  confsuffix=""

Nice. :)

Paolo

> @@ -589,7 +589,7 @@ for opt do
>    ;;
>    --includedir=*) includedir="$optarg"
>    ;;
> -  --datadir=*) qemu_datadir="$optarg"
> +  --datadir=*) datadir="$optarg"
>    ;;
>    --docdir=*) qemu_docdir="$optarg"
>    ;;
> @@ -1007,7 +1007,7 @@ echo "  --python=PYTHON          use specified python [$python]"
>  echo "  --smbd=SMBD              use specified smbd [$smbd]"
>  echo "  --static                 enable static build [$static]"
>  echo "  --mandir=PATH            install man pages in PATH"
> -echo "  --datadir=PATH           install firmware in PATH"
> +echo "  --datadir=PATH           install firmware in PATH/qemu"
>  echo "  --docdir=PATH            install documentation in PATH"
>  echo "  --bindir=PATH            install binaries in PATH"
>  echo "  --sysconfdir=PATH        install config in PATH/qemu"
> @@ -2831,6 +2831,7 @@ if test "$mingw32" = "yes" ; then
>  fi
>  
>  qemu_confdir=$sysconfdir$confsuffix
> +qemu_datadir=$datadir$confsuffix
>  
>  tools=
>  if test "$softmmu" = yes ; then
Eduardo Habkost April 4, 2012, 4:19 p.m. UTC | #2
On Wed, Apr 04, 2012 at 05:25:14PM +0200, Paolo Bonzini wrote:
> Il 30/03/2012 19:33, Eduardo Habkost ha scritto:
> > Autoconf uses --datadir for the /usr/share directory, not the
> > program-specific subdirectory inside /usr/share. This changes configure
> > to match autoconf behavior.
> > 
> > Note that this will break compatibility with existing build scripts.
> > 
> > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> > ---
> >  configure |    9 +++++----
> >  1 files changed, 5 insertions(+), 4 deletions(-)
> > 
> > diff --git a/configure b/configure
> > index 5de58cb..b74efe2 100755
> > --- a/configure
> > +++ b/configure
> > @@ -155,7 +155,7 @@ mingw32="no"
> >  EXESUF=""
> >  prefix="/usr/local"
> >  mandir="\${prefix}/share/man"
> > -qemu_datadir="\${prefix}/share/qemu"
> > +datadir="\${prefix}/share"
> >  qemu_docdir="\${prefix}/share/doc/qemu"
> >  bindir="\${prefix}/bin"
> >  libdir="\${prefix}/lib"
> > @@ -521,7 +521,7 @@ EOF
> >    fi
> >    prefix="c:/Program Files/Qemu"
> >    mandir="\${prefix}"
> > -  qemu_datadir="\${prefix}"
> > +  datadir="\${prefix}"
> >    qemu_docdir="\${prefix}"
> >    bindir="\${prefix}"
> >    sysconfdir="\${prefix}"
> 
> This does not change anything because the next line is
> 
>   confsuffix=""
> 
> Nice. :)

Yes, in the case of mingw32 it does not change anything. The change
above is only necessary because qemu_datadir is now set later, at:

[...]
> > @@ -2831,6 +2831,7 @@ if test "$mingw32" = "yes" ; then
> >  fi
> >  
> >  qemu_confdir=$sysconfdir$confsuffix
> > +qemu_datadir=$datadir$confsuffix
> >  
> >  tools=
> >  if test "$softmmu" = yes ; then

Patch
diff mbox

diff --git a/configure b/configure
index 5de58cb..b74efe2 100755
--- a/configure
+++ b/configure
@@ -155,7 +155,7 @@  mingw32="no"
 EXESUF=""
 prefix="/usr/local"
 mandir="\${prefix}/share/man"
-qemu_datadir="\${prefix}/share/qemu"
+datadir="\${prefix}/share"
 qemu_docdir="\${prefix}/share/doc/qemu"
 bindir="\${prefix}/bin"
 libdir="\${prefix}/lib"
@@ -521,7 +521,7 @@  EOF
   fi
   prefix="c:/Program Files/Qemu"
   mandir="\${prefix}"
-  qemu_datadir="\${prefix}"
+  datadir="\${prefix}"
   qemu_docdir="\${prefix}"
   bindir="\${prefix}"
   sysconfdir="\${prefix}"
@@ -589,7 +589,7 @@  for opt do
   ;;
   --includedir=*) includedir="$optarg"
   ;;
-  --datadir=*) qemu_datadir="$optarg"
+  --datadir=*) datadir="$optarg"
   ;;
   --docdir=*) qemu_docdir="$optarg"
   ;;
@@ -1007,7 +1007,7 @@  echo "  --python=PYTHON          use specified python [$python]"
 echo "  --smbd=SMBD              use specified smbd [$smbd]"
 echo "  --static                 enable static build [$static]"
 echo "  --mandir=PATH            install man pages in PATH"
-echo "  --datadir=PATH           install firmware in PATH"
+echo "  --datadir=PATH           install firmware in PATH/qemu"
 echo "  --docdir=PATH            install documentation in PATH"
 echo "  --bindir=PATH            install binaries in PATH"
 echo "  --sysconfdir=PATH        install config in PATH/qemu"
@@ -2831,6 +2831,7 @@  if test "$mingw32" = "yes" ; then
 fi
 
 qemu_confdir=$sysconfdir$confsuffix
+qemu_datadir=$datadir$confsuffix
 
 tools=
 if test "$softmmu" = yes ; then