All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 5/8] v2: libnuma check in configure
@ 2008-12-16 14:18 Andre Przywara
  0 siblings, 0 replies; only message in thread
From: Andre Przywara @ 2008-12-16 14:18 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel, Avi Kivity

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

Signed-off-by: Andre Przywara <andre.przywara@amd.com>

-- 
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 277-84917
----to satisfy European Law for business letters:
AMD Saxony Limited Liability Company & Co. KG,
Wilschdorfer Landstr. 101, 01109 Dresden, Germany
Register Court Dresden: HRA 4896, General Partner authorized
to represent: AMD Saxony LLC (Wilmington, Delaware, US)
General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy

[-- Attachment #2: qemunuma_v2_libnuma_check.patch --]
[-- Type: text/x-patch, Size: 3031 bytes --]

# HG changeset patch
# User Andre Przywara <andre.przywara@amd.com>
# Date 1229431878 -3600
# Node ID c966a24fc826ccf77a698492003faeab87f0f9e5
# Parent  56efd06edc372f45820c382a4c2f0ac87766a2da
check for existence of libnuma in configure

diff -r 56efd06edc37 -r c966a24fc826 Makefile.target
--- a/Makefile.target	Tue Dec 16 13:45:28 2008 +0100
+++ b/Makefile.target	Tue Dec 16 13:51:18 2008 +0100
@@ -604,6 +604,8 @@ ifdef CONFIG_CS4231A
 ifdef CONFIG_CS4231A
 SOUND_HW += cs4231a.o
 endif
+
+LIBS+=$(NUMALIBS)
 
 ifdef CONFIG_VNC_TLS
 CPPFLAGS += $(CONFIG_VNC_TLS_CFLAGS)
diff -r 56efd06edc37 -r c966a24fc826 configure
--- a/configure	Tue Dec 16 13:45:28 2008 +0100
+++ b/configure	Tue Dec 16 13:51:18 2008 +0100
@@ -112,6 +112,7 @@ uname_release=""
 uname_release=""
 curses="yes"
 aio="yes"
+numa="yes"
 nptl="yes"
 mixemu="no"
 bluez="yes"
@@ -365,6 +366,8 @@ for opt do
   ;;
   --enable-mixemu) mixemu="yes"
   ;;
+  --disable-numa) numa="no"
+  ;;
   --disable-aio) aio="no"
   ;;
   --disable-blobs) blobs="no"
@@ -459,6 +462,7 @@ echo "  --audio-card-list=LIST   set lis
 echo "  --audio-card-list=LIST   set list of additional emulated audio cards"
 echo "                           Available cards: ac97 adlib cs4231a gus"
 echo "  --enable-mixemu          enable mixer emulation"
+echo "  --disable-numa           disable NUMA support (host side)"
 echo "  --disable-brlapi         disable BrlAPI"
 echo "  --disable-vnc-tls        disable TLS encryption for VNC server"
 echo "  --disable-curses         disable curses output"
@@ -865,6 +869,22 @@ done
 done
 
 ##########################################
+# libnuma probe
+NUMALIBS=""
+
+if test "$numa" = "yes" ; then
+    numa=no
+    cat > $TMPC << EOF
+#include <numa.h>
+int main(void) { return numa_available(); }
+EOF
+    if $cc ${ARCH_CFLAGS} -o $TMPE ${OS_CFLAGS} $TMPC -lnuma > /dev/null 2> /dev/null ; then
+        numa=yes
+        NUMALIBS="-lnuma"
+    fi
+fi
+
+##########################################
 # BrlAPI probe
 
 if test -z "$brlapi" ; then
@@ -1056,6 +1076,7 @@ echo "Audio drivers     $audio_drv_list"
 echo "Audio drivers     $audio_drv_list"
 echo "Extra audio cards $audio_card_list"
 echo "Mixer emulation   $mixemu"
+echo "NUMA support      $numa"
 echo "VNC TLS support   $vnc_tls"
 if test "$vnc_tls" = "yes" ; then
     echo "    TLS CFLAGS    $vnc_tls_cflags"
@@ -1122,6 +1143,7 @@ echo "LDFLAGS=$LDFLAGS" >> $config_mak
 echo "LDFLAGS=$LDFLAGS" >> $config_mak
 echo "EXESUF=$EXESUF" >> $config_mak
 echo "AIOLIBS=$AIOLIBS" >> $config_mak
+echo "NUMALIBS=$NUMALIBS" >> $config_mak
 case "$cpu" in
   i386)
     echo "ARCH=i386" >> $config_mak
@@ -1296,6 +1318,10 @@ if test "$mixemu" = "yes" ; then
 if test "$mixemu" = "yes" ; then
   echo "CONFIG_MIXEMU=yes" >> $config_mak
   echo "#define CONFIG_MIXEMU 1" >> $config_h
+fi
+if test "$numa" = "yes" ; then
+  echo "CONFIG_NUMA=yes" >> $config_mak
+  echo "#define CONFIG_NUMA 1" >> $config_h
 fi
 if test "$vnc_tls" = "yes" ; then
   echo "CONFIG_VNC_TLS=yes" >> $config_mak

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-12-16 14:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-16 14:18 [Qemu-devel] [PATCH 5/8] v2: libnuma check in configure Andre Przywara

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.