From e19026d130c384437e9d565505da0b11fb08ca3c Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan.bastani@ens.fr>
Date: Wed, 2 Feb 2011 18:58:36 +0100
Subject: [PATCH] SWZ: remove gsl from build system, to be reintstated if gsl
 remains a requirement in the ms new code

---
 m4/ax_gsl.m4                  | 66 -----------------------------------
 mex/build/matlab/configure.ac |  3 --
 mex/build/octave/configure.ac |  3 --
 3 files changed, 72 deletions(-)
 delete mode 100644 m4/ax_gsl.m4

diff --git a/m4/ax_gsl.m4 b/m4/ax_gsl.m4
deleted file mode 100644
index 314d162d7b..0000000000
--- a/m4/ax_gsl.m4
+++ /dev/null
@@ -1,66 +0,0 @@
-dnl Detect the GSL.
-dnl We don't use the official M4 macro since it relies on the script gsl-config,
-dnl which does not work when cross-compiling.
-dnl
-dnl Copyright (C) 2010 Dynare Team
-dnl
-dnl This file is part of Dynare.
-dnl
-dnl Dynare is free software: you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation, either version 3 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl Dynare is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
-
-AC_DEFUN([AX_GSL],
-[
-AC_ARG_WITH(gsl, AC_HELP_STRING([--with-gsl=DIR], [prefix to GSL installation]),
-            gsl_prefix="$withval", gsl_prefix="")
-
-  has_gsl=yes
-
-  if test "x$gsl_prefix" != "x"; then
-    GSL_CPPFLAGS="-I$withval/include"
-    GSL_LDFLAGS="-L$withval/lib"
-  else
-    GSL_CPPFLAGS=""
-    GSL_LDFLAGS=""
-  fi
-
-  ac_save_CPPFLAGS="$CPPFLAGS"
-  ac_save_LDFLAGS="$LDFLAGS"
-  ac_save_LIBS="$LIBS"
-
-  LIBS=""
-  CPPFLAGS="$CPPFLAGS $GSL_CPPFLAGS"
-  LDFLAGS="$LDFLAGS $GSL_LDFLAGS"
-
-	AC_LANG_PUSH(C)
-  AC_CHECK_HEADER([gsl/gsl_cdf.h], [], [has_gsl=no])
-	AC_LANG_POP(C)
-
-  AC_CHECK_LIB([m], [cos])
-  AC_CHECK_LIB([gslcblas], [cblas_dgemm], [LIBS="-lgslcblas $LIBS"], [has_gsl=no])
-  AC_CHECK_LIB([gsl], [gsl_cdf_ugaussian_P], [LIBS="-lgsl $LIBS"], [has_gsl=no])
-
-  if test "x$has_gsl" = "xyes"; then
-    GSL_LIBS="$LIBS"
-  else
-    GSL_LIBS=""
-  fi
-
-  CPPFLAGS="$ac_save_CPPFLAGS"
-  LDFLAGS="$ac_save_LDFLAGS"
-  LIBS="$ac_save_LIBS"
-
-  AC_SUBST(GSL_CPPFLAGS)
-  AC_SUBST(GSL_LDFLAGS)
-  AC_SUBST(GSL_LIBS)
-])
diff --git a/mex/build/matlab/configure.ac b/mex/build/matlab/configure.ac
index 6f06334fd1..2b370d66ed 100644
--- a/mex/build/matlab/configure.ac
+++ b/mex/build/matlab/configure.ac
@@ -73,9 +73,6 @@ AC_LANG_POP([C++])
 # Check for dlopen(), needed by k_order_perturbation DLL
 AC_CHECK_LIB([dl], [dlopen], [LIBADD_DLOPEN="-ldl"], [])
 AC_SUBST([LIBADD_DLOPEN])
-# Check for GSL, needed by SWZ
-AX_GSL
-AM_CONDITIONAL([HAVE_GSL], [test "x$has_gsl" = "xyes"])
 
 AM_CONDITIONAL([DO_SOMETHING], [test "x$ax_enable_matlab" = "xyes" -a "x$ax_matlab_version_ok" = "xyes" -a "x$ax_mexopts_ok" = "xyes"])
 
diff --git a/mex/build/octave/configure.ac b/mex/build/octave/configure.ac
index 4bf8d328f1..08626e0390 100644
--- a/mex/build/octave/configure.ac
+++ b/mex/build/octave/configure.ac
@@ -56,9 +56,6 @@ AC_LANG_POP([C++])
 # Check for dlopen(), needed by k_order_perturbation DLL
 AC_CHECK_LIB([dl], [dlopen], [LIBADD_DLOPEN="-ldl"], [])
 AC_SUBST([LIBADD_DLOPEN])
-# Check for GSL, needed by SWZ
-AX_GSL
-AM_CONDITIONAL([HAVE_GSL], [test "x$has_gsl" = "xyes"])
 
 # Check for libmatio, needed by estimation DLL (only under Octave, as an alternative to MATLAB's libmat)
 AC_CHECK_HEADER([matio.h])
-- 
GitLab