# (The devkit comes from M4 and not the shell, thus no need for eval here.)
resource=${builddep_devkit}
fi
if test "x$resource" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
# If the resource in the builddeps.conf file is an existing directory,
# for example /java/linux/cups
if test -d ${resource}; then
depdir=${resource}
else
# devkit is for example mymodule
# $resource is for example libs/general/libmymod_1_2_3.zip
# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
# $with_builddeps_dir is for example /localhome/builddeps
# depdir is the name of the variable into which we store the depdir, eg MYMOD
# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
filename=`basename $resource`
filebase=`echo $filename | sed 's/\.[^\.]*$//'`
filebase=${filename%%.*}
extension=${filename#*.}
installdir=$with_builddeps_dir/$filebase
if test ! -f $installdir/$filename.unpacked; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
if test ! -d $installdir; then
mkdir -p $installdir
fi
if test ! -d $installdir; then
as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
fi
tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
touch $tmpfile
if test ! -f $tmpfile; then
as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
fi
# $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip
# $tmpfile is the local file name for the downloaded file.
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
FOUND_FREETYPE=no
else
if test "x$OPENJDK_TARGET_OS" = xwindows; then
# On Windows, we will need both .lib and .dll file.
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
FOUND_FREETYPE=no
fi
elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
# On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!