comparison m4/acinclude.m4 @ 17241:03a666018e0f

build: Detect new GLPK API features required since changeset 54e251e699bb * m4/acinclude.m4 (OCTAVE_CHECK_LIB_GLPK_OK): New macro to detect the newest GLPK API features required by Octave. * configure.ac: Call it and disable glpk if the library is not ok.
author Mike Miller <mtmiller@ieee.org>
date Tue, 13 Aug 2013 21:38:12 -0400
parents fbee0d312af5
children 3a7d5d655749
comparison
equal deleted inserted replaced
17240:d757c98636d8 17241:03a666018e0f
588 octave_cv_lib_arpack_ok=no, 588 octave_cv_lib_arpack_ok=no,
589 octave_cv_lib_arpack_ok=yes) 589 octave_cv_lib_arpack_ok=yes)
590 AC_LANG_POP(C++) 590 AC_LANG_POP(C++)
591 ]) 591 ])
592 if test $octave_cv_lib_arpack_ok = yes; then 592 if test $octave_cv_lib_arpack_ok = yes; then
593 $1
594 :
595 else
596 $2
597 :
598 fi
599 ])
600 dnl
601 dnl Check whether GLPK provides the latest API functions required
602 dnl for the glpk function. The glp_iptcp structure was introduced
603 dnl in GLPK version 4.38.
604 dnl
605 AC_DEFUN([OCTAVE_CHECK_LIB_GLPK_OK], [
606 AC_CACHE_CHECK([whether the glpk library has glp_interior(glp_prob*, glp_iptcp*)],
607 [octave_cv_lib_glpk_ok],
608 [AC_LANG_PUSH(C++)
609 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
610 extern "C"
611 {
612 #if defined (HAVE_GLPK_GLPK_H)
613 #include <glpk/glpk.h>
614 #else
615 #include <glpk.h>
616 #endif
617 }
618 ]], [[
619 glp_prob *lp = glp_create_prob ();
620 glp_iptcp iptcp;
621 glp_init_iptcp (&iptcp);
622 int retval = glp_interior (lp, &iptcp);
623 ]])],
624 octave_cv_lib_glpk_ok=yes,
625 octave_cv_lib_glpk_ok=no)
626 AC_LANG_POP(C++)
627 ])
628 if test $octave_cv_lib_glpk_ok = yes; then
593 $1 629 $1
594 : 630 :
595 else 631 else
596 $2 632 $2
597 : 633 :