Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagesmc
Path: blob/master/build/pkgs/gsl/patches/cygwin.patch
8820 views
1
diff -druN src.orig/configure.ac src/configure.ac
2
--- src.orig/configure.ac 2011-05-04 23:09:27.000000000 +0200
3
+++ src/configure.ac 2013-02-12 19:58:27.138570268 +0100
4
@@ -147,13 +147,19 @@
5
6
dnl Checks for typedefs, structures, and compiler characteristics.
7
8
-case "$host_os" in
9
- *mingw*)
10
- MINGW=true
11
- ;;
12
+case $host in
13
+ *-*-cygwin* | *-*-mingw* )
14
+ if test "$enable_shared" = yes; then
15
+ GSLCBLAS_LDFLAGS="$GSLCBLAS_LDFLAGS -no-undefined"
16
+ GSL_LDFLAGS="$GSL_LDFLAGS -no-undefined"
17
+ GSL_LIBADD="cblas/libgslcblas.la"
18
+ fi
19
+ ;;
20
esac
21
22
-AM_CONDITIONAL(MINGW32_HOST, test "$MINGW" = "true")
23
+AC_SUBST(GSLCBLAS_LDFLAGS)
24
+AC_SUBST(GSL_LDFLAGS)
25
+AC_SUBST(GSL_LIBADD)
26
27
dnl Checks for library functions.
28
29
--- src.orig/configure 2011-05-04 23:10:35.000000000 +0200
30
+++ src/configure 2013-02-12 19:58:27.146570192 +0100
31
@@ -630,8 +630,9 @@
32
HAVE_GNUM68K_IEEE_INTERFACE
33
HAVE_GNUSPARC_IEEE_INTERFACE
34
LIBOBJS
35
-MINGW32_HOST_FALSE
36
-MINGW32_HOST_TRUE
37
+GSL_LIBADD
38
+GSL_LDFLAGS
39
+GSLCBLAS_LDFLAGS
40
GSL_LIBM
41
GSL_LIBS
42
GSL_CFLAGS
43
@@ -11840,19 +11841,18 @@
44
45
46
47
-case "$host_os" in
48
- *mingw*)
49
- MINGW=true
50
- ;;
51
+case $host in
52
+ *-*-cygwin* | *-*-mingw* )
53
+ if test "$enable_shared" = yes; then
54
+ GSLCBLAS_LDFLAGS="$GSLCBLAS_LDFLAGS -no-undefined"
55
+ GSL_LDFLAGS="$GSL_LDFLAGS -no-undefined"
56
+ GSL_LIBADD="cblas/libgslcblas.la"
57
+ fi
58
+ ;;
59
esac
60
61
- if test "$MINGW" = "true"; then
62
- MINGW32_HOST_TRUE=
63
- MINGW32_HOST_FALSE='#'
64
-else
65
- MINGW32_HOST_TRUE='#'
66
- MINGW32_HOST_FALSE=
67
-fi
68
+
69
+
70
71
72
73
@@ -12775,10 +12775,6 @@
74
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
75
Usually this means the macro was only invoked conditionally." "$LINENO" 5
76
fi
77
-if test -z "${MINGW32_HOST_TRUE}" && test -z "${MINGW32_HOST_FALSE}"; then
78
- as_fn_error $? "conditional \"MINGW32_HOST\" was never defined.
79
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
80
-fi
81
82
: "${CONFIG_STATUS=./config.status}"
83
ac_write_fail=0
84
diff -druN src.orig/Makefile.am src/Makefile.am
85
--- src.orig/Makefile.am 2011-04-14 17:13:48.000000000 +0200
86
+++ src/Makefile.am 2013-02-12 19:58:27.146570192 +0100
87
@@ -19,16 +19,10 @@
88
89
lib_LTLIBRARIES = libgsl.la
90
libgsl_la_SOURCES = version.c
91
-libgsl_la_LIBADD = $(SUBLIBS)
92
-libgsl_la_LDFLAGS = -version-info $(GSL_LT_VERSION)
93
+libgsl_la_LIBADD = $(GSL_LIBADD) $(SUBLIBS)
94
+libgsl_la_LDFLAGS = $(GSL_LDFLAGS) -version-info $(GSL_LT_VERSION)
95
noinst_HEADERS = templates_on.h templates_off.h build.h
96
97
-MINGW32_HOST = @MINGW32_HOST@
98
-if MINGW32_HOST
99
-libgsl_la_LIBADD += cblas/libgslcblas.la
100
-libgsl_la_LDFLAGS += -no-undefined
101
-endif
102
-
103
m4datadir = $(datadir)/aclocal
104
m4data_DATA = gsl.m4
105
106
diff -druN src.orig/Makefile.in src/Makefile.in
107
--- src.orig/Makefile.in 2011-05-04 23:10:41.000000000 +0200
108
+++ src/Makefile.in 2013-02-12 19:58:27.150570154 +0100
109
@@ -40,8 +40,6 @@
110
POST_UNINSTALL = :
111
build_triplet = @build@
112
host_triplet = @host@
113
-@MINGW32_HOST_TRUE@am__append_1 = cblas/libgslcblas.la
114
-@MINGW32_HOST_TRUE@am__append_2 = -no-undefined
115
bin_PROGRAMS = gsl-randist$(EXEEXT) gsl-histogram$(EXEEXT)
116
subdir = .
117
DIST_COMMON = README $(am__configure_deps) $(noinst_HEADERS) \
118
@@ -86,7 +84,8 @@
119
"$(DESTDIR)$(bindir)" "$(DESTDIR)$(m4datadir)" \
120
"$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgincludedir)"
121
LTLIBRARIES = $(lib_LTLIBRARIES)
122
-libgsl_la_DEPENDENCIES = $(SUBLIBS) $(am__append_1)
123
+am__DEPENDENCIES_1 =
124
+libgsl_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(SUBLIBS)
125
am_libgsl_la_OBJECTS = version.lo
126
libgsl_la_OBJECTS = $(am_libgsl_la_OBJECTS)
127
libgsl_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
128
@@ -197,7 +196,10 @@
129
EXEEXT = @EXEEXT@
130
FGREP = @FGREP@
131
GREP = @GREP@
132
+GSLCBLAS_LDFLAGS = @GSLCBLAS_LDFLAGS@
133
GSL_CFLAGS = @GSL_CFLAGS@
134
+GSL_LDFLAGS = @GSL_LDFLAGS@
135
+GSL_LIBADD = @GSL_LIBADD@
136
GSL_LIBM = @GSL_LIBM@
137
GSL_LIBS = @GSL_LIBS@
138
GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@
139
@@ -340,10 +342,9 @@
140
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
141
lib_LTLIBRARIES = libgsl.la
142
libgsl_la_SOURCES = version.c
143
-libgsl_la_LIBADD = $(SUBLIBS) $(am__append_1)
144
-libgsl_la_LDFLAGS = -version-info $(GSL_LT_VERSION) $(am__append_2)
145
+libgsl_la_LIBADD = $(GSL_LIBADD) $(SUBLIBS)
146
+libgsl_la_LDFLAGS = $(GSL_LDFLAGS) -version-info $(GSL_LT_VERSION)
147
noinst_HEADERS = templates_on.h templates_off.h build.h
148
-MINGW32_HOST = @MINGW32_HOST@
149
m4datadir = $(datadir)/aclocal
150
m4data_DATA = gsl.m4
151
gsl_randist_SOURCES = gsl-randist.c
152
diff -druN src.orig/cblas/Makefile.am src/cblas/Makefile.am
153
--- src.orig/cblas/Makefile.am 2010-12-26 18:57:08.000000000 +0100
154
+++ src/cblas/Makefile.am 2013-02-12 19:58:27.150570154 +0100
155
@@ -1,10 +1,5 @@
156
lib_LTLIBRARIES = libgslcblas.la
157
-libgslcblas_la_LDFLAGS = -version-info $(GSL_LT_CBLAS_VERSION)
158
-
159
-MINGW32_HOST = @MINGW32_HOST@
160
-if MINGW32_HOST
161
-libgslcblas_la_LDFLAGS += -no-undefined
162
-endif
163
+libgslcblas_la_LDFLAGS = $(GSLCBLAS_LDFLAGS) -version-info $(GSL_LT_CBLAS_VERSION)
164
165
pkginclude_HEADERS = gsl_cblas.h
166
167
diff -druN src.orig/cblas/Makefile.in src/cblas/Makefile.in
168
--- src.orig/cblas/Makefile.in 2011-05-04 23:10:36.000000000 +0200
169
+++ src/cblas/Makefile.in 2013-02-12 19:58:27.150570154 +0100
170
@@ -35,7 +35,6 @@
171
POST_UNINSTALL = :
172
build_triplet = @build@
173
host_triplet = @host@
174
-@MINGW32_HOST_TRUE@am__append_1 = -no-undefined
175
check_PROGRAMS = test$(EXEEXT)
176
subdir = cblas
177
DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \
178
@@ -163,7 +162,10 @@
179
EXEEXT = @EXEEXT@
180
FGREP = @FGREP@
181
GREP = @GREP@
182
+GSLCBLAS_LDFLAGS = @GSLCBLAS_LDFLAGS@
183
GSL_CFLAGS = @GSL_CFLAGS@
184
+GSL_LDFLAGS = @GSL_LDFLAGS@
185
+GSL_LIBADD = @GSL_LIBADD@
186
GSL_LIBM = @GSL_LIBM@
187
GSL_LIBS = @GSL_LIBS@
188
GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@
189
@@ -278,9 +280,7 @@
190
top_builddir = @top_builddir@
191
top_srcdir = @top_srcdir@
192
lib_LTLIBRARIES = libgslcblas.la
193
-libgslcblas_la_LDFLAGS = -version-info $(GSL_LT_CBLAS_VERSION) \
194
- $(am__append_1)
195
-MINGW32_HOST = @MINGW32_HOST@
196
+libgslcblas_la_LDFLAGS = $(GSLCBLAS_LDFLAGS) -version-info $(GSL_LT_CBLAS_VERSION)
197
pkginclude_HEADERS = gsl_cblas.h
198
INCLUDES = -I$(top_srcdir)
199
libgslcblas_la_SOURCES = sasum.c saxpy.c scasum.c scnrm2.c scopy.c \
200
diff -druN src.orig/configure src/configure
201
202