All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups
@ 2009-07-20 22:13 quintela
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 01/20] add coreaudio libs at the same place that the rest of the audior drivers quintela
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: quintela @ 2009-07-20 22:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>

Hi

More configuration cleanups on top of my previous series.
This one:
- when we test for a library, if we need it, we add the
  library to LIBS after checking. Found that we were checking for 2 xen libraries
  and then adding 3 to LIBS.
- starting moving variables to CPPCFLAGS.
- Big SDL cleanup.  SDL configuration have very old cruft there, from
  testing for target_sofmmu before it was set, to testing for "$sdl" = "yes"
  on the else part of tesing "$sdl" = yes.
- I added a configuration define: CONFIG_NOWIN32, I just needed a way to
  compile files for WIN32 or the rest.  If anyone has a better suggestion
  for th ename, it is welcome.

After this series Makefile is basically clean from logic:

(simple-config-4)$ grep ifdef Makefile
ifdef BUILD_DOCS
ifdef INSTALL_BLOBS
(simple-config-4)$ grep ifndef Makefile
ifndef CONFIG_WIN32

ToDo:
- do the same for Makefile.target
- what to do with CFLAGS/CPPFLAGS.  At this point we have things like:
    sdl.o audio/sdlaudio.o sdl_zoom.o baum.o: CFLAGS += $(SDL_CFLAGS)
  Problem is that SDL_CFLAGS ends on fedora (I guess other unix got similar):
    -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
  I felt nervous compling some files with -REENTRANT and other without it.
  Should we use a single CFLAGS for all files?  I would prefer to have a single
  CFLAGS, but it is not my call to make that decision.  What everybody else thinks?

Coments, suggestions?

Later, Juan.

Juan Quintela (20):
  add coreaudio libs at the same place that the rest of the audior
    drivers
  move the decision of using threads or not in audio from Makefile to
    configure
  Add CONFIG_NOWIN32
  Use CONFIG_NOWIN32 previus define to simplify Makefile
  add $fmod_inc to CPPFLAGS
  add SLIRP directory to include list in case it is needed
  fold VNC_TLS_CFLAGS into CPPCFLAGS
  fold VNC_SASL_CFLAGS into CPPCFLAGS
  put together uses of -lvdeplug
  -lz is needed for all binaries, move it to LIBS
  put together uses of xen libraries
  the else part of this test is obsolete We are testing for sdl = yes
    inside the else part of the test if sdl = yes
  sdl_config var is never changed from sdl-config value
  remove old sdl config code that was commented
  define SDL_CFLAGS value when we test for SDL
  target_mmu is defined later, at that point has no value
  use sdl_{cflags,libs} insteaf of calling sdl-config
  Add -lX11 to sdl_libs when needed, and remove sdl_x11 variable
  move SDL mingw32 hack to SDL detection
  move SDL static configuration near SDL detection

 Makefile        |   50 +++---------------------
 Makefile.target |   10 -----
 configure       |  117 ++++++++++++++++++++++++-------------------------------
 3 files changed, 57 insertions(+), 120 deletions(-)

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Qemu-devel] [PATCH 01/20] add coreaudio libs at the same place that the rest of the audior drivers
  2009-07-20 22:13 [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups quintela
@ 2009-07-20 22:13 ` quintela
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 02/20] move the decision of using threads or not in audio from Makefile to configure quintela
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: quintela @ 2009-07-20 22:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index f1a5e8c..4317b2f 100755
--- a/configure
+++ b/configure
@@ -1630,6 +1630,8 @@ for drv in $audio_drv_list; do
         LIBS="$LIBS -lpulse-simple"
     elif test "$drv" = "esd"; then
         LIBS="$LIBS -lesd"
+    elif test "$drv" = "coreaudio"; then
+	LIBS="$LIBS -framework CoreAudio"
     fi
 done
 echo "" >>$config_host_h
@@ -1693,8 +1695,6 @@ if test "$cocoa" = "yes" ; then
   echo "#define CONFIG_COCOA 1" >> $config_host_h
   echo "CONFIG_COCOA=y" >> $config_host_mak
   LIBS="$LIBS -F/System/Library/Frameworks -framework Cocoa -framework IOKit"
-  # You can't configure coreaudio out for cocoa at this moment
-  LIBS="$LIBS -framework CoreAudio"
 fi
 if test "$curses" = "yes" ; then
   echo "#define CONFIG_CURSES 1" >> $config_host_h
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Qemu-devel] [PATCH 02/20] move the decision of using threads or not in audio from Makefile to configure
  2009-07-20 22:13 [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups quintela
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 01/20] add coreaudio libs at the same place that the rest of the audior drivers quintela
@ 2009-07-20 22:13 ` quintela
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 03/20] Add CONFIG_NOWIN32 quintela
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: quintela @ 2009-07-20 22:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile  |   17 ++---------------
 configure |   11 +++++++++++
 2 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/Makefile b/Makefile
index b62d8a0..5a2570e 100644
--- a/Makefile
+++ b/Makefile
@@ -102,23 +102,10 @@ else
 obj-y += migration-exec.o
 endif

-ifdef CONFIG_COREAUDIO
-AUDIO_PT = y
-endif
 ifdef CONFIG_FMOD
 audio/audio.o audio/fmodaudio.o: CPPFLAGS := -I$(FMOD_CFLAGS) $(CPPFLAGS)
 endif
-ifdef CONFIG_ESD
-AUDIO_PT = y
-AUDIO_PT_INT = y
-endif
-ifdef CONFIG_PA
-AUDIO_PT = y
-AUDIO_PT_INT = y
-endif
-ifdef AUDIO_PT
-LDFLAGS += -pthread
-endif
+

 audio-obj-y = audio.o noaudio.o wavaudio.o mixeng.o
 audio-obj-$(CONFIG_SDL) += sdlaudio.o
@@ -129,7 +116,7 @@ audio-obj-$(CONFIG_DSOUND) += dsoundaudio.o
 audio-obj-$(CONFIG_FMOD) += fmodaudio.o
 audio-obj-$(CONFIG_ESD) += esdaudio.o
 audio-obj-$(CONFIG_PA) += paaudio.o
