ohair@425: # ohair@425: # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. ohair@425: # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ohair@425: # ohair@425: # This code is free software; you can redistribute it and/or modify it ohair@425: # under the terms of the GNU General Public License version 2 only, as ohair@425: # published by the Free Software Foundation. Oracle designates this ohair@425: # particular file as subject to the "Classpath" exception as provided ohair@425: # by Oracle in the LICENSE file that accompanied this code. ohair@425: # ohair@425: # This code is distributed in the hope that it will be useful, but WITHOUT ohair@425: # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ohair@425: # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ohair@425: # version 2 for more details (a copy is included in the LICENSE file that ohair@425: # accompanied this code). ohair@425: # ohair@425: # You should have received a copy of the GNU General Public License version ohair@425: # 2 along with this work; if not, write to the Free Software Foundation, ohair@425: # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ohair@425: # ohair@425: # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@425: # or visit www.oracle.com if you need additional information or have any ohair@425: # questions. ohair@425: # ohair@425: ohair@425: AC_DEFUN([CHECK_FIND_DELETE], ohair@425: [ ohair@425: # Test if find supports -delete ohair@425: AC_MSG_CHECKING([if find supports -delete]) ohair@425: FIND_DELETE="-delete" ohair@425: ohair@425: DELETEDIR=`mktemp -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?) ohair@425: ohair@425: echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete ohair@425: ohair@425: TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1` ohair@425: if test -f $DELETEDIR/TestIfFindSupportsDelete; then ohair@425: # No, it does not. ohair@425: rm $DELETEDIR/TestIfFindSupportsDelete ohair@425: FIND_DELETE="-exec rm \{\} \+" ohair@425: AC_MSG_RESULT([no]) ohair@425: else ohair@425: AC_MSG_RESULT([yes]) ohair@425: fi ohair@425: rmdir $DELETEDIR ohair@425: ]) ohair@425: ohair@425: AC_DEFUN([CHECK_NONEMPTY], ohair@425: [ ohair@425: # Test that variable $1 is not empty. ohair@425: if test "" = "[$]$1"; then AC_ERROR(Could not find translit($1,A-Z,a-z) !); fi ohair@425: ]) ohair@425: ohair@425: AC_DEFUN([ADD_JVM_ARG_IF_OK], ohair@425: [ ohair@425: # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3) ohair@425: # If so, then append $1 to $2 ohair@425: FOUND_WARN=`$3 $1 -version 2>&1 | grep -i warn` ohair@425: FOUND_VERSION=`$3 $1 -version 2>&1 | grep " version \""` ohair@425: if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then ohair@425: $2="[$]$2 $1" ohair@425: fi ohair@425: ]) ohair@425: ohair@425: AC_DEFUN([WHICHCMD], ohair@425: [ ohair@425: # Translate "gcc -E" into "`which gcc` -E" ie ohair@425: # extract the full path to the binary and at the ohair@425: # same time maintain any arguments passed to it. ohair@425: # The command MUST exist in the path, or else! ohair@425: tmp="[$]$1" ohair@425: car="${tmp%% *}" ohair@425: tmp="[$]$1 EOL" ohair@425: cdr="${tmp#* }" ohair@425: # On windows we want paths without spaces. ohair@425: if test "x$BUILD_OS" = "xwindows"; then ohair@425: WHICHCMD_SPACESAFE(car) ohair@425: else ohair@425: # "which" is not portable, but is used here ohair@425: # because we know that the command exists! ohair@425: car=`which $car` ohair@425: fi ohair@425: if test "x$cdr" != xEOL; then ohair@425: $1="$car ${cdr% *}" ohair@425: else ohair@425: $1="$car" ohair@425: fi ohair@425: ]) ohair@425: ohair@425: AC_DEFUN([SPACESAFE], ohair@425: [ ohair@425: # Fail with message $2 if var $1 contains a path with no spaces in it. ohair@425: # Unless on Windows, where we can rewrite the path. ohair@425: HAS_SPACE=`echo "[$]$1" | grep " "` ohair@425: if test "x$HAS_SPACE" != x; then ohair@425: if test "x$BUILD_OS" = "xwindows"; then ohair@425: $1=`$CYGPATH -s -m -a "[$]$1"` ohair@425: $1=`$CYGPATH -u "[$]$1"` ohair@425: else ohair@425: AC_ERROR([You cannot have spaces in $2! "[$]$1"]) ohair@425: fi ohair@425: fi ohair@425: ]) ohair@425: ohair@425: AC_DEFUN([WHICHCMD_SPACESAFE], ohair@425: [ ohair@425: # Translate long cygdrive or C:\sdfsf path ohair@425: # into a short mixed mode path that has no ohair@425: # spaces in it. ohair@425: tmp="[$]$1" ohair@425: if test "x$BUILD_OS" = "xwindows"; then ohair@425: tmp=`$CYGPATH -u "[$]$1"` ohair@425: tmp=`which "$tmp"` ohair@425: # If file exists with .exe appended, that's the real filename ohair@425: # and cygpath needs that to convert to short style path. ohair@425: if test -f "${tmp}.exe"; then ohair@425: tmp="${tmp}.exe" ohair@425: elif test -f "${tmp}.cmd"; then ohair@425: tmp="${tmp}.cmd" ohair@425: fi ohair@425: # Convert to C:/ mixed style path without spaces. ohair@425: tmp=`$CYGPATH -s -m "$tmp"` ohair@425: fi ohair@425: $1="$tmp" ohair@425: ]) ohair@425: ohair@425: AC_DEFUN([REMOVE_SYMBOLIC_LINKS], ohair@425: [ ohair@425: if test "x$BUILD_OS" != xwindows; then ohair@425: # Follow a chain of symbolic links. Use readlink ohair@425: # where it exists, else fall back to horribly ohair@425: # complicated shell code. ohair@425: AC_PATH_PROG(READLINK, readlink) ohair@425: if test "x$READLINK_TESTED" != yes; then ohair@425: # On MacOSX there is a readlink tool with a different ohair@425: # purpose than the GNU readlink tool. Check the found readlink. ohair@425: ISGNU=`$READLINK --help 2>&1 | grep GNU` ohair@425: if test "x$ISGNU" = x; then ohair@425: # A readlink that we do not know how to use. ohair@425: # Are there other non-GNU readlinks out there? ohair@425: READLINK_TESTED=yes ohair@425: READLINK= ohair@425: fi ohair@425: fi ohair@425: ohair@425: if test "x$READLINK" != x; then ohair@425: $1=`$READLINK -f [$]$1` ohair@425: else ohair@425: STARTDIR=$PWD ohair@425: COUNTER=0 ohair@425: DIR=`dirname [$]$1` ohair@425: FIL=`basename [$]$1` ohair@425: while test $COUNTER -lt 20; do ohair@425: ISLINK=`ls -l $DIR/$FIL | grep '\->' | sed -e 's/.*-> \(.*\)/\1/'` ohair@425: if test "x$ISLINK" == x; then ohair@425: # This is not a symbolic link! We are done! ohair@425: break ohair@425: fi ohair@425: # The link might be relative! We have to use cd to travel safely. ohair@425: cd $DIR ohair@425: cd `dirname $ISLINK` ohair@425: DIR=`pwd` ohair@425: FIL=`basename $ISLINK` ohair@425: let COUNTER=COUNTER+1 ohair@425: done ohair@425: cd $STARTDIR ohair@425: $1=$DIR/$FIL ohair@425: fi ohair@425: fi ohair@425: ]) ohair@425: ohair@425: AC_DEFUN([TESTFOR_PROG_CCACHE], ohair@425: [ ohair@425: AC_ARG_ENABLE([ccache], ohair@425: [AS_HELP_STRING([--disable-ccache], ohair@425: [use ccache to speed up recompilations @<:@enabled@:>@])], ohair@425: [ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes]) ohair@425: if test "x$ENABLE_CCACHE" = xyes; then ohair@425: AC_PATH_PROG(CCACHE, ccache) ohair@425: else ohair@425: AC_MSG_CHECKING([for ccache]) ohair@425: AC_MSG_RESULT([explicitly disabled]) ohair@425: CCACHE= ohair@425: fi ohair@425: AC_SUBST(CCACHE) ohair@425: ohair@425: AC_ARG_WITH([ccache-dir], ohair@425: [AS_HELP_STRING([--with-ccache-dir], ohair@425: [where to store ccache files @<:@~/.ccache@:>@])]) ohair@425: ohair@425: if test "x$with_ccache_dir" != x; then ohair@425: # When using a non home ccache directory, assume the use is to share ccache files ohair@425: # with other users. Thus change the umask. ohair@425: SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002" ohair@425: fi ohair@425: CCACHE_FOUND="" ohair@425: if test "x$CCACHE" != x; then ohair@425: SETUP_CCACHE_USAGE ohair@425: fi ohair@425: ]) ohair@425: ohair@425: AC_DEFUN([SETUP_CCACHE_USAGE], ohair@425: [ ohair@425: if test "x$CCACHE" != x; then ohair@425: CCACHE_FOUND="true" ohair@425: # Only use ccache if it is 3.1.4 or later, which supports ohair@425: # precompiled headers. ohair@425: AC_MSG_CHECKING([if ccache supports precompiled headers]) ohair@425: HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.@<:@456789@:>@) 2> /dev/null` ohair@425: if test "x$HAS_GOOD_CCACHE" = x; then ohair@425: AC_MSG_RESULT([no, disabling ccache]) ohair@425: CCACHE= ohair@425: else ohair@425: AC_MSG_RESULT([yes]) ohair@425: AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers]) ohair@425: PUSHED_FLAGS="$CXXFLAGS" ohair@425: CXXFLAGS="-fpch-preprocess $CXXFLAGS" ohair@425: AC_TRY_COMPILE([], [], [CC_KNOWS_CCACHE_TRICK=yes], [CC_KNOWS_CCACHE_TRICK=no]) ohair@425: CXXFLAGS="$PUSHED_FLAGS" ohair@425: if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then ohair@425: AC_MSG_RESULT([yes]) ohair@425: else ohair@425: AC_MSG_RESULT([no, disabling ccaching of precompiled headers]) ohair@425: CCACHE= ohair@425: fi ohair@425: fi ohair@425: fi ohair@425: ohair@425: if test "x$CCACHE" != x; then ohair@425: CCACHE_SLOPPINESS=time_macros ohair@425: CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE" ohair@425: CCACHE_FLAGS=-fpch-preprocess ohair@425: ohair@425: if test "x$SET_CCACHE_DIR" != x; then ohair@425: mkdir -p $CCACHE_DIR > /dev/null 2>&1 ohair@425: chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1 ohair@425: fi ohair@425: fi ohair@425: ]) ohair@425: ohair@425: AC_DEFUN([EXTRACT_HOST_AND_BUILD_AND_LEGACY_VARS], ohair@425: [ ohair@425: # Expects $host_os $host_cpu $build_os and $build_cpu ohair@425: # and $with_data_model to have been setup! ohair@425: # ohair@425: # Translate the standard triplet(quadruplet) definition ohair@425: # of the host/build system into ohair@425: # HOST_OS=aix,bsd,hpux,linux,macosx,solaris,windows ohair@425: # HOST_OS_FAMILY=bsd,gnu,sysv,win32,wince ohair@425: # HOST_OS_API=posix,winapi ohair@425: # ohair@425: # HOST_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64 ohair@425: # HOST_CPU_ARCH=x86,sparc,pcc,arm ohair@425: # HOST_CPU_BITS=32,64 ohair@425: # HOST_CPU_ENDIAN=big,little ohair@425: # ohair@425: # The same values are setup for BUILD_... ohair@425: # ohair@425: # And the legacy variables, for controlling the old makefiles. ohair@425: # LEGACY_HOST_CPU1=i586,amd64,sparc,sparcv9,arm,arm64... ohair@425: # LEGACY_HOST_CPU2=i386,amd64,sparc,sparcv9,arm,arm64... ohair@425: # LEGACY_HOST_CPU3=sparcv9,amd64 (but only on solaris) ohair@425: # LEGACY_HOST_OS_API=solaris,windows ohair@425: # ohair@425: # We also copy the autoconf trip/quadruplet ohair@425: # verbatim to HOST and BUILD ohair@425: AC_SUBST(HOST, ${host}) ohair@425: AC_SUBST(BUILD, ${build}) ohair@425: ohair@425: EXTRACT_VARS_FROM_OS_TO(HOST,$host_os) ohair@425: EXTRACT_VARS_FROM_CPU_TO(HOST,$host_cpu) ohair@425: ohair@425: EXTRACT_VARS_FROM_OS_TO(BUILD,$build_os) ohair@425: EXTRACT_VARS_FROM_CPU_TO(BUILD,$build_cpu) ohair@425: ohair@425: if test "x$HOST_OS" != xsolaris; then ohair@425: LEGACY_HOST_CPU3="" ohair@425: LEGACY_BUILD_CPU3="" ohair@425: fi ohair@425: ]) ohair@425: ohair@425: AC_DEFUN([EXTRACT_VARS_FROM_OS_TO], ohair@425: [ ohair@425: EXTRACT_VARS_FROM_OS($2) ohair@425: $1_OS="$VAR_OS" ohair@425: $1_OS_FAMILY="$VAR_OS_FAMILY" ohair@425: $1_OS_API="$VAR_OS_API" ohair@425: ohair@425: AC_SUBST($1_OS) ohair@425: AC_SUBST($1_OS_FAMILY) ohair@425: AC_SUBST($1_OS_API) ohair@425: ohair@425: if test "x$$1_OS_API" = xposix; then ohair@425: LEGACY_$1_OS_API="solaris" ohair@425: fi ohair@425: if test "x$$1_OS_API" = xwinapi; then ohair@425: LEGACY_$1_OS_API="windows" ohair@425: fi ohair@425: AC_SUBST(LEGACY_$1_OS_API) ohair@425: ]) ohair@425: ohair@425: AC_DEFUN([EXTRACT_VARS_FROM_CPU_TO], ohair@425: [ ohair@425: EXTRACT_VARS_FROM_CPU($2) ohair@425: $1_CPU="$VAR_CPU" ohair@425: $1_CPU_ARCH="$VAR_CPU_ARCH" ohair@425: $1_CPU_BITS="$VAR_CPU_BITS" ohair@425: $1_CPU_ENDIAN="$VAR_CPU_ENDIAN" ohair@425: ohair@425: AC_SUBST($1_CPU) ohair@425: AC_SUBST($1_CPU_ARCH) ohair@425: AC_SUBST($1_CPU_BITS) ohair@425: AC_SUBST($1_CPU_ENDIAN) ohair@425: ohair@425: # Also store the legacy naming of the cpu. ohair@425: # Ie i586 and amd64 instead of ia32 and x64 ohair@425: LEGACY_$1_CPU1="$VAR_LEGACY_CPU" ohair@425: AC_SUBST(LEGACY_$1_CPU1) ohair@425: ohair@425: # And the second legacy naming of the cpu. ohair@425: # Ie i386 and amd64 instead of ia32 and x64. ohair@425: LEGACY_$1_CPU2="$LEGACY_$1_CPU1" ohair@425: if test "x$LEGACY_$1_CPU1" = xi586; then ohair@425: LEGACY_$1_CPU2=i386 ohair@425: fi ohair@425: AC_SUBST(LEGACY_$1_CPU2) ohair@425: ohair@425: # And the third legacy naming of the cpu. ohair@425: # Ie only amd64 or sparcv9, used for the ISA_DIR on Solaris. ohair@425: LEGACY_$1_CPU3="" ohair@425: if test "x$$1_CPU" = xx64; then ohair@425: LEGACY_$1_CPU3=amd64 ohair@425: fi ohair@425: if test "x$$1_CPU" = xsparcv9; then ohair@425: LEGACY_$1_CPU3=sparvc9 ohair@425: fi ohair@425: AC_SUBST(LEGACY_$1_CPU3) ohair@425: ]) ohair@425: ohair@425: AC_DEFUN([EXTRACT_VARS_FROM_CPU], ohair@425: [ ohair@425: # First argument is the cpu name from the trip/quad ohair@425: case "$1" in ohair@425: x86_64) ohair@425: VAR_CPU=x64 ohair@425: VAR_CPU_ARCH=x86 ohair@425: VAR_CPU_BITS=64 ohair@425: VAR_CPU_ENDIAN=little ohair@425: VAR_LEGACY_CPU=amd64 ohair@425: ;; ohair@425: i?86) ohair@425: VAR_CPU=ia32 ohair@425: VAR_CPU_ARCH=x86 ohair@425: VAR_CPU_BITS=32 ohair@425: VAR_CPU_ENDIAN=little ohair@425: VAR_LEGACY_CPU=i586 ohair@425: ;; ohair@425: alpha*) ohair@425: VAR_CPU=alpha ohair@425: VAR_CPU_ARCH=alpha ohair@425: VAR_CPU_BITS=64 ohair@425: VAR_CPU_ENDIAN=big ohair@425: VAR_LEGACY_CPU=alpha ohair@425: ;; ohair@425: arm*) ohair@425: VAR_CPU=arm ohair@425: VAR_CPU_ARCH=arm ohair@425: VAR_CPU_BITS=3264 ohair@425: VAR_CPU_ENDIAN=big ohair@425: VAR_LEGACY_CPU=arm ohair@425: ;; ohair@425: mips) ohair@425: VAR_CPU=mips ohair@425: VAR_CPU_ARCH=mips ohair@425: VAR_CPU_BITS=woot ohair@425: VAR_CPU_ENDIAN=woot ohair@425: VAR_LEGACY_CPU=mips ohair@425: ;; ohair@425: mipsel) ohair@425: VAR_CPU=mipsel ohair@425: VAR_CPU_ARCH=mips ohair@425: VAR_CPU_BITS=woot ohair@425: VAR_CPU_ENDIAN=woot ohair@425: VAR_LEGACY_CPU=mipsel ohair@425: ;; ohair@425: powerpc) ohair@425: VAR_CPU=ppc ohair@425: VAR_CPU_ARCH=ppc ohair@425: VAR_CPU_BITS=32 ohair@425: VAR_CPU_ENDIAN=big ohair@425: VAR_LEGACY_CPU=ppc ohair@425: ;; ohair@425: powerpc64) ohair@425: VAR_CPU=ppc64 ohair@425: VAR_CPU_ARCH=ppc ohair@425: VAR_CPU_BITS=64 ohair@425: VAR_CPU_ENDIAN=32 ohair@425: VAR_LEGACY_CPU=ppc64 ohair@425: ;; ohair@425: sparc) ohair@425: VAR_CPU=sparc ohair@425: VAR_CPU_ARCH=sparc ohair@425: VAR_CPU_BITS=32 ohair@425: VAR_CPU_ENDIAN=big ohair@425: VAR_LEGACY_CPU=sparc ohair@425: ;; ohair@425: sparc64) ohair@425: VAR_CPU=sparcv9 ohair@425: VAR_CPU_ARCH=sparc ohair@425: VAR_CPU_BITS=64 ohair@425: VAR_CPU_ENDIAN=big ohair@425: VAR_LEGACY_CPU=sparc_sparcv9 ohair@425: ;; ohair@425: s390) ohair@425: VAR_CPU=s390 ohair@425: VAR_CPU_ARCH=s390 ohair@425: VAR_CPU_BITS=32 ohair@425: VAR_CPU_ENDIAN=woot ohair@425: VAR_LEGACY_CPU=s390 ohair@425: VAR_LEGACY_CPU=s390 ohair@425: ;; ohair@425: s390x) ohair@425: VAR_CPU=s390x ohair@425: VAR_CPU_ARCH=s390 ohair@425: VAR_CPU_BITS=64 ohair@425: VAR_CPU_ENDIAN=woot ohair@425: VAR_LEGACY_CPU=s390x ohair@425: ;; ohair@425: *) ohair@425: AC_ERROR([unsupported cpu $1]) ohair@425: ;; ohair@425: esac ohair@425: ohair@425: # Workaround cygwin not knowing about 64 bit. ohair@425: if test "x$VAR_OS" = "xwindows"; then ohair@425: if test "x$PROCESSOR_IDENTIFIER" != "x"; then ohair@425: PROC_ARCH=`echo $PROCESSOR_IDENTIFIER | $CUT -f1 -d' '` ohair@425: case "$PROC_ARCH" in ohair@425: intel64|Intel64|INTEL64|em64t|EM64T|amd64|AMD64|8664|x86_64) ohair@425: VAR_CPU=x64 ohair@425: VAR_CPU_BITS=64 ohair@425: VAR_LEGACY_CPU=amd64 ohair@425: ;; ohair@425: esac ohair@425: fi ohair@425: fi ohair@425: ohair@425: if test "x$VAR_CPU_ARCH" = "xx86"; then ohair@425: if test "x$with_data_model" = "x64"; then ohair@425: VAR_CPU=x64 ohair@425: VAR_CPU_BITS=64 ohair@425: VAR_LEGACY_CPU=amd64 ohair@425: fi ohair@425: if test "x$with_data_model" = "x32"; then ohair@425: VAR_CPU=ia32 ohair@425: VAR_CPU_BITS=32 ohair@425: VAR_LEGACY_CPU=i586 ohair@425: fi ohair@425: fi ohair@425: ]) ohair@425: ohair@425: AC_DEFUN([EXTRACT_VARS_FROM_OS], ohair@425: [ ohair@425: case "$1" in ohair@425: *linux*) ohair@425: VAR_OS=linux ohair@425: VAR_OS_API=posix ohair@425: VAR_OS_FAMILY=gnu ohair@425: ;; ohair@425: *solaris*) ohair@425: VAR_OS=solaris ohair@425: VAR_OS_API=posix ohair@425: VAR_OS_FAMILY=sysv ohair@425: ;; ohair@425: *darwin*) ohair@425: VAR_OS=macosx ohair@425: VAR_OS_API=posix ohair@425: VAR_OS_FAMILY=bsd ohair@425: ;; ohair@425: *bsd*) ohair@425: VAR_OS=bsd ohair@425: VAR_OS_API=posix ohair@425: VAR_OS_FAMILY=bsd ohair@425: ;; ohair@425: *cygwin*|*windows*) ohair@425: VAR_OS=windows ohair@425: VAR_OS_API=winapi ohair@425: VAR_OS_FAMILY=windows ohair@425: ;; ohair@425: *) ohair@425: AC_MSG_ERROR([unsupported host operating system $1]) ohair@425: ;; ohair@425: esac ohair@425: ]) ohair@425: ohair@425: AC_DEFUN([CHECK_COMPILER_VERSION], ohair@425: [ ohair@425: # Test the compilers that their versions are new enough. ohair@425: # AC_MSG_CHECKING([version of GCC]) ohair@425: gcc_ver=`${CC} -dumpversion` ohair@425: gcc_major_ver=`echo ${gcc_ver}|cut -d'.' -f1` ohair@425: gcc_minor_ver=`echo ${gcc_ver}|cut -d'.' -f2` ohair@425: # AM_CONDITIONAL(GCC_OLD, test ! ${gcc_major_ver} -ge 4 -a ${gcc_minor_ver} -ge 3) ohair@425: # AC_MSG_RESULT([${gcc_ver} (major version ${gcc_major_ver}, minor version ${gcc_minor_ver})]) ohair@425: ]) ohair@425: ohair@425: # Fixes paths on windows hosts to be mixed mode short. ohair@425: AC_DEFUN([WIN_FIX_PATH], ohair@425: [ ohair@425: if test "x$BUILD_OS" = "xwindows"; then ohair@425: AC_PATH_PROG(CYGPATH, cygpath) ohair@425: tmp="[$]$1" ohair@425: # Convert to C:/ mixed style path without spaces. ohair@425: tmp=`$CYGPATH -s -m "$tmp"` ohair@425: $1="$tmp" ohair@425: fi ohair@425: ])