source: ThirdParty/Mumps/trunk/configure.ac @ 279

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

assume now that MUMPS source code is in ThirdParty/Mumps?/MUMPS, without version number

  • Property svn:eol-style set to native
  • Property svn:keywords set to "Author Date Id Revision"
File size: 3.3 KB
Line 
1# Copyright (C) 2007 International Business Machines.
2# All Rights Reserved.
3# This file is distributed under the Common Public License.
4
5## $Id: configure.ac 279 2007-03-26 23:47:14Z 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([ThirdPartyMumps],[0.0],[http://projects.coin-or.org/BuildTools/newticket])
16
17AC_COPYRIGHT([
18Copyright 2007 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(MUMPS/src/dmumps_part1.F)
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
33AC_COIN_PROJECTDIR_INIT
34
35#############################################################################
36#                         Standard build tool stuff                         #
37#############################################################################
38
39# Get the system type
40AC_CANONICAL_BUILD
41
42# Check if user wants to produce debugging code
43AC_COIN_DEBUG_COMPILE(Mumps)
44
45# Get the name of the C compiler
46AC_COIN_PROG_CC
47
48# Get the name of the Fortran compiler and appropriate compiler options
49AC_COIN_PROG_F77
50
51# Find out how to call Fortran from C and determine Fortran runtime libraries
52AC_COIN_F77_WRAPPERS
53
54# We need to translate the result from autoconf to what MUMPS wants
55case "$ac_cv_f77_mangling" in
56  "lower case, no underscore, no extra underscore")
57  ;;
58  "lower case, underscore, no extra underscore")
59  MY_DEFS="-DAdd_"
60  ;;
61  "lower case, no underscore, extra underscore")
62  MY_DEFS="-DAdd_"
63  ;;
64  "lower case, underscore, extra underscore")
65  MY_DEFS="-DAdd__"
66  ;;
67  "upper case, no underscore, no extra underscore")
68  MY_DEFS="-DUPPER"
69  ;;
70  "upper case, no underscore, extra underscore")
71  MY_DEFS="-DUPPER"
72  ;;
73  "upper case, underscore, no extra underscore")
74  MY_DEFS="-DUPPER"
75  ;;
76  "upper case, underscore, extra underscore")
77  MY_DEFS="-DUPPER"
78  ;;
79esac
80AC_SUBST(MY_DEFS)
81
82# Initialize automake
83AC_COIN_INIT_AUTO_TOOLS
84
85## Check if Mumps is already provided by user
86AC_COIN_HAS_MUMPS
87
88# Verify that we can compile Fortran 90 code
89if test "$use_mumps" = BUILD; then
90  AC_MSG_CHECKING([whether we can compile Fortran 90 code])
91  AC_LANG_PUSH(Fortran 77)
92  AC_COMPILE_IFELSE([        MODULE BLA
93        DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE :: BLUBB
94        END MODULE BLA],[can_f90=yes],[can_f90=no])
95  AC_MSG_RESULT([$can_f90])
96  AC_LANG_POP(Fortran 77)
97  if test $can_f90 = no; then
98    AC_MSG_WARN([Your Fortran compiler can't compile Fortran 90, I will not compile MUMPS])
99    use_mumps=
100  fi
101fi
102
103rm -f $MAKEOKFILE
104if test $coin_has_mumps = yes && test "$use_mumps" != BUILD; then
105  AC_MSG_NOTICE([The Mumps sources don't need to be compiled])
106  MAKEOKFILE=
107else
108  touch $MAKEOKFILE
109fi
110AC_SUBST(MAKEOKFILE)
111AM_CONDITIONAL(SKIPMAKE, test -z "$MAKEOKFILE")
112
113MUMPSDIR=MUMPS
114AC_SUBST(MUMPSDIR)
115
116AC_CONFIG_FILES([Makefile])
117
118AC_COIN_FINALIZE
Note: See TracBrowser for help on using the repository browser.