-audio-obj-$(AUDIO_PT_INT) += audio_pt_int.o
+audio-obj-$(CONFIG_AUDIO_PT_INT) += audio_pt_int.o
 audio-obj-y += wavcapture.o
 obj-y += $(addprefix audio/, $(audio-obj-y))

diff --git a/configure b/configure
index 4317b2f..4c478a1 100755
--- a/configure
+++ b/configure
@@ -1627,13 +1627,24 @@ for drv in $audio_drv_list; do
     elif test "$drv" = "dsound"; then
         LIBS="$LIBS -lole32 -ldxguid"
     elif test "$drv" = "pa"; then
+        audio_pt="yes"
+        audio_pt_int="yes"
         LIBS="$LIBS -lpulse-simple"
     elif test "$drv" = "esd"; then
+        audio_pt="yes"
+        audio_pt_int="yes"
         LIBS="$LIBS -lesd"
     elif test "$drv" = "coreaudio"; then
+        audio_pt="yes"
 	LIBS="$LIBS -framework CoreAudio"
     fi
 done
+if test "$audio_pt" == "yes" ; then
+  LDFLAGS="$LDFLAGS -pthread"
+fi
+if test "$audio_pt_int" == "yes" ; then
+  echo "CONFIG_AUDIO_PT_INT=y" >> $config_host_mak
+fi
 echo "" >>$config_host_h
 if test "$mixemu" = "yes" ; then
   echo "CONFIG_MIXEMU=y" >> $config_host_mak
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Qemu-devel] [PATCH 03/20] Add CONFIG_NOWIN32
  2009-07-20 22:13 [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups quintela
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 01/20] add coreaudio libs at the same place that the rest of the audior drivers quintela
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 02/20] move the decision of using threads or not in audio from Makefile to configure quintela
@ 2009-07-20 22:13 ` quintela
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 04/20] Use CONFIG_NOWIN32 previus define to simplify Makefile quintela
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: quintela @ 2009-07-20 22:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>

We need a way to define posix-like

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 4c478a1..cadaeaf 100755
--- a/configure
+++ b/configure
@@ -1537,6 +1537,7 @@ if test "$mingw32" = "yes" ; then
   echo "#define CONFIG_WIN32 1" >> $config_host_h
   LIBS="$LIBS -lwinmm -lws2_32 -liphlpapi"
 else
+  echo "CONFIG_NOWIN32=y" >> $config_host_mak
   cat > $TMPC << EOF
 #include <byteswap.h>
 int main(void) { return bswap_32(0); }
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Qemu-devel] [PATCH 04/20] Use CONFIG_NOWIN32 previus define to simplify Makefile
  2009-07-20 22:13 [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups quintela
                   ` (2 preceding siblings ...)
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 03/20] Add CONFIG_NOWIN32 quintela
@ 2009-07-20 22:13 ` quintela
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 05/20] add $fmod_inc to CPPFLAGS quintela
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: quintela @ 2009-07-20 22:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile |   22 +++++-----------------
 1 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/Makefile b/Makefile
index 5a2570e..be5452c 100644
--- a/Makefile
+++ b/Makefile
@@ -50,21 +50,13 @@ recurse-all: $(SUBDIR_RULES)

 block-obj-y = cutils.o cache-utils.o qemu-malloc.o qemu-option.o module.o
 block-obj-y += nbd.o block.o aio.o aes.o
+block-obj-$(CONFIG_AIO) += posix-aio-compat.o

 block-nested-y += cow.o qcow.o vmdk.o cloop.o dmg.o bochs.o vpc.o vvfat.o
 block-nested-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o
 block-nested-y += parallels.o nbd.o
-
-
-ifdef CONFIG_WIN32
-block-nested-y += raw-win32.o
-else
-ifdef CONFIG_AIO
-block-obj-y += posix-aio-compat.o
-endif
-block-nested-y += raw-posix.o
-endif
-
+block-nested-$(CONFIG_WIN32) += raw-win32.o
+block-nested-$(CONFIG_NOWIN32) += raw-posix.o
 block-nested-$(CONFIG_CURL) += curl.o

 block-obj-y +=  $(addprefix block/, $(block-nested-y))
@@ -95,12 +87,8 @@ obj-y += msmouse.o ps2.o
 obj-y += qdev.o qdev-properties.o ssi.o

 obj-$(CONFIG_BRLAPI) += baum.o
-
-ifdef CONFIG_WIN32
-obj-y += tap-win32.o
-else
-obj-y += migration-exec.o
-endif
+obj-$(CONFIG_WIN32) += tap-win32.o
+obj-$(CONFIG_NOWIN32) += migration-exec.o

 ifdef CONFIG_FMOD
 audio/audio.o audio/fmodaudio.o: CPPFLAGS := -I$(FMOD_CFLAGS) $(CPPFLAGS)
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Qemu-devel] [PATCH 05/20] add $fmod_inc to CPPFLAGS
  2009-07-20 22:13 [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups quintela
                   ` (3 preceding siblings ...)
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 04/20] Use CONFIG_NOWIN32 previus define to simplify Makefile quintela
@ 2009-07-20 22:13 ` quintela
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 06/20] add SLIRP directory to include list in case it is needed quintela
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: quintela @ 2009-07-20 22:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile  |    5 -----
 configure |    2 +-
 2 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index be5452c..3c2ab01 100644
--- a/Makefile
+++ b/Makefile
@@ -90,11 +90,6 @@ obj-$(CONFIG_BRLAPI) += baum.o
 obj-$(CONFIG_WIN32) += tap-win32.o
 obj-$(CONFIG_NOWIN32) += migration-exec.o

-ifdef CONFIG_FMOD
-audio/audio.o audio/fmodaudio.o: CPPFLAGS := -I$(FMOD_CFLAGS) $(CPPFLAGS)
-endif
-
-
 audio-obj-y = audio.o noaudio.o wavaudio.o mixeng.o
 audio-obj-$(CONFIG_SDL) += sdlaudio.o
 audio-obj-$(CONFIG_OSS) += ossaudio.o
diff --git a/configure b/configure
index cadaeaf..9b1234c 100755
--- a/configure
+++ b/configure
@@ -1620,7 +1620,7 @@ for drv in $audio_drv_list; do
     echo "$def=y" >> $config_host_mak
     if test "$drv" = "fmod"; then
         LIBS="$LIBS $fmod_lib"
-        echo "FMOD_CFLAGS=$fmod_inc" >> $config_host_mak
+        CPPFLAGS="$CPPFLAGS -I$fmod_inc"
     elif test "$drv" = "oss"; then
         LIBS="$LIBS $oss_lib"
     elif test "$drv" = "alsa"; then
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Qemu-devel] [PATCH 06/20] add SLIRP directory to include list in case it is needed
  2009-07-20 22:13 [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups quintela
                   ` (4 preceding siblings ...)
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 05/20] add $fmod_inc to CPPFLAGS quintela
@ 2009-07-20 22:13 ` quintela
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 07/20] fold VNC_TLS_CFLAGS into CPPCFLAGS quintela
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: quintela @ 2009-07-20 22:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile  |    4 ----
 configure |    1 +
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 3c2ab01..bdbb87c 100644
--- a/Makefile
+++ b/Makefile
@@ -112,10 +112,6 @@ obj-$(CONFIG_VNC_SASL) += vnc-auth-sasl.o
 obj-$(CONFIG_COCOA) += cocoa.o
 obj-$(CONFIG_IOTHREAD) += qemu-thread.o

-ifdef CONFIG_SLIRP
-CPPFLAGS+=-I$(SRC_PATH)/slirp
-endif
-
 slirp-obj-y = cksum.o if.o ip_icmp.o ip_input.o ip_output.o
 slirp-obj-y += slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o
 slirp-obj-y += tcp_subr.o tcp_timer.o udp.o bootp.o tftp.o
diff --git a/configure b/configure
index 9b1234c..90bc793 100755
--- a/configure
+++ b/configure
@@ -1602,6 +1602,7 @@ fi
 if test "$slirp" = "yes" ; then
   echo "CONFIG_SLIRP=y" >> $config_host_mak
   echo "#define CONFIG_SLIRP 1" >> $config_host_h
+  CPPFLAGS="$CPPFLAGS -I$source_path/slirp"
 fi
 if test "$vde" = "yes" ; then
   echo "CONFIG_VDE=y" >> $config_host_mak
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Qemu-devel] [PATCH 07/20] fold VNC_TLS_CFLAGS into CPPCFLAGS
  2009-07-20 22:13 [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups quintela
                   ` (5 preceding siblings ...)
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 06/20] add SLIRP directory to include list in case it is needed quintela
@ 2009-07-20 22:13 ` quintela
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 08/20] fold VNC_SASL_CFLAGS " quintela
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: quintela @ 2009-07-20 22:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile        |    2 --
 Makefile.target |    4 ----
 configure       |    7 +++----
 3 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/Makefile b/Makefile
index bdbb87c..098f972 100644
--- a/Makefile
+++ b/Makefile
@@ -137,8 +137,6 @@ vnc.h: vnc-tls.h vnc-auth-vencrypt.h vnc-auth-sasl.h keymaps.h

 vnc.o: vnc.c vnc.h vnc_keysym.h vnchextile.h d3des.c d3des.h acl.h

-vnc.o: CFLAGS += $(VNC_TLS_CFLAGS)
-
 vnc-tls.o: vnc-tls.c vnc.h

 vnc-auth-vencrypt.o: vnc-auth-vencrypt.c vnc.h
diff --git a/Makefile.target b/Makefile.target
index 8621c76..7c81a27 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -414,10 +414,6 @@ ifdef CONFIG_ADLIB
 adlib.o fmopl.o: CFLAGS := ${CFLAGS} -DBUILD_Y8950=0
 endif

-ifdef CONFIG_VNC_TLS
-CPPFLAGS += $(VNC_TLS_CFLAGS)
-endif
-
 ifdef CONFIG_VNC_SASL
 CPPFLAGS += $(VNC_SASL_CFLAGS)
 endif
diff --git a/configure b/configure
index 90bc793..bd4436d 100755
--- a/configure
+++ b/configure
@@ -967,9 +967,10 @@ EOF
     vnc_tls_libs=`pkg-config --libs gnutls 2> /dev/null`
     if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $vnc_tls_cflags $TMPC \
            $vnc_tls_libs > /dev/null 2> /dev/null ; then
-	:
+        CPPFLAGS="$CPPFLAGS $vnc_tls_cflags"
+        LIBS="$LIBS $vnc_tls_libs"
     else
-	vnc_tls="no"
+        vnc_tls="no"
     fi
 fi

@@ -1654,9 +1655,7 @@ if test "$mixemu" = "yes" ; then
 fi
 if test "$vnc_tls" = "yes" ; then
   echo "CONFIG_VNC_TLS=y" >> $config_host_mak
-  echo "VNC_TLS_CFLAGS=$vnc_tls_cflags" >> $config_host_mak
   echo "#define CONFIG_VNC_TLS 1" >> $config_host_h
- LIBS="$LIBS $vnc_tls_libs"
 fi
 if test "$vnc_sasl" = "yes" ; then
   echo "CONFIG_VNC_SASL=y" >> $config_host_mak
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Qemu-devel] [PATCH 08/20] fold VNC_SASL_CFLAGS into CPPCFLAGS
  2009-07-20 22:13 [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups quintela
                   ` (6 preceding siblings ...)
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 07/20] fold VNC_TLS_CFLAGS into CPPCFLAGS quintela
@ 2009-07-20 22:13 ` quintela
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 09/20] put together uses of -lvdeplug quintela
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: quintela @ 2009-07-20 22:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target |    4 ----
 configure       |    7 +++----
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 7c81a27..601e97e 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -414,10 +414,6 @@ ifdef CONFIG_ADLIB
 adlib.o fmopl.o: CFLAGS := ${CFLAGS} -DBUILD_Y8950=0
 endif

-ifdef CONFIG_VNC_SASL
-CPPFLAGS += $(VNC_SASL_CFLAGS)
-endif
-
 # xen backend driver support
 obj-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o

diff --git a/configure b/configure
index bd4436d..1b5f30b 100755
--- a/configure
+++ b/configure
@@ -987,9 +987,10 @@ EOF
     vnc_sasl_libs="-lsasl2"
     if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $vnc_sasl_cflags $TMPC \
            $vnc_sasl_libs 2> /dev/null > /dev/null ; then
-	:
+        CPPFLAGS="$CPPFLAGS $vnc_sasl_cflags"
+        LIBS="$LIBS $vnc_sasl_libs"
     else
-	vnc_sasl="no"
+        vnc_sasl="no"
     fi
 fi

@@ -1659,9 +1660,7 @@ if test "$vnc_tls" = "yes" ; then
 fi
 if test "$vnc_sasl" = "yes" ; then
   echo "CONFIG_VNC_SASL=y" >> $config_host_mak
-  echo "VNC_SASL_CFLAGS=$vnc_sasl_cflags" >> $config_host_mak
   echo "#define CONFIG_VNC_SASL 1" >> $config_host_h
-  LIBS="$LIBS $vnc_sasl_libs"
 fi
 if test "$fnmatch" = "yes" ; then
   echo "#define HAVE_FNMATCH_H 1" >> $config_host_h
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Qemu-devel] [PATCH 09/20] put together uses of -lvdeplug
  2009-07-20 22:13 [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups quintela
                   ` (7 preceding siblings ...)
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 08/20] fold VNC_SASL_CFLAGS " quintela
@ 2009-07-20 22:13 ` quintela
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 10/20] -lz is needed for all binaries, move it to LIBS quintela
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: quintela @ 2009-07-20 22:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index 1b5f30b..0972738 100755
--- a/configure
+++ b/configure
@@ -1021,8 +1021,9 @@ int main(void)
     return 0;
 }
 EOF
-    if $cc $ARCH_CFLAGS -o $TMPE $TMPC -lvdeplug > /dev/null 2> /dev/null ; then
-        :
+    vde_libs="-lvdeplug"
+    if $cc $ARCH_CFLAGS -o $TMPE $TMPC $vde_libs > /dev/null 2> /dev/null ; then
+        LIBS="$LIBS $vde_libs"
     else
         vde="no"
     fi
@@ -1609,7 +1610,6 @@ fi
 if test "$vde" = "yes" ; then
   echo "CONFIG_VDE=y" >> $config_host_mak
   echo "#define CONFIG_VDE 1" >> $config_host_h
-  LIBS="$LIBS -lvdeplug"
 fi
 for card in $audio_card_list; do
     def=CONFIG_`echo $card | tr '[:lower:]' '[:upper:]'`
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Qemu-devel] [PATCH 10/20] -lz is needed for all binaries, move it to LIBS
  2009-07-20 22:13 [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups quintela
                   ` (8 preceding siblings ...)
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 09/20] put together uses of -lvdeplug quintela
@ 2009-07-20 22:13 ` quintela
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 11/20] put together uses of xen libraries quintela
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: quintela @ 2009-07-20 22:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile        |    2 --
 Makefile.target |    2 --
 configure       |    2 +-
 3 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 098f972..a94ea4c 100644
--- a/Makefile
+++ b/Makefile
@@ -165,8 +165,6 @@ qemu-nbd$(EXESUF):  qemu-nbd.o qemu-tool.o tool-osdep.o $(block-obj-y)

 qemu-io$(EXESUF):  qemu-io.o qemu-tool.o tool-osdep.o cmd.o $(block-obj-y)

-qemu-img$(EXESUF) qemu-nbd$(EXESUF) qemu-io$(EXESUF): LIBS += -lz
-
 qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
 	$(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@,"  GEN   $@")

diff --git a/Makefile.target b/Makefile.target
index 601e97e..45d382a 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -400,8 +400,6 @@ obj-y = vl.o osdep.o monitor.o pci.o loader.o isa_mmio.o machine.o \
 obj-y += virtio-blk.o virtio-balloon.o virtio-net.o virtio-console.o
 obj-$(CONFIG_KVM) += kvm.o kvm-all.o

-LIBS+=-lz
-
 sound-obj-y =
 sound-obj-$(CONFIG_SB16) += sb16.o
 sound-obj-$(CONFIG_ES1370) += es1370.o
diff --git a/configure b/configure
index 0972738..4596eb1 100755
--- a/configure
+++ b/configure
@@ -869,7 +869,7 @@ cat > $TMPC << EOF
 int main(void) { zlibVersion(); return 0; }
 EOF
 if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $TMPC -lz > /dev/null 2> /dev/null ; then
-    :
+    LIBS="$LIBS -lz"
 else
     echo
     echo "Error: zlib check failed"
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Qemu-devel] [PATCH 11/20] put together uses of xen libraries
  2009-07-20 22:13 [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups quintela
                   ` (9 preceding siblings ...)
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 10/20] -lz is needed for all binaries, move it to LIBS quintela
@ 2009-07-20 22:13 ` quintela
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 12/20] the else part of this test is obsolete We are testing for sdl = yes inside the else part of the test if sdl = yes quintela
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: quintela @ 2009-07-20 22:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index 4596eb1..2de7aeb 100755
--- a/configure
+++ b/configure
@@ -887,8 +887,9 @@ cat > $TMPC <<EOF
 #include <xs.h>
 int main(void) { xs_daemon_open(); xc_interface_open(); return 0; }
 EOF
-   if $cc $CFLAGS $ARCH_CFLAGS -c -o $TMPO $TMPC $LDFLAGS -lxenstore -lxenctrl 2> /dev/null > /dev/null ; then
-      :
+   xen_libs="-lxenstore -lxenctrl -lxenguest"
+   if $cc $CFLAGS $ARCH_CFLAGS -c -o $TMPO $TMPC $LDFLAGS $xen_libs 2> /dev/null > /dev/null ; then
+      LIBS="$LIBS $xen_libs"
    else
       xen="no"
    fi
@@ -1747,9 +1748,6 @@ if test "$bluez" = "yes" ; then
   echo "BLUEZ_CFLAGS=$bluez_cflags" >> $config_host_mak
   LIBS="$LIBS $bluez_libs"
 fi
-if test "$xen" = "yes" ; then
-  LIBS="$LIBS -lxenstore -lxenctrl -lxenguest"
-fi
 if test "$aio" = "yes" ; then
   echo "#define CONFIG_AIO 1" >> $config_host_h
   echo "CONFIG_AIO=y" >> $config_host_mak
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Qemu-devel] [PATCH 12/20] the else part of this test is obsolete We are testing for sdl = yes inside the else part of the test if sdl = yes
  2009-07-20 22:13 [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups quintela
                   ` (10 preceding siblings ...)
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 11/20] put together uses of xen libraries quintela
@ 2009-07-20 22:13 ` quintela
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 13/20] sdl_config var is never changed from sdl-config value quintela
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: quintela @ 2009-07-20 22:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/configure b/configure
index 2de7aeb..a87959c 100755
--- a/configure
+++ b/configure
@@ -934,13 +934,7 @@ EOF
             fi
         fi # static link
     fi # sdl compile test
-else
-    # Make sure to disable cocoa if sdl was set
-    if test "$sdl" = "yes" ; then
-       cocoa="no"
-       audio_drv_list="`echo $audio_drv_list | sed s,coreaudio,,g`"
-    fi
-fi # -z $sdl
+fi

 if test "$sdl" = "yes" ; then
 cat > $TMPC <<EOF
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Qemu-devel] [PATCH 13/20] sdl_config var is never changed from sdl-config value
  2009-07-20 22:13 [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups quintela
                   ` (11 preceding siblings ...)
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 12/20] the else part of this test is obsolete We are testing for sdl = yes inside the else part of the test if sdl = yes quintela
@ 2009-07-20 22:13 ` quintela
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 14/20] remove old sdl config code that was commented quintela
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: quintela @ 2009-07-20 22:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |   23 +++++++++++------------
 1 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/configure b/configure
index a87959c..6368c4d 100755
--- a/configure
+++ b/configure
@@ -901,7 +901,6 @@ fi
 sdl_too_old=no

 if test "$sdl" = "yes" ; then
-    sdl_config="sdl-config"
     sdl=no
     sdl_static=no

@@ -910,8 +909,8 @@ cat > $TMPC << EOF
 #undef main /* We don't want SDL to override our main() */
 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
 EOF
-    if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` > $TMPSDLLOG 2>&1 ; then
-        _sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'`
+    if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} `sdl-config --cflags 2> /dev/null` $TMPC `sdl-config --libs 2> /dev/null` > $TMPSDLLOG 2>&1 ; then
+        _sdlversion=`sdl-config --version | sed 's/[^0-9]//g'`
         if test "$_sdlversion" -lt 121 ; then
             sdl_too_old=yes
         else
