diff -druN src.orig/configure.ac src/configure.ac
--- src.orig/configure.ac 2011-05-04 23:09:27.000000000 +0200
+++ src/configure.ac 2013-02-12 19:58:27.138570268 +0100
@@ -147,13 +147,19 @@
dnl Checks for typedefs, structures, and compiler characteristics.
-case "$host_os" in
- *mingw*)
- MINGW=true
- ;;
+case $host in
+ *-*-cygwin* | *-*-mingw* )
+ if test "$enable_shared" = yes; then
+ GSLCBLAS_LDFLAGS="$GSLCBLAS_LDFLAGS -no-undefined"
+ GSL_LDFLAGS="$GSL_LDFLAGS -no-undefined"
+ GSL_LIBADD="cblas/libgslcblas.la"
+ fi
+ ;;
esac
-AM_CONDITIONAL(MINGW32_HOST, test "$MINGW" = "true")
+AC_SUBST(GSLCBLAS_LDFLAGS)
+AC_SUBST(GSL_LDFLAGS)
+AC_SUBST(GSL_LIBADD)
dnl Checks for library functions.
--- src.orig/configure 2011-05-04 23:10:35.000000000 +0200
+++ src/configure 2013-02-12 19:58:27.146570192 +0100
@@ -630,8 +630,9 @@
HAVE_GNUM68K_IEEE_INTERFACE
HAVE_GNUSPARC_IEEE_INTERFACE
LIBOBJS
-MINGW32_HOST_FALSE
-MINGW32_HOST_TRUE
+GSL_LIBADD
+GSL_LDFLAGS
+GSLCBLAS_LDFLAGS
GSL_LIBM
GSL_LIBS
GSL_CFLAGS
@@ -11840,19 +11841,18 @@
-case "$host_os" in
- *mingw*)
- MINGW=true
- ;;
+case $host in
+ *-*-cygwin* | *-*-mingw* )
+ if test "$enable_shared" = yes; then
+ GSLCBLAS_LDFLAGS="$GSLCBLAS_LDFLAGS -no-undefined"
+ GSL_LDFLAGS="$GSL_LDFLAGS -no-undefined"
+ GSL_LIBADD="cblas/libgslcblas.la"
+ fi
+ ;;
esac
- if test "$MINGW" = "true"; then
- MINGW32_HOST_TRUE=
- MINGW32_HOST_FALSE='#'
-else
- MINGW32_HOST_TRUE='#'
- MINGW32_HOST_FALSE=
-fi
+
+
@@ -12775,10 +12775,6 @@
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${MINGW32_HOST_TRUE}" && test -z "${MINGW32_HOST_FALSE}"; then
- as_fn_error $? "conditional \"MINGW32_HOST\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
diff -druN src.orig/Makefile.am src/Makefile.am
--- src.orig/Makefile.am 2011-04-14 17:13:48.000000000 +0200
+++ src/Makefile.am 2013-02-12 19:58:27.146570192 +0100
@@ -19,16 +19,10 @@
lib_LTLIBRARIES = libgsl.la
libgsl_la_SOURCES = version.c
-libgsl_la_LIBADD = $(SUBLIBS)
-libgsl_la_LDFLAGS = -version-info $(GSL_LT_VERSION)
+libgsl_la_LIBADD = $(GSL_LIBADD) $(SUBLIBS)
+libgsl_la_LDFLAGS = $(GSL_LDFLAGS) -version-info $(GSL_LT_VERSION)
noinst_HEADERS = templates_on.h templates_off.h build.h
-MINGW32_HOST = @MINGW32_HOST@
-if MINGW32_HOST
-libgsl_la_LIBADD += cblas/libgslcblas.la
-libgsl_la_LDFLAGS += -no-undefined
-endif
-
m4datadir = $(datadir)/aclocal
m4data_DATA = gsl.m4
diff -druN src.orig/Makefile.in src/Makefile.in
--- src.orig/Makefile.in 2011-05-04 23:10:41.000000000 +0200
+++ src/Makefile.in 2013-02-12 19:58:27.150570154 +0100
@@ -40,8 +40,6 @@
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-@MINGW32_HOST_TRUE@am__append_1 = cblas/libgslcblas.la
-@MINGW32_HOST_TRUE@am__append_2 = -no-undefined
bin_PROGRAMS = gsl-randist$(EXEEXT) gsl-histogram$(EXEEXT)
subdir = .
DIST_COMMON = README $(am__configure_deps) $(noinst_HEADERS) \
@@ -86,7 +84,8 @@
"$(DESTDIR)$(bindir)" "$(DESTDIR)$(m4datadir)" \
"$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgincludedir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
-libgsl_la_DEPENDENCIES = $(SUBLIBS) $(am__append_1)
+am__DEPENDENCIES_1 =
+libgsl_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(SUBLIBS)
am_libgsl_la_OBJECTS = version.lo
libgsl_la_OBJECTS = $(am_libgsl_la_OBJECTS)
libgsl_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
@@ -197,7 +196,10 @@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+GSLCBLAS_LDFLAGS = @GSLCBLAS_LDFLAGS@
GSL_CFLAGS = @GSL_CFLAGS@
+GSL_LDFLAGS = @GSL_LDFLAGS@
+GSL_LIBADD = @GSL_LIBADD@
GSL_LIBM = @GSL_LIBM@
GSL_LIBS = @GSL_LIBS@
GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@
@@ -340,10 +342,9 @@
EXTRA_DIST = autogen.sh gsl-config.in gsl.pc.in configure.ac THANKS BUGS gsl.spec.in gsl.m4 test_gsl_histogram.sh pkgconfig.test
lib_LTLIBRARIES = libgsl.la
libgsl_la_SOURCES = version.c
-libgsl_la_LIBADD = $(SUBLIBS) $(am__append_1)
-libgsl_la_LDFLAGS = -version-info $(GSL_LT_VERSION) $(am__append_2)
+libgsl_la_LIBADD = $(GSL_LIBADD) $(SUBLIBS)
+libgsl_la_LDFLAGS = $(GSL_LDFLAGS) -version-info $(GSL_LT_VERSION)
noinst_HEADERS = templates_on.h templates_off.h build.h
-MINGW32_HOST = @MINGW32_HOST@
m4datadir = $(datadir)/aclocal
m4data_DATA = gsl.m4
gsl_randist_SOURCES = gsl-randist.c
diff -druN src.orig/cblas/Makefile.am src/cblas/Makefile.am
--- src.orig/cblas/Makefile.am 2010-12-26 18:57:08.000000000 +0100
+++ src/cblas/Makefile.am 2013-02-12 19:58:27.150570154 +0100
@@ -1,10 +1,5 @@
lib_LTLIBRARIES = libgslcblas.la
-libgslcblas_la_LDFLAGS = -version-info $(GSL_LT_CBLAS_VERSION)
-
-MINGW32_HOST = @MINGW32_HOST@
-if MINGW32_HOST
-libgslcblas_la_LDFLAGS += -no-undefined
-endif
+libgslcblas_la_LDFLAGS = $(GSLCBLAS_LDFLAGS) -version-info $(GSL_LT_CBLAS_VERSION)
pkginclude_HEADERS = gsl_cblas.h
diff -druN src.orig/cblas/Makefile.in src/cblas/Makefile.in
--- src.orig/cblas/Makefile.in 2011-05-04 23:10:36.000000000 +0200
+++ src/cblas/Makefile.in 2013-02-12 19:58:27.150570154 +0100
@@ -35,7 +35,6 @@
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-@MINGW32_HOST_TRUE@am__append_1 = -no-undefined
check_PROGRAMS = test$(EXEEXT)
subdir = cblas
DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \
@@ -163,7 +162,10 @@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+GSLCBLAS_LDFLAGS = @GSLCBLAS_LDFLAGS@
GSL_CFLAGS = @GSL_CFLAGS@
+GSL_LDFLAGS = @GSL_LDFLAGS@
+GSL_LIBADD = @GSL_LIBADD@
GSL_LIBM = @GSL_LIBM@
GSL_LIBS = @GSL_LIBS@
GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@
@@ -278,9 +280,7 @@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
lib_LTLIBRARIES = libgslcblas.la
-libgslcblas_la_LDFLAGS = -version-info $(GSL_LT_CBLAS_VERSION) \
- $(am__append_1)
-MINGW32_HOST = @MINGW32_HOST@
+libgslcblas_la_LDFLAGS = $(GSLCBLAS_LDFLAGS) -version-info $(GSL_LT_CBLAS_VERSION)
pkginclude_HEADERS = gsl_cblas.h
INCLUDES = -I$(top_srcdir)
libgslcblas_la_SOURCES = sasum.c saxpy.c scasum.c scnrm2.c scopy.c \
diff -druN src.orig/configure src/configure