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