COIN-OR::LEMON - Graph Library

source: lemon-project-template-glpk/deps/glpk/configure.ac @ 9:33de93886c88

subpack-glpk
Last change on this file since 9:33de93886c88 was 9:33de93886c88, checked in by Alpar Juttner <alpar@…>, 13 years ago

Import GLPK 4.47

File size: 3.5 KB
RevLine 
[9]1dnl Process this file with autoconf to produce a configure script
2
3AC_INIT([GLPK], [4.47], [bug-glpk@gnu.org])
4
5AC_CONFIG_SRCDIR([src/glpk.h])
6
7AC_CONFIG_MACRO_DIR([m4])
8
9AM_INIT_AUTOMAKE
10
11AC_CONFIG_HEADERS([config.h])
12
13AC_ARG_WITH(gmp,
14AC_HELP_STRING([--with-gmp],
15   [use GNU MP bignum library [[default=no]]]),
16   [case $withval in
17      yes | no) ;;
18      *) AC_MSG_ERROR([invalid value `$withval' for --with-gmp]);;
19      esac],
20   [with_gmp=no])
21
22AC_ARG_ENABLE(dl,
23AC_HELP_STRING([--enable-dl],
24   [enable shared library support [[default=no]]]),
25   [case $enableval in
26      yes | ltdl | dlfcn | no) ;;
27      *) AC_MSG_ERROR([invalid value `$enableval' for --enable-dl]);;
28      esac],
29   [enable_dl=no])
30
31AC_ARG_ENABLE(odbc,
32AC_HELP_STRING([--enable-odbc],
33   [enable MathProg ODBC support [[default=no]]]),
34   [case $enableval in
35      yes | unix | no) ;;
36      *) AC_MSG_ERROR([invalid value `$enableval' for --enable-odbc]);;
37      esac],
38   [enable_odbc=no])
39
40AC_ARG_ENABLE(mysql,
41AC_HELP_STRING([--enable-mysql],
42   [enable MathProg MySQL support [[default=no]]]),
43   [case $enableval in
44      yes | no) ;;
45      *) AC_MSG_ERROR([invalid value `$enableval' for --enable-mysql]);;
46      esac],
47   [enable_mysql=no])
48
49dnl Disable unnecessary libtool tests
50define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])
51define([AC_LIBTOOL_LANG_F77_CONFIG], [:])
52define([AC_LIBTOOL_LANG_GCJ_CONFIG], [:])
53
54dnl Check for programs
55AC_PROG_CC
56AC_PROG_INSTALL
57AC_PROG_LIBTOOL
58
59dnl Check for math library
60AC_CHECK_LIB([m], [exp])
61
62dnl Check for <sys/time.h> header
63AC_CHECK_HEADER([sys/time.h],
64   AC_DEFINE([HAVE_SYS_TIME_H], [1], [N/A]))
65
66dnl Check for gettimeofday function
67AC_CHECK_FUNC([gettimeofday],
68   AC_DEFINE([HAVE_GETTIMEOFDAY], [1], [N/A]))
69
70AC_MSG_CHECKING([whether to use GNU MP bignum library])
71if test "$with_gmp" = "yes"; then
72   AC_MSG_RESULT([yes])
73   AC_DEFINE([HAVE_GMP], [1], [N/A])
74   LIBS="-lgmp $LIBS"
75else
76   AC_MSG_RESULT([no])
77fi
78
79AC_MSG_CHECKING([whether to enable shared library support])
80if test "$enable_dl" = "yes"; then
81   AC_MSG_RESULT([ltdl])
82   AC_DEFINE([HAVE_LTDL], [1], [N/A])
83   LIBS="-lltdl $LIBS"
84elif test "$enable_dl" = "ltdl"; then
85   AC_MSG_RESULT([ltdl])
86   AC_DEFINE([HAVE_LTDL], [1], [N/A])
87   LIBS="-lltdl $LIBS"
88elif test "$enable_dl" = "dlfcn"; then
89   AC_MSG_RESULT([dlfcn])
90   AC_DEFINE([HAVE_DLFCN], [1], [N/A])
91else
92   AC_MSG_RESULT([no])
93fi
94
95case $host_os in
96   darwin* | macosx*)
97      LIBIODBC="libiodbc.dylib"
98      LIBODBC="libodbc.dylib"
99      LIBMYSQL="libmysqlclient.dylib"
100      ;;
101   *)
102      LIBIODBC="libiodbc.so"
103      LIBODBC="libodbc.so"
104      LIBMYSQL="libmysqlclient.so"
105      ;;
106esac
107
108AC_MSG_CHECKING([whether to enable MathProg ODBC support])
109if test "$enable_odbc" = "yes"; then
110   if test "$enable_dl" = "no"; then
111      AC_MSG_ERROR([--enable-odbc requires --enable-dl])
112   fi
113   AC_MSG_RESULT([yes])
114   AC_DEFINE_UNQUOTED([ODBC_DLNAME], ["$LIBIODBC"], [N/A])
115elif test "$enable_odbc" = "unix"; then
116   if test "$enable_dl" = "no"; then
117      AC_MSG_ERROR([--enable-odbc requires --enable-dl])
118   fi
119   AC_MSG_RESULT([unix])
120   AC_DEFINE_UNQUOTED([ODBC_DLNAME], ["$LIBODBC"], [N/A])
121else
122   AC_MSG_RESULT([no])
123fi
124
125AC_MSG_CHECKING([whether to enable MathProg MySQL support])
126if test "$enable_mysql" = "yes"; then
127   if test "$enable_dl" = "no"; then
128      AC_MSG_ERROR([--enable-mysql requires --enable-dl])
129   fi
130   AC_MSG_RESULT([yes])
131   CPPFLAGS="-I/usr/include/mysql $CPPFLAGS"
132   AC_DEFINE_UNQUOTED([MYSQL_DLNAME], ["$LIBMYSQL"], [N/A])
133else
134   AC_MSG_RESULT([no])
135fi
136
137AC_CONFIG_FILES(
138   [src/Makefile examples/Makefile Makefile])
139AC_OUTPUT
140
141dnl eof
Note: See TracBrowser for help on using the repository browser.