@@ -923,13 +922,13 @@ EOF
         # static link with sdl ?
         if test "$sdl" = "yes" ; then
             aa="no"
-            `$sdl_config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` && aa="yes"
-            sdl_static_libs=`$sdl_config --static-libs 2>/dev/null`
+            `sdl-config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` && aa="yes"
+            sdl_static_libs=`sdl-config --static-libs 2>/dev/null`
             if [ "$aa" = "yes" ] ; then
                 sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`"
             fi

-            if $cc -o $TMPE ${OS_CFLAGS} `$sdl_config --cflags 2> /dev/null` $TMPC $sdl_static_libs > /dev/null 2> /dev/null; then
+            if $cc -o $TMPE ${OS_CFLAGS} `sdl-config --cflags 2> /dev/null` $TMPC $sdl_static_libs > /dev/null 2> /dev/null; then
                 sdl_static=yes
             fi
         fi # static link
@@ -946,7 +945,7 @@ cat > $TMPC <<EOF
 #endif
 int main(void) { return 0; }
 EOF
-    if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` > /dev/null 2>&1 ; then
+    if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} `sdl-config --cflags 2> /dev/null` $TMPC `sdl-config --libs 2> /dev/null` > /dev/null 2>&1 ; then
 	sdl_x11="yes"
     fi
 fi
