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

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

First version of ASL ThirtParty? directory

  • Property svn:eol-style set to native
  • Property svn:keywords set to "Author Date Id Revision"
File size: 3.8 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 45 2006-06-13 18:14:16Z 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
42if test "$coin_debug_compile" = true; then
43  AC_DEFINE([IP_DEBUG],[1],
44            [If defined, debug sanity checks are performed in Ipopt during runtime])
45fi
46
47# We need ln -s somewhere
48AC_PROG_LN_S
49
50# Get the name of the C compiler and appropriate compiler options
51AC_COIN_PROG_CC
52
53# Initialize automake
54AC_COIN_INIT_AUTOMAKE
55
56#######################
57# AMPL SOLVER LIBRARY #
58#######################
59
60if test -z "$ASLMAKEFLAGS" ; then
61  asladdcflags=
62  case $build in
63    *-linux*)
64      asladdcflags="-DNON_STDIO"
65      case $CC in
66        pgcc* | */pgcc*)
67          asladdcflags="$asladdcflags -DNO_fpu_control";;
68      esac
69      ;;
70    *-cygwin*) # ToDo: If on Cygwin but not using -mno-cygwin, we should not define -DNo_Control87 -DNO_RUSAGE
71      asladdcflags="-DNON_STDIO -DNo_Control87 -DNO_RUSAGE"
72      ;;
73    *-mingw32)
74      asladdcflags="-DNON_STDIO -DNo_Control87 -DNO_RUSAGE"
75      ;;
76  esac
77# Do the following for now to make sure we are not interupting compilation
78# of ASL because of warning message:
79  bla=
80  for i in $CFLAGS; do
81    if test "$i" != "-Werror"; then
82      bla="$bla $i"
83    fi
84  done
85  ASLMAKEFLAGS="CFLAGS=\"$bla $asladdcflags\""
86
87#   Somehow, -qtune=auto makes ASL segfault on AIX compiler, so take them out
88  case $CC in
89    xlc* | */xlc* | mpxlc* | */mpxlc*)
90      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'`
91      ;;
92    pgcc* | */pgcc*)
93      ASLMAKEFLAGS=`echo $ASLMAKEFLAGS | sed 's/-fast/-O1/g'`
94      ;;
95  esac
96
97  AC_MSG_CHECKING([whether $am_make is the GNU make])
98  rm -rf conftest.mak
99  ($am_make -v -f conftest.mak > conftest.grp) 2>&5
100  if $EGREP GNU conftest.grp >&5 ; then
101    AC_MSG_RESULT([yes])
102    ASLMAKEFLAGS="-j 1 $ASLMAKEFLAGS"
103  else
104    AC_MSG_RESULT([no])
105  fi
106  rm -f conftest.mak conftest.grp
107fi
108
109if test x"$AR" = x; then
110  AR=ar
111fi
112
113ASLMAKEFILECMDS="sed -e 's%ar \$\$(ARFLAGS)%$AR \$\$(ARFLAGS)%' makefile.u | sed -e 's%ar ruv%$AR ruv%' "
114if test "$EXEEXT" = ".exe"; then
115  ASLMAKEFILECMDS="$ASLMAKEFILECMDS | sed 's/a.out/a.exe/'"
116fi
117case $build in
118  *-cygwin*)
119    ASLMAKEFILECMDS="$ASLMAKEFILECMDS | sed 's%s/System_details/\`uname -sr\`/%s|System_details|\`uname -sr\`|%'" ;;
120esac
121ASLMAKEFILECMDS="$ASLMAKEFILECMDS > makefile"
122
123AC_ARG_VAR(ASLMAKEFLAGS,[Compilation flags necessary for compiling the AMPL solver library])
124AC_SUBST(ASLMAKEFILECMDS)
125
126AC_CONFIG_FILES([Makefile])
127
128AC_COIN_FINALIZE
Note: See TracBrowser for help on using the repository browser.