366 AC_MSG_RESULT([Windows]) 367 AC_MSG_NOTICE([Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools.]) 368 AC_MSG_NOTICE([This will not work. Please correct and make sure /usr/bin (or similar) is first in path.]) 369 AC_MSG_ERROR([Cannot continue]) 370 else 371 AC_MSG_RESULT([unknown]) 372 AC_MSG_WARN([It seems that your find utility is non-standard.]) 373 fi 374 ]) 375 376 AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH], 377 [ 378 # When using cygwin or msys, we need a wrapper binary that renames 379 # /cygdrive/c/ arguments into c:/ arguments and peeks into 380 # @files and rewrites these too! This wrapper binary is 381 # called fixpath. 382 FIXPATH= 383 if test "x$OPENJDK_BUILD_OS" = xwindows; then 384 AC_MSG_CHECKING([if fixpath can be created]) 385 FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c" 386 FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe" 387 if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then 388 FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC` 389 FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN` 390 # Important to keep the .exe suffix on Cygwin for Hotspot makefiles 391 FIXPATH="$OUTPUT_ROOT/fixpath.exe -c" 392 elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then 393 FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC` 394 FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN` 395 396 # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line 397 # @ was chosen as separator to minimize risk of other tools messing around with it 398 all_unique_prefixes=`echo "${all_fixpath_prefixes@<:@@@:>@}" | tr ' ' '\n' | grep '^/./' | sort | uniq` 399 fixpath_argument_list=`echo $all_unique_prefixes | tr ' ' '@'` 400 401 FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list" 402 fi 403 rm -f $OUTPUT_ROOT/fixpath* 404 cd $OUTPUT_ROOT 405 $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1 406 cd $CURDIR 407 408 if test ! -x $OUTPUT_ROOT/fixpath.exe; then 409 AC_MSG_RESULT([no]) 410 cat $OUTPUT_ROOT/fixpath1.log 411 AC_MSG_ERROR([Could not create $OUTPUT_ROOT/fixpath.exe]) 412 fi 413 AC_MSG_RESULT([yes]) 414 AC_MSG_CHECKING([if fixpath.exe works]) 415 cd $OUTPUT_ROOT 416 $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1 417 cd $CURDIR 418 if test ! -x $OUTPUT_ROOT/fixpath2.exe; then 419 AC_MSG_RESULT([no]) 420 cat $OUTPUT_ROOT/fixpath2.log 421 AC_MSG_ERROR([fixpath did not work!]) 422 fi 423 AC_MSG_RESULT([yes]) 424 rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj 425 fi 426 427 AC_SUBST(FIXPATH) 428 ]) | 366 AC_MSG_RESULT([Windows]) 367 AC_MSG_NOTICE([Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools.]) 368 AC_MSG_NOTICE([This will not work. Please correct and make sure /usr/bin (or similar) is first in path.]) 369 AC_MSG_ERROR([Cannot continue]) 370 else 371 AC_MSG_RESULT([unknown]) 372 AC_MSG_WARN([It seems that your find utility is non-standard.]) 373 fi 374 ]) 375 376 AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH], 377 [ 378 # When using cygwin or msys, we need a wrapper binary that renames 379 # /cygdrive/c/ arguments into c:/ arguments and peeks into 380 # @files and rewrites these too! This wrapper binary is 381 # called fixpath. 382 FIXPATH= 383 if test "x$OPENJDK_BUILD_OS" = xwindows; then 384 AC_MSG_CHECKING([if fixpath can be created]) 385 FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c" 386 FIXPATH_BIN="$CONFIGURE_SUPPORT/bin/fixpath.exe" 387 FIXPATH_DIR="$CONFIGURE_SUPPORT/fixpath" 388 if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then 389 # Important to keep the .exe suffix on Cygwin for Hotspot makefiles 390 FIXPATH="$FIXPATH_BIN -c" 391 elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then 392 # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line 393 # @ was chosen as separator to minimize risk of other tools messing around with it 394 all_unique_prefixes=`echo "${all_fixpath_prefixes@<:@@@:>@}" \ 395 | tr ' ' '\n' | grep '^/./' | sort | uniq` 396 fixpath_argument_list=`echo $all_unique_prefixes | tr ' ' '@'` 397 FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list" 398 fi 399 FIXPATH_SRC_W="$FIXPATH_SRC" 400 FIXPATH_BIN_W="$FIXPATH_BIN" 401 BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_SRC_W]) 402 BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_BIN_W]) 403 $RM -rf $FIXPATH_BIN $FIXPATH_DIR 404 $MKDIR -p $FIXPATH_DIR $CONFIGURE_SUPPORT/bin 405 cd $FIXPATH_DIR 406 $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1 407 cd $CURDIR 408 409 if test ! -x $FIXPATH_BIN; then 410 AC_MSG_RESULT([no]) 411 cat $FIXPATH_DIR/fixpath1.log 412 AC_MSG_ERROR([Could not create $FIXPATH_BIN]) 413 fi 414 AC_MSG_RESULT([yes]) 415 AC_MSG_CHECKING([if fixpath.exe works]) 416 cd $FIXPATH_DIR 417 $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \ 418 > $FIXPATH_DIR/fixpath2.log 2>&1 419 cd $CURDIR 420 if test ! -x $FIXPATH_DIR/fixpath2.exe; then 421 AC_MSG_RESULT([no]) 422 cat $FIXPATH_DIR/fixpath2.log 423 AC_MSG_ERROR([fixpath did not work!]) 424 fi 425 AC_MSG_RESULT([yes]) 426 fi 427 428 AC_SUBST(FIXPATH) 429 ]) |