# Configure path for the GNU Scientific Library # Christopher R. Gabriel , April 2000 AC_DEFUN([AX_PATH_GSL], [ if test "x${GSL_CONFIG+set}" != xset ; then if test "x$gsl_prefix" != x ; then GSL_CONFIG="$gsl_prefix/bin/gsl-config" fi if test "x$gsl_exec_prefix" != x ; then GSL_CONFIG="$gsl_exec_prefix/bin/gsl-config" fi if test "x$with_gsl" != x ; then GSL_CONFIG="$with_gsl/bin/gsl-config" fi fi AC_PATH_PROG(GSL_CONFIG, gsl-config, no) min_gsl_version=ifelse([$1], ,0.2.5,$1) AC_MSG_CHECKING(for GSL - version >= $min_gsl_version) no_gsl="" if test "$GSL_CONFIG" = "no" ; then no_gsl=yes AC_MSG_RESULT([no]) AC_MSG_WARN([ The gsl-config script installed by GSL could not be found If GSL was installed in PREFIX, make sure PREFIX/bin is in your path, or set the GSL_CONFIG environment variable to the full path to gsl-config. ]) else GSL_CFLAGS=`$GSL_CONFIG --cflags` GSL_LIBS=`$GSL_CONFIG --libs` ac_save_LIBS="$LIBS" LIBS="$GSL_LIBS $LIBS" AC_LINK_IFELSE([AC_LANG_PROGRAM(, [return 0])],,[no_gsl=yes]) LIBS="$ac_save_LIBS" fi if test "x$no_gsl" = xyes ; then AC_MSG_RESULT([no]) AC_MSG_WARN([ The test program failed to compile or link. See the config.log for the exact error that occured. This usually means GSL was incorrectly installed or that you have moved GSL since it was installed. In the latter case, you may want to edit the gsl-config script: $GSL_CONFIG. ]) else ac_gsl_version=`$GSL_CONFIG --version` AX_COMPARE_VERSION([$ac_gsl_version], [ge], [$min_gsl_version],,[no_gsl=yes]) AC_MSG_RESULT([$ac_gsl_version]) if test "x$no_gsl" = xyes ; then AC_MSG_WARN([ gsl-config --version returned $ac_gsl_version, but the minimum version of GSL required is $min_gsl_version. If gsl-config is correct, then it is best to upgrade to the required version. If gsl-config was wrong, set the environment variable GSL_CONFIG to point to the correct copy of gsl-config, and remove the file config.cache before re-running configure. ]) fi fi if test "x$no_gsl" = x ; then ifelse([$2], , :, [$2]) else ifelse([$3], , :, [$3]) fi AC_SUBST(GSL_CFLAGS) AC_SUBST(GSL_LIBS) ]) AU_ALIAS([AM_PATH_GSL], [AX_PATH_GSL])