]> git.sesse.net Git - vlc/blobdiff - contrib/bootstrap
extras/tools: set AUTOCONF variable so automake can find it
[vlc] / contrib / bootstrap
index d2796668112b2b2dcc89ccc55575525267c4e4b1..e9970075321f824456c9ea0ad8ff9d8a8b52c9cb 100755 (executable)
@@ -38,7 +38,7 @@ PKGS_DISABLE=
 BUILD_ENCODERS="1"
 BUILD_DISCS="1"
 
-if test ! -f "../src/main.mak"
+if test ! -f "../../contrib/src/main.mak"
 then
        echo "$0 must be run from a subdirectory"
        exit 1
@@ -137,6 +137,20 @@ add_make_enabled()
        done
 }
 
+check_macosx_sdk()
+{
+   [ -z "${OSX_VERSION}" ] && echo "OSX_VERSION not specified, assuming 10.5" && OSX_VERSION=10.5
+   SDK="/Developer/SDKs/MacOSX${OSX_VERSION}.sdk"
+   if [ ! -d "${SDK}" ]
+   then
+          echo "
+*** ${SDK} does not exist, please install required SDK, or use export OSX_VERSION=10.6 ***
+"
+          exit 1
+   fi
+   add_make "OSX_VERSION ?= ${OSX_VERSION}"
+}
+
 test -z "$PREFIX" || add_make "PREFIX := $PREFIX"
 test -z "$BUILD_DISCS" || add_make_enabled "BUILD_DISCS"
 test -z "$BUILD_ENCODERS" || add_make_enabled "BUILD_ENCODERS"
@@ -147,6 +161,7 @@ test -z "$BUILD_ENCODERS" || add_make_enabled "BUILD_ENCODERS"
 OS="${HOST#*-}" # strip architecture
 case "${OS}" in
        apple-darwin*)
+               check_macosx_sdk
                add_make_enabled "HAVE_MACOSX" "HAVE_DARWIN_OS" "HAVE_BSD"
                ;;
        *darwin*)
@@ -170,7 +185,7 @@ esac
 # Results output
 #
 test -e Makefile && unlink Makefile
-ln -sf ../src/main.mak Makefile
+ln -sf ../../contrib/src/main.mak Makefile
 cat << EOF
 Bootstrap completed.
 
@@ -188,3 +203,5 @@ Other targets:
  * make clean        clean everything
  * make list         list packages
 EOF
+
+mkdir -p ../../contrib/tarballs