Check cross_compiling variable before AC_CHECK_FILES, since AC_CHECK_FILES cannot be used when cross compiling libtorrent.

This commit is contained in:
Michael Wojciechowski 2008-02-03 00:39:03 +00:00
parent 05bb0bebff
commit 4648a61b04
1 changed files with 6 additions and 1 deletions

View File

@ -27,8 +27,13 @@ AC_PROG_LIBTOOL
dnl Make sure that the asio header files are added.
ASIO_DIR=$srcdir/include/libtorrent/asio
AC_CHECK_FILES([$ASIO_DIR/../asio.hpp $ASIO_DIR/ssl/stream.hpp $ASIO_DIR/ip/tcp.hpp ],,AC_MSG_ERROR([ ASIO header files not found. Get them from asio.sourceforge.net (use CVS head) and include or symlink them. Example: ln -s ../../../asio/include/asio.hpp include/libtorrent/asio.hpp && ln -s ../../../asio/include/asio include/libtorrent/asio ]) )
if test "$cross_compiling" == "no"; then
AC_CHECK_FILES([$ASIO_DIR/../asio.hpp $ASIO_DIR/ssl/stream.hpp $ASIO_DIR/ip/tcp.hpp ],,AC_MSG_ERROR([ ASIO header files not found. Get them from asio.sourceforge.net (use CVS head) and include or symlink them. Example: ln -s ../../../asio/include/asio.hpp include/libtorrent/asio.hpp && ln -s ../../../asio/include/asio include/libtorrent/asio ]) )
dnl check asio version
else
AC_MSG_NOTICE([Cross compiling, not checking ASIO headers])
fi
SAVED_LIBS="$LIBS"