qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] [RFC] Haiku host support and general configure issues
@ 2009-02-28 14:08 Andreas Färber
  2009-02-28 17:08 ` [Qemu-devel] " François Revol
  0 siblings, 1 reply; 12+ messages in thread
From: Andreas Färber @ 2009-02-28 14:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: HaikuPorts developers discussion list, François Revol

[-- Attachment #1: Type: text/plain, Size: 1643 bytes --]

Hello,

Haiku recently got an experimental GCC 4.3, so I was curious how far  
QEMU would get there now. This uncovered some generic issues with our  
configure tests that I think should be tackled before the release.

We have undocumented --extra-cflags= and --extra-ldflags= options that  
don't work as expected. They are ignored by all the configure tests,  
so it seems there is no direct equivalent to autoconf's CPPFLAGS to  
pass in additional header include paths. The OS_CFLAGS come closest,  
but they are ignored for some of the tests, too. Any preferences how  
to fix this?

On Haiku, zlib and ncurses headers are not in the default include  
path, so the current situation does not allow to configure QEMU at  
all. The attached patch adds a Haiku section to configure to hardcode  
the path in OS_CFLAGS and adds ${OS_CFLAGS} where necessary for Haiku.

It further sets OS_LDFLAGS to reference libnetwork.so, which contains  
the socket functions.

The optional curses support relies on -lcurses but it's called  
libncurses.a on Haiku, so add a check for -lncurses if -lcurses fails.  
It is then detected.

Unresolved issues include that AIO is detected, and as a consequence  
AIOLIBS is set to -lpthread but that is not available on Haiku.
The code still does not link qemu-img due to an unresolved symbol _IO  
in nbd code. Not sure if that's a missing check in QEMU or an issue in  
Haiku? There doesn't appear to be a switch to disable NBD altogether,  
so this seems like a blocker for now.

BTW, is it intentional that --disable-gfx-checks is not documented as  
part of --help, only when the checks do fail?

Andreas

[-- Attachment #2: qemu-haiku-01.diff --]
[-- Type: application/octet-stream, Size: 785 bytes --]

Index: configure
===================================================================
--- configure	(revision 6645)
+++ configure	(working copy)
@@ -297,6 +297,10 @@
 aix="yes"
 make="gmake"
 ;;
+Haiku)
+OS_CFLAGS="-I/boot/develop/headers/3rdparty"
+OS_LDFLAGS="-lnetwork"
+;;
 *)
 audio_drv_list="oss"
 audio_possible_drivers="oss alsa sdl esd pa"
@@ -933,8 +937,12 @@
 #include <curses.h>
 int main(void) { return curses_version(); }
 EOF
-  if $cc $ARCH_CFLAGS -o $TMPE $TMPC -lcurses > /dev/null 2> /dev/null ; then
+  if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $TMPC -lcurses > /dev/null 2> /dev/null ; then
     curses=yes
+  else
+    if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $TMPC -lncurses > /dev/null 2> /dev/null ; then
+      curses=yes
+    fi
   fi
 fi # test "$curses"
 

[-- Attachment #3: Type: text/plain, Size: 1033 bytes --]


---
Haiku support for configure

Add zlib include path to OS_CFLAGS and link against libnetwork.
Make the curses check respect OS_CFLAGS and check for -lncurses as well.

Signed-off-by: Andreas Faerber <andreas.faerber@web.de>


Index: configure
===================================================================
--- configure	(revision 6645)
+++ configure	(working copy)
@@ -297,6 +297,10 @@
  aix="yes"
  make="gmake"
  ;;
+Haiku)
+OS_CFLAGS="-I/boot/develop/headers/3rdparty"
+OS_LDFLAGS="-lnetwork"
+;;
  *)
  audio_drv_list="oss"
  audio_possible_drivers="oss alsa sdl esd pa"
@@ -933,8 +937,12 @@
  #include <curses.h>
  int main(void) { return curses_version(); }
  EOF
-  if $cc $ARCH_CFLAGS -o $TMPE $TMPC -lcurses > /dev/null 2> /dev/ 
null ; then
+  if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $TMPC -lcurses > /dev/ 
null 2> /dev/null ; then
      curses=yes
+  else
+    if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $TMPC -lncurses > /dev/ 
null 2> /dev/null ; then
+      curses=yes
+    fi
    fi
  fi # test "$curses"



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

end of thread, other threads:[~2009-03-09 20:57 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-28 14:08 [Qemu-devel] [PATCH] [RFC] Haiku host support and general configure issues Andreas Färber
2009-02-28 17:08 ` [Qemu-devel] " François Revol
2009-02-28 18:31   ` Andreas Färber
2009-02-28 19:01     ` [HaikuPorts-devs] " François Revol
2009-02-28 20:26     ` Jamie Lokier
2009-02-28 20:32       ` François Revol
2009-03-08 18:15     ` Anthony Liguori
2009-03-08 18:41       ` [HaikuPorts-devs] " François Revol
2009-03-09  8:40       ` Avi Kivity
2009-03-09 14:14         ` [HaikuPorts-devs] " François Revol
2009-03-09 14:33           ` Avi Kivity
2009-03-09 15:39             ` François Revol

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).