[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] lib64 fixes
From: |
Gwenole Beauchesne |
Subject: |
[Qemu-devel] [PATCH] lib64 fixes |
Date: |
Fri, 7 Nov 2003 12:28:00 +0100 (CET) |
Hi,
With current CVS and the latest SDL patch, I prefered to autodetect the
right libdir since it is now possible to build qemu-system dynamically.
For systems that don't follow lib64 conventions, it's still possible to
force a specific lib dir name with --lib at configure time.
--- qemu-0.5.0/configure.lib64 2003-11-07 11:42:11.000000000 +0100
+++ qemu-0.5.0/configure 2003-11-07 11:58:22.000000000 +0100
@@ -18,6 +18,7 @@ TMPS="${TMPDIR1}/qemu-conf-${RANDOM}-$$-
# default parameters
prefix="/usr/local"
+lib=""
interp_prefix="/usr/gnemul/qemu-%M"
static="no"
cross_prefix=""
@@ -110,6 +111,8 @@ for opt do
case "$opt" in
--prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
;;
+ --lib=*) lib=`echo $opt | cut -d '=' -f 2`
+ ;;
--interp-prefix=*) interp_prefix=`echo $opt | cut -d '=' -f 2`
;;
--source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
@@ -186,6 +189,30 @@ if $cc -fno-reorder-blocks -fno-optimize
have_gcc3_options="yes"
fi
+# check for native lib directory name
+if test -z "$lib" && $cc -o $TPMO -c $TMPC 2> /dev/null ; then
+ case $targetos in
+ Linux*)
+ is_64bit_output=no
+ case `/usr/bin/file $TMPO` in
+ *"ELF 64"*)
+ is_64bit_output=yes
+ esac
+ ;;
+ esac
+ case $cpu:$is_64bit_output in
+ powerpc64:yes | s390x:yes | sparc64:yes | amd64:yes)
+ lib="lib64"
+ ;;
+ *:*)
+ lib="lib"
+ ;;
+ esac
+fi
+if test -z "$lib" ; then
+ lib="lib"
+fi
+
if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
cat << EOF
@@ -196,6 +223,7 @@ EOF
echo "Standard options:"
echo " --help print this message"
echo " --prefix=PREFIX install in PREFIX [$prefix]"
+echo " --lib=LIB native lib directory name [$lib]"
echo " --interp-prefix=PREFIX where to find shared libraries, etc."
echo " use %M for cpu name [$interp_prefix]"
echo " --target-list=LIST set target list [$target_list]"
@@ -215,6 +243,7 @@ mandir="$prefix/share/man"
sharedir="$prefix/share/qemu"
echo "Install prefix $prefix"
+echo "Native lib dir $lib"
echo "Manual directory $mandir"
echo "BIOS directory $sharedir"
echo "ELF interp prefix $interp_prefix"
@@ -240,6 +269,7 @@ echo "# Automatically generated by confi
echo "/* Automatically generated by configure - do not modify */" > $config_h
echo "prefix=$prefix" >> $config_mak
+echo "lib=$lib" >> $config_mak
echo "mandir=$mandir" >> $config_mak
echo "sharedir=$sharedir" >> $config_mak
echo "#define CONFIG_QEMU_SHAREDIR \"$sharedir\"" >> $config_h
--- qemu-0.5.0/Makefile.target.lib64 2003-11-07 11:42:11.000000000 +0100
+++ qemu-0.5.0/Makefile.target 2003-11-07 11:52:28.000000000 +0100
@@ -187,7 +187,7 @@ endif
VL_OBJS=vl.o block.o vga.o
ifdef CONFIG_SDL
VL_OBJS+=sdl.o
-SDL_LIBS+=-L/usr/X11R6/lib -lX11 -lXext -lXv -ldl -lm
+SDL_LIBS+=-L/usr/X11R6/$(lib) -lX11 -lXext -lXv -ldl -lm
endif
VL_LDFLAGS=
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] lib64 fixes,
Gwenole Beauchesne <=