source: ThirdParty/Mumps/branches/mumps5/configure.ac @ 4007

Last change on this file since 4007 was 4007, checked in by stefan, 2 months ago

add check for dgemmt in blas/lapack and define gemmt_available if possible

  • 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-2009 International Business Machines.
2# All Rights Reserved.
3# This file is distributed under the Eclipse Public License.
4
5# Author:  Andreas Waechter            IBM    2006-04-13
6
7#############################################################################
8#                       Names and other basic things                        #
9#############################################################################
10
11AC_PREREQ(2.59)
12
13AC_INIT([ThirdPartyMumps],[trunk],[https://github.com/coin-or-tools/ThirdParty-Mumps/issues/new],,[https://github.com/coin-or-tools/ThirdParty-Mumps])
14
15AC_COPYRIGHT([
16Copyright 2007-2009 International Business Machines and others.
17All Rights Reserved.
18This file is part of the open source package Coin which is distributed
19under the Eclipse Public License.])
20
21# List one file in the package so that the configure script can test
22# whether the package is actually there
23AC_CONFIG_SRCDIR(MUMPS/src/mumps_common.c)
24
25AC_COIN_INITIALIZE(Mumps)
26
27#############################################################################
28#                         Standard build tool stuff                         #
29#############################################################################
30
31# Get the name of the C compiler and appropriate compiler options
32AC_COIN_PROG_CC
33
34# Get the name of the Fortran compiler and appropriate compiler options
35AC_COIN_PROG_FC
36
37# Initialize libtool
38AC_COIN_PROG_LIBTOOL(no-win32-dll)
39
40# Add FLIBS to MUMPS_LFLAGS, so that they get into the .pc files section for static builds
41MUMPS_LFLAGS="$MUMPS_LFLAGS $FLIBS"
42
43# Figure out name mangling that Fortran objects will have and translate
44# them to what MUMPS wants
45AC_FC_WRAPPERS
46case "$ac_cv_fc_mangling" in
47  "lower case, no underscore, no extra underscore" ) ;;
48  "lower case, underscore, no extra underscore" )    MY_DEFS="-DAdd_" ;;
49  "lower case, no underscore, extra underscore" )    MY_DEFS="-DAdd_" ;;
50  "lower case, underscore, extra underscore" )       MY_DEFS="-DAdd__" ;;
51  "upper case, no underscore, no extra underscore" ) MY_DEFS="-DUPPER" ;;
52  "upper case, no underscore, extra underscore" )    MY_DEFS="-DUPPER" ;;
53  "upper case, underscore, no extra underscore" )    MY_DEFS="-DUPPER" ;;
54  "upper case, underscore, extra underscore" )       MY_DEFS="-DUPPER" ;;
55esac
56
57# Mumps can make use of pthreads
58# check for pthread.h header file and library
59AC_ARG_ENABLE([pthread-mumps],
60  [AC_HELP_STRING([--disable-pthread-mumps],[disable use of pthread library])],
61  [enable_pthread_mumps=$enableval],
62  [enable_pthread_mumps=yes])
63if test $enable_pthread_mumps = yes ; then
64  AC_CHECK_HEADER([pthread.h],[],[enable_pthread_mumps=no])
65fi
66if test $enable_pthread_mumps = yes ; then
67  AC_CHECK_LIB([pthread],[pthread_create],
68    [MUMPS_LFLAGS="$MUMPS_LFLAGS -lpthread"],
69    [enable_pthread_mumps=no])
70fi
71if test $enable_pthread_mumps = no ; then
72  MY_DEFS="$MY_DEFS -DWITHOUT_PTHREAD=1"
73fi
74
75MY_DEFS="$MY_DEFS -DMUMPS_ARITH=MUMPS_ARITH_d"
76AC_SUBST(MY_DEFS)
77
78AC_COIN_CHK_LAPACK(MUMPS)
79
80# If the BLAS library includes the GEMMT level-3 BLAS extension, it is strongly recommend to use it.
81AC_COIN_TRY_LINK([dgemmt],[$lapack_lflags],[$lapack_pcfiles],[MY_FDEFS="$MY_FDEFS -DGEMMT_AVAILABLE"])
82
83AC_COIN_CHK_PKG(Metis,[MUMPS],[coinmetis],[build])
84if test "$coin_has_metis" = yes; then
85  MY_DEFS="$MY_DEFS -Dmetis4"
86  MY_FDEFS="$MY_FDEFS -Dmetis4"
87fi
88
89# Fix Fortran preprocessor flags
90case $FC in
91  *xlf*)
92    fdefs=
93    if test -n "$MY_FDEFS"; then
94      for flag in $MY_FDEFS; do
95        fdefs="$fdefs -WF,$flag"
96      done
97    fi
98    MY_FDEFS="$fdefs"
99    ;;
100esac
101AC_SUBST(MY_FDEFS)
102
103AC_MSG_NOTICE([additional C preprocessor flags: $MY_DEFS])
104AC_MSG_NOTICE([additional Fortran preprocessor flags: $MY_FDEFS])
105
106AC_CONFIG_FILES([Makefile coinmumps.pc])
107
108AC_COIN_FINALIZE_FLAGS([MUMPS])
109AC_COIN_FINALIZE
Note: See TracBrowser for help on using the repository browser.