- Fix install(1) usage to be compatible with OpenBSD's install(1). - Allow overriding the location of Samba's smbd, From Brad - Remove PROVIDE_HIDDEN and ONLY_IF_{RO,RW} from linker scripts to make them work with older binutils versions. Fixes *-bsd-user build on OpenBSD 4.9 which ships binutils 2.15. From Gerd Hoffmann <kraxel at redhat dot com>
143 lines
4.5 KiB
Plaintext
143 lines
4.5 KiB
Plaintext
$OpenBSD: patch-configure,v 1.19 2011/09/21 09:02:30 sthen Exp $
|
|
--- configure.orig Mon Aug 8 14:28:42 2011
|
|
+++ configure Tue Sep 6 22:49:25 2011
|
|
@@ -229,13 +229,11 @@ sdl_config="${cross_prefix}${SDL_CONFIG-sdl-config}"
|
|
|
|
# default flags for all hosts
|
|
QEMU_CFLAGS="-fno-strict-aliasing $QEMU_CFLAGS"
|
|
-CFLAGS="-g $CFLAGS"
|
|
QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS"
|
|
QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS"
|
|
QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS"
|
|
QEMU_CFLAGS="-D_FORTIFY_SOURCE=2 $QEMU_CFLAGS"
|
|
QEMU_INCLUDES="-I. -I\$(SRC_PATH)"
|
|
-LDFLAGS="-g $LDFLAGS"
|
|
|
|
# make source path absolute
|
|
source_path=`cd "$source_path"; pwd`
|
|
@@ -281,6 +279,12 @@ elif check_define __s390__ ; then
|
|
else
|
|
cpu="s390"
|
|
fi
|
|
+elif check_define __ARMEB__ ; then
|
|
+ cpu="armv4b"
|
|
+elif check_define __ARMEL__ ; then
|
|
+ cpu="armv4l"
|
|
+elif check_define __hppa__ ; then
|
|
+ cpu="hppa"
|
|
else
|
|
cpu=`uname -m`
|
|
fi
|
|
@@ -301,7 +305,7 @@ case "$cpu" in
|
|
armv*l)
|
|
cpu="armv4l"
|
|
;;
|
|
- parisc|parisc64)
|
|
+ hppa|parisc|parisc64)
|
|
cpu="hppa"
|
|
;;
|
|
mips*)
|
|
@@ -409,6 +413,7 @@ SunOS)
|
|
make="${MAKE-gmake}"
|
|
install="${INSTALL-ginstall}"
|
|
ld="gld"
|
|
+ smbd="${SMBD-/usr/sfw/sbin/smbd}"
|
|
needs_libsunmath="no"
|
|
solarisrev=`uname -r | cut -f2 -d.`
|
|
# have to select again, because `uname -m` returns i86pc
|
|
@@ -477,6 +482,7 @@ fi
|
|
: ${make=${MAKE-make}}
|
|
: ${install=${INSTALL-install}}
|
|
: ${python=${PYTHON-python}}
|
|
+: ${smbd=${SMBD-/usr/sbin/smbd}}
|
|
|
|
if test "$mingw32" = "yes" ; then
|
|
EXESUF=".exe"
|
|
@@ -520,6 +526,8 @@ for opt do
|
|
;;
|
|
--python=*) python="$optarg"
|
|
;;
|
|
+ --smbd=*) smbd="$optarg"
|
|
+ ;;
|
|
--extra-cflags=*)
|
|
;;
|
|
--extra-ldflags=*)
|
|
@@ -932,6 +940,7 @@ echo " --extra-ldflags=LDFLAGS append extra linker f
|
|
echo " --make=MAKE use specified make [$make]"
|
|
echo " --install=INSTALL use specified install [$install]"
|
|
echo " --python=PYTHON use specified python [$python]"
|
|
+echo " --smbd=SMBD use specified smbd [$smbd]"
|
|
echo " --static enable static build [$static]"
|
|
echo " --mandir=PATH install man pages in PATH"
|
|
echo " --datadir=PATH install firmware in PATH"
|
|
@@ -1513,11 +1522,17 @@ int main(void) {
|
|
return 0;
|
|
}
|
|
EOF
|
|
+ if $pkg_config libpng --modversion >/dev/null 2>&1; then
|
|
+ vnc_png_cflags=`$pkg_config libpng --cflags 2> /dev/null`
|
|
+ vnc_png_libs=`$pkg_config libpng --libs 2> /dev/null`
|
|
+ else
|
|
vnc_png_cflags=""
|
|
vnc_png_libs="-lpng"
|
|
+ fi
|
|
if compile_prog "$vnc_png_cflags" "$vnc_png_libs" ; then
|
|
vnc_png=yes
|
|
libs_softmmu="$vnc_png_libs $libs_softmmu"
|
|
+ QEMU_CFLAGS="$QEMU_CFLAGS $vnc_png_cflags"
|
|
else
|
|
if test "$vnc_png" = "yes" ; then
|
|
feature_not_found "vnc-png"
|
|
@@ -1844,7 +1859,7 @@ fi
|
|
|
|
##########################################
|
|
# pthread probe
|
|
-PTHREADLIBS_LIST="-lpthread -lpthreadGC2"
|
|
+PTHREADLIBS_LIST="-pthread -lpthread -lpthreadGC2"
|
|
|
|
pthread=no
|
|
cat > $TMPC << EOF
|
|
@@ -2546,8 +2561,9 @@ fi
|
|
# End of CC checks
|
|
# After here, no more $cc or $ld runs
|
|
|
|
-if test "$debug" = "no" ; then
|
|
- CFLAGS="-O2 $CFLAGS"
|
|
+if test "$debug" = "yes" ; then
|
|
+ CFLAGS="$CFLAGS -O0 -g"
|
|
+ LDFLAGS="$LDFLAGS -g"
|
|
fi
|
|
|
|
# Consult white-list to determine whether to enable werror
|
|
@@ -2638,6 +2654,9 @@ echo "LDFLAGS $LDFLAGS"
|
|
echo "make $make"
|
|
echo "install $install"
|
|
echo "python $python"
|
|
+if test "$slirp" = "yes" ; then
|
|
+ echo "smbd $smbd"
|
|
+fi
|
|
echo "host CPU $cpu"
|
|
echo "host big endian $bigendian"
|
|
echo "target list $target_list"
|
|
@@ -2796,6 +2815,7 @@ if test $profiler = "yes" ; then
|
|
fi
|
|
if test "$slirp" = "yes" ; then
|
|
echo "CONFIG_SLIRP=y" >> $config_host_mak
|
|
+ echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak
|
|
QEMU_INCLUDES="-I\$(SRC_PATH)/slirp $QEMU_INCLUDES"
|
|
fi
|
|
if test "$vde" = "yes" ; then
|
|
@@ -3048,9 +3068,9 @@ echo "TOOLS=$tools" >> $config_host_mak
|
|
echo "ROMS=$roms" >> $config_host_mak
|
|
echo "MAKE=$make" >> $config_host_mak
|
|
echo "INSTALL=$install" >> $config_host_mak
|
|
-echo "INSTALL_DIR=$install -d -m0755 -p" >> $config_host_mak
|
|
-echo "INSTALL_DATA=$install -m0644 -p" >> $config_host_mak
|
|
-echo "INSTALL_PROG=$install -m0755 -p" >> $config_host_mak
|
|
+echo "INSTALL_DIR=$install -d -m 0755" >> $config_host_mak
|
|
+echo "INSTALL_DATA=$install -c -m 0644" >> $config_host_mak
|
|
+echo "INSTALL_PROG=$install -c -m 0755" >> $config_host_mak
|
|
echo "PYTHON=$python" >> $config_host_mak
|
|
echo "CC=$cc" >> $config_host_mak
|
|
echo "CC_I386=$cc_i386" >> $config_host_mak
|