Changeset 1411 for ThirdParty/Glpk/trunk/configure.ac
- Timestamp:
- Sep 13, 2009 2:24:20 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ThirdParty/Glpk/trunk/configure.ac
r1396 r1411 21 21 # List one file in the package so that the configure script can test 22 22 # whether the package is actually there 23 AC_CONFIG_SRCDIR( glpk/include/glpk.h)23 AC_CONFIG_SRCDIR(Makefile.am) 24 24 25 25 # Where should everything be installed by default? Here, we want it … … 54 54 # COIN_HAS_GLPK # 55 55 ########################################################################### 56 57 AC_COIN_HAS_PROJECT(Glpk)58 56 59 57 # This macro checks for a library containing the GLPK library. It … … 67 65 68 66 ## Check if GLPK is already provided by user 69 #AC_COIN_HAS_GLPK(Glpk)70 71 #rm -f $MAKEOKFILE72 #if test x"$use_thirdpartyglpk" = xbuild ; then73 #touch $MAKEOKFILE67 AC_COIN_HAS_GLPK(Glpk) 68 69 rm -f $MAKEOKFILE 70 if test x"$use_thirdpartyglpk" = xbuild ; then 71 touch $MAKEOKFILE 74 72 AC_MSG_CHECKING([GLPK version]) 75 glpkmajorver=`awk '/define GLP_MAJOR_VERSION/ {print $3}' $srcdir/glpk/include/glpk.h`76 glpkminorver=`awk '/define GLP_MINOR_VERSION/ {print $3}' $srcdir/glpk/include/glpk.h`77 AC_MSG_RESULT([${ glpkmajorver}.${glpkminorver}])78 if test x$ glpkmajorver != x4 || test x$glpkminorver != x39 ; then73 majorver=`awk '/define GLP_MAJOR_VERSION/ {print $3}' ${GLPKINCDIR}/glpk.h` 74 minorver=`awk '/define GLP_MINOR_VERSION/ {print $3}' ${GLPKINCDIR}/glpk.h` 75 AC_MSG_RESULT([${majorver}.${minorver}]) 76 if test x$majorver != x4 || test x$minorver != x39 ; then 79 77 AC_MSG_ERROR(["Incorrect GLPK version. This build system is made for GLPK 4.39. Please update by rerunning get.GLPK"]) 80 78 fi 81 AC_SUBST(glpkmajorver) 82 AC_SUBST(glpkminorver) 83 #else 84 # if test x$coin_has_glpk = xtrue ; then 85 # AC_MSG_NOTICE([The Glpk sources don't need to be compiled]) 86 # else 87 # AC_MSG_WARN([Glpk source is available but will not be built. No valid external library is detected. Are you sure this is what you want?]) 88 # fi 89 # MAKEOKFILE= 90 #fi 91 #AC_SUBST(MAKEOKFILE) 79 else 80 if test x$coin_has_glpk = xtrue ; then 81 AC_MSG_NOTICE([The Glpk sources don't need to be compiled]) 82 else 83 AC_MSG_WARN([Glpk source is available but will not be built. No valid external library is detected. Are you sure this is what you want?]) 84 fi 85 MAKEOKFILE= 86 fi 87 AC_SUBST(MAKEOKFILE) 92 88 93 89 ########################################################################### … … 136 132 137 133 if test "$enable_dl" = "no"; then 138 134 AC_COIN_CHECK_HEADER([ltdl.h],[enable_dl=yes]) 139 135 if test "$enable_dl" = "yes"; then 140 136 #if ltdl.h is there, check also if libltdl is there; if so, set corresponding define for GLPK … … 154 150 155 151 AC_ARG_ENABLE(odbc, 156 157 158 152 AC_HELP_STRING([--enable-odbc],[enable MathProg ODBC support [[default=auto]]]), 153 [case $enableval in 154 yes | unix) 159 155 AC_COIN_CHECK_HEADER([sql.h],,[AC_MSG_ERROR(["need sql.h to enable ODBC support"])]) 160 156 enable_odbc="$enableval" … … 163 159 enable_odbc="no" 164 160 ;; 165 166 167 161 *) 162 AC_MSG_ERROR([invalid value '$enableval' for --enable-odbc]) 163 ;; 168 164 esac], 169 165 [AC_COIN_CHECK_HEADER([sql.h],[enable_odbc=yes],[enable_odbc=no])] 170 166 ) 171 167 172 168 AC_ARG_ENABLE(mysql, 173 174 175 169 AC_HELP_STRING([--enable-mysql],[enable MathProg MySQL support [[default=auto]]]), 170 [case $enableval in 171 yes) 176 172 AC_COIN_CHECK_HEADER([mysql.h mysql/mysql.h],,[AC_MSG_ERROR(["need mysql.h to enable MySQL support"])]) 177 173 enable_mysql="$enableval" … … 180 176 enable_mysql="no" 181 177 ;; 182 183 184 178 *) 179 AC_MSG_ERROR([invalid value '$enableval' for --enable-mysql]) 180 ;; 185 181 esac], 186 182 [AC_COIN_CHECK_HEADER([mysql.h mysql/mysql.h],[enable_mysql=yes],[enable_mysql=no])] 187 183 ) 188 184 189 185 AC_LANG_POP(C) 190 186 191 187 if test "$enable_dl" = "yes" && ( test "$enable_odbc" = "yes" || test "$enable_odbc" = "unix"); then 192 188 AC_MSG_CHECKING([checking name of ODBC library]) … … 271 267 AC_SUBST(GLPKDIR) 272 268 273 AC_CONFIG_FILES([Makefile glpk_addlibs.txt glpk.pc glpk-uninstalled.pc])269 AC_CONFIG_FILES([Makefile glpk_addlibs.txt]) 274 270 AC_CONFIG_HEADER([config_glpk.h]) 275 271
Note: See TracChangeset
for help on using the changeset viewer.