diff options
author | N.N. <ricardofabbri@users.sourceforge.net> | 2011-11-02 12:31:29 +0000 |
---|---|---|
committer | N.N. <ricardofabbri@users.sourceforge.net> | 2011-11-02 12:31:29 +0000 |
commit | 712d1dfa7164f1c168b68c24157bcb1b3554cd7e (patch) | |
tree | 07f53f692c1efa87a30f851509cfb7ab317b0f7c | |
parent | 92dc481b17b763715dd2de907bf1dd77a659fee3 (diff) |
fixed gsl linking under linux
svn path=/trunk/externals/pdp/; revision=15692
-rw-r--r-- | configure.ac | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index 4165fea..a10b72a 100644 --- a/configure.ac +++ b/configure.ac @@ -184,15 +184,25 @@ fi dnl optional gsl support if test $enable_gsl == yes; then - AC_CHECK_LIB(gslcblas,main) - AC_CHECK_LIB(gsl,main, - PDP_OPTTYPES="$PDP_OPTTYPES pdp_matrix.o" - PDP_MATRIX_BASIC="$PDP_MATRIX_BASIC pdp_mat_mul.o pdp_mat_lu.o pdp_mat_vec.o" - PDP_IMAGE_BASIC="$PDP_IMAGE_BASIC pdp_cheby.o" - PDP_IMAGE_SPECIAL="$PDP_IMAGE_SPECIAL pdp_histo.o" - AC_DEFINE(HAVE_PDP_GSL, 1, gsl support) - LIBS="$LIBS `pkg-config --libs gsl`", - echo " libgsl not found: not building matrix type support") + AC_CHECK_LIB(gslcblas,main) + AC_CHECK_LIB(gsl,main, + PDP_OPTTYPES="$PDP_OPTTYPES pdp_matrix.o" + PDP_MATRIX_BASIC="$PDP_MATRIX_BASIC pdp_mat_mul.o pdp_mat_lu.o pdp_mat_vec.o" + PDP_IMAGE_BASIC="$PDP_IMAGE_BASIC pdp_cheby.o" + PDP_IMAGE_SPECIAL="$PDP_IMAGE_SPECIAL pdp_histo.o" + AC_DEFINE(HAVE_PDP_GSL, 1, gsl support) + PDP_GSL_FOUND=1, + echo " libgsl not found: not building matrix type support") + + if test -n "$PDP_GSL_FOUND"; then + if test $ARCH == Darwin + then + LIBS="$LIBS -lgslcblas -lgsl" + else + dnl if not darwin, assume target is linux + LIBS="$LIBS `pkg-config --libs gsl`" + fi + fi fi |