Changeset 2077


Ignore:
Timestamp:
Jan 8, 2011 12:17:40 PM (9 years ago)
Author:
stefan
Message:

support withval=no in --with-project-xxx flags; drop output whether a directory will be configured; change help string of --with-blas/lapack

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/coin.m4

    r2076 r2077  
    29122912    AC_HELP_STRING([--with-m4_tolower($1)-lib],
    29132913                   [linker flags for using project $1]),
    2914       [m4_tolower(coin_has_$1)="yes, via --with-m4_tolower($1)-lib"],
    2915       [])
    2916 
     2914    [if test "$withval" = no ; then
     2915       m4_tolower(coin_has_$1)=skipping
     2916     else
     2917       m4_tolower(coin_has_$1)="yes, via --with-m4_tolower($1)-lib"
     2918     fi],
     2919    [])
     2920fi
     2921
     2922if test $m4_tolower(coin_has_$1) != skipping; then
    29172923  AC_ARG_WITH([m4_tolower($1)-incdir],
    29182924    AC_HELP_STRING([--with-m4_tolower($1)-incdir],
    29192925                   [directory with header files for using project $1]),
    2920     [m4_tolower(coin_has_$1)="yes, via --with-m4_tolower($1)-incdir"],
     2926    [if test "$withval" = no ; then
     2927       m4_tolower(coin_has_$1)=skipping
     2928     else
     2929       m4_tolower(coin_has_$1)="yes, via --with-m4_tolower($1)-incdir"
     2930     fi],
    29212931    [])
    2922 
     2932fi
     2933
     2934if test $m4_tolower(coin_has_$1) != skipping; then
    29232935  AC_ARG_WITH([m4_tolower($1)-datadir],
    29242936    AC_HELP_STRING([--with-m4_tolower($1)-datadir],
    29252937                   [directory with data files for using project $1]),
    2926     [m4_tolower(coin_has_$1)="yes, via --with-m4_tolower($1)-datadir"],
     2938    [if test "$withval" = no ; then
     2939       m4_tolower(coin_has_$1)=skipping
     2940     else
     2941       m4_tolower(coin_has_$1)="yes, via --with-m4_tolower($1)-datadir"
     2942     fi],
    29272943    [])
    2928 
    2929   m4_if(m4_tolower($1), blas, [
     2944fi
     2945
     2946m4_if(m4_tolower($1), blas, [
     2947  if test $m4_tolower(coin_has_$1) != skipping; then
    29302948    #--with-blas can overwrite --with-blas-lib, and can be set to BUILD to enforce building blas
    29312949    AC_ARG_WITH([blas],
    2932       AC_HELP_STRING([--with-blas], [specify BLAS library (or BUILD for compilation)]),
     2950      AC_HELP_STRING([--with-blas], [specify BLAS library (or BUILD to enforce use of ThirdParty/Blas)]),
    29332951        [if test x"$withval" = "xBUILD" ; then
    29342952           coin_has_blas=notGiven
     2953         elif test x"$withval" = "xno" ; then
     2954           coin_has_blas=skipping
    29352955         else
    29362956           coin_has_blas="yes, via --with-blas"
    29372957         fi],
    2938         [])])
    2939 
    2940   m4_if(m4_tolower($1), lapack, [
     2958        [])
     2959  fi
     2960])
     2961
     2962m4_if(m4_tolower($1), lapack, [
     2963  if test $m4_tolower(coin_has_$1) != skipping; then
    29412964    #--with-lapack can overwrite --with-lapack-lib, and can be set to BUILD to enforce building lapack
    29422965    AC_ARG_WITH([lapack],
    2943       AC_HELP_STRING([--with-lapack], [specify LAPACK library (or BUILD for compilation)]),
     2966      AC_HELP_STRING([--with-lapack], [specify LAPACK library (or BUILD to enforce use of ThirdParty/Lapack)]),
    29442967        [if test x"$withval" = "xBUILD" ; then
    29452968           coin_has_lapack=notGiven
     2969         elif test x"$withval" = "xno" ; then
     2970           coin_has_lapack=skipping
    29462971         else
    29472972           coin_has_lapack="yes, via --with-lapack"
    29482973         fi],
    2949         [])])
    2950 
    2951 fi
     2974        [])
     2975  fi
     2976])
    29522977
    29532978# check if project is available in present directory
     
    29983023fi
    29993024
    3000 AC_MSG_CHECKING(whether project m4_ifval([$2],[$2/])$1 needs to be configured)
    30013025if test "$coin_have_project_dir" = yes ; then
    3002 
    30033026  if test -r $srcdir/m4_ifval($2,[$2/],)$1/configure; then
    30043027    coin_subdirs="$coin_subdirs m4_ifval($2,[$2/],)$1"
    3005     AC_MSG_RESULT(yes)
    30063028    AC_CONFIG_SUBDIRS(m4_ifval($2,[$2/],)$1)
    3007   else
    3008     AC_MSG_RESULT(no)
    3009   fi
    3010 else
    3011   AC_MSG_RESULT(no)
     3029  fi
    30123030fi
    30133031])
     
    30793097])
    30803098
    3081 #check if user provided LIBS, CFLAGS, or DATA for module
     3099#check if user provided LIBS, CFLAGS, or DATA for package or disables use of package
    30823100if test $m4_tolower(coin_has_$1) != skipping; then
    3083 
    30843101  AC_ARG_WITH([m4_tolower($1)-lib],
    30853102    AC_HELP_STRING([--with-m4_tolower($1)-lib],
    30863103                   [linker flags for using package $1]),
    3087       [m4_tolower(coin_has_$1)=yes
     3104    [if test "$withval" = no ; then
     3105       m4_tolower(coin_has_$1)=skipping
     3106     else
     3107       m4_tolower(coin_has_$1)=yes
    30883108       m4_toupper($1_LIBS)="$withval"
    30893109       coin_foreach_w([myvar], [$3], [
     
    30913111         m4_toupper(myvar)_LIBS="$withval $m4_toupper(myvar)_LIBS"
    30923112       ])
    3093       ],
    3094       [])
    3095 
     3113     fi
     3114    ],
     3115    [])
     3116fi
     3117
     3118if test $m4_tolower(coin_has_$1) != skipping; then
    30963119  AC_ARG_WITH([m4_tolower($1)-incdir],
    30973120    AC_HELP_STRING([--with-m4_tolower($1)-incdir],
    30983121                   [directory with header files for using package $1]),
    3099     [m4_tolower(coin_has_$1)=yes
    3100      m4_toupper($1_CFLAGS)="-I`${CYGPATH_W} $withval`"
    3101      coin_foreach_w([myvar], [$3], [m4_toupper(myvar)_CFLAGS="$withval $m4_toupper(myvar)_CFLAGS"
    3102      ])
     3122    [if test "$withval" = no ; then
     3123       m4_tolower(coin_has_$1)=skipping
     3124     else
     3125       m4_tolower(coin_has_$1)=yes
     3126       m4_toupper($1_CFLAGS)="-I`${CYGPATH_W} $withval`"
     3127       coin_foreach_w([myvar], [$3], [m4_toupper(myvar)_CFLAGS="$withval $m4_toupper(myvar)_CFLAGS"])
     3128     fi
    31033129    ],
    31043130    [])
    3105 
     3131fi
     3132
     3133if test $m4_tolower(coin_has_$1) != skipping; then
    31063134  AC_ARG_WITH([m4_tolower($1)-datadir],
    31073135    AC_HELP_STRING([--with-m4_tolower($1)-datadir],
    31083136                   [directory with data files for using package $1]),
    3109     [m4_tolower(coin_has_$1)=yes
    3110      m4_toupper($1_DATA)="$withval"],
     3137    [if test "$withval" = no ; then
     3138       m4_tolower(coin_has_$1)=skipping
     3139     else
     3140       m4_tolower(coin_has_$1)=yes
     3141       m4_toupper($1_DATA)="$withval"
     3142     fi
     3143    ],
    31113144    [])
    31123145fi
     
    34923525AC_ARG_WITH([blas],
    34933526            AC_HELP_STRING([--with-blas],
    3494                            [specify BLAS library (or BUILD for compilation)]),
     3527                           [specify BLAS library (or BUILD to enforce use of ThirdParty/Blas)]),
    34953528            [use_blas="$withval"], [use_blas=])
    34963529
     
    36863719AC_ARG_WITH([lapack],
    36873720            AC_HELP_STRING([--with-lapack],
    3688                            [specify LAPACK library (or BUILD for compilation)]),
     3721                           [specify LAPACK library (or BUILD to enforce use of ThirdParty/Lapack)]),
    36893722            [use_lapack=$withval], [use_lapack=])
    36903723
Note: See TracChangeset for help on using the changeset viewer.