# HG changeset patch # User John W. Eaton # Date 1250611816 14400 # Node ID 79b5fe2d5646df80ccf29e5d847c0f2d95bac7dd # Parent 41a74dcd14dfe9929c6cc57dd8f4cb728c53ba77 use Z_LIBS in checks for curl and glpk libraries diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-08-18 John W. Eaton + + * aclocal.m4 (OCTAVE_CHECK_LIBRARY): Use variables named + octave_check_library_save_XXX instead of save_XXX. + * configure.in: Add Z_LDFLAGS and Z_LIBS to LIBS, and Z_CPPFLAGS + to CPPFLAGS in checks for curl and glpk libraries. + 2009-08-18 David Grundberg * aclocal.m4 (OCTAVE_CHECK_LIBRARY): Clear QHULL_LIBS etc on diff --git a/aclocal.m4 b/aclocal.m4 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -466,13 +466,13 @@ [TEXINFO_]m4_toupper([$1])= warn_$1="$3" if test -n "$m4_toupper([$1])_LIBS"; then - save_CPPFLAGS="$CPPFLAGS" + octave_check_library_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$m4_toupper([$1])_CPPFLAGS $CPPFLAGS" m4_ifnblank([$6], [AC_LANG_PUSH($6)]) AC_CHECK_HEADERS($4, [ - save_LDFLAGS="$LDFLAGS" + octave_check_library_save_LDFLAGS="$LDFLAGS" LDFLAGS="$m4_toupper([$1])_LDFLAGS $LDFLAGS" - save_LIBS="$LIBS" + octave_check_library_save_LIBS="$LIBS" LIBS="$m4_toupper([$1])_LIBS $LIBS" octave_$1_ok=no AC_MSG_CHECKING([for $5 in $m4_toupper([$1])_LIBS]) @@ -486,10 +486,10 @@ [Define if $2 is available.]) [TEXINFO_]m4_toupper([$1])="@set [HAVE_]m4_toupper([$1])"], [$8]) fi - LIBS="$save_LIBS" - LDFLAGS="$save_LDFLAGS"]) + LIBS="$octave_check_library_save_LIBS" + LDFLAGS="$octave_check_library_save_LDFLAGS"]) m4_ifnblank([$6], [AC_LANG_POP($6)]) - CPPFLAGS="$save_CPPFLAGS" + CPPFLAGS="$octave_check_library_save_CPPFLAGS" fi AC_SUBST(m4_toupper([$1])_LIBS) AC_SUBST([TEXINFO_]m4_toupper([$1])) diff --git a/configure.in b/configure.in --- a/configure.in +++ b/configure.in @@ -558,15 +558,27 @@ # Checks for GLPK header and library. +save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$Z_CPPFLAGS $CPPFLAGS" +save_LIBS="$LIBS" +LIBS="$Z_LDFLAGS $Z_LIBS $LIBS" OCTAVE_CHECK_LIBRARY(glpk, GLPK, [GLPK library not found. The glpk function for solving linear programs will be disabled.], [glpk/glpk.h glpk.h], [_glp_lpx_simplex]) +LIBS="$save_LIBS" +CPPFLAGS="$save_CPPFLAGS" # Checks for CURL header and library. +save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$Z_CPPFLAGS $CPPFLAGS" +save_LIBS="$LIBS" +LIBS="$Z_LDFLAGS $Z_LIBS $LIBS" OCTAVE_CHECK_LIBRARY(curl, cURL, [cURL library not found. The urlread and urlwrite functions will be disabled.], [curl/curl.h], [curl_easy_escape]) +LIBS="$save_LIBS" +CPPFLAGS="$save_CPPFLAGS" # GraphicsMagick++