diff --git a/configure b/configure index d01e6b294b8..8e7122bd546 100755 --- a/configure +++ b/configure @@ -1,8 +1,5 @@ #!/bin/sh -CFG_SRC_DIR=${0%${0##*/}} -CFG_BUILD_DIR=$PWD - msg() { echo "configure: $1" } @@ -78,6 +75,26 @@ need_cmd grep need_cmd xargs need_cmd cp need_cmd find +need_cmd uname +need_cmd date + +msg "inspecting environment" + +CFG_OSTYPE=$(uname -s) +CFG_CPUTYPE=$(uname -m) + +case $CFG_OSTYPE in + + MINGW*) + CFG_SRC_DIR=CFG_SRC_DIR=${0%${0##*\\}} + CFG_BUILD_DIR=$PWD + ;; + + *) + CFG_SRC_DIR=CFG_SRC_DIR=${0%${0##*/}} + CFG_BUILD_DIR=$PWD + ;; +esac msg "recreating config.mk" echo '' >config.mk @@ -95,11 +112,6 @@ do make_dir $i done -msg "inspecting environment" - -CFG_OSTYPE=$(uname -s) -CFG_CPUTYPE=$(uname -m) - putvar CFG_SRC_DIR putvar CFG_BUILD_DIR putvar CFG_OSTYPE