From: Alexandre Demers Date: Sat, 23 Nov 2013 01:06:20 +0000 (-0500) Subject: configure: Fix --enable-XX-bit flags by moving LT_INIT where it should X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2af28040d639dddbb7c258981a00eaf3dfcbcf03;p=mesa.git configure: Fix --enable-XX-bit flags by moving LT_INIT where it should Moving LT_INIT after setting completely (AM_)C(XX)FLAGS and LDFLAGS. LT_INIT needs them as they are expected to be used all along the compilation when the macro runs its tests to determine among other things the host type. For info, see http://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50754 Signed-off-by: Alexandre Demers Tested-by: Tapani Palli Reviewed-by: Emil Velikov --- diff --git a/configure.ac b/configure.ac index cd02babd673..b27cfb3f41b 100644 --- a/configure.ac +++ b/configure.ac @@ -57,9 +57,6 @@ AC_CHECK_PROGS([PYTHON2], [python2 python]) AC_PROG_SED AC_PROG_MKDIR_P -LT_PREREQ([2.2]) -LT_INIT([disable-static]) - AX_PROG_BISON([], AS_IF([test ! -f "$srcdir/src/glsl/glcpp/glcpp-parse.c"], [AC_MSG_ERROR([bison not found - unable to compile glcpp-parse.y])])) @@ -2190,6 +2187,14 @@ dnl Add user CFLAGS and CXXFLAGS CFLAGS="$CFLAGS $USER_CFLAGS" CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS" +dnl +dnl LT_INIT adds tests to determine host based on some variables like (AM_)C(XX)FLAGS and (AM_)LDFLAGS. +dnl They need to be set before calling LT_INIT so the macro can configure things correctly when cross_compiling. +dnl This will allow --enable-xx-bit to work as expected. +dnl +LT_PREREQ([2.2]) +LT_INIT([disable-static]) + dnl Substitute the config AC_CONFIG_FILES([Makefile src/Makefile