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