@@ -1685,16 +1684,16 @@ if test "$sdl1" = "yes" ; then
   if test "$target_softmmu" = "no" -o "$static" = "yes"; then
     LIBS="$LIBS $sdl_static_libs"
   elif test "$sdl_x11" = "yes" ; then
-    LIBS="$LIBS `$sdl_config --libs` -lX11"
+    LIBS="$LIBS `sdl-config --libs` -lX11"
   elif test "$mingw32" = "yes" ; then
-    LIBS="$LIBS `$sdl_config --libs | sed s/-mwindows//g` -mconsole"
+    LIBS="$LIBS `sdl-config --libs | sed s/-mwindows//g` -mconsole"
   else
-    LIBS="$LIBS `$sdl_config --libs`"
+    LIBS="$LIBS `sdl-config --libs`"
   fi
   if [ "${aa}" = "yes" ] ; then
-    echo "SDL_CFLAGS=`$sdl_config --cflags` `aalib-config --cflags`" >> $config_host_mak
+    echo "SDL_CFLAGS=`sdl-config --cflags` `aalib-config --cflags`" >> $config_host_mak
   else
-    echo "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_host_mak
+    echo "SDL_CFLAGS=`sdl-config --cflags`" >> $config_host_mak
   fi
 fi
 if test "$cocoa" = "yes" ; then
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Qemu-devel] [PATCH 14/20] remove old sdl config code that was commented
  2009-07-20 22:13 [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups quintela
                   ` (12 preceding siblings ...)
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 13/20] sdl_config var is never changed from sdl-config value quintela
@ 2009-07-20 22:13 ` quintela
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 15/20] define SDL_CFLAGS value when we test for SDL quintela
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: quintela @ 2009-07-20 22:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index 6368c4d..783dbd7 100755
--- a/configure
+++ b/configure
@@ -1480,9 +1480,6 @@ echo "preadv support    $preadv"
 if test $sdl_too_old = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
 fi
