Commit 1ebce82f authored by vijaysm's avatar vijaysm
Browse files

The 32bit and 64bit enable flags were being wrongly evaluated.

parent 7660f655
......@@ -248,38 +248,44 @@ fi
# This requires FATHOM_CXX_FLAGS and FATHOM_CC_FLAGS to have been called first
AC_ARG_ENABLE(32bit, AC_HELP_STRING([--enable-32bit],[Force 32-bit objects]),
[
echo "Enable 32bit val = $enableval"
if (test "xyes" != "x$enableval" && test "xno" != "x$enableval"); then
AC_MSG_ERROR([Unknown argument --enable-32bit=$enableval])
elif test "x" = "x$FATHOM_CXX_32BIT"; then
AC_MSG_ERROR([Don't know how to force 32-bit C++ on this platform. Try setting CXXFLAGS manually])
elif test "x" = "x$FATHOM_CC_32BIT"; then
AC_MSG_ERROR([Don't know how to force 32-bit C on this platform. Try setting CFLAGS manually])
else
enable_32bit=$enableval
fi
if (test "xno" != "x$enableval"); then
if test "x" = "x$FATHOM_CXX_32BIT"; then
AC_MSG_ERROR([Don't know how to force 32-bit C++ on this platform. Try setting CXXFLAGS manually])
elif test "x" = "x$FATHOM_CC_32BIT"; then
AC_MSG_ERROR([Don't know how to force 32-bit C on this platform. Try setting CFLAGS manually])
fi
fi
enable_32bit=$enableval
], [enable_32bit=no])
# This requires FATHOM_CXX_FLAGS and FATHOM_CC_FLAGS to have been called first
AC_ARG_ENABLE(64bit, AC_HELP_STRING([--enable-64bit],[Force 64-bit objects]),
[
echo "Enable 64bit val = $enableval"
if (test "xyes" != "x$enableval" && test "xno" != "x$enableval"); then
AC_MSG_ERROR([Unknown argument --enable-64bit=$enableval])
elif test "x" = "x$FATHOM_CXX_64BIT"; then
AC_MSG_ERROR([Don't know how to force 64-bit C++ on this platform. Try setting CXXFLAGS manually])
elif test "x" = "x$FATHOM_CC_64BIT"; then
AC_MSG_ERROR([Don't know how to force 64-bit C on this platform. Try setting CFLAGS manually])
elif test "xyes" = "x$enable_32bit"; then
AC_MSG_ERROR([Cannot do both --enable-32bit and --enable-64bit])
else
enable_64bit=$enableval
fi
if (test "xno" != "x$enableval"); then
if test "x" = "x$FATHOM_CXX_64BIT"; then
AC_MSG_ERROR([Don't know how to force 64-bit C++ on this platform. Try setting CXXFLAGS manually])
elif test "x" = "x$FATHOM_CC_64BIT"; then
AC_MSG_ERROR([Don't know how to force 64-bit C on this platform. Try setting CFLAGS manually])
elif test "xyes" = "x$enable_32bit"; then
AC_MSG_ERROR([Cannot do both --enable-32bit and --enable-64bit])
fi
fi
enable_64bit=$enableval
], [enable_64bit=no])
if (test "xyes" != "x$enable_32bit"); then
if (test "xno" != "x$enable_32bit"); then
CXXFLAGS="$CXXFLAGS $FATHOM_CXX_32BIT"
CFLAGS="$CFLAGS $FATHOM_CC_32BIT"
fi
if (test "xyes" != "x$enable_64bit"); then
if (test "xno" != "x$enable_64bit"); then
CXXFLAGS="$CXXFLAGS $FATHOM_CXX_64BIT"
CFLAGS="$CFLAGS $FATHOM_CC_64BIT"
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment