equal
deleted
inserted
replaced
28 elif test x"$with_glpk" != x"yes"; then |
28 elif test x"$with_glpk" != x"yes"; then |
29 GLPK_LDFLAGS="-L$with_glpk/lib" |
29 GLPK_LDFLAGS="-L$with_glpk/lib" |
30 fi |
30 fi |
31 GLPK_LIBS="-lglpk" |
31 GLPK_LIBS="-lglpk" |
32 |
32 |
33 lx_save_cxxflags="$CXXFLAGS"; |
33 lx_save_cxxflags="$CXXFLAGS" |
34 lx_save_ldflags="$LDFLAGS"; |
34 lx_save_ldflags="$LDFLAGS" |
35 lx_save_libs="$LIBS"; |
35 lx_save_libs="$LIBS" |
36 CXXFLAGS="$GLPK_CFLAGS" |
36 CXXFLAGS="$GLPK_CFLAGS" |
37 LDFLAGS="$GLPK_LDFLAGS" |
37 LDFLAGS="$GLPK_LDFLAGS" |
38 LIBS="$GLPK_LIBS" |
38 LIBS="$GLPK_LIBS" |
39 |
39 |
40 lx_glpk_test_prog=' |
40 lx_glpk_test_prog=' |
60 |
60 |
61 if test x"$lx_glpk_found" = x"yes"; then |
61 if test x"$lx_glpk_found" = x"yes"; then |
62 AC_DEFINE([HAVE_GLPK], [1], [Define to 1 if you have GLPK.]) |
62 AC_DEFINE([HAVE_GLPK], [1], [Define to 1 if you have GLPK.]) |
63 AC_MSG_RESULT([yes]) |
63 AC_MSG_RESULT([yes]) |
64 else |
64 else |
|
65 $GLPK_CFLAGS="" |
|
66 $GLPK_LDFLAGS="" |
|
67 $GLPK_LIBS="" |
65 AC_MSG_RESULT([no]) |
68 AC_MSG_RESULT([no]) |
66 fi |
69 fi |
67 fi |
70 fi |
68 GLPK_LIBS="$GLPK_LDFLAGS $GLPK_LIBS" |
71 GLPK_LIBS="$GLPK_LDFLAGS $GLPK_LIBS" |
69 AC_SUBST(GLPK_CFLAGS) |
72 AC_SUBST(GLPK_CFLAGS) |
102 elif test x"$with_cplex" != x"yes"; then |
105 elif test x"$with_cplex" != x"yes"; then |
103 CPLEX_LDFLAGS="-L$with_cplex/lib" |
106 CPLEX_LDFLAGS="-L$with_cplex/lib" |
104 fi |
107 fi |
105 CPLEX_LIBS="-lcplex -lm -lpthread" |
108 CPLEX_LIBS="-lcplex -lm -lpthread" |
106 |
109 |
107 lx_save_cxxflags="$CXXFLAGS"; |
110 lx_save_cxxflags="$CXXFLAGS" |
108 lx_save_ldflags="$LDFLAGS"; |
111 lx_save_ldflags="$LDFLAGS" |
109 lx_save_libs="$LIBS"; |
112 lx_save_libs="$LIBS" |
110 CXXFLAGS="$CPLEX_CFLAGS" |
113 CXXFLAGS="$CPLEX_CFLAGS" |
111 LDFLAGS="$CPLEX_LDFLAGS" |
114 LDFLAGS="$CPLEX_LDFLAGS" |
112 LIBS="$CPLEX_LIBS" |
115 LIBS="$CPLEX_LIBS" |
113 |
116 |
114 lx_cplex_test_prog=' |
117 lx_cplex_test_prog=' |
116 #include <ilcplex/cplex.h> |
119 #include <ilcplex/cplex.h> |
117 } |
120 } |
118 |
121 |
119 int main(int argc, char* argv[]) |
122 int main(int argc, char* argv[]) |
120 { |
123 { |
121 CPXENVptr env = NULL; |
124 CPXENVptr env = NULL; |
122 return 0; |
125 return 0; |
123 }' |
126 }' |
124 |
127 |
125 AC_LANG_PUSH(C++) |
128 AC_LANG_PUSH(C++) |
126 AC_LINK_IFELSE([$lx_cplex_test_prog], [lx_cplex_found=yes], [lx_cplex_found=no]) |
129 AC_LINK_IFELSE([$lx_cplex_test_prog], [lx_cplex_found=yes], [lx_cplex_found=no]) |
132 |
135 |
133 if test x"$lx_cplex_found" = x"yes"; then |
136 if test x"$lx_cplex_found" = x"yes"; then |
134 AC_DEFINE([HAVE_CPLEX], [1], [Define to 1 if you have CPLEX.]) |
137 AC_DEFINE([HAVE_CPLEX], [1], [Define to 1 if you have CPLEX.]) |
135 AC_MSG_RESULT([yes]) |
138 AC_MSG_RESULT([yes]) |
136 else |
139 else |
|
140 $CPLEX_CFLAGS="" |
|
141 $CPLEX_LDFLAGS="" |
|
142 $CPLEX_LIBS="" |
137 AC_MSG_RESULT([no]) |
143 AC_MSG_RESULT([no]) |
138 fi |
144 fi |
139 fi |
145 fi |
140 CPLEX_LIBS="$CPLEX_LDFLAGS $CPLEX_LIBS" |
146 CPLEX_LIBS="$CPLEX_LDFLAGS $CPLEX_LIBS" |
141 AC_SUBST(CPLEX_CFLAGS) |
147 AC_SUBST(CPLEX_CFLAGS) |