-#if test "$sdl_static" = "no"; then
-#  echo "WARNING: cannot compile statically with SDL - qemu-fast won't have a graphical output"
-#fi

 config_host_mak="config-host.mak"
 config_host_h="config-host.h"
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Qemu-devel] [PATCH 15/20] define SDL_CFLAGS value when we test for SDL
  2009-07-20 22:13 [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups quintela
                   ` (13 preceding siblings ...)
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 14/20] remove old sdl config code that was commented quintela
@ 2009-07-20 22:13 ` quintela
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 16/20] target_mmu is defined later, at that point has no value quintela
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: quintela @ 2009-07-20 22:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index 783dbd7..37d75c0 100755
--- a/configure
+++ b/configure
@@ -924,8 +924,10 @@ EOF
             aa="no"
             `sdl-config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` && aa="yes"
             sdl_static_libs=`sdl-config --static-libs 2>/dev/null`
+            sdl_cflags=`sdl-config --cflags`
             if [ "$aa" = "yes" ] ; then
                 sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`"
+                sdl_cflags="$sdl_cflags `aalib-config --cflags`"
             fi

             if $cc -o $TMPE ${OS_CFLAGS} `sdl-config --cflags 2> /dev/null` $TMPC $sdl_static_libs > /dev/null 2> /dev/null; then
@@ -1678,7 +1680,7 @@ fi
 if test "$sdl1" = "yes" ; then
   echo "#define CONFIG_SDL 1" >> $config_host_h
   echo "CONFIG_SDL=y" >> $config_host_mak
-  if test "$target_softmmu" = "no" -o "$static" = "yes"; then
+  if test "$target_softmmu" = "no" -o $static" = "yes"; then
     LIBS="$LIBS $sdl_static_libs"
   elif test "$sdl_x11" = "yes" ; then
     LIBS="$LIBS `sdl-config --libs` -lX11"
@@ -1687,11 +1689,7 @@ if test "$sdl1" = "yes" ; then
   else
     LIBS="$LIBS `sdl-config --libs`"
   fi
-  if [ "${aa}" = "yes" ] ; then
-    echo "SDL_CFLAGS=`sdl-config --cflags` `aalib-config --cflags`" >> $config_host_mak
-  else
-    echo "SDL_CFLAGS=`sdl-config --cflags`" >> $config_host_mak
-  fi
+  echo "SDL_CFLAGS=$sdl_cflags" >> $config_host_mak
 fi
 if test "$cocoa" = "yes" ; then
   echo "#define CONFIG_COCOA 1" >> $config_host_h
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Qemu-devel] [PATCH 16/20] target_mmu is defined later, at that point has no value
  2009-07-20 22:13 [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups quintela
                   ` (14 preceding siblings ...)
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 15/20] define SDL_CFLAGS value when we test for SDL quintela
@ 2009-07-20 22:13 ` quintela
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 17/20] use sdl_{cflags, libs} insteaf of calling sdl-config quintela
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: quintela @ 2009-07-20 22:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index 37d75c0..ce66d6d 100755
--- a/configure
+++ b/configure
@@ -1680,7 +1680,7 @@ fi
 if test "$sdl1" = "yes" ; then
   echo "#define CONFIG_SDL 1" >> $config_host_h
   echo "CONFIG_SDL=y" >> $config_host_mak
-  if test "$target_softmmu" = "no" -o $static" = "yes"; then
+  if test "$static" = "yes"; then
     LIBS="$LIBS $sdl_static_libs"
   elif test "$sdl_x11" = "yes" ; then
     LIBS="$LIBS `sdl-config --libs` -lX11"
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Qemu-devel] [PATCH 17/20] use sdl_{cflags, libs} insteaf of calling sdl-config
  2009-07-20 22:13 [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups quintela
                   ` (15 preceding siblings ...)
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 16/20] target_mmu is defined later, at that point has no value quintela
@ 2009-07-20 22:13 ` quintela
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 18/20] Add -lX11 to sdl_libs when needed, and remove sdl_x11 variable quintela
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: quintela @ 2009-07-20 22:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index ce66d6d..d9fc921 100755
--- a/configure
+++ b/configure
@@ -909,7 +909,9 @@ cat > $TMPC << EOF
 #undef main /* We don't want SDL to override our main() */
 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
 EOF
-    if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} `sdl-config --cflags 2> /dev/null` $TMPC `sdl-config --libs 2> /dev/null` > $TMPSDLLOG 2>&1 ; then
+    sdl_cflags=`sdl-config --cflags 2> /dev/null`
+    sdl_libs=`sdl-config --libs 2> /dev/null`
+    if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $sdl_cflags  $TMPC $sdl_libs > $TMPSDLLOG 2>&1 ; then
         _sdlversion=`sdl-config --version | sed 's/[^0-9]//g'`
         if test "$_sdlversion" -lt 121 ; then
             sdl_too_old=yes
@@ -924,13 +926,12 @@ EOF
             aa="no"
             `sdl-config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` && aa="yes"
             sdl_static_libs=`sdl-config --static-libs 2>/dev/null`
-            sdl_cflags=`sdl-config --cflags`
             if [ "$aa" = "yes" ] ; then
                 sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`"
                 sdl_cflags="$sdl_cflags `aalib-config --cflags`"
             fi

