0
5
0
| ... | ... |
@@ -9,96 +9,99 @@ |
| 9 | 9 |
m4_define([lemon_version], [ifelse(lemon_version_number(), |
| 10 | 10 |
[], |
| 11 | 11 |
[lemon_hg_path().lemon_hg_revision()], |
| 12 | 12 |
[lemon_version_number()])]) |
| 13 | 13 |
|
| 14 | 14 |
AC_PREREQ([2.59]) |
| 15 | 15 |
AC_INIT([LEMON], [lemon_version()], [lemon-user@lemon.cs.elte.hu], [lemon]) |
| 16 | 16 |
AC_CONFIG_AUX_DIR([build-aux]) |
| 17 | 17 |
AC_CONFIG_MACRO_DIR([m4]) |
| 18 | 18 |
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects nostdinc]) |
| 19 | 19 |
AC_CONFIG_SRCDIR([lemon/list_graph.h]) |
| 20 | 20 |
AC_CONFIG_HEADERS([config.h lemon/config.h]) |
| 21 | 21 |
|
| 22 | 22 |
dnl Do compilation tests using the C++ compiler. |
| 23 | 23 |
AC_LANG([C++]) |
| 24 | 24 |
|
| 25 | 25 |
dnl Checks for programs. |
| 26 | 26 |
AC_PROG_CXX |
| 27 | 27 |
AC_PROG_CXXCPP |
| 28 | 28 |
AC_PROG_INSTALL |
| 29 | 29 |
AC_DISABLE_SHARED |
| 30 | 30 |
AC_PROG_LIBTOOL |
| 31 | 31 |
|
| 32 | 32 |
AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no]) |
| 33 | 33 |
AC_CHECK_PROG([gs_found],[gs],[yes],[no]) |
| 34 | 34 |
|
| 35 | 35 |
dnl Detect Intel compiler. |
| 36 | 36 |
AC_MSG_CHECKING([whether we are using the Intel C++ compiler]) |
| 37 | 37 |
AC_COMPILE_IFELSE([#ifndef __INTEL_COMPILER |
| 38 | 38 |
choke me |
| 39 | 39 |
#endif], [ICC=[yes]], [ICC=[no]]) |
| 40 | 40 |
if test x"$ICC" = x"yes"; then |
| 41 | 41 |
AC_MSG_RESULT([yes]) |
| 42 | 42 |
else |
| 43 | 43 |
AC_MSG_RESULT([no]) |
| 44 | 44 |
fi |
| 45 | 45 |
|
| 46 | 46 |
dnl Set custom compiler flags when using g++. |
| 47 | 47 |
if test "$GXX" = yes -a "$ICC" = no; then |
| 48 | 48 |
WARNINGCXXFLAGS="-Wall -W -Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align -Wsign-promo -Woverloaded-virtual -ansi -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas" |
| 49 | 49 |
fi |
| 50 | 50 |
AC_SUBST([WARNINGCXXFLAGS]) |
| 51 | 51 |
|
| 52 | 52 |
dnl Checks for libraries. |
| 53 | 53 |
#LX_CHECK_GLPK |
| 54 | 54 |
#LX_CHECK_CPLEX |
| 55 | 55 |
#LX_CHECK_SOPLEX |
| 56 | 56 |
|
| 57 |
AM_CONDITIONAL([HAVE_LP], [test x"$lx_lp_found" = x"yes"]) |
|
| 58 |
AM_CONDITIONAL([HAVE_MIP], [test x"$lx_mip_found" = x"yes"]) |
|
| 59 |
|
|
| 57 | 60 |
dnl Disable/enable building the demo programs. |
| 58 | 61 |
AC_ARG_ENABLE([demo], |
| 59 | 62 |
AS_HELP_STRING([--enable-demo], [build the demo programs]) |
| 60 | 63 |
AS_HELP_STRING([--disable-demo], [do not build the demo programs @<:@default@:>@]), |
| 61 | 64 |
[], [enable_demo=no]) |
| 62 | 65 |
AC_MSG_CHECKING([whether to build the demo programs]) |
| 63 | 66 |
if test x"$enable_demo" != x"no"; then |
| 64 | 67 |
AC_MSG_RESULT([yes]) |
| 65 | 68 |
else |
| 66 | 69 |
AC_MSG_RESULT([no]) |
| 67 | 70 |
fi |
| 68 | 71 |
AM_CONDITIONAL([WANT_DEMO], [test x"$enable_demo" != x"no"]) |
| 69 | 72 |
|
| 70 | 73 |
dnl Disable/enable building the binary tools. |
| 71 | 74 |
AC_ARG_ENABLE([tools], |
| 72 | 75 |
AS_HELP_STRING([--enable-tools], [build additional tools @<:@default@:>@]) |
| 73 | 76 |
AS_HELP_STRING([--disable-tools], [do not build additional tools]), |
| 74 | 77 |
[], [enable_tools=yes]) |
| 75 | 78 |
AC_MSG_CHECKING([whether to build the additional tools]) |
| 76 | 79 |
if test x"$enable_tools" != x"no"; then |
| 77 | 80 |
AC_MSG_RESULT([yes]) |
| 78 | 81 |
else |
| 79 | 82 |
AC_MSG_RESULT([no]) |
| 80 | 83 |
fi |
| 81 | 84 |
AM_CONDITIONAL([WANT_TOOLS], [test x"$enable_tools" != x"no"]) |
| 82 | 85 |
|
| 83 | 86 |
dnl Checks for header files. |
| 84 | 87 |
AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h) |
| 85 | 88 |
|
| 86 | 89 |
dnl Checks for typedefs, structures, and compiler characteristics. |
| 87 | 90 |
AC_C_CONST |
| 88 | 91 |
AC_C_INLINE |
| 89 | 92 |
AC_TYPE_SIZE_T |
| 90 | 93 |
AC_HEADER_TIME |
| 91 | 94 |
AC_STRUCT_TM |
| 92 | 95 |
|
| 93 | 96 |
dnl Checks for library functions. |
| 94 | 97 |
AC_HEADER_STDC |
| 95 | 98 |
AC_CHECK_FUNCS(gettimeofday times ctime_r) |
| 96 | 99 |
|
| 97 | 100 |
dnl Add dependencies on files generated by configure. |
| 98 | 101 |
AC_SUBST([CONFIG_STATUS_DEPENDENCIES], |
| 99 | 102 |
['$(top_srcdir)/doc/Doxyfile.in $(top_srcdir)/lemon/lemon.pc.in']) |
| 100 | 103 |
|
| 101 | 104 |
AC_CONFIG_FILES([ |
| 102 | 105 |
Makefile |
| 103 | 106 |
doc/Doxyfile |
| 104 | 107 |
lemon/lemon.pc |
| ... | ... |
@@ -17,61 +17,65 @@ |
| 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 | 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 |
lx_lp_found=yes |
|
| 66 |
AC_DEFINE([HAVE_LP], [1], [Define to 1 if you have any LP solver.]) |
|
| 67 |
lx_mip_found=yes |
|
| 68 |
AC_DEFINE([HAVE_MIP], [1], [Define to 1 if you have any MIP solver.]) |
|
| 65 | 69 |
AC_MSG_RESULT([yes]) |
| 66 | 70 |
else |
| 67 | 71 |
CPLEX_CFLAGS="" |
| 68 | 72 |
CPLEX_LDFLAGS="" |
| 69 | 73 |
CPLEX_LIBS="" |
| 70 | 74 |
AC_MSG_RESULT([no]) |
| 71 | 75 |
fi |
| 72 | 76 |
fi |
| 73 | 77 |
CPLEX_LIBS="$CPLEX_LDFLAGS $CPLEX_LIBS" |
| 74 | 78 |
AC_SUBST(CPLEX_CFLAGS) |
| 75 | 79 |
AC_SUBST(CPLEX_LIBS) |
| 76 | 80 |
AM_CONDITIONAL([HAVE_CPLEX], [test x"$lx_cplex_found" = x"yes"]) |
| 77 | 81 |
]) |
| ... | ... |
@@ -15,61 +15,65 @@ |
| 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 | 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 |
lx_lp_found=yes |
|
| 64 |
AC_DEFINE([HAVE_LP], [1], [Define to 1 if you have any LP solver.]) |
|
| 65 |
lx_mip_found=yes |
|
| 66 |
AC_DEFINE([HAVE_MIP], [1], [Define to 1 if you have any MIP solver.]) |
|
| 63 | 67 |
AC_MSG_RESULT([yes]) |
| 64 | 68 |
else |
| 65 | 69 |
GLPK_CFLAGS="" |
| 66 | 70 |
GLPK_LDFLAGS="" |
| 67 | 71 |
GLPK_LIBS="" |
| 68 | 72 |
AC_MSG_RESULT([no]) |
| 69 | 73 |
fi |
| 70 | 74 |
fi |
| 71 | 75 |
GLPK_LIBS="$GLPK_LDFLAGS $GLPK_LIBS" |
| 72 | 76 |
AC_SUBST(GLPK_CFLAGS) |
| 73 | 77 |
AC_SUBST(GLPK_LIBS) |
| 74 | 78 |
AM_CONDITIONAL([HAVE_GLPK], [test x"$lx_glpk_found" = x"yes"]) |
| 75 | 79 |
]) |
| ... | ... |
@@ -11,61 +11,63 @@ |
| 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 | 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 |
lx_lp_found=yes |
|
| 60 |
AC_DEFINE([HAVE_LP], [1], [Define to 1 if you have any LP solver.]) |
|
| 59 | 61 |
AC_MSG_RESULT([yes]) |
| 60 | 62 |
else |
| 61 | 63 |
SOPLEX_CXXFLAGS="" |
| 62 | 64 |
SOPLEX_LDFLAGS="" |
| 63 | 65 |
SOPLEX_LIBS="" |
| 64 | 66 |
AC_MSG_RESULT([no]) |
| 65 | 67 |
fi |
| 66 | 68 |
fi |
| 67 | 69 |
SOPLEX_LIBS="$SOPLEX_LDFLAGS $SOPLEX_LIBS" |
| 68 | 70 |
AC_SUBST(SOPLEX_CXXFLAGS) |
| 69 | 71 |
AC_SUBST(SOPLEX_LIBS) |
| 70 | 72 |
AM_CONDITIONAL([HAVE_SOPLEX], [test x"$lx_soplex_found" = x"yes"]) |
| 71 | 73 |
]) |
0 comments (0 inline)