--- configure.orig 2020-07-10 02:49:46.000000000 +1000 +++ configure 2020-08-17 22:36:32.270100000 +1000 @@ -49,6 +49,8 @@ ;; darwin) ;; + bsdsunix) + ;; freebsd) ;; netbsd) @@ -135,13 +137,17 @@ INCDEVMAPPER="" LIBDEVMAPPER="-ldevmapper" CXX_FLAGS="" -if [ "$OS" = "freebsd" ]; then +if [ "$OS" = "bsdsunix" -o "$OS" = "freebsd" ]; then INCCURL="-I/usr/local/include" LIBCURL="-L/usr/local/lib -lcurl" + INCALSA="-I/usr/local/include" + LIBALSA="-L/usr/local/lib" INCPULSE="-I/usr/local/include" LIBPULSE="-L/usr/local/lib" INCPNG="-I/usr/local/include" LIBPNG="-L/usr/local/lib -lpng" + INCVNCSERVER="-I/usr/local/include" + LIBVNCSERVER="-L/usr/local/lib" else INCCURL="" LIBCURL="-lcurl" @@ -441,6 +447,12 @@ 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" = "bsdsunix" ]; then + log_success "found version $cc_ver" + # gcc-4.2 is allowed for BSDSUniX + 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 @@ -551,6 +563,7 @@ case "$OS" in "darwin") wc_bin="binosx";; # ?? "dos") wc_bin="binw";; + "bsdsunix") wc_bin="binbsdsux";; # ?? "freebsd") wc_bin="binfbsd";; # ?? "linux") wc_bin="binl";; "netbsd") wc_bin="binnbsd";; # ?? @@ -910,7 +923,7 @@ [ -n "$INCZ" ] && I_INCZ=`prefix_I "$INCZ"` if test_compile "$LIBZ $I_INCZ" zlib zlib; then if test_execute; then - echo "if1of (\$(KBUILD_TARGET),darwin freebsd haiku linux)" >> $CNF + echo "if1of (\$(KBUILD_TARGET),darwin bsdsunix freebsd haiku linux)" >> $CNF cnf_append " SDK_VBOX_ZLIB_LIBS" "`strip_l "$LIBZ"`" cnf_append " SDK_VBOX_ZLIB_INCS" "$INCZ" echo "endif" >> $CNF @@ -1208,7 +1221,7 @@ #endif } EOF - if test_compile "-lasound" asound asound; then + if test_compile "$INCALSA $LIBALSA -lasound" asound asound; then test_execute fi } @@ -1508,8 +1521,7 @@ if [ $? -eq 0 ]; then echo "(Qt5 from pkg-config)" >> $LOG FLGQT5=`pkg-config Qt5Core --cflags` - # 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" + FLGQT5="$FLGQT5 -std=c++11" INCQT5=`strip_I "$FLGQT5"` LIBDIR5=`pkg-config Qt5Core --variable=libdir` LIBQT5=`pkg-config Qt5Core --libs` @@ -1648,7 +1660,7 @@ fi cat > $ODIR.tmp_src.cc << EOF #include -#include +#include extern "C" int main(void) { OpusEncoder *test; @@ -1827,7 +1839,7 @@ fi echo "export PATH" >> $ENV echo "unset path_kbuild_bin path_dev_bin" >> $ENV - KBUILD_SED="$KBUILDDIR_BIN/kmk_sed" + KBUILD_SED="/usr/local/bin/kmk_sed" elif [ "$OS.$BUILD_MACHINE" = "darwin.amd64" ]; then # Currently there are no amd64 kBuild bins. So use the x86 variant in any case. KBUILDDIR_BIN="$KBUILDDIR/bin/$OS.x86" @@ -1843,7 +1855,7 @@ echo "echo \"\$PATH\" | grep -q \"\$path_dev_bin\" || PATH=\"\$path_dev_bin:\$PATH\"" >> $ENV echo "export PATH" >> $ENV echo "unset path_kbuild_bin path_dev_bin" >> $ENV - KBUILD_SED="$KBUILDDIR_BIN/kmk_sed" + KBUILD_SED="/usr/local/bin/kmk_sed" elif check_avail "kmk" KBUILDDIR really; then # check for installed kBuild KBUILD_SED="`which_wrapper kmk_sed`" @@ -1973,15 +1985,15 @@ } EOF found= - SUPPYTHONLIBS="python2.7 python2.6 python3.1 python3.2 python3.3 python3.4 python3.4m python3.5 python3.5m python3.6 python3.6m python3.7 python3.7m python3.8 python3.8m" + SUPPYTHONLIBS="python2.7" for p in $PYTHONDIR; do for d in $SUPPYTHONLIBS; do for b in lib/x86_64-linux-gnu lib/i386-linux-gnu lib64 lib/64 lib; do echo "compiling the following source file:" >> $LOG cat $ODIR.tmp_src.cc >> $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 - $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 + $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 found=1 break @@ -2321,7 +2333,7 @@ [ $OSE -eq 0 ] && echo " --disable-extpack don't build the extpack" [ $WITH_DOCS -eq 1 ] && echo " --disable-docs don't build the documentation" [ $WITH_LIBVPX -eq 1 ] && echo " --disable-libvpx don't use libvpx for video capturing" -[ "$OS" = "linux" -o "$OS" = "freebsd" ] && echo " --enable-vde enable VDE networking" +[ "$OS" = "linux" -o "$OS" = "bsdsunix" -o "$OS" = "freebsd" ] && echo " --enable-vde enable VDE networking" cat << EOF --disable-udptunnel disable UDP tunnel networking --disable-devmapper disable device mapper library access @@ -2453,7 +2465,7 @@ --with-openssl-dir=*) OPENSSLDIR=`echo $option | cut -d'=' -f2` INCCRYPTO="-I${OPENSSLDIR}/include" - LIBCRYPTO="${OPENSSLDIR}/lib/libcrypto.a ${OPENSSLDIR}/lib/libssl.a" + LIBCRYPTO="-L${OPENSSLDIR}/lib -lssl -lcrypto" ;; --with-ow-dir=*) WATCOM=`echo $option | cut -d'=' -f2` @@ -2767,7 +2779,7 @@ 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 +2800,20 @@ [ $WITH_PYTHON -eq 1 ] && check_python [ $WITH_JAVA -eq 1 ] && check_java - # PulseAudio - if [ "$OS" = "linux" -o "$OS" = "freebsd" -o "$OS" = "netbsd" ]; then + if [ "$OS" = "linux" -o "$OS" = "bsdsunix" -o "$OS" = "freebsd" -o "$OS" = "netbsd" ]; then + if [ $WITH_ALSA -eq 1 ]; then + check_alsa + else + cnf_append "VBOX_WITH_AUDIO_ALSA" "" + fi if [ $WITH_PULSE -eq 1 ]; then check_pulse elif [ $WITH_PULSE -eq 0 ]; then cnf_append "VBOX_WITH_AUDIO_PULSE" "" fi + if [ $WITH_DBUS -eq 0 ]; then + cnf_append "VBOX_WITH_DBUS" "" + fi fi fi @@ -2810,14 +2829,6 @@ cnf_append "VBOX_WITHOUT_LINUX_TEST_BUILDS" "1" fi if [ $ONLY_ADDITIONS -eq 0 ]; then - if [ $WITH_ALSA -eq 1 ]; then - check_alsa - else - cnf_append "VBOX_WITH_AUDIO_ALSA" "" - fi - if [ $WITH_DBUS -eq 0 ]; then - cnf_append "VBOX_WITH_DBUS" "" - fi if [ $WITH_DEVMAPPER -eq 1 ]; then check_libdevmapper else @@ -2847,7 +2858,7 @@ fi # VDE -if [ $ONLY_ADDITIONS -eq 0 -a "$OS" = "linux" -o "$OS" = "freebsd" ]; then +if [ $ONLY_ADDITIONS -eq 0 -a "$OS" = "linux" -o "$OS" = "bsdsunix" -o "$OS" = "freebsd" ]; then if [ $WITH_VDE -eq 1 ]; then cnf_append "VBOX_WITH_VDE" "1" fi