32 builddepsfile=$with_builddeps_conf |
32 builddepsfile=$with_builddeps_conf |
33 if test -s $builddepsfile; then |
33 if test -s $builddepsfile; then |
34 . $builddepsfile |
34 . $builddepsfile |
35 AC_MSG_RESULT([loaded!]) |
35 AC_MSG_RESULT([loaded!]) |
36 else |
36 else |
37 AC_ERROR([The given builddeps conf file $with_builddeps_conf could not be loaded!]) |
37 AC_MSG_ERROR([The given builddeps conf file $with_builddeps_conf could not be loaded!]) |
38 fi |
38 fi |
39 else |
39 else |
40 AC_MSG_CHECKING([for builddeps.conf files in sources...]) |
40 AC_MSG_CHECKING([for builddeps.conf files in sources...]) |
41 builddepsfile=`mktemp` |
41 builddepsfile=`mktemp` |
42 touch $builddepsfile |
42 touch $builddepsfile |
45 # Source the file to acquire the variables |
45 # Source the file to acquire the variables |
46 if test -s $builddepsfile; then |
46 if test -s $builddepsfile; then |
47 . $builddepsfile |
47 . $builddepsfile |
48 AC_MSG_RESULT([found at least one!]) |
48 AC_MSG_RESULT([found at least one!]) |
49 else |
49 else |
50 AC_ERROR([Could not find any builddeps.conf at all!]) |
50 AC_MSG_ERROR([Could not find any builddeps.conf at all!]) |
51 fi |
51 fi |
52 fi |
52 fi |
53 # Create build and host names that use _ instead of "-" and ".". |
53 # Create build and host names that use _ instead of "-" and ".". |
54 # This is necessary to use them in variable names. |
54 # This is necessary to use them in variable names. |
55 build_var=`echo ${build} | tr '-' '_' | tr '.' '_'` |
55 build_var=`echo ${build} | tr '-' '_' | tr '.' '_'` |
115 echo "bin" ;\ |
115 echo "bin" ;\ |
116 echo "get $FTPPATH $2" ;\ |
116 echo "get $FTPPATH $2" ;\ |
117 ) | ftp -in $FTPSERVER |
117 ) | ftp -in $FTPSERVER |
118 fi |
118 fi |
119 if test "x$VALID_TOOL" != xyes; then |
119 if test "x$VALID_TOOL" != xyes; then |
120 AC_ERROR([I do not know how to use the tool: $BDEPS_FTP]) |
120 AC_MSG_ERROR([I do not know how to use the tool: $BDEPS_FTP]) |
121 fi |
121 fi |
122 ]) |
122 ]) |
123 |
123 |
124 AC_DEFUN([BDEPS_CHECK_MODULE], |
124 AC_DEFUN([BDEPS_CHECK_MODULE], |
125 [ |
125 [ |
157 # Now extract variables from the builddeps.conf files. |
157 # Now extract variables from the builddeps.conf files. |
158 theroot=${builddep_$2_ROOT} |
158 theroot=${builddep_$2_ROOT} |
159 thecflags=${builddep_$2_CFLAGS} |
159 thecflags=${builddep_$2_CFLAGS} |
160 thelibs=${builddep_$2_LIBS} |
160 thelibs=${builddep_$2_LIBS} |
161 if test "x$depdir" = x; then |
161 if test "x$depdir" = x; then |
162 AC_ERROR([Could not download build dependency $2]) |
162 AC_MSG_ERROR([Could not download build dependency $2]) |
163 fi |
163 fi |
164 $1=$depdir |
164 $1=$depdir |
165 if test "x$theroot" != x; then |
165 if test "x$theroot" != x; then |
166 $1="$theroot" |
166 $1="$theroot" |
167 fi |
167 fi |
196 AC_MSG_NOTICE([Downloading build dependency $1 from $3/$2 and installing into $installdir]) |
196 AC_MSG_NOTICE([Downloading build dependency $1 from $3/$2 and installing into $installdir]) |
197 if test ! -d $installdir; then |
197 if test ! -d $installdir; then |
198 mkdir -p $installdir |
198 mkdir -p $installdir |
199 fi |
199 fi |
200 if test ! -d $installdir; then |
200 if test ! -d $installdir; then |
201 AC_ERROR([Could not create directory $installdir]) |
201 AC_MSG_ERROR([Could not create directory $installdir]) |
202 fi |
202 fi |
203 tmpfile=`mktemp $installdir/$1.XXXXXXXXX` |
203 tmpfile=`mktemp $installdir/$1.XXXXXXXXX` |
204 touch $tmpfile |
204 touch $tmpfile |
205 if test ! -f $tmpfile; then |
205 if test ! -f $tmpfile; then |
206 AC_ERROR([Could not create files in directory $installdir]) |
206 AC_MSG_ERROR([Could not create files in directory $installdir]) |
207 fi |
207 fi |
208 BDEPS_FTPGET([$3/$2] , [$tmpfile]) |
208 BDEPS_FTPGET([$3/$2] , [$tmpfile]) |
209 mv $tmpfile $installdir/$filename |
209 mv $tmpfile $installdir/$filename |
210 if test ! -s $installdir/$filename; then |
210 if test ! -s $installdir/$filename; then |
211 AC_ERROR([Could not download $3/$2]) |
211 AC_MSG_ERROR([Could not download $3/$2]) |
212 fi |
212 fi |
213 case "$extension" in |
213 case "$extension" in |
214 zip) echo "Unzipping $installdir/$filename..." |
214 zip) echo "Unzipping $installdir/$filename..." |
215 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) |
215 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) |
216 ;; |
216 ;; |
218 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) |
218 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) |
219 ;; |
219 ;; |
220 tgz) echo "Untaring $installdir/$filename..." |
220 tgz) echo "Untaring $installdir/$filename..." |
221 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) |
221 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) |
222 ;; |
222 ;; |
223 *) AC_ERROR([Cannot handle build depency archive with extension $extension]) |
223 *) AC_MSG_ERROR([Cannot handle build depency archive with extension $extension]) |
224 ;; |
224 ;; |
225 esac |
225 esac |
226 fi |
226 fi |
227 if test -f $installdir/$filename.unpacked; then |
227 if test -f $installdir/$filename.unpacked; then |
228 $5=$installdir |
228 $5=$installdir |
229 fi |
229 fi |
230 ]) |
230 ]) |
231 |
|