From c948e9517b7b5f0bacb055ab2ad320f889c3fb49 Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Mon, 23 Jun 2014 17:38:20 -0400 Subject: [PATCH] Fix header check for glpk.h. --- config/glpk.m4 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/config/glpk.m4 b/config/glpk.m4 index cc2a3be71..2799d5a77 100644 --- a/config/glpk.m4 +++ b/config/glpk.m4 @@ -34,7 +34,13 @@ elif test "$with_glpk" = yes; then dnl Try a bunch of combinations until something works :-/ GLPK_LIBS= + AC_LANG_PUSH([C++]) + cvc4_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" AC_CHECK_HEADER([glpk.h], [], [AC_MSG_FAILURE([cannot find glpk.h, the GLPK header!])]) + CPPFLAGS="$cvc4_save_CPPFLAGS" + AC_LANG_POP([C++]) + AC_MSG_CHECKING([how to link glpk]) CVC4_TRY_GLPK_WITH([]) CVC4_TRY_GLPK_WITH([-lgmp]) @@ -107,7 +113,7 @@ AC_DEFUN([CVC4_TRY_GLPK_WITH], [ if test -z "$GLPK_LIBS"; then AC_LANG_PUSH([C++]) cvc4_save_LIBS="$LIBS" - cvc4_save_CPPFLAGS="$LDFLAGS" + cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="$GLPK_LDFLAGS $LDFLAGS" -- 2.30.2