Skip to content

Commit

Permalink
configure: Add basic support for Haiku
Browse files Browse the repository at this point in the history
For compatibility with BeOS, Haiku's error codes are negative whereas recent
POSIX versions require them to be positive. As spotted by François, some
parts of QEMU code rely on this, so use a mapper library to convert them
to positive ones.

Cc: François Revol <[email protected]>
Cc: Ingo Weinhold <[email protected]>

Haiku has network functions in libnetwork.so. It doesn't ship libutil.so.

Signed-off-by: Andreas Färber <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
  • Loading branch information
Andreas Färber authored and blueswirl committed Oct 3, 2010
1 parent a82cdd5 commit 179cf40
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ io_thread="no"
mixemu="no"
kerneldir=""
aix="no"
haiku="no"
blobs="yes"
pkgversion=""
check_utests="no"
Expand All @@ -336,6 +337,8 @@ elif check_define __OpenBSD__ ; then
targetos='OpenBSD'
elif check_define __sun__ ; then
targetos='SunOS'
elif check_define __HAIKU__ ; then
targetos='Haiku'
else
targetos=`uname -s`
fi
Expand Down Expand Up @@ -451,6 +454,11 @@ AIX)
aix="yes"
make="gmake"
;;
Haiku)
haiku="yes"
QEMU_CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS $QEMU_CFLAGS"
LIBS="-lposix_error_mapper -lnetwork $LIBS"
;;
*)
audio_drv_list="oss"
audio_possible_drivers="oss alsa sdl esd pa"
Expand Down Expand Up @@ -2030,7 +2038,7 @@ elif compile_prog "" "-lrt" ; then
fi

if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \
"$aix" != "yes" ; then
"$aix" != "yes" -a "$haiku" != "yes" ; then
libs_softmmu="-lutil $libs_softmmu"
fi

Expand Down Expand Up @@ -2353,6 +2361,9 @@ if test "$solaris" = "yes" ; then
echo "CONFIG_NEEDS_LIBSUNMATH=y" >> $config_host_mak
fi
fi
if test "$haiku" = "yes" ; then
echo "CONFIG_HAIKU=y" >> $config_host_mak
fi
if test "$static" = "yes" ; then
echo "CONFIG_STATIC=y" >> $config_host_mak
fi
Expand Down

0 comments on commit 179cf40

Please sign in to comment.