From 9d925436f32065f4a1940a9728e4b6f9c8e22c08 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Wed, 23 Mar 2011 13:26:17 -0700 Subject: [PATCH] Someday I'll have a talk with the person who thought backslashes were wise in win32. --- configure | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) 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