source: ThirdParty/Mumps/stable/1.1/configure.ac @ 1165

Last change on this file since 1165 was 1165, checked in by stefan, 12 years ago

temporarily committing release candidate to stable

  • Property svn:eol-style set to native
  • Property svn:keywords set to "Author Date Id Revision"
File size: 3.7 KB
Line 
1# Copyright (C) 2007-2008 International Business Machines.
2# All Rights Reserved.
3# This file is distributed under the Common Public License.
4
5## $Id: configure.ac 1165 2008-08-28 09:10:58Z stefan $
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],[1.1.2],[http://projects.coin-or.org/BuildTools/newticket])
16
17AC_COPYRIGHT([
18Copyright 2007-2008 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#turn off warnings and pedantic mode since they could make trouble on some platforms,
43#and we couldn't fix them anyway
44coin_skip_warn_cflags=yes
45coin_skip_warn_fflags=yes
46
47# Check if user wants to produce debugging code
48AC_COIN_DEBUG_COMPILE(Mumps)
49
50# Get the name of the C compiler
51AC_COIN_PROG_CC
52
53# Get the name of the Fortran compiler and appropriate compiler options
54AC_COIN_PROG_F77
55
56# Find out how to call Fortran from C and determine Fortran runtime libraries
57AC_COIN_F77_WRAPPERS
58
59# We need to translate the result from autoconf to what MUMPS wants
60case "$ac_cv_f77_mangling" in
61  "lower case, no underscore, no extra underscore")
62  ;;
63  "lower case, underscore, no extra underscore")
64  MY_DEFS="-DAdd_"
65  ;;
66  "lower case, no underscore, extra underscore")
67  MY_DEFS="-DAdd_"
68  ;;
69  "lower case, underscore, extra underscore")
70  MY_DEFS="-DAdd__"
71  ;;
72  "upper case, no underscore, no extra underscore")
73  MY_DEFS="-DUPPER"
74  ;;
75  "upper case, no underscore, extra underscore")
76  MY_DEFS="-DUPPER"
77  ;;
78  "upper case, underscore, no extra underscore")
79  MY_DEFS="-DUPPER"
80  ;;
81  "upper case, underscore, extra underscore")
82  MY_DEFS="-DUPPER"
83  ;;
84esac
85
86# check for pthread.h header file
87AC_COIN_CHECK_HEADER([pthread.h],,[MY_DEFS="$MY_DEFS -DWITHOUT_PTHREAD=1"])
88
89MY_DEFS="$MY_DEFS -DALLOW_NON_INIT"
90AC_SUBST(MY_DEFS)
91
92# Initialize automake
93AC_COIN_INIT_AUTO_TOOLS
94
95## Check if Mumps is already provided by user
96AC_COIN_HAS_MUMPS
97
98# Verify that we can compile Fortran 90 code
99if test "$use_mumps" = BUILD; then
100  AC_MSG_CHECKING([whether we can compile Fortran 90 code])
101  AC_LANG_PUSH(Fortran 77)
102  AC_COMPILE_IFELSE([        MODULE BLA
103        DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE :: BLUBB
104        END MODULE BLA],[can_f90=yes],[can_f90=no])
105  AC_MSG_RESULT([$can_f90])
106  AC_LANG_POP(Fortran 77)
107  if test $can_f90 = no; then
108    AC_MSG_WARN([Your Fortran compiler can't compile Fortran 90, I will not compile MUMPS])
109    use_mumps=
110  fi
111fi
112
113rm -f $MAKEOKFILE
114if test $coin_has_mumps = yes && test "$use_mumps" != BUILD; then
115  AC_MSG_NOTICE([The Mumps sources don't need to be compiled])
116  MAKEOKFILE=
117else
118  touch $MAKEOKFILE
119fi
120AC_SUBST(MAKEOKFILE)
121AM_CONDITIONAL(SKIPMAKE, test -z "$MAKEOKFILE")
122
123MUMPSDIR=MUMPS
124AC_SUBST(MUMPSDIR)
125
126AC_CONFIG_FILES([Makefile])
127
128AC_COIN_FINALIZE
Note: See TracBrowser for help on using the repository browser.