1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945
|
#===========================================================================#
# #
# This file is part of the SYMPHONY MILP Solver Framework. #
# #
# SYMPHONY was jointly developed by Ted Ralphs (ted@lehigh.edu) and #
# Laci Ladanyi (ladanyi@us.ibm.com). #
# #
# The author of this file is Menal Guzelsoy #
# #
# (c) Copyright 2006-2014 Lehigh University. All Rights Reserved. #
# #
# This software is licensed under the Eclipse Public License. Please see #
# accompanying file for terms. #
# #
#===========================================================================#
## $Id: configure.ac 369 2006-06-14 01:19:26Z menal $
#############################################################################
# Names and other basic things #
#############################################################################
AC_PREREQ(2.59)
AC_INIT([SYMPHONY],[5.6.1],[symphony@list.coin-or.org])
AC_COPYRIGHT([
/*===========================================================================*/
/* */
/* This file is part of the SYMPHONY MILP Solver Framework. */
/* */
/* SYMPHONY was jointly developed by Ted Ralphs (ted@lehigh.edu) and */
/* Laci Ladanyi (ladanyi@us.ibm.com). */
/* */
/* (c) Copyright 2000-2014 Ted Ralphs. All Rights Reserved. */
/* */
/* This software is licensed under the Eclipse Public License. Please see */
/* accompanying file for terms. */
/* */
/*===========================================================================*/
])
# List one file in the package so that the configure script can test
# whether the package is actually there
AC_CONFIG_SRCDIR(include/symphony.h)
# Where should everything be installed by default? Here, we want it
# to be installed directly in 'bin', 'lib', 'include' subdirectories
# of the directory where configure is run. The default would be
# /usr/local.
AC_PREFIX_DEFAULT([`pwd`])
#############################################################################
# Standard build tool stuff #
#############################################################################
# Get the system type
AC_CANONICAL_BUILD
# If this project depends on external projects, the Externals file in
# the source root directory contains definition of where to find those
# externals. The following macro ensures that those externals are
# retrieved by svn if they are not there yet.
AC_COIN_PROJECTDIR_INIT(SYMPHONY,9:1:6)
# Check if user wants to produce debugging code
AC_COIN_DEBUG_COMPILE(SYMPHONY)
# Get the name of the C++ compiler and appropriate compiler options
AC_COIN_PROG_CXX
#AC_LIBTOOL_LANG_CXX_CONFIG
AC_LANG_PUSH(C++)
# Initialize automake and libtool
AC_COIN_INIT_AUTO_TOOLS
# Get the EXEXT variable for CYGWIN
AC_EXEEXT
# Check if user wants to use readline library
AC_COIN_CHECK_GNU_READLINE
AM_CONDITIONAL(COIN_HAS_READLINE,
[test $coin_has_readline = yes])
#############################################################################
# COIN components #
#############################################################################
AC_COIN_CHECK_PACKAGE(CoinDepend, [coinutils osi], [SymphonyLib])
if test $coin_has_coindepend != yes ; then
AC_MSG_ERROR([Required package CoinUtils or Osi not available.])
fi
AC_COIN_CHECK_PACKAGE(Clp, [osi-clp], [SymphonyLib])
AC_COIN_CHECK_PACKAGE(DyLP, [osi-dylp], [SymphonyLib])
AC_COIN_CHECK_PACKAGE(Vol, [osi-vol], [SymphonyLib])
AC_COIN_CHECK_PACKAGE(Cgl, [cgl], [SymphonyLib])
AC_COIN_CHECK_PACKAGE(OsiTests, [osi-unittests])
AC_COIN_CHECK_PACKAGE(Sample, [coindatasample])
AC_COIN_CHECK_PACKAGE(Netlib, [coindatanetlib])
AC_COIN_CHECK_PACKAGE(Miplib3, [coindatamiplib3])
#############################################################################
# Third party solvers #
#############################################################################
# Check which third party solvers are available
AC_COIN_CHECK_PACKAGE(Cpx, [osi-cplex], [SymphonyLib])
AC_COIN_CHECK_PACKAGE(Glpk, [osi-glpk], [SymphonyLib])
#AC_COIN_CHECK_PACKAGE(Grb, [osi-gurobi], [SymphonyLib])
AC_COIN_CHECK_PACKAGE(Msk, [osi-mosek], [SymphonyLib])
#AC_COIN_CHECK_PACKAGE(Spx, [osi-soplex], [SymphonyLib])
AC_COIN_CHECK_PACKAGE(Xpr, [osi-xpress], [SymphonyLib])
#############################################################################
# Check for the LP solver #
#############################################################################
AC_MSG_CHECKING([for SYMPHONY default solver])
AC_ARG_WITH([lp-solver],
[AC_HELP_STRING([--with-lp-solver@<:@=lpsolver@:>@],
[specify the LP solver in small
letters(default lpsolver=clp)])],
[sym_lp_solver=$withval],[sym_lp_solver=clp])
found_package=true
case $sym_lp_solver in
clp)
AC_MSG_RESULT(Clp)
if [test $coin_has_clp = unavailable || test $coin_has_clp = skipping]; \
then
found_package=false
fi
;;
glpk)
AC_MSG_RESULT(Glpk)
if test $coin_has_glpk = false; then
found_package=false
fi
;;
cplex)
AC_MSG_RESULT(Cplex)
if test $coin_has_cpx = false; then
found_package=false
fi
;;
osl)
AC_MSG_RESULT(Osl)
if test $coin_has_osl = false; then
found_package=false
fi
;;
soplex)
AC_MSG_RESULT(Soplex)
if test $coin_has_spx = false; then
found_package=false
fi
;;
xpress)
AC_MSG_RESULT(Xpress)
if test $coin_has_xpr = false; then
found_package=false
fi
;;
*)
AC_MSG_ERROR(Unknown LP solver!)
;;
esac
if test $found_package = false; then
AC_MSG_ERROR(Couldn't find the $sym_lp_solver package!)
fi
AM_CONDITIONAL(CLP_LP_SOLVER,[test $sym_lp_solver = clp &&
test $coin_has_clp = yes])
AM_CONDITIONAL(GLPK_LP_SOLVER,[test $sym_lp_solver = glpk &&
test $coin_has_glpk = yes])
AM_CONDITIONAL(OSL_LP_SOLVER,[test $sym_lp_solver = osl &&
test $coin_has_osl = yes])
AM_CONDITIONAL(CPLEX_LP_SOLVER,[test $sym_lp_solver = cplex &&
test $coin_has_cpx = yes])
AM_CONDITIONAL(SOPLEX_LP_SOLVER,[test $sym_lp_solver = soplex &&
test $coin_has_spx = yes])
AM_CONDITIONAL(XPRESS_LP_SOLVER,[test $sym_lp_solver = xpress &&
test $coin_has_xpr = yes])
#############################################################################
# Add the options #
#############################################################################
#---------------------------------------------------------------------------#
# USE_CGL_CUTS
#---------------------------------------------------------------------------#
AC_ARG_ENABLE([cgl-cuts],
[AC_HELP_STRING([--disable-cgl-cuts],
[disable generic cut generation])],
[case "${enableval}" in
yes) sym_cut_generation=true
;;
no) sym_cut_generation=no
;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-cgl-cuts)
;;
esac],
[sym_cut_generation=true])
AM_CONDITIONAL(USE_CGL_CUTS, [test $sym_cut_generation = true])
#---------------------------------------------------------------------------#
#USE_GMPL
#---------------------------------------------------------------------------#
AC_MSG_CHECKING([whether to compile with gmpl])
AC_ARG_WITH([gmpl],
[AC_HELP_STRING([--with-gmpl],
[compile with GMPL reader])],
[sym_gmpl=$withval],[sym_gmpl=none])
if test $sym_gmpl = yes; then
AC_MSG_RESULT([yes])
if test $coin_has_glpk = false; then
AC_MSG_ERROR(Couldn't find GLPK package to compile in GMPL feature)
fi
else
if test $coin_has_glpk = true && test $sym_gmpl != no; then
AC_MSG_RESULT([yes])
sym_gmpl=yes
else
AC_MSG_RESULT([no])
fi
fi
AM_CONDITIONAL(USE_GMPL, [test "$sym_gmpl" = yes])
#---------------------------------------------------------------------------#
# SENSITIVITY_ANALYSIS
#---------------------------------------------------------------------------#
#AC_MSG_CHECKING([whether we want to compile in sensitivity analysis features])
AC_ARG_ENABLE([sensitivity-analysis],
[AC_HELP_STRING([--enable-sensitivity-analysis],
[compile in the sensitivity analysis features])],
[case "${enableval}" in
yes) sym_sensitivity=true
;;
no) sym_sensitivity=false
;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-sensitivity-analysis)
;;
esac],
[sym_sensitivity=false])
#if test $sym_sensitivity = true; then
# AC_MSG_RESULT([yes])
#else
# AC_MSG_RESULT([no])
#fi
AM_CONDITIONAL(SENSITIVITY_ANALYSIS, [test $sym_sensitivity = true])
#---------------------------------------------------------------------------#
# ROOT_NODE_ONLY
#---------------------------------------------------------------------------#
AC_ARG_ENABLE([root-only],
[AC_HELP_STRING([--enable-root-only],
[option to only process the root node])],
[case "${enableval}" in
yes) sym_root_only=true
;;
no) sym_root_only=false
;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-root-only)
;;
esac],
[sym_root_only=false])
AM_CONDITIONAL(ROOT_NODE_ONLY, [test $sym_root_only = true])
#---------------------------------------------------------------------------#
# FIXME CCMALLOC
#---------------------------------------------------------------------------#
#---------------------------------------------------------------------------#
# COMPILE_FRAC_BRANCHING
#---------------------------------------------------------------------------#
AC_ARG_ENABLE([frac-branching],
[AC_HELP_STRING([--enable-frac-branching],
[whether to compile in the fractional branching option])],
[case "${enableval}" in
yes) sym_frac_branch=true
;;
no) sym_frac_branch=false
;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-frac-branching)
;;
esac],
[sym_frac_branch=false])
AM_CONDITIONAL(COMPILE_FRAC_BRANCHING, [test $sym_frac_branch = true])
#---------------------------------------------------------------------------#
# DO_TESTS
#---------------------------------------------------------------------------#
AC_ARG_ENABLE([tests],
[AC_HELP_STRING([--enable-tests],
[whether to perform additional sanity checks (for debugging purposes)])],
[case "${enableval}" in
yes) sym_tests=true
;;
no) sym_tests=false
;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-tests)
;;
esac],
[sym_tests=false])
AM_CONDITIONAL(DO_TESTS, [test $sym_tests = true])
#---------------------------------------------------------------------------#
# TM_BASIS_TESTS
#---------------------------------------------------------------------------#
AC_ARG_ENABLE([tm-tests],
[AC_HELP_STRING([--enable-tm-tests],
[more tests...])],
[case "${enableval}" in
yes) sym_tm_tests=true
;;
no) sym_tm_tests=false
;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-tm-tests)
;;
esac],
[sym_tm_tests=false])
AM_CONDITIONAL(TM_BASIS_TESTS, [test $sym_tm_tests = true])
#---------------------------------------------------------------------------#
# TRACE_PATH
#---------------------------------------------------------------------------#
AC_ARG_ENABLE([trace-path],
[AC_HELP_STRING([--enable-trace-path],
[additional debugging options])],
[case "${enableval}" in
yes) sym_trace_path=true
;;
no) sym_trace_path=false
;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-trace-path)
;;
esac],
[sym_trace_path=false])
AM_CONDITIONAL(TRACE_PATH, [test $sym_trace_path = true])
#---------------------------------------------------------------------------#
# CHECK_CUT_VALIDITY
#---------------------------------------------------------------------------#
AC_ARG_ENABLE([cut-check],
[AC_HELP_STRING([--enable-cut-check],
[additional debugging options])],
[case "${enableval}" in
yes) sym_cut_check=true
;;
no) sym_cut_check=false
;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-cut-check)
;;
esac],
[sym_cut_check=false])
AM_CONDITIONAL(CHECK_CUT_VALIDITY, [test $sym_cut_check = true])
#---------------------------------------------------------------------------#
# STATISTICS
#---------------------------------------------------------------------------#
AC_ARG_ENABLE([statistics],
[AC_HELP_STRING([--enable-statistics],
[additional statistics])],
[case "${enableval}" in
yes) sym_statistics=true
;;
no) sym_sttistics=false
;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-statistics)
;;
esac],
[sym_statistics=false])
AM_CONDITIONAL(STATISTICS, [test $sym_statistics = true])
#---------------------------------------------------------------------------#
# PSEUDO_COSTS
#---------------------------------------------------------------------------#
AC_ARG_ENABLE([pseudo-costs],
[AC_HELP_STRING([--enable-pseudo-costs],
[enable some experimental pseudo-cost branching stuff])],
[case "${enableval}" in
yes) sym_pseudo_costs=true
;;
no) sym_pseudo_costs=false
;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-pseudo-costs)
;;
esac],
[sym_pseudo_costs=false])
AM_CONDITIONAL(PSEUDO_COSTS, [test $sym_pseudo_costs = true])
#---------------------------------------------------------------------------#
# DRAWGRAPH
#---------------------------------------------------------------------------#
AC_ARG_ENABLE([draw-graph],
[AC_HELP_STRING([--enable-draw-graph],
[enable IGD graph drawing application])],
[case "${enableval}" in
yes) sym_graph=true
;;
no) sym_graph=false
;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-graph)
;;
esac],
[sym_graph=false])
AM_CONDITIONAL(DRAWGRAPH, [test $sym_graph = true])
#---------------------------------------------------------------------------#
# STATIC EXECUTABLE
#---------------------------------------------------------------------------#
AC_ARG_ENABLE([static-executable],
[AC_HELP_STRING([--enable-static-executable],
[create a complete static executable])],
[case "${enableval}" in
yes)
if test "$enable_shared" = yes; then
AC_MSG_ERROR(static executable requires static COIN libraries: use with --enable-shared=no flag)
fi
sym_static_exe=true
;;
no) sym_static_exe=false
;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-static-executable)
;;
esac],
[sym_static_exe=false])
AM_CONDITIONAL(STATICEXE, [test $sym_static_exe = true])
#---------------------------------------------------------------------------#
# DRAWGRAPH
#---------------------------------------------------------------------------#
AC_ARG_ENABLE([signal-handler],
[AC_HELP_STRING([--disable-signal-handler],
[disable signal handler])],
[case "${enableval}" in
yes) sym_sig_catch=true
;;
no) sym_sig_catch=false
;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-signal-handler)
;;
esac],
[sym_sig_catch=true])
AM_CONDITIONAL(SIGHANDLER, [test $sym_sig_catch = true])
#############################################################################
# Check the OS and add default defs #
#############################################################################
SYMDEFS='-DHAS_RANDOM -DHAS_SRANDOM -D__NONE__'
ARCH=
case $host in
*-cygwin*)
if test "$enable_doscompile" = mingw; then
SYMDEFS="$SYMDEFS -D__MNO_CYGWIN"
else
SYMDEFS="$SYMDEFS -D__CYGWIN"
fi
ARCH=CYGWIN ;;
*-mingw*)
SYMDEFS="$SYMDEFS -D__MNO_CYGWIN"
ARCH=CYGWIN ;;
*-darwin*)
SYMDEFS="$SYMDEFS -D__DARWIN"
ARCH=DARWIN ;;
*-linux-*)
SYMDEFS="$SYMDEFS -D__LINUX"
case $build in
ppc*|powerpc*)
ARCH=LINUXPPC ;;
*)
ARCH=LINUX ;;
esac
;;
*-alpha-*)
SYMDEFS="$SYMDEFS -D__ALPHA"
ARCH=ALPHA ;;
*-aix-*)
SYMDEFS="$SYMDEFS -D__RS6K"
ARCH=RS6K ;;
*-sun-*|*solaris2*)
case $build in
*-i86pc-* | i386-pc*)
SYMDEFS="$SYMDEFS -D__X86SOL2"
ARCH=X86SOL2 ;;
*-5.-*)
np=$(shell mpstat | wc -l -gt -a)
if test $np = ON; then
SYMDEFS="$SYMDEFS -D__SUNMP"
ARCH=SUNMP
else
SYMDEFS="$SYMDEFS -D__SUN4SOL2"
ARCH=SUN4SOL2
fi
;;
esac
;;
*)
SYMDEFS="$SYMDEFS -D__UNKNOWN_OS" ;;
esac
#############################################################################
# Applications #
#############################################################################
AC_MSG_CHECKING(whether to compile application library)
AC_ARG_WITH([application],
[AC_HELP_STRING([--with-application],
[compile the application library])],
[sym_appl=$withval],[sym_appl=no])
AM_CONDITIONAL(SYM_WITH_APPL, [test $sym_appl = yes])
AC_MSG_RESULT($sym_appl)
dnl AM_CONDITIONAL(SYM_WITH_APPL, false)
dnl AC_MSG_CHECKING(whether to compile application library)
dnl AC_ARG_WITH([application],
dnl [AC_HELP_STRING([--with-application],
dnl [specify the application to be compiled with lower case])],
dnl [sym_appl=$withval],[sym_appl=none])
dnl sym_with_appl=true
dnl case $sym_appl in
dnl cnrp)
dnl ;;
dnl match)
dnl ;;
dnl mckp)
dnl ;;
dnl mpp)
dnl ;;
dnl spp)
dnl ;;
dnl spp_with_cuts)
dnl ;;
dnl user)
dnl ;;
dnl vrp)
dnl ;;
dnl none)
dnl sym_with_appl=false
dnl ;;
dnl *)
dnl AC_MSG_ERROR([Unknown application is requested to be compiled!])
dnl ;;
dnl esac
dnl AC_MSG_RESULT($sym_appl)
dnl AM_CONDITIONAL(SYM_WITH_APPL, [test $sym_with_appl = true])
dnl AM_CONDITIONAL(SYM_WITH_CNRP, [test $sym_appl = cnrp])
dnl AM_CONDITIONAL(SYM_WITH_MATCH, [test $sym_appl = match])
dnl AM_CONDITIONAL(SYM_WITH_MCKP, [test $sym_appl = mckp])
dnl AM_CONDITIONAL(SYM_WITH_MPP, [test $sym_appl = mpp])
dnl AM_CONDITIONAL(SYM_WITH_SPP, [test $sym_appl = spp])
dnl AM_CONDITIONAL(SYM_WITH_SPP_CUTS, [test $sym_appl = spp_with_cuts])
dnl AM_CONDITIONAL(SYM_WITH_USER, [test $sym_appl = user])
dnl AM_CONDITIONAL(SYM_WITH_VRP, [test $sym_appl = vrp])
#############################################################################
# Parallel configuration #
#############################################################################
AC_COIN_CHECK_USER_LIBRARY([Pvm], [PVM], [pvm3.h], [pvm_gettid])
AC_ARG_WITH([pvm],
[AC_HELP_STRING([--with-pvm],
[compile in distributed parallel mode (assuming that
pvm is installed and the variable PVM_ROOT is
defined.)])],
[find_pvm=$withval],[find_pvm=no])
if test x"$find_pvm" = xyes; then
if test x"$coin_has_pvm" != xyes; then
m4_ifvaln([pvm3.h],
[AC_CHECK_FILE([$PVM_ROOT/include/pvm3.h],
[pvm_header=yes])],
[])
m4_ifvaln([pvm_gettid],
[LIBS="-L$PVM_ROOT/lib -lgpvm3 -lpvm3"
pvm_link=no
AC_LANG_PUSH(C)
AC_MSG_CHECKING([whether symbol pvm_gettid is available with PVM])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[pvm_gettid()]])],
[AC_MSG_RESULT(yes)
pvm_link=yes
break],
[AC_MSG_RESULT(no)])
AC_LANG_POP(C)])
fi
if test x"$pvm_header" != xyes; then
AC_MSG_ERROR([Cannot find the pvm header files either in system path or
in PVM_ROOT path:$PVM_ROOT])
fi
if test x"$pvm_link" != xyes ; then
AC_MSG_ERROR([Cannot find PVM library in system paths or in PVM_ROOT path:$PVM_ROOT])
fi
if test $pvm_link == yes && test $pvm_header == yes; then
coin_has_pvm=yes
fi
fi
#---------------------------------------------------------------------------#
#AC_MSG_CHECKING([whether to compile in cg])
AC_ARG_WITH([cg],
[AC_HELP_STRING([--without-cg],
[compile without cut generator module(default=yes)])],
[in_cg=$withval],[in_cg=yes])
AM_CONDITIONAL(SYM_COMPILE_IN_CG, [test "$in_cg" = yes])
#AC_MSG_CHECKING([whether to compile in cp])
AC_ARG_WITH([cp],
[AC_HELP_STRING([--without-cp],
[compile without cut pool module(defualt=yes)])],
[in_cp=$withval],[in_cp=yes])
AM_CONDITIONAL(SYM_COMPILE_IN_CP, [test "$in_cp" = yes])
#AC_MSG_CHECKING([whether to compile in lp])
AC_ARG_WITH([lp],
[AC_HELP_STRING([--without-lp],
[compile without LP solver module(default=yes)])],
[in_lp=$withval],[in_lp=yes])
AM_CONDITIONAL(SYM_COMPILE_IN_LP, [test "$in_lp" = yes])
#AC_MSG_CHECKING([whether to compile in tm])
AC_ARG_WITH([tm],
[AC_HELP_STRING([--without-tm],
[compile without tree manager module (default=yes)])],
[in_tm=$withval],[in_tm=yes])
AM_CONDITIONAL(SYM_COMPILE_IN_TM, [test "$in_tm" = yes])
#sym_def_pconfig=true;
sym_enable_parallel=false;
if [test $in_cg = no || test $in_cp = no ||
test $in_lp = no || test $in_tm = no]; then
# sym_def_pconfig=false;
if test $coin_has_pvm = no; then
AC_MSG_ERROR(Need PVM to enable distributed parallel execution!)
fi
sym_enable_parallel=true;
else
if test $coin_has_pvm = yes; then
in_lp=no
AM_CONDITIONAL(SYM_COMPILE_IN_LP, false)
sym_enable_parallel=true;
fi
fi
AM_CONDITIONAL(SYM_PARALLEL, $sym_enable_parallel)
LPEXT=
CPEXT=
TMEXT=
MASTEREXT=
LIBNAME=
SYMPDEFS="$SYMDEFS"
SYMDEFS="$SYMDEFS -DCOMPILE_IN_CG -DCOMPILE_IN_CP -DCOMPILE_IN_LP -DCOMPILE_IN_TM"
if test $in_cg = yes; then
LPEXT=_cg
SYMPDEFS="$SYMPDEFS -DCOMPILE_IN_CG"
fi
if test $in_cp = yes; then
SYMPDEFS="$SYMPDEFS -DCOMPILE_IN_CP"
CPEXT=_cp
fi
if test $in_lp = yes; then
SYMPDEFS="$SYMPDEFS -DCOMPILE_IN_LP"
TMEXT="_lp$LPEXT$CPEXT"
else
TMEXT=$CPEXT
fi
if test $in_tm = yes; then
SYMPDEFS="$SYMPDEFS -DCOMPILE_IN_TM"
MASTEREXT="_tm$TMEXT"
fi
WHATTOMAKELIBS=
WHATTOMAKEBINS=
if test $sym_enable_parallel = true; then
SYMPDEFS="$SYMPDEFS -D__PVM__"
if test $in_cg = no; then
WHATTOMAKELIBS=libSym_cg.la
if test $sym_appl = yes ; then
WHATTOMAKELIBS="$WHATTOMAKELIBS libSymAppl_cg.la"
fi
WHATTOMAKEBINS="symphony_cg$EXEEXT"
fi
if test $in_cp = no; then
WHATTOMAKELIBS="$WHATTOMAKELIBS libSym_cp.la"
if test $sym_appl = yes ; then
WHATTOMAKELIBS="$WHATTOMAKELIBS libSymAppl_cp.la"
fi
WHATTOMAKEBINS="$WHATTOMAKEBINS symphony_cp$EXEEXT"
fi
if test $in_lp = no; then
WHATTOMAKELIBS="$WHATTOMAKELIBS libSym_lp$LPEXT.la"
if test $sym_appl = yes ; then
WHATTOMAKELIBS="$WHATTOMAKELIBS libSymAppl_lp$LPEXT.la"
fi
WHATTOMAKEBINS="$WHATTOMAKEBINS symphony_lp$LPEXT$EXEEXT"
fi
if test $in_tm = no; then
WHATTOMAKELIBS="$WHATTOMAKELIBS libSym_tm$TMEXT.la"
if test $sym_appl = yes ; then
WHATTOMAKELIBS="$WHATTOMAKELIBS libSymAppl_tm$TMEXT.la"
fi
WHATTOMAKEBINS="$WHATTOMAKEBINS symphony_tm$TMEXT$EXEEXT"
fi
MASTEREXT="_m$MASTEREXT"
WHATTOMAKELIBS="$WHATTOMAKELIBS libSym$MASTEREXT.la"
WHATTOMAKEBINS="$WHATTOMAKEBINS symphony$MASTEREXT$EXEEXT"
if test $sym_appl = yes ; then
WHATTOMAKELIBS="$WHATTOMAKELIBS libSymAppl$MASTEREXT.la"
fi
else
MASTEREXT="_m"
WHATTOMAKELIBS="$WHATTOMAKELIBS libSym.la"
WHATTOMAKEBINS="$WHATTOMAKEBINS symphony$EXEEXT"
if test $sym_appl = yes ; then
WHATTOMAKELIBS="$WHATTOMAKELIBS libSymAppl.la"
fi
fi
AC_SUBST(WHATTOMAKELIBS)
AC_SUBST(WHATTOMAKEBINS)
AC_SUBST(LPEXT)
AC_SUBST(CPEXT)
AC_SUBST(TMEXT)
AC_SUBST(MASTEREXT)
##############################################################################
# OPENMP defs #
##############################################################################
AC_ARG_ENABLE([openmp],
[AC_HELP_STRING([--enable-openmp],
[compile in OpenMP features])],
[case "${enableval}" in
yes) sym_openmp=true
;;
no) sym_openmp=false
;;
*) AC_MSG_ERROR(Bad value ${enableval} for --enable-openmp)
;;
esac],
[sym_openmp=auto])
if test $sym_openmp = auto; then
AC_MSG_CHECKING([whether compiler supports OpenMP])
case "$CXX" in
clang*)
AC_MSG_RESULT([no])
sym_openmp=false
;;
cl* | *\cl* | */cl*)
AC_MSG_RESULT([yes])
sym_openmp=true
;;
g++*)
sym_openmp=true
fopenmp_version=4.2
gcc_required_version=`echo ${fopenmp_version} | sed -e 's/\./0/g'`
get_gcc_version=`$CXX -dumpversion`
gcc_version=`echo ${get_gcc_version} | sed -e 's/\./0/g'`
major_gcc_version=`echo ${gcc_version:0:3}`
#AC_MSG_RESULT([$get_gcc_version])
if test ${major_gcc_version} -lt ${gcc_required_version}; then
AC_MSG_RESULT([no])
sym_openmp=false
else
AC_MSG_RESULT([yes])
sym_openmp=true
fi
;;
esac
fi
AM_CONDITIONAL(OPENMP, [test $sym_openmp = true])
#############################################################################
# Other third party software #
#############################################################################
# Ampl Solver library
#AC_COIN_HAS_ASL
##############################################################################
# VPATH links for example input files #
##############################################################################
# In case this is a VPATH configuration we need to make sure that the
# input files for the examples are available in the VPATH directory.
##############################################################################
# Finishing up by writing all the output #
##############################################################################
# Location of SYMPHONY for later use
AC_SUBST(SYMINCDIR)
AC_SUBST(SYMSRCDIR)
SYMINCDIR=`cd $srcdir; pwd`/include
SYMSRCDIR=`cd $srcdir; pwd`/src
# To be used in applications: default SYMPHONY defs
AC_SUBST(SYMDEFS)
AC_SUBST(SYMPDEFS)
AC_SUBST(ARCH)
AC_SUBST(COIN_HAS_CLP)
# Location of Applications for later use
AC_SUBST(SYMAPPLDIR)
SYMAPPLDIR=`pwd`/Applications
#FIXME-Debugging conditional, for now
#AM_CONDITIONAL(SYM_DEBUG, [ test $coin_debug_compile = true])
#Add openmp flag and take care of cl flags
sym_use_cl=false
CLLCFLAGS=
case "$CXX" in
clang*)
if test $sym_openmp = true; then
CXXFLAGS="$CXXFLAGS -fopenmp"
fi
;;
cl* | *\cl* | */cl*)
CLLCFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS -TP"
if test $sym_openmp = true; then
CXXFLAGS="$CXXFLAGS /openmp"
fi
;;
g++* | *\g++* | */g++*)
if test $sym_openmp = true; then
CXXFLAGS="$CXXFLAGS -fopenmp"
fi
#Ignore warnings about unrecognized pragma lines and
#deprecated string conversions
CXXFLAGS="$CXXFLAGS -Wno-unknown-pragmas -Wno-write-strings"
#Ignore warnings about comparisons of signed and unsigned values and
#casting const pointers to ordinary pointers
CXXFLAGS="$CXXFLAGS -Wno-sign-compare -Wno-cast-qual"
;;
esac
#Set CFLAGS to CXXFLAGS since we are using g++
CFLAGS=$CXXFLAGS
AC_SUBST(CFLAGS)
AC_SUBST(CXXFLAGS)
AC_SUBST(CLLCFLAGS)
# Here list all the files that configure should create (except for the
# configuration header file)
AC_CONFIG_FILES([Makefile
src/Makefile
src/OsiSym/Makefile
test/Makefile
Examples/Makefile
Applications/Makefile.Applications
Applications/CNRP/Makefile
Applications/MATCH/Makefile
Applications/MCKP/Makefile
Applications/MPP/Makefile
Applications/SPP/Makefile
Applications/SPP+CUTS/Makefile
Applications/USER/Makefile
Applications/VRP/Makefile
symphony.pc
symphony-app.pc
symphony-uninstalled.pc
osi-sym.pc:src/OsiSym/osi-sym.pc.in
osi-sym-uninstalled.pc:src/OsiSym/osi-sym-uninstalled.pc.in])
AC_COIN_VPATH_LINK([Applications/INSTALL
Applications/CNRP/README
Applications/CNRP/INSTALL
Applications/CNRP/sample.cnrp
Applications/MATCH/README
Applications/MATCH/INSTALL
Applications/MATCH/sample.mat
Applications/MCKP/README
Applications/MCKP/INSTALL
Applications/MCKP/sample.mckp
Applications/MPP/README
Applications/MPP/INSTALL
Applications/MPP/sample.mpp
Applications/SPP/README
Applications/SPP/INSTALL
Applications/SPP/sample.spp
Applications/SPP+CUTS/README
Applications/SPP+CUTS/INSTALL
Applications/SPP+CUTS/sample.spp
Applications/USER/README
Applications/USER/INSTALL
Applications/USER/sample.mps
Applications/VRP/README
Applications/VRP/INSTALL
Applications/VRP/sample.vrp])
# Here put the location and name of the configuration header file
AC_CONFIG_HEADER([include/config.h include/config_sym.h])
# Finally, we let configure write all the output...
AC_COIN_FINALIZE
|