gravatar
ladanyi@tmit.bme.hu
ladanyi@tmit.bme.hu
Fix bug caused by m4 consuming pairs of square brackets (#108).
0 3 0
default
3 files changed with 3 insertions and 3 deletions:
↑ Collapse diff ↑
Ignore white space 192 line context
1 1
AC_DEFUN([LX_CHECK_CPLEX],
2 2
[
3 3
  AC_ARG_WITH([cplex],
4 4
AS_HELP_STRING([--with-cplex@<:@=PREFIX@:>@], [search for CPLEX under PREFIX or under the default search paths if PREFIX is not given @<:@default@:>@])
5 5
AS_HELP_STRING([--without-cplex], [disable checking for CPLEX]),
6 6
              [], [with_cplex=yes])
7 7

	
8 8
  AC_ARG_WITH([cplex-includedir],
9 9
AS_HELP_STRING([--with-cplex-includedir=DIR], [search for CPLEX headers in DIR]),
10 10
              [], [with_cplex_includedir=no])
11 11

	
12 12
  AC_ARG_WITH([cplex-libdir],
13 13
AS_HELP_STRING([--with-cplex-libdir=DIR], [search for CPLEX libraries in DIR]),
14 14
              [], [with_cplex_libdir=no])
15 15

	
16 16
  lx_cplex_found=no
17 17
  if test x"$with_cplex" != x"no"; then
18 18
    AC_MSG_CHECKING([for CPLEX])
19 19

	
20 20
    if test x"$with_cplex_includedir" != x"no"; then
21 21
      CPLEX_CFLAGS="-I$with_cplex_includedir"
22 22
    elif test x"$with_cplex" != x"yes"; then
23 23
      CPLEX_CFLAGS="-I$with_cplex/include"
24 24
    elif test x"$CPLEX_INCLUDEDIR" != x; then
25 25
      CPLEX_CFLAGS="-I$CPLEX_INCLUDEDIR"
26 26
    fi
27 27

	
28 28
    if test x"$with_cplex_libdir" != x"no"; then
29 29
      CPLEX_LDFLAGS="-L$with_cplex_libdir"
30 30
    elif test x"$with_cplex" != x"yes"; then
31 31
      CPLEX_LDFLAGS="-L$with_cplex/lib"
32 32
    elif test x"$CPLEX_LIBDIR" != x; then
33 33
      CPLEX_LDFLAGS="-L$CPLEX_LIBDIR"
34 34
    fi
35 35
    CPLEX_LIBS="-lcplex -lm -lpthread"
36 36

	
37 37
    lx_save_cxxflags="$CXXFLAGS"
38 38
    lx_save_ldflags="$LDFLAGS"
39 39
    lx_save_libs="$LIBS"
40 40
    CXXFLAGS="$CPLEX_CFLAGS"
41 41
    LDFLAGS="$CPLEX_LDFLAGS"
42 42
    LIBS="$CPLEX_LIBS"
43 43

	
44 44
    lx_cplex_test_prog='
45 45
      extern "C" {
46 46
      #include <ilcplex/cplex.h>
47 47
      }
48 48

	
49
      int main(int argc, char* argv[])
49
      int main(int argc, char** argv)
50 50
      {
51 51
        CPXENVptr env = NULL;
52 52
        return 0;
53 53
      }'
54 54

	
55 55
    AC_LANG_PUSH(C++)
56 56
    AC_LINK_IFELSE([$lx_cplex_test_prog], [lx_cplex_found=yes], [lx_cplex_found=no])
57 57
    AC_LANG_POP(C++)
58 58

	
59 59
    CXXFLAGS="$lx_save_cxxflags"
60 60
    LDFLAGS="$lx_save_ldflags"
61 61
    LIBS="$lx_save_libs"
62 62

	
63 63
    if test x"$lx_cplex_found" = x"yes"; then
64 64
      AC_DEFINE([HAVE_CPLEX], [1], [Define to 1 if you have CPLEX.])
65 65
      AC_MSG_RESULT([yes])
66 66
    else
67 67
      CPLEX_CFLAGS=""
68 68
      CPLEX_LDFLAGS=""
69 69
      CPLEX_LIBS=""
70 70
      AC_MSG_RESULT([no])
71 71
    fi
72 72
  fi
73 73
  CPLEX_LIBS="$CPLEX_LDFLAGS $CPLEX_LIBS"
74 74
  AC_SUBST(CPLEX_CFLAGS)
75 75
  AC_SUBST(CPLEX_LIBS)
76 76
  AM_CONDITIONAL([HAVE_CPLEX], [test x"$lx_cplex_found" = x"yes"])
77 77
])
Ignore white space 6 line context
1 1
AC_DEFUN([LX_CHECK_GLPK],
2 2
[
3 3
  AC_ARG_WITH([glpk],
4 4
AS_HELP_STRING([--with-glpk@<:@=PREFIX@:>@], [search for GLPK under PREFIX or under the default search paths if PREFIX is not given @<:@default@:>@])
5 5
AS_HELP_STRING([--without-glpk], [disable checking for GLPK]),
6 6
              [], [with_glpk=yes])
7 7

	
8 8
  AC_ARG_WITH([glpk-includedir],
9 9
AS_HELP_STRING([--with-glpk-includedir=DIR], [search for GLPK headers in DIR]),
10 10
              [], [with_glpk_includedir=no])
11 11

	
12 12
  AC_ARG_WITH([glpk-libdir],
13 13
AS_HELP_STRING([--with-glpk-libdir=DIR], [search for GLPK libraries in DIR]),
14 14
              [], [with_glpk_libdir=no])
15 15

	
16 16
  lx_glpk_found=no
17 17
  if test x"$with_glpk" != x"no"; then
18 18
    AC_MSG_CHECKING([for GLPK])
19 19

	
20 20
    if test x"$with_glpk_includedir" != x"no"; then
21 21
      GLPK_CFLAGS="-I$with_glpk_includedir"
22 22
    elif test x"$with_glpk" != x"yes"; then
23 23
      GLPK_CFLAGS="-I$with_glpk/include"
24 24
    fi
25 25

	
26 26
    if test x"$with_glpk_libdir" != x"no"; then
27 27
      GLPK_LDFLAGS="-L$with_glpk_libdir"
28 28
    elif test x"$with_glpk" != x"yes"; then
29 29
      GLPK_LDFLAGS="-L$with_glpk/lib"
30 30
    fi
31 31
    GLPK_LIBS="-lglpk"
32 32

	
33 33
    lx_save_cxxflags="$CXXFLAGS"
34 34
    lx_save_ldflags="$LDFLAGS"
35 35
    lx_save_libs="$LIBS"
36 36
    CXXFLAGS="$GLPK_CFLAGS"
37 37
    LDFLAGS="$GLPK_LDFLAGS"
38 38
    LIBS="$GLPK_LIBS"
39 39

	
40 40
    lx_glpk_test_prog='
41 41
      extern "C" {
42 42
      #include <glpk.h>
43 43
      }
44 44

	
45
      int main(int argc, char* argv[])
45
      int main(int argc, char** argv)
46 46
      {
47 47
        LPX *lp;
48 48
        lp = lpx_create_prob();
49 49
        lpx_delete_prob(lp);
50 50
        return 0;
51 51
      }'
52 52

	
53 53
    AC_LANG_PUSH(C++)
54 54
    AC_LINK_IFELSE([$lx_glpk_test_prog], [lx_glpk_found=yes], [lx_glpk_found=no])
55 55
    AC_LANG_POP(C++)
56 56

	
57 57
    CXXFLAGS="$lx_save_cxxflags"
58 58
    LDFLAGS="$lx_save_ldflags"
59 59
    LIBS="$lx_save_libs"
60 60

	
61 61
    if test x"$lx_glpk_found" = x"yes"; then
62 62
      AC_DEFINE([HAVE_GLPK], [1], [Define to 1 if you have GLPK.])
63 63
      AC_MSG_RESULT([yes])
64 64
    else
65 65
      GLPK_CFLAGS=""
66 66
      GLPK_LDFLAGS=""
67 67
      GLPK_LIBS=""
68 68
      AC_MSG_RESULT([no])
69 69
    fi
70 70
  fi
71 71
  GLPK_LIBS="$GLPK_LDFLAGS $GLPK_LIBS"
72 72
  AC_SUBST(GLPK_CFLAGS)
73 73
  AC_SUBST(GLPK_LIBS)
74 74
  AM_CONDITIONAL([HAVE_GLPK], [test x"$lx_glpk_found" = x"yes"])
75 75
])
Ignore white space 6 line context
1 1
AC_DEFUN([LX_CHECK_SOPLEX],
2 2
[
3 3
  AC_ARG_WITH([soplex],
4 4
AS_HELP_STRING([--with-soplex@<:@=PREFIX@:>@], [search for SOPLEX under PREFIX or under the default search paths if PREFIX is not given @<:@default@:>@])
5 5
AS_HELP_STRING([--without-soplex], [disable checking for SOPLEX]),
6 6
              [], [with_soplex=yes])
7 7

	
8 8
  AC_ARG_WITH([soplex-includedir],
9 9
AS_HELP_STRING([--with-soplex-includedir=DIR], [search for SOPLEX headers in DIR]),
10 10
              [], [with_soplex_includedir=no])
11 11

	
12 12
  AC_ARG_WITH([soplex-libdir],
13 13
AS_HELP_STRING([--with-soplex-libdir=DIR], [search for SOPLEX libraries in DIR]),
14 14
              [], [with_soplex_libdir=no])
15 15

	
16 16
  lx_soplex_found=no
17 17
  if test x"$with_soplex" != x"no"; then
18 18
    AC_MSG_CHECKING([for SOPLEX])
19 19

	
20 20
    if test x"$with_soplex_includedir" != x"no"; then
21 21
      SOPLEX_CXXFLAGS="-I$with_soplex_includedir"
22 22
    elif test x"$with_soplex" != x"yes"; then
23 23
      SOPLEX_CXXFLAGS="-I$with_soplex/include"
24 24
    fi
25 25

	
26 26
    if test x"$with_soplex_libdir" != x"no"; then
27 27
      SOPLEX_LDFLAGS="-L$with_soplex_libdir"
28 28
    elif test x"$with_soplex" != x"yes"; then
29 29
      SOPLEX_LDFLAGS="-L$with_soplex/lib"
30 30
    fi
31 31
    SOPLEX_LIBS="-lsoplex -lz"
32 32

	
33 33
    lx_save_cxxflags="$CXXFLAGS"
34 34
    lx_save_ldflags="$LDFLAGS"
35 35
    lx_save_libs="$LIBS"
36 36
    CXXFLAGS="$SOPLEX_CXXFLAGS"
37 37
    LDFLAGS="$SOPLEX_LDFLAGS"
38 38
    LIBS="$SOPLEX_LIBS"
39 39

	
40 40
    lx_soplex_test_prog='
41 41
      #include <soplex/soplex.h>
42 42

	
43
      int main(int argc, char* argv[])
43
      int main(int argc, char** argv)
44 44
      {
45 45
        soplex::SoPlex soplex;
46 46
        return 0;
47 47
      }'
48 48

	
49 49
    AC_LANG_PUSH(C++)
50 50
    AC_LINK_IFELSE([$lx_soplex_test_prog], [lx_soplex_found=yes], [lx_soplex_found=no])
51 51
    AC_LANG_POP(C++)
52 52

	
53 53
    CXXFLAGS="$lx_save_cxxflags"
54 54
    LDFLAGS="$lx_save_ldflags"
55 55
    LIBS="$lx_save_libs"
56 56

	
57 57
    if test x"$lx_soplex_found" = x"yes"; then
58 58
      AC_DEFINE([HAVE_SOPLEX], [1], [Define to 1 if you have SOPLEX.])
59 59
      AC_MSG_RESULT([yes])
60 60
    else
61 61
      SOPLEX_CXXFLAGS=""
62 62
      SOPLEX_LDFLAGS=""
63 63
      SOPLEX_LIBS=""
64 64
      AC_MSG_RESULT([no])
65 65
    fi
66 66
  fi
67 67
  SOPLEX_LIBS="$SOPLEX_LDFLAGS $SOPLEX_LIBS"
68 68
  AC_SUBST(SOPLEX_CXXFLAGS)
69 69
  AC_SUBST(SOPLEX_LIBS)
70 70
  AM_CONDITIONAL([HAVE_SOPLEX], [test x"$lx_soplex_found" = x"yes"])
71 71
])
0 comments (0 inline)