source: ThirdParty/HSL/stable/1.1/configure.ac @ 1345

Last change on this file since 1345 was 1345, checked in by andreasw, 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: 5.3 KB
Line 
1# Copyright (C) 2006 International Business Machines.
2# All Rights Reserved.
3# This file is distributed under the Common Public License.
4
5## $Id: configure.ac 1345 2009-07-16 18:27:39Z 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([ThirdPartyHSL],[1.1.4],
16        [http://projects.coin-or.org/BuildTools/newticket])
17
18AC_COPYRIGHT([
19Copyright 2006 International Business Machines and others.
20All Rights Reserved.
21This file is part of the open source package Coin which is distributed
22under 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# Here we don't know yet which files are actually provided...
27AC_CONFIG_SRCDIR(configure.ac)
28
29# Where should everything be installed by default?  Here, we want it
30# to be installed directly in 'bin', 'lib', 'include' subdirectories
31# of the directory where configure is run.  The default would be
32# /usr/local.
33AC_PREFIX_DEFAULT([`pwd`])
34
35AC_COIN_PROJECTDIR_INIT
36
37#############################################################################
38#                         Standard build tool stuff                         #
39#############################################################################
40
41# Get the system type
42AC_CANONICAL_BUILD
43
44# turn off warnings and pedantic mode since they could make trouble on some platforms,
45# and we couldn't fix them anyway
46coin_skip_warn_fflags=yes
47
48# provide flag to allow compilation of a stand-alone shared library
49AC_ARG_ENABLE([loadable-library],
50[AC_HELP_STRING([--enable-loadable-library],
51                [compile stand-alone shared library for delayed loading])])
52
53# Check if user wants to produce debugging code
54AC_COIN_DEBUG_COMPILE(HSL)
55
56# Get the name of the C compiler (for a dummy program)
57AC_COIN_PROG_CC
58
59# Get the name of the Fortran compiler and appropriate compiler options
60AC_COIN_PROG_F77
61
62# Need egrep later on
63AC_PROG_EGREP
64
65# Initialize autotools
66
67if test x$enable_loadable_library = xyes; then
68  flag=force_shared
69fi
70AC_COIN_INIT_AUTO_TOOLS([$flag])
71
72#############################################################################
73#                    Find out which files are available                     #
74#############################################################################
75
76AC_DEFUN([MY_CHECK_HSLFILE],
77[AC_COIN_CHECK_FILE([$srcdir/$1.f],
78                    [hsl_files="$hsl_files $1.f"
79                     coin_has_$1=yes],
80                    [coin_has_$1=no])
81AM_CONDITIONAL([COIN_HAS_$2],[test $coin_has_$1 = yes])])
82
83MY_CHECK_HSLFILE(ma27ad,MA27)
84if test coin_has_ma27ad = yes; then
85  AC_MSG_CHECKING([whether MA27 is threadsafe])
86  if $EGREP MA27UD $srcdir/ma27ad.f >/dev/null 2>&1; then
87    AC_MSG_RESULT(yes)
88  else
89    AC_MSG_RESULT(no)
90    AC_MSG_ERROR([Please obtain the threadsafe (newer) version of MA27])
91  fi
92fi
93MY_CHECK_HSLFILE(mc19ad,MC19)
94MY_CHECK_HSLFILE(ma57ad,MA57)
95MY_CHECK_HSLFILE(ma28ad,MA28)
96
97if test x$enable_loadable_library = xyes; then
98  case $build in
99    *-cygwin* | *-mingw*)
100      HSL_SHARED_LIB=libhsl.dll
101      F77_SHARED_CMD='$(F77) -shared $(FFLAGS)'
102      case $F77 in
103        compile_f2c*)
104          EXPORT_SYMBOLS=
105          if test $coin_has_ma27ad = yes; then
106            EXPORT_SYMBOLS="$EXPORT_SYMBOLS ma27id_ ma27ad_ ma27bd_ ma27cd_"
107          fi
108          if test $coin_has_ma28ad = yes; then
109            EXPORT_SYMBOLS="$EXPORT_SYMBOLS ma28ad_"
110          fi
111          if test $coin_has_ma57ad = yes; then
112            EXPORT_SYMBOLS="$EXPORT_SYMBOLS ma57id_ ma57ad_ ma57bd_ ma57cd_ ma57ed_"
113          fi
114          if test $coin_has_mc19ad = yes; then
115            EXPORT_SYMBOLS="$EXPORT_SYMBOLS mc19ad_"
116          fi
117          F77_SHARED_CMD='$(F77) -shared $(FFLAGS) -def:$(DEFFILE)'
118          DEFFILE='Export.def'
119          ;;
120        ifort* | IFORT*)
121          EXPORT_SYMBOLS=
122          if test $coin_has_ma27ad = yes; then
123            EXPORT_SYMBOLS="$EXPORT_SYMBOLS MA27ID MA27AD MA27BD MA27CD"
124          fi
125          if test $coin_has_ma28ad = yes; then
126            EXPORT_SYMBOLS="$EXPORT_SYMBOLS MA28AD"
127          fi
128          if test $coin_has_ma57ad = yes; then
129            EXPORT_SYMBOLS="$EXPORT_SYMBOLS MA57ID MA57AD MA57BD MA57CD MA57ED"
130          fi
131          if test $coin_has_mc19ad = yes; then
132            EXPORT_SYMBOLS="$EXPORT_SYMBOLS MC19AD"
133          fi
134          DEFFILE='Export.def'
135          F77_SHARED_CMD='$(F77) $(FFLAGS)'
136          F77_DLL_LINKFLAGS='-link -dll -def:$(DEFFILE)'
137          ;;
138        *)
139          F77_SHARED_CMD='$(F77) -shared $(FFLAGS)'
140          ;;
141      esac
142      ;;
143  esac
144fi
145AC_SUBST(F77_SHARED_CMD)
146AC_SUBST(F77_DLL_LINKFLAGS)
147AC_SUBST(HSL_SHARED_LIB)
148AC_SUBST(EXPORT_SYMBOLS)
149AC_SUBST(DEFFILE)
150AM_CONDITIONAL([INSTALL_LOADABLE_LIBRARY],[test x$flag = xforce_shared])
151AM_CONDITIONAL([NEED_DEFFILE], [test ! x"$DEFFILE" = x])
152
153AM_CONDITIONAL([EXTRA_SHARED_COMMAND],[test ! x"$F77_SHARED_CMD" = x])
154#AM_CONDITIONAL([EXTRA_SHARED_COMMAND],[test "$F77_SHARED_CMD" = x])
155
156#############################################################################
157#                              Write the output                             #
158#############################################################################
159
160AC_CONFIG_FILES([Makefile])
161
162AC_COIN_FINALIZE
Note: See TracBrowser for help on using the repository browser.