aoqi@0: # aoqi@0: # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. aoqi@0: # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. aoqi@0: # aoqi@0: # This code is free software; you can redistribute it and/or modify it aoqi@0: # under the terms of the GNU General Public License version 2 only, as aoqi@0: # published by the Free Software Foundation. Oracle designates this aoqi@0: # particular file as subject to the "Classpath" exception as provided aoqi@0: # by Oracle in the LICENSE file that accompanied this code. aoqi@0: # aoqi@0: # This code is distributed in the hope that it will be useful, but WITHOUT aoqi@0: # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or aoqi@0: # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License aoqi@0: # version 2 for more details (a copy is included in the LICENSE file that aoqi@0: # accompanied this code). aoqi@0: # aoqi@0: # You should have received a copy of the GNU General Public License version aoqi@0: # 2 along with this work; if not, write to the Free Software Foundation, aoqi@0: # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. aoqi@0: # aoqi@0: # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA aoqi@0: # or visit www.oracle.com if you need additional information or have any aoqi@0: # questions. aoqi@0: # aoqi@0: aoqi@0: AC_DEFUN([BASIC_WINDOWS_REWRITE_AS_UNIX_PATH], aoqi@0: [ aoqi@0: windows_path="[$]$1" aoqi@0: if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then aoqi@0: unix_path=`$CYGPATH -u "$windows_path"` aoqi@0: $1="$unix_path" aoqi@0: elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then aoqi@0: unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` aoqi@0: $1="$unix_path" aoqi@0: fi aoqi@0: ]) aoqi@0: aoqi@0: AC_DEFUN([BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH], aoqi@0: [ aoqi@0: unix_path="[$]$1" aoqi@0: if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then aoqi@0: windows_path=`$CYGPATH -m "$unix_path"` aoqi@0: $1="$windows_path" aoqi@0: elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then aoqi@0: windows_path=`cmd //c echo $unix_path` aoqi@0: $1="$windows_path" aoqi@0: fi aoqi@0: ]) aoqi@0: aoqi@0: # Helper function which possibly converts a path using DOS-style short mode. aoqi@0: # If so, the updated path is stored in $new_path. aoqi@0: # $1: The path to check aoqi@0: AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN], aoqi@0: [ aoqi@0: input_path="$1" aoqi@0: # Check if we need to convert this using DOS-style short mode. If the path aoqi@0: # contains just simple characters, use it. Otherwise (spaces, weird characters), aoqi@0: # take no chances and rewrite it. aoqi@0: # Note: m4 eats our [], so we need to use @<:@ and @:>@ instead. aoqi@0: has_forbidden_chars=`$ECHO "$input_path" | $GREP @<:@^-._/a-zA-Z0-9@:>@` aoqi@0: if test "x$has_forbidden_chars" != x; then aoqi@0: # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) aoqi@0: shortmode_path=`$CYGPATH -s -m -a "$input_path"` aoqi@0: path_after_shortmode=`$CYGPATH -u "$shortmode_path"` aoqi@0: if test "x$path_after_shortmode" != "x$input_to_shortpath"; then aoqi@0: # Going to short mode and back again did indeed matter. Since short mode is aoqi@0: # case insensitive, let's make it lowercase to improve readability. aoqi@0: shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` aoqi@0: # Now convert it back to Unix-stile (cygpath) aoqi@0: input_path=`$CYGPATH -u "$shortmode_path"` aoqi@0: new_path="$input_path" aoqi@0: fi aoqi@0: fi aoqi@0: aoqi@0: test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` aoqi@0: if test "x$test_cygdrive_prefix" = x; then aoqi@0: # As a simple fix, exclude /usr/bin since it's not a real path. aoqi@0: if test "x`$ECHO $1 | $GREP ^/usr/bin/`" = x; then aoqi@0: # The path is in a Cygwin special directory (e.g. /home). We need this converted to aoqi@0: # a path prefixed by /cygdrive for fixpath to work. aoqi@0: new_path="$CYGWIN_ROOT_PATH$input_path" aoqi@0: fi aoqi@0: fi aoqi@0: ]) aoqi@0: aoqi@0: # Helper function which possibly converts a path using DOS-style short mode. aoqi@0: # If so, the updated path is stored in $new_path. aoqi@0: # $1: The path to check aoqi@0: AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS], aoqi@0: [ aoqi@0: input_path="$1" aoqi@0: # Check if we need to convert this using DOS-style short mode. If the path aoqi@0: # contains just simple characters, use it. Otherwise (spaces, weird characters), aoqi@0: # take no chances and rewrite it. aoqi@0: # Note: m4 eats our [], so we need to use @<:@ and @:>@ instead. aoqi@0: has_forbidden_chars=`$ECHO "$input_path" | $GREP @<:@^-_/:a-zA-Z0-9@:>@` aoqi@0: if test "x$has_forbidden_chars" != x; then aoqi@0: # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) aoqi@0: new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` aoqi@0: fi aoqi@0: ]) aoqi@0: aoqi@0: # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted aoqi@0: # and could probably be heavily simplified. However, all changes in this aoqi@0: # area tend to need lot of testing in different scenarios, and in lack of aoqi@0: # proper unit testing, cleaning this up has not been deemed worth the effort aoqi@0: # at the moment. aoqi@0: aoqi@0: AC_DEFUN([BASIC_FIXUP_PATH_CYGWIN], aoqi@0: [ aoqi@0: # Input might be given as Windows format, start by converting to aoqi@0: # unix format. aoqi@0: path="[$]$1" aoqi@0: new_path=`$CYGPATH -u "$path"` aoqi@0: aoqi@0: # Cygwin tries to hide some aspects of the Windows file system, such that binaries are aoqi@0: # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered aoqi@0: # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then aoqi@0: # "foo.exe" is OK but "foo" is an error. aoqi@0: # aoqi@0: # This test is therefore slightly more accurate than "test -f" to check for file precense. aoqi@0: # It is also a way to make sure we got the proper file name for the real test later on. aoqi@0: test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` aoqi@0: if test "x$test_shortpath" = x; then aoqi@0: AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.]) aoqi@0: AC_MSG_ERROR([Cannot locate the the path of $1]) aoqi@0: fi aoqi@0: aoqi@0: # Call helper function which possibly converts this using DOS-style short mode. aoqi@0: # If so, the updated path is stored in $new_path. aoqi@0: BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN([$new_path]) aoqi@0: aoqi@0: if test "x$path" != "x$new_path"; then aoqi@0: $1="$new_path" aoqi@0: AC_MSG_NOTICE([Rewriting $1 to "$new_path"]) aoqi@0: fi aoqi@0: ]) aoqi@0: aoqi@0: AC_DEFUN([BASIC_FIXUP_PATH_MSYS], aoqi@0: [ aoqi@0: path="[$]$1" aoqi@0: has_colon=`$ECHO $path | $GREP ^.:` aoqi@0: new_path="$path" aoqi@0: if test "x$has_colon" = x; then aoqi@0: # Not in mixed or Windows style, start by that. aoqi@0: new_path=`cmd //c echo $path` aoqi@0: fi aoqi@0: aoqi@0: BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path]) aoqi@0: BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path) aoqi@0: if test "x$path" != "x$new_path"; then aoqi@0: $1="$new_path" aoqi@0: AC_MSG_NOTICE([Rewriting $1 to "$new_path"]) aoqi@0: fi aoqi@0: aoqi@0: # Save the first 10 bytes of this path to the storage, so fixpath can work. aoqi@0: all_fixpath_prefixes=("${all_fixpath_prefixes@<:@@@:>@}" "${new_path:0:10}") aoqi@0: ]) aoqi@0: aoqi@0: AC_DEFUN([BASIC_FIXUP_EXECUTABLE_CYGWIN], aoqi@0: [ aoqi@0: # First separate the path from the arguments. This will split at the first aoqi@0: # space. aoqi@0: complete="[$]$1" aoqi@0: path="${complete%% *}" aoqi@0: tmp="$complete EOL" aoqi@0: arguments="${tmp#* }" aoqi@0: aoqi@0: # Input might be given as Windows format, start by converting to aoqi@0: # unix format. aoqi@0: new_path=`$CYGPATH -u "$path"` aoqi@0: aoqi@0: # Now try to locate executable using which aoqi@0: new_path=`$WHICH "$new_path" 2> /dev/null` aoqi@0: # bat and cmd files are not always considered executable in cygwin causing which aoqi@0: # to not find them aoqi@0: if test "x$new_path" = x \ aoqi@0: && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ aoqi@0: && test "x`$LS \"$path\" 2>/dev/null`" != x; then aoqi@0: new_path=`$CYGPATH -u "$path"` aoqi@0: fi aoqi@0: if test "x$new_path" = x; then aoqi@0: # Oops. Which didn't find the executable. aoqi@0: # The splitting of arguments from the executable at a space might have been incorrect, aoqi@0: # since paths with space are more likely in Windows. Give it another try with the whole aoqi@0: # argument. aoqi@0: path="$complete" aoqi@0: arguments="EOL" aoqi@0: new_path=`$CYGPATH -u "$path"` aoqi@0: new_path=`$WHICH "$new_path" 2> /dev/null` aoqi@0: # bat and cmd files are not always considered executable in cygwin causing which aoqi@0: # to not find them aoqi@0: if test "x$new_path" = x \ aoqi@0: && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ aoqi@0: && test "x`$LS \"$path\" 2>/dev/null`" != x; then aoqi@0: new_path=`$CYGPATH -u "$path"` aoqi@0: fi aoqi@0: if test "x$new_path" = x; then aoqi@0: # It's still not found. Now this is an unrecoverable error. aoqi@0: AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.]) aoqi@0: has_space=`$ECHO "$complete" | $GREP " "` aoqi@0: if test "x$has_space" != x; then aoqi@0: AC_MSG_NOTICE([You might be mixing spaces in the path and extra arguments, which is not allowed.]) aoqi@0: fi aoqi@0: AC_MSG_ERROR([Cannot locate the the path of $1]) aoqi@0: fi aoqi@0: fi aoqi@0: aoqi@0: # Cygwin tries to hide some aspects of the Windows file system, such that binaries are aoqi@0: # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered aoqi@0: # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then aoqi@0: # "foo.exe" is OK but "foo" is an error. aoqi@0: # aoqi@0: # This test is therefore slightly more accurate than "test -f" to check for file presence. aoqi@0: # It is also a way to make sure we got the proper file name for the real test later on. aoqi@0: test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` aoqi@0: if test "x$test_shortpath" = x; then aoqi@0: # Short path failed, file does not exist as specified. aoqi@0: # Try adding .exe or .cmd aoqi@0: if test -f "${new_path}.exe"; then aoqi@0: input_to_shortpath="${new_path}.exe" aoqi@0: elif test -f "${new_path}.cmd"; then aoqi@0: input_to_shortpath="${new_path}.cmd" aoqi@0: else aoqi@0: AC_MSG_NOTICE([The path of $1, which resolves as "$new_path", is invalid.]) aoqi@0: AC_MSG_NOTICE([Neither "$new_path" nor "$new_path.exe/cmd" can be found]) aoqi@0: AC_MSG_ERROR([Cannot locate the the path of $1]) aoqi@0: fi aoqi@0: else aoqi@0: input_to_shortpath="$new_path" aoqi@0: fi aoqi@0: aoqi@0: # Call helper function which possibly converts this using DOS-style short mode. aoqi@0: # If so, the updated path is stored in $new_path. aoqi@0: new_path="$input_to_shortpath" aoqi@0: BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN([$input_to_shortpath]) aoqi@0: # remove trailing .exe if any aoqi@0: new_path="${new_path/%.exe/}" aoqi@0: ]) aoqi@0: aoqi@0: AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS], aoqi@0: [ aoqi@0: # First separate the path from the arguments. This will split at the first aoqi@0: # space. aoqi@0: complete="[$]$1" aoqi@0: path="${complete%% *}" aoqi@0: tmp="$complete EOL" aoqi@0: arguments="${tmp#* }" aoqi@0: aoqi@0: # Input might be given as Windows format, start by converting to aoqi@0: # unix format. aoqi@0: new_path="$path" aoqi@0: BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path) aoqi@0: aoqi@0: # Now try to locate executable using which aoqi@0: new_path=`$WHICH "$new_path" 2> /dev/null` aoqi@0: aoqi@0: if test "x$new_path" = x; then aoqi@0: # Oops. Which didn't find the executable. aoqi@0: # The splitting of arguments from the executable at a space might have been incorrect, aoqi@0: # since paths with space are more likely in Windows. Give it another try with the whole aoqi@0: # argument. aoqi@0: path="$complete" aoqi@0: arguments="EOL" aoqi@0: new_path="$path" aoqi@0: BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path) aoqi@0: aoqi@0: new_path=`$WHICH "$new_path" 2> /dev/null` aoqi@0: aoqi@0: if test "x$new_path" = x; then aoqi@0: # It's still not found. Now this is an unrecoverable error. aoqi@0: AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.]) aoqi@0: has_space=`$ECHO "$complete" | $GREP " "` aoqi@0: if test "x$has_space" != x; then aoqi@0: AC_MSG_NOTICE([You might be mixing spaces in the path and extra arguments, which is not allowed.]) aoqi@0: fi aoqi@0: AC_MSG_ERROR([Cannot locate the the path of $1]) aoqi@0: fi aoqi@0: fi aoqi@0: aoqi@0: # Now new_path has a complete unix path to the binary aoqi@0: if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then aoqi@0: # Keep paths in /bin as-is, but remove trailing .exe if any aoqi@0: new_path="${new_path/%.exe/}" aoqi@0: # Do not save /bin paths to all_fixpath_prefixes! aoqi@0: else aoqi@0: # Not in mixed or Windows style, start by that. aoqi@0: new_path=`cmd //c echo $new_path` aoqi@0: BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path]) aoqi@0: # Output is in $new_path aoqi@0: BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path) aoqi@0: # remove trailing .exe if any aoqi@0: new_path="${new_path/%.exe/}" aoqi@0: aoqi@0: # Save the first 10 bytes of this path to the storage, so fixpath can work. aoqi@0: all_fixpath_prefixes=("${all_fixpath_prefixes@<:@@@:>@}" "${new_path:0:10}") aoqi@0: fi aoqi@0: ]) aoqi@0: aoqi@0: # Setup basic configuration paths, and platform-specific stuff related to PATHs. aoqi@0: AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS], aoqi@0: [ aoqi@0: SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m` aoqi@0: if test $SRC_ROOT_LENGTH -gt 100; then aoqi@0: AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported]) aoqi@0: fi aoqi@0: aoqi@0: if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then aoqi@0: AC_MSG_CHECKING([cygwin release]) aoqi@0: CYGWIN_VERSION=`$UNAME -r` aoqi@0: AC_MSG_RESULT([$CYGWIN_VERSION]) aoqi@0: WINDOWS_ENV_VENDOR='cygwin' aoqi@0: WINDOWS_ENV_VERSION="$CYGWIN_VERSION" aoqi@0: aoqi@0: CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.` aoqi@0: if test "x$CYGWIN_VERSION_OK" = x; then aoqi@0: AC_MSG_NOTICE([Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade.]) aoqi@0: AC_MSG_ERROR([Cannot continue]) aoqi@0: fi aoqi@0: if test "x$CYGPATH" = x; then aoqi@0: AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path]) aoqi@0: fi aoqi@0: AC_MSG_CHECKING([cygwin root directory as unix-style path]) aoqi@0: # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away aoqi@0: cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"` aoqi@0: # Force cygpath to report the proper root by including a trailing space, and then stripping it off again. aoqi@0: CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "` aoqi@0: AC_MSG_RESULT([$CYGWIN_ROOT_PATH]) aoqi@0: WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH" aoqi@0: test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/` aoqi@0: if test "x$test_cygdrive_prefix" = x; then aoqi@0: AC_MSG_ERROR([Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c.]) aoqi@0: fi aoqi@0: elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then aoqi@0: AC_MSG_CHECKING([msys release]) aoqi@0: MSYS_VERSION=`$UNAME -r` aoqi@0: AC_MSG_RESULT([$MSYS_VERSION]) aoqi@0: aoqi@0: WINDOWS_ENV_VENDOR='msys' aoqi@0: WINDOWS_ENV_VERSION="$MSYS_VERSION" aoqi@0: aoqi@0: AC_MSG_CHECKING([msys root directory as unix-style path]) aoqi@0: # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away aoqi@0: MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"` aoqi@0: BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(MSYS_ROOT_PATH) aoqi@0: AC_MSG_RESULT([$MSYS_ROOT_PATH]) aoqi@0: WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH" aoqi@0: else aoqi@0: AC_MSG_ERROR([Unknown Windows environment. Neither cygwin nor msys was detected.]) aoqi@0: fi aoqi@0: aoqi@0: # Test if windows or unix (cygwin/msys) find is first in path. aoqi@0: AC_MSG_CHECKING([what kind of 'find' is first on the PATH]) aoqi@0: FIND_BINARY_OUTPUT=`find --version 2>&1` aoqi@0: if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then aoqi@0: AC_MSG_RESULT([unix style]) aoqi@0: elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then aoqi@0: AC_MSG_RESULT([Windows]) aoqi@0: AC_MSG_NOTICE([Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools.]) aoqi@0: AC_MSG_NOTICE([This will not work. Please correct and make sure /usr/bin (or similar) is first in path.]) aoqi@0: AC_MSG_ERROR([Cannot continue]) aoqi@0: else aoqi@0: AC_MSG_RESULT([unknown]) aoqi@0: AC_MSG_WARN([It seems that your find utility is non-standard.]) aoqi@0: fi aoqi@0: ]) aoqi@0: aoqi@0: AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH], aoqi@0: [ aoqi@0: # When using cygwin or msys, we need a wrapper binary that renames aoqi@0: # /cygdrive/c/ arguments into c:/ arguments and peeks into aoqi@0: # @files and rewrites these too! This wrapper binary is aoqi@0: # called fixpath. aoqi@0: FIXPATH= aoqi@0: if test "x$OPENJDK_BUILD_OS" = xwindows; then aoqi@0: AC_MSG_CHECKING([if fixpath can be created]) aoqi@0: FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c" aoqi@0: FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe" aoqi@0: if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then aoqi@0: FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC` aoqi@0: FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN` aoqi@0: # Important to keep the .exe suffix on Cygwin for Hotspot makefiles aoqi@0: FIXPATH="$OUTPUT_ROOT/fixpath.exe -c" aoqi@0: elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then aoqi@0: FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC` aoqi@0: FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN` aoqi@0: aoqi@0: # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line aoqi@0: # @ was chosen as separator to minimize risk of other tools messing around with it aoqi@0: all_unique_prefixes=`echo "${all_fixpath_prefixes@<:@@@:>@}" | tr ' ' '\n' | grep '^/./' | sort | uniq` aoqi@0: fixpath_argument_list=`echo $all_unique_prefixes | tr ' ' '@'` aoqi@0: aoqi@0: FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list" aoqi@0: fi aoqi@0: rm -f $OUTPUT_ROOT/fixpath* aoqi@0: cd $OUTPUT_ROOT aoqi@0: $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1 aoqi@0: cd $CURDIR aoqi@0: aoqi@0: if test ! -x $OUTPUT_ROOT/fixpath.exe; then aoqi@0: AC_MSG_RESULT([no]) aoqi@0: cat $OUTPUT_ROOT/fixpath1.log aoqi@0: AC_MSG_ERROR([Could not create $OUTPUT_ROOT/fixpath.exe]) aoqi@0: fi aoqi@0: AC_MSG_RESULT([yes]) aoqi@0: AC_MSG_CHECKING([if fixpath.exe works]) aoqi@0: cd $OUTPUT_ROOT aoqi@0: $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1 aoqi@0: cd $CURDIR aoqi@0: if test ! -x $OUTPUT_ROOT/fixpath2.exe; then aoqi@0: AC_MSG_RESULT([no]) aoqi@0: cat $OUTPUT_ROOT/fixpath2.log aoqi@0: AC_MSG_ERROR([fixpath did not work!]) aoqi@0: fi aoqi@0: AC_MSG_RESULT([yes]) aoqi@0: rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj aoqi@0: fi aoqi@0: aoqi@0: AC_SUBST(FIXPATH) aoqi@0: ])