1 | # Copyright (C) 2006, 2007 International Business Machines. |
---|
2 | # All Rights Reserved. |
---|
3 | # This file is distributed under the Common Public License. |
---|
4 | |
---|
5 | ## $Id: configure.ac 1411 2009-09-13 18:24:20Z 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],[0.0], |
---|
16 | [http://projects.coin-or.org/BuildTools/newticket]) |
---|
17 | |
---|
18 | AC_COPYRIGHT([ |
---|
19 | Copyright 2006 International Business Machines and others. |
---|
20 | All Rights Reserved. |
---|
21 | This file is part of the open source package Coin which is distributed |
---|
22 | under the Common Public License.]) |
---|
23 | |
---|
24 | # List one file in the package so that the configure script can test |
---|
25 | # whether the package is actually there |
---|
26 | AC_CONFIG_SRCDIR(LAPACK/SRC/dlarf.f) |
---|
27 | |
---|
28 | # Where should everything be installed by default? Here, we want it |
---|
29 | # to be installed directly in 'bin', 'lib', 'include' subdirectories |
---|
30 | # of the directory where configure is run. The default would be |
---|
31 | # /usr/local. |
---|
32 | AC_PREFIX_DEFAULT([`pwd`]) |
---|
33 | |
---|
34 | AC_COIN_PROJECTDIR_INIT |
---|
35 | |
---|
36 | ############################################################################# |
---|
37 | # Standard build tool stuff # |
---|
38 | ############################################################################# |
---|
39 | |
---|
40 | # Get the system type |
---|
41 | AC_CANONICAL_BUILD |
---|
42 | |
---|
43 | #turn off warnings and pedantic mode since they could make trouble on some platforms, |
---|
44 | #and we couldn't fix them anyway |
---|
45 | coin_skip_warn_fflags=yes |
---|
46 | |
---|
47 | # Check if user wants to produce debugging code |
---|
48 | AC_COIN_DEBUG_COMPILE(Lapack) |
---|
49 | |
---|
50 | # Get the name of the Fortran compiler and appropriate compiler options |
---|
51 | AC_COIN_PROG_F77 |
---|
52 | |
---|
53 | # Take care that optimization is disbled for DLAMCH.F |
---|
54 | AC_ARG_VAR(DLAMCH_FFLAGS,[Fortran compiler options for DLAMCH.F]) |
---|
55 | if test "x$DLAMCH_FFLAGS" = x ; then |
---|
56 | #disable optimiziation for dlamch.f by adding -Od or -O0 at end of FFLAGS (hope to overwrite previous -O? option, if present) |
---|
57 | case $F77 in |
---|
58 | ifort* | */ifort* | IFORT* | */IFORT* ) |
---|
59 | case $build in |
---|
60 | *-cygwin* | *-mingw*) |
---|
61 | DLAMCH_FFLAGS="$FFLAGS -Od" |
---|
62 | ;; |
---|
63 | *) |
---|
64 | DLAMCH_FFLAGS="$FFLAGS -O0" |
---|
65 | ;; |
---|
66 | esac |
---|
67 | ;; |
---|
68 | compile_f2c*) |
---|
69 | case "$CC" in |
---|
70 | cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*) |
---|
71 | DLAMCH_FFLAGS="$FFLAGS -Od" |
---|
72 | ;; |
---|
73 | *) |
---|
74 | DLAMCH_FFLAGS="$FFLAGS -O0" |
---|
75 | ;; |
---|
76 | esac |
---|
77 | ;; |
---|
78 | *) |
---|
79 | DLAMCH_FFLAGS="$FFLAGS -O0" |
---|
80 | ;; |
---|
81 | esac |
---|
82 | fi |
---|
83 | AC_SUBST(DLAMCH_FFLAGS) |
---|
84 | |
---|
85 | # Initialize autotools |
---|
86 | AC_COIN_INIT_AUTO_TOOLS |
---|
87 | |
---|
88 | # Check if Lapack is already available on the system or provided by user |
---|
89 | #save_LIBS="$LIBS" |
---|
90 | AC_COIN_HAS_BLAS |
---|
91 | #LIBS="$save_LIBS" # we need to make sure that blas libraries are not in LIBS |
---|
92 | |
---|
93 | AC_COIN_HAS_LAPACK |
---|
94 | MAKEOKFILE=.MakeOk |
---|
95 | if test $coin_has_lapack = yes && test "$use_lapack" != BUILD; then |
---|
96 | rm -f $MAKEOKFILE |
---|
97 | AC_MSG_NOTICE([The Lapack sources don't need to be compiled]) |
---|
98 | MAKEOKFILE= |
---|
99 | else |
---|
100 | touch $MAKEOKFILE |
---|
101 | fi |
---|
102 | AC_SUBST(MAKEOKFILE) |
---|
103 | AM_CONDITIONAL(SKIPMAKE, test -z "$MAKEOKFILE") |
---|
104 | |
---|
105 | ############################################################################# |
---|
106 | # Create links to the required source files # |
---|
107 | ############################################################################# |
---|
108 | |
---|
109 | if test x"$MAKEOKFILE" != x; then |
---|
110 | lapack_source_files='dgetf2.f dgetrf.f dgetrs.f dlae2.f dlaev2.f dlanst.f dlansy.f dlapy2.f dlarf.f dlarfb.f dlarfg.f dlarft.f dlartg.f dlascl.f dlaset.f dlasr.f dlasrt.f dlassq.f dlaswp.f dlatrd.f dorg2l.f dorg2r.f dorgql.f dorgqr.f dorgtr.f dpotf2.f dpotrf.f dpotrs.f dsteqr.f dsterf.f dsyev.f dsytd2.f dsytrd.f ieeeck.f ilaenv.f iparmq.f' |
---|
111 | for file in $lapack_source_files; do |
---|
112 | AC_CONFIG_LINKS($file:LAPACK/SRC/$file) |
---|
113 | done |
---|
114 | lapack_source_files_in_install='dlamch.f' |
---|
115 | for file_in_install in $lapack_source_files_in_install; do |
---|
116 | AC_CONFIG_LINKS($file_in_install:LAPACK/INSTALL/$file_in_install) |
---|
117 | done |
---|
118 | fi |
---|
119 | |
---|
120 | AC_CONFIG_FILES([Makefile]) |
---|
121 | |
---|
122 | AC_COIN_FINALIZE |
---|