Patchwork [03/14] pixman: windup in configure & makefiles

login
register
mail settings
Submitter Gerd Hoffmann
Date Oct. 17, 2012, 1:29 p.m.
Message ID <1350480554-23281-4-git-send-email-kraxel@redhat.com>
Download mbox | patch
Permalink /patch/192048/
State New
Headers show

Comments

Gerd Hoffmann - Oct. 17, 2012, 1:29 p.m.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 Makefile  |    9 +++++++++
 configure |   38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 0 deletions(-)
Paolo Bonzini - Oct. 17, 2012, 2:26 p.m.
Il 17/10/2012 15:29, Gerd Hoffmann ha scritto:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  Makefile  |    9 +++++++++
>  configure |   38 ++++++++++++++++++++++++++++++++++++++
>  2 files changed, 47 insertions(+), 0 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index a9c22bf..5699101 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -105,6 +105,15 @@ endif
>  
>  subdir-libcacard: $(oslib-obj-y) $(trace-obj-y) qemu-timer-common.o
>  
> +subdir-pixman: pixman/Makefile
> +	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pixman V="$(V)" all,)
> +
> +pixman/Makefile: $(SRC_PATH)/pixman/configure
> +	(cd pixman; $(SRC_PATH)/pixman/configure --disable-shared --enable-static)
> +
> +$(SRC_PATH)/pixman/configure:
> +	(cd $(SRC_PATH)/pixman; autoreconf -v --install)
> +
>  $(filter %-softmmu,$(SUBDIR_RULES)): $(universal-obj-y) $(trace-obj-y) $(common-obj-y) $(extra-obj-y) subdir-libdis
>  
>  $(filter %-user,$(SUBDIR_RULES)): $(universal-obj-y) $(trace-obj-y) subdir-libdis-user subdir-libuser
> diff --git a/configure b/configure
> index 353d788..4b916aa 100755
> --- a/configure
> +++ b/configure
> @@ -147,6 +147,7 @@ curses=""
>  docs=""
>  fdt=""
>  nptl=""
> +pixman=""
>  sdl=""
>  virtfs=""
>  vnc="yes"
> @@ -642,6 +643,10 @@ for opt do
>      # configure to be used by RPM and similar macros that set
>      # lots of directory switches by default.
>    ;;
> +  --pixman-system) pixman="system"
> +  ;;
> +  --pixman-internal) pixman="internal"
> +  ;;

Let's make this more autoconfy:
--with-system-pixman/--without-system-pixman.

Paolo

>    --disable-sdl) sdl="no"
>    ;;
>    --enable-sdl) sdl="yes"
> @@ -2117,6 +2122,34 @@ else
>  fi
>  
>  ##########################################
> +# pixman support probe
> +
> +if test "$pixman" = ""; then
> +  if $pkg_config pixman-1 > /dev/null 2>&1; then
> +    pixman="system"
> +  else
> +    pixman="internal"
> +  fi
> +fi
> +if test "$pixman" = "system"; then
> +  pixman_cflags=`$pkg_config --cflags pixman-1 2>/dev/null`
> +  pixman_libs=`$pkg_config --libs pixman-1 2>/dev/null`
> +else
> +  if test ! -d ${source_path}/pixman/pixman; then
> +    echo "ERROR: pixman not present. Your options:"
> +    echo "  (1) Prefered: Install the pixman devel package (any recent"
> +    echo "      distro should have packages as Xorg needs pixman too)."
> +    echo "  (2) Fetch the pixman submodule, using:"
> +    echo "      git submodule update --init pixman"
> +    exit 1
> +  fi
> +  pixman_cflags="-I${source_path}/pixman/pixman"
> +  pixman_libs="-Lpixman/pixman/.libs -lpixman-1"
> +fi
> +QEMU_CFLAGS="$QEMU_CFLAGS $pixman_cflags"
> +libs_softmmu="$libs_softmmu $pixman_libs"
> +
> +##########################################
>  # libcap probe
>  
>  if test "$cap" != "no" ; then
> @@ -3147,6 +3180,7 @@ echo "-Werror enabled   $werror"
>  if test "$darwin" = "yes" ; then
>      echo "Cocoa support     $cocoa"
>  fi
> +echo "pixman            $pixman"
>  echo "SDL support       $sdl"
>  echo "curses support    $curses"
>  echo "curl support      $curl"
> @@ -3909,6 +3943,9 @@ if test "$target_softmmu" = "yes" ; then
>    if test "$smartcard_nss" = "yes" ; then
>      echo "subdir-$target: subdir-libcacard" >> $config_host_mak
>    fi
> +  if test "$pixman" = "internal" ; then
> +    echo "subdir-$target: subdir-pixman" >> $config_host_mak
> +  fi
>    case "$target_arch2" in
>      i386|x86_64)
>        echo "CONFIG_HAVE_CORE_DUMP=y" >> $config_target_mak
> @@ -4112,6 +4149,7 @@ DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas"
>  DIRS="$DIRS roms/seabios roms/vgabios"
>  DIRS="$DIRS qapi-generated"
>  DIRS="$DIRS libcacard libcacard/libcacard libcacard/trace"
> +DIRS="$DIRS pixman"
>  FILES="Makefile tests/tcg/Makefile qdict-test-data.txt"
>  FILES="$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit"
>  FILES="$FILES tests/tcg/lm32/Makefile libcacard/Makefile"
>
Stefano Stabellini - Nov. 22, 2012, 12:34 p.m.
I have just noticed that we haven't actually written anywhere what's the
oldest version of pixman we support.