-            if $cc -o $TMPE ${OS_CFLAGS} `sdl-config --cflags 2> /dev/null` $TMPC $sdl_static_libs > /dev/null 2> /dev/null; then
+            if $cc -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_static_libs > /dev/null 2> /dev/null; then
                 sdl_static=yes
             fi
         fi # static link
@@ -947,7 +948,7 @@ cat > $TMPC <<EOF
 #endif
 int main(void) { return 0; }
 EOF
-    if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} `sdl-config --cflags 2> /dev/null` $TMPC `sdl-config --libs 2> /dev/null` > /dev/null 2>&1 ; then
+    if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_libs > /dev/null 2>&1 ; then
 	sdl_x11="yes"
     fi
 fi
@@ -1683,11 +1684,11 @@ if test "$sdl1" = "yes" ; then
   if test "$static" = "yes"; then
     LIBS="$LIBS $sdl_static_libs"
   elif test "$sdl_x11" = "yes" ; then
-    LIBS="$LIBS `sdl-config --libs` -lX11"
+    LIBS="$LIBS $sdl_libs -lX11"
   elif test "$mingw32" = "yes" ; then
     LIBS="$LIBS `sdl-config --libs | sed s/-mwindows//g` -mconsole"
   else
-    LIBS="$LIBS `sdl-config --libs`"
+    LIBS="$LIBS $sdl_libs"
   fi
   echo "SDL_CFLAGS=$sdl_cflags" >> $config_host_mak
 fi
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Qemu-devel] [PATCH 18/20] Add -lX11 to sdl_libs when needed, and remove sdl_x11 variable
  2009-07-20 22:13 [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups quintela
                   ` (16 preceding siblings ...)
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 17/20] use sdl_{cflags, libs} insteaf of calling sdl-config quintela
@ 2009-07-20 22:13 ` quintela
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 19/20] move SDL mingw32 hack to SDL detection quintela
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: quintela @ 2009-07-20 22:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/configure b/configure
index d9fc921..69ce350 100755
--- a/configure
+++ b/configure
@@ -201,7 +201,6 @@ aix="no"
 blobs="yes"
 fdt="yes"
 sdl="yes"
