Two small configuration bugs

0 views
Skip to first unread message

mark dunn

unread,
Sep 19, 2025, 12:20:25 PM (6 days ago) Sep 19
to isl Development
In your latest code (actually from mirror: https://github.com/Meinersbur/isl.git)

I discovered two possible bugs:
1) my 'export LDFLAGS' gets ignored during configuration
2) If my compiler has c++17 capability then your code assumes I am using it and includes the test files: isl_test_cpp17.cc  isl_test_cpp17-checked.cc  isl_test_cpp17-generic.cc
(I was building it using my old compiler while building my new compiler using c++14)

Each required a change to the configure.ac:

diff --git a/configure.ac b/configure.ac
index 1881c0e3..edd2f83a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,12 +81,18 @@ esac
 if test "x$with_int" = "ximath-32" -a "x$GCC" = "xyes"; then
  MP_CFLAGS="-std=gnu99 $MP_CFLAGS"
 fi
+LIBS="$LIBS $MP_LIBS"
 
 AM_CONDITIONAL(IMATH_FOR_MP, test x$with_int = ximath -o x$with_int = ximath-32)
 AM_CONDITIONAL(GMP_FOR_MP, test x$with_int = xgmp)
 
 AM_CONDITIONAL(HAVE_CXX11, test "x$HAVE_CXX11" = "x1")
 AM_CONDITIONAL(HAVE_CXX17, test "x$HAVE_CXX17" = "x1")
+AS_IF([test "x$HAVE_CXX17" = "x1"], [
+  AM_CXXFLAGS="$AM_CXXFLAGS -std=c++17"
+])
+AC_SUBST([AM_CXXFLAGS])
+
 AM_CONDITIONAL(SMALL_INT_OPT, test "x$with_int" = "ximath-32")
 AS_IF([test "x$with_int" = "ximath-32"], [
  AC_DEFINE([USE_SMALL_INT_OPT], [], [Use small integer optimization])

Sven Verdoolaege

unread,
Sep 19, 2025, 2:18:28 PM (6 days ago) Sep 19
to mark dunn, isl Development
On Thu, Sep 18, 2025 at 07:37:28AM -0700, mark dunn wrote:
> In your latest code (actually from mirror:
> https://github.com/Meinersbur/isl.git)
>
> I discovered two possible bugs:
> 1) my 'export LDFLAGS' gets ignored during configuration
> 2) If my compiler has c++17 capability then your code assumes I am using it
> and includes the test files: isl_test_cpp17.cc isl_test_cpp17-checked.cc
> isl_test_cpp17-generic.cc
> (I was building it using my old compiler while building my new compiler
> using c++14)

Thanks for the report, but I don't quite understand the problem or the solution.

> diff --git a/configure.ac b/configure.ac
> index 1881c0e3..edd2f83a 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -81,12 +81,18 @@ esac
> if test "x$with_int" = "ximath-32" -a "x$GCC" = "xyes"; then
> MP_CFLAGS="-std=gnu99 $MP_CFLAGS"
> fi
> +LIBS="$LIBS $MP_LIBS"

I guess this is related to the LDFLAGS issue,
but I don't see how this affects LDFLAGS.

> AM_CONDITIONAL(IMATH_FOR_MP, test x$with_int = ximath -o x$with_int =
> ximath-32)
> AM_CONDITIONAL(GMP_FOR_MP, test x$with_int = xgmp)
>
> AM_CONDITIONAL(HAVE_CXX11, test "x$HAVE_CXX11" = "x1")
> AM_CONDITIONAL(HAVE_CXX17, test "x$HAVE_CXX17" = "x1")
> +AS_IF([test "x$HAVE_CXX17" = "x1"], [
> + AM_CXXFLAGS="$AM_CXXFLAGS -std=c++17"
> +])
> +AC_SUBST([AM_CXXFLAGS])

I'm also not sure how this solves anything.
If HAVE_CXX17 is set, then doesn't CXX itself already
contain "-std=c++17"?

skimo
Reply all
Reply to author
Forward
0 new messages