1 | # Copyright (C) 2006, 2007 International Business Machines. |
---|
2 | # All Rights Reserved. |
---|
3 | # This file is distributed under the Eclipse Public License. |
---|
4 | |
---|
5 | ## $Id: configure.ac 1961 2010-12-22 15:40:34Z stefan $ |
---|
6 | |
---|
7 | # Author: Andreas Waechter IBM 2006-04-13 |
---|
8 | |
---|
9 | ############################################################################# |
---|
10 | # Names and other basic things # |
---|
11 | ############################################################################# |
---|
12 | |
---|
13 | AC_PREREQ(2.59) |
---|
14 | |
---|
15 | AC_INIT([ThirdPartyLapack],[1.2],[http://projects.coin-or.org/BuildTools/newticket]) |
---|
16 | |
---|
17 | AC_COPYRIGHT([ |
---|
18 | Copyright 2006 International Business Machines and others. |
---|
19 | All Rights Reserved. |
---|
20 | This file is part of the open source package Coin which is distributed |
---|
21 | under the Eclipse Public License.]) |
---|
22 | |
---|
23 | # List one file in the package so that the configure script can test |
---|
24 | # whether the package is actually there |
---|
25 | AC_CONFIG_SRCDIR(LAPACK/SRC/dlarf.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. |
---|
31 | AC_PREFIX_DEFAULT([`pwd`]) |
---|
32 | |
---|
33 | AC_COIN_PROJECTDIR_INIT(Lapack) |
---|
34 | |
---|
35 | ############################################################################# |
---|
36 | # Standard build tool stuff # |
---|
37 | ############################################################################# |
---|
38 | |
---|
39 | # Get the system type |
---|
40 | AC_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 |
---|
44 | coin_skip_warn_fflags=yes |
---|
45 | |
---|
46 | # Check if user wants to produce debugging code |
---|
47 | AC_COIN_DEBUG_COMPILE(Lapack) |
---|
48 | |
---|
49 | # Get the name of the Fortran compiler and appropriate compiler options |
---|
50 | AC_COIN_PROG_F77 |
---|
51 | |
---|
52 | # Get the linker flags (FLIBS) that are required for linking against this blas library |
---|
53 | AC_COIN_F77_WRAPPERS |
---|
54 | |
---|
55 | # Check if pkg-config is available (to setup addlibs file) |
---|
56 | AC_COIN_HAS_PKGCONFIG |
---|
57 | |
---|
58 | # Add FLIBS to LAPACK_PCLIBS, so that they get into the .pc files |
---|
59 | LAPACK_PCLIBS="$FLIBS" |
---|
60 | AC_SUBST(LAPACK_PCLIBS) |
---|
61 | |
---|
62 | # Take care that optimization is disbled for DLAMCH.F |
---|
63 | AC_ARG_VAR(DLAMCH_FFLAGS,[Fortran compiler options for DLAMCH.F]) |
---|
64 | if test "x$DLAMCH_FFLAGS" = x ; then |
---|
65 | #disable optimiziation for dlamch.f by adding -Od or -O0 at end of FFLAGS (hope to overwrite previous -O? option, if present) |
---|
66 | case $F77 in |
---|
67 | ifort* | */ifort* | IFORT* | */IFORT* ) |
---|
68 | case $build in |
---|
69 | *-cygwin* | *-mingw*) |
---|
70 | DLAMCH_FFLAGS="$FFLAGS -Od" |
---|
71 | ;; |
---|
72 | *) |
---|
73 | DLAMCH_FFLAGS="$FFLAGS -O0" |
---|
74 | ;; |
---|
75 | esac |
---|
76 | ;; |
---|
77 | compile_f2c*) |
---|
78 | case "$CC" in |
---|
79 | cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*) |
---|
80 | DLAMCH_FFLAGS="$FFLAGS -Od" |
---|
81 | ;; |
---|
82 | *) |
---|
83 | DLAMCH_FFLAGS="$FFLAGS -O0" |
---|
84 | ;; |
---|
85 | esac |
---|
86 | ;; |
---|
87 | *) |
---|
88 | DLAMCH_FFLAGS="$FFLAGS -O0" |
---|
89 | ;; |
---|
90 | esac |
---|
91 | fi |
---|
92 | AC_SUBST(DLAMCH_FFLAGS) |
---|
93 | |
---|
94 | # Initialize autotools |
---|
95 | AC_COIN_INIT_AUTO_TOOLS |
---|
96 | |
---|
97 | ############################################################################# |
---|
98 | # Create links to the required source files # |
---|
99 | ############################################################################# |
---|
100 | |
---|
101 | lapack_source_files='dbdsqr.f dgebd2.f dgebrd.f dgelq2.f dgelqf.f dgeqr2.f dgeqrf.f dgesvd.f dgesv.f dgetf2.f dgetrf.f dgetrs.f disnan.f dlabrd.f dlacpy.f dlaisnan.f dlae2.f dlaev2.f dlange.f dlanst.f dlansy.f dlapy2.f dlarf.f dlarfb.f dlarfg.f dlarfp.f dlarft.f dlartg.f dlas2.f dlascl.f dlaset.f dlasq1.f dlasq2.f dlasq3.f dlasq4.f dlasq5.f dlasq6.f dlasr.f dlasrt.f dlassq.f dlaswp.f dlatrd.f dlasv2.f dorg2l.f dorg2r.f dorgbr.f dorglq.f dorgl2.f dorgql.f dorgqr.f dorgtr.f dorm2r.f dormbr.f dorml2.f dormlq.f dormqr.f dpotf2.f dpotrf.f dpotrs.f dsteqr.f dsterf.f dsyev.f dsytd2.f dsytrd.f ieeeck.f iladlc.f iladlr.f ilaenv.f iparmq.f' |
---|
102 | for file in $lapack_source_files; do |
---|
103 | AC_CONFIG_LINKS($file:LAPACK/SRC/$file) |
---|
104 | done |
---|
105 | lapack_source_files_in_install='dlamch.f' |
---|
106 | for file_in_install in $lapack_source_files_in_install; do |
---|
107 | AC_CONFIG_LINKS($file_in_install:LAPACK/INSTALL/$file_in_install) |
---|
108 | done |
---|
109 | |
---|
110 | AC_CONFIG_FILES([Makefile coinlapack.pc coinlapack-uninstalled.pc]) |
---|
111 | |
---|
112 | AC_COIN_FINALIZE |
---|