-sdl_x11="no"
 xen="yes"
 pkgversion=""

@@ -949,7 +948,7 @@ cat > $TMPC <<EOF
 int main(void) { return 0; }
 EOF
     if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_libs > /dev/null 2>&1 ; then
-	sdl_x11="yes"
+	sdl_libs="$sdl_libs -lX11"
     fi
 fi

@@ -1683,8 +1682,6 @@ if test "$sdl1" = "yes" ; then
   echo "CONFIG_SDL=y" >> $config_host_mak
   if test "$static" = "yes"; then
     LIBS="$LIBS $sdl_static_libs"
-  elif test "$sdl_x11" = "yes" ; then
-    LIBS="$LIBS $sdl_libs -lX11"
   elif test "$mingw32" = "yes" ; then
     LIBS="$LIBS `sdl-config --libs | sed s/-mwindows//g` -mconsole"
   else
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Qemu-devel] [PATCH 19/20] move SDL mingw32 hack to SDL detection
  2009-07-20 22:13 [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups quintela
                   ` (17 preceding siblings ...)
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 18/20] Add -lX11 to sdl_libs when needed, and remove sdl_x11 variable quintela
@ 2009-07-20 22:13 ` quintela
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 20/20] move SDL static configuration near " quintela
  2009-07-21  8:10 ` [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups Blue Swirl
  20 siblings, 0 replies; 22+ messages in thread
From: quintela @ 2009-07-20 22:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 69ce350..a57f7f6 100755
--- a/configure
+++ b/configure
@@ -950,6 +950,9 @@ EOF
     if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_libs > /dev/null 2>&1 ; then
 	sdl_libs="$sdl_libs -lX11"
     fi
+    if test "$mingw32" = "yes" ; then
+        sdl_libs="`echo $sdl_libs | sed s/-mwindows//g` -mconsole"
+    fi
 fi

 ##########################################
@@ -1682,8 +1685,6 @@ if test "$sdl1" = "yes" ; then
   echo "CONFIG_SDL=y" >> $config_host_mak
   if test "$static" = "yes"; then
     LIBS="$LIBS $sdl_static_libs"
