Changeset 3811


Ignore:
Timestamp:
Feb 24, 2018 4:43:30 PM (21 months ago)
Author:
lou
Message:

A bit of cleanup in coin.m4. Change run_autotools to use aclocal -I options
instead of creating acinclude.m4. Current usage recommendations for aclocal
deprecate acinclude.m4.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/coin.m4

    r3809 r3811  
    452452
    453453# Setting the final parameter to 'build' will cause the phrase "'build' will
    454 # prefer a COIN ThirdParty package" to be inserted in the documentation for
     454# look for a COIN ThirdParty package" to be inserted in the documentation for
    455455# --with-prim.
    456456
     
    462462      m4_case($6,build,
    463463      ['no' is equivalent to --without-m4_tolower($1)[,]
    464        'build' will prefer a COIN ThirdParty package.],
     464       'build' will look for a COIN ThirdParty package.],
    465465      ['no' is equivalent to --without-m4_tolower($1).])
    466466      m4_case($3$4$5,nonono,,
     
    502502# COIN_FIND_PRIM_PKG([prim],[.pc file name],[default action],[cmdlineopts])
    503503
    504 # Determine whether we can use primary package prim ($1) and collect
     504# Determine whether we can use primary package prim ($1) and assemble
    505505# information on the required library flags (prim_libs), compiler flags
    506506# (prim_cflags), and data directories (prim_data) as specified by cmdlineopts.
     
    516516# --without-prim. Any of --with-prim, --with-prim=yes, or --with-prim=build,
    517517# cause the macro to look for a .pc file. Any other value is taken as
    518 # equivalent to --with-prim-data=value (dataonly) or --with-prim-libs-value
     518# equivalent to --with-prim-data=value (dataonly) or --with-prim-libs=value
    519519# (anything else).
    520520
     
    711711#              [default action],[public/private],[cmdopts])
    712712
    713 # Determine whether we can use primary package prim ($1) and collect
     713# Determine whether we can use primary package prim ($1) and assemble
    714714# information on the required library flags (prim_libs), compiler flags
    715715# (prim_cflags), and data directories (prim_data).
     
    791791  fi
    792792
     793# Possibilities are `yes', 'no', or `skipping'. Normalise to `yes' or `no'.
     794
     795  if test "$m4_tolower(coin_has_$1)" != yes ; then
     796    m4_tolower(coin_has_$1)=no
     797  fi
     798
    793799# Create an automake conditional COIN_HAS_PRIM.
    794800
     
    796802                 [test $m4_tolower(coin_has_$1) = yes])
    797803
    798 # If we've located the package, define preprocessor symbol COIN_HAS_PRIM
    799 # and augment the necessary variables for the client packages. We need the
    800 # final ':' (noop) below because it's possible that PRIM is data-only and the
    801 # list of client packages is empty.
     804# If we've located the package, define preprocessor symbol COIN_HAS_PRIM and
     805# augment the necessary variables for the client packages. We need the final
     806# ':' (noop) below because it's possible that the list of client packages
     807# is empty.
    802808
    803809  if test $m4_tolower(coin_has_$1) = yes ; then
     
    834840#                    [dfltaction],[cmdlineopts])
    835841
    836 # Determine whether we can use primary package prim ($1) and collect
     842# Determine whether we can use primary library prim ($1) and assemble
    837843# information on the required library flags (prim_libs), compiler flags
    838844# (prim_cflags), and data directories (prim_data) as specified by cmdlineopts.
     
    845851# on cmdlineopts. `nodata' is the default.
    846852
    847 # --with-prim is interpreted as follows: --with-prim=no is equivalent to
    848 # --without-prim. Any of --with-prim, --with-prim=yes, or --with-prim=build,
    849 # cause the macro to look for a .pc file. Any other value is taken as
    850 # equivalent to --with-prim-data=value (dataonly) or --with-prim-libs-value
    851 # (anything else).
     853# --with-prim is interpreted as follows:
     854#   * --with-prim=no is equivalent to --without-prim.
     855#   * --with-prim or --with-prim=yes is equivalent to
     856#       --with-prim-libs=-lprim
     857#       --with-prim-data=/usr/local/share
     858#   * --with-prim=build attempts to invent something that will find a COIN
     859#     ThirdParty library or data
     860#       --with-prim-libs="-L\$(libdir) -lcoinprim"
     861#       --with-prim-cflgs="-I\$(pkgincludedir)/ThirdParty"
     862#       --with-prim-data="\$(pkgdatadir)"
     863#   * Any other value is taken as equivalent to
     864#       --with-prim-data=value (dataonly) or
     865#       --with-prim-libs=value (anything else)
    852866
    853867# The algorithm first checks for a user-specified value of --with-prim;
     
    858872# parameters.
    859873
    860 # Default action ($5) (no, yes, build) is the default action if the user
    861 # offers no guidance via command line parameters. In turn, it defaults to yes.
    862 
    863 # `build' will attempt to invent something that prefers COIN ThirdParty
    864 # packages, e.g.,
    865 #     glpk_libs="-L$(libdir) -lcoinglpk"
    866 #     glpk_cflags="-I$(includedir)/ThirdParty"
    867 # vs
    868 #     glpk_libs="-lglpk"
    869 #     glpk_cflags=""
    870 # but it's pretty shaky and has no hope except for ThirdParty packages.
     874# Default action ($5) (no, yes, build) is the default value of --with-prim
     875# if the user offers no guidance via command line parameters. In turn,
     876# it defaults to yes. `build' doesn't have a hope of working except for COIN
     877# ThirdParty packages, and even then it's pretty shaky.
    871878
    872879# The macro doesn't test that the specified values actually work. This is
     
    879886  dflt_action=m4_default([$5],[yes])
    880887
    881 # Initialize variables for the primary package.
     888# Initialize variables for the primary library.
    882889
    883890  m4_tolower(coin_has_$1)=noInfo
     
    10071014        [m4_tolower($1_data)=m4_default([$3],
    10081015           [if test "$m4_tolower(coin_has_$1)" = build ; then
    1009               m4_tolower($1_data)="$(pkgdatadir)"
     1016              m4_tolower($1_data)="\$(pkgdatadir)"
    10101017            else
    10111018              m4_tolower($1_data)="/usr/local/share"
     
    10201027  esac
    10211028
    1022 # The final value of coin_has_prim will be yes, no, or skipping. No means
    1023 # we looked (with pkgconfig) and didn't find anything. Skipping means the
    1024 # user said `don't use.' Yes means we have something, from the user or macro
    1025 # parameters or invented. Note that we haven't run a useability test!
     1029# The final value of coin_has_prim will be yes or skipping.  Skipping means
     1030# the user said `don't use.' Yes means we have something, from the user or
     1031# macro parameters or invented. Note that we haven't run a useability test!
    10261032
    10271033# Change the test to enable / disable debugging output
     
    10451051#              [dfltaction],[public/private],[cmdopts])
    10461052
    1047 # Determine whether we can use primary package prim ($1) and collect
     1053# Determine whether we can use primary library prim ($1) and assemble
    10481054# information on the required library flags (prim_libs), compiler flags
    10491055# (prim_cflags), and data directories (prim_data).
     
    10551061# accordingly. The (hardwired) default is 'nodata'.
    10561062
    1057 # Default action ($4) (no, yes, build) is the default action if the user
     1063# Macro parameters linkflgs ($3), cflgs ($4), and dataflgs ($5) are used for
     1064# --with-prim-libs, --with-prim-cflgs, and --with-prim-data if and only if
     1065# there are no user-supplied values on the command line. It's all or nothing;
     1066# any user-supplied value causes all macro parameters to be ignored.
     1067
     1068# Default action ($6) (no, yes, build) is the default action if the user
    10581069# offers no guidance via command line parameters. Really, 'build' has no hope
    10591070# of working except for COIN ThirdParty packages. Don't use it for other COIN
    10601071# packages.
    10611072
    1062 # If no .pc file names are specified, the macro will look for prim.pc if the
    1063 # default is yes, coinprim.pc if the default is build.  If a .pc file name
    1064 # ($3) is specified, it overrides the macro defaults.
    1065 
    10661073# Define an automake conditional COIN_HAS_PRIM to record the result. If we
    10671074# decide to use prim, also define a preprocessor symbol COIN_HAS_PRIM.
    10681075
    10691076# Linker and compiler flag information will be propagated to the space-
    1070 # separated list of client packages ($2) using the _PCFILES variable if
    1071 # a .pc file is used, otherwise by the _LIBS and _CFLAGS variables of
    1072 # client packages. These variables match Requires.private, Libs.private,
    1073 # and Cflags.private, respectively, in a .pc file. To force information about
    1074 # prim to be added to the public variables in a .pc file, set public/private
    1075 # ($5) to public.
     1077# separated list of client packages ($2) using the _LIBS and _CFLAGS variables
     1078# of client packages. These variables match Libs.private and Cflags.private,
     1079# respectively, in a .pc file. To force information about prim to be added
     1080# to the public variables in a .pc file, set public/private ($7) to public.
    10761081
    10771082# The macro doesn't test that the specified values actually work. This is
     
    11191124  else
    11201125    AC_MSG_RESULT([$m4_tolower(coin_has_$1) due to COIN_SKIP_PROJECTS])
     1126  fi
     1127
     1128# Possibilities are `yes' or `skipping'. Normalise to `yes' or `no'.
     1129
     1130  if test "$m4_tolower(coin_has_$1)" != yes ; then
     1131    m4_tolower(coin_has_$1)=no
    11211132  fi
    11221133
  • trunk/run_autotools

    r3780 r3811  
    190190  AUTOTOOLS_DIR=/usr
    191191fi
    192 if ! ( expr "$PATH" : '.*:'"${AUTOTOOLS_DIR}"'/bin:.*' &>/dev/null ||
    193        expr "$PATH" : "${AUTOTOOLS_DIR}"'/bin:.*' &>/dev/null ||
    194        expr "$PATH" : '.*:'"${AUTOTOOLS_DIR}"'/bin' &>/dev/null ) ; then
     192if ! expr ":${PATH}:" : '.*:'"${AUTOTOOLS_DIR}"'/bin:.*' &>/dev/null ; then
    195193  export PATH=$AUTOTOOLS_DIR/bin:$PATH
    196194fi
     
    421419echo "Running autotools in ${dirs[*]}"
    422420
    423 m4Files="$AUTOTOOLS_DIR/share/aclocal/libtool.m4"
     421# m4Files="$AUTOTOOLS_DIR/share/aclocal/libtool.m4"
    424422buildtoolsLinks=
    425423
     
    487485# Get on with running the autotools.
    488486
    489     echo "  creating acinclude.m4 in $dir"
    490     cat $m4Files $toolsDir/coin.m4 > acinclude.m4
    491     cat $toolsDir/coin_fortran.m4 >> acinclude.m4
    492     cat $toolsDir/coin_math.m4 >> acinclude.m4
     487    m4Dirs="-I $AUTOTOOLS_DIR/share/aclocal"
     488    m4Dirs="$m4Dirs -I $toolsDir"
     489    if test -d m4 ; then
     490      m4Dirs="$m4Dirs -I m4"
     491    fi
    493492    echo "  running aclocal in $dir"
    494     if test -d m4; then
    495       aclocal -I m4 || exit 1
    496     else
    497       aclocal || exit 1
    498     fi
     493    aclocal $m4Dirs
    499494    if grep AC_CONFIG_HEADER configure.ac >/dev/null 2>&1; then
    500495      echo "  running autoheader in $dir"
Note: See TracChangeset for help on using the changeset viewer.