[3163] | 1 | #!/bin/sh
|
---|
[1] | 2 | # The purpose of this script is to check for all external tools, headers, and
|
---|
| 3 | # libraries VBox OSE depends on.
|
---|
| 4 |
|
---|
| 5 | #
|
---|
[98103] | 6 | # Copyright (C) 2006-2023 Oracle and/or its affiliates.
|
---|
[1] | 7 | #
|
---|
[96407] | 8 | # This file is part of VirtualBox base platform packages, as
|
---|
| 9 | # available from https://www.virtualbox.org.
|
---|
[1] | 10 | #
|
---|
[96407] | 11 | # This program is free software; you can redistribute it and/or
|
---|
| 12 | # modify it under the terms of the GNU General Public License
|
---|
| 13 | # as published by the Free Software Foundation, in version 3 of the
|
---|
| 14 | # License.
|
---|
| 15 | #
|
---|
| 16 | # This program is distributed in the hope that it will be useful, but
|
---|
| 17 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
| 19 | # General Public License for more details.
|
---|
| 20 | #
|
---|
| 21 | # You should have received a copy of the GNU General Public License
|
---|
| 22 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
| 23 | #
|
---|
| 24 | # SPDX-License-Identifier: GPL-3.0-only
|
---|
| 25 | #
|
---|
[1] | 26 |
|
---|
| 27 | LC_ALL=C
|
---|
| 28 | export LC_ALL
|
---|
| 29 |
|
---|
[4733] | 30 | # append some extra paths
|
---|
| 31 | PATH="$PATH:/opt/gnome/bin"
|
---|
[60754] | 32 | # Solaris (order of paths important for tr, grep, sed to work)
|
---|
| 33 | PATH="/usr/xpg4/bin:$PATH:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin"
|
---|
[5536] | 34 | ORGPATH=$PATH
|
---|
[4733] | 35 |
|
---|
[14711] | 36 | # Wrapper for ancient /usr/bin/which on darwin that always returns 0
|
---|
| 37 | which_wrapper()
|
---|
| 38 | {
|
---|
| 39 | if [ -z "$have_ancient_which" ]; then
|
---|
| 40 | if which /bin/___cErTaINly_a_nOn_eXisTing_fIle___ 2> /dev/null > /dev/null; then
|
---|
| 41 | have_ancient_which="yes"
|
---|
| 42 | else
|
---|
| 43 | have_ancient_which="no"
|
---|
| 44 | fi
|
---|
| 45 | fi
|
---|
| 46 | if [ "$have_ancient_which" = "yes" ]; then
|
---|
| 47 | retval=`which $* 2>/dev/null`
|
---|
| 48 | echo "$retval"
|
---|
| 49 | test -n "$retval" -a -x "$retval"
|
---|
| 50 | unset retval
|
---|
| 51 | else
|
---|
| 52 | which $* 2> /dev/null
|
---|
| 53 | fi
|
---|
| 54 | }
|
---|
| 55 |
|
---|
[44526] | 56 | OS=`uname -s | sed -e 's/GNU\/Linux/Linux/g' | tr '[:upper:]' '[:lower:]'`
|
---|
[20209] | 57 | case "$OS" in
|
---|
| 58 | linux)
|
---|
| 59 | ;;
|
---|
| 60 | darwin)
|
---|
| 61 | ;;
|
---|
| 62 | freebsd)
|
---|
| 63 | ;;
|
---|
[62416] | 64 | netbsd)
|
---|
| 65 | ;;
|
---|
[20209] | 66 | sunos)
|
---|
| 67 | OS='solaris'
|
---|
| 68 | ;;
|
---|
[43363] | 69 | haiku)
|
---|
| 70 | ;;
|
---|
[20209] | 71 | *)
|
---|
| 72 | echo "Cannot determine OS!"
|
---|
| 73 | exit 1
|
---|
| 74 | ;;
|
---|
| 75 | esac
|
---|
[14711] | 76 |
|
---|
[1] | 77 | #
|
---|
[1025] | 78 | # Defaults
|
---|
[1] | 79 | #
|
---|
| 80 | OSE=1
|
---|
[5041] | 81 | ODIR="`pwd`/"
|
---|
[16257] | 82 | ODIR_OVERRIDE=0
|
---|
[90118] | 83 | OUT_BASE_PATH=""
|
---|
| 84 | OUT_BASE_PATH_OVERRIDE=0
|
---|
[5041] | 85 | SETUP_WINE=
|
---|
[55347] | 86 | ONLY_ADDITIONS=0
|
---|
[3675] | 87 | TARGET_MACHINE=""
|
---|
| 88 | TARGET_CPU=""
|
---|
[1025] | 89 | WITH_XPCOM=1
|
---|
[11735] | 90 | WITH_PYTHON=1
|
---|
[30998] | 91 | WITH_JAVA=1
|
---|
[26695] | 92 | WITH_VMMRAW=1
|
---|
[1025] | 93 | WITH_LIBIDL=1
|
---|
[60537] | 94 | WITH_QT5=1
|
---|
[5239] | 95 | WITH_SDL=1
|
---|
[1038] | 96 | WITH_SDL_TTF=1
|
---|
[5239] | 97 | WITH_X11=1
|
---|
[8018] | 98 | WITH_ALSA=1
|
---|
[6101] | 99 | WITH_PULSE=1
|
---|
[14989] | 100 | WITH_DBUS=1
|
---|
[43735] | 101 | WITH_DEVMAPPER=1
|
---|
[6157] | 102 | WITH_KMODS=1
|
---|
[17912] | 103 | WITH_OPENGL=1
|
---|
[11884] | 104 | WITH_HARDENING=1
|
---|
[37199] | 105 | WITH_UDPTUNNEL=1
|
---|
[28564] | 106 | WITH_VDE=0
|
---|
[36697] | 107 | WITH_VNC=0
|
---|
[40217] | 108 | WITH_EXTPACK=1
|
---|
[31852] | 109 | WITH_DOCS=1
|
---|
[45822] | 110 | WITH_LIBVPX=1
|
---|
[97397] | 111 | WITH_LIBOGG=0
|
---|
| 112 | WITH_LIBVORBIS=0
|
---|
[91555] | 113 | WITH_LIBTPMS=1
|
---|
[20209] | 114 | BUILD_LIBXML2=
|
---|
| 115 | BUILD_LIBCURL=
|
---|
[22259] | 116 | BUILD_LIBSSL=
|
---|
[45772] | 117 | BUILD_LIBVPX=
|
---|
[91555] | 118 | BUILD_LIBTPMS=
|
---|
[26776] | 119 | PASSIVE_MESA=0
|
---|
[1] | 120 | CC="gcc"
|
---|
[3675] | 121 | CC32=""
|
---|
| 122 | CC64=""
|
---|
[1] | 123 | CXX="g++"
|
---|
[3675] | 124 | CXX32=""
|
---|
| 125 | CXX64=""
|
---|
[1] | 126 | YASM="yasm"
|
---|
| 127 | IASL="iasl"
|
---|
| 128 | XSLTPROC="xsltproc"
|
---|
[23547] | 129 | INCCRYPTO=""
|
---|
[37263] | 130 | LIBCRYPTO="-lssl -lcrypto"
|
---|
[1] | 131 | LIBPTHREAD="-lpthread"
|
---|
[15247] | 132 | LIBCAP="-lcap"
|
---|
[16139] | 133 | GSOAP=""
|
---|
[16994] | 134 | GSOAP_IMPORT=""
|
---|
[20209] | 135 | INCX11="/usr/local/include"
|
---|
[4913] | 136 | LIBX11="-L/usr/X11R6/lib -L/usr/X11R6/lib64 -L/usr/local/lib -lXext -lX11"
|
---|
[1] | 137 | LIBXCURSOR="-lXcursor"
|
---|
[17912] | 138 | LIBXMU="-lXmu"
|
---|
[27449] | 139 | LIBXINERAMA="-lXinerama"
|
---|
[27604] | 140 | LIBXRANDR="-lXrandr"
|
---|
[31639] | 141 | MAKESELF="makeself"
|
---|
[17912] | 142 | MESA="-lGL"
|
---|
[1] | 143 | INCZ=""
|
---|
| 144 | LIBZ="-lz"
|
---|
[85391] | 145 | INCLZF="/usr/include/liblzf"
|
---|
| 146 | LIBLZF="-llzf"
|
---|
[36697] | 147 | INCVNCSERVER=""
|
---|
| 148 | LIBVNCSERVER="-lvncserver"
|
---|
[43715] | 149 | INCDEVMAPPER=""
|
---|
| 150 | LIBDEVMAPPER="-ldevmapper"
|
---|
[23545] | 151 | CXX_FLAGS=""
|
---|
[20209] | 152 | if [ "$OS" = "freebsd" ]; then
|
---|
| 153 | INCCURL="-I/usr/local/include"
|
---|
| 154 | LIBCURL="-L/usr/local/lib -lcurl"
|
---|
[25819] | 155 | INCPULSE="-I/usr/local/include"
|
---|
| 156 | LIBPULSE="-L/usr/local/lib"
|
---|
[32017] | 157 | INCPNG="-I/usr/local/include"
|
---|
| 158 | LIBPNG="-L/usr/local/lib -lpng"
|
---|
[20209] | 159 | else
|
---|
| 160 | INCCURL=""
|
---|
| 161 | LIBCURL="-lcurl"
|
---|
[32017] | 162 | INCPNG=""
|
---|
| 163 | LIBPNG="-lpng"
|
---|
[20209] | 164 | fi
|
---|
[45819] | 165 | INCVPX=""
|
---|
| 166 | LIBVPX="-lvpx"
|
---|
[14711] | 167 | PKGCONFIG="`which_wrapper pkg-config`"
|
---|
[11735] | 168 | PYTHONDIR="/usr /usr/local"
|
---|
[59681] | 169 | QT5DIR="/usr/lib/qt5 /usr/share/qt5 /usr/lib64/qt5 /usr /usr/local"
|
---|
| 170 | QT5DIR_PKGCONFIG=1
|
---|
[66821] | 171 | QT5MAJ=5
|
---|
[88425] | 172 | QT5MIN=9
|
---|
[4724] | 173 | KBUILDDIR="`cd \`dirname $0\`; pwd`/kBuild"
|
---|
| 174 | DEVDIR="`cd \`dirname $0\`; pwd`/tools"
|
---|
[3163] | 175 | if [ -d "/lib/modules/`uname -r`/build" ]; then
|
---|
[57932] | 176 | LINUX="/lib/modules/`uname -r`/build"
|
---|
[57866] | 177 | elif [ "`echo /lib/modules/*`" != "/lib/modules/*" ]; then
|
---|
[57795] | 178 | # Get the most recent kernel headers if none match the current kernel.
|
---|
| 179 | for i in /lib/modules/*; do
|
---|
[57932] | 180 | if [ -r "$i/build" ]; then
|
---|
| 181 | LINUX="$i/build"
|
---|
| 182 | fi
|
---|
[57795] | 183 | done
|
---|
[57932] | 184 | fi
|
---|
| 185 | if [ -z "$LINUX" ]; then
|
---|
[1] | 186 | LINUX="/usr/src/linux"
|
---|
| 187 | fi
|
---|
| 188 | KCHMVIEWER="kchmviewer"
|
---|
| 189 | LOG="configure.log"
|
---|
| 190 | CNF="AutoConfig.kmk"
|
---|
| 191 | ENV="env.sh"
|
---|
| 192 | BUILD_TYPE="release"
|
---|
[203] | 193 | # the restricting tool is ar (mri mode).
|
---|
| 194 | INVALID_CHARS="[^A-Za-z0-9/\\$:._-]"
|
---|
[1] | 195 |
|
---|
[3163] | 196 | if (cd `dirname $0`; pwd)|grep -q "$INVALID_CHARS"; then
|
---|
[65] | 197 | echo "Error: VBox base path contains invalid characters!"
|
---|
[63] | 198 | exit 1
|
---|
| 199 | fi
|
---|
| 200 |
|
---|
[68031] | 201 | # Posix /bin/sh isn't supporting echo -n. Use printf instead.
|
---|
| 202 | ECHO_N="printf"
|
---|
[8068] | 203 |
|
---|
| 204 |
|
---|
[3163] | 205 | cleanup()
|
---|
[1] | 206 | {
|
---|
[18044] | 207 | rm -f $ODIR.tmp_src.cc $ODIR.tmp_src.c $ODIR.tmp_out $ODIR.test_execute.log
|
---|
[87614] | 208 | [ "$OS" = "darwin" ] && rm -rf $ODIR.tmp_out.dSYM
|
---|
[87615] | 209 | true
|
---|
[1] | 210 | }
|
---|
| 211 |
|
---|
[3163] | 212 | fail()
|
---|
[1] | 213 | {
|
---|
| 214 | if [ -z "$nofatal" -o "x$1" != "x" ]; then
|
---|
| 215 | cleanup
|
---|
| 216 | rm -f $ENV
|
---|
[33515] | 217 | echo "Check $LOG for details"
|
---|
[1] | 218 | exit 1
|
---|
| 219 | fi
|
---|
| 220 | }
|
---|
| 221 |
|
---|
[8461] | 222 | log()
|
---|
| 223 | {
|
---|
| 224 | echo "$1"
|
---|
| 225 | echo "$1" >> $LOG
|
---|
| 226 | }
|
---|
| 227 |
|
---|
[3163] | 228 | log_success()
|
---|
[1] | 229 | {
|
---|
[8068] | 230 | if [ -n "$1" ]; then $ECHO_N "$1, "; fi
|
---|
[1] | 231 | echo "OK."
|
---|
[3328] | 232 | echo "$1" >> $LOG
|
---|
| 233 | echo >> $LOG
|
---|
| 234 | echo >> $LOG
|
---|
[1] | 235 | }
|
---|
| 236 |
|
---|
[3163] | 237 | log_failure()
|
---|
[1] | 238 | {
|
---|
[3328] | 239 | echo
|
---|
| 240 | echo " ** $1!"
|
---|
| 241 | echo "** $1!" >> $LOG
|
---|
| 242 | echo >> $LOG
|
---|
[1] | 243 | }
|
---|
| 244 |
|
---|
[3163] | 245 | cnf_append()
|
---|
[1] | 246 | {
|
---|
[1409] | 247 | printf "%-30s := %s\n" "$1" "$2" >> $CNF
|
---|
[1] | 248 | }
|
---|
| 249 |
|
---|
[3163] | 250 | strip_l()
|
---|
[3032] | 251 | {
|
---|
[10291] | 252 | echo "$1"|$KBUILD_SED 's|-l\([^ ]\+\)|\1|g; s|^-[^l][^ ]*||g; s| -[^l][^ ]*||g; s|^ ||; s| *$||g'
|
---|
[3032] | 253 | }
|
---|
| 254 |
|
---|
[3163] | 255 | strip_L()
|
---|
[3032] | 256 | {
|
---|
[84900] | 257 | if [ "$OS" = "darwin" ]; then
|
---|
| 258 | echo "$1"|$KBUILD_SED 's|-F\([^ ]\+\)|\1|g; s|^-[^F][^ ]*||g; s| -[^F][^ ]*||g; s|^ ||; s| *$||g'
|
---|
| 259 | else
|
---|
| 260 | echo "$1"|$KBUILD_SED 's|-L\([^ ]\+\)|\1|g; s|^-[^L][^ ]*||g; s| -[^L][^ ]*||g; s|^ ||; s| *$||g'
|
---|
| 261 | fi
|
---|
[3032] | 262 | }
|
---|
| 263 |
|
---|
[79836] | 264 | L_to_PATH()
|
---|
| 265 | {
|
---|
[84900] | 266 | echo $1 >> $LOG
|
---|
| 267 | if [ "$OS" = "darwin" ]; then
|
---|
| 268 | echo "$1"|$KBUILD_SED 's|-F\([^ ]\+\)|\1|g; s|^-[^F][^ ]*||g; s| -[^F][^ ]*||g; s|^ ||; s| *$||g; s| |:|g'
|
---|
| 269 | else
|
---|
| 270 | echo "$1"|$KBUILD_SED 's|-L\([^ ]\+\)|\1|g; s|^-[^L][^ ]*||g; s| -[^L][^ ]*||g; s|^ ||; s| *$||g; s| |:|g'
|
---|
| 271 | fi
|
---|
[79836] | 272 | }
|
---|
| 273 |
|
---|
[3163] | 274 | strip_I()
|
---|
| 275 | {
|
---|
[10291] | 276 | echo "$1"|$KBUILD_SED 's|-I\([^ ]\+\)|\1|g; s|^-[^I][^ ]*||g; s| -[^I][^ ]*||g; s|^ ||; s| *$||g'
|
---|
[3163] | 277 | }
|
---|
| 278 |
|
---|
[4886] | 279 | prefix_I()
|
---|
| 280 | {
|
---|
[4889] | 281 | echo "$1"|$KBUILD_SED 's|^\/|-I/|g; s| \/| -I/|g'
|
---|
[4886] | 282 | }
|
---|
| 283 |
|
---|
[3163] | 284 | check_avail()
|
---|
[1] | 285 | {
|
---|
| 286 | if [ -z "$1" ]; then
|
---|
| 287 | log_failure "$2 is empty"
|
---|
| 288 | fail $3
|
---|
| 289 | return 1
|
---|
| 290 | elif which_wrapper $1 > /dev/null; then
|
---|
| 291 | return 0
|
---|
| 292 | else
|
---|
| 293 | log_failure "$1 (variable $2) not found"
|
---|
| 294 | fail $3
|
---|
| 295 | return 1
|
---|
| 296 | fi
|
---|
| 297 | }
|
---|
| 298 |
|
---|
[11735] | 299 |
|
---|
[1] | 300 | # Prepare a test
|
---|
[3163] | 301 | test_header()
|
---|
[1] | 302 | {
|
---|
| 303 | echo "***** Checking $1 *****" >> $LOG
|
---|
[8068] | 304 | $ECHO_N "Checking for $1: "
|
---|
[1] | 305 | }
|
---|
| 306 |
|
---|
[11735] | 307 |
|
---|
[1] | 308 | # Compile a test
|
---|
[17912] | 309 | # $1 compile flags/libs
|
---|
| 310 | # $2 library name
|
---|
| 311 | # $3 package name
|
---|
| 312 | # $4 if this argument is 'nofatal', don't abort
|
---|
[3163] | 313 | test_compile()
|
---|
[1] | 314 | {
|
---|
| 315 | echo "compiling the following source file:" >> $LOG
|
---|
[16202] | 316 | cat $ODIR.tmp_src.cc >> $LOG
|
---|
[1] | 317 | echo "using the following command line:" >> $LOG
|
---|
[84900] | 318 | echo "$CXX $CXX_FLAGS -fPIC -g -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc $1" >> $LOG
|
---|
[59681] | 319 | $CXX $CXX_FLAGS -fPIC -g -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc $1 >> $LOG 2>&1
|
---|
[3163] | 320 | if [ $? -ne 0 ]; then
|
---|
[1] | 321 | if [ -z "$4" ]; then
|
---|
[3328] | 322 | echo
|
---|
| 323 | echo " $2 not found at $1 or $3 headers not found"
|
---|
| 324 | echo " Check the file $LOG for detailed error information."
|
---|
[1] | 325 | fail
|
---|
| 326 | else
|
---|
[3328] | 327 | echo >> $LOG
|
---|
| 328 | echo >> $LOG
|
---|
[1] | 329 | fi
|
---|
| 330 | return 1
|
---|
| 331 | fi
|
---|
| 332 | return 0
|
---|
| 333 | }
|
---|
| 334 |
|
---|
[11735] | 335 |
|
---|
[1] | 336 | # Execute a compiled test binary
|
---|
[3163] | 337 | test_execute()
|
---|
[1] | 338 | {
|
---|
| 339 | echo "executing the binary" >> $LOG
|
---|
[81723] | 340 | $ODIR.tmp_out > $ODIR.test_execute.log 2>&1
|
---|
[1] | 341 | rc=$?
|
---|
[16202] | 342 | cat $ODIR.test_execute.log | tee -a $LOG
|
---|
[3163] | 343 | if [ $rc -ne 0 ]; then
|
---|
[1] | 344 | fail $1
|
---|
| 345 | return 1
|
---|
| 346 | fi
|
---|
[3328] | 347 | echo >> $LOG
|
---|
| 348 | echo >> $LOG
|
---|
[1] | 349 | return 0
|
---|
| 350 | }
|
---|
| 351 |
|
---|
[11735] | 352 |
|
---|
[10291] | 353 | # Execute a compiled test binary
|
---|
| 354 | test_execute_path()
|
---|
| 355 | {
|
---|
[57889] | 356 | ## LD_LIBRARY_PATH to set.
|
---|
| 357 | local_path="${1}"
|
---|
| 358 | ## Set this to non-empty to make this test non-fatal.
|
---|
| 359 | local_nofail="${2}"
|
---|
[84667] | 360 | echo "executing the binary (LD_LIBRARY_PATH=$1:$LD_LIBRARY_PATH)" >> $LOG
|
---|
| 361 | LD_LIBRARY_PATH="${local_path}:$LD_LIBRARY_PATH" $ODIR.tmp_out > $ODIR.test_execute.log 2>&1
|
---|
[10291] | 362 | rc=$?
|
---|
[16202] | 363 | cat $ODIR.test_execute.log | tee -a $LOG
|
---|
[10291] | 364 | if [ $rc -ne 0 ]; then
|
---|
[57889] | 365 | test -z "${local_nofail}" && fail
|
---|
| 366 | echo >> $LOG
|
---|
| 367 | echo >> $LOG
|
---|
[10291] | 368 | return 1
|
---|
| 369 | fi
|
---|
| 370 | echo >> $LOG
|
---|
| 371 | echo >> $LOG
|
---|
| 372 | return 0
|
---|
| 373 | }
|
---|
| 374 |
|
---|
[11735] | 375 |
|
---|
[1] | 376 | #
|
---|
| 377 | # Check for OS, MACHINE, CPU
|
---|
| 378 | #
|
---|
[3163] | 379 | check_environment()
|
---|
[1] | 380 | {
|
---|
| 381 | test_header environment
|
---|
[3675] | 382 | BUILD_CPU=`uname -m`
|
---|
[5533] | 383 | [ "$OS" = "solaris" ] && BUILD_CPU=`isainfo | cut -f 1 -d ' '`
|
---|
[3675] | 384 | case "$BUILD_CPU" in
|
---|
[43363] | 385 | i[3456789]86|x86|i86pc|BePC)
|
---|
[3675] | 386 | BUILD_MACHINE='x86'
|
---|
[2571] | 387 | LIB='lib'
|
---|
[1] | 388 | ;;
|
---|
| 389 | x86_64|amd64)
|
---|
[3675] | 390 | BUILD_MACHINE='amd64'
|
---|
[84934] | 391 | BUILD_CPU='blend'
|
---|
[5534] | 392 | if [ "$OS" != "solaris" ]; then
|
---|
| 393 | # on AMD64 systems, 64bit libs are usually located in /usr/lib64
|
---|
| 394 | # see http://www.pathname.com/fhs/pub/fhs-2.3.html#LIB64
|
---|
| 395 | LIB='lib64'
|
---|
| 396 | else
|
---|
[9133] | 397 | # Solaris doesn't seem to subscribe to fhs, libs are usually in
|
---|
| 398 | # a '64' subdirectory of the standard 'lib' dirs while some 64-bit
|
---|
[5534] | 399 | # alternative binaries can be found in 'amd64' subdirs of the 'bin'
|
---|
| 400 | # ones. So, in order to find the right stuff (esp. sdl-config) we'll
|
---|
| 401 | # have to make sure the */bin/amd64 dirs are searched before the */bin
|
---|
| 402 | # ones. (The sed has some sideeffects, but they shouldn't harm us...)
|
---|
| 403 | echo "64-bit Solaris detected, hacking the PATH" >> $LOG
|
---|
| 404 | echo "old PATH: $PATH" >> $LOG
|
---|
| 405 | PATH=`echo ":$PATH:" | sed -e 's,\(:[^:]*/bin\):,\1/amd64:\1:,g' \
|
---|
| 406 | -e 's/^:*//' -e 's/:*$//g' -e 's/::*/:/g' `
|
---|
| 407 | export PATH
|
---|
| 408 | echo "new PATH: $PATH" >> $LOG
|
---|
| 409 | LIB='lib/64'
|
---|
| 410 | fi
|
---|
[1] | 411 | ;;
|
---|
[71337] | 412 | sparc64|sparcv9)
|
---|
| 413 | BUILD_MACHINE='sparc64'
|
---|
| 414 | BUILD_CPU='blend'
|
---|
| 415 | ;;
|
---|
| 416 | sparc32|sparc|sparcv8|sparcv7|sparcv8e)
|
---|
| 417 | BUILD_MACHINE='sparc32'
|
---|
| 418 | BUILD_CPU='blend'
|
---|
| 419 | ;;
|
---|
[1] | 420 | *)
|
---|
| 421 | log_failure "Cannot determine system"
|
---|
| 422 | exit 1
|
---|
| 423 | ;;
|
---|
| 424 | esac
|
---|
[3675] | 425 | [ -z "$TARGET_MACHINE" ] && TARGET_MACHINE=$BUILD_MACHINE
|
---|
| 426 | [ -z "$TARGET_CPU" ] && TARGET_CPU=$BUILD_CPU
|
---|
| 427 | DEVDIR_BIN="$DEVDIR/$OS.$BUILD_MACHINE/bin"
|
---|
| 428 | log_success "Determined build machine: $OS.$BUILD_MACHINE, target machine: $OS.$TARGET_MACHINE"
|
---|
[2374] | 429 |
|
---|
[84934] | 430 | echo "KBUILD_HOST=\"$OS\"" >> $ENV
|
---|
| 431 | echo "KBUILD_HOST_ARCH=\"$BUILD_MACHINE\"" >> $ENV
|
---|
| 432 | echo "KBUILD_TARGET=\"$OS\"" >> $ENV
|
---|
| 433 | echo "KBUILD_TARGET_ARCH=\"$TARGET_MACHINE\"" >> $ENV
|
---|
| 434 | echo "KBUILD_TARGET_CPU=\"$TARGET_CPU\"" >> $ENV
|
---|
| 435 | echo "KBUILD_TYPE=\"$BUILD_TYPE\"" >> $ENV
|
---|
| 436 | echo 'export KBUILD_HOST KBUILD_HOST_ARCH KBUILD_TARGET KBUILD_TARGET_ARCH KBUILD_TARGET_CPU KBUILD_TYPE' >> $ENV
|
---|
| 437 |
|
---|
| 438 | # obsolete legacy stuff:
|
---|
| 439 | echo '' >> $ENV
|
---|
| 440 | echo "# Legacy - do not use:" >> $ENV
|
---|
| 441 | echo 'BUILD_PLATFORM="$KBUILD_HOST"' >> $ENV
|
---|
| 442 | echo 'BUILD_PLATFORM_ARCH="$KBUILD_HOST_ARCH"' >> $ENV
|
---|
| 443 | echo 'BUILD_TARGET="$KBUILD_TARGET"' >> $ENV
|
---|
| 444 | echo 'BUILD_TARGET_ARCH="$KBUILD_TARGET_ARCH"' >> $ENV
|
---|
| 445 | echo 'BUILD_TARGET_CPU="$KBUILD_TARGET_CPU"' >> $ENV
|
---|
| 446 | echo 'BUILD_TYPE="$KBUILD_TYPE"' >> $ENV
|
---|
| 447 | echo 'export BUILD_PLATFORM BUILD_PLATFORM_ARCH BUILD_TARGET BUILD_TARGET_ARCH BUILD_TARGET_CPU BUILD_TYPE' >> $ENV
|
---|
| 448 | echo '' >> $ENV
|
---|
[1] | 449 | }
|
---|
| 450 |
|
---|
| 451 | #
|
---|
| 452 | # Check for gcc with version >= 3.2.
|
---|
| 453 | # We depend on a working gcc, if we fail terminate in every case.
|
---|
| 454 | #
|
---|
[3163] | 455 | check_gcc()
|
---|
[1] | 456 | {
|
---|
| 457 | test_header gcc
|
---|
| 458 | if check_avail "$CC" CC really; then
|
---|
[68274] | 459 | cc_ver=`$CC -dumpfullversion 2>/dev/null`
|
---|
[8461] | 460 | if [ $? -ne 0 ]; then
|
---|
[68274] | 461 | cc_ver=`$CC -dumpversion 2>/dev/null`
|
---|
[66931] | 462 | fi
|
---|
| 463 | if [ $? -ne 0 ]; then
|
---|
[8461] | 464 | log_failure "cannot execute '$CC -dumpversion'"
|
---|
| 465 | fail really
|
---|
| 466 | fi
|
---|
[1] | 467 | if check_avail "$CXX" CXX really; then
|
---|
[68274] | 468 | cxx_ver=`$CXX -dumpfullversion 2>/dev/null`
|
---|
[8461] | 469 | if [ $? -ne 0 ]; then
|
---|
[68274] | 470 | cxx_ver=`$CXX -dumpversion 2>/dev/null`
|
---|
[66931] | 471 | fi
|
---|
| 472 | if [ $? -ne 0 ]; then
|
---|
[8461] | 473 | log_failure "cannot execute '$CXX -dumpversion'"
|
---|
| 474 | fail really
|
---|
| 475 | fi
|
---|
[1] | 476 | cc_maj=`echo $cc_ver|cut -d. -f1`
|
---|
| 477 | cc_min=`echo $cc_ver|cut -d. -f2`
|
---|
| 478 | if [ "x$cc_ver" != "x$cxx_ver" ]; then
|
---|
| 479 | log_failure "gcc version $cc_ver does not match g++ version $cxx_ver"
|
---|
| 480 | fail really
|
---|
[20209] | 481 | elif [ $cc_maj -eq 4 -a $cc_min -eq 0 -a "$OS" = "darwin" ]; then
|
---|
[8461] | 482 | log_success "found version $cc_ver"
|
---|
[9196] | 483 | # gcc-4.0 is allowed for Darwin only
|
---|
[77135] | 484 | elif [ $cc_maj -eq 4 -a $cc_min -eq 2 -a "$OS" = "freebsd" ]; then
|
---|
| 485 | log_success "found version $cc_ver"
|
---|
| 486 | # gcc-4.2 is allowed for FreeBSD only
|
---|
[62303] | 487 | elif [ $cc_maj -lt 4 \
|
---|
| 488 | -o \( $cc_maj -eq 4 -a $cc_min -lt 4 -a "$OS" != "darwin" \) \
|
---|
[73343] | 489 | -o \( $cc_maj -eq 4 -a $cc_min -lt 2 -a "$OS" = "darwin" \) ]; then
|
---|
| 490 | log_failure "gcc version $cc_maj.$cc_min found, expected gcc 4.x or later"
|
---|
[1] | 491 | fail really
|
---|
| 492 | else
|
---|
| 493 | log_success "found version $cc_ver"
|
---|
| 494 | fi
|
---|
[3675] | 495 | if [ "$BUILD_MACHINE" = "amd64" ]; then
|
---|
| 496 | [ -z "$CC32" ] && CC32="$CC -m32"
|
---|
| 497 | [ -z "$CXX32" ] && CXX32="$CXX -m32"
|
---|
| 498 | else
|
---|
| 499 | [ -z "$CC32" ] && CC32="$CC"
|
---|
| 500 | [ -z "$CXX32" ] && CXX32="$CXX"
|
---|
| 501 | fi
|
---|
| 502 | if [ "$BUILD_MACHINE" = "x86" -a "$TARGET_MACHINE" = "amd64" ]; then
|
---|
[5366] | 503 | [ -z "$CC64" ] && CC64="$CC -m64"
|
---|
| 504 | [ -z "$CXX64" ] && CXX64="$CXX -m64"
|
---|
[3675] | 505 | fi
|
---|
[26695] | 506 | if [ "$TARGET_MACHINE" = "amd64" -a $WITH_VMMRAW -eq 0 ]; then
|
---|
| 507 | CC32="undefined"
|
---|
| 508 | CXX32="undefined"
|
---|
| 509 | fi
|
---|
[1] | 510 | if [ "$CC" != "gcc" ]; then
|
---|
[3675] | 511 | cnf_append "TOOL_GCC3_CC" "$CC"
|
---|
| 512 | cnf_append "TOOL_GCC3_AS" "$CC"
|
---|
| 513 | cnf_append "TOOL_GCC3_LD" "$CC"
|
---|
| 514 | cnf_append "TOOL_GXX3_CC" "$CC"
|
---|
| 515 | cnf_append "TOOL_GXX3_AS" "$CC"
|
---|
[1] | 516 | fi
|
---|
| 517 | if [ "$CXX" != "g++" ]; then
|
---|
[3675] | 518 | cnf_append "TOOL_GCC3_CXX" "$CXX"
|
---|
| 519 | cnf_append "TOOL_GXX3_CXX" "$CXX"
|
---|
| 520 | cnf_append "TOOL_GXX3_LD" "$CXX"
|
---|
[1] | 521 | fi
|
---|
[26695] | 522 | if [ "$CC32" != "gcc -m32" -a "$CC32" != "undefined" ]; then
|
---|
[3675] | 523 | cnf_append "TOOL_GCC32_CC" "$CC32"
|
---|
| 524 | cnf_append "TOOL_GCC32_AS" "$CC32"
|
---|
| 525 | cnf_append "TOOL_GCC32_LD" "$CC32"
|
---|
| 526 | cnf_append "TOOL_GXX32_CC" "$CC32"
|
---|
| 527 | cnf_append "TOOL_GXX32_AS" "$CC32"
|
---|
| 528 | fi
|
---|
[26695] | 529 | if [ "$CXX32" != "g++ -m32" -a "$CXX32" != "undefined" ]; then
|
---|
[3675] | 530 | cnf_append "TOOL_GCC32_CXX" "$CXX32"
|
---|
| 531 | cnf_append "TOOL_GXX32_CXX" "$CXX32"
|
---|
| 532 | cnf_append "TOOL_GXX32_LD" "$CXX32"
|
---|
| 533 | fi
|
---|
[5533] | 534 | # this isn't not necessary, there is not such tool.
|
---|
[3675] | 535 | if [ -n "$CC64" ]; then
|
---|
| 536 | cnf_append "TOOL_GCC64_CC" "$CC64"
|
---|
| 537 | cnf_append "TOOL_GCC64_AS" "$CC64"
|
---|
| 538 | cnf_append "TOOL_GCC64_LD" "$CC64"
|
---|
| 539 | cnf_append "TOOL_GXX64_CC" "$CC64"
|
---|
| 540 | cnf_append "TOOL_GXX64_AS" "$CC64"
|
---|
| 541 | fi
|
---|
| 542 | if [ -n "$CXX64" ]; then
|
---|
| 543 | cnf_append "TOOL_GCC64_CXX" "$CXX64"
|
---|
| 544 | cnf_append "TOOL_GXX64_CXX" "$CXX64"
|
---|
| 545 | cnf_append "TOOL_GXX64_LD" "$CXX64"
|
---|
| 546 | fi
|
---|
[67153] | 547 | if [ "$CC" != "gcc" ]; then
|
---|
| 548 | if [ -n "$CC64" ]; then
|
---|
| 549 | cnf_append "TOOL_Bs3Gcc64Elf64_CC" "$CC64"
|
---|
| 550 | else
|
---|
| 551 | cnf_append "TOOL_Bs3Gcc64Elf64_CC" "$CC"
|
---|
| 552 | fi
|
---|
| 553 | if [ -n "$CXX64" ]; then
|
---|
| 554 | cnf_append "TOOL_Bs3Gcc64Elf64_CXX" "$CXX64"
|
---|
| 555 | else
|
---|
| 556 | cnf_append "TOOL_Bs3Gcc64Elf64_CXX" "$CXX"
|
---|
| 557 | fi
|
---|
| 558 | fi
|
---|
[5533] | 559 | # Solaris sports a 32-bit gcc/g++.
|
---|
| 560 | if [ "$OS" = "solaris" -a "$BUILD_MACHINE" = "amd64" ]; then
|
---|
| 561 | [ "$CC" = "gcc" ] && CC="gcc -m64"
|
---|
| 562 | [ "$CXX" = "g++" ] && CXX="g++ -m64"
|
---|
[9133] | 563 | fi
|
---|
[1] | 564 | fi
|
---|
| 565 | fi
|
---|
| 566 | }
|
---|
| 567 |
|
---|
[11735] | 568 |
|
---|
[1] | 569 | #
|
---|
[41518] | 570 | # Check for the OpenWatcom compiler, needed for compiling the BIOS
|
---|
| 571 | #
|
---|
| 572 | # If the system has Open Watcom installed, WATCOM will be set in the
|
---|
| 573 | # environment. If the user has her/his own Open Watcom install it will be
|
---|
| 574 | # pointed to by on the command line, which will set the WATCOM variable.
|
---|
| 575 | # The only exception is detecting OpenWatcom in tools/common/openwatcom.
|
---|
| 576 | #
|
---|
| 577 | check_open_watcom()
|
---|
| 578 | {
|
---|
| 579 | test_header "Open Watcom"
|
---|
| 580 |
|
---|
| 581 | if [ -z "$WATCOM" ]; then
|
---|
[90355] | 582 | WATCOM=`/bin/ls -rd1 $DEVDIR/common/openwatcom/* 2> /dev/null | head -1`
|
---|
[41518] | 583 | if [ -z "$WATCOM" ]; then
|
---|
[67684] | 584 | if [ $OSE -eq 0 -a $OS = "linux" ]; then
|
---|
| 585 | log_failure "Open Watcom was not found"
|
---|
| 586 | exit 1
|
---|
| 587 | fi
|
---|
| 588 | log_failure "Open Watcom was not found, using alternative BIOS sources"
|
---|
[41518] | 589 | cnf_append "VBOX_WITH_OPEN_WATCOM" ""
|
---|
| 590 | return 0;
|
---|
| 591 | fi
|
---|
| 592 | fi
|
---|
| 593 |
|
---|
| 594 | case "$OS" in
|
---|
| 595 | "darwin") wc_bin="binosx";; # ??
|
---|
| 596 | "dos") wc_bin="binw";;
|
---|
| 597 | "freebsd") wc_bin="binfbsd";; # ??
|
---|
| 598 | "linux") wc_bin="binl";;
|
---|
[62416] | 599 | "netbsd") wc_bin="binnbsd";; # ??
|
---|
[41518] | 600 | "solaris") wc_bin="binsol";; # ??
|
---|
| 601 | "os2") wc_bin="binp";;
|
---|
| 602 | "win") wc_bin="binnt";;
|
---|
| 603 | *) wc_bin="binl";;
|
---|
| 604 | esac
|
---|
| 605 |
|
---|
| 606 | # Check that the tools we use are there.
|
---|
| 607 | for prog in wasm wcc wlink;
|
---|
| 608 | do
|
---|
| 609 | if [ ! -f "$WATCOM/$wc_bin/$prog" ]; then
|
---|
| 610 | log_failure "$WATCOM/$wc_bin/$prog does not exist or is not a regular file."
|
---|
| 611 | fail
|
---|
| 612 | fi
|
---|
| 613 | done
|
---|
| 614 |
|
---|
| 615 | # Use WASM to get the version.
|
---|
| 616 | wasm_ver=`$WATCOM/$wc_bin/wasm -? 2>&1 | sed -e '1!d' -e 's/Open Watcom Assembler Version *//'`
|
---|
| 617 | if [ -z "$wasm_ver" ]; then
|
---|
| 618 | log_failure "$WATCOM/$wc_bin/wasm -? did not produce the expected response"
|
---|
| 619 | fail
|
---|
| 620 | fi
|
---|
| 621 | log_success "found version $wasm_ver"
|
---|
| 622 | cnf_append "PATH_TOOL_OPENWATCOM" "$WATCOM"
|
---|
| 623 | cnf_append "VBOX_WITH_OPEN_WATCOM" "1"
|
---|
| 624 |
|
---|
| 625 | unset wasm_ver
|
---|
| 626 | unset wc_wasm
|
---|
| 627 | unset wc_bin
|
---|
| 628 | }
|
---|
| 629 |
|
---|
| 630 |
|
---|
| 631 | #
|
---|
[1] | 632 | # Check for yasm, needed to compile assembler files
|
---|
| 633 | #
|
---|
[3163] | 634 | check_yasm()
|
---|
[1] | 635 | {
|
---|
| 636 | test_header yasm
|
---|
| 637 | if check_avail "$YASM" YASM; then
|
---|
| 638 | yasm_ver=`$YASM --version|grep "^yasm"|sed 's+^yasm \(.*\)+\1+'`
|
---|
[3163] | 639 | if [ $? -ne 0 ]; then
|
---|
[33515] | 640 | log_failure "yasm not found"
|
---|
[1] | 641 | fail
|
---|
| 642 | else
|
---|
| 643 | yasm_maj=`echo $yasm_ver|cut -d. -f1`
|
---|
| 644 | yasm_min=`echo $yasm_ver|cut -d. -f2`
|
---|
| 645 | yasm_rev=`echo $yasm_ver|cut -d. -f3`
|
---|
[4726] | 646 | yasm_ver_mul=`expr $yasm_maj \* 10000 + $yasm_min \* 100 + $yasm_rev`
|
---|
[87584] | 647 | if [ $yasm_ver_mul -lt 10300 ]; then
|
---|
| 648 | log_failure "found version $yasm_ver, expected at least 1.3.0"
|
---|
[1] | 649 | fail
|
---|
| 650 | else
|
---|
[87614] | 651 | [ "$YASM" != "yasm" ] && cnf_append "PATH_TOOL_YASM" "`dirname $YASM`"
|
---|
[1] | 652 | log_success "found version $yasm_ver"
|
---|
| 653 | fi
|
---|
| 654 | fi
|
---|
| 655 | fi
|
---|
| 656 | }
|
---|
| 657 |
|
---|
[11735] | 658 |
|
---|
[1] | 659 | #
|
---|
| 660 | # Check for the iasl ACPI compiler, needed to compile vbox.dsl
|
---|
| 661 | #
|
---|
[3163] | 662 | check_iasl()
|
---|
[1] | 663 | {
|
---|
| 664 | test_header iasl
|
---|
| 665 | if check_avail "$IASL" IASL; then
|
---|
[48114] | 666 | iasl_ver=`$IASL|grep "ASL.*version"|sed 's+^ASL.*version \([0-9]*\).*+\1+'`
|
---|
[3163] | 667 | if [ $? -ne 0 ]; then
|
---|
[33515] | 668 | log_failure "iasl not found"
|
---|
[1] | 669 | fail
|
---|
| 670 | else
|
---|
| 671 | log_success "found version $iasl_ver"
|
---|
[802] | 672 | cnf_append "VBOX_IASLCMD" "`which_wrapper $IASL`"
|
---|
[1] | 673 | fi
|
---|
| 674 | fi
|
---|
| 675 | }
|
---|
| 676 |
|
---|
[11735] | 677 |
|
---|
[1] | 678 | #
|
---|
| 679 | # Check for xsltproc, needed by Main
|
---|
| 680 | #
|
---|
[3163] | 681 | check_xsltproc()
|
---|
[1] | 682 | {
|
---|
[43363] | 683 | if [ -n "$BUILD_LIBXSLT" ]; then
|
---|
| 684 | return 0;
|
---|
| 685 | fi
|
---|
[1] | 686 | test_header xslt
|
---|
| 687 | if check_avail "$XSLTPROC" XSLTPROC; then
|
---|
| 688 | xsltproc_ver=`$XSLTPROC --version`
|
---|
[3163] | 689 | if [ $? -ne 0 ]; then
|
---|
[33515] | 690 | log_failure "xsltproc not found"
|
---|
[1] | 691 | fail
|
---|
| 692 | else
|
---|
| 693 | log_success "found"
|
---|
[802] | 694 | cnf_append "VBOX_XSLTPROC" "`which_wrapper $XSLTPROC`"
|
---|
[1] | 695 | fi
|
---|
| 696 | fi
|
---|
| 697 | }
|
---|
| 698 |
|
---|
[11735] | 699 |
|
---|
[1] | 700 | #
|
---|
[74653] | 701 | # Check for libxml2, needed by the Runtime.
|
---|
[7393] | 702 | # 2.6.24 is known to NOT work, 2.6.26 is known to work (there is no 2.6.25 release)
|
---|
[1] | 703 | #
|
---|
[6060] | 704 | check_libxml2()
|
---|
| 705 | {
|
---|
[6098] | 706 | if [ -z "$BUILD_LIBXML2" ]; then
|
---|
| 707 | test_header libxml2
|
---|
| 708 | if which_wrapper pkg-config > /dev/null; then
|
---|
| 709 | libxml2_ver=`pkg-config libxml-2.0 --modversion 2>> $LOG`
|
---|
| 710 | if [ $? -ne 0 ]; then
|
---|
[33515] | 711 | log_failure "libxml2 not found"
|
---|
[6098] | 712 | fail
|
---|
| 713 | else
|
---|
| 714 | FLGXML2=`pkg-config libxml-2.0 --cflags`
|
---|
| 715 | INCXML2=`strip_I "$FLGXML2"`
|
---|
| 716 | LIBXML2=`pkg-config libxml-2.0 --libs`
|
---|
[16202] | 717 | cat > $ODIR.tmp_src.cc << EOF
|
---|
[6097] | 718 | #include <cstdio>
|
---|
| 719 | #include <libxml/xmlversion.h>
|
---|
| 720 | extern "C" int main(void)
|
---|
| 721 | {
|
---|
| 722 | printf("found version %s", LIBXML_DOTTED_VERSION);
|
---|
[6500] | 723 | #if LIBXML_VERSION >= 20626
|
---|
[6097] | 724 | printf(", OK.\n");
|
---|
| 725 | return 0;
|
---|
| 726 | #else
|
---|
[6500] | 727 | printf(", expected version 2.6.26 or higher\n");
|
---|
[6097] | 728 | return 1;
|
---|
| 729 | #endif
|
---|
| 730 | }
|
---|
| 731 | EOF
|
---|
[6098] | 732 | [ -n "$INCXML2" ] && I_INCXML2=`prefix_I "$INCXML2"`
|
---|
| 733 | if test_compile "$LIBXML2 $LIBPTHREAD $I_INCXML2" xml2 xml2; then
|
---|
| 734 | if test_execute; then
|
---|
[74653] | 735 | cnf_append "SDK_VBOX_LIBXML2_DEFS" "_REENTRANT" ## @todo get defines from --cflags
|
---|
[6098] | 736 | cnf_append "SDK_VBOX_LIBXML2_INCS" "$INCXML2"
|
---|
| 737 | cnf_append "SDK_VBOX_LIBXML2_LIBS" "`strip_l "$LIBXML2"`"
|
---|
| 738 | fi
|
---|
[6097] | 739 | fi
|
---|
| 740 | fi
|
---|
[6098] | 741 | elif which_wrapper xml2-config; then
|
---|
| 742 | libxml2_ver=`xml2-config --version`
|
---|
| 743 | if [ $? -ne 0 ]; then
|
---|
[33515] | 744 | log_failure "xml2-config not found"
|
---|
[6098] | 745 | fail
|
---|
| 746 | else
|
---|
| 747 | log_success "found version $libxml2_ver"
|
---|
| 748 | FLGXML2=`xml2-config --cflags`
|
---|
| 749 | INCXML2=`strip_I "$FLGXML2"`
|
---|
| 750 | LIBXML2=`xml2-config --libs`
|
---|
[16202] | 751 | cat > $ODIR.tmp_src.cc << EOF
|
---|
[6097] | 752 | #include <cstdio>
|
---|
| 753 | #include <libxml/xmlversion.h>
|
---|
| 754 | extern "C" int main(void)
|
---|
| 755 | {
|
---|
| 756 | printf("found version %s", LIBXML_DOTTED_VERSION);
|
---|
[6500] | 757 | #if LIBXML_VERSION >= 20626
|
---|
[6097] | 758 | printf(", OK.\n");
|
---|
| 759 | return 0;
|
---|
| 760 | #else
|
---|
[6500] | 761 | printf(", expected version 2.6.26 or higher\n");
|
---|
[6097] | 762 | return 1;
|
---|
| 763 | #endif
|
---|
| 764 | }
|
---|
| 765 | EOF
|
---|
[6098] | 766 | [ -n "$INCXML2" ] && I_INCXML2=`prefix_I "$INCXML2"`
|
---|
| 767 | if test_compile "$LIBXML2 $LIBPTHREAD $I_INCXML2" xml2 xml2; then
|
---|
| 768 | if test_execute; then
|
---|
[74653] | 769 | cnf_append "SDK_VBOX_LIBXML2_DEFS" "_REENTRANT" ## @todo get defines from --cflags
|
---|
[6098] | 770 | cnf_append "SDK_VBOX_LIBXML2_INCS" "$INCXML2"
|
---|
| 771 | cnf_append "SDK_VBOX_LIBXML2_LIBS" "`strip_l "$LIBXML2"`"
|
---|
| 772 | fi
|
---|
[6097] | 773 | fi
|
---|
| 774 | fi
|
---|
[6098] | 775 | else
|
---|
| 776 | log_failure "neither pkg-config nor xml2-config found"
|
---|
| 777 | fail
|
---|
[6060] | 778 | fi
|
---|
| 779 | fi
|
---|
| 780 | }
|
---|
| 781 |
|
---|
[11735] | 782 |
|
---|
[6060] | 783 | #
|
---|
[1] | 784 | # Check for libIDL, needed by xpcom
|
---|
| 785 | #
|
---|
| 786 | check_libidl()
|
---|
| 787 | {
|
---|
| 788 | test_header libIDL
|
---|
[24] | 789 |
|
---|
[802] | 790 | if which_wrapper libIDL-config-2 > /dev/null; then
|
---|
[1] | 791 | libidl_ver=`libIDL-config-2 --version`
|
---|
[3163] | 792 | if [ $? -ne 0 ]; then
|
---|
[33515] | 793 | log_failure "libIDL-config-2 not working"
|
---|
[1] | 794 | fail
|
---|
| 795 | else
|
---|
| 796 | log_success "found version $libidl_ver"
|
---|
[921] | 797 | cnf_append "VBOX_LIBIDL_CONFIG" \
|
---|
[2571] | 798 | "PKG_CONFIG_PATH=`libIDL-config-2 --prefix`/$LIB/pkgconfig `which_wrapper libIDL-config-2`"
|
---|
[1] | 799 | fi
|
---|
| 800 | elif check_avail "libIDL-config" libIDL-config; then
|
---|
| 801 | libidl_ver=`libIDL-config --version`
|
---|
[3163] | 802 | if [ $? -ne 0 ]; then
|
---|
[33515] | 803 | log_failure "libIDL-config not working"
|
---|
[1] | 804 | fail
|
---|
| 805 | else
|
---|
| 806 | log_success "found version $libidl_ver"
|
---|
[2926] | 807 | cnf_append "VBOX_LIBIDL_CONFIG" "`which_wrapper libIDL-config`"
|
---|
[1] | 808 | fi
|
---|
| 809 | fi
|
---|
| 810 | }
|
---|
| 811 |
|
---|
[11735] | 812 |
|
---|
[1] | 813 | #
|
---|
[43715] | 814 | # Check for libdevmapper, needed by the VBoxVolInfo
|
---|
| 815 | #
|
---|
| 816 | check_libdevmapper()
|
---|
| 817 | {
|
---|
| 818 | test_header libdevmapper
|
---|
| 819 | cat > $ODIR.tmp_src.cc << EOF
|
---|
| 820 | #include <cstdio>
|
---|
| 821 | extern "C" {
|
---|
| 822 | #define private
|
---|
| 823 | #include <libdevmapper.h>
|
---|
| 824 | int main()
|
---|
| 825 | {
|
---|
| 826 | char version[80];
|
---|
| 827 |
|
---|
| 828 | if (!dm_get_library_version(version, sizeof(version)))
|
---|
| 829 | {
|
---|
| 830 | printf("dm_get_library_version() failed.\n");
|
---|
| 831 | return 1;
|
---|
| 832 | }
|
---|
| 833 |
|
---|
| 834 | const char* v=version;
|
---|
| 835 | unsigned int major = 0, minor = 0, micro = 0;
|
---|
| 836 |
|
---|
| 837 | for (; *v !='.' && *v != '\0'; v++) major = major*10 + *v-'0';
|
---|
| 838 | if (*v == '.') v++;
|
---|
| 839 | for (; *v !='.' && *v != '\0'; v++) minor = minor*10 + *v-'0';
|
---|
| 840 | if (*v == '.') v++;
|
---|
| 841 | for (; *v !='.' && *v != '\0'; v++) micro = micro*10 + *v-'0';
|
---|
| 842 |
|
---|
| 843 | printf("found version %s", version);
|
---|
| 844 | if (major*10000 + minor*100 + micro >= 10200)
|
---|
| 845 | {
|
---|
| 846 | printf(", OK.\n");
|
---|
| 847 | return 0;
|
---|
| 848 | }
|
---|
| 849 | else
|
---|
| 850 | {
|
---|
| 851 | printf(", expected version 1.02 or higher\n");
|
---|
| 852 | return 1;
|
---|
| 853 | }
|
---|
| 854 | }
|
---|
| 855 | }
|
---|
| 856 | EOF
|
---|
| 857 | if test_compile "$LIBDEVMAPPER $INCDEVMAPPER" libdevmapper libdevmapper; then
|
---|
| 858 | if test_execute; then
|
---|
| 859 | cnf_append "VBOX_WITH_DEVMAPPER" "1"
|
---|
| 860 | fi
|
---|
| 861 | fi
|
---|
| 862 | }
|
---|
| 863 |
|
---|
| 864 |
|
---|
| 865 | #
|
---|
[20030] | 866 | # Check for openssl, needed for RDP and S3
|
---|
[1] | 867 | #
|
---|
[3163] | 868 | check_ssl()
|
---|
[1] | 869 | {
|
---|
[22259] | 870 | if [ -z "$BUILD_LIBSSL" ]; then
|
---|
| 871 | test_header ssl
|
---|
| 872 | cat > $ODIR.tmp_src.cc << EOF
|
---|
[1] | 873 | #include <cstdio>
|
---|
| 874 | #include <openssl/opensslv.h>
|
---|
[37260] | 875 | #include <openssl/ssl.h>
|
---|
[1] | 876 | extern "C" int main(void)
|
---|
| 877 | {
|
---|
| 878 | printf("found version %s", OPENSSL_VERSION_TEXT);
|
---|
[37260] | 879 | SSL_library_init();
|
---|
[74325] | 880 | #if OPENSSL_VERSION_NUMBER >= 0x10001000
|
---|
[1] | 881 | printf(", OK.\n");
|
---|
| 882 | return 0;
|
---|
| 883 | #else
|
---|
[74325] | 884 | printf(", expected version 1.0.1 or higher\n");
|
---|
[1] | 885 | return 1;
|
---|
| 886 | #endif
|
---|
| 887 | }
|
---|
[3163] | 888 | EOF
|
---|
[23547] | 889 | if test_compile "$INCCRYPTO $LIBCRYPTO" libcrypto openssl; then
|
---|
[22259] | 890 | if test_execute nofatal; then
|
---|
[23547] | 891 | cnf_append "SDK_VBOX_OPENSSL_INCS" "`strip_I "$INCCRYPTO"`"
|
---|
[22259] | 892 | cnf_append "SDK_VBOX_OPENSSL_LIBS" "`strip_l "$LIBCRYPTO"`"
|
---|
[34466] | 893 | cnf_append "SDK_VBOX_BLD_OPENSSL_LIBS" "`strip_l "$LIBCRYPTO"`"
|
---|
[22259] | 894 | fi
|
---|
[1] | 895 | fi
|
---|
| 896 | fi
|
---|
| 897 | }
|
---|
| 898 |
|
---|
[11735] | 899 |
|
---|
[1] | 900 | #
|
---|
| 901 | # Check for pthread, needed by VBoxSVC, frontends, ...
|
---|
| 902 | #
|
---|
[3163] | 903 | check_pthread()
|
---|
[1] | 904 | {
|
---|
| 905 | test_header pthread
|
---|
[16202] | 906 | cat > $ODIR.tmp_src.cc << EOF
|
---|
[1] | 907 | #include <cstdio>
|
---|
| 908 | #include <pthread.h>
|
---|
| 909 | extern "C" int main(void)
|
---|
| 910 | {
|
---|
| 911 | pthread_mutex_t mutex;
|
---|
| 912 | if (pthread_mutex_init(&mutex, NULL)) {
|
---|
| 913 | printf("pthread_mutex_init() failed\n");
|
---|
| 914 | return 1;
|
---|
| 915 | }
|
---|
| 916 | if (pthread_mutex_lock(&mutex)) {
|
---|
| 917 | printf("pthread_mutex_lock() failed\n");
|
---|
| 918 | return 1;
|
---|
| 919 | }
|
---|
| 920 | if (pthread_mutex_unlock(&mutex)) {
|
---|
| 921 | printf("pthread_mutex_unlock() failed\n");
|
---|
| 922 | return 1;
|
---|
| 923 | }
|
---|
| 924 | printf("found, OK.\n");
|
---|
| 925 | }
|
---|
[3163] | 926 | EOF
|
---|
[1] | 927 | if test_compile $LIBPTHREAD pthread pthread; then
|
---|
| 928 | if test_execute; then
|
---|
[3163] | 929 | cnf_append "LIB_PTHREAD" "`strip_l "$LIBPTHREAD"`"
|
---|
[1] | 930 | fi
|
---|
| 931 | fi
|
---|
| 932 | }
|
---|
| 933 |
|
---|
[11735] | 934 |
|
---|
[1] | 935 | #
|
---|
| 936 | # Check for zlib, needed by VBoxSVC, Runtime, ...
|
---|
| 937 | #
|
---|
[3163] | 938 | check_z()
|
---|
[1] | 939 | {
|
---|
| 940 | test_header zlib
|
---|
[16202] | 941 | cat > $ODIR.tmp_src.cc << EOF
|
---|
[1] | 942 | #include <cstdio>
|
---|
| 943 | #include <zlib.h>
|
---|
| 944 | extern "C" int main(void)
|
---|
| 945 | {
|
---|
| 946 | printf("found version %s", ZLIB_VERSION);
|
---|
| 947 | #if ZLIB_VERNUM >= 0x1210
|
---|
| 948 | printf(", OK.\n");
|
---|
| 949 | return 0;
|
---|
| 950 | #else
|
---|
| 951 | printf(", expected version 1.2.1 or higher\n");
|
---|
| 952 | return 1;
|
---|
| 953 | #endif
|
---|
| 954 | }
|
---|
[3163] | 955 | EOF
|
---|
[4886] | 956 | [ -n "$INCZ" ] && I_INCZ=`prefix_I "$INCZ"`
|
---|
[4719] | 957 | if test_compile "$LIBZ $I_INCZ" zlib zlib; then
|
---|
[1] | 958 | if test_execute; then
|
---|
[48312] | 959 | echo "if1of (\$(KBUILD_TARGET),darwin freebsd haiku linux)" >> $CNF
|
---|
[21887] | 960 | cnf_append " SDK_VBOX_ZLIB_LIBS" "`strip_l "$LIBZ"`"
|
---|
| 961 | cnf_append " SDK_VBOX_ZLIB_INCS" "$INCZ"
|
---|
| 962 | echo "endif" >> $CNF
|
---|
[1] | 963 | fi
|
---|
| 964 | fi
|
---|
| 965 | }
|
---|
| 966 |
|
---|
[11735] | 967 |
|
---|
[1] | 968 | #
|
---|
[85391] | 969 | # Check for liblzf, needed by VBoxSVC, Runtime, ...
|
---|
| 970 | #
|
---|
| 971 | check_lzf()
|
---|
| 972 | {
|
---|
| 973 | test_header liblzf
|
---|
| 974 | cat > $ODIR.tmp_src.cc << EOF
|
---|
| 975 | #include <cstdio>
|
---|
| 976 | #include <lzf.h>
|
---|
| 977 | extern "C" int main(void)
|
---|
| 978 | {
|
---|
| 979 | printf("found LZF API version %u.%u", LZF_VERSION >> 8, LZF_VERSION & 0xff);
|
---|
| 980 | #if LZF_VERSION >= 0x0105
|
---|
| 981 | printf(", OK.\n");
|
---|
| 982 | return 0;
|
---|
| 983 | #else
|
---|
| 984 | printf(", expected version 1.5 or higher\n");
|
---|
| 985 | return 1;
|
---|
| 986 | #endif
|
---|
| 987 | }
|
---|
| 988 | EOF
|
---|
| 989 | [ -n "$INCLZF" ] && I_INCLZF=`prefix_I "$INCLZF"`
|
---|
| 990 | if test_compile "$LIBLZF $I_INCLZF" liblzf liblzf nofatal; then
|
---|
| 991 | if test_execute; then
|
---|
| 992 | echo "if1of (\$(KBUILD_TARGET),darwin freebsd haiku linux)" >> $CNF
|
---|
| 993 | cnf_append " SDK_VBOX_LZF_LIBS" "`strip_l "$LIBLZF"`"
|
---|
| 994 | cnf_append " SDK_VBOX_LZF_INCS" "$INCLZF"
|
---|
| 995 | echo "endif" >> $CNF
|
---|
| 996 | fi
|
---|
| 997 | else
|
---|
| 998 | echo "not found -- builing liblzf from in-tree code."
|
---|
| 999 | fi
|
---|
| 1000 | }
|
---|
| 1001 |
|
---|
| 1002 |
|
---|
| 1003 | #
|
---|
[1] | 1004 | # Check for libpng, needed by kchmviewer
|
---|
| 1005 | #
|
---|
[3163] | 1006 | check_png()
|
---|
[1] | 1007 | {
|
---|
| 1008 | test_header libpng
|
---|
[16202] | 1009 | cat > $ODIR.tmp_src.cc << EOF
|
---|
[1] | 1010 | #include <cstdio>
|
---|
| 1011 | #include <png.h>
|
---|
| 1012 | extern "C" int main(void)
|
---|
| 1013 | {
|
---|
| 1014 | printf("found version %s", PNG_LIBPNG_VER_STRING);
|
---|
| 1015 | #if PNG_LIBPNG_VER >= 10205
|
---|
| 1016 | printf(", OK.\n");
|
---|
| 1017 | return 0;
|
---|
| 1018 | #else
|
---|
| 1019 | printf(", expected version 1.2.5 or higher\n");
|
---|
| 1020 | return 1;
|
---|
| 1021 | #endif
|
---|
| 1022 | }
|
---|
[3163] | 1023 | EOF
|
---|
[4886] | 1024 | [ -n "$INCPNG" ] && I_INCPNG=`prefix_I "$INCPNG"`
|
---|
[4719] | 1025 | if test_compile "$LIBPNG $I_INCPNG" libpng libpng; then
|
---|
[3163] | 1026 | if test_execute; then
|
---|
| 1027 | cnf_append "SDK_VBOX_LIBPNG_LIBS" "`strip_l "$LIBPNG"`"
|
---|
[1] | 1028 | cnf_append "SDK_VBOX_LIBPNG_INCS" "$INCPNG"
|
---|
| 1029 | fi
|
---|
| 1030 | fi
|
---|
| 1031 | }
|
---|
| 1032 |
|
---|
[19356] | 1033 | #
|
---|
[36697] | 1034 | # Check for libvncserver, needed for VNC in OSE
|
---|
| 1035 | #
|
---|
| 1036 | check_vncserver()
|
---|
| 1037 | {
|
---|
| 1038 | test_header libvncserver
|
---|
| 1039 | cat > $ODIR.tmp_src.cc <<EOF
|
---|
| 1040 | #include <cstdio>
|
---|
| 1041 | #include <rfb/rfbconfig.h>
|
---|
| 1042 |
|
---|
| 1043 | extern "C" int main()
|
---|
| 1044 | {
|
---|
| 1045 | const char* v=LIBVNCSERVER_VERSION;
|
---|
| 1046 | unsigned int major = 0, minor = 0, micro = 0;
|
---|
| 1047 |
|
---|
| 1048 | for (; *v !='.' && *v != '\0'; v++) major = major*10 + *v-'0';
|
---|
| 1049 | if (*v == '.') v++;
|
---|
| 1050 | for (; *v !='.' && *v != '\0'; v++) minor = minor*10 + *v-'0';
|
---|
| 1051 | if (*v == '.') v++;
|
---|
| 1052 | for (; *v !='.' && *v != '\0'; v++) micro = micro*10 + *v-'0';
|
---|
| 1053 |
|
---|
| 1054 | printf("found version %s", LIBVNCSERVER_PACKAGE_VERSION);
|
---|
[40390] | 1055 | if (major*10000 + minor*100 + micro >= 900)
|
---|
[36697] | 1056 | {
|
---|
| 1057 | printf(", OK.\n");
|
---|
| 1058 | return 0;
|
---|
| 1059 | }
|
---|
| 1060 | else
|
---|
| 1061 | {
|
---|
[40390] | 1062 | printf(", expected version 0.9 or higher\n");
|
---|
[36697] | 1063 | return 1;
|
---|
| 1064 | }
|
---|
| 1065 | }
|
---|
| 1066 | EOF
|
---|
| 1067 | if test_compile "$LIBVNCSERVER $INCVNCSERVER" libvncserver libvncserver; then
|
---|
| 1068 | if test_execute; then
|
---|
[40383] | 1069 | cnf_append "VBOX_WITH_EXTPACK_VNC" "1"
|
---|
[36697] | 1070 | fi
|
---|
| 1071 | fi
|
---|
| 1072 | }
|
---|
| 1073 |
|
---|
| 1074 | #
|
---|
[19356] | 1075 | # Check for libcurl, needed by S3
|
---|
| 1076 | #
|
---|
| 1077 | check_curl()
|
---|
| 1078 | {
|
---|
[19849] | 1079 | if [ -z "$BUILD_LIBCURL" ]; then
|
---|
| 1080 | test_header libcurl
|
---|
| 1081 | cat > $ODIR.tmp_src.cc << EOF
|
---|
[19356] | 1082 | #include <cstdio>
|
---|
| 1083 | #include <curl/curl.h>
|
---|
| 1084 | extern "C" int main(void)
|
---|
| 1085 | {
|
---|
| 1086 | printf("found version %s", LIBCURL_VERSION);
|
---|
[43741] | 1087 | #if 10000*LIBCURL_VERSION_MAJOR + 100*LIBCURL_VERSION_MINOR + LIBCURL_VERSION_PATCH >= 71901
|
---|
[19356] | 1088 | printf(", OK.\n");
|
---|
| 1089 | return 0;
|
---|
| 1090 | #else
|
---|
[43741] | 1091 | printf(", expected version 7.19.1 or higher\n");
|
---|
[19356] | 1092 | return 1;
|
---|
| 1093 | #endif
|
---|
| 1094 | }
|
---|
| 1095 | EOF
|
---|
[19849] | 1096 | [ -n "$INCCURL" ] && I_INCCURL=`prefix_I "$INCCURL"`
|
---|
| 1097 | if test_compile "$LIBCURL $I_INCCURL" libcurl libcurl; then
|
---|
| 1098 | if test_execute; then
|
---|
| 1099 | cnf_append "SDK_VBOX_LIBCURL_LIBS" "`strip_l "$LIBCURL"`"
|
---|
| 1100 | cnf_append "SDK_VBOX_LIBCURL_INCS" "$INCCURL"
|
---|
| 1101 | fi
|
---|
[19356] | 1102 | fi
|
---|
| 1103 | fi
|
---|
| 1104 | }
|
---|
[11735] | 1105 |
|
---|
[19356] | 1106 |
|
---|
[1] | 1107 | #
|
---|
| 1108 | # Check for pam, needed by VRDPAuth
|
---|
| 1109 | # Version 79 was introduced in 9/2005, do we support older versions?
|
---|
[757] | 1110 | # Debian/sarge uses 76
|
---|
[832] | 1111 | # OpenSUSE comes with 0.99.xxx where they changed the versioning scheme.
|
---|
[1] | 1112 | #
|
---|
[3163] | 1113 | check_pam()
|
---|
[1] | 1114 | {
|
---|
| 1115 | test_header pam
|
---|
[16202] | 1116 | cat > $ODIR.tmp_src.cc << EOF
|
---|
[1] | 1117 | #include <cstdio>
|
---|
| 1118 | #include <security/pam_appl.h>
|
---|
| 1119 | extern "C" int main(void)
|
---|
| 1120 | {
|
---|
| 1121 | printf("found version %d", __LIBPAM_VERSION);
|
---|
[757] | 1122 | if (__LIBPAM_VERSION >= 76)
|
---|
[1] | 1123 | {
|
---|
| 1124 | printf(", OK.\n");
|
---|
| 1125 | return 0;
|
---|
| 1126 | }
|
---|
| 1127 | else
|
---|
| 1128 | {
|
---|
[757] | 1129 | printf(", expected version 76 or higher\n");
|
---|
[1] | 1130 | return 1;
|
---|
| 1131 | }
|
---|
| 1132 | }
|
---|
[3163] | 1133 | EOF
|
---|
[832] | 1134 | if test_compile "-lpam" pam pam nofatal; then
|
---|
| 1135 | if test_execute nofatal; then
|
---|
| 1136 | return 0;
|
---|
| 1137 | fi
|
---|
| 1138 | fi
|
---|
[33515] | 1139 | echo "pam0.x not found"
|
---|
[832] | 1140 | test_header linux_pam
|
---|
[16202] | 1141 | cat > $ODIR.tmp_src.cc << EOF
|
---|
[832] | 1142 | #include <cstdio>
|
---|
| 1143 | #include <security/pam_appl.h>
|
---|
| 1144 | extern "C" int main(void)
|
---|
| 1145 | {
|
---|
| 1146 | printf("found version %d.%d", __LINUX_PAM__, __LINUX_PAM_MINOR__);
|
---|
| 1147 | if (__LINUX_PAM__ >= 1)
|
---|
| 1148 | {
|
---|
| 1149 | printf(", OK.\n");
|
---|
| 1150 | return 0;
|
---|
| 1151 | }
|
---|
| 1152 | else
|
---|
| 1153 | {
|
---|
| 1154 | printf(", expected version 1.0 or higher\n");
|
---|
| 1155 | return 1;
|
---|
| 1156 | }
|
---|
| 1157 | }
|
---|
[3163] | 1158 | EOF
|
---|
[1] | 1159 | if test_compile "-lpam" pam pam; then
|
---|
| 1160 | test_execute
|
---|
| 1161 | fi
|
---|
| 1162 | }
|
---|
| 1163 |
|
---|
[3163] | 1164 |
|
---|
[1] | 1165 | #
|
---|
| 1166 | # Check for the SDL library, needed by VBoxSDL and VirtualBox
|
---|
| 1167 | # We depend at least on version 1.2.7
|
---|
| 1168 | #
|
---|
[3163] | 1169 | check_sdl()
|
---|
[1] | 1170 | {
|
---|
| 1171 | test_header SDL
|
---|
[8037] | 1172 | if [ "$OS" = "darwin" ]; then
|
---|
[8041] | 1173 | if [ -f "/System/Library/Frameworks/SDL.framework/SDL" ]; then
|
---|
[15739] | 1174 | PATH_SDK_LIBSDL="/System/Library/Frameworks/SDL.framework"
|
---|
[8041] | 1175 | elif [ -f "/Library/Frameworks/SDL.framework/SDL" ]; then
|
---|
[8037] | 1176 | PATH_SDK_LIBSDL="/Library/Frameworks/SDL.framework"
|
---|
| 1177 | fi
|
---|
| 1178 | if [ -n "$PATH_SDK_LIBSDL" ]; then
|
---|
| 1179 | foundsdl=1
|
---|
| 1180 | INCSDL="$PATH_SDK_LIBSDL/Headers"
|
---|
| 1181 | FLDSDL="-framework SDL"
|
---|
[8041] | 1182 | else
|
---|
| 1183 | log_failure "SDL framework not found"
|
---|
| 1184 | fail
|
---|
[8037] | 1185 | fi
|
---|
| 1186 | else
|
---|
| 1187 | if which_wrapper sdl-config > /dev/null; then
|
---|
| 1188 | FLGSDL=`sdl-config --cflags`
|
---|
| 1189 | INCSDL=`strip_I "$FLGSDL"`
|
---|
| 1190 | LIBSDL=`sdl-config --libs`
|
---|
| 1191 | LIBSDLMAIN="-lSDLmain"
|
---|
| 1192 | FLDSDL=
|
---|
| 1193 | foundsdl=1
|
---|
| 1194 | fi
|
---|
| 1195 | fi
|
---|
| 1196 | [ "$OS" = "linux" -o "$OS" = "darwin" -o "$OS" = "solaris" ] && LIBSDLMAIN=""
|
---|
| 1197 | if [ -n "$foundsdl" ]; then
|
---|
[16202] | 1198 | cat > $ODIR.tmp_src.cc << EOF
|
---|
[1] | 1199 | #include <cstdio>
|
---|
[7699] | 1200 | #include <SDL.h>
|
---|
| 1201 | #include <SDL_main.h>
|
---|
[8044] | 1202 | #undef main
|
---|
[7704] | 1203 | extern "C" int main(int argc, char** argv)
|
---|
[1] | 1204 | {
|
---|
| 1205 | printf("found version %d.%d.%d",
|
---|
| 1206 | SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL);
|
---|
| 1207 | #if SDL_VERSION_ATLEAST(1,2,7)
|
---|
| 1208 | printf(", OK.\n");
|
---|
| 1209 | return 0;
|
---|
| 1210 | #else
|
---|
| 1211 | printf(", expected version 1.2.7 or higher\n");
|
---|
| 1212 | return 1;
|
---|
| 1213 | #endif
|
---|
| 1214 | }
|
---|
[3163] | 1215 | EOF
|
---|
[4886] | 1216 | [ -n "$INCSDL" ] && I_INCSDL=`prefix_I "$INCSDL"`
|
---|
[8037] | 1217 | if test_compile "$LIBSDL $LIBSDLMAIN $I_INCSDL $FLDSDL" SDL SDL; then
|
---|
[3163] | 1218 | if test_execute; then
|
---|
| 1219 | cnf_append "LIB_SDK_LIBSDL_SDL" "`strip_l "$LIBSDL"`"
|
---|
| 1220 | cnf_append "SDK_LIBSDL_LIBPATH" "`strip_L "$LIBSDL"`"
|
---|
| 1221 | cnf_append "LIB_SDK_LIBSDL_SDLMAIN" "`strip_l "$LIBSDLMAIN"`"
|
---|
[8037] | 1222 | [ -n "$INCSDL" ] && cnf_append "SDK_LIBSDL_INCS" "$INCSDL"
|
---|
| 1223 | [ -n "$FLDSDL" ] && cnf_append "SDK_LIBSDL_LDFLAGS" "$FLDSDL"
|
---|
[3163] | 1224 | fi
|
---|
[1] | 1225 | fi
|
---|
[3163] | 1226 | else
|
---|
[57789] | 1227 | log_failure "SDL not found (can be disabled using --disable-sdl)"
|
---|
[5435] | 1228 | fail
|
---|
[1] | 1229 | fi
|
---|
| 1230 | }
|
---|
| 1231 |
|
---|
[11735] | 1232 |
|
---|
[1] | 1233 | #
|
---|
| 1234 | # Check for the SDL_ttf library, needed by VBoxSDL (secure label)
|
---|
| 1235 | #
|
---|
[3163] | 1236 | check_sdl_ttf()
|
---|
[1] | 1237 | {
|
---|
| 1238 | test_header SDL_ttf
|
---|
[16202] | 1239 | cat > $ODIR.tmp_src.cc << EOF
|
---|
[1] | 1240 | #include <cstdio>
|
---|
[7699] | 1241 | #include <SDL_ttf.h>
|
---|
[757] | 1242 | #ifndef SDL_TTF_MAJOR_VERSION
|
---|
| 1243 | #define SDL_TTF_MAJOR_VERSION TTF_MAJOR_VERSION
|
---|
| 1244 | #define SDL_TTF_MINOR_VERSION TTF_MINOR_VERSION
|
---|
| 1245 | #define SDL_TTF_PATCHLEVEL TTF_PATCHLEVEL
|
---|
| 1246 | #endif
|
---|
[1] | 1247 | extern "C" int main(void)
|
---|
| 1248 | {
|
---|
| 1249 | printf("found version %d.%d.%d",
|
---|
| 1250 | SDL_TTF_MAJOR_VERSION, SDL_TTF_MINOR_VERSION, SDL_TTF_PATCHLEVEL);
|
---|
| 1251 | #if 10000*SDL_TTF_MAJOR_VERSION + 100*SDL_TTF_MINOR_VERSION + SDL_TTF_PATCHLEVEL >= 20006
|
---|
| 1252 | printf(", OK.\n");
|
---|
| 1253 | return 0;
|
---|
| 1254 | #else
|
---|
| 1255 | printf(", expected version 2.0.6 or higher\n");
|
---|
| 1256 | return 1;
|
---|
| 1257 | #endif
|
---|
| 1258 | }
|
---|
[3163] | 1259 | EOF
|
---|
[8344] | 1260 | if test_compile "-lSDL_ttf $I_INCSDL" SDL_ttf SDL_ttf nofatal; then
|
---|
[58367] | 1261 | test_execute nofatal || \
|
---|
[9035] | 1262 | cnf_append "VBOX_WITH_SECURELABEL" ""
|
---|
| 1263 | else
|
---|
[23028] | 1264 | echo "not found -- disabling VBoxSDL secure label."
|
---|
[9035] | 1265 | cnf_append "VBOX_WITH_SECURELABEL" ""
|
---|
[1] | 1266 | fi
|
---|
| 1267 | }
|
---|
| 1268 |
|
---|
[11735] | 1269 |
|
---|
[1] | 1270 | #
|
---|
[791] | 1271 | # Check for libasound, needed by the ALSA audio backend
|
---|
| 1272 | #
|
---|
[3163] | 1273 | check_alsa()
|
---|
[791] | 1274 | {
|
---|
| 1275 | test_header ALSA
|
---|
[16202] | 1276 | cat > $ODIR.tmp_src.cc << EOF
|
---|
[6101] | 1277 | #include <cstdio>
|
---|
[791] | 1278 | #include <alsa/asoundlib.h>
|
---|
| 1279 | extern "C" int main(void)
|
---|
| 1280 | {
|
---|
| 1281 | printf("found version %d.%d.%d",
|
---|
| 1282 | SND_LIB_MAJOR, SND_LIB_MINOR, SND_LIB_SUBMINOR);
|
---|
[59997] | 1283 | #if 10000*SND_LIB_MAJOR + 100*SND_LIB_MINOR + SND_LIB_SUBMINOR >= 10014
|
---|
[791] | 1284 | printf(", OK.\n");
|
---|
| 1285 | return 0;
|
---|
| 1286 | #else
|
---|
[59997] | 1287 | printf(", expected version 1.0.14 or higher\n");
|
---|
[791] | 1288 | return 1;
|
---|
| 1289 | #endif
|
---|
| 1290 | }
|
---|
[3163] | 1291 | EOF
|
---|
[791] | 1292 | if test_compile "-lasound" asound asound; then
|
---|
| 1293 | test_execute
|
---|
| 1294 | fi
|
---|
| 1295 | }
|
---|
| 1296 |
|
---|
[11735] | 1297 |
|
---|
[791] | 1298 | #
|
---|
[6101] | 1299 | # Check for PulseAudio
|
---|
| 1300 | #
|
---|
| 1301 | check_pulse()
|
---|
| 1302 | {
|
---|
| 1303 | test_header "PulseAudio"
|
---|
[16202] | 1304 | cat > $ODIR.tmp_src.cc << EOF
|
---|
[6101] | 1305 | #include <cstdio>
|
---|
| 1306 | #include <pulse/version.h>
|
---|
| 1307 | extern "C" int main(void)
|
---|
| 1308 | {
|
---|
| 1309 | printf("found version %s API version %d", pa_get_headers_version(), PA_API_VERSION);
|
---|
| 1310 | #if PA_API_VERSION >= 9
|
---|
| 1311 | printf(", OK.\n");
|
---|
| 1312 | return 0;
|
---|
| 1313 | #else
|
---|
| 1314 | printf(", expected version 0.9.0 (API version 9) or higher\n");
|
---|
| 1315 | return 1;
|
---|
| 1316 | #endif
|
---|
| 1317 | }
|
---|
| 1318 | EOF
|
---|
[78022] | 1319 | if test_compile "$INCPULSE $LIBPULSE -lpulse" pulse pulse nofatal; then
|
---|
| 1320 | if test_execute nofatal; then
|
---|
| 1321 | cnf_append "VBOX_WITH_AUDIO_PULSE" "1"
|
---|
| 1322 | else
|
---|
| 1323 | cnf_append "VBOX_WITH_AUDIO_PULSE" ""
|
---|
[78023] | 1324 | fi
|
---|
[78022] | 1325 | else
|
---|
| 1326 | cnf_append "VBOX_WITH_AUDIO_PULSE" ""
|
---|
[6101] | 1327 | fi
|
---|
| 1328 | }
|
---|
| 1329 |
|
---|
[11735] | 1330 |
|
---|
[6101] | 1331 | #
|
---|
[17912] | 1332 | # Check for the X libraries (Xext, X11)
|
---|
| 1333 | #
|
---|
| 1334 | check_x()
|
---|
| 1335 | {
|
---|
| 1336 | test_header "X libraries"
|
---|
| 1337 | cat > $ODIR.tmp_src.cc << EOF
|
---|
| 1338 | #include <cstdio>
|
---|
| 1339 | #include <X11/Xlib.h>
|
---|
| 1340 | extern "C" int main(void)
|
---|
| 1341 | {
|
---|
| 1342 | Display *dpy;
|
---|
| 1343 | int scrn_num;
|
---|
| 1344 | Screen *scrn;
|
---|
| 1345 | Window win;
|
---|
| 1346 |
|
---|
| 1347 | dpy = XOpenDisplay(NULL);
|
---|
| 1348 | scrn_num = DefaultScreen(dpy);
|
---|
| 1349 | scrn = ScreenOfDisplay(dpy, scrn_num);
|
---|
| 1350 | win = XCreateWindow(dpy, RootWindowOfScreen(scrn), 0, 0, 100, 100,
|
---|
| 1351 | 0, 16, InputOutput, CopyFromParent, 0, NULL);
|
---|
| 1352 | XDestroyWindow(dpy, win);
|
---|
[27449] | 1353 | XCloseDisplay(dpy);
|
---|
[17912] | 1354 | }
|
---|
| 1355 | EOF
|
---|
| 1356 | [ -n "$INCX11" ] && I_INCX11=`prefix_I "$INCX11"`
|
---|
| 1357 | if test_compile "$LIBX11 $I_INCX11" Xlibs Xlibs; then
|
---|
| 1358 | log_success "found"
|
---|
| 1359 | fi
|
---|
| 1360 | }
|
---|
| 1361 |
|
---|
| 1362 |
|
---|
| 1363 | #
|
---|
[44580] | 1364 | # Check for the Xcursor library, needed by VBoxSDL.
|
---|
[1] | 1365 | #
|
---|
[3163] | 1366 | check_xcursor()
|
---|
[1] | 1367 | {
|
---|
| 1368 | test_header Xcursor
|
---|
[16202] | 1369 | cat > $ODIR.tmp_src.cc << EOF
|
---|
[1] | 1370 | #include <cstdio>
|
---|
| 1371 | #include <X11/Xlib.h>
|
---|
| 1372 | #include <X11/Xcursor/Xcursor.h>
|
---|
| 1373 | extern "C" int main(void)
|
---|
| 1374 | {
|
---|
| 1375 | XcursorImage *cursor = XcursorImageCreate (10, 10);
|
---|
| 1376 | XcursorImageDestroy(cursor);
|
---|
| 1377 | return 0;
|
---|
| 1378 | }
|
---|
[3163] | 1379 | EOF
|
---|
[4913] | 1380 | [ -n "$INCX11" ] && I_INCX11=`prefix_I "$INCX11"`
|
---|
| 1381 | if test_compile "$LIBX11 $LIBXCURSOR $I_INCX11" Xcursor Xcursor; then
|
---|
[1] | 1382 | log_success "found"
|
---|
[5359] | 1383 | cnf_append "VBOX_XCURSOR_LIBS" "`strip_l "$LIBXCURSOR"`"
|
---|
[1] | 1384 | fi
|
---|
| 1385 | }
|
---|
| 1386 |
|
---|
[27449] | 1387 |
|
---|
[22752] | 1388 | #
|
---|
[27449] | 1389 | # Check for the Xinerama library, needed by the Qt GUI
|
---|
| 1390 | #
|
---|
| 1391 | check_xinerama()
|
---|
| 1392 | {
|
---|
| 1393 | test_header Xinerama
|
---|
| 1394 | cat > $ODIR.tmp_src.cc << EOF
|
---|
| 1395 | #include <X11/Xlib.h>
|
---|
| 1396 | #include <X11/extensions/Xinerama.h>
|
---|
| 1397 | extern "C" int main(void)
|
---|
| 1398 | {
|
---|
| 1399 | Display *dpy;
|
---|
| 1400 | Bool flag;
|
---|
| 1401 | dpy = XOpenDisplay(NULL);
|
---|
| 1402 | if (dpy)
|
---|
| 1403 | {
|
---|
| 1404 | flag = XineramaIsActive(dpy);
|
---|
| 1405 | XCloseDisplay(dpy);
|
---|
| 1406 | }
|
---|
| 1407 | }
|
---|
| 1408 | EOF
|
---|
| 1409 | [ -n "$INCX11" ] && I_INCX11=`prefix_I "$INCX11"`
|
---|
| 1410 | if test_compile "$LIBX11 $LIBXINERAMA $I_INCX11" Xinerama Xinerama; then
|
---|
| 1411 | log_success "found"
|
---|
| 1412 | fi
|
---|
| 1413 | }
|
---|
| 1414 |
|
---|
| 1415 |
|
---|
| 1416 | #
|
---|
[83219] | 1417 | # Check for the XRandR library, needed by the Qt GUI
|
---|
[27604] | 1418 | #
|
---|
| 1419 | check_xrandr()
|
---|
| 1420 | {
|
---|
| 1421 | test_header Xrandr
|
---|
| 1422 | cat > $ODIR.tmp_src.cc << EOF
|
---|
| 1423 | #include <X11/Xlib.h>
|
---|
| 1424 | #include <X11/extensions/Xrandr.h>
|
---|
| 1425 | extern "C" int main(void)
|
---|
| 1426 | {
|
---|
| 1427 | Display *dpy;
|
---|
| 1428 | Bool flag;
|
---|
| 1429 | int major, minor;
|
---|
| 1430 | dpy = XOpenDisplay(NULL);
|
---|
| 1431 | if (dpy)
|
---|
| 1432 | {
|
---|
| 1433 | flag = XRRQueryVersion(dpy, &major, &minor);
|
---|
| 1434 | XCloseDisplay(dpy);
|
---|
| 1435 | }
|
---|
| 1436 | }
|
---|
| 1437 | EOF
|
---|
| 1438 | [ -n "$INCX11" ] && I_INCX11=`prefix_I "$INCX11"`
|
---|
| 1439 | if test_compile "$LIBX11 $LIBXRANDR $I_INCX11" Xrandr Xrandr; then
|
---|
| 1440 | log_success "found"
|
---|
| 1441 | fi
|
---|
| 1442 | }
|
---|
| 1443 |
|
---|
| 1444 |
|
---|
| 1445 | #
|
---|
[22752] | 1446 | # Check for OpenGL
|
---|
| 1447 | #
|
---|
| 1448 | check_opengl()
|
---|
| 1449 | {
|
---|
| 1450 | # On darwin this is a on/off decision only
|
---|
| 1451 | if [ "$OS" = "darwin" ]; then
|
---|
| 1452 | test_header "OpenGL support"
|
---|
| 1453 | echo "enabled"
|
---|
| 1454 | else
|
---|
| 1455 | check_xmu
|
---|
| 1456 | check_mesa
|
---|
| 1457 | fi
|
---|
| 1458 | }
|
---|
[11735] | 1459 |
|
---|
[22752] | 1460 |
|
---|
[1] | 1461 | #
|
---|
[17912] | 1462 | # Check for the Xmu library, needed by OpenGL
|
---|
[1] | 1463 | #
|
---|
[17912] | 1464 | check_xmu()
|
---|
[1] | 1465 | {
|
---|
[17912] | 1466 | test_header Xmu
|
---|
[16202] | 1467 | cat > $ODIR.tmp_src.cc << EOF
|
---|
[1] | 1468 | #include <cstdio>
|
---|
[17912] | 1469 | #include <X11/Xatom.h>
|
---|
[1] | 1470 | #include <X11/Xlib.h>
|
---|
[17912] | 1471 | #include <X11/Xutil.h>
|
---|
| 1472 | #include <X11/Xmu/StdCmap.h>
|
---|
[1] | 1473 | extern "C" int main(void)
|
---|
| 1474 | {
|
---|
| 1475 | Display *dpy;
|
---|
| 1476 | int scrn_num;
|
---|
| 1477 | Screen *scrn;
|
---|
| 1478 |
|
---|
[17912] | 1479 | dpy = XOpenDisplay(NULL);
|
---|
[17918] | 1480 | if (dpy)
|
---|
| 1481 | {
|
---|
| 1482 | scrn_num = DefaultScreen(dpy);
|
---|
| 1483 | scrn = ScreenOfDisplay(dpy, scrn_num);
|
---|
| 1484 | Status status = XmuLookupStandardColormap(dpy, RootWindowOfScreen(scrn), 0,
|
---|
| 1485 | 24, XA_RGB_DEFAULT_MAP, False, True);
|
---|
| 1486 | printf("Status = %x\n", status);
|
---|
[27449] | 1487 | XCloseDisplay(dpy);
|
---|
[17918] | 1488 | }
|
---|
[17912] | 1489 | return 0;
|
---|
[1] | 1490 | }
|
---|
[3163] | 1491 | EOF
|
---|
[4913] | 1492 | [ -n "$INCX11" ] && I_INCX11=`prefix_I "$INCX11"`
|
---|
[17912] | 1493 | if test_compile "$LIBX11 $LIBXMU $I_INCX11" Xmu Xmu; then
|
---|
[1] | 1494 | log_success "found"
|
---|
[17912] | 1495 | cnf_append "VBOX_XMU_LIBS" "`strip_l "$LIBXMU"`"
|
---|
[1] | 1496 | fi
|
---|
| 1497 | }
|
---|
| 1498 |
|
---|
| 1499 | #
|
---|
[17912] | 1500 | # Check for Mesa, needed by OpenGL
|
---|
| 1501 | #
|
---|
| 1502 | check_mesa()
|
---|
| 1503 | {
|
---|
| 1504 | test_header "Mesa / GLU"
|
---|
| 1505 | cat > $ODIR.tmp_src.cc << EOF
|
---|
| 1506 | #include <cstdio>
|
---|
| 1507 | #include <X11/Xlib.h>
|
---|
| 1508 | #include <GL/glx.h>
|
---|
| 1509 | #include <GL/glu.h>
|
---|
| 1510 | extern "C" int main(void)
|
---|
| 1511 | {
|
---|
| 1512 | Display *dpy;
|
---|
| 1513 | int major, minor;
|
---|
| 1514 |
|
---|
| 1515 | dpy = XOpenDisplay(NULL);
|
---|
[17918] | 1516 | if (dpy)
|
---|
[17912] | 1517 | {
|
---|
[31036] | 1518 | Bool glx_version = glXQueryVersion(dpy, &major, &minor);
|
---|
| 1519 | XCloseDisplay(dpy);
|
---|
| 1520 | if (glx_version)
|
---|
[17918] | 1521 | {
|
---|
| 1522 | printf("found version %u.%u, OK.\n", major, minor);
|
---|
| 1523 | return 0;
|
---|
| 1524 | }
|
---|
[17912] | 1525 | }
|
---|
[17918] | 1526 | printf("found (inactive), OK.\n");
|
---|
[17912] | 1527 | return 0;
|
---|
| 1528 | }
|
---|
| 1529 | EOF
|
---|
| 1530 | [ -n "$INCX11" ] && I_INCX11=`prefix_I "$INCX11"`
|
---|
| 1531 | if test_compile "$LIBX11 $MESA $I_INCX11" Mesa Mesa; then
|
---|
[26776] | 1532 | [ $PASSIVE_MESA -eq 1 ] && unset DISPLAY
|
---|
[17912] | 1533 | test_execute
|
---|
| 1534 | fi
|
---|
| 1535 | }
|
---|
| 1536 |
|
---|
| 1537 |
|
---|
| 1538 | #
|
---|
[59681] | 1539 | # Check for the Qt5 library, needed by the VirtualBox frontend
|
---|
| 1540 | #
|
---|
| 1541 | # Currently not fatal.
|
---|
| 1542 | #
|
---|
| 1543 | check_qt5()
|
---|
| 1544 | {
|
---|
| 1545 | foundqt5=
|
---|
| 1546 | test_header Qt5
|
---|
| 1547 | cat > $ODIR.tmp_src.cc << EOF
|
---|
| 1548 | #include <QtGlobal>
|
---|
| 1549 | extern "C" int main(void)
|
---|
| 1550 | {
|
---|
[66821] | 1551 | EOF
|
---|
| 1552 | echo "#if QT_VERSION >= $(($QT5MAJ*65536+$QT5MIN*256))" >> $ODIR.tmp_src.cc
|
---|
| 1553 | cat >> $ODIR.tmp_src.cc << EOF
|
---|
[59681] | 1554 | return 0;
|
---|
| 1555 | #else
|
---|
| 1556 | return 1;
|
---|
| 1557 | #endif
|
---|
| 1558 | }
|
---|
| 1559 | EOF
|
---|
| 1560 | if [ "$OS" = "darwin" ]; then
|
---|
| 1561 | # First check if there is the internal version of Qt. If yes nothing else
|
---|
| 1562 | # has to be done.
|
---|
[90355] | 1563 | QT_INTERNAL=`/bin/ls -rd1 $DEVDIR/$BUILD_TARGET.$BUILD_PLATFORM_ARCH/qt/* 2> /dev/null`
|
---|
[59681] | 1564 | for t in $QT_INTERNAL; do
|
---|
| 1565 | if [ -f "$t/Frameworks/QtCoreVBox.framework/QtCoreVBox" ]; then
|
---|
| 1566 | cnf_append "VBOX_WITH_ORACLE_QT" "1"
|
---|
| 1567 | log_success "use internal version"
|
---|
| 1568 | return
|
---|
| 1569 | fi
|
---|
| 1570 | done
|
---|
| 1571 | # Now try the user provided directory and some of the standard directories.
|
---|
| 1572 | QT_TRIES="$QT5DIR /System/Library /Library"
|
---|
| 1573 | for t in $QT_TRIES; do
|
---|
[84900] | 1574 | if [ -f "$t/Frameworks/QtCore.framework/QtCore" -o -f "$t/clang_64/lib/QtCore.framework/QtCore" ]; then
|
---|
[59681] | 1575 | PATH_SDK_QT5="$t"
|
---|
[84900] | 1576 | foundqt5=1
|
---|
[59681] | 1577 | break
|
---|
| 1578 | fi
|
---|
| 1579 | done
|
---|
| 1580 | # Add the necessary params for building the test application
|
---|
| 1581 | if [ -n "$PATH_SDK_QT5" ]; then
|
---|
[84900] | 1582 | if [ -f "$t/clang_64/lib/QtCore.framework/QtCore" ]; then
|
---|
| 1583 | INCQT5=-I$PATH_SDK_QT5/clang_64/lib/QtCore.framework/Headers
|
---|
| 1584 | LIBQT5=-F$PATH_SDK_QT5/clang_64/lib
|
---|
| 1585 | SDKQT5=$PATH_SDK_QT5/clang_64
|
---|
| 1586 | else
|
---|
| 1587 | INCQT5=-I$PATH_SDK_QT5/Frameworks/QtCore.framework/Headers
|
---|
| 1588 | LIBQT5=-F$PATH_SDK_QT5/Frameworks
|
---|
| 1589 | SDKQT5=$PATH_SDK_QT5
|
---|
| 1590 | fi
|
---|
| 1591 | FLGQT5="-framework QtCore -std=c++11 -Wl,-rpath,`L_to_PATH "$LIBQT5"`"
|
---|
[59681] | 1592 | else
|
---|
| 1593 | log_failure "Qt5 framework not found (can be disabled using --disable-qt)"
|
---|
| 1594 | fail
|
---|
| 1595 | fi
|
---|
| 1596 | else # !darwin
|
---|
| 1597 | if [ $QT5DIR_PKGCONFIG -eq 1 ]; then
|
---|
| 1598 | # Default is to use pkg-config:
|
---|
| 1599 | if which_wrapper pkg-config > /dev/null; then
|
---|
| 1600 | qt5_ver=`pkg-config Qt5Core --modversion 2>> $LOG`
|
---|
| 1601 | if [ $? -eq 0 ]; then
|
---|
[60563] | 1602 | echo "(Qt5 from pkg-config)" >> $LOG
|
---|
[90377] | 1603 | FLGQT5=`pkg-config Qt5Core --cflags`
|
---|
[65356] | 1604 | # gcc 4.8 is able to compile with C++11 (see also VBOX_GCC_std in Config.kmk)
|
---|
[90172] | 1605 | [ $(($cc_maj * 100 + $cc_min)) -ge 408 ] && FLGQT5="$FLGQT5 -std=c++11"
|
---|
[59681] | 1606 | INCQT5=`strip_I "$FLGQT5"`
|
---|
| 1607 | LIBDIR5=`pkg-config Qt5Core --variable=libdir`
|
---|
[90355] | 1608 | LIBQT5=`pkg-config Qt5Core Qt5Gui --libs`
|
---|
[59681] | 1609 | LIBQT5="-L$LIBDIR5 $LIBQT5"
|
---|
| 1610 | TOOLQT5=`pkg-config Qt5Core --variable=prefix`
|
---|
| 1611 | TOOLQT5BIN=`pkg-config Qt5Core --variable=host_bins`
|
---|
[60363] | 1612 | if test_compile "$LIBQT5 $LIBPTHREAD $FLGQT5" qt5 qt5 nofatal; then
|
---|
[79836] | 1613 | test_execute_path "`L_to_PATH "$LIBQT5"`" nofatal && foundqt5=3 # pkg-config
|
---|
[59681] | 1614 | fi
|
---|
| 1615 | fi
|
---|
| 1616 | else
|
---|
| 1617 | log_failure "pkg-config not found"
|
---|
| 1618 | fail
|
---|
| 1619 | fi
|
---|
| 1620 | fi
|
---|
| 1621 | if [ -z "$foundqt5" ]; then
|
---|
| 1622 | # Do it the old way (e.g. user has specified QT5DIR):
|
---|
[90355] | 1623 | for q in $QT5DIR "$DEVDIR/linux.$TARGET_MACHINE"/qt/v5.*; do
|
---|
[60563] | 1624 | echo "(Qt5 from '$q')" >> $LOG
|
---|
[59681] | 1625 | INCQT5="$q/include $q/include/QtCore"
|
---|
[88296] | 1626 | FLGQT5="-DQT_SHARED -std=c++11"
|
---|
[59681] | 1627 | I_INCQT5=`prefix_I "$INCQT5"`
|
---|
[90355] | 1628 | LIBQT5="-L$q/lib -lQt5CoreVBox -lQt5GuiVBox"
|
---|
[59681] | 1629 | TOOLQT5="$q"
|
---|
| 1630 | if test_compile "$LIBQT5 $LIBPTHREAD $I_INCQT5 $FLGQT5" qt5 qt5 nofatal &&
|
---|
[79836] | 1631 | test_execute_path "`L_to_PATH "$LIBQT5"`" nofatal; then
|
---|
[59681] | 1632 | foundqt5=2 # internal
|
---|
| 1633 | break;
|
---|
| 1634 | fi
|
---|
[90360] | 1635 | LIBQT5="-L$q/lib -lQt5Core -lQt5Gui"
|
---|
[59681] | 1636 | if test_compile "$LIBQT5 $LIBPTHREAD $I_INCQT5 $FLGQT5" qt5 qt5 nofatal &&
|
---|
[79836] | 1637 | test_execute_path "`L_to_PATH "$LIBQT5"`" nofatal; then
|
---|
[59681] | 1638 | foundqt5=1 # no pkg-config, Qt directory
|
---|
| 1639 | break;
|
---|
| 1640 | fi
|
---|
| 1641 | done
|
---|
| 1642 | fi
|
---|
| 1643 | fi
|
---|
| 1644 | if [ -n "$foundqt5" ]; then
|
---|
| 1645 | # We decided which version of Qt to use, now enforce the version requirement:
|
---|
| 1646 | cat > $ODIR.tmp_src.cc << EOF
|
---|
| 1647 | #include <cstdio>
|
---|
| 1648 | #include <QtGlobal>
|
---|
| 1649 | extern "C" int main(void)
|
---|
| 1650 | {
|
---|
| 1651 | printf("found version %s", QT_VERSION_STR);
|
---|
[66821] | 1652 | EOF
|
---|
| 1653 | echo "#if QT_VERSION >= $(($QT5MAJ*65536+$QT5MIN*256))" >> $ODIR.tmp_src.cc
|
---|
| 1654 | cat >> $ODIR.tmp_src.cc << EOF
|
---|
[59681] | 1655 | printf(", OK.\n");
|
---|
| 1656 | return 0;
|
---|
| 1657 | #else
|
---|
[66821] | 1658 | EOF
|
---|
| 1659 | echo " printf(\", expected version $QT5MAJ.$QT5MIN or higher\\\\n\");" >> $ODIR.tmp_src.cc
|
---|
| 1660 | cat >> $ODIR.tmp_src.cc << EOF
|
---|
[59681] | 1661 | return 1;
|
---|
| 1662 | #endif
|
---|
| 1663 | }
|
---|
| 1664 | EOF
|
---|
| 1665 | [ -n "$INCQT5" ] && I_INCQT5=`prefix_I "$INCQT5"`
|
---|
| 1666 | if test_compile "$LIBQT5 $LIBPTHREAD $I_INCQT5 $FLGQT5" qt5 qt5 nofatal; then
|
---|
[79836] | 1667 | if test_execute_path "`L_to_PATH "$LIBQT5"`"; then
|
---|
[59681] | 1668 | if [ "$OS" = "darwin" ]; then
|
---|
| 1669 | # Successful build & run the test application so add the necessary
|
---|
| 1670 | # params to AutoConfig.kmk:
|
---|
[84900] | 1671 | cnf_append "PATH_SDK_QT5_INC" "`L_to_PATH "$LIBQT5"`"
|
---|
| 1672 | cnf_append "PATH_SDK_QT5_LIB" "`L_to_PATH "$LIBQT5"`"
|
---|
| 1673 | cnf_append "PATH_SDK_QT5" "$SDKQT5"
|
---|
[59681] | 1674 | # Check for the moc tool in the Qt directory found & some standard
|
---|
| 1675 | # directories.
|
---|
[84900] | 1676 | for q in $PATH_SDK_QT5 $PATH_SDK_QT5/clang_64 /usr /Developer/Tools/Qt; do
|
---|
[59681] | 1677 | if which_wrapper "$q/bin/moc" > /dev/null; then
|
---|
| 1678 | cnf_append "PATH_TOOL_QT5_BIN" "$q/bin"
|
---|
| 1679 | fi
|
---|
| 1680 | done
|
---|
| 1681 | else
|
---|
| 1682 | # Strip .../QtCore as we add components ourself:
|
---|
| 1683 | INCQT5=`echo "$INCQT5"|$KBUILD_SED 's|\([^ ]*\)/QtCore|\1|g; s| $||g'`
|
---|
| 1684 | # store only the first path, remove all other paths
|
---|
| 1685 | # most likely pkg-config gave us -I/usr/include/qt5 -I/usr/include/qt5/QtCore
|
---|
| 1686 | INCQT5=`echo "$INCQT5"|$KBUILD_SED 's|\([^ ]*\) .*|\1|'`
|
---|
| 1687 | cnf_append "VBOX_PATH_QT_LIB" "`strip_L "$LIBQT5"`"
|
---|
| 1688 | cnf_append "PATH_SDK_QT5_INC" "$INCQT5"
|
---|
| 1689 | # This is not quite right since the qt libpath does not have to be first...
|
---|
| 1690 | cnf_append "PATH_SDK_QT5_LIB" '$'"(firstword `strip_L "$LIBQT5"`)"
|
---|
| 1691 | if [ "$foundqt5" = "2" ]; then
|
---|
| 1692 | cnf_append "VBOX_WITH_ORACLE_QT" "1"
|
---|
| 1693 | fi
|
---|
| 1694 | if [ "$foundqt5" != "3" ]; then
|
---|
| 1695 | TOOLQT5BIN="$TOOLQT5/bin"
|
---|
| 1696 | fi
|
---|
| 1697 | test_header "Qt5 devtools"
|
---|
| 1698 | # Try it with a suffix, some platforms use that
|
---|
| 1699 | if which_wrapper "$TOOLQT5BIN/moc-qt5" > /dev/null; then
|
---|
| 1700 | QT5BINSUFF="-qt5"
|
---|
| 1701 | else
|
---|
| 1702 | QT5BINSUFF=""
|
---|
| 1703 | fi
|
---|
| 1704 | moc_ver=`$TOOLQT5BIN/moc$QT5BINSUFF -v 2>&1|sed 's+^.*(Qt \(.*\))+\1+'`
|
---|
| 1705 | if [ $? -ne 0 ]; then
|
---|
| 1706 | log_failure "moc$QT5BINSUFF not working"
|
---|
| 1707 | fail
|
---|
| 1708 | else
|
---|
| 1709 | log_success "found version $moc_ver"
|
---|
| 1710 | cnf_append "VBOX_PATH_QT" "$TOOLQT5"
|
---|
| 1711 | cnf_append "PATH_SDK_QT5" "$TOOLQT5"
|
---|
| 1712 | cnf_append "PATH_TOOL_QT5_BIN" "$TOOLQT5BIN"
|
---|
| 1713 | [ -n "$QT5BINSUFF" ] && cnf_append "TOOL_QT5_BIN_SUFF" "$QT5BINSUFF"
|
---|
| 1714 | fi
|
---|
| 1715 | fi
|
---|
| 1716 | fi
|
---|
| 1717 | else
|
---|
| 1718 | log_failure "qt5 not working"
|
---|
| 1719 | fail
|
---|
| 1720 | fi
|
---|
| 1721 | else
|
---|
| 1722 | log_failure "qt5 not found"
|
---|
| 1723 | fail
|
---|
| 1724 | fi
|
---|
| 1725 | }
|
---|
| 1726 |
|
---|
| 1727 |
|
---|
| 1728 | #
|
---|
[45772] | 1729 | # Check for libvpx
|
---|
| 1730 | #
|
---|
| 1731 | check_vpx()
|
---|
| 1732 | {
|
---|
| 1733 | if [ -z "$BUILD_LIBVPX" ]; then
|
---|
| 1734 | test_header libvpx
|
---|
| 1735 | if which_wrapper pkg-config > /dev/null; then
|
---|
| 1736 | libvpx_ver=`pkg-config vpx --modversion 2>> $LOG`
|
---|
[45819] | 1737 | if [ $? -eq 0 ]; then
|
---|
[45772] | 1738 | FLGVPX=`pkg-config vpx --cflags`
|
---|
| 1739 | INCVPX=`strip_I "$FLGVPX"`
|
---|
| 1740 | LIBVPX=`pkg-config vpx --libs`
|
---|
[45819] | 1741 | fi
|
---|
| 1742 | cat > $ODIR.tmp_src.cc << EOF
|
---|
[45772] | 1743 | #include <cstdio>
|
---|
| 1744 | #include <vpx/vpx_codec.h>
|
---|
| 1745 | extern "C" int main(void)
|
---|
| 1746 | {
|
---|
| 1747 | int version = vpx_codec_version();
|
---|
| 1748 | int verMajor = VPX_VERSION_MAJOR(version);
|
---|
| 1749 | int verMinor = VPX_VERSION_MINOR(version);
|
---|
| 1750 | int verPatch = VPX_VERSION_PATCH(version);
|
---|
| 1751 | printf("found version %d.%d.%d", verMajor, verMinor, verPatch);
|
---|
[45932] | 1752 | if ( verMajor == 1 && verMinor >= 0
|
---|
| 1753 | || verMajor == 0 && verMinor == 9 && verPatch >= 5)
|
---|
[45772] | 1754 | {
|
---|
| 1755 | printf(", OK.\n");
|
---|
| 1756 | return 0;
|
---|
| 1757 | }
|
---|
| 1758 | else
|
---|
| 1759 | {
|
---|
[45932] | 1760 | printf(", expected version 0.9.5 or higher\n");
|
---|
[45772] | 1761 | return 1;
|
---|
| 1762 | }
|
---|
| 1763 | }
|
---|
| 1764 | EOF
|
---|
[45819] | 1765 | [ -n "$INCVPX" ] && I_INCVPX=`prefix_I "$INCVPX"`
|
---|
| 1766 | if test_compile "$LIBVPX $I_INCVPX" vpx vpx; then
|
---|
| 1767 | if test_execute; then
|
---|
| 1768 | cnf_append "SDK_VBOX_VPX_INCS" "$INCVPX"
|
---|
| 1769 | cnf_append "SDK_VBOX_VPX_LIBS" "`strip_l "$LIBVPX"`"
|
---|
[45772] | 1770 | fi
|
---|
| 1771 | fi
|
---|
| 1772 | fi
|
---|
| 1773 | fi
|
---|
| 1774 | }
|
---|
[7222] | 1775 |
|
---|
[45772] | 1776 |
|
---|
[7222] | 1777 | #
|
---|
[91555] | 1778 | # Check for libtpms
|
---|
| 1779 | #
|
---|
| 1780 | check_libtpms()
|
---|
| 1781 | {
|
---|
| 1782 | if [ -z "$BUILD_LIBTPMS" ]; then
|
---|
| 1783 | test_header libtpms
|
---|
| 1784 | if which_wrapper pkg-config > /dev/null; then
|
---|
| 1785 | libtpms_ver=`pkg-config libtpms --modversion 2>> $LOG`
|
---|
| 1786 | if [ $? -eq 0 ]; then
|
---|
| 1787 | FLGTPMS=`pkg-config libtpms --cflags`
|
---|
| 1788 | INCTPMS=`strip_I "$FLGTPMS"`
|
---|
| 1789 | LIBTPMS=`pkg-config libtpms --libs`
|
---|
| 1790 | fi
|
---|
| 1791 | cat > $ODIR.tmp_src.cc << EOF
|
---|
| 1792 | #include <cstdio>
|
---|
| 1793 | #include <libtpms/tpm_library.h>
|
---|
| 1794 | extern "C" int main(void)
|
---|
| 1795 | {
|
---|
| 1796 | TPMLIB_MainInit();
|
---|
| 1797 | printf("found, OK.\n");
|
---|
| 1798 | }
|
---|
| 1799 | EOF
|
---|
| 1800 | [ -n "$INCTPMS" ] && I_INCTPMS=`prefix_I "$INCTPMS"`
|
---|
[91557] | 1801 | if test_compile "$LIBTPMS $I_INCTPMS" libtpms libtpms nofatal; then
|
---|
[91555] | 1802 | if test_execute; then
|
---|
| 1803 | cnf_append "SDK_VBOX_TPMS_INCS" "$INCTPMS"
|
---|
| 1804 | cnf_append "SDK_VBOX_TPMS_LIBS" "`strip_l "$LIBTPMS"`"
|
---|
[91557] | 1805 | fi
|
---|
| 1806 | else
|
---|
| 1807 | echo "not found -- building libtpms from in-tree code."
|
---|
[91555] | 1808 | fi
|
---|
| 1809 | fi
|
---|
| 1810 | fi
|
---|
| 1811 | }
|
---|
| 1812 |
|
---|
| 1813 |
|
---|
| 1814 | #
|
---|
[97397] | 1815 | # Check for libvorbis
|
---|
| 1816 | #
|
---|
| 1817 | check_libvorbis()
|
---|
| 1818 | {
|
---|
| 1819 | test_header libvorbis
|
---|
| 1820 | if which_wrapper pkg-config > /dev/null; then
|
---|
| 1821 | libvorbis_ver=`pkg-config vorbis --modversion 2>> $LOG`
|
---|
| 1822 | if [ $? -eq 0 ]; then
|
---|
| 1823 | FLGVRB=`pkg-config vorbis --cflags`
|
---|
| 1824 | INCVRB=`strip_I "$FLGVRB"`
|
---|
| 1825 | LIBVRB=`pkg-config vorbis --libs`
|
---|
| 1826 | fi
|
---|
| 1827 | cat > $ODIR.tmp_src.cc << EOF
|
---|
| 1828 | #include <cstdio>
|
---|
| 1829 | #include <vorbis/vorbisenc.h>
|
---|
| 1830 | extern "C" int main(void)
|
---|
| 1831 | {
|
---|
| 1832 | vorbis_info v;
|
---|
| 1833 | vorbis_info_init(&v);
|
---|
| 1834 | printf("found, OK.\n");
|
---|
| 1835 | return 0;
|
---|
| 1836 | }
|
---|
| 1837 | EOF
|
---|
| 1838 | [ -n "$INCVRB" ] && I_INCVRB=`prefix_I "$INCVRB"`
|
---|
| 1839 | if test_compile "$LIBVRB $I_INCVRB" vorbis vorbis nofatal; then
|
---|
| 1840 | if test_execute; then
|
---|
| 1841 | cnf_append "SDK_VBOX_VORBIS_INCS" "$INCVRB"
|
---|
| 1842 | cnf_append "SDK_VBOX_VORBIS_LIBS" "`strip_l "$LIBVRB"`"
|
---|
| 1843 | fi
|
---|
| 1844 | else
|
---|
| 1845 | echo "not found -- building libvorbis from in-tree code."
|
---|
| 1846 | fi
|
---|
| 1847 | fi
|
---|
| 1848 | }
|
---|
| 1849 |
|
---|
| 1850 |
|
---|
| 1851 | #
|
---|
| 1852 | # Check for libogg
|
---|
| 1853 | #
|
---|
| 1854 | check_libogg()
|
---|
| 1855 | {
|
---|
| 1856 | test_header libogg
|
---|
| 1857 | if which_wrapper pkg-config > /dev/null; then
|
---|
| 1858 | libogg_ver=`pkg-config ogg --modversion 2>> $LOG`
|
---|
| 1859 | if [ $? -eq 0 ]; then
|
---|
| 1860 | FLGOGG=`pkg-config ogg --cflags`
|
---|
| 1861 | INCOGG=`strip_I "$FLGOGG"`
|
---|
| 1862 | LIBOGG=`pkg-config ogg --libs`
|
---|
| 1863 | fi
|
---|
| 1864 | cat > $ODIR.tmp_src.cc << EOF
|
---|
| 1865 | #include <cstdio>
|
---|
| 1866 | #include <ogg/ogg.h>
|
---|
| 1867 | extern "C" int main(void)
|
---|
| 1868 | {
|
---|
| 1869 | oggpack_buffer o;
|
---|
| 1870 | oggpack_get_buffer(&o);
|
---|
| 1871 | printf("found, OK.\n");
|
---|
| 1872 | return 0;
|
---|
| 1873 | }
|
---|
| 1874 | EOF
|
---|
| 1875 | [ -n "$INCOGG" ] && I_INCVRB=`prefix_I "$INCOGG"`
|
---|
| 1876 | if test_compile "$LIBOGG $I_INCOGG" ogg ogg nofatal; then
|
---|
| 1877 | if test_execute; then
|
---|
| 1878 | cnf_append "SDK_VBOX_OGG_INCS" "$INCOGG"
|
---|
| 1879 | cnf_append "SDK_VBOX_OGG_LIBS" "`strip_l "$LIBOGG"`"
|
---|
| 1880 | fi
|
---|
| 1881 | else
|
---|
| 1882 | echo "not found -- building libogg from in-tree code."
|
---|
| 1883 | fi
|
---|
| 1884 | fi
|
---|
| 1885 | }
|
---|
| 1886 |
|
---|
| 1887 |
|
---|
| 1888 | #
|
---|
[18084] | 1889 | # Check whether static libstdc++ is installed. This library is required
|
---|
| 1890 | # for the Linux guest additions.
|
---|
[5366] | 1891 | #
|
---|
| 1892 | check_staticlibstdcxx()
|
---|
| 1893 | {
|
---|
| 1894 | test_header "static stc++ library"
|
---|
| 1895 | libstdcxx=`$CXX -print-file-name=libstdc++.a`
|
---|
[16202] | 1896 | cat > $ODIR.tmp_src.cc << EOF
|
---|
[5366] | 1897 | #include <string>
|
---|
| 1898 |
|
---|
| 1899 | extern "C" int main(void)
|
---|
| 1900 | {
|
---|
| 1901 | std::string s = "test";
|
---|
| 1902 | return 0;
|
---|
| 1903 | }
|
---|
| 1904 | EOF
|
---|
| 1905 | if test_compile "$libstdcxx" libstdc++ libstdc++; then
|
---|
| 1906 | log_success "found"
|
---|
| 1907 | fi
|
---|
| 1908 | }
|
---|
| 1909 |
|
---|
[11735] | 1910 |
|
---|
[5366] | 1911 | #
|
---|
[1] | 1912 | # Check for Linux sources
|
---|
| 1913 | #
|
---|
[3163] | 1914 | check_linux()
|
---|
[1] | 1915 | {
|
---|
| 1916 | test_header "Linux kernel sources"
|
---|
[16202] | 1917 | cat > $ODIR.tmp_src.c << EOF
|
---|
[1] | 1918 | #include <linux/version.h>
|
---|
| 1919 | int printf(const char *format, ...);
|
---|
| 1920 | int main(void)
|
---|
| 1921 | {
|
---|
[24] | 1922 | printf("found version %d.%d.%d", LINUX_VERSION_CODE / 65536,
|
---|
[1] | 1923 | (LINUX_VERSION_CODE % 65536) / 256,
|
---|
| 1924 | LINUX_VERSION_CODE % 256);
|
---|
| 1925 | #if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,0)
|
---|
| 1926 | printf(", OK.\n");
|
---|
| 1927 | return 0;
|
---|
| 1928 | #else
|
---|
| 1929 | printf(", expected version 2.4.0 or higher\n");
|
---|
| 1930 | return 1;
|
---|
| 1931 | #endif
|
---|
| 1932 | }
|
---|
[3163] | 1933 | EOF
|
---|
[1] | 1934 | echo "compiling the following source file:" >> $LOG
|
---|
[16202] | 1935 | cat $ODIR.tmp_src.c >> $LOG
|
---|
[1] | 1936 | echo "using the following command line:" >> $LOG
|
---|
[45204] | 1937 | echo "$CC -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c -nostdinc -I$LINUX/include " \
|
---|
| 1938 | "-I$LINUX/include/generated/uapi" >> $LOG
|
---|
[43674] | 1939 | $CC -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c -nostdinc -I$LINUX/include \
|
---|
| 1940 | -I$LINUX/include/generated/uapi >> $LOG 2>&1
|
---|
[3163] | 1941 | if [ $? -ne 0 ]; then
|
---|
[3328] | 1942 | echo
|
---|
| 1943 | echo " Linux kernel headers not found at $LINUX"
|
---|
| 1944 | echo " Check the file $LOG for detailed error information."
|
---|
[1] | 1945 | fail
|
---|
| 1946 | else
|
---|
| 1947 | if test_execute; then
|
---|
[70497] | 1948 | cnf_append "VBOX_LINUX_SRC" "`cd $LINUX ; pwd`"
|
---|
[1] | 1949 | fi
|
---|
| 1950 | fi
|
---|
| 1951 | }
|
---|
| 1952 |
|
---|
| 1953 | #
|
---|
| 1954 | # Check for kchmviewer, needed to display the online help
|
---|
[11735] | 1955 | # (unused as we ship kchmviewer)
|
---|
[1] | 1956 | #
|
---|
[3163] | 1957 | check_kchmviewer()
|
---|
[1] | 1958 | {
|
---|
| 1959 | test_header kchmviewer
|
---|
| 1960 | if check_avail "$KCHMVIEWER" KCHMVIEWER; then
|
---|
| 1961 | kchmviewer_ver=`$KCHMVIEWER --version|grep "^KchmViewer:"|sed 's+^KchmViewer: \(.*\)+\1+'`
|
---|
[3163] | 1962 | if [ $? -ne 0 ]; then
|
---|
[33515] | 1963 | log_failure "kchmviewer not working"
|
---|
[1] | 1964 | fail
|
---|
| 1965 | else
|
---|
| 1966 | log_success "found version $kchmviewer_ver"
|
---|
| 1967 | fi
|
---|
| 1968 | fi
|
---|
| 1969 | }
|
---|
| 1970 |
|
---|
[11735] | 1971 |
|
---|
[1] | 1972 | #
|
---|
| 1973 | # Check for the kBuild tools, we don't support GNU make
|
---|
| 1974 | #
|
---|
[3163] | 1975 | check_kbuild()
|
---|
[1] | 1976 | {
|
---|
| 1977 | test_header kBuild
|
---|
[6199] | 1978 | if which_wrapper "$KBUILDDIR/bin/$OS.$BUILD_MACHINE/kmk" > /dev/null; then
|
---|
| 1979 | KBUILDDIR_BIN="$KBUILDDIR/bin/$OS.$BUILD_MACHINE"
|
---|
[84934] | 1980 |
|
---|
| 1981 | echo "KBUILD_PATH=\"`cd $KBUILDDIR ; pwd`\"" >> $ENV
|
---|
| 1982 | echo "KBUILD_DEVTOOLS=\"$DEVDIR\"" >> $ENV
|
---|
| 1983 | echo 'path_kbuild_bin="$KBUILD_PATH/bin/$BUILD_TARGET.$BUILD_PLATFORM_ARCH"' >> $ENV
|
---|
| 1984 | echo 'path_tools_bin="$KBUILD_DEVTOOLS/$BUILD_TARGET.$BUILD_PLATFORM_ARCH/bin"' >> $ENV
|
---|
| 1985 |
|
---|
[4757] | 1986 | if [ "$OS" = "solaris" ]; then
|
---|
| 1987 | # Because of sh being non-default shell in Solaris we need to export PATH again when
|
---|
| 1988 | # sourcing env.sh. Simply exporting from ./configure does not export PATH correctly.
|
---|
[5536] | 1989 | echo "PATH=\"$ORGPATH\"" >> $ENV
|
---|
[4757] | 1990 | echo "echo \"\$PATH\" | /usr/sfw/bin/ggrep -q \"\$path_kbuild_bin\" || PATH=\"\$path_kbuild_bin:\$PATH\"" >> $ENV
|
---|
[84934] | 1991 | echo "echo \"\$PATH\" | /usr/sfw/bin/ggrep -q \"\$path_tools_bin\" || PATH=\"\$path_tools_bin:\$PATH\"" >> $ENV
|
---|
[4757] | 1992 | else
|
---|
| 1993 | echo "echo \"\$PATH\" | grep -q \"\$path_kbuild_bin\" || PATH=\"\$path_kbuild_bin:\$PATH\"" >> $ENV
|
---|
[84934] | 1994 | echo "echo \"\$PATH\" | grep -q \"\$path_tools_bin\" || PATH=\"\$path_tools_bin:\$PATH\"" >> $ENV
|
---|
[4757] | 1995 | fi
|
---|
[84934] | 1996 | echo "export KBUILD_PATH KBUILD_DEVTOOLS PATH" >> $ENV
|
---|
| 1997 | echo "unset path_kbuild_bin path_tools_bin" >> $ENV
|
---|
[6199] | 1998 | KBUILD_SED="$KBUILDDIR_BIN/kmk_sed"
|
---|
[84934] | 1999 |
|
---|
| 2000 | echo '' >> $ENV
|
---|
| 2001 | echo "# Legacy - do not use:" >> $ENV
|
---|
| 2002 | echo 'PATH_KBUILD=${KBUILD_PATH}' >> $ENV
|
---|
| 2003 | echo 'PATH_DEVTOOLS=${KBUILD_DEVTOOLS}' >> $ENV
|
---|
| 2004 | echo 'export PATH_KBUILD PATH_DEVTOOLS' >> $ENV
|
---|
| 2005 | echo '' >> $ENV
|
---|
[6199] | 2006 | elif check_avail "kmk" KBUILDDIR really; then
|
---|
| 2007 | # check for installed kBuild
|
---|
| 2008 | KBUILD_SED="`which_wrapper kmk_sed`"
|
---|
| 2009 | else
|
---|
| 2010 | fail
|
---|
[1] | 2011 | fi
|
---|
[6199] | 2012 | log_success "found"
|
---|
[1] | 2013 | }
|
---|
| 2014 |
|
---|
[923] | 2015 |
|
---|
[1] | 2016 | #
|
---|
[923] | 2017 | # Check for compiler.h
|
---|
[9133] | 2018 | # Some Linux distributions include "compiler.h" in their libc linux
|
---|
| 2019 | # headers package, some don't. Most don't need it, building might (!)
|
---|
[923] | 2020 | # not succeed on openSUSE without it.
|
---|
| 2021 | #
|
---|
| 2022 | # See http://www.mail-archive.com/qemu-devel%40nongnu.org/msg07980.html
|
---|
| 2023 | #
|
---|
[3163] | 2024 | check_compiler_h()
|
---|
[923] | 2025 | {
|
---|
| 2026 | test_header compiler.h
|
---|
[58367] | 2027 | if test ! -f "/usr/include/linux/compiler.h"; then
|
---|
[923] | 2028 | log_success "compiler.h not found"
|
---|
| 2029 | else
|
---|
[18866] | 2030 | cnf_append "VBOX_WITH_LINUX_COMPILER_H" "1"
|
---|
[923] | 2031 | log_success "compiler.h found"
|
---|
| 2032 | fi
|
---|
| 2033 | }
|
---|
| 2034 |
|
---|
[15247] | 2035 | #
|
---|
| 2036 | # Check for libcap.
|
---|
| 2037 | # Required to pass CAP_NET_RAW to our binaries to allow to open SOCK_RAW
|
---|
| 2038 | # sockets for doing ICMP requests.
|
---|
| 2039 | #
|
---|
| 2040 | check_libcap()
|
---|
| 2041 | {
|
---|
| 2042 | test_header "libcap library"
|
---|
[16202] | 2043 | cat > $ODIR.tmp_src.cc << EOF
|
---|
[15247] | 2044 | #include <cstdio>
|
---|
[19094] | 2045 | #include <sys/types.h>
|
---|
[39547] | 2046 | #include <linux/types.h>
|
---|
[15247] | 2047 | #include <sys/capability.h>
|
---|
[923] | 2048 |
|
---|
[15247] | 2049 | extern "C" int main(void)
|
---|
| 2050 | {
|
---|
[15608] | 2051 | char buf[1024];
|
---|
[15247] | 2052 | cap_t caps = cap_get_proc();
|
---|
[15608] | 2053 | snprintf(buf, sizeof(buf), "Current caps are '%s'\n", cap_to_text(caps, NULL));
|
---|
[15247] | 2054 | return 0;
|
---|
| 2055 | }
|
---|
| 2056 | EOF
|
---|
| 2057 | if test_compile $LIBCAP libcap libcap; then
|
---|
| 2058 | if test_execute; then
|
---|
| 2059 | log_success "found"
|
---|
| 2060 | fi
|
---|
| 2061 | fi
|
---|
| 2062 | }
|
---|
| 2063 |
|
---|
[923] | 2064 | #
|
---|
[4446] | 2065 | # Check if we are able to build 32-bit applications (needed for the guest additions)
|
---|
| 2066 | #
|
---|
| 2067 | check_32bit()
|
---|
| 2068 | {
|
---|
| 2069 | test_header "32-bit support"
|
---|
[16202] | 2070 | cat > $ODIR.tmp_src.c << EOF
|
---|
[4446] | 2071 | #include <stdint.h>
|
---|
| 2072 | int main(void)
|
---|
| 2073 | {
|
---|
| 2074 | return 0;
|
---|
| 2075 | }
|
---|
| 2076 | EOF
|
---|
| 2077 | echo "compiling the following source file:" >> $LOG
|
---|
[16202] | 2078 | cat $ODIR.tmp_src.c >> $LOG
|
---|
[4446] | 2079 | echo "using the following command line:" >> $LOG
|
---|
[16202] | 2080 | echo "$CC -m32 -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c" >> $LOG
|
---|
| 2081 | $CC -m32 -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c >> $LOG 2>&1
|
---|
[4446] | 2082 | if [ $? -ne 0 ]; then
|
---|
| 2083 | echo
|
---|
| 2084 | echo " Cannot compile 32-bit applications (missing headers and/or libraries)!"
|
---|
| 2085 | echo " Check the file $LOG for detailed error information."
|
---|
| 2086 | fail
|
---|
[32176] | 2087 | else
|
---|
| 2088 | echo "executing the binary" >> $LOG
|
---|
| 2089 | $ODIR.tmp_out 2> $ODIR.test_execute.log
|
---|
| 2090 | rc=$?
|
---|
| 2091 | cat $ODIR.test_execute.log >> $LOG
|
---|
| 2092 | if [ $rc -ne 0 ]; then
|
---|
| 2093 | echo
|
---|
| 2094 | echo " Cannot execute 32-bit applications! Either enable 32-bit support in the"
|
---|
| 2095 | echo " kernel configuration or use --disable-vmmraw to disable 32-bit guests."
|
---|
| 2096 | fail
|
---|
| 2097 | return 1
|
---|
| 2098 | fi
|
---|
[4446] | 2099 | fi
|
---|
| 2100 | log_success ""
|
---|
| 2101 | }
|
---|
| 2102 |
|
---|
[11735] | 2103 |
|
---|
[5041] | 2104 | #
|
---|
[11735] | 2105 | # Check for Python
|
---|
| 2106 | #
|
---|
| 2107 | check_python()
|
---|
| 2108 | {
|
---|
[30998] | 2109 | test_header "Python support"
|
---|
[22752] | 2110 |
|
---|
| 2111 | # On darwin this is a on/off decision only
|
---|
| 2112 | if [ "$OS" = "darwin" ]; then
|
---|
| 2113 | echo "enabled"
|
---|
| 2114 | cnf_append "VBOX_WITH_PYTHON" "1"
|
---|
| 2115 | return
|
---|
| 2116 | fi
|
---|
| 2117 |
|
---|
[16202] | 2118 | cat > $ODIR.tmp_src.cc << EOF
|
---|
[11735] | 2119 | #include <cstdio>
|
---|
| 2120 | #include <Python.h>
|
---|
| 2121 | extern "C" int main(void)
|
---|
| 2122 | {
|
---|
| 2123 | Py_Initialize();
|
---|
| 2124 | printf("found version %s", PY_VERSION);
|
---|
[61131] | 2125 | #if PY_VERSION_HEX >= 0x02060000
|
---|
[11735] | 2126 | printf(", OK.\n");
|
---|
| 2127 | return 0;
|
---|
| 2128 | #else
|
---|
[61131] | 2129 | printf(", expected version 2.6 or higher\n");
|
---|
[11735] | 2130 | return 1;
|
---|
| 2131 | #endif
|
---|
| 2132 | }
|
---|
| 2133 | EOF
|
---|
| 2134 | found=
|
---|
[90537] | 2135 | 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 python3.9 python3.9m python3.10 python3.10m"
|
---|
[11735] | 2136 | for p in $PYTHONDIR; do
|
---|
[18904] | 2137 | for d in $SUPPYTHONLIBS; do
|
---|
[45204] | 2138 | for b in lib/x86_64-linux-gnu lib/i386-linux-gnu lib64 lib/64 lib; do
|
---|
[11735] | 2139 | echo "compiling the following source file:" >> $LOG
|
---|
[16202] | 2140 | cat $ODIR.tmp_src.cc >> $LOG
|
---|
[11735] | 2141 | echo "using the following command line:" >> $LOG
|
---|
[16202] | 2142 | echo "$CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so" >> $LOG
|
---|
| 2143 | $CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so >> $LOG 2>&1
|
---|
[11735] | 2144 | if [ $? -eq 0 ]; then
|
---|
| 2145 | found=1
|
---|
| 2146 | break
|
---|
| 2147 | fi
|
---|
| 2148 | done
|
---|
| 2149 | if [ -n "$found" ]; then break; fi
|
---|
| 2150 | done
|
---|
| 2151 | if [ -n "$found" ]; then break; fi
|
---|
| 2152 | done
|
---|
| 2153 | if [ -n "$found" ]; then
|
---|
| 2154 | if test_execute; then
|
---|
| 2155 | cnf_append "VBOX_WITH_PYTHON" "1"
|
---|
| 2156 | cnf_append "VBOX_PATH_PYTHON_INC" "$p/include/$d"
|
---|
| 2157 | cnf_append "VBOX_LIB_PYTHON" "$p/$b/lib$d.so"
|
---|
| 2158 | else
|
---|
[33515] | 2159 | log_failure "Python not working"
|
---|
[11735] | 2160 | fail
|
---|
| 2161 | fi
|
---|
| 2162 | else
|
---|
[33515] | 2163 | log_failure "Python not found"
|
---|
[11735] | 2164 | fail
|
---|
| 2165 | fi
|
---|
| 2166 | }
|
---|
| 2167 |
|
---|
| 2168 |
|
---|
| 2169 | #
|
---|
[30998] | 2170 | # Check for Java
|
---|
| 2171 | #
|
---|
| 2172 | check_java()
|
---|
| 2173 | {
|
---|
| 2174 | test_header "Java support"
|
---|
| 2175 | log_success
|
---|
| 2176 | }
|
---|
| 2177 |
|
---|
| 2178 |
|
---|
| 2179 | #
|
---|
[5041] | 2180 | # Setup wine
|
---|
| 2181 | #
|
---|
| 2182 | setup_wine()
|
---|
| 2183 | {
|
---|
[5069] | 2184 | test_header "Wine support"
|
---|
[5044] | 2185 | if ! which_wrapper wine > /dev/null; then
|
---|
[5069] | 2186 | echo " wine binary not found"
|
---|
[5044] | 2187 | fail
|
---|
| 2188 | fi
|
---|
[37089] | 2189 | if ! which_wrapper wine > /dev/null; then
|
---|
| 2190 | echo " wine not found"
|
---|
[5044] | 2191 | fail
|
---|
| 2192 | fi
|
---|
[37089] | 2193 | wine_version="`wine --version`"
|
---|
| 2194 | case "`expr "$wine_version" : 'wine-\([0-9.]*\)' '>' 1.1.43`" in
|
---|
| 2195 | "0")
|
---|
| 2196 | if ! which_wrapper wineprefixcreate > /dev/null; then
|
---|
| 2197 | echo " wineprefixcreate not found"
|
---|
| 2198 | fail
|
---|
| 2199 | fi
|
---|
| 2200 | ;;
|
---|
| 2201 | *) eval "wineprefixcreate() { true ; }" ;; # now created automatically
|
---|
| 2202 | esac
|
---|
[5041] | 2203 | export WINEPREFIX="${ODIR}wine.$BUILD_MACHINE"
|
---|
[26687] | 2204 | echo "WINEPREFIX=\"${ODIR}wine.$BUILD_MACHINE\"" >> $ENV
|
---|
| 2205 | echo "export WINEPREFIX" >> $ENV
|
---|
[5041] | 2206 | rm -rf $WINEPREFIX
|
---|
| 2207 | mkdir -p $WINEPREFIX
|
---|
| 2208 | touch $WINEPREFIX/.no_prelaunch_window_flag
|
---|
[5044] | 2209 | if ! wineprefixcreate -q > /dev/null 2>&1; then
|
---|
[5041] | 2210 | echo " wineprefixcreate failed"
|
---|
| 2211 | fail
|
---|
| 2212 | fi
|
---|
| 2213 | tmp=.tmp.wine.reg
|
---|
| 2214 | rm -f $tmp
|
---|
| 2215 | echo 'REGEDIT4' > $tmp
|
---|
| 2216 | echo '' >> $tmp
|
---|
| 2217 | echo '[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment]' >> $tmp
|
---|
| 2218 | echo "\"PATH\"=\"c:\\\\\\\\windows\\\\\\\\system32;c:\\\\\\\\windows;z:$DEVDIR/win.x86/vcc/v8/bin/Microsoft.VC80.CRT;z:$DEVDIR/win.x86/HTML_Help_Workshop/v1.3\"" >> $tmp
|
---|
| 2219 | echo '' >> $tmp
|
---|
| 2220 | echo '[HKEY_CURRENT_USER\Software\Wine\AppDefaults\hhc.exe\DllOverrides]' >> $tmp
|
---|
| 2221 | echo '"itss"="native"' >> $tmp
|
---|
| 2222 | echo '' >> $tmp
|
---|
| 2223 | echo '[HKEY_CURRENT_USER\Software\Wine\AppDefaults\hhw.exe\DllOverrides]' >> $tmp
|
---|
| 2224 | echo '"itss"="native"' >> $tmp
|
---|
| 2225 | echo '' >> $tmp
|
---|
[5044] | 2226 | if ! wine regedit $tmp > /dev/null 2>&1; then
|
---|
[5041] | 2227 | rm -f $tmp
|
---|
| 2228 | echo " failed to load registry changes (path)."
|
---|
| 2229 | fail
|
---|
| 2230 | fi
|
---|
| 2231 | rm -f $tmp
|
---|
[5069] | 2232 | log_success "found"
|
---|
[5041] | 2233 | }
|
---|
[4446] | 2234 |
|
---|
[31639] | 2235 |
|
---|
[16139] | 2236 | #
|
---|
[16994] | 2237 | # Check for gSOAP.
|
---|
[16139] | 2238 | #
|
---|
| 2239 | check_gsoap()
|
---|
| 2240 | {
|
---|
| 2241 | test_header "GSOAP compiler"
|
---|
[40494] | 2242 | if [ -z "$GSOAP" -a -z "$GSOAP_IMPORT" ]; then
|
---|
| 2243 | if which_wrapper pkg-config > /dev/null; then
|
---|
| 2244 | GSOAP_CXX_LIBS=`pkg-config gsoapssl++ --libs 2>> $LOG`
|
---|
| 2245 | if [ $? -eq 0 ]; then
|
---|
| 2246 | GSOAP=`pkg-config gsoapssl++ --variable=exec_prefix`
|
---|
| 2247 | GSOAP_IMPORT="$GSOAP/share/gsoap/import"
|
---|
| 2248 | if [ ! -d "$GSOAP_IMPORT" -a -d "$GSOAP/include/gsoap" ]; then
|
---|
| 2249 | GSOAP_IMPORT="$GSOAP/include/gsoap"
|
---|
| 2250 | fi
|
---|
| 2251 | cnf_append "VBOX_GSOAP_INSTALLED" "1"
|
---|
| 2252 | cnf_append "VBOX_PATH_GSOAP" "$GSOAP"
|
---|
| 2253 | cnf_append "VBOX_PATH_GSOAP_IMPORT" "$GSOAP_IMPORT"
|
---|
| 2254 | if [ -f "$GSOAP/share/gsoap/stdsoap2.cpp" ]; then
|
---|
| 2255 | cnf_append "VBOX_GSOAP_CXX_SOURCES" "$GSOAP/share/gsoap/stdsoap2.cpp"
|
---|
| 2256 | else
|
---|
| 2257 | cnf_append "VBOX_GSOAP_CXX_SOURCES" ""
|
---|
| 2258 | fi
|
---|
[40495] | 2259 | cnf_append "VBOX_GSOAP_CXX_LIBS" "`strip_l "$GSOAP_CXX_LIBS"`"
|
---|
[40494] | 2260 | gsoap_version=`pkg-config gsoapssl++ --modversion`
|
---|
| 2261 | log_success "found version $gsoap_version"
|
---|
| 2262 | return
|
---|
| 2263 | fi
|
---|
| 2264 | fi
|
---|
[90402] | 2265 | if [ -d "$DEVDIR/common/gsoap" ]; then
|
---|
| 2266 | GSOAP_DIR=`ls -d1 "$DEVDIR"/common/gsoap/v* 2>/dev/null | tail -1`
|
---|
| 2267 | if [ -n "$GSOAP_DIR" -a -d "$GSOAP_DIR" ]; then
|
---|
| 2268 | gsoap_version=`echo "$GSOAP_DIR" | sed -ne 's/^.*\/v\([1-9][0-9.]*\).*$/\1/p'`
|
---|
| 2269 | log_success "found gSOAP tool version $gsoap_version"
|
---|
| 2270 | # No need to configure anything, the build system knows what to do.
|
---|
| 2271 | return
|
---|
| 2272 | fi
|
---|
| 2273 | fi
|
---|
[40494] | 2274 | fi
|
---|
[16139] | 2275 | if [ -z "$GSOAP" ]; then
|
---|
[16994] | 2276 | GSOAP="/usr"
|
---|
[16139] | 2277 | fi
|
---|
[16994] | 2278 | if which_wrapper "$GSOAP/bin/soapcpp2" > /dev/null; then
|
---|
| 2279 | if which_wrapper "$GSOAP/bin/wsdl2h" > /dev/null; then
|
---|
| 2280 | if [ -f "$GSOAP/include/stdsoap2.h" ]; then
|
---|
| 2281 | # TODO: Check for libgsoap++.a/so
|
---|
| 2282 |
|
---|
| 2283 | if [ -z "$GSOAP_IMPORT" ]; then
|
---|
| 2284 | GSOAP_IMPORT="$GSOAP/share/gsoap/import"
|
---|
| 2285 | if [ ! -d "$GSOAP_IMPORT" -a -d "$GSOAP/include/gsoap" ]; then
|
---|
| 2286 | GSOAP_IMPORT="$GSOAP/include/gsoap"
|
---|
| 2287 | fi
|
---|
| 2288 | fi
|
---|
| 2289 | if [ -f "$GSOAP_IMPORT/stlvector.h" ]; then
|
---|
| 2290 | cnf_append "VBOX_GSOAP_INSTALLED" "1"
|
---|
| 2291 | cnf_append "VBOX_PATH_GSOAP" "$GSOAP"
|
---|
| 2292 | cnf_append "VBOX_PATH_GSOAP_IMPORT" "$GSOAP_IMPORT"
|
---|
[18126] | 2293 | if [ -f "$GSOAP/share/gsoap/stdsoap2.cpp" ]; then
|
---|
| 2294 | cnf_append "VBOX_GSOAP_CXX_SOURCES" "$GSOAP/share/gsoap/stdsoap2.cpp"
|
---|
| 2295 | else
|
---|
| 2296 | cnf_append "VBOX_GSOAP_CXX_SOURCES" ""
|
---|
| 2297 | fi
|
---|
[40477] | 2298 | cnf_append "VBOX_GSOAP_CXX_LIBS" "libgsoapssl++"
|
---|
[16994] | 2299 | log_success "found"
|
---|
| 2300 | else
|
---|
| 2301 | log_failure "stlvector.h not found -- disabling webservice"
|
---|
| 2302 | cnf_append "VBOX_WITH_WEBSERVICES" ""
|
---|
| 2303 | fi
|
---|
| 2304 | else
|
---|
| 2305 | log_failure "stdsoap2.h not found -- disabling webservice"
|
---|
| 2306 | cnf_append "VBOX_WITH_WEBSERVICES" ""
|
---|
| 2307 | fi
|
---|
[16139] | 2308 | else
|
---|
| 2309 | log_failure "wsdl2h not found -- disabling webservice"
|
---|
[16144] | 2310 | cnf_append "VBOX_WITH_WEBSERVICES" ""
|
---|
[16139] | 2311 | fi
|
---|
| 2312 | else
|
---|
| 2313 | log_failure "soapcpp2 not found -- disabling webservice"
|
---|
[16144] | 2314 | cnf_append "VBOX_WITH_WEBSERVICES" ""
|
---|
[16139] | 2315 | fi
|
---|
| 2316 | }
|
---|
[5041] | 2317 |
|
---|
[16139] | 2318 |
|
---|
[4446] | 2319 | #
|
---|
[8464] | 2320 | # Determines the Darwin version.
|
---|
[8070] | 2321 | #
|
---|
| 2322 | check_darwinversion()
|
---|
| 2323 | {
|
---|
| 2324 | test_header "Darwin version"
|
---|
| 2325 | darwin_ver=`uname -r`
|
---|
| 2326 | case "$darwin_ver" in
|
---|
[87614] | 2327 | 20\.*)
|
---|
| 2328 | darwin_ver="11.0" # Big Sur
|
---|
| 2329 | ;;
|
---|
[84900] | 2330 | 19\.*)
|
---|
| 2331 | darwin_ver="10.15" # Catalina
|
---|
| 2332 | ;;
|
---|
| 2333 | 18\.*)
|
---|
| 2334 | darwin_ver="10.14" # Mojave
|
---|
| 2335 | ;;
|
---|
[68477] | 2336 | 17\.*)
|
---|
| 2337 | darwin_ver="10.13" # High Sierra
|
---|
| 2338 | ;;
|
---|
[67198] | 2339 | 16\.*)
|
---|
[67280] | 2340 | darwin_ver="10.12" # Sierra
|
---|
[67198] | 2341 | ;;
|
---|
[59405] | 2342 | 15\.*)
|
---|
| 2343 | darwin_ver="10.11" # El Capitan
|
---|
| 2344 | ;;
|
---|
[51645] | 2345 | 14\.*)
|
---|
| 2346 | darwin_ver="10.10" # Yosemite
|
---|
| 2347 | ;;
|
---|
| 2348 | 13\.*)
|
---|
| 2349 | darwin_ver="10.9" # Mavericks
|
---|
| 2350 | ;;
|
---|
[8070] | 2351 | *)
|
---|
[22259] | 2352 | echo " failed to determine Darwin version. (uname -r: $darwin_ver)"
|
---|
[8070] | 2353 | fail
|
---|
| 2354 | darwin_ver="unknown"
|
---|
| 2355 | ;;
|
---|
| 2356 | esac
|
---|
[84900] | 2357 |
|
---|
[87614] | 2358 | log_success "found version $darwin_ver"
|
---|
| 2359 | }
|
---|
| 2360 |
|
---|
| 2361 | #
|
---|
| 2362 | # Check Xcode path
|
---|
| 2363 | #
|
---|
| 2364 | check_xcode_path()
|
---|
| 2365 | {
|
---|
| 2366 | # Check if WITH_XCODE_DIR is set.
|
---|
| 2367 | if [ -z "$WITH_XCODE_DIR" ]; then
|
---|
| 2368 | if [ -d "/Library/Developer/CommandLineTools" -a -f "/Library/Developer/CommandLineTools/usr/bin/clang" ]; then
|
---|
| 2369 | return 1
|
---|
| 2370 | else
|
---|
| 2371 | echo "Please specify --with-xcode-dir option."
|
---|
| 2372 | return 0
|
---|
| 2373 | fi
|
---|
| 2374 | fi
|
---|
| 2375 |
|
---|
| 2376 | # Check if specified path exists and is a directory containing Xcode.
|
---|
| 2377 | if [ -d "$1" -a -f "$1/Contents/Developer/usr/bin/xcodebuild" ]; then
|
---|
| 2378 | return 1
|
---|
| 2379 | else
|
---|
| 2380 | echo "Xcode path [$1] not found."
|
---|
| 2381 | return 0
|
---|
| 2382 | fi
|
---|
| 2383 | }
|
---|
| 2384 |
|
---|
| 2385 | check_xcode()
|
---|
| 2386 | {
|
---|
| 2387 | test_header "Xcode and SDK"
|
---|
| 2388 | check_xcode_path "$WITH_XCODE_DIR"
|
---|
[84900] | 2389 | [ $? -eq 1 ] || fail
|
---|
| 2390 |
|
---|
| 2391 | # Pick the oldest SDK offered by Xcode, to get maximum compatibility
|
---|
[87614] | 2392 | if [ -z "$WITH_XCODE_DIR" ]; then
|
---|
| 2393 | devel_subdir="/Library/Developer/CommandLineTools"
|
---|
| 2394 | sdk_subdir="$devel_subdir/SDKs"
|
---|
| 2395 | else
|
---|
| 2396 | devel_subdir="$WITH_XCODE_DIR/Contents/Developer"
|
---|
| 2397 | sdk_subdir="$devel_subdir/Platforms/MacOSX.platform/Developer/SDKs"
|
---|
| 2398 | fi
|
---|
[84900] | 2399 | sdk_tries="$sdk_subdir"/MacOSX10.?.sdk" $sdk_subdir"/MacOSX10.??.sdk" $sdk_subdir"/MacOSX.sdk
|
---|
| 2400 | for t in $sdk_tries; do
|
---|
| 2401 | if [ -f "$t/SDKSettings.plist" ]; then
|
---|
| 2402 | sdk="$t"
|
---|
| 2403 | sdk_ver=`defaults read "$t/SDKSettings.plist" Version`
|
---|
| 2404 | break
|
---|
| 2405 | fi
|
---|
| 2406 | done
|
---|
| 2407 | if [ -z "$sdk" ]; then
|
---|
| 2408 | echo " failed to determine SDK directory. ($sdk_subdir/MacOSX*.sdk/SDKSettings.plist should exist)"
|
---|
| 2409 | fail
|
---|
| 2410 | fi
|
---|
[87614] | 2411 | xcode_ver=`$devel_subdir/usr/bin/clang --version | sed -n 's/^.*version \([0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\).*$/\1/p'`
|
---|
| 2412 | if [ $? -ne 0 -o -z "$xcode_ver" ]; then
|
---|
| 2413 | echo " failed to determine Xcode version."
|
---|
| 2414 | fail
|
---|
| 2415 | fi
|
---|
[84900] | 2416 |
|
---|
[87614] | 2417 | if [ -z "$WITH_XCODE_DIR" ]; then
|
---|
| 2418 | cnf_append "VBOX_WITH_EVEN_NEWER_XCODE" "1"
|
---|
| 2419 | else
|
---|
| 2420 | cnf_append "VBOX_WITH_MACOSX_COMPILERS_FROM_DEVEL" "1"
|
---|
| 2421 | cnf_append "PATH_TOOL_VBoxXcode62" "$devel_subdir"
|
---|
| 2422 | cnf_append "VBOX_PATH_MACOSX_DEVEL_ROOT" "$devel_subdir"
|
---|
| 2423 | fi
|
---|
[84900] | 2424 | cnf_append "VBOX_PATH_MACOSX_SDK" "$sdk"
|
---|
| 2425 | if [ -n "$sdk_ver" ]; then
|
---|
| 2426 | cnf_append "VBOX_DEF_MACOSX_VERSION_MIN" "$sdk_ver"
|
---|
| 2427 | cnf_append "VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6" "1"
|
---|
| 2428 | fi
|
---|
| 2429 |
|
---|
[87614] | 2430 | log_success "found version $xcode_ver (SDK: $sdk)"
|
---|
[8070] | 2431 | }
|
---|
| 2432 |
|
---|
| 2433 |
|
---|
[31639] | 2434 | check_makeself()
|
---|
| 2435 | {
|
---|
| 2436 | test_header "makeself"
|
---|
| 2437 | if check_avail "$MAKESELF" makeself; then
|
---|
| 2438 | makeself_ver=`$MAKESELF --version|grep version|sed 's+^Makeself.*version \([0-9\.]*\).*+\1+'`
|
---|
| 2439 | if [ $? -ne 0 ]; then
|
---|
[33515] | 2440 | log_failure "makeself not working"
|
---|
[31639] | 2441 | fail
|
---|
| 2442 | else
|
---|
| 2443 | log_success "found version $makeself_ver"
|
---|
| 2444 | cnf_append "VBOX_MAKESELF" "`which_wrapper $MAKESELF`"
|
---|
| 2445 | fi
|
---|
| 2446 | fi
|
---|
| 2447 | }
|
---|
| 2448 |
|
---|
| 2449 |
|
---|
[8070] | 2450 | #
|
---|
[1] | 2451 | # Show help
|
---|
| 2452 | #
|
---|
[3163] | 2453 | show_help()
|
---|
[1] | 2454 | {
|
---|
[22739] | 2455 | cat << EOF
|
---|
[1] | 2456 | Usage: ./configure [OPTIONS]...
|
---|
| 2457 |
|
---|
| 2458 | Configuration:
|
---|
[4785] | 2459 | -h, --help display this help and exit
|
---|
| 2460 | --nofatal don't abort on errors
|
---|
[22739] | 2461 | EOF
|
---|
[22743] | 2462 | [ $WITH_XPCOM -eq 1 ] && echo " --disable-xpcom disable XPCOM and related stuff"
|
---|
| 2463 | [ $WITH_PYTHON -eq 1 ] && echo " --disable-python disable python bindings"
|
---|
[30998] | 2464 | [ $WITH_JAVA -eq 1 ] && echo " --disable-java disable java bindings"
|
---|
[26695] | 2465 | [ $WITH_VMMRAW -eq 1 ] && echo " --disable-vmmraw disable VMM raw mode (VT-x/AMD-V mandatory!)"
|
---|
[22743] | 2466 | [ $WITH_SDL_TTF -eq 1 ] && echo " --disable-sdl-ttf disable SDL_ttf detection"
|
---|
[59681] | 2467 | [ $WITH_QT5 -eq 1 ] && echo " --disable-qt disable Qt detection"
|
---|
[22743] | 2468 | [ $WITH_ALSA -eq 1 ] && echo " --disable-alsa disable the ALSA sound backend"
|
---|
| 2469 | [ $WITH_PULSE -eq 1 ] && echo " --disable-pulse disable the PulseAudio backend"
|
---|
| 2470 | [ $WITH_DBUS -eq 1 ] && echo " --disable-dbus don't use DBus and hal for hardware detection"
|
---|
| 2471 | [ $WITH_KMODS -eq 1 ] && echo " --disable-kmods don't build Linux kernel modules (host and guest)"
|
---|
[28938] | 2472 | [ $WITH_OPENGL -eq 1 ] && echo " --disable-opengl disable OpenGL support (2D & 3D)"
|
---|
[59681] | 2473 | [ $WITH_QT5 -eq 0 ] && echo " --enable-qt5 enable Qt5 detection"
|
---|
[36697] | 2474 | [ $OSE -eq 1 ] && echo " --enable-vnc enable the VNC server"
|
---|
[40217] | 2475 | [ $OSE -eq 0 ] && echo " --disable-extpack don't build the extpack"
|
---|
[31852] | 2476 | [ $WITH_DOCS -eq 1 ] && echo " --disable-docs don't build the documentation"
|
---|
[45822] | 2477 | [ $WITH_LIBVPX -eq 1 ] && echo " --disable-libvpx don't use libvpx for video capturing"
|
---|
[97397] | 2478 | [ $WITH_LIBVORBIS -eq 0 ] && echo " --enable-libvorbis enable system libvorbis"
|
---|
| 2479 | [ $WITH_LIBOGG -eq 0 ] && echo " --enable-libogg enable system libogg"
|
---|
[91555] | 2480 | [ $WITH_LIBTPMS -eq 1 ] && echo " --disable-libtpms don't use libtpms for TPM emulation"
|
---|
[28419] | 2481 | [ "$OS" = "linux" -o "$OS" = "freebsd" ] && echo " --enable-vde enable VDE networking"
|
---|
[22739] | 2482 | cat << EOF
|
---|
[37199] | 2483 | --disable-udptunnel disable UDP tunnel networking
|
---|
[43715] | 2484 | --disable-devmapper disable device mapper library access
|
---|
[11884] | 2485 | --disable-hardening don't be strict about /dev/vboxdrv access
|
---|
[7306] | 2486 | --build-libxml2 build libxml2 from sources
|
---|
[84900] | 2487 | --build-libssl build openssl from sources
|
---|
[91555] | 2488 | --build-libtpms build libtpms from sources
|
---|
[22752] | 2489 | EOF
|
---|
[28746] | 2490 | [ $OSE -eq 0 ] && cat << EOF
|
---|
| 2491 | --build-libcurl build libcurl from sources
|
---|
[45772] | 2492 | --build-libvpx build libvpx from sources
|
---|
[28746] | 2493 | EOF
|
---|
[22752] | 2494 | [ "$OS" != "darwin" ] && echo " --setup-wine setup a Wine directory and register the hhc hack"
|
---|
| 2495 | cat << EOF
|
---|
[55347] | 2496 | --only-additions only build the Guest Additions
|
---|
[1] | 2497 |
|
---|
| 2498 | Paths:
|
---|
[4785] | 2499 | --with-gcc=PATH location of the gcc compiler [$CC]
|
---|
| 2500 | --with-g++=PATH location of the g++ compiler [$CXX]
|
---|
| 2501 | --with-kbuild=DIR kbuild directory [$KBUILDDIR]
|
---|
| 2502 | --with-iasl=PATH location of the iasl compiler [$IASL]
|
---|
[87614] | 2503 | --with-yasm=PATH location of the iasl compiler [$YASM]
|
---|
[37199] | 2504 | --with-makeself=PATH location of makeself [$MAKESELF]
|
---|
[22739] | 2505 | EOF
|
---|
[51645] | 2506 | [ "$OS" = "darwin" ] && echo " --with-xcode-dir=DIR custom path to Xcode root directory; it is assumed that Xcode"
|
---|
| 2507 | [ "$OS" = "darwin" ] && echo " contains OS X 10.6 SDK (required for Mountain Lion and newer hosts"
|
---|
| 2508 | [ "$OS" = "darwin" ] && echo " only, ignored for the rest)"
|
---|
[22743] | 2509 | [ "$OS" = "linux" ] && echo " --with-linux=DIR Linux kernel source directory [$LINUX]"
|
---|
[59681] | 2510 | [ $WITH_QT5 -eq 1 ] && echo " --with-qt-dir=DIR directory for Qt headers/libraries [pkgconfig]"
|
---|
[22739] | 2511 | cat << EOF
|
---|
[90354] | 2512 | --with-gsoap-dir=PATH directory for gSOAP compiler/headers/libraries
|
---|
| 2513 | (soapcpp2 and wsdl2h, soapstd2.h, libgsoap++.a/so)
|
---|
| 2514 | --with-gsoap-import=PATH directory for gSOAP import files (stlvector.h)
|
---|
[23555] | 2515 | --with-openssl-dir=DIR directory for OpenSSL headers/libraries
|
---|
[41518] | 2516 | --with-ow-dir=DIR directory where Open Watcom can be found [$WATCOM]
|
---|
[90118] | 2517 | --out-base-dir=DIR directory where configuration and build output
|
---|
| 2518 | should go, in subdirectory out
|
---|
[1] | 2519 |
|
---|
| 2520 | Build type:
|
---|
[4785] | 2521 | -d, --build-debug build with debugging symbols and assertions
|
---|
[6928] | 2522 | --build-profile build with profiling support
|
---|
[22739] | 2523 | --build-headless build headless (without any GUI frontend)
|
---|
[1] | 2524 | EOF
|
---|
| 2525 | exit 0
|
---|
| 2526 | }
|
---|
| 2527 |
|
---|
| 2528 |
|
---|
| 2529 | #
|
---|
| 2530 | # The body.
|
---|
| 2531 | #
|
---|
| 2532 |
|
---|
[22739] | 2533 | # test if we are OSE
|
---|
[31889] | 2534 | if [ $OSE -eq 1 -a -r "`cd \`dirname $0\`; pwd`/src/VBox/RDP/server/server.cpp" ]; then
|
---|
[22739] | 2535 | OSE=0
|
---|
[25411] | 2536 | # Set this as a reminder to print a log message once we know the path of the
|
---|
| 2537 | # log file
|
---|
| 2538 | NOT_OSE=1
|
---|
[22739] | 2539 | fi
|
---|
| 2540 |
|
---|
| 2541 | # Change OS specific defaults; must be before all other stuff
|
---|
| 2542 | if [ "$OS" = "darwin" ]; then
|
---|
| 2543 | WITH_SDL=0
|
---|
| 2544 | WITH_SDL_TTF=0
|
---|
| 2545 | WITH_X11=0
|
---|
| 2546 | WITH_ALSA=0
|
---|
| 2547 | WITH_PULSE=0
|
---|
| 2548 | WITH_DBUS=0
|
---|
| 2549 | WITH_KMODS=0
|
---|
| 2550 | BUILD_LIBXML2=1
|
---|
[84900] | 2551 | BUILD_LIBSSL=1
|
---|
[45772] | 2552 | BUILD_LIBVPX=1
|
---|
[22739] | 2553 | [ $OSE -eq 1 ] || BUILD_LIBCURL=1
|
---|
[45822] | 2554 | [ $OSE -eq 1 ] && WITH_LIBVPX=0
|
---|
[97397] | 2555 | [ $OSE -eq 1 ] && WITH_LIBOGG=0
|
---|
| 2556 | [ $OSE -eq 1 ] && WITH_LIBVORBIS=0
|
---|
[51645] | 2557 | WITH_XCODE_DIR=""
|
---|
[43363] | 2558 | elif [ "$OS" = "haiku" ]; then
|
---|
| 2559 | #WITH_SDL=0
|
---|
| 2560 | WITH_SDL_TTF=0
|
---|
| 2561 | WITH_X11=0
|
---|
| 2562 | WITH_ALSA=0
|
---|
| 2563 | WITH_PULSE=0
|
---|
| 2564 | WITH_DBUS=0
|
---|
| 2565 | WITH_KMODS=0
|
---|
| 2566 | WITH_LIBIDL=0
|
---|
| 2567 | WITH_XPCOM=0
|
---|
| 2568 | BUILD_LIBXSLT=1
|
---|
| 2569 | BUILD_LIBXML2=1
|
---|
[45822] | 2570 | WITH_LIBVPX=0
|
---|
[97397] | 2571 | WITH_LIBOGG=0
|
---|
| 2572 | WITH_LIBVORBIS=0
|
---|
[43363] | 2573 | # but the script wants something
|
---|
| 2574 | LIBPTHREAD="-lroot"
|
---|
[45822] | 2575 | #[ $OSE -eq 1 ] || BUILD_LIBCURL=1
|
---|
[72668] | 2576 | [ $OSE -eq 1 ] || BUILD_LIBSSL=1
|
---|
[45822] | 2577 | elif [ "$OS" = "solaris" ]; then
|
---|
| 2578 | [ $OSE -eq 1 ] && WITH_LIBVPX=0
|
---|
[97397] | 2579 | [ $OSE -eq 1 ] && WITH_LIBOGG=0
|
---|
| 2580 | [ $OSE -eq 1 ] && WITH_LIBVORBIS=0
|
---|
[22739] | 2581 | fi
|
---|
| 2582 |
|
---|
[1] | 2583 | # scan command line options
|
---|
[51645] | 2584 | for option in "$@"; do
|
---|
[1] | 2585 | case "$option" in
|
---|
| 2586 | --help|-help|-h)
|
---|
| 2587 | show_help
|
---|
| 2588 | ;;
|
---|
| 2589 | --nofatal)
|
---|
| 2590 | nofatal=1
|
---|
| 2591 | ;;
|
---|
[11373] | 2592 | --env-only)
|
---|
| 2593 | ENV_ONLY=1
|
---|
| 2594 | ;;
|
---|
[1] | 2595 | --with-gcc=*)
|
---|
| 2596 | CC=`echo $option | cut -d'=' -f2`
|
---|
| 2597 | ;;
|
---|
| 2598 | --with-g++=*)
|
---|
| 2599 | CXX=`echo $option | cut -d'=' -f2`
|
---|
| 2600 | ;;
|
---|
| 2601 | --with-kbuild=*)
|
---|
| 2602 | KBUILDDIR=`echo $option | cut -d'=' -f2`
|
---|
[63] | 2603 | if echo $KBUILDDIR|grep -q "$INVALID_CHARS"; then
|
---|
| 2604 | echo "Error: KBUILDDIR contains invalid characters!"
|
---|
| 2605 | exit 1
|
---|
| 2606 | fi
|
---|
[1] | 2607 | ;;
|
---|
[59681] | 2608 | --with-qt-dir=*)
|
---|
| 2609 | [ $WITH_QT5 -eq 1 ] && QT5DIR=`echo $option | cut -d'=' -f2`
|
---|
| 2610 | [ $WITH_QT5 -eq 1 ] && QT5DIR_PKGCONFIG=0
|
---|
[7470] | 2611 | ;;
|
---|
[66821] | 2612 | --with-qt5-minor=*)
|
---|
| 2613 | QT5MIN=`echo $option | cut -d'=' -f2`
|
---|
| 2614 | ;;
|
---|
| 2615 | --with-qt5-major=*)
|
---|
| 2616 | QT5MAJ=`echo $option | cut -d'=' -f2`
|
---|
| 2617 | ;;
|
---|
[23547] | 2618 | --with-openssl-dir=*)
|
---|
| 2619 | OPENSSLDIR=`echo $option | cut -d'=' -f2`
|
---|
| 2620 | INCCRYPTO="-I${OPENSSLDIR}/include"
|
---|
[90415] | 2621 | LIBCRYPTO="${OPENSSLDIR}/lib/libssl.a ${OPENSSLDIR}/lib/libcrypto.a"
|
---|
[84900] | 2622 | # On Darwin (at least for macports) static OpenSSL also needs zlib.
|
---|
| 2623 | [ "$OS" = "darwin" ] && LIBCRYPTO="$LIBCRYPTO ${OPENSSLDIR}/lib/libz.a"
|
---|
[90415] | 2624 | # On Linux static OpenSSL typically needs a few additional libraries.
|
---|
| 2625 | [ "$OS" = "linux" ] && LIBCRYPTO="-ldl $LIBPTHREAD -lm"
|
---|
[23547] | 2626 | ;;
|
---|
[41518] | 2627 | --with-ow-dir=*)
|
---|
| 2628 | WATCOM=`echo $option | cut -d'=' -f2`
|
---|
| 2629 | ;;
|
---|
[16139] | 2630 | --with-gsoap-dir=*)
|
---|
| 2631 | GSOAP=`echo $option | cut -d'=' -f2`
|
---|
| 2632 | ;;
|
---|
[16994] | 2633 | --with-gsoap-import=*)
|
---|
| 2634 | GSOAP_IMPORT=`echo $option | cut -d'=' -f2`
|
---|
| 2635 | ;;
|
---|
[1] | 2636 | --with-iasl=*)
|
---|
| 2637 | IASL=`echo $option | cut -d'=' -f2`
|
---|
| 2638 | ;;
|
---|
[87614] | 2639 | --with-yasm=*)
|
---|
| 2640 | YASM=`echo $option | cut -d'=' -f2`
|
---|
| 2641 | ;;
|
---|
[51645] | 2642 | --with-xcode-dir=*)
|
---|
| 2643 | WITH_XCODE_DIR=`echo $option | cut -d'=' -f2`
|
---|
| 2644 | ;;
|
---|
[1] | 2645 | --with-linux=*)
|
---|
| 2646 | LINUX=`echo $option | cut -d'=' -f2`
|
---|
| 2647 | ;;
|
---|
[37199] | 2648 | --with-makeself=*)
|
---|
| 2649 | MAKESELF=`echo $option | cut -d'=' -f2`
|
---|
| 2650 | ;;
|
---|
[22739] | 2651 | --target-arch=*)
|
---|
| 2652 | TARGET_MACHINE=`echo $option | cut -d'=' -f2`
|
---|
| 2653 | ;;
|
---|
[1] | 2654 | --disable-xpcom)
|
---|
[22739] | 2655 | [ $WITH_XPCOM -eq 1 ] && WITH_XPCOM=0
|
---|
[1] | 2656 | ;;
|
---|
[11735] | 2657 | --disable-python)
|
---|
[22739] | 2658 | [ $WITH_PYTHON -eq 1 ] && WITH_PYTHON=0
|
---|
[11735] | 2659 | ;;
|
---|
[30998] | 2660 | --disable-java)
|
---|
| 2661 | [ $WITH_JAVA -eq 1 ] && WITH_JAVA=0
|
---|
| 2662 | ;;
|
---|
[26695] | 2663 | --disable-vmmraw)
|
---|
| 2664 | [ $WITH_VMMRAW -eq 1 ] && WITH_VMMRAW=0
|
---|
| 2665 | ;;
|
---|
[1038] | 2666 | --disable-sdl-ttf)
|
---|
[22739] | 2667 | [ $WITH_SDL_TTF -eq 1 ] && WITH_SDL_TTF=0
|
---|
[1038] | 2668 | ;;
|
---|
[1] | 2669 | --disable-qt)
|
---|
[59681] | 2670 | [ $WITH_QT5 -eq 1 ] && WITH_QT5=0
|
---|
[1] | 2671 | ;;
|
---|
[59681] | 2672 | --enable-qt5)
|
---|
| 2673 | [ $WITH_QT5 -eq 0 ] && WITH_QT5=1
|
---|
[8073] | 2674 | ;;
|
---|
[26776] | 2675 | --passive-mesa)
|
---|
| 2676 | PASSIVE_MESA=1
|
---|
| 2677 | ;;
|
---|
[8018] | 2678 | --disable-alsa)
|
---|
[22739] | 2679 | [ $WITH_ALSA -eq 1 ] && WITH_ALSA=0
|
---|
[8018] | 2680 | ;;
|
---|
[6101] | 2681 | --disable-pulse)
|
---|
[22739] | 2682 | [ $WITH_PULSE -eq 1 ] && WITH_PULSE=0
|
---|
[6101] | 2683 | ;;
|
---|
[25938] | 2684 | --enable-pulse)
|
---|
| 2685 | WITH_PULSE=2
|
---|
| 2686 | ;;
|
---|
[14989] | 2687 | --disable-dbus)
|
---|
[22739] | 2688 | [ $WITH_DBUS -eq 1 ] && WITH_DBUS=0
|
---|
[14711] | 2689 | ;;
|
---|
[6157] | 2690 | --disable-kmods)
|
---|
[22739] | 2691 | [ $WITH_KMODS -eq 1 ] && WITH_KMODS=0
|
---|
[6157] | 2692 | ;;
|
---|
[17912] | 2693 | --disable-opengl)
|
---|
[22739] | 2694 | [ $WITH_OPENGL -eq 1 ] && WITH_OPENGL=0
|
---|
[17912] | 2695 | ;;
|
---|
[22739] | 2696 | --enable-webservice)
|
---|
| 2697 | ;;
|
---|
[36697] | 2698 | --enable-vnc)
|
---|
| 2699 | WITH_VNC=1
|
---|
| 2700 | ;;
|
---|
[11884] | 2701 | --disable-hardening)
|
---|
| 2702 | WITH_HARDENING=0
|
---|
| 2703 | ;;
|
---|
[40217] | 2704 | --disable-extpack)
|
---|
[40218] | 2705 | WITH_EXTPACK=0
|
---|
[40217] | 2706 | ;;
|
---|
[31852] | 2707 | --disable-docs)
|
---|
| 2708 | WITH_DOCS=0
|
---|
| 2709 | ;;
|
---|
[11884] | 2710 | --enable-hardening)
|
---|
| 2711 | WITH_HARDENING=2
|
---|
| 2712 | ;;
|
---|
[37199] | 2713 | --disable-udptunnel)
|
---|
| 2714 | WITH_UDPTUNNEL=0
|
---|
| 2715 | ;;
|
---|
[28419] | 2716 | --enable-vde)
|
---|
| 2717 | WITH_VDE=1
|
---|
| 2718 | ;;
|
---|
[43715] | 2719 | --disable-devmapper)
|
---|
| 2720 | WITH_DEVMAPPER=0
|
---|
| 2721 | ;;
|
---|
[46279] | 2722 | --disable-libvpx)
|
---|
| 2723 | WITH_LIBVPX=0
|
---|
| 2724 | ;;
|
---|
[91555] | 2725 | --disable-libtpms)
|
---|
| 2726 | WITH_LIBTPMS=0
|
---|
| 2727 | ;;
|
---|
[97397] | 2728 | --enable-libogg)
|
---|
| 2729 | WITH_LIBOGG=1
|
---|
| 2730 | ;;
|
---|
| 2731 | --enable-libvorbis)
|
---|
| 2732 | WITH_LIBVORBIS=1
|
---|
| 2733 | ;;
|
---|
[61108] | 2734 | --disable-sdl)
|
---|
[57789] | 2735 | WITH_SDL=0
|
---|
| 2736 | ;;
|
---|
[1] | 2737 | --build-debug|-d)
|
---|
| 2738 | BUILD_TYPE=debug
|
---|
| 2739 | ;;
|
---|
[6928] | 2740 | --build-profile)
|
---|
| 2741 | BUILD_TYPE=profile
|
---|
| 2742 | ;;
|
---|
[6098] | 2743 | --build-libxml2)
|
---|
| 2744 | BUILD_LIBXML2=1
|
---|
| 2745 | ;;
|
---|
[23574] | 2746 | --build-libssl)
|
---|
| 2747 | BUILD_LIBSSL=1
|
---|
| 2748 | ;;
|
---|
[19849] | 2749 | --build-libcurl)
|
---|
| 2750 | BUILD_LIBCURL=1
|
---|
| 2751 | ;;
|
---|
[45772] | 2752 | --build-libvpx)
|
---|
| 2753 | BUILD_LIBVPX=1
|
---|
| 2754 | ;;
|
---|
[3905] | 2755 | --build-headless)
|
---|
| 2756 | HEADLESS=1
|
---|
[5239] | 2757 | WITH_SDL=0
|
---|
| 2758 | WITH_SDL_TTF=0
|
---|
| 2759 | WITH_X11=0
|
---|
[17912] | 2760 | WITH_OPENGL=0
|
---|
[59681] | 2761 | WITH_QT5=0
|
---|
[3905] | 2762 | ;;
|
---|
[1] | 2763 | --ose)
|
---|
| 2764 | OSE=2
|
---|
| 2765 | ;;
|
---|
| 2766 | --odir=*)
|
---|
[4719] | 2767 | ODIR="`echo $option | cut -d'=' -f2`/"
|
---|
[16257] | 2768 | ODIR_OVERRIDE=1
|
---|
[1] | 2769 | ;;
|
---|
[90118] | 2770 | --out-base-dir=*)
|
---|
| 2771 | out_base_dir="`echo $option | cut -d'=' -f2`/"
|
---|
| 2772 | if [ -d $out_base_dir ]; then
|
---|
| 2773 | saved_pwd="$PWD"
|
---|
| 2774 | cd $out_base_dir
|
---|
| 2775 | OUT_BASE_PATH="`pwd`"
|
---|
| 2776 | cd $saved_pwd
|
---|
| 2777 | OUT_BASE_PATH_OVERRIDE=1
|
---|
[16257] | 2778 | if [ $ODIR_OVERRIDE -eq 0 ]; then
|
---|
| 2779 | # This variable has not *yet* been overridden. That can still happen.
|
---|
[90118] | 2780 | ODIR=$OUT_BASE_PATH/
|
---|
[92590] | 2781 | ODIR_OVERRIDE=1
|
---|
[16257] | 2782 | fi
|
---|
| 2783 | else
|
---|
[90118] | 2784 | echo "Error: invalid folder \"$out_base_dir\" in option \"$option\""
|
---|
[16257] | 2785 | exit 1
|
---|
| 2786 | fi
|
---|
| 2787 | ;;
|
---|
[5041] | 2788 | --setup-wine)
|
---|
[22752] | 2789 | [ "$OS" != "darwin" ] && SETUP_WINE=1
|
---|
[5041] | 2790 | ;;
|
---|
[55347] | 2791 | --only-additions)
|
---|
| 2792 | ONLY_ADDITIONS=1
|
---|
| 2793 | ;;
|
---|
[1] | 2794 | *)
|
---|
| 2795 | echo
|
---|
| 2796 | echo "Unrecognized option \"$option\""
|
---|
| 2797 | echo
|
---|
| 2798 | show_help
|
---|
| 2799 | ;;
|
---|
| 2800 | esac
|
---|
| 2801 | done
|
---|
| 2802 |
|
---|
[4719] | 2803 | LOG="$ODIR$LOG"
|
---|
| 2804 | ENV="$ODIR$ENV"
|
---|
| 2805 | CNF="$ODIR$CNF"
|
---|
[1] | 2806 |
|
---|
| 2807 | # initialize output files
|
---|
| 2808 | cat > $LOG << EOF
|
---|
| 2809 | # Log file generated by
|
---|
| 2810 | #
|
---|
| 2811 | # '$0 $*'
|
---|
| 2812 | #
|
---|
| 2813 |
|
---|
| 2814 | EOF
|
---|
| 2815 | cat > $CNF << EOF
|
---|
| 2816 | # -*- Makefile -*-
|
---|
| 2817 | #
|
---|
| 2818 | # automatically generated by
|
---|
| 2819 | #
|
---|
| 2820 | # '$0 $*'
|
---|
| 2821 | #
|
---|
| 2822 | # It will be completely overwritten if configure is executed again.
|
---|
| 2823 | #
|
---|
| 2824 |
|
---|
| 2825 | EOF
|
---|
| 2826 | cat > $ENV << EOF
|
---|
| 2827 | #!/bin/bash
|
---|
| 2828 | #
|
---|
| 2829 | # automatically generated by
|
---|
| 2830 | #
|
---|
| 2831 | # '$0 $*'
|
---|
| 2832 | #
|
---|
| 2833 | # It will be completely overwritten if configure is executed again.
|
---|
| 2834 | # Make sure you source this file once before you start to build VBox.
|
---|
| 2835 | #
|
---|
| 2836 |
|
---|
| 2837 | EOF
|
---|
| 2838 |
|
---|
[28662] | 2839 | # Print log warning about OSE if necessary
|
---|
| 2840 | if [ -n "$NOT_OSE" ]; then
|
---|
[31889] | 2841 | echo "Found RDP server, assuming VBOX_OSE = FALSE" >> $LOG
|
---|
[28662] | 2842 | echo >> $LOG
|
---|
| 2843 | fi
|
---|
| 2844 |
|
---|
| 2845 |
|
---|
[3263] | 2846 | if [ "$BUILD_TYPE" = "debug" ]; then
|
---|
| 2847 | echo "Creating DEBUG build!" >> $LOG
|
---|
[6928] | 2848 | elif [ "$BUILD_TYPE" = "profile" ]; then
|
---|
| 2849 | echo "Creating PROFILE build!" >> $LOG
|
---|
[3263] | 2850 | fi
|
---|
| 2851 |
|
---|
[1] | 2852 | # first determine our environment
|
---|
| 2853 | check_environment
|
---|
| 2854 | check_kbuild
|
---|
| 2855 |
|
---|
[11373] | 2856 | [ -n "$ENV_ONLY" ] && exit 0
|
---|
| 2857 |
|
---|
[4733] | 2858 | # append the tools directory to the default search path
|
---|
| 2859 | echo "$PATH" | grep -q "$DEVDIR_BIN" || PATH="$PATH:$DEVDIR_BIN"
|
---|
| 2860 | export PATH
|
---|
| 2861 |
|
---|
[16257] | 2862 | # if we will be writing to a different out directory then set this up now
|
---|
[90118] | 2863 | if [ $ODIR_OVERRIDE -eq 1 ]; then
|
---|
[92592] | 2864 | echo "AUTOCFG=$CNF" >> $ENV
|
---|
[26687] | 2865 | echo "export AUTOCFG" >> $ENV
|
---|
[90118] | 2866 | fi
|
---|
| 2867 | if [ $OUT_BASE_PATH_OVERRIDE -eq 1 ]; then
|
---|
| 2868 | echo "PATH_OUT_BASE=$OUT_BASE_PATH" >> $ENV
|
---|
[26687] | 2869 | echo "export PATH_OUT_BASE" >> $ENV
|
---|
[16257] | 2870 | fi
|
---|
| 2871 |
|
---|
[63576] | 2872 | # don't bother people with -Werror
|
---|
| 2873 | cnf_append "VBOX_GCC_WERR" "\$(NO_SUCH_VARIABLE)"
|
---|
| 2874 |
|
---|
[1] | 2875 | # some things are not available in for OSE
|
---|
[3163] | 2876 | if [ $OSE -ge 1 ]; then
|
---|
[1] | 2877 | cnf_append "VBOX_OSE" "1"
|
---|
[56243] | 2878 | cnf_append "VBOX_WITH_VALIDATIONKIT" ""
|
---|
[1] | 2879 | cnf_append "VBOX_WITH_WIN32_ADDITIONS" ""
|
---|
| 2880 |
|
---|
[24] | 2881 | if [ "$OS" = "linux" ]; then
|
---|
[1] | 2882 | cnf_append "VBOX_WITH_LINUX_ADDITIONS" "1"
|
---|
[24] | 2883 | else
|
---|
[1] | 2884 | cnf_append "VBOX_WITH_LINUX_ADDITIONS" ""
|
---|
| 2885 | fi
|
---|
| 2886 | echo >> $CNF
|
---|
| 2887 | fi
|
---|
| 2888 |
|
---|
[40219] | 2889 | # extpack
|
---|
[55347] | 2890 | if [ $ONLY_ADDITIONS -eq 1 ]; then
|
---|
| 2891 | cnf_append "VBOX_WITH_EXTPACK_PUEL_BUILD" ""
|
---|
| 2892 | elif [ $OSE -eq 0 ]; then
|
---|
[40219] | 2893 | if [ $WITH_EXTPACK -eq 1 ]; then
|
---|
| 2894 | BUILD_LIBSSL=1
|
---|
| 2895 | else
|
---|
| 2896 | cnf_append "VBOX_WITH_EXTPACK_PUEL_BUILD" ""
|
---|
| 2897 | fi
|
---|
| 2898 | fi
|
---|
| 2899 |
|
---|
[3905] | 2900 | # headless
|
---|
| 2901 | if [ -n "$HEADLESS" ]; then
|
---|
| 2902 | cnf_append "VBOX_HEADLESS" "1"
|
---|
| 2903 | fi
|
---|
| 2904 |
|
---|
[1542] | 2905 | # emit disable directives corresponding to any --disable-xxx options.
|
---|
[28938] | 2906 | if [ $WITH_OPENGL -eq 0 ]; then
|
---|
[86228] | 2907 | cnf_append "VBOX_WITH_VMSVGA3D" ""
|
---|
| 2908 | cnf_append "VBOX_WITH_3D_ACCELERATION" ""
|
---|
[28938] | 2909 | cnf_append "VBOX_WITH_VIDEOHWACCEL" ""
|
---|
| 2910 | cnf_append "VBOX_GUI_USE_QGL" ""
|
---|
| 2911 | fi
|
---|
[30998] | 2912 | [ $WITH_XPCOM -eq 0 ] && cnf_append "VBOX_WITH_MAIN" ""
|
---|
[67067] | 2913 | [ $WITH_QT5 -eq 0 ] && cnf_append "VBOX_WITH_QTGUI" ""
|
---|
[30998] | 2914 | [ $WITH_SDL_TTF -eq 0 ] && cnf_append "VBOX_WITH_SECURELABEL" ""
|
---|
| 2915 | [ $WITH_PYTHON -eq 0 ] && cnf_append "VBOX_WITH_PYTHON" ""
|
---|
| 2916 | [ $WITH_JAVA -eq 0 ] && cnf_append "VBOX_WITH_JXPCOM" ""
|
---|
[42002] | 2917 | [ $WITH_JAVA -eq 0 ] && cnf_append "VBOX_WITH_JWS" ""
|
---|
[11884] | 2918 | [ $WITH_HARDENING -eq 0 ] && cnf_append "VBOX_WITHOUT_HARDENING" "1"
|
---|
| 2919 | [ $WITH_HARDENING -eq 2 ] && cnf_append "VBOX_WITH_HARDENING" "2"
|
---|
[30998] | 2920 | [ $WITH_VMMRAW -eq 0 ] && cnf_append "VBOX_WITH_RAW_MODE" ""
|
---|
[91556] | 2921 | [ $WITH_LIBTPMS -eq 0 ] && cnf_append "VBOX_WITH_LIBTPMS" ""
|
---|
[65360] | 2922 | if [ $WITH_LIBVPX -eq 0 ]; then
|
---|
| 2923 | cnf_append "VBOX_WITH_LIBVPX" ""
|
---|
[75345] | 2924 | cnf_append "VBOX_WITH_RECORDING" ""
|
---|
[65360] | 2925 | fi
|
---|
[97397] | 2926 | if [ $WITH_LIBOGG -eq 0 -o $WITH_LIBVORBIS -eq 0 ]; then
|
---|
| 2927 | cnf_append "VBOX_WITH_LIBOGG" ""
|
---|
| 2928 | cnf_append "VBOX_WITH_LIBVORBIS" ""
|
---|
[75345] | 2929 | cnf_append "VBOX_WITH_AUDIO_RECORDING" ""
|
---|
[73369] | 2930 | fi
|
---|
[1542] | 2931 |
|
---|
[23545] | 2932 | # Darwin-specific
|
---|
[87614] | 2933 | [ "$OS" = "darwin" ] && check_darwinversion
|
---|
[1] | 2934 | # the tools
|
---|
[87614] | 2935 | [ "$OS" != "darwin" ] && check_gcc
|
---|
| 2936 | [ "$OS" = "darwin" ] && check_xcode
|
---|
[55347] | 2937 | if [ $ONLY_ADDITIONS -eq 0 ]; then
|
---|
| 2938 | check_open_watcom
|
---|
| 2939 | [ "$OS" != "darwin" ] && check_iasl
|
---|
[87584] | 2940 | [ $OSE -ge 1 ] && check_yasm
|
---|
[55347] | 2941 | [ "$OS" != "darwin" ] && check_xsltproc
|
---|
| 2942 | fi
|
---|
[1] | 2943 |
|
---|
| 2944 | # the libraries
|
---|
[55347] | 2945 | if [ $ONLY_ADDITIONS -eq 0 ]; then
|
---|
| 2946 | [ "$OS" != "darwin" ] && check_pthread
|
---|
| 2947 | check_libxml2
|
---|
| 2948 | [ $WITH_LIBIDL -eq 1 ] && check_libidl
|
---|
[84900] | 2949 | check_z
|
---|
[85391] | 2950 | check_lzf
|
---|
[55347] | 2951 | check_ssl
|
---|
| 2952 | check_curl
|
---|
| 2953 | [ $WITH_LIBVPX -eq 1 ] && check_vpx
|
---|
[97397] | 2954 | [ $WITH_LIBOGG -eq 1 ] && check_libogg
|
---|
| 2955 | [ $WITH_LIBVORBIS -eq 1 ] && check_libvorbis
|
---|
[91555] | 2956 | [ $WITH_LIBTPMS -eq 1 ] && check_libtpms
|
---|
[55347] | 2957 | [ "$OS" != "darwin" ] && check_png
|
---|
| 2958 | [ $OSE -eq 0 -a "$OS" = "linux" ] && check_pam
|
---|
[57789] | 2959 | if [ $WITH_SDL -eq 1 ]; then
|
---|
| 2960 | check_sdl
|
---|
| 2961 | else
|
---|
| 2962 | cnf_append "VBOX_WITH_VBOXSDL" ""
|
---|
| 2963 | fi
|
---|
[55347] | 2964 | [ $WITH_SDL_TTF -eq 1 -a $OSE -eq 0 ] && check_sdl_ttf
|
---|
| 2965 | [ $WITH_X11 -eq 1 ] && check_x
|
---|
| 2966 | # TODO check for xcomposite-dev (X11/extensions/Xcomposite.h, additions only)
|
---|
| 2967 | # TODO check for libxdamange-dev (X11/extensions/Xdamage.h, additions only)
|
---|
| 2968 | [ $WITH_X11 -eq 1 ] && check_xcursor
|
---|
| 2969 | [ $WITH_X11 -eq 1 ] && check_xinerama
|
---|
| 2970 | [ $WITH_X11 -eq 1 ] && check_xrandr
|
---|
| 2971 | [ $WITH_OPENGL -eq 1 ] && check_opengl
|
---|
[59681] | 2972 | [ $WITH_QT5 -eq 1 ] && check_qt5
|
---|
[55347] | 2973 | [ $WITH_PYTHON -eq 1 ] && check_python
|
---|
| 2974 | [ $WITH_JAVA -eq 1 ] && check_java
|
---|
[1] | 2975 |
|
---|
[55347] | 2976 | # PulseAudio
|
---|
[78022] | 2977 | if [ $WITH_PULSE -eq 1 ]; then
|
---|
| 2978 | check_pulse
|
---|
| 2979 | elif [ $WITH_PULSE -eq 0 ]; then # Force disabling PulseAudio.
|
---|
| 2980 | cnf_append "VBOX_WITH_AUDIO_PULSE" ""
|
---|
| 2981 | elif [ $WITH_PULSE -eq 2 ]; then # --enable-pulse was passed, force PulseAudio.
|
---|
| 2982 | cnf_append "VBOX_WITH_AUDIO_PULSE" "1"
|
---|
| 2983 | fi
|
---|
[25819] | 2984 | fi
|
---|
| 2985 |
|
---|
[1] | 2986 | # Linux-specific
|
---|
[3163] | 2987 | if [ "$OS" = "linux" ]; then
|
---|
[18084] | 2988 | # don't check for the static libstdc++ in the PUEL version as we build the
|
---|
| 2989 | # additions at a dedicated box
|
---|
| 2990 | [ $OSE -ge 1 ] && check_staticlibstdcxx
|
---|
[6157] | 2991 | if [ $WITH_KMODS -eq 1 ]; then
|
---|
| 2992 | check_linux
|
---|
| 2993 | else
|
---|
| 2994 | cnf_append "VBOX_LINUX_SRC" ""
|
---|
[70497] | 2995 | cnf_append "VBOX_WITHOUT_LINUX_TEST_BUILDS" "1"
|
---|
[6157] | 2996 | fi
|
---|
[55347] | 2997 | if [ $ONLY_ADDITIONS -eq 0 ]; then
|
---|
| 2998 | if [ $WITH_ALSA -eq 1 ]; then
|
---|
| 2999 | check_alsa
|
---|
| 3000 | else
|
---|
[63575] | 3001 | cnf_append "VBOX_WITH_AUDIO_ALSA" ""
|
---|
[55347] | 3002 | fi
|
---|
| 3003 | if [ $WITH_DBUS -eq 0 ]; then
|
---|
| 3004 | cnf_append "VBOX_WITH_DBUS" ""
|
---|
| 3005 | fi
|
---|
| 3006 | if [ $WITH_DEVMAPPER -eq 1 ]; then
|
---|
| 3007 | check_libdevmapper
|
---|
| 3008 | else
|
---|
| 3009 | cnf_append "VBOX_WITH_DEVMAPPER" ""
|
---|
| 3010 | fi
|
---|
| 3011 | check_libcap
|
---|
[8018] | 3012 | fi
|
---|
[3163] | 3013 | check_compiler_h
|
---|
[55347] | 3014 | [ $ONLY_ADDITIONS -eq 0 -a "$BUILD_MACHINE" = "amd64" -a $WITH_VMMRAW -eq 1 ] && check_32bit
|
---|
[31774] | 3015 | # tools/common/makeself*
|
---|
| 3016 | [ $OSE -ge 1 ] && check_makeself
|
---|
[3163] | 3017 | fi
|
---|
[1] | 3018 |
|
---|
[5041] | 3019 | [ -n "$SETUP_WINE" ] && setup_wine
|
---|
| 3020 |
|
---|
[90354] | 3021 | if [ $ONLY_ADDITIONS -eq 0 ]; then
|
---|
[45613] | 3022 | check_gsoap
|
---|
| 3023 | else
|
---|
[90354] | 3024 | cnf_append "VBOX_WITH_WEBSERVICES" ""
|
---|
[16144] | 3025 | fi
|
---|
[16139] | 3026 |
|
---|
[37199] | 3027 | # UDPTUNNEL
|
---|
[55347] | 3028 | if [ $ONLY_ADDITIONS -eq 0 -a $WITH_UDPTUNNEL -eq 0 ]; then
|
---|
[37199] | 3029 | cnf_append "VBOX_WITH_UDPTUNNEL" ""
|
---|
| 3030 | fi
|
---|
| 3031 |
|
---|
[28419] | 3032 | # VDE
|
---|
[55347] | 3033 | if [ $ONLY_ADDITIONS -eq 0 -a "$OS" = "linux" -o "$OS" = "freebsd" ]; then
|
---|
[28419] | 3034 | if [ $WITH_VDE -eq 1 ]; then
|
---|
| 3035 | cnf_append "VBOX_WITH_VDE" "1"
|
---|
| 3036 | fi
|
---|
| 3037 | fi
|
---|
| 3038 |
|
---|
[31852] | 3039 | # DOCS
|
---|
[55347] | 3040 | if [ $ONLY_ADDITIONS -eq 1 -o $WITH_DOCS -eq 0 ]; then
|
---|
[31852] | 3041 | cnf_append "VBOX_WITH_DOCS" ""
|
---|
| 3042 | cnf_append "VBOX_WITH_DOCS_PACKING" ""
|
---|
| 3043 | fi
|
---|
| 3044 |
|
---|
[36697] | 3045 | # VNC server support
|
---|
[55347] | 3046 | if [ $ONLY_ADDITIONS -eq 0 -a $OSE -ge 1 ]; then
|
---|
[36697] | 3047 | if [ $WITH_VNC = 1 ]; then
|
---|
| 3048 | check_vncserver
|
---|
| 3049 | else
|
---|
[40383] | 3050 | cnf_append "VBOX_WITH_EXTPACK_VNC" ""
|
---|
[36697] | 3051 | fi
|
---|
| 3052 | fi
|
---|
| 3053 |
|
---|
[55347] | 3054 | if [ $ONLY_ADDITIONS -eq 1 ]; then
|
---|
| 3055 | cnf_append "VBOX_ONLY_ADDITIONS" "1"
|
---|
| 3056 | fi
|
---|
| 3057 |
|
---|
[1] | 3058 | # success!
|
---|
| 3059 | echo
|
---|
| 3060 | echo "Successfully generated '$CNF' and '$ENV'."
|
---|
| 3061 | echo "Source '$ENV' once before you start to build VBox:"
|
---|
[1513] | 3062 | echo ""
|
---|
[1] | 3063 | echo " source $ENV"
|
---|
| 3064 | echo " kmk"
|
---|
[1513] | 3065 | echo ""
|
---|
[1539] | 3066 | if [ "$OS" = "linux" ]; then
|
---|
[90118] | 3067 | if [ $OUT_BASE_PATH_OVERRIDE -eq 1 ]; then
|
---|
| 3068 | out_base_dir=$OUT_BASE_PATH
|
---|
[16257] | 3069 | else
|
---|
[90118] | 3070 | out_base_dir=.
|
---|
[16257] | 3071 | fi
|
---|
[19129] | 3072 | echo "To compile the kernel modules, do:"
|
---|
[1539] | 3073 | echo ""
|
---|
[90118] | 3074 | echo " cd $out_base_dir/out/$OS.$TARGET_MACHINE/$BUILD_TYPE/bin/src"
|
---|
[1539] | 3075 | echo " make"
|
---|
| 3076 | echo ""
|
---|
| 3077 | fi
|
---|
[55347] | 3078 | if [ $ONLY_ADDITIONS -eq 1 ]; then
|
---|
[11908] | 3079 | echo ""
|
---|
[55347] | 3080 | echo " Tree configured to build only the Guest Additions"
|
---|
| 3081 | echo ""
|
---|
| 3082 | elif [ $WITH_HARDENING -gt 0 ]; then
|
---|
| 3083 | echo ""
|
---|
[11908] | 3084 | echo " +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++"
|
---|
| 3085 | echo " Hardening is enabled which means that the VBox binaries will not run from"
|
---|
| 3086 | echo " the binary directory. The binaries have to be installed suid root and some"
|
---|
| 3087 | echo " more prerequisites have to be fulfilled which is normally done by installing"
|
---|
| 3088 | echo " the final package. For development, the hardening feature can be disabled"
|
---|
| 3089 | echo " by specifying the --disable-hardening parameter. Please never disable that"
|
---|
| 3090 | echo " feature for the final distribution!"
|
---|
| 3091 | echo " +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++"
|
---|
| 3092 | echo ""
|
---|
| 3093 | else
|
---|
| 3094 | echo ""
|
---|
| 3095 | echo " +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++"
|
---|
| 3096 | echo " Hardening is disabled. Please do NOT build packages for distribution with"
|
---|
| 3097 | echo " disabled hardening!"
|
---|
| 3098 | echo " +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++"
|
---|
| 3099 | echo ""
|
---|
| 3100 | fi
|
---|
[1] | 3101 | echo "Enjoy!"
|
---|
| 3102 | cleanup
|
---|