-  elif test "$mingw32" = "yes" ; then
-    LIBS="$LIBS `sdl-config --libs | sed s/-mwindows//g` -mconsole"
   else
     LIBS="$LIBS $sdl_libs"
   fi
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Qemu-devel] [PATCH 20/20] move SDL static configuration near SDL detection
  2009-07-20 22:13 [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups quintela
                   ` (18 preceding siblings ...)
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 19/20] move SDL mingw32 hack to SDL detection quintela
@ 2009-07-20 22:13 ` quintela
  2009-07-21  8:10 ` [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups Blue Swirl
  20 siblings, 0 replies; 22+ messages in thread
From: quintela @ 2009-07-20 22:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |   29 +++++++++--------------------
 1 files changed, 9 insertions(+), 20 deletions(-)

diff --git a/configure b/configure
index a57f7f6..6cf71f8 100755
--- a/configure
+++ b/configure
@@ -901,7 +901,6 @@ sdl_too_old=no

 if test "$sdl" = "yes" ; then
     sdl=no
-    sdl_static=no

 cat > $TMPC << EOF
 #include <SDL.h>
@@ -921,17 +920,19 @@ EOF
         fi

         # static link with sdl ?
-        if test "$sdl" = "yes" ; then
+        if test "$sdl" = "yes" -a "$static" = "yes" ; then
             aa="no"
             `sdl-config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` && aa="yes"
-            sdl_static_libs=`sdl-config --static-libs 2>/dev/null`
+            sdl_libs=`sdl-config --static-libs 2>/dev/null`
             if [ "$aa" = "yes" ] ; then
-                sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`"
+                sdl_libs="$sdl_libs `aalib-config --static-libs`"
                 sdl_cflags="$sdl_cflags `aalib-config --cflags`"
             fi

-            if $cc -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_static_libs > /dev/null 2> /dev/null; then
-                sdl_static=yes
+            if $cc -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_libs > /dev/null 2> /dev/null; then
+                :
+            else
+                sdl=no
             fi
         fi # static link
     fi # sdl compile test
@@ -1444,9 +1445,6 @@ if test "$darwin" = "yes" ; then
     echo "Cocoa support     $cocoa"
 fi
 echo "SDL support       $sdl"
-if test "$sdl" != "no" ; then
-    echo "SDL static link   $sdl_static"
-fi
 echo "curses support    $curses"
 echo "curl support      $curl"
 echo "mingw32 support   $mingw32"
@@ -1675,19 +1673,10 @@ echo "TARGET_DIRS=$target_list" >> $config_host_mak
 if [ "$build_docs" = "yes" ] ; then
   echo "BUILD_DOCS=yes" >> $config_host_mak
 fi
-if test "$static" = "yes"; then
-  sdl1=$sdl_static
-else
-  sdl1=$sdl
-fi
-if test "$sdl1" = "yes" ; then
+if test "$sdl" = "yes" ; then
   echo "#define CONFIG_SDL 1" >> $config_host_h
   echo "CONFIG_SDL=y" >> $config_host_mak
-  if test "$static" = "yes"; then
-    LIBS="$LIBS $sdl_static_libs"
-  else
-    LIBS="$LIBS $sdl_libs"
-  fi
+  LIBS="$LIBS $sdl_libs"
   echo "SDL_CFLAGS=$sdl_cflags" >> $config_host_mak
 fi
 if test "$cocoa" = "yes" ; then
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups
  2009-07-20 22:13 [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups quintela
                   ` (19 preceding siblings ...)
  2009-07-20 22:13 ` [Qemu-devel] [PATCH 20/20] move SDL static configuration near " quintela
@ 2009-07-21  8:10 ` Blue Swirl
  20 siblings, 0 replies; 22+ messages in thread
From: Blue Swirl @ 2009-07-21  8:10 UTC (permalink / raw)
  To: quintela; +Cc: qemu-devel

On Tue, Jul 21, 2009 at 1:13 AM, <quintela@redhat.com> wrote:
> From: Juan Quintela <quintela@redhat.com>
>
> Hi
>
> More configuration cleanups on top of my previous series.
> This one:
> - when we test for a library, if we need it, we add the
>  library to LIBS after checking. Found that we were checking for 2 xen libraries
>  and then adding 3 to LIBS.
> - starting moving variables to CPPCFLAGS.
> - Big SDL cleanup.  SDL configuration have very old cruft there, from
>  testing for target_sofmmu before it was set, to testing for "$sdl" = "yes"
>  on the else part of tesing "$sdl" = yes.
> - I added a configuration define: CONFIG_NOWIN32, I just needed a way to
>  compile files for WIN32 or the rest.  If anyone has a better suggestion
>  for th ename, it is welcome.

The obvious name would be CONFIG_POSIX, but are there any signs of
life in !Win32 && !Posix?

> After this series Makefile is basically clean from logic:
>
> (simple-config-4)$ grep ifdef Makefile
> ifdef BUILD_DOCS
> ifdef INSTALL_BLOBS
> (simple-config-4)$ grep ifndef Makefile
> ifndef CONFIG_WIN32
>
> ToDo:
> - do the same for Makefile.target
> - what to do with CFLAGS/CPPFLAGS.  At this point we have things like:
>    sdl.o audio/sdlaudio.o sdl_zoom.o baum.o: CFLAGS += $(SDL_CFLAGS)
>  Problem is that SDL_CFLAGS ends on fedora (I guess other unix got similar):
>    -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
>  I felt nervous compling some files with -REENTRANT and other without it.
>  Should we use a single CFLAGS for all files?  I would prefer to have a single
>  CFLAGS, but it is not my call to make that decision.  What everybody else thinks?

There is still HELPER_CFLAGS which needs to be separate from CFLAGS.

> Coments, suggestions?

These are actually wishes for new Makefile features:

It would be nice to have one flag to control gcc optimization level,
so that we could do something like
rm foo.o; make OPT=""
to recompile foo.o without gcc -O2 flag so that the execution logic
etc. is handy for debugging with GDB.

Currently all files are recompiled for each -user target. At least
path.c could be compiled only once, other files maybe could use
similar approach as libhw32/64 (poisoning etc.).

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2009-07-21  8:10 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-20 22:13 [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups quintela
2009-07-20 22:13 ` [Qemu-devel] [PATCH 01/20] add coreaudio libs at the same place that the rest of the audior drivers quintela
2009-07-20 22:13 ` [Qemu-devel] [PATCH 02/20] move the decision of using threads or not in audio from Makefile to configure quintela
2009-07-20 22:13 ` [Qemu-devel] [PATCH 03/20] Add CONFIG_NOWIN32 quintela
2009-07-20 22:13 ` [Qemu-devel] [PATCH 04/20] Use CONFIG_NOWIN32 previus define to simplify Makefile quintela
2009-07-20 22:13 ` [Qemu-devel] [PATCH 05/20] add $fmod_inc to CPPFLAGS quintela
2009-07-20 22:13 ` [Qemu-devel] [PATCH 06/20] add SLIRP directory to include list in case it is needed quintela
2009-07-20 22:13 ` [Qemu-devel] [PATCH 07/20] fold VNC_TLS_CFLAGS into CPPCFLAGS quintela
2009-07-20 22:13 ` [Qemu-devel] [PATCH 08/20] fold VNC_SASL_CFLAGS " quintela
2009-07-20 22:13 ` [Qemu-devel] [PATCH 09/20] put together uses of -lvdeplug quintela
2009-07-20 22:13 ` [Qemu-devel] [PATCH 10/20] -lz is needed for all binaries, move it to LIBS quintela
2009-07-20 22:13 ` [Qemu-devel] [PATCH 11/20] put together uses of xen libraries quintela
2009-07-20 22:13 ` [Qemu-devel] [PATCH 12/20] the else part of this test is obsolete We are testing for sdl = yes inside the else part of the test if sdl = yes quintela
2009-07-20 22:13 ` [Qemu-devel] [PATCH 13/20] sdl_config var is never changed from sdl-config value quintela
2009-07-20 22:13 ` [Qemu-devel] [PATCH 14/20] remove old sdl config code that was commented quintela
2009-07-20 22:13 ` [Qemu-devel] [PATCH 15/20] define SDL_CFLAGS value when we test for SDL quintela
2009-07-20 22:13 ` [Qemu-devel] [PATCH 16/20] target_mmu is defined later, at that point has no value quintela
2009-07-20 22:13 ` [Qemu-devel] [PATCH 17/20] use sdl_{cflags, libs} insteaf of calling sdl-config quintela
2009-07-20 22:13 ` [Qemu-devel] [PATCH 18/20] Add -lX11 to sdl_libs when needed, and remove sdl_x11 variable quintela
2009-07-20 22:13 ` [Qemu-devel] [PATCH 19/20] move SDL mingw32 hack to SDL detection quintela
2009-07-20 22:13 ` [Qemu-devel] [PATCH 20/20] move SDL static configuration near " quintela
2009-07-21  8:10 ` [Qemu-devel] [PATCH 00/20] More configure/Makefile cleanups Blue Swirl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.