source: ThirdParty/ASL/trunk/configure.ac @ 49

Last change on this file since 49 was 49, checked in by andreasw, 14 years ago

added Blas and Lapack ThirdParty? configuration and makefiles

  • Property svn:eol-style set to native
  • Property svn:keywords set to "Author Date Id Revision"
File size: 3.9 KB
Line 
1# Copyright (C) 2006 International Business Machines.
2# All Rights Reserved.
3# This file is distributed under the Common Public License.
4
5## $Id: configure.ac 49 2006-06-14 02:28:06Z andreasw $
6
7# Author:  Andreas Waechter            IBM    2006-04-13
8
9#############################################################################
10#                       Names and other basic things                        #
11#############################################################################
12
13AC_PREREQ(2.59)
14
15AC_INIT([ThirdPartyASL],[0.0],[http://projects.coin-or.org/BuildTools/newticket])
16
17AC_COPYRIGHT([
18Copyright 2006 International Business Machines and others.
19All Rights Reserved.
20This file is part of the open source package Coin which is distributed
21under the Common Public License.])
22
23# List one file in the package so that the configure script can test
24# whether the package is actually there
25AC_CONFIG_SRCDIR(solvers/asl.h)
26
27# Where should everything be installed by default?  Here, we want it
28# to be installed directly in 'bin', 'lib', 'include' subdirectories
29# of the directory where configure is run.  The default would be
30# /usr/local.
31AC_PREFIX_DEFAULT([`pwd`])
32
33#############################################################################
34#                         Standard build tool stuff                         #
35#############################################################################
36
37# Get the system type
38AC_CANONICAL_BUILD
39
40# Check if user wants to produce debugging code
41AC_COIN_DEBUG_COMPILE
42
43# We need egrep and ln -s somewhere
44AC_PROG_EGREP
45AC_PROG_LN_S
46
47# Get the name of the C compiler and appropriate compiler options
48AC_COIN_PROG_CC
49
50# Initialize automake
51AC_COIN_INIT_AUTOMAKE
52
53#############################################################################
54#                          AMPL SOLVER LIBRARY                              #
55#############################################################################
56
57if test -z "$ASLMAKEFLAGS" ; then
58  asladdcflags=
59  case $build in
60    *-linux*)
61      asladdcflags="-DNON_STDIO"
62      case $CC in
63        pgcc* | */pgcc*)
64          asladdcflags="$asladdcflags -DNO_fpu_control";;
65      esac
66      ;;
67    *-cygwin*) # ToDo: If on Cygwin but not using -mno-cygwin, we should not define -DNo_Control87 -DNO_RUSAGE
68      asladdcflags="-DNON_STDIO -DNo_Control87 -DNO_RUSAGE"
69      ;;
70    *-mingw32)
71      asladdcflags="-DNON_STDIO -DNo_Control87 -DNO_RUSAGE"
72      ;;
73  esac
74# Do the following for now to make sure we are not interupting compilation
75# of ASL because of warning message:
76  bla=
77  for i in $CFLAGS; do
78    if test "$i" != "-Werror"; then
79      bla="$bla $i"
80    fi
81  done
82  ASLMAKEFLAGS="CFLAGS=\"$bla $asladdcflags\""
83
84#   Somehow, -qtune=auto makes ASL segfault on AIX compiler, so take them out
85  case $CC in
86    xlc* | */xlc* | mpxlc* | */mpxlc*)
87      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'`
88      ;;
89    pgcc* | */pgcc*)
90      ASLMAKEFLAGS=`echo $ASLMAKEFLAGS | sed 's/-fast/-O1/g'`
91      ;;
92  esac
93
94  AC_MSG_CHECKING([whether $am_make is the GNU make])
95  rm -rf conftest.mak
96  ($am_make -v -f conftest.mak > conftest.grp) 2>&5
97  if $EGREP GNU conftest.grp >&5 ; then
98    AC_MSG_RESULT([yes])
99    ASLMAKEFLAGS="-j 1 $ASLMAKEFLAGS"
100  else
101    AC_MSG_RESULT([no])
102  fi
103  rm -f conftest.mak conftest.grp
104fi
105
106if test x"$AR" = x; then
107  AR=ar
108fi
109
110ASLMAKEFILECMDS="sed -e 's%ar \$\$(ARFLAGS)%$AR \$\$(ARFLAGS)%' makefile.u | sed -e 's%ar ruv%$AR ruv%' "
111if test "$EXEEXT" = ".exe"; then
112  ASLMAKEFILECMDS="$ASLMAKEFILECMDS | sed 's/a.out/a.exe/'"
113fi
114case $build in
115  *-cygwin*)
116    ASLMAKEFILECMDS="$ASLMAKEFILECMDS | sed 's%s/System_details/\`uname -sr\`/%s|System_details|\`uname -sr\`|%'" ;;
117esac
118ASLMAKEFILECMDS="$ASLMAKEFILECMDS > makefile"
119
120AC_ARG_VAR(ASLMAKEFLAGS,[Compilation flags necessary for compiling the AMPL solver library])
121AC_SUBST(ASLMAKEFILECMDS)
122
123AC_CONFIG_FILES([Makefile])
124
125AC_COIN_FINALIZE
Note: See TracBrowser for help on using the repository browser.