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:
parent
c7a429e68d
commit
306a7abc63
35
configure.ac
35
configure.ac
@ -195,9 +195,13 @@ if test "x$with_irrlicht" != "x" ; then
|
|||||||
AC_MSG_ERROR([Can't find irrlicht in $with_irrlicht.])
|
AC_MSG_ERROR([Can't find irrlicht in $with_irrlicht.])
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
CPPFLAGS_Save=$CPPFLAGS
|
||||||
|
|
||||||
# check in /usr
|
# check in /usr
|
||||||
#echo " in /usr/ : "
|
echo " in /usr/ : "
|
||||||
AC_CHECK_HEADER(irrlicht.h, irrlicht_found_in_usr=yes, irrlicht_found_in_usr=no, /usr/include)
|
|
||||||
|
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 it's not found there, try /usr/local instead
|
||||||
if test x$irrlicht_found_in_usr == xyes; then
|
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
|
# 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
|
# 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
|
# erase cached result
|
||||||
#ac_cv_header_irrlicht_h=""
|
unset ac_cv_header_irrlicht_h
|
||||||
#
|
|
||||||
#echo " in /usr/local/ : "
|
echo " in /usr/local/ : "
|
||||||
#AC_CHECK_HEADER(irrlicht.h, irrlicht_found_in_usr_local=yes, irrlicht_found_in_usr_local=no, /usr/local/include)
|
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$have_irrlicht_hdr == xyes; then
|
|
||||||
# with_irrlicht="/usr/local"
|
if test x$irrlicht_found_in_usr_local == xyes; then
|
||||||
#else
|
with_irrlicht="/usr/local"
|
||||||
# AC_MSG_ERROR([Can't find irrlicht installation in standard prefixes, use --with-irrlicht...])
|
else
|
||||||
#fi
|
AC_MSG_ERROR([Can't find irrlicht installation in standard prefixes, use --with-irrlicht...])
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CPPFLAGS="${CPPFLAGS} -I ${with_irrlicht}/include/irrlicht"
|
CPPFLAGS="${CPPFLAGS_Save} -I ${with_irrlicht}/include/irrlicht"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user