I think I finally got the configure.ac file right, after much googling :D

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4485 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2010-01-17 23:27:53 +00:00
parent c7a429e68d
commit 306a7abc63

View File

@ -195,9 +195,13 @@ if test "x$with_irrlicht" != "x" ; then
AC_MSG_ERROR([Can't find irrlicht in $with_irrlicht.])
fi
else
CPPFLAGS_Save=$CPPFLAGS
# check in /usr
#echo " in /usr/ : "
AC_CHECK_HEADER(irrlicht.h, irrlicht_found_in_usr=yes, irrlicht_found_in_usr=no, /usr/include)
echo " in /usr/ : "
CPPFLAGS="${CPPFLAGS_Save} -I/usr/include/irrlicht"
AC_CHECK_HEADER(irrlicht.h, irrlicht_found_in_usr=yes, irrlicht_found_in_usr=no)
# if it's not found there, try /usr/local instead
if test x$irrlicht_found_in_usr == xyes; then
@ -206,22 +210,23 @@ else
# I'd like to fall back to check /usr/local second, but stupid autotools does not support
# checking for a header in 2 directories because it caches results
AC_MSG_ERROR([Can't find irrlicht installation in /usr, use --with-irrlicht...])
#AC_MSG_ERROR([Can't find irrlicht installation in /usr, use --with-irrlicht...])
## erase cached result
#ac_cv_header_irrlicht_h=""
#
#echo " in /usr/local/ : "
#AC_CHECK_HEADER(irrlicht.h, irrlicht_found_in_usr_local=yes, irrlicht_found_in_usr_local=no, /usr/local/include)
#
#if test x$have_irrlicht_hdr == xyes; then
# with_irrlicht="/usr/local"
#else
# AC_MSG_ERROR([Can't find irrlicht installation in standard prefixes, use --with-irrlicht...])
#fi
# erase cached result
unset ac_cv_header_irrlicht_h
echo " in /usr/local/ : "
CPPFLAGS="${CPPFLAGS_Save} -I/usr/local/include/irrlicht"
AC_CHECK_HEADER(irrlicht.h, irrlicht_found_in_usr_local=yes, irrlicht_found_in_usr_local=no)
if test x$irrlicht_found_in_usr_local == xyes; then
with_irrlicht="/usr/local"
else
AC_MSG_ERROR([Can't find irrlicht installation in standard prefixes, use --with-irrlicht...])
fi
fi
CPPFLAGS="${CPPFLAGS} -I ${with_irrlicht}/include/irrlicht"
CPPFLAGS="${CPPFLAGS_Save} -I ${with_irrlicht}/include/irrlicht"
fi