From: Morgan Deters Date: Mon, 23 Jun 2014 21:38:20 +0000 (-0400) Subject: Fix header check for glpk.h. X-Git-Tag: cvc5-1.0.0~6700^2~7 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=98ef97e046ba6ea1338dc1508d0ebed27085aba6;p=cvc5.git Fix header check for glpk.h. --- 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"