Changeset View
Changeset View
Standalone View
Standalone View
emulators/virtualbox-ose/files/patch-configure
--- configure.orig 2020-05-13 19:36:41 UTC | --- configure.orig 2021-01-07 15:31:21 UTC | ||||
+++ configure | +++ configure | ||||
@@ -138,10 +138,14 @@ CXX_FLAGS="" | @@ -140,10 +140,14 @@ CXX_FLAGS="" | ||||
if [ "$OS" = "freebsd" ]; then | if [ "$OS" = "freebsd" ]; then | ||||
INCCURL="-I/usr/local/include" | INCCURL="-I/usr/local/include" | ||||
LIBCURL="-L/usr/local/lib -lcurl" | LIBCURL="-L/usr/local/lib -lcurl" | ||||
+ INCALSA="-I/usr/local/include" | + INCALSA="-I/usr/local/include" | ||||
+ LIBALSA="-L/usr/local/lib" | + LIBALSA="-L/usr/local/lib" | ||||
INCPULSE="-I/usr/local/include" | INCPULSE="-I/usr/local/include" | ||||
LIBPULSE="-L/usr/local/lib" | LIBPULSE="-L/usr/local/lib" | ||||
INCPNG="-I/usr/local/include" | INCPNG="-I/usr/local/include" | ||||
LIBPNG="-L/usr/local/lib -lpng" | LIBPNG="-L/usr/local/lib -lpng" | ||||
+ INCVNCSERVER="-I/usr/local/include" | + INCVNCSERVER="-I/usr/local/include" | ||||
+ LIBVNCSERVER="-L/usr/local/lib" | + LIBVNCSERVER="-L/usr/local/lib" | ||||
else | else | ||||
INCCURL="" | INCCURL="" | ||||
LIBCURL="-lcurl" | LIBCURL="-lcurl" | ||||
@@ -441,6 +445,9 @@ check_gcc() | @@ -1258,7 +1262,7 @@ extern "C" int main(void) | ||||
elif [ $cc_maj -eq 4 -a $cc_min -eq 0 -a "$OS" = "darwin" ]; then | |||||
log_success "found version $cc_ver" | |||||
# gcc-4.0 is allowed for Darwin only | |||||
+ elif [ $cc_maj -eq 4 -a $cc_min -eq 2 -a "$OS" = "freebsd" ]; then | |||||
+ log_success "found version $cc_ver" | |||||
+ # gcc-4.2 is allowed for FreeBSD only | |||||
elif [ $cc_maj -lt 4 \ | |||||
-o \( $cc_maj -eq 4 -a $cc_min -lt 4 -a "$OS" != "darwin" \) \ | |||||
-o \( $cc_maj -eq 4 -a $cc_min -lt 2 -a "$OS" = "darwin" \) ]; then | |||||
@@ -1208,7 +1215,7 @@ extern "C" int main(void) | |||||
#endif | #endif | ||||
} | } | ||||
EOF | EOF | ||||
- if test_compile "-lasound" asound asound; then | - if test_compile "-lasound" asound asound; then | ||||
+ if test_compile "$INCALSA $LIBALSA -lasound" asound asound; then | + if test_compile "$INCALSA $LIBALSA -lasound" asound asound; then | ||||
test_execute | test_execute | ||||
fi | fi | ||||
} | } | ||||
@@ -1508,8 +1515,7 @@ EOF | @@ -1563,9 +1567,7 @@ EOF | ||||
if [ $? -eq 0 ]; then | if [ $? -eq 0 ]; then | ||||
echo "(Qt5 from pkg-config)" >> $LOG | echo "(Qt5 from pkg-config)" >> $LOG | ||||
FLGQT5=`pkg-config Qt5Core --cflags` | FLGQT5=`pkg-config Qt5Core --cflags` | ||||
- # gcc 4.8 is able to compile with C++11 (see also VBOX_GCC_std in Config.kmk) | - # gcc 4.8 is able to compile with C++11 (see also VBOX_GCC_std in Config.kmk) | ||||
- [ $cc_maj -eq 4 -a $cc_min -eq 8 ] && FLGQT5="$FLGQT5 -std=c++11" | - [ $cc_maj -eq 4 -a $cc_min -eq 8 ] && FLGQT5="$FLGQT5 -std=c++11" | ||||
+ FLGQT5="$FLGQT5 -std=c++11" | - INCQT5=`strip_I "$FLGQT5"` | ||||
INCQT5=`strip_I "$FLGQT5"` | + FLGQT5="$FLGQT5 -std=c++11" INCQT5=`strip_I "$FLGQT5"` | ||||
LIBDIR5=`pkg-config Qt5Core --variable=libdir` | LIBDIR5=`pkg-config Qt5Core --variable=libdir` | ||||
LIBQT5=`pkg-config Qt5Core --libs` | LIBQT5=`pkg-config Qt5Core --libs` | ||||
@@ -1648,7 +1654,7 @@ check_libopus() | LIBQT5="-L$LIBDIR5 $LIBQT5" | ||||
@@ -1703,7 +1705,7 @@ check_libopus() | |||||
fi | fi | ||||
cat > $ODIR.tmp_src.cc << EOF | cat > $ODIR.tmp_src.cc << EOF | ||||
#include <cstdio> | #include <cstdio> | ||||
-#include <opus/opus.h> | -#include <opus/opus.h> | ||||
+#include <opus.h> | +#include <opus.h> | ||||
extern "C" int main(void) | extern "C" int main(void) | ||||
{ | { | ||||
OpusEncoder *test; | OpusEncoder *test; | ||||
@@ -1980,8 +1986,8 @@ EOF | @@ -2035,8 +2037,8 @@ EOF | ||||
echo "compiling the following source file:" >> $LOG | echo "compiling the following source file:" >> $LOG | ||||
cat $ODIR.tmp_src.cc >> $LOG | cat $ODIR.tmp_src.cc >> $LOG | ||||
echo "using the following command line:" >> $LOG | echo "using the following command line:" >> $LOG | ||||
- echo "$CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so" >> $LOG | - echo "$CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so" >> $LOG | ||||
- $CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so >> $LOG 2>&1 | - $CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so >> $LOG 2>&1 | ||||
+ echo "$CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so -pthread" >> $LOG | + echo "$CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so -pthread" >> $LOG | ||||
+ $CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so -pthread >> $LOG 2>&1 | + $CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so -pthread >> $LOG 2>&1 | ||||
if [ $? -eq 0 ]; then | if [ $? -eq 0 ]; then | ||||
found=1 | found=1 | ||||
break | break | ||||
@@ -2453,7 +2459,7 @@ for option in "$@"; do | @@ -2512,7 +2514,7 @@ for option in "$@"; do | ||||
--with-openssl-dir=*) | --with-openssl-dir=*) | ||||
OPENSSLDIR=`echo $option | cut -d'=' -f2` | OPENSSLDIR=`echo $option | cut -d'=' -f2` | ||||
INCCRYPTO="-I${OPENSSLDIR}/include" | INCCRYPTO="-I${OPENSSLDIR}/include" | ||||
- LIBCRYPTO="${OPENSSLDIR}/lib/libcrypto.a ${OPENSSLDIR}/lib/libssl.a" | - LIBCRYPTO="${OPENSSLDIR}/lib/libcrypto.a ${OPENSSLDIR}/lib/libssl.a" | ||||
+ LIBCRYPTO="-L${OPENSSLDIR}/lib -lssl -lcrypto" | + LIBCRYPTO="-L${OPENSSLDIR}/lib -lssl -lcrypto" | ||||
;; | ;; | ||||
--with-ow-dir=*) | --with-ow-dir=*) | ||||
WATCOM=`echo $option | cut -d'=' -f2` | WATCOM=`echo $option | cut -d'=' -f2` | ||||
@@ -2767,7 +2773,7 @@ if [ $ONLY_ADDITIONS -eq 0 ]; then | @@ -2856,14 +2858,23 @@ if [ $ONLY_ADDITIONS -eq 0 ]; then | ||||
check_ssl | |||||
check_curl | |||||
[ $WITH_LIBVPX -eq 1 ] && check_vpx | |||||
- check_libopus | |||||
+ [ $OSE -eq 0 -a "$OS" != "win" ] && check_libopus | |||||
[ "$OS" != "darwin" ] && check_z | |||||
[ "$OS" != "darwin" ] && check_png | |||||
[ $OSE -eq 0 -a "$OS" = "linux" ] && check_pam | |||||
@@ -2788,13 +2794,20 @@ if [ $ONLY_ADDITIONS -eq 0 ]; then | |||||
[ $WITH_PYTHON -eq 1 ] && check_python | [ $WITH_PYTHON -eq 1 ] && check_python | ||||
[ $WITH_JAVA -eq 1 ] && check_java | [ $WITH_JAVA -eq 1 ] && check_java | ||||
- # PulseAudio | - # PulseAudio | ||||
if [ "$OS" = "linux" -o "$OS" = "freebsd" -o "$OS" = "netbsd" ]; then | - if [ $WITH_PULSE -eq 1 ]; then | ||||
- check_pulse | |||||
- elif [ $WITH_PULSE -eq 0 ]; then # Force disabling PulseAudio. | |||||
- cnf_append "VBOX_WITH_AUDIO_PULSE" "" | |||||
- elif [ $WITH_PULSE -eq 2 ]; then # --enable-pulse was passed, force PulseAudio. | |||||
- cnf_append "VBOX_WITH_AUDIO_PULSE" "1" | |||||
- fi | |||||
+ if [ "$OS" = "linux" -o "$OS" = "freebsd" -o "$OS" = "netbsd" ]; then | |||||
+ if [ $WITH_ALSA -eq 1 ]; then | + if [ $WITH_ALSA -eq 1 ]; then | ||||
+ check_alsa | + check_alsa | ||||
+ else | + else | ||||
+ cnf_append "VBOX_WITH_AUDIO_ALSA" "" | + cnf_append "VBOX_WITH_AUDIO_ALSA" "" | ||||
+ fi | + fi | ||||
if [ $WITH_PULSE -eq 1 ]; then | + if [ $WITH_PULSE -eq 1 ]; then | ||||
check_pulse | + check_pulse | ||||
elif [ $WITH_PULSE -eq 0 ]; then | + elif [ $WITH_PULSE -eq 0 ]; then # Force disabling PulseAudio. | ||||
cnf_append "VBOX_WITH_AUDIO_PULSE" "" | + cnf_append "VBOX_WITH_AUDIO_PULSE" "" | ||||
fi | + elif [ $WITH_PULSE -eq 2 ]; then # --enable-pulse was passed, force PulseAudio. | ||||
+ cnf_append "VBOX_WITH_AUDIO_PULSE" "1" | |||||
+ fi | |||||
+ if [ $WITH_DBUS -eq 0 ]; then | + if [ $WITH_DBUS -eq 0 ]; then | ||||
+ cnf_append "VBOX_WITH_DBUS" "" | + cnf_append "VBOX_WITH_DBUS" "" | ||||
+ fi | + fi | ||||
+ fi | |||||
fi | fi | ||||
fi | |||||
@@ -2810,14 +2823,6 @@ if [ "$OS" = "linux" ]; then | # Linux-specific | ||||
@@ -2878,14 +2889,6 @@ if [ "$OS" = "linux" ]; then | |||||
cnf_append "VBOX_WITHOUT_LINUX_TEST_BUILDS" "1" | cnf_append "VBOX_WITHOUT_LINUX_TEST_BUILDS" "1" | ||||
fi | fi | ||||
if [ $ONLY_ADDITIONS -eq 0 ]; then | if [ $ONLY_ADDITIONS -eq 0 ]; then | ||||
- if [ $WITH_ALSA -eq 1 ]; then | - if [ $WITH_ALSA -eq 1 ]; then | ||||
- check_alsa | - check_alsa | ||||
- else | - else | ||||
- cnf_append "VBOX_WITH_AUDIO_ALSA" "" | - cnf_append "VBOX_WITH_AUDIO_ALSA" "" | ||||
- fi | - fi | ||||
- if [ $WITH_DBUS -eq 0 ]; then | - if [ $WITH_DBUS -eq 0 ]; then | ||||
- cnf_append "VBOX_WITH_DBUS" "" | - cnf_append "VBOX_WITH_DBUS" "" | ||||
- fi | - fi | ||||
if [ $WITH_DEVMAPPER -eq 1 ]; then | if [ $WITH_DEVMAPPER -eq 1 ]; then | ||||
check_libdevmapper | check_libdevmapper | ||||
else | else |