Do you know which one it is?


On Wed, 17 Oct 2012, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  Makefile  |    9 +++++++++
>  configure |   38 ++++++++++++++++++++++++++++++++++++++
>  2 files changed, 47 insertions(+), 0 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index a9c22bf..5699101 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -105,6 +105,15 @@ endif
>  
>  subdir-libcacard: $(oslib-obj-y) $(trace-obj-y) qemu-timer-common.o
>  
> +subdir-pixman: pixman/Makefile
> +	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pixman V="$(V)" all,)
> +
> +pixman/Makefile: $(SRC_PATH)/pixman/configure
> +	(cd pixman; $(SRC_PATH)/pixman/configure --disable-shared --enable-static)
> +
> +$(SRC_PATH)/pixman/configure:
> +	(cd $(SRC_PATH)/pixman; autoreconf -v --install)
> +
>  $(filter %-softmmu,$(SUBDIR_RULES)): $(universal-obj-y) $(trace-obj-y) $(common-obj-y) $(extra-obj-y) subdir-libdis
>  
>  $(filter %-user,$(SUBDIR_RULES)): $(universal-obj-y) $(trace-obj-y) subdir-libdis-user subdir-libuser
> diff --git a/configure b/configure
> index 353d788..4b916aa 100755
> --- a/configure
> +++ b/configure
> @@ -147,6 +147,7 @@ curses=""
>  docs=""
>  fdt=""
>  nptl=""
> +pixman=""
>  sdl=""
>  virtfs=""
>  vnc="yes"
> @@ -642,6 +643,10 @@ for opt do
>      # configure to be used by RPM and similar macros that set
>      # lots of directory switches by default.
>    ;;
> +  --pixman-system) pixman="system"
> +  ;;
> +  --pixman-internal) pixman="internal"
> +  ;;
>    --disable-sdl) sdl="no"
>    ;;
>    --enable-sdl) sdl="yes"
> @@ -2117,6 +2122,34 @@ else
>  fi
>  
>  ##########################################
> +# pixman support probe
> +
> +if test "$pixman" = ""; then
> +  if $pkg_config pixman-1 > /dev/null 2>&1; then
> +    pixman="system"
> +  else
> +    pixman="internal"
> +  fi
> +fi
> +if test "$pixman" = "system"; then
> +  pixman_cflags=`$pkg_config --cflags pixman-1 2>/dev/null`
> +  pixman_libs=`$pkg_config --libs pixman-1 2>/dev/null`
> +else
> +  if test ! -d ${source_path}/pixman/pixman; then
> +    echo "ERROR: pixman not present. Your options:"
> +    echo "  (1) Prefered: Install the pixman devel package (any recent"
> +    echo "      distro should have packages as Xorg needs pixman too)."
> +    echo "  (2) Fetch the pixman submodule, using:"
> +    echo "      git submodule update --init pixman"
> +    exit 1
> +  fi
> +  pixman_cflags="-I${source_path}/pixman/pixman"
> +  pixman_libs="-Lpixman/pixman/.libs -lpixman-1"
> +fi
> +QEMU_CFLAGS="$QEMU_CFLAGS $pixman_cflags"
> +libs_softmmu="$libs_softmmu $pixman_libs"
> +
> +##########################################
>  # libcap probe
>  
>  if test "$cap" != "no" ; then
> @@ -3147,6 +3180,7 @@ echo "-Werror enabled   $werror"
>  if test "$darwin" = "yes" ; then
>      echo "Cocoa support     $cocoa"
>  fi
> +echo "pixman            $pixman"
>  echo "SDL support       $sdl"
>  echo "curses support    $curses"
>  echo "curl support      $curl"
> @@ -3909,6 +3943,9 @@ if test "$target_softmmu" = "yes" ; then
>    if test "$smartcard_nss" = "yes" ; then
>      echo "subdir-$target: subdir-libcacard" >> $config_host_mak
>    fi
> +  if test "$pixman" = "internal" ; then
> +    echo "subdir-$target: subdir-pixman" >> $config_host_mak
> +  fi
>    case "$target_arch2" in
>      i386|x86_64)
>        echo "CONFIG_HAVE_CORE_DUMP=y" >> $config_target_mak
> @@ -4112,6 +4149,7 @@ DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas"
>  DIRS="$DIRS roms/seabios roms/vgabios"
>  DIRS="$DIRS qapi-generated"
>  DIRS="$DIRS libcacard libcacard/libcacard libcacard/trace"
> +DIRS="$DIRS pixman"
>  FILES="Makefile tests/tcg/Makefile qdict-test-data.txt"
>  FILES="$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit"
>  FILES="$FILES tests/tcg/lm32/Makefile libcacard/Makefile"
> -- 
> 1.7.1
> 
>
Gerd Hoffmann - Nov. 22, 2012, 12:59 p.m.
On 11/22/12 13:34, Stefano Stabellini wrote:
> I have just noticed that we haven't actually written anywhere what's the
> oldest version of pixman we support.
> 
> Do you know which one it is?

0.18.4 is known good.

cheers,
  Gerd

Patch

diff --git a/Makefile b/Makefile
index a9c22bf..5699101 100644
--- a/Makefile
+++ b/Makefile
@@ -105,6 +105,15 @@  endif
 
 subdir-libcacard: $(oslib-obj-y) $(trace-obj-y) qemu-timer-common.o
 
+subdir-pixman: pixman/Makefile
+	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pixman V="$(V)" all,)
+
+pixman/Makefile: $(SRC_PATH)/pixman/configure
+	(cd pixman; $(SRC_PATH)/pixman/configure --disable-shared --enable-static)
+
+$(SRC_PATH)/pixman/configure:
+	(cd $(SRC_PATH)/pixman; autoreconf -v --install)
+
 $(filter %-softmmu,$(SUBDIR_RULES)): $(universal-obj-y) $(trace-obj-y) $(common-obj-y) $(extra-obj-y) subdir-libdis
 
 $(filter %-user,$(SUBDIR_RULES)): $(universal-obj-y) $(trace-obj-y) subdir-libdis-user subdir-libuser
diff --git a/configure b/configure
index 353d788..4b916aa 100755
--- a/configure
+++ b/configure
@@ -147,6 +147,7 @@  curses=""
 docs=""
 fdt=""
 nptl=""
+pixman=""
 sdl=""
 virtfs=""
 vnc="yes"
@@ -642,6 +643,10 @@  for opt do
     # configure to be used by RPM and similar macros that set
     # lots of directory switches by default.
   ;;
+  --pixman-system) pixman="system"
+  ;;
+  --pixman-internal) pixman="internal"
+  ;;
   --disable-sdl) sdl="no"
   ;;
   --enable-sdl) sdl="yes"
@@ -2117,6 +2122,34 @@  else
 fi
 
 ##########################################
+# pixman support probe
+
+if test "$pixman" = ""; then
+  if $pkg_config pixman-1 > /dev/null 2>&1; then
+    pixman="system"
+  else
+    pixman="internal"
+  fi
+fi
+if test "$pixman" = "system"; then
+  pixman_cflags=`$pkg_config --cflags pixman-1 2>/dev/null`
+  pixman_libs=`$pkg_config --libs pixman-1 2>/dev/null`
+else
+  if test ! -d ${source_path}/pixman/pixman; then
+    echo "ERROR: pixman not present. Your options:"
+    echo "  (1) Prefered: Install the pixman devel package (any recent"
+    echo "      distro should have packages as Xorg needs pixman too)."
+    echo "  (2) Fetch the pixman submodule, using:"
+    echo "      git submodule update --init pixman"
+    exit 1
+  fi
+  pixman_cflags="-I${source_path}/pixman/pixman"
+  pixman_libs="-Lpixman/pixman/.libs -lpixman-1"
+fi
+QEMU_CFLAGS="$QEMU_CFLAGS $pixman_cflags"
+libs_softmmu="$libs_softmmu $pixman_libs"
+
+##########################################
 # libcap probe
 
 if test "$cap" != "no" ; then
@@ -3147,6 +3180,7 @@  echo "-Werror enabled   $werror"
 if test "$darwin" = "yes" ; then
     echo "Cocoa support     $cocoa"
 fi
+echo "pixman            $pixman"
 echo "SDL support       $sdl"
 echo "curses support    $curses"
 echo "curl support      $curl"
@@ -3909,6 +3943,9 @@  if test "$target_softmmu" = "yes" ; then
   if test "$smartcard_nss" = "yes" ; then
     echo "subdir-$target: subdir-libcacard" >> $config_host_mak
   fi
+  if test "$pixman" = "internal" ; then
+    echo "subdir-$target: subdir-pixman" >> $config_host_mak
+  fi
   case "$target_arch2" in
     i386|x86_64)
       echo "CONFIG_HAVE_CORE_DUMP=y" >> $config_target_mak
@@ -4112,6 +4149,7 @@  DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas"
 DIRS="$DIRS roms/seabios roms/vgabios"
 DIRS="$DIRS qapi-generated"
 DIRS="$DIRS libcacard libcacard/libcacard libcacard/trace"
+DIRS="$DIRS pixman"
 FILES="Makefile tests/tcg/Makefile qdict-test-data.txt"
 FILES="$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit"
 FILES="$FILES tests/tcg/lm32/Makefile libcacard/Makefile"