Changeset 2873 for trunk/configure.ac
- Timestamp:
- Nov 13, 2012, 12:15:37 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.ac
r2872 r2873 61 61 silent-rules subdir-objects]) 62 62 63 dnl When fatal error are detected we use macro YAT_MSG_ERROR that 64 dnl collects all error messages and aborts configure [just] before 65 dnl creating output files with this message below plus collected 66 dnl messages from YAT_MSG_ERROR calls. 63 67 YAT_MSG_ERROR_PREPARE([ 64 68 Some pre-requisites were not fulfilled, aborting configure. … … 201 205 AC_MSG_NOTICE([checking for libraries]) 202 206 AC_CHECK_LIBM 207 LIBS="$LIBS $LIBM" 203 208 204 209 # find library implementing BLAS C API, or use gslcblas 205 210 YAT_LIB_CBLAS([YAT_CBLAS_LIB=$CBLAS_LIB], [YAT_CBLAS_LIB=-lgslcblas]) 211 LIBS="$LIBS $YAT_CBLAS_LIB" 206 212 207 213 # GNU Scientific Library, GSL http://www.gnu.org/software/gsl/, checks … … 209 215 gsl_version="1.8" 210 216 AC_SUBST(gsl_version) 211 gsl_ok=yes 212 YAT_CHECK_GSL([$gsl_version],[gsl_ok=yes],[gsl_ok=no]) 217 YAT_CHECK_GSL([$gsl_version],[LIBS="$LIBS -lgsl"],[YAT_MSG_ERROR([dnl 218 GSL $gsl_version (or newer) not found. The GNU Scientific Library 219 (GSL) library cannot be found. Please make sure GSL is 220 installed. Please refer to warnings above for more details]) 221 ]) 213 222 214 223 # Boost http://www.boost.org 215 224 boost_version=1.35 216 225 AC_SUBST(boost_version) 217 AX_BOOST_BASE(["$boost_version"], [boost_ok=yes], [boost_ok=no]) 226 AX_BOOST_BASE(["$boost_version"], [], [YAT_MSG_ERROR([dnl 227 Boost ${boost_version} (or newer) not found. Please install boost, or provide 228 CPPFLAGS=-I/path/to/boost]) 229 ]) 218 230 # skip boost link tests if boost is not wanted (--without-boost) 219 231 AS_IF([test x"$want_boost" = x"yes"],[ … … 223 235 YAT_LD_ADD_FLAG([LDFLAGS], [$BOOST_LDFLAGS]) 224 236 # boost tests above only test compilation, so let's try link in the libs 225 save_LIBS=$LIBS226 237 LIBS="$LIBS $BOOST_THREAD_LIB $BOOST_SYSTEM_LIB" 227 238 AC_MSG_CHECKING([for thread_specific_ptr]) … … 231 242 [AC_MSG_RESULT([yes])], 232 243 [AC_MSG_RESULT([no]) 233 boost_ok=no])234 LIBS=$save_LIBS244 YAT_MSG_ERROR([Boost thread library not found. Please install library boost-thread.]) 245 ]) 235 246 ]) 236 247 … … 377 388 # configure is halted prematurely. 378 389 379 # used to trigger exit before creation of output380 all_reqs_ok="true"381 382 # Non-existing GSL is fatal -- sub-sequent compilation will fail.383 if test "x$gsl_ok" != "xyes" ; then384 all_reqs_ok="false"385 AC_MSG_WARN([386 GSL $gsl_version (or newer) not found. The GNU Scientific Library387 (GSL) library cannot be found. Please make sure GSL is388 installed. Please refer to warnings above for more details])389 fi390 391 if test "x$want_boost" = "xyes"; then392 # Too old Boost is fatal -- sub-sequent compilation will fail.393 AS_IF([test "${boost_ok}" != "yes"],[394 all_reqs_ok="false"395 AC_MSG_WARN([396 Boost ${boost_version} (or newer) not found. Please make sure Boost397 is installed.])398 ], [399 AS_IF([test x$ax_cv_boost_thread = xno], [400 all_reqs_ok="false"401 AC_MSG_WARN([402 Boost thread library not found. Please make sure library boost-thread is403 is installed.])404 ])405 ])406 fi407 408 if (test "$all_reqs_ok" = "false") ; then409 AC_MSG_FAILURE([410 Some pre-requisites were not fulfilled, aborting configure.411 Please consult the 'README' file for more information about what412 is needed to compile yat and refer to above warning messages.413 Needed files were NOT created.])414 fi415 416 390 # Reset flags 417 391 APR_RESTORE_THE_ENVIRONMENT(CPPFLAGS, YAT_) … … 420 394 APR_RESTORE_THE_ENVIRONMENT(LIBS, YAT_) 421 395 422 YAT_PRIMARY_LIBS="-lgsl $BOOST_THREAD_LIB $BOOST_SYSTEM_LIB" 423 YAT_LIBS="$YAT_PRIMARY_LIBS $YAT_CBLAS_LIB $LIBM" 396 # YAT_LIBS minus cblas and math libraries 397 YAT_PRIMARY_LIBS= 398 for lib in $YAT_LIBS; do 399 AS_CASE([$lib], [$YAT_CBLAS_LIB], [], 400 [$LIBM], [], 401 [YAT_PRIMARY_LIBS="$YAT_PRIMARY_LIBS $lib"]) 402 done 424 403 AC_SUBST(YAT_PRIMARY_LIBS) 425 404 AC_SUBST(YAT_LIBS)
Note: See TracChangeset
for help on using the changeset viewer.