From c4a96215db1f45479639e744b3be5af1ac79edd2 Mon Sep 17 00:00:00 2001 From: Bernardo Innocenti Date: Mon, 31 Dec 2007 07:40:18 +0000 Subject: Allow linking libgsl statically --- diff --git a/configure.in b/configure.in index 8218d91..d73238b 100644 --- a/configure.in +++ b/configure.in @@ -93,10 +93,13 @@ AC_ARG_WITH(png, fi ]) AC_ARG_WITH(gsl, - [ --with-gsl=yes/no enables/disables GSL complex routines],[ + [ --with-gsl=yes/static/no enables/disables GSL complex routines],[ if test x$withval = xyes; then gsl=yes fi + if test x$withval = xstatic; then + gsl=static + fi if test x$withval = xno; then gsl=no fi @@ -438,6 +441,11 @@ if test $sffe = yes; then echo "Complex math parser:" echo "try GSL: $gsl" + if test $gsl = static; then + GSL_LIBS_PRE='-Wl,-Bstatic' + GSL_LIBS_POST='-Wl,-Bdynamic' + gsl=yes + fi if test $gsl = yes; then GSL_LIBS="" AC_PATH_PROG(GSL_CONFIG, gsl-config, no) @@ -448,7 +456,7 @@ if test $sffe = yes; then else AC_MSG_RESULT(yes) echo "using GSL for complex numbers" - GSL_LIBS=`$GSL_CONFIG --libs` + GSL_LIBS="$GSL_LIBS_PRE `$GSL_CONFIG --libs` $GSL_LIBS_POST" GSL_CFLAGS=`$GSL_CONFIG --cflags` CFLAGS="$CFLAGS $GSL_CFLAGS -fomit-frame-pointer -DSFFE_USING -DSFFE_CMPLX_GSL" DRIVERLIBS="$DRIVERLIBS lib/libsffe.a" -- cgit v0.9.1