Ignore:
Timestamp:
Nov 29, 2009 1:27:05 PM (10 years ago)
Author:
stefan
Message:

add .pc files for ASL, HSL, and FilterSQP

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ThirdParty/ASL/branches/BSPsplit/configure.ac

    r1446 r1454  
    5959AC_COIN_INIT_AUTO_TOOLS
    6060
    61 # See what we're actually going to do for ASL. This will define ampllib.
    62 #AC_COIN_HAS_ASL
    63 
    64 # Determine the name of the ASL library
    65 case "$CC" in
    66   cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*)
    67     ampllib=amplsolv.lib ;;
    68   *)
    69     ampllib=amplsolver.a ;;
    70 esac
    71 
    72 
    7361#############################################################################
    7462#                          AMPL SOLVER LIBRARY                              #
    7563#############################################################################
    7664
    77 if test x$skip_further_test != xyes; then
     65# Determine the name of the ASL library
    7866
    79 # Set a substitutable variable with the library name, and determine the
    80 # compilation style.
    81 
    82   AC_SUBST(AMPLSOLVER_A)
    83   AMPLSOLVER_A=$ampllib
    84   case "$CC" in
    85     cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*)
    86       msvc_compile=yes ;;
    87     *)
    88       msvc_compile=no ;;
    89   esac
    90   AC_MSG_NOTICE([Configuring ASL to build $AMPLSOLVER_A.])
     67# Set a substitutable variable with the library name, and determine the compilation style.
     68AC_SUBST(AMPLSOLVER_A)
     69case "$CC" in
     70  cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*)
     71    AMPLSOLVER_A=amplsolv.lib
     72    msvc_compile=yes
     73    ;;
     74  *)
     75    AMPLSOLVER_A=amplsolver.a
     76    msvc_compile=no
     77    ;;
     78esac
     79AC_MSG_NOTICE([Configuring ASL to build $AMPLSOLVER_A.])
    9180
    9281# Determine flags to be passed on the command line to (n)make. The main
     
    9685# No_Control87 seems to be specific to DEC Alpha. Try leaving it undefined.
    9786
    98   if test -z "$ASLMAKEFLAGS" ; then
    99     asladdcflags=
    100     case $build in
    101       *-linux*)
    102         case $CC in
    103           pgcc* | */pgcc* | xlc* | */xlc* | blrts_xlc* | */blrts_xlc*)
    104             asladdcflags="$asladdcflags -DNO_fpu_control";;
    105         esac
    106         ;;
    107     esac
     87if test -z "$ASLMAKEFLAGS" ; then
     88  asladdcflags=
     89  case $build in
     90    *-linux*)
     91      case $CC in
     92        pgcc* | */pgcc* | xlc* | */xlc* | blrts_xlc* | */blrts_xlc*)
     93          asladdcflags="$asladdcflags -DNO_fpu_control";;
     94      esac
     95      ;;
     96  esac
    10897
    10998# Various feature checks. Force the language to be C while we do this to avoid
    11099# issues with C++ (re)declarations.
    111 
    112     AC_LANG_PUSH(C)
     100  AC_LANG_PUSH(C)
    113101
    114102# The critical function for NO_RUSAGE is getrusage(). Use a standard test.
    115103
    116     AC_MSG_CHECKING([for getrusage])
    117     AC_LINK_IFELSE(
    118       [AC_LANG_PROGRAM([[]],[[getrusage()]])],
    119       [AC_MSG_RESULT([yes])],
    120       [asladdcflags="$asladdcflags -DNO_RUSAGE"
    121        AC_MSG_RESULT([no])])
     104  AC_MSG_CHECKING([for getrusage])
     105  AC_LINK_IFELSE(
     106    [AC_LANG_PROGRAM([[]],[[getrusage()]])],
     107    [AC_MSG_RESULT([yes])],
     108    [asladdcflags="$asladdcflags -DNO_RUSAGE"
     109     AC_MSG_RESULT([no])])
    122110
    123111# Check for long long; we need to define NO_LONG_LONG if it's not present.  ASL
     
    128116# system, but it's easy to check.
    129117
    130     AC_CHECK_TYPE([long long],[],
    131       [asladdcflags="$asladdcflags -DNO_LONG_LONG"],[])
     118  AC_CHECK_TYPE([long long],[],
     119    [asladdcflags="$asladdcflags -DNO_LONG_LONG"],[])
    132120
    133121# Back to whatever language we were in.
    134 
    135     AC_LANG_POP(C)
     122  AC_LANG_POP(C)
    136123
    137124# On BlueGene disable dynamic library loading
    138 
    139     if test x"$enable_bg" = xyes; then
    140       asladdcflags="$asladdcflags -DNO_FUNCADD"
    141     fi
     125  if test x"$enable_bg" = xyes; then
     126    asladdcflags="$asladdcflags -DNO_FUNCADD"
     127  fi
    142128
    143129# Groom CFLAGS before we merge it with asladdcflags.
    144130# Remove -Werror if present, to make sure we are not interrupting compilation
    145131# of ASL because of warning messages. The cl equivalent is -WX.
    146 
    147     bla=
    148     if test x$msvc_compile = xyes ; then
    149       warnToErr="-WX"
    150     else
    151       warnToErr="-Werror"
     132  bla=
     133  if test x$msvc_compile = xyes ; then
     134    warnToErr="-WX"
     135  else
     136    warnToErr="-Werror"
     137  fi
     138  for i in $CFLAGS; do
     139    if test "$i" != "$warnToErr"; then
     140      bla="$bla $i"
    152141    fi
    153     for i in $CFLAGS; do
    154       if test "$i" != "$warnToErr"; then
    155         bla="$bla $i"
    156       fi
    157     done
    158     ASLMAKEFLAGS="CFLAGS=\"$bla $asladdcflags\""
     142  done
     143  ASLMAKEFLAGS="CFLAGS=\"$bla $asladdcflags\""
    159144
    160145# Somehow, the flags specified here cause ASL to segfault on the AIX
    161146# compiler, so take them out.
    162 
    163     case $CC in
    164       xlc* | */xlc* | mpxlc* | */mpxlc*)
    165         ASLMAKEFLAGS=`echo $ASLMAKEFLAGS | sed -e 's/-qtune=auto//g' -e 's/-qarch=auto//g' -e 's/-qcache=auto//g' -e 's/-qhot//g' -e sed 's/-O3/-O/g'`
    166         ;;
    167       pgcc* | */pgcc*)
    168         ASLMAKEFLAGS=`echo $ASLMAKEFLAGS | sed -e 's/-fast/-O1/g'`
    169         ;;
    170     esac
     147  case $CC in
     148    xlc* | */xlc* | mpxlc* | */mpxlc*)
     149      ASLMAKEFLAGS=`echo $ASLMAKEFLAGS | sed -e 's/-qtune=auto//g' -e 's/-qarch=auto//g' -e 's/-qcache=auto//g' -e 's/-qhot//g' -e sed 's/-O3/-O/g'`
     150      ;;
     151    pgcc* | */pgcc*)
     152      ASLMAKEFLAGS=`echo $ASLMAKEFLAGS | sed -e 's/-fast/-O1/g'`
     153      ;;
     154  esac
    171155
    172156# Limit GNU make to one thread. But remember that if we're building with
    173157# cl, ultimately we're going to use nmake, which knows nothing of this.
    174 
    175     if test x$msvc_compile = xno ; then
    176       rm -rf conftest.mak
    177       ($am_make -v > conftest.grp) 2>&5
    178       if $EGREP GNU conftest.grp >&5 ; then
    179         ASLMAKEFLAGS="-j 1 $ASLMAKEFLAGS"
    180       fi
    181       rm -f conftest.grp
     158  if test x$msvc_compile = xno ; then
     159    rm -rf conftest.mak
     160    ($am_make -v > conftest.grp) 2>&5
     161    if $EGREP GNU conftest.grp >&5 ; then
     162      ASLMAKEFLAGS="-j 1 $ASLMAKEFLAGS"
    182163    fi
     164    rm -f conftest.grp
    183165  fi
    184 
     166fi
    185167# End if-then to construct ASLMAKEFLAGS. Announce the result.
    186168
    187   AC_MSG_NOTICE([Command line flags for (n)make \"$ASLMAKEFLAGS\".])
    188   AC_ARG_VAR(ASLMAKEFLAGS,
    189         [Compilation flags necessary for compiling the AMPL solver library])
    190 
    191 fi
     169AC_MSG_NOTICE([Command line flags for (n)make \"$ASLMAKEFLAGS\".])
     170AC_ARG_VAR(ASLMAKEFLAGS, [Compilation flags necessary for compiling the AMPL solver library])
    192171
    193172# Set automake conditional and generate the output files.
     
    198177AC_CONFIG_FILES([compile_MS_ASL],[chmod a+x compile_MS_ASL])
    199178AC_CONFIG_FILES([compile_Unix_ASL],[chmod a+x compile_Unix_ASL])
     179AC_CONFIG_FILES([asl.pc asl-uninstalled.pc])
    200180
    201181AC_COIN_FINALIZE
Note: See TracChangeset for help on using the changeset viewer.