lemon-project-template-glpk

diff deps/glpk/configure.ac @ 9:33de93886c88

Import GLPK 4.47
author Alpar Juttner <alpar@cs.elte.hu>
date Sun, 06 Nov 2011 20:59:10 +0100
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/deps/glpk/configure.ac	Sun Nov 06 20:59:10 2011 +0100
     1.3 @@ -0,0 +1,141 @@
     1.4 +dnl Process this file with autoconf to produce a configure script
     1.5 +
     1.6 +AC_INIT([GLPK], [4.47], [bug-glpk@gnu.org])
     1.7 +
     1.8 +AC_CONFIG_SRCDIR([src/glpk.h])
     1.9 +
    1.10 +AC_CONFIG_MACRO_DIR([m4])
    1.11 +
    1.12 +AM_INIT_AUTOMAKE
    1.13 +
    1.14 +AC_CONFIG_HEADERS([config.h])
    1.15 +
    1.16 +AC_ARG_WITH(gmp,
    1.17 +AC_HELP_STRING([--with-gmp],
    1.18 +   [use GNU MP bignum library [[default=no]]]),
    1.19 +   [case $withval in
    1.20 +      yes | no) ;;
    1.21 +      *) AC_MSG_ERROR([invalid value `$withval' for --with-gmp]);;
    1.22 +      esac],
    1.23 +   [with_gmp=no])
    1.24 +
    1.25 +AC_ARG_ENABLE(dl,
    1.26 +AC_HELP_STRING([--enable-dl],
    1.27 +   [enable shared library support [[default=no]]]),
    1.28 +   [case $enableval in
    1.29 +      yes | ltdl | dlfcn | no) ;;
    1.30 +      *) AC_MSG_ERROR([invalid value `$enableval' for --enable-dl]);;
    1.31 +      esac],
    1.32 +   [enable_dl=no])
    1.33 +
    1.34 +AC_ARG_ENABLE(odbc,
    1.35 +AC_HELP_STRING([--enable-odbc],
    1.36 +   [enable MathProg ODBC support [[default=no]]]),
    1.37 +   [case $enableval in
    1.38 +      yes | unix | no) ;;
    1.39 +      *) AC_MSG_ERROR([invalid value `$enableval' for --enable-odbc]);;
    1.40 +      esac],
    1.41 +   [enable_odbc=no])
    1.42 +
    1.43 +AC_ARG_ENABLE(mysql,
    1.44 +AC_HELP_STRING([--enable-mysql],
    1.45 +   [enable MathProg MySQL support [[default=no]]]),
    1.46 +   [case $enableval in
    1.47 +      yes | no) ;;
    1.48 +      *) AC_MSG_ERROR([invalid value `$enableval' for --enable-mysql]);;
    1.49 +      esac],
    1.50 +   [enable_mysql=no])
    1.51 +
    1.52 +dnl Disable unnecessary libtool tests
    1.53 +define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])
    1.54 +define([AC_LIBTOOL_LANG_F77_CONFIG], [:])
    1.55 +define([AC_LIBTOOL_LANG_GCJ_CONFIG], [:])
    1.56 +
    1.57 +dnl Check for programs
    1.58 +AC_PROG_CC
    1.59 +AC_PROG_INSTALL
    1.60 +AC_PROG_LIBTOOL
    1.61 +
    1.62 +dnl Check for math library
    1.63 +AC_CHECK_LIB([m], [exp])
    1.64 +
    1.65 +dnl Check for <sys/time.h> header
    1.66 +AC_CHECK_HEADER([sys/time.h],
    1.67 +   AC_DEFINE([HAVE_SYS_TIME_H], [1], [N/A]))
    1.68 +
    1.69 +dnl Check for gettimeofday function
    1.70 +AC_CHECK_FUNC([gettimeofday],
    1.71 +   AC_DEFINE([HAVE_GETTIMEOFDAY], [1], [N/A]))
    1.72 +
    1.73 +AC_MSG_CHECKING([whether to use GNU MP bignum library])
    1.74 +if test "$with_gmp" = "yes"; then
    1.75 +   AC_MSG_RESULT([yes])
    1.76 +   AC_DEFINE([HAVE_GMP], [1], [N/A])
    1.77 +   LIBS="-lgmp $LIBS"
    1.78 +else
    1.79 +   AC_MSG_RESULT([no])
    1.80 +fi
    1.81 +
    1.82 +AC_MSG_CHECKING([whether to enable shared library support])
    1.83 +if test "$enable_dl" = "yes"; then
    1.84 +   AC_MSG_RESULT([ltdl])
    1.85 +   AC_DEFINE([HAVE_LTDL], [1], [N/A])
    1.86 +   LIBS="-lltdl $LIBS"
    1.87 +elif test "$enable_dl" = "ltdl"; then
    1.88 +   AC_MSG_RESULT([ltdl])
    1.89 +   AC_DEFINE([HAVE_LTDL], [1], [N/A])
    1.90 +   LIBS="-lltdl $LIBS"
    1.91 +elif test "$enable_dl" = "dlfcn"; then
    1.92 +   AC_MSG_RESULT([dlfcn])
    1.93 +   AC_DEFINE([HAVE_DLFCN], [1], [N/A])
    1.94 +else
    1.95 +   AC_MSG_RESULT([no])
    1.96 +fi
    1.97 +
    1.98 +case $host_os in
    1.99 +   darwin* | macosx*)
   1.100 +      LIBIODBC="libiodbc.dylib"
   1.101 +      LIBODBC="libodbc.dylib"
   1.102 +      LIBMYSQL="libmysqlclient.dylib"
   1.103 +      ;;
   1.104 +   *)
   1.105 +      LIBIODBC="libiodbc.so"
   1.106 +      LIBODBC="libodbc.so"
   1.107 +      LIBMYSQL="libmysqlclient.so"
   1.108 +      ;;
   1.109 +esac
   1.110 +
   1.111 +AC_MSG_CHECKING([whether to enable MathProg ODBC support])
   1.112 +if test "$enable_odbc" = "yes"; then
   1.113 +   if test "$enable_dl" = "no"; then
   1.114 +      AC_MSG_ERROR([--enable-odbc requires --enable-dl])
   1.115 +   fi
   1.116 +   AC_MSG_RESULT([yes])
   1.117 +   AC_DEFINE_UNQUOTED([ODBC_DLNAME], ["$LIBIODBC"], [N/A])
   1.118 +elif test "$enable_odbc" = "unix"; then
   1.119 +   if test "$enable_dl" = "no"; then
   1.120 +      AC_MSG_ERROR([--enable-odbc requires --enable-dl])
   1.121 +   fi
   1.122 +   AC_MSG_RESULT([unix])
   1.123 +   AC_DEFINE_UNQUOTED([ODBC_DLNAME], ["$LIBODBC"], [N/A])
   1.124 +else
   1.125 +   AC_MSG_RESULT([no])
   1.126 +fi
   1.127 +
   1.128 +AC_MSG_CHECKING([whether to enable MathProg MySQL support])
   1.129 +if test "$enable_mysql" = "yes"; then
   1.130 +   if test "$enable_dl" = "no"; then
   1.131 +      AC_MSG_ERROR([--enable-mysql requires --enable-dl])
   1.132 +   fi
   1.133 +   AC_MSG_RESULT([yes])
   1.134 +   CPPFLAGS="-I/usr/include/mysql $CPPFLAGS"
   1.135 +   AC_DEFINE_UNQUOTED([MYSQL_DLNAME], ["$LIBMYSQL"], [N/A])
   1.136 +else
   1.137 +   AC_MSG_RESULT([no])
   1.138 +fi
   1.139 +
   1.140 +AC_CONFIG_FILES(
   1.141 +   [src/Makefile examples/Makefile Makefile])
   1.142 +AC_OUTPUT
   1.143 +
   1.144 +dnl eof