Changeset 2041 for stable


Ignore:
Timestamp:
Dec 31, 2010 8:35:51 AM (9 years ago)
Author:
stefan
Message:

sync with trunk rev2340

Location:
stable/0.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable/0.7

  • stable/0.7/coin.m4

    r2035 r2041  
    2424
    2525###########################################################################
    26 #                    COIN_MAIN_SUBDIRS (deprecated)                       #
    27 ###########################################################################
    28 
    29 # This macro sets up the recursion into configure scripts into
    30 # subdirectories.  Each possible subdirectory should be provided as a
    31 # new argument to this macro.  The current limit is 10 subdirectories.
    32 # This automatically also checks for the Data subdirectory.
    33 
    34 AC_DEFUN([AC_COIN_MAIN_SUBDIRS],
    35 [AC_ARG_VAR([COIN_SKIP_PROJECTS],[Set to the subdirectories of projects that should be skipped in the configuration])
    36 
    37 m4_ifvaln([$1],[AC_MSG_CHECKING(whether directory $1 is available)
    38                 coin_skip=no
    39                 if test x"$COIN_SKIP_PROJECTS" != x; then
    40                   for dir in $COIN_SKIP_PROJECTS; do
    41                     if test $dir = $1; then
    42                       coin_skip=yes
    43                     fi
    44                   done
    45                 fi
    46                 if test $coin_skip = yes; then
    47                   AC_MSG_RESULT(skipping)
    48                 elif test -r $srcdir/$1/configure; then
    49                   coin_subdirs="$coin_subdirs $1"
    50                   AC_MSG_RESULT(yes)
    51                   AC_CONFIG_SUBDIRS($1)
    52                 else
    53                   AC_MSG_RESULT(no)
    54                 fi])
    55 m4_ifvaln([$2],[AC_MSG_CHECKING(whether directory $2 is available)
    56                 coin_skip=no
    57                 if test x"$COIN_SKIP_PROJECTS" != x; then
    58                   for dir in $COIN_SKIP_PROJECTS; do
    59                     if test $dir = $2; then
    60                       coin_skip=yes
    61                     fi
    62                   done
    63                 fi
    64                 if test $coin_skip = yes; then
    65                   AC_MSG_RESULT(skipping)
    66                 elif test -r $srcdir/$2/configure; then
    67                   coin_subdirs="$coin_subdirs $2"
    68                   AC_MSG_RESULT(yes)
    69                   AC_CONFIG_SUBDIRS($2)
    70                 else
    71                   AC_MSG_RESULT(no)
    72                 fi])
    73 m4_ifvaln([$3],[AC_MSG_CHECKING(whether directory $3 is available)
    74                 coin_skip=no
    75                 if test x"$COIN_SKIP_PROJECTS" != x; then
    76                   for dir in $COIN_SKIP_PROJECTS; do
    77                     if test $dir = $3; then
    78                       coin_skip=yes
    79                     fi
    80                   done
    81                 fi
    82                 if test $coin_skip = yes; then
    83                   AC_MSG_RESULT(skipping)
    84                 elif test -r $srcdir/$3/configure; then
    85                   coin_subdirs="$coin_subdirs $3"
    86                   AC_MSG_RESULT(yes)
    87                   AC_CONFIG_SUBDIRS($3)
    88                 else
    89                   AC_MSG_RESULT(no)
    90                 fi])
    91 m4_ifvaln([$4],[AC_MSG_CHECKING(whether directory $4 is available)
    92                 coin_skip=no
    93                 if test x"$COIN_SKIP_PROJECTS" != x; then
    94                   for dir in $COIN_SKIP_PROJECTS; do
    95                     if test $dir = $4; then
    96                       coin_skip=yes
    97                     fi
    98                   done
    99                 fi
    100                 if test $coin_skip = yes; then
    101                   AC_MSG_RESULT(skipping)
    102                 elif test -r $srcdir/$4/configure; then
    103                   coin_subdirs="$coin_subdirs $4"
    104                   AC_MSG_RESULT(yes)
    105                   AC_CONFIG_SUBDIRS($4)
    106                 else
    107                   AC_MSG_RESULT(no)
    108                 fi])
    109 m4_ifvaln([$5],[AC_MSG_CHECKING(whether directory $5 is available)
    110                 coin_skip=no
    111                 if test x"$COIN_SKIP_PROJECTS" != x; then
    112                   for dir in $COIN_SKIP_PROJECTS; do
    113                     if test $dir = $5; then
    114                       coin_skip=yes
    115                     fi
    116                   done
    117                 fi
    118                 if test $coin_skip = yes; then
    119                   AC_MSG_RESULT(skipping)
    120                 elif test -r $srcdir/$5/configure; then
    121                   coin_subdirs="$coin_subdirs $5"
    122                   AC_MSG_RESULT(yes)
    123                   AC_CONFIG_SUBDIRS($5)
    124                 else
    125                   AC_MSG_RESULT(no)
    126                 fi])
    127 m4_ifvaln([$6],[AC_MSG_CHECKING(whether directory $6 is available)
    128                 coin_skip=no
    129                 if test x"$COIN_SKIP_PROJECTS" != x; then
    130                   for dir in $COIN_SKIP_PROJECTS; do
    131                     if test $dir = $6; then
    132                       coin_skip=yes
    133                     fi
    134                   done
    135                 fi
    136                 if test $coin_skip = yes; then
    137                   AC_MSG_RESULT(skipping)
    138                 elif test -r $srcdir/$6/configure; then
    139                   coin_subdirs="$coin_subdirs $6"
    140                   AC_MSG_RESULT(yes)
    141                   AC_CONFIG_SUBDIRS($6)
    142                 else
    143                   AC_MSG_RESULT(no)
    144                 fi])
    145 m4_ifvaln([$7],[AC_MSG_CHECKING(whether directory $7 is available)
    146                 coin_skip=no
    147                 if test x"$COIN_SKIP_PROJECTS" != x; then
    148                   for dir in $COIN_SKIP_PROJECTS; do
    149                     if test $dir = $7; then
    150                       coin_skip=yes
    151                     fi
    152                   done
    153                 fi
    154                 if test $coin_skip = yes; then
    155                   AC_MSG_RESULT(skipping)
    156                 elif test -r $srcdir/$7/configure; then
    157                   coin_subdirs="$coin_subdirs $7"
    158                   AC_MSG_RESULT(yes)
    159                   AC_CONFIG_SUBDIRS($7)
    160                 else
    161                   AC_MSG_RESULT(no)
    162                 fi])
    163 m4_ifvaln([$8],[AC_MSG_CHECKING(whether directory $8 is available)
    164                 coin_skip=no
    165                 if test x"$COIN_SKIP_PROJECTS" != x; then
    166                   for dir in $COIN_SKIP_PROJECTS; do
    167                     if test $dir = $8; then
    168                       coin_skip=yes
    169                     fi
    170                   done
    171                 fi
    172                 if test $coin_skip = yes; then
    173                   AC_MSG_RESULT(skipping)
    174                 elif test -r $srcdir/$8/configure; then
    175                   coin_subdirs="$coin_subdirs $8"
    176                   AC_MSG_RESULT(yes)
    177                   AC_CONFIG_SUBDIRS($8)
    178                 else
    179                   AC_MSG_RESULT(no)
    180                 fi])
    181 m4_ifvaln([$9],[AC_MSG_CHECKING(whether directory $9 is available)
    182                 coin_skip=no
    183                 if test x"$COIN_SKIP_PROJECTS" != x; then
    184                   for dir in $COIN_SKIP_PROJECTS; do
    185                     if test $dir = $9; then
    186                       coin_skip=yes
    187                     fi
    188                   done
    189                 fi
    190                 if test $coin_skip = yes; then
    191                   AC_MSG_RESULT(skipping)
    192                 elif test -r $srcdir/$9/configure; then
    193                   coin_subdirs="$coin_subdirs $9"
    194                   AC_MSG_RESULT(yes)
    195                   AC_CONFIG_SUBDIRS($9)
    196                 else
    197                   AC_MSG_RESULT(no)
    198                 fi])
    199 m4_ifvaln([$10],[AC_MSG_CHECKING(whether directory $10 is available)
    200                 coin_skip=no
    201                 if test x"$COIN_SKIP_PROJECTS" != x; then
    202                   for dir in $COIN_SKIP_PROJECTS; do
    203                     if test $dir = $10; then
    204                       coin_skip=yes
    205                     fi
    206                   done
    207                 fi
    208                 if test $coin_skip = yes; then
    209                   AC_MSG_RESULT(skipping)
    210                 elif test -r $srcdir/$10/configure; then
    211                   coin_subdirs="$coin_subdirs $10"
    212                   AC_MSG_RESULT(yes)
    213                   AC_CONFIG_SUBDIRS($10)
    214                 else
    215                   AC_MSG_RESULT(no)
    216                 fi])
    217 ]) # AC_COIN_MAIN_SUBDIRS
    218 
    219 ###########################################################################
    22026#                            COIN_CHECK_FILE                              #
    22127###########################################################################
     
    23238fi
    23339])
    234 
    235 ###########################################################################
    236 #                        COIN_THIRDPARTY_SUBDIRS  (deprecated)            #
    237 ###########################################################################
    238 
    239 # This macro sets up the recursion into the configure script in a
    240 # subdirectory for compilation of third party code.  The first
    241 # argument is just the string that appears in the configure output.
    242 # The second argument is the directory with the configure script, and
    243 # the third one is a file that should exists in that directory.  If
    244 # this file does not exist, we assume that the user has not downloaded
    245 # the code, and we are not going to compile it
    246 
    247 AC_DEFUN([AC_COIN_THIRDPARTY_SUBDIRS],
    248 [AC_MSG_CHECKING(whether code for third party package $1 is available)
    249 coin_skip=no
    250 if test x"$COIN_SKIP_PROJECTS" != x; then
    251   for dir in $COIN_SKIP_PROJECTS; do
    252     if test $dir = $2; then
    253       coin_skip=yes
    254     fi
    255   done
    256 fi
    257 if test $coin_skip = yes; then
    258   AC_MSG_RESULT(skipping)
    259 else
    260   coin_tmp=`echo $srcdir/$2/$3`
    261   # There is probably a more elegant way to get the first thing out here...
    262   for i in $coin_tmp; do
    263     coin_tmp2=$i
    264     #break 1
    265   done
    266   if test -r $coin_tmp2; then
    267     coin_subdirs="$coin_subdirs $2"
    268     AC_MSG_RESULT(yes)
    269     AC_CONFIG_SUBDIRS($2)
    270   else
    271     AC_MSG_RESULT(no)
    272   fi
    273 fi
    274 ]) # AC_COIN_THIRDPARTY_SUBDIRS
    27540
    27641###########################################################################
     
    26132378
    26142379###########################################################################
    2615 #                            COIN_HAS_PROJECT (deprecated)                #
    2616 ###########################################################################
    2617 
    2618 # This macro sets up usage of a Coin package.  It defines the PKGSRCDIR,
    2619 # PKGOBJDIR, and PKGDOCDIR variables, referring to the main source, object, and
    2620 # documentation directories of the package, respectively.  It also defines a
    2621 # COIN_HAS_PKG preprocessor macro and makefile conditional.  The argument
    2622 # should be the name (Pkg) of the project (in correct lower and upper case)
    2623 
    2624 AC_DEFUN([AC_COIN_HAS_PROJECT],
    2625 [AC_MSG_CHECKING([for COIN project $1])
    2626 
    2627 # First check, if the sub-project is actually available (ToDo: allow
    2628 # other locations)
    2629 
    2630 m4_tolower(coin_has_$1)=unavailable
    2631 if test x"$COIN_SKIP_PROJECTS" != x; then
    2632   for dir in $COIN_SKIP_PROJECTS; do
    2633     if test $dir = $1; then
    2634       m4_tolower(coin_has_$1)=skipping
    2635     fi
    2636   done
    2637 fi
    2638 
    2639 if test $m4_tolower(coin_has_$1) != skipping; then
    2640   if test $PACKAGE_TARNAME = m4_tolower($1); then
    2641     m4_tolower(coin_has_$1)=.
    2642   else
    2643     if test -d $srcdir/../$1; then
    2644       m4_tolower(coin_has_$1)=../$1
    2645     fi
    2646   fi
    2647 fi
    2648 
    2649 if test $m4_tolower(coin_has_$1) != unavailable &&
    2650    test $m4_tolower(coin_has_$1) != skipping; then
    2651   # Set the #define if the component is available
    2652   AC_DEFINE(m4_toupper(COIN_HAS_$1),[1],[Define to 1 if the $1 package is used])
    2653 
    2654   # Set the variables for source and object code location
    2655   AC_SUBST(m4_toupper($1SRCDIR))
    2656   m4_toupper($1SRCDIR)=`cd $srcdir/$m4_tolower(coin_has_$1); pwd`
    2657   AC_SUBST(m4_toupper($1OBJDIR))
    2658   m4_toupper($1OBJDIR)=`pwd`/$m4_tolower(coin_has_$1)
    2659   AC_SUBST(m4_toupper($1DOCDIR))
    2660   m4_toupper($1DOCDIR)=$abs_lib_dir/../share/doc/coin/$1
    2661 fi
    2662 
    2663   # Define the Makefile conditional
    2664 AM_CONDITIONAL(m4_toupper(COIN_HAS_$1),
    2665                [test $m4_tolower(coin_has_$1) != unavailable &&
    2666                 test $m4_tolower(coin_has_$1) != skipping])
    2667 AC_MSG_RESULT([$m4_tolower(coin_has_$1)])
    2668 ]) # AC_COIN_HAS_PROJECT
    2669 
    2670 ###########################################################################
    26712380#                      COIN_CHECK_USER_LIBRARY                            #
    26722381###########################################################################
     
    28172526  AM_CONDITIONAL(COIN_HAS_$2, test $m4_tolower(coin_has_$2) = true)
    28182527]) #AC_COIN_CHECK_USER_LIBRARY
    2819 
    2820 ###########################################################################
    2821 #                       COIN_HAS_USER_LIBRARY (deprecated)                #
    2822 ###########################################################################
    2823 
    2824 AC_DEFUN([AC_COIN_HAS_USER_LIBRARY],
    2825          [AC_COIN_CHECK_USER_LIBRARY([$1],[$2], [$3], [$4], [$5], [$6])])
    2826 
    2827 ###########################################################################
    2828 #                               COIN_HAS_ASL (deprecated)                 #
    2829 ###########################################################################
    2830 
    2831 # This macro checks if the user has provide arguments that say where
    2832 # the precompiled ASL files should be found (with the --with-asldir
    2833 # flag).  If this is not the case, we check if the ThirdParty/ASL
    2834 # directory has been configured, which indicates that the files will
    2835 # be in that directory and can be used.
    2836 
    2837 AC_DEFUN([AC_COIN_HAS_ASL],
    2838 [coin_aslobjdir=../ThirdParty/ASL
    2839 coin_aslsrcdir=$srcdir/$coin_aslobjdir
    2840 
    2841 # Determine the name of the ASL library
    2842 case "$CC" in
    2843   cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*)
    2844     ampllib=amplsolv.lib ;;
    2845   *)
    2846     ampllib=amplsolver.a ;;
    2847 esac
    2848 
    2849 AC_ARG_WITH([asldir],
    2850             AC_HELP_STRING([--with-asldir],
    2851                            [specify path to AMPL solver directory (or BUILD for compilation, or "no" for disabling AMPL)]),
    2852             [use_asldir=$withval], [use_asldir=])
    2853 
    2854 if test "$use_asldir" = BUILD; then
    2855   if test "$PACKAGE_NAME" != ThirdPartyASL; then
    2856     # If we are configuring ThirdParty/ASL, don't check
    2857     if test -r $coin_aslobjdir/.MakeOk; then :; else
    2858       AC_MSG_ERROR([option \"BUILD\" specified for asldir, but directory is not configure (sources missing?)])
    2859     fi
    2860   fi
    2861 elif test -z "$use_asldir"; then
    2862  # try to find sources - if not given don't compile
    2863   if test "$PACKAGE_NAME" != ThirdPartyASL; then
    2864     if test -r $coin_aslobjdir/.MakeOk; then
    2865       use_asldir=BUILD
    2866     else
    2867       use_asldir=no
    2868     fi
    2869   else
    2870     use_asldir=no
    2871   fi
    2872 elif test "$use_asldir" != "no"; then
    2873   AC_COIN_CHECK_FILE([$use_asldir/$ampllib],[],
    2874                      [AC_MSG_ERROR([ASL directory \"$use_asldir\" specified, but library missing])])
    2875   AC_COIN_CHECK_FILE([$use_asldir/asl.h],[],
    2876                      [AC_MSG_ERROR([ASL directory \"$use_asldir\" specified, but header files are missing])])
    2877   use_asldir=`cd $use_asldir; pwd`
    2878   case $build in
    2879     *-cygwin*) use_asldir=`cygpath -w $use_asldir | sed -e sX\\\\\\\\X/Xg` ;;
    2880   esac
    2881 fi
    2882 
    2883 # Variable containing ASL library (including full path)
    2884 AC_SUBST(ASLLIB)
    2885 # Variable containing flags for including ASL header files
    2886 AC_SUBST(ASL_CPPFLAGS)
    2887 
    2888 if test "$use_asldir" = BUILD; then
    2889   coin_aslobjdir=`cd $coin_aslobjdir; pwd`
    2890   ASLLIB=`$CYGPATH_W $coin_aslobjdir/$ampllib | sed -e sX\\\\\\\\X/Xg`
    2891   coin_aslsrcdir=`cd $coin_aslsrcdir; pwd`
    2892   ASL_CPPFLAGS="-I"`$CYGPATH_W $coin_aslobjdir | sed -e sX\\\\\\\\X/Xg`" -I"`$CYGPATH_W $coin_aslsrcdir/solvers | sed -e sX\\\\\\\\X/Xg`
    2893 elif test "$use_asldir" != no; then
    2894   ASLLIB=`$CYGPATH_W $use_asldir/$ampllib | sed -e sX\\\\\\\\X/Xg`
    2895   ASL_CPPFLAGS="-I"`$CYGPATH_W $use_asldir | sed -e sX\\\\\\\\X/Xg`
    2896 fi
    2897 
    2898 if test "$use_asldir" != no; then
    2899   AC_LANG_PUSH(C)
    2900   AC_CHECK_LIB(dl,[dlopen],[ASLLIB="$ASLLIB -ldl"],[])
    2901   coin_has_asl=yes
    2902   AC_DEFINE([COIN_HAS_ASL],[1],
    2903             [If defined, the Ampl Solver Library is available.])
    2904   AC_LANG_POP(C)
    2905 else
    2906   coin_has_asl=no
    2907 fi
    2908 AM_CONDITIONAL(COIN_HAS_ASL, test $coin_has_asl = yes)
    2909 ]) # AC_COIN_HAS_ASL
    29102528
    29112529###########################################################################
     
    29812599
    29822600###########################################################################
    2983 #                             COIN_HAS_BLAS (deprecated)                  #
    2984 ###########################################################################
    2985 
    2986 # This macro checks for a library containing the BLAS library.  It
    2987 # tries standard libraries, and if none is found to be working, it
    2988 # checks whether the BLAS ThirdParty/Blas directory has been configured.
    2989 # It adds to ADDLIBS any flags required to link with an externally provided
    2990 # BLAS.  It defines the makefile conditional and preprocessor macro
    2991 # COIN_HAS_BLAS, if blas is available, and it defines the makefile conditional
    2992 # COIN_BUILD_BLAS, if blas is compiled within COIN.
    2993 
    2994 AC_DEFUN([AC_COIN_HAS_BLAS],
    2995 [if test "$PACKAGE_NAME" = ThirdPartyBlas || test "$PACKAGE_NAME" = ThirdPartyLapack || test "$PACKAGE_NAME" = ThirdPartyMumps; then
    2996   coin_blasobjdir=../Blas
    2997 else
    2998   coin_blasobjdir=../ThirdParty/Blas
    2999 fi
    3000 coin_blassrcdir=$srcdir/$coin_blasobjdir
    3001 
    3002 AC_ARG_WITH([blas],
    3003             AC_HELP_STRING([--with-blas],
    3004                            [specify BLAS library (or BUILD for compilation)]),
    3005             [use_blas=$withval], [use_blas=])
    3006 
    3007 MAKEOKFILE=.MakeOk
    3008 # Check if user supplied option makes sense
    3009 if test x"$use_blas" != x; then
    3010   if test "$use_blas" = "BUILD"; then
    3011     # Don't check for course code if this is executed in ThirdParty/Blas
    3012     if test "$PACKAGE_NAME" != ThirdPartyBlas; then
    3013       if test -r $coin_blasobjdir/.MakeOk; then :; else
    3014         AC_MSG_ERROR([option \"BUILD\" specified for Blas, but $coin_blasobjdir directory is not properly configured])
    3015       fi
    3016     fi
    3017   elif test "$use_blas" != no ; then
    3018     AC_MSG_CHECKING([whether user supplied BLASLIB=\"$use_blas\" works])
    3019     LIBS="$use_blas $LIBS"
    3020     ADDLIBS="$use_blas $ADDLIBS"
    3021     AC_COIN_TRY_FLINK([daxpy],
    3022                       [AC_MSG_RESULT([yes])],
    3023                       [AC_MSG_RESULT([no])
    3024                        AC_MSG_ERROR([user supplied BLAS library \"$use_blas\" does not work])])
    3025   fi
    3026 else
    3027 # Try to autodetect the library for blas based on build system
    3028   #AC_MSG_CHECKING([default locations for BLAS])
    3029   skip_lblas_check=no
    3030   case $build in
    3031     *-sgi-*)
    3032       SAVE_LIBS="$LIBS"
    3033       AC_MSG_CHECKING([whether -lcomplib.sgimath has BLAS])
    3034       LIBS="-lcomplib.sgimath $LIBS"
    3035       AC_COIN_TRY_FLINK([daxpy],
    3036                         [AC_MSG_RESULT([yes])
    3037                          use_blas=-lcomplib.sgimath;
    3038                          ADDLIBS="-lcomplib.sgimath $ADDLIBS"],
    3039                         [AC_MSG_RESULT([no])
    3040                          SAVE_LIBS="$LIBS"])
    3041       ;;
    3042 
    3043 # Ideally, we'd use -library=sunperf, but it's an imperfect world. Studio
    3044 # cc doesn't recognise -library, it wants -xlic_lib. Studio 12 CC doesn't
    3045 # recognise -xlic_lib. Libtool doesn't like -xlic_lib anyway. Sun claims
    3046 # that CC and cc will understand -library in Studio 13. The main extra
    3047 # function of -xlic_lib and -library is to arrange for the Fortran run-time
    3048 # libraries to be linked for C++ and C. We can arrange that explicitly.
    3049     *-*-solaris*)
    3050       SAVE_LIBS="$LIBS"
    3051       AC_MSG_CHECKING([for BLAS in libsunperf])
    3052       LIBS="-lsunperf $FLIBS $LIBS"
    3053       AC_COIN_TRY_FLINK([daxpy],
    3054                         [AC_MSG_RESULT([yes])
    3055                          use_blas='-lsunperf'
    3056                          ADDLIBS="-lsunperf $ADDLIBS"
    3057                          coin_need_flibs=yes],
    3058                         [AC_MSG_RESULT([no])
    3059                          LIBS="$SAVE_LIBS"])
    3060       ;;
    3061     *-cygwin* | *-mingw*)
    3062 # On cygwin, consider -lblas only if doscompile is disabled. The prebuilt
    3063 # library will want to link with cygwin, hence won't run standalone in DOS.
    3064       if test "$enable_doscompile" = mingw; then
    3065         skip_lblas_check=yes
    3066       fi
    3067       case "$CC" in
    3068         cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*)
    3069           SAVE_LIBS="$LIBS"
    3070           AC_MSG_CHECKING([for BLAS in MKL])
    3071           LIBS="mkl_intel_c.lib mkl_sequential.lib mkl_core.lib $LIBS"
    3072           AC_COIN_TRY_FLINK([daxpy],
    3073                             [AC_MSG_RESULT([yes])
    3074                              use_blas='mkl_intel_c.lib mkl_sequential.lib mkl_core.lib'
    3075                              ADDLIBS="mkl_intel_c.lib mkl_sequential.lib mkl_core.lib $ADDLIBS"],
    3076                             [AC_MSG_RESULT([no])
    3077                              LIBS="$SAVE_LIBS"])
    3078           ;;
    3079       esac
    3080       ;;
    3081   esac
    3082 
    3083   if test -z "$use_blas" && test $skip_lblas_check = no; then
    3084     SAVE_LIBS="$LIBS"
    3085     AC_MSG_CHECKING([whether -lblas has BLAS])
    3086     LIBS="-lblas $LIBS"
    3087     AC_COIN_TRY_FLINK([daxpy],
    3088                       [AC_MSG_RESULT([yes])
    3089                        ADDLIBS="-lblas $ADDLIBS"
    3090                        use_blas='-lblas'],
    3091                       [AC_MSG_RESULT([no])
    3092                        LIBS="$SAVE_LIBS"])
    3093   fi
    3094 
    3095 # If we have no other ideas, consider building BLAS.
    3096   if test -z "$use_blas"; then
    3097     if test "$PACKAGE_NAME" != ThirdPartyBlas; then
    3098       if test -r $coin_blasobjdir/.MakeOk; then
    3099         use_blas=BUILD
    3100       fi
    3101     fi
    3102   fi
    3103 fi
    3104 
    3105 if test "$use_blas" = BUILD; then
    3106   coin_need_flibs=yes
    3107 fi
    3108 
    3109 AM_CONDITIONAL([COIN_HAS_BLAS],[test x"$use_blas" != x])
    3110 AM_CONDITIONAL([COIN_BUILD_BLAS],[test "$use_blas" = BUILD])
    3111 
    3112 if test x"$use_blas" = x || test "$use_blas" = no; then
    3113   coin_has_blas=no
    3114 else
    3115   coin_has_blas=yes
    3116   AC_DEFINE([COIN_HAS_BLAS],[1],
    3117             [If defined, the BLAS Library is available.])
    3118 fi
    3119 ]) # AC_COIN_HAS_BLAS
    3120 
    3121 ###########################################################################
    3122 #                            COIN_HAS_LAPACK (deprecated)                 #
    3123 ###########################################################################
    3124 
    3125 # This macro checks for a library containing the LAPACK library.  It
    3126 # tries standard libraries, and if none is found to be working, it
    3127 # checks whether the LAPACK ThirdParty/Lapack directory has been
    3128 # configured.  It adds to ADDLIBS any flags required to link with an
    3129 # externally provided LAPACK.  It defines the makefile conditional and
    3130 # preprocessor macro COIN_HAS_LAPACK, if lapack is available, and it
    3131 # defines the makefile conditional COIN_BUILD_LAPACK, if lapack is
    3132 # compiled within COIN.
    3133 
    3134 AC_DEFUN([AC_COIN_HAS_LAPACK],
    3135 [coin_lapackobjdir=../ThirdParty/Lapack
    3136 coin_lapacksrcdir=$srcdir/$coin_lapackobjdir
    3137 
    3138 AC_ARG_WITH([lapack],
    3139             AC_HELP_STRING([--with-lapack],
    3140                            [specify LAPACK library (or BUILD for compilation)]),
    3141             [use_lapack=$withval], [use_lapack=])
    3142 
    3143 # Check if user supplied option makes sense
    3144 if test x"$use_lapack" != x; then
    3145   if test "$use_lapack" = "BUILD"; then
    3146     # Don't check for course code if this is executed in ThirdParty/Lapack
    3147     if test "$PACKAGE_NAME" != ThirdPartyLapack; then
    3148       if test -r $coin_lapackobjdir/.MakeOk; then :; else
    3149         AC_MSG_ERROR([option \"BUILD\" specified for LAPACK, but $coin_lapackobjdir directory is not configured])
    3150       fi
    3151     fi
    3152   elif test "$use_lapack" != no; then
    3153     AC_MSG_CHECKING([whether user supplied LAPACKLIB=\"$use_lapack\" works])
    3154     LIBS="$use_lapack $LIBS"
    3155     ADDLIBS="$use_lapack $ADDLIBS"
    3156     AC_COIN_TRY_FLINK([dsyev],
    3157                       [AC_MSG_RESULT([yes])],
    3158                       [AC_MSG_RESULT([no])
    3159                        AC_MSG_ERROR([user supplied LAPACK library \"$use_lapack\" does not work])])
    3160   fi
    3161 else
    3162   if test x$coin_has_blas = xyes; then
    3163     # First try to see if LAPACK is already available with BLAS library
    3164     AC_MSG_CHECKING([whether LAPACK is already available with BLAS library])
    3165     AC_COIN_TRY_FLINK([dsyev],
    3166                       [AC_MSG_RESULT([yes]); use_lapack=ok],
    3167                       [AC_MSG_RESULT([no])])
    3168   fi
    3169   skip_llapack_check=no
    3170   if test -z "$use_lapack"; then
    3171     # Try to autodetect the library for lapack based on build system
    3172     case $build in
    3173       *-sgi-*)
    3174         SAVE_LIBS="$LIBS"
    3175         AC_MSG_CHECKING([whether -lcomplib.sgimath has LAPACK])
    3176         LIBS="-lcomplib.sgimath $LIBS"
    3177         AC_COIN_TRY_FLINK([dsyev],
    3178                           [AC_MSG_RESULT([yes])
    3179                            use_lapack=-lcomplib.sgimath;
    3180                            ADDLIBS="-lcomplib.sgimath $ADDLIBS"],
    3181                           [AC_MSG_RESULT([no])
    3182                            SAVE_LIBS="$LIBS"])
    3183         ;;
    3184 
    3185 # See comments in COIN_HAS_BLAS.
    3186       *-*-solaris*)
    3187       SAVE_LIBS="$LIBS"
    3188       AC_MSG_CHECKING([for LAPACK in libsunperf])
    3189       LIBS="-lsunperf $FLIBS $LIBS"
    3190       AC_COIN_TRY_FLINK([dsyev],
    3191                         [AC_MSG_RESULT([yes])
    3192                          use_blas='-lsunperf'
    3193                          ADDLIBS="-lsunperf $ADDLIBS"
    3194                          coin_need_flibs=yes],
    3195                         [AC_MSG_RESULT([no])
    3196                          LIBS="$SAVE_LIBS"])
    3197         ;;
    3198 # On cygwin, do this check only if doscompile is disabled. The prebuilt library
    3199 # will want to link with cygwin, hence won't run standalone in DOS.
    3200       *-cygwin*)
    3201         if test "$enable_doscompile" = mingw; then
    3202           skip_llapack_check=yes
    3203         fi
    3204         ;;
    3205     esac
    3206   fi
    3207 
    3208   if test -z "$use_lapack" && test $skip_llapack_check = no; then
    3209     SAVE_LIBS="$LIBS"
    3210     AC_MSG_CHECKING([whether -llapack has LAPACK])
    3211     LIBS="-llapack $LIBS"
    3212     AC_COIN_TRY_FLINK([dsyev],
    3213                       [AC_MSG_RESULT([yes])
    3214                        ADDLIBS="-llapack $ADDLIBS"
    3215                        use_lapack='-llapack'],
    3216                       [AC_MSG_RESULT([no])
    3217                        LIBS="$SAVE_LIBS"])
    3218   fi
    3219 
    3220 # If we have no other ideas, consider building LAPACK.
    3221   if test -z "$use_lapack"; then
    3222     if test "$PACKAGE_NAME" != ThirdPartyLapack; then
    3223       if test -r $coin_lapackobjdir/.MakeOk; then
    3224         use_lapack=BUILD
    3225       fi
    3226     fi
    3227   fi
    3228 fi
    3229 
    3230 if test "$use_lapack" = BUILD; then
    3231   coin_need_flibs=yes
    3232 fi
    3233 
    3234 AM_CONDITIONAL([COIN_HAS_LAPACK],[test x"$use_lapack" != x])
    3235 AM_CONDITIONAL([COIN_BUILD_LAPACK],[test "$use_lapack" = BUILD])
    3236 
    3237 if test x"$use_lapack" = x || test "$use_lapack" = no; then
    3238   coin_has_lapack=no
    3239 else
    3240   coin_has_lapack=yes
    3241   AC_DEFINE([COIN_HAS_LAPACK],[1],
    3242             [If defined, the LAPACK Library is available.])
    3243 fi
    3244 ]) # AC_COIN_HAS_LAPACK
    3245 
    3246 ###########################################################################
    3247 #                            COIN_HAS_MUMPS (deprecated)                  #
    3248 ###########################################################################
    3249 
    3250 # This macro checks for a library containing the MUMPS library.  It
    3251 # checks if the user has provided an argument for the MUMPS library,
    3252 # and if not, it checks whether the MUMPS ThirdParty/Mumps directory has
    3253 # been configured.  It adds to ADDLIBS any flags required to link with
    3254 # an externally provided MUMPS.  It defines the makefile conditional
    3255 # and preprocessor macro COIN_HAS_MUMPS, if MUMPS is available, and it
    3256 # defines the makefile conditional COIN_BUILD_MUMPS, if MUMPS is
    3257 # compiled within COIN.
    3258 
    3259 AC_DEFUN([AC_COIN_HAS_MUMPS],
    3260 [
    3261 if test "$PACKAGE_NAME" = ThirdPartyMumps; then
    3262   coin_mumpsobjdir=../Mumps
    3263 else
    3264   coin_mumpsobjdir=../ThirdParty/Mumps
    3265 fi
    3266 coin_mumpssrcdir=$abs_source_dir/$coin_mumpsobjdir/MUMPS
    3267 
    3268 MAKEOKFILE=.MakeOk
    3269 
    3270 #check if user provides a MUMPS library (that works)
    3271 AC_LANG_PUSH(C)
    3272 SAVE_ADDLIBS="$ADDLIBS"
    3273 ADDLIBS="$ADDLIBS $FLIBS"
    3274 AC_COIN_HAS_USER_LIBRARY(mumps, MUMPS, dmumps_c.h, dmumps_c)
    3275 ADDLIBS="$SAVE_ADDLIBS"
    3276 AC_LANG_POP(C)
    3277 
    3278 if test "$coin_has_mumps" = "true"; then  # user provided mumps library
    3279   use_mumps=yes
    3280   coin_has_mumps=yes
    3281 
    3282   MUMPS_INCFLAGS="-I\`\$(CYGPATH_W) $MUMPSINCDIR\`"
    3283   ADDLIBS="$MUMPSLIB $ADDLIBS"
    3284 
    3285 else # no user provided library, so we try to build our own
    3286   use_mumps=BUILD
    3287 
    3288   # Check if the MUMPS' ThirdParty project has been configured
    3289   if test "$PACKAGE_NAME" != ThirdPartyMumps; then
    3290     if test -r $coin_mumpsobjdir/.MakeOk; then
    3291       use_mumps=BUILD
    3292       # Mumps needs pthreads
    3293       AC_LANG_PUSH(C)
    3294       save_LIBS="$LIBS"
    3295       LIBS="$LIBS $FLIBS"
    3296       AC_CHECK_LIB([pthread],[pthread_create],[LIBS="-lpthread $save_LIBS"; ADDLIBS="-lpthread $ADDLIBS"],[LIBS="save_LIBS"])
    3297       AC_LANG_POP(C)
    3298  
    3299       MUMPS_INCFLAGS="-I\`\$(CYGPATH_W) $coin_mumpssrcdir/libseq\` -I\`\$(CYGPATH_W) $coin_mumpssrcdir/include\`"
    3300     else
    3301       use_mumps=
    3302     fi
    3303   fi
    3304 
    3305   # if a user provided library is used, then COIN_HAS_USER_LIBRARY takes care of the COIN_HAS_MUMPS conditional and preprocessor symbol
    3306   AM_CONDITIONAL([COIN_HAS_MUMPS],[test x"$use_mumps" != x])
    3307   if test x"$use_mumps" != x; then
    3308     AC_DEFINE([COIN_HAS_MUMPS],[1],[If defined, the MUMPS Library is available.])
    3309     coin_has_mumps=yes
    3310   else
    3311     coin_has_mumps=no
    3312   fi
    3313   AC_MSG_CHECKING([whether MUMPS is available])
    3314   AC_MSG_RESULT([$coin_has_mumps])
    3315 fi
    3316 
    3317 if test x"$use_mumps" != x; then
    3318   # we need the Fortran runtime libraries if we want to link with C/C++
    3319   coin_need_flibs=yes
    3320 
    3321   AC_SUBST(MUMPS_INCFLAGS)
    3322 fi
    3323 
    3324 AM_CONDITIONAL([COIN_BUILD_MUMPS],[test "$use_mumps" = BUILD])
    3325 
    3326 ]) # AC_COIN_HAS_MUMPS
    3327 
    3328 ###########################################################################
    3329 #                            COIN_HAS_METIS (deprecated)                  #
    3330 ###########################################################################
    3331 
    3332 # This macro checks for a library containing the METIS library.  It
    3333 # checks if the user has provided an argument for the METIS library,
    3334 # and if not, it checks whether the METIS ThirdParty/Metis directory has
    3335 # been configured.  It adds to ADDLIBS any flags required to link with
    3336 # an externally provided METIS.  It defines the makefile conditional
    3337 # and preprocessor macro COIN_HAS_METIS, if METIS is available, and it
    3338 # defines the makefile conditional COIN_BUILD_METIS, if METIS is
    3339 # compiled within COIN.
    3340 
    3341 AC_DEFUN([AC_COIN_HAS_METIS],
    3342 [
    3343 case "$PACKAGE_NAME" in
    3344   ThirdParty*)
    3345     coin_metisobjdir=../Metis
    3346     ;;
    3347   *)
    3348     coin_metisobjdir=../ThirdParty/Metis
    3349     ;;
    3350 esac
    3351 
    3352 MAKEOKFILE=.MakeOk
    3353 
    3354 #check if user provides a METIS library (that works)
    3355 AC_LANG_PUSH(C)
    3356 AC_ARG_WITH(metis,
    3357    AS_HELP_STRING([--with-metis], [specify flags to link with METIS library]),
    3358    [METISLIB="$withval"; coin_has_metis=true], [coin_has_metis=no])
    3359 
    3360 if test $coin_has_metis = true; then
    3361   coin_save_LIBS="$LIBS"
    3362   LIBS="$METISLIB $ADDLIBS"
    3363   AC_MSG_CHECKING([whether symbol metis_nodend is available with ])
    3364   AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[metis_nodend()]])],
    3365      [AC_MSG_RESULT(yes)],
    3366      [AC_MSG_RESULT(no)
    3367       AC_MSG_ERROR([User-supplied METIS library does not work])])
    3368   LIBS="$coin_save_LIBS"
    3369 fi
    3370 AC_LANG_POP(C)
    3371 
    3372 if test "$coin_has_metis" = "true"; then  # user provided metis library
    3373   use_metis=yes
    3374   coin_has_metis=yes
    3375 
    3376   ADDLIBS="$METISLIB $ADDLIBS"
    3377 
    3378 else # no user provided library, so we try to build our own
    3379   use_metis=BUILD
    3380 
    3381   # Check if the METIS' ThirdParty project has been configured
    3382   if test "$PACKAGE_NAME" != ThirdPartyMetis; then
    3383     if test -r $coin_metisobjdir/.MakeOk; then
    3384       use_metis=BUILD
    3385     else
    3386       use_metis=
    3387     fi
    3388   fi
    3389 
    3390   if test x"$use_metis" != x; then
    3391     coin_has_metis=yes
    3392   else
    3393     coin_has_metis=no
    3394   fi
    3395   AC_MSG_CHECKING([whether METIS is available])
    3396   AC_MSG_RESULT([$coin_has_metis])
    3397 fi
    3398 
    3399 AM_CONDITIONAL([COIN_HAS_METIS],[test $coin_has_metis = yes])
    3400 if test $coin_has_metis = yes; then
    3401   AC_DEFINE([COIN_HAS_METIS],[1],[If defined, the METIS library is available.])
    3402 fi
    3403 
    3404 ]) # AC_COIN_HAS_METIS
    3405 
    3406 
    3407 ###########################################################################
    3408 #                             COIN_HAS_GLPK (deprecated)                  #
    3409 ###########################################################################
    3410 #
    3411 # This macro checks for the GLPK package. GLPK provides two capabilities,
    3412 # an LP and MIP solver (GLPK) and the GNU Mathprog modelling language (GMPL).
    3413 # The macro checks for either Glpk or Gmpl, according to the value specified as
    3414 # the parameter. Use one of Glpk or Gmpl. Use *exactly* these strings, eh?
    3415 #
    3416 #
    3417 # The macro first uses COIN_HAS_USER_LIBRARY to see if the user has specified
    3418 # a preexisting library (this allows the use of any glpk version, if the user
    3419 # is fussy). The macro then checks for ThirdParty/Glpk.
    3420 #
    3421 # This macro will define the following variables for Glpk:
    3422 #   coin_has_glpk       true or false
    3423 #   GLPKLIB             link flags for GLPK (if user supplied)
    3424 #   GLPKINCDIR          location of glpk include files
    3425 #   COIN_HAS_GLPK       Preprocessor symbol, defined to 1
    3426 #   COIN_HAS_GLPK       Automake conditional
    3427 #   COIN_BUILD_GLPK     Automake conditional, defined only if Glpk is to be
    3428 #                       built in ThirdParty/Glpk
    3429 #
    3430 # With the exception of COIN_BUILD_GLPK, an identical set of variables is
    3431 # defined for Gmpl.
    3432 
    3433 AC_DEFUN([AC_COIN_HAS_GLPK],
    3434 [
    3435 if test "$PACKAGE_NAME" = ThirdPartyGlpk; then
    3436   coin_glpkobjdir=../Glpk
    3437 else
    3438   coin_glpkobjdir=../ThirdParty/Glpk
    3439 fi
    3440 coin_glpksrcdir=$abs_source_dir/$coin_glpkobjdir
    3441 
    3442 use_thirdpartyglpk=no
    3443 
    3444 # Check for the requested component. If the user specified an external glpk
    3445 # library don't force a ThirdParty build, let the error propagate.
    3446 
    3447 m4_if([$1],[Glpk],
    3448 [AC_COIN_HAS_USER_LIBRARY([Glpk],[GLPK],[glpk.h],
    3449     [_glp_lpx_simplex glp_lpx_simplex])
    3450  if test x"$coin_has_glpk" = xfalse && test x"$GLPKLIB" = x ; then
    3451    use_thirdpartyglpk=try
    3452  fi])
    3453 m4_if([$1],[Gmpl],
    3454 [AC_COIN_HAS_USER_LIBRARY([Gmpl],[GMPL],[glpmpl.h],
    3455     [_glp_mpl_initialize glp_mpl_initialize])
    3456  if test x"$coin_has_gmpl" = xfalse && test x"$GMPLLIB" = x ; then
    3457    use_thirdpartyglpk=try
    3458  fi])
    3459 
    3460 # If the user has supplied an external library, use it. Otherwise, consider
    3461 # a build in ThirdParty/Glpk. If we build, assume we get both glpk and gmpl.
    3462 
    3463 if test x"$use_thirdpartyglpk" = xtry ; then
    3464   MAKEOKFILE=.MakeOk
    3465   # Check if the Glpk's ThirdParty project has been configured
    3466   if test "$PACKAGE_NAME" != ThirdPartyGlpk; then
    3467     if test -r $coin_glpkobjdir/.MakeOk; then
    3468       use_thirdpartyglpk=build
    3469     else
    3470       use_thirdpartyglpk=no
    3471     fi
    3472   else
    3473     use_thirdpartyglpk=build
    3474   fi
    3475 
    3476 # If we're building, set the library and include directory variables, create a
    3477 # preprocessor symbol, define a variable that says we're using glpk/gmpl, and
    3478 # another to indicate a link check is a bad idea (hard to do before the library
    3479 # exists).
    3480 
    3481   if test x"$use_thirdpartyglpk" = xbuild ; then
    3482     m4_toupper($1INCDIR)="$coin_glpksrcdir/glpk/include"
    3483     AC_SUBST(m4_toupper($1INCDIR))
    3484     AC_DEFINE(m4_toupper(COIN_HAS_$1),[1],
    3485               [Define to 1 if $1 package is available])
    3486     m4_tolower(coin_has_$1)=true
    3487     m4_tolower($1_libcheck)=no
    3488     m4_toupper($1OBJDIR)=`cd $coin_glpkobjdir; pwd`
    3489     AC_SUBST(m4_toupper($1OBJDIR))
    3490     AC_MSG_NOTICE([Using $1 in ThirdParty/Glpk])
    3491   fi
    3492 fi
    3493 
    3494 # Define the necessary automake conditionals.
    3495 
    3496 AM_CONDITIONAL(m4_toupper(COIN_HAS_$1),
    3497                [test x"$m4_tolower(coin_has_$1)" = xtrue])
    3498 AM_CONDITIONAL([COIN_BUILD_GLPK],[test x"$use_thirdpartyglpk" = xbuild])
    3499 
    3500 ]) # AC_COIN_HAS_GLPK
    3501 
    3502 
    3503 ###########################################################################
    35042601#                           COIN_DOXYGEN                                  #
    35052602###########################################################################
     
    38052902AC_DEFUN([AC_COIN_MAIN_PACKAGEDIR],
    38062903[AC_REQUIRE([AC_COIN_HAS_PKGCONFIG])
    3807 AC_MSG_CHECKING([whether project m4_ifval([$2],[$2/])$1 is available])
     2904AC_MSG_CHECKING([whether project $1 is available])
    38082905
    38092906m4_tolower(coin_has_$1)=notGiven
     
    38252922if test $m4_tolower(coin_has_$1) != skipping; then
    38262923  if test $PACKAGE_TARNAME = m4_tolower($1); then
    3827     m4_tolower(coin_has_$1)=.
     2924    m4_tolower(coin_has_$1)=yes
    38282925    coin_have_project_dir=yes
    38292926  fi
     
    38322929    AC_HELP_STRING([--with-m4_tolower($1)-lib],
    38332930                   [linker flags for using project $1]),
    3834       [m4_tolower(coin_has_$1)=installed],
     2931      [m4_tolower(coin_has_$1)="yes, via --with-m4_tolower($1)-lib"],
    38352932      [])
    38362933
     
    38382935    AC_HELP_STRING([--with-m4_tolower($1)-incdir],
    38392936                   [directory with header files for using project $1]),
    3840     [m4_tolower(coin_has_$1)=installed],
     2937    [m4_tolower(coin_has_$1)="yes, via --with-m4_tolower($1)-incdir"],
    38412938    [])
    38422939
     
    38442941    AC_HELP_STRING([--with-m4_tolower($1)-datadir],
    38452942                   [directory with data files for using project $1]),
    3846     [m4_tolower(coin_has_$1)=installed],
     2943    [m4_tolower(coin_has_$1)="yes, via --with-m4_tolower($1)-datadir"],
    38472944    [])
    38482945
     
    38542951           coin_has_blas=notGiven
    38552952         else
    3856            coin_has_blas=installed
     2953           coin_has_blas="yes, via --with-blas"
    38572954         fi],
    38582955        [])])
     
    38652962           coin_has_lapack=notGiven
    38662963         else
    3867            coin_has_lapack=installed
     2964           coin_has_lapack="yes, via --with-lapack"
    38682965         fi],
    38692966        [])])
     
    38852982      [ coin_have_project_dir=yes ])
    38862983    if test $coin_have_project_dir = yes; then
    3887       m4_tolower(coin_has_$1)=m4_ifval($2,[$2/],)$1
     2984      m4_tolower(coin_has_$1)="yes, source in m4_ifval($2,[$2/],)$1"
    38882985    fi
    38892986  fi
     
    38912988
    38922989# check for project by using pkg-config, if pkg-config is available
    3893 if test $m4_tolower(coin_has_$1) = notGiven; then
     2990if test "$m4_tolower(coin_has_$1)" = notGiven; then
    38942991  #we are only interested in installed packages here, so we do not search in $COIN_PKG_CONFIG_PATH_UNINSTALLED
    38952992  if test -n "$PKG_CONFIG" ; then
     
    38982995      m4_ifval([$4],
    38992996        [AC_COIN_PKG_CHECK_PROJECT_EXISTS([$4],
    3900                 [m4_tolower(coin_has_$1)="$m4_toupper([$4])_VERSION"])],
     2997                [m4_tolower(coin_has_$1)="yes, found installed version $m4_toupper([$4])_VERSION"])],
    39012998              [AC_COIN_PKG_CHECK_PROJECT_EXISTS([$1],
    3902                 [m4_tolower(coin_has_$1)="$m4_toupper([$1])_VERSION"])])
     2999                [m4_tolower(coin_has_$1)="yes, found installed version $m4_toupper([$1])_VERSION"])])
    39033000    PKG_CONFIG_PATH="$coin_save_PKG_CONFIG_PATH"
    39043001    export PKG_CONFIG_PATH
     
    39063003fi
    39073004
    3908 AC_MSG_RESULT([$m4_tolower(coin_has_$1)])
     3005if test "$m4_tolower(coin_has_$1)" = notGiven; then
     3006  m4_case(m4_tolower($1),
     3007    [blas],
     3008    [AC_MSG_RESULT([no (but will check for system blas later)])],
     3009    [lapack],
     3010    [AC_MSG_RESULT([no (but will check for system lapack later)])],
     3011    [AC_MSG_RESULT([not given])]
     3012  )
     3013else
     3014  AC_MSG_RESULT([$m4_tolower(coin_has_$1)])
     3015fi
    39093016
    39103017AC_MSG_CHECKING(whether project m4_ifval([$2],[$2/])$1 needs to be configured)
     
    40723179  # construct dependencies variables from LIBS variables
    40733180  # we add an extra space in LIBS so we can substitute out everything starting with " -"
     3181  # before, substitute out everything of the form -framework xxx as used on Mac
    40743182  # also substitute out everything of the form `xxx`yyy (may have been added for cygwin/cl)
    4075   m4_toupper($1)_DEPENDENCIES=`echo " $m4_toupper($1)_LIBS" | [sed -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g']`
     3183  m4_toupper($1)_DEPENDENCIES=`echo " $m4_toupper($1)_LIBS" | [sed -e 's/ -framework  *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g']`
    40763184  coin_foreach_w([myvar], [$3], [
    4077     m4_toupper(myvar)_DEPENDENCIES=`echo " $m4_toupper(myvar)_LIBS " | [sed -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g']`
     3185    m4_toupper(myvar)_DEPENDENCIES=`echo " $m4_toupper(myvar)_LIBS " | [sed -e 's/ -framework  *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g']`
    40783186  ])
    40793187
     
    44623570      LIBS="$coin_save_LIBS"
    44633571      ;;
     3572     
    44643573    *-cygwin* | *-mingw*)
    44653574# On cygwin, consider -lblas only if doscompile is disabled. The prebuilt
     
    44813590          ;;
    44823591      esac
     3592      ;;
     3593     
     3594     *-darwin*)
     3595      AC_MSG_CHECKING([for BLAS in Veclib])
     3596      coin_need_flibs=no
     3597      coin_save_LIBS="$LIBS"
     3598      LIBS="-framework vecLib $LIBS"
     3599      AC_COIN_TRY_FLINK([daxpy],
     3600                        [use_blas='-framework vecLib'
     3601                         if test $coin_need_flibs = yes ; then
     3602                           use_blas="$use_blas $FLIBS"
     3603                         fi
     3604                         AC_MSG_RESULT([yes: $use_blas])
     3605                        ],
     3606                        [AC_MSG_RESULT([no])])
     3607      LIBS="$coin_save_LIBS"
    44833608      ;;
    44843609  esac
     
    46423767        # On cygwin, do this check only if doscompile is disabled. The prebuilt library
    46433768        # will want to link with cygwin, hence won't run standalone in DOS.
     3769       
    46443770      *-cygwin*)
    46453771        if test "$enable_doscompile" = mingw; then
     
    46473773        fi
    46483774        ;;
     3775       
     3776     *-darwin*)
     3777      AC_MSG_CHECKING([for LAPACK in Veclib])
     3778      coin_need_flibs=no
     3779      coin_save_LIBS="$LIBS"
     3780      LIBS="-framework vecLib $BLAS_LIBS $LIBS"
     3781      AC_COIN_TRY_FLINK([dsyev],
     3782                        [use_lapack="-framework vecLib $BLAS_LIBS"
     3783                         if test $coin_need_flibs = yes ; then
     3784                           use_lapack="$use_lapack $FLIBS"
     3785                         fi
     3786                         AC_MSG_RESULT([yes: $use_lapack])
     3787                        ],
     3788                        [AC_MSG_RESULT([no])])
     3789      LIBS="$coin_save_LIBS"
     3790      ;;
     3791       
    46493792    esac
    46503793  fi
Note: See TracChangeset for help on using the changeset viewer.