1 |
bicatali 09/02/26 17:22:47 |
2 |
|
3 |
Added: scamp-1.4.6-autotools.patch |
4 |
Log: |
5 |
Initial import to the main tree from the sci overlay. Also included autotools from scamp svn public repository for better dependencies |
6 |
(Portage version: 2.2_rc23/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 sci-astronomy/scamp/files/scamp-1.4.6-autotools.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-astronomy/scamp/files/scamp-1.4.6-autotools.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-astronomy/scamp/files/scamp-1.4.6-autotools.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: scamp-1.4.6-autotools.patch |
15 |
=================================================================== |
16 |
diff -Nur scamp-1.4.6.orig/acx_atlas.m4 scamp-1.4.6/acx_atlas.m4 |
17 |
--- scamp-1.4.6.orig/acx_atlas.m4 2009-02-26 16:50:10.382847729 +0000 |
18 |
+++ scamp-1.4.6/acx_atlas.m4 2009-02-26 16:51:08.414884885 +0000 |
19 |
@@ -194,6 +194,7 @@ |
20 |
[$ATLAS_LIBPATH -lcblas -latlas -lm]) |
21 |
if test x$acx_atlas_ok = xyes; then |
22 |
ATLAS_LIB="$ATLAS_LIBPATH -llapack -lptcblas -lcblas -latlas" |
23 |
+ LIBS="$OLIBS" |
24 |
AC_SUBST(ATLAS_LIB) |
25 |
AC_DEFINE(HAVE_ATLAS_MP,1, |
26 |
[Define if you have the parallel ATLAS libraries.]) |
27 |
@@ -205,6 +206,7 @@ |
28 |
fi |
29 |
else |
30 |
ATLAS_LIB="$ATLAS_LIBPATH -llapack -lcblas -latlas" |
31 |
+ LIBS="$OLIBS" |
32 |
AC_SUBST(ATLAS_LIB) |
33 |
$4 |
34 |
fi |
35 |
diff -Nur scamp-1.4.6.orig/acx_fftw.m4 scamp-1.4.6/acx_fftw.m4 |
36 |
--- scamp-1.4.6.orig/acx_fftw.m4 2009-02-26 16:50:10.382847729 +0000 |
37 |
+++ scamp-1.4.6/acx_fftw.m4 2009-02-26 16:51:08.414884885 +0000 |
38 |
@@ -89,7 +89,7 @@ |
39 |
if test x$acx_fftw_ok = xyes && test x$3 = xyes; then |
40 |
if test x$4 = xyes; then |
41 |
AC_CHECK_LIB(fftw3f_threads, fftwf_init_threads, |
42 |
- [acx_fftw_ok=yes], [acx_fftw_ok=no], [-lfftw3f -lm]) |
43 |
+ [acx_fftw_ok=yes], [acx_fftw_ok=no], [-lfftw3f -lm -lpthread]) |
44 |
if test x$acx_fftw_ok = xyes; then |
45 |
AC_DEFINE(HAVE_FFTWFT,1, |
46 |
[Define if you have the FFTW single precision multithreaded libraries and header files.]) |
47 |
@@ -99,7 +99,7 @@ |
48 |
fi |
49 |
else |
50 |
AC_CHECK_LIB(fftw3_threads, fftw_init_threads, |
51 |
- [acx_fftw_ok=yes], [acx_fftw_ok=no], [-lfftw3 -lm]) |
52 |
+ [acx_fftw_ok=yes], [acx_fftw_ok=no], [-lfftw3 -lm -lpthread]) |
53 |
if test x$acx_fftw_ok = xyes; then |
54 |
AC_DEFINE(HAVE_FFTWT,1, |
55 |
[Define if you have the FFTW double precision multithreaded libraries and header files.]) |
56 |
@@ -115,7 +115,7 @@ |
57 |
dnl ------------------------- |
58 |
if test x$4 = xyes; then |
59 |
AC_CHECK_LIB(fftw3f, fftwf_execute, [acx_fftw_ok=yes], |
60 |
- [acx_fftw_ok=no], [-lm]) |
61 |
+ [acx_fftw_ok=no], [-L$1 -lm]) |
62 |
if test x$acx_fftw_ok = xyes; then |
63 |
AC_DEFINE(HAVE_FFTWF,1, |
64 |
[Define if you have the FFTW single precision libraries and header files.]) |
65 |
@@ -125,7 +125,7 @@ |
66 |
fi |
67 |
else |
68 |
AC_CHECK_LIB(fftw3, fftw_execute, [acx_fftw_ok=yes], |
69 |
- [acx_fftw_ok=no], [-lm]) |
70 |
+ [acx_fftw_ok=no], [-L$1 -lm]) |
71 |
if test x$acx_fftw_ok = xyes; then |
72 |
AC_DEFINE(HAVE_FFTW,1, |
73 |
[Define if you have the FFTW double precision libraries and header files.]) |
74 |
@@ -136,8 +136,8 @@ |
75 |
fi |
76 |
if test x$acx_fftw_ok = xyes && test x$3 = xyes; then |
77 |
if test x$4 = xyes; then |
78 |
- AC_CHECK_LIB(fftw3f_threads, fftwf_init_threads, |
79 |
- [acx_fftw_ok=yes], [acx_fftw_ok=no], [-lfftw3f -lm]) |
80 |
+ AC_CHECK_LIB(fftw3f_threads, fftwf_init_threads, [acx_fftw_ok=yes], |
81 |
+ [acx_fftw_ok=no], [-L$1 -lfftw3f -lm -lpthread]) |
82 |
if test x$acx_fftw_ok = xyes; then |
83 |
AC_DEFINE(HAVE_FFTWFT,1, |
84 |
[Define if you have the FFTW single precision multithreaded libraries and header files.]) |
85 |
@@ -146,8 +146,8 @@ |
86 |
FFTW_ERROR="FFTW single precision library in $1 was compiled without multithreading support!" |
87 |
fi |
88 |
else |
89 |
- AC_CHECK_LIB(fftw3_threads, fftw_init_threads, |
90 |
- [acx_fftw_ok=yes], [acx_fftw_ok=no], [-lfftw3 -lm]) |
91 |
+ AC_CHECK_LIB(fftw3_threads, fftw_init_threads, [acx_fftw_ok=yes], |
92 |
+ [acx_fftw_ok=no], [-L$1 -lfftw3 -lm -lpthread]) |
93 |
if test x$acx_fftw_ok = xyes; then |
94 |
AC_DEFINE(HAVE_FFTWT,1, |
95 |
[Define if you have the FFTW double precision multithreaded libraries and header files.]) |
96 |
diff -Nur scamp-1.4.6.orig/acx_plplot.m4 scamp-1.4.6/acx_plplot.m4 |
97 |
--- scamp-1.4.6.orig/acx_plplot.m4 2009-02-26 16:50:10.382847729 +0000 |
98 |
+++ scamp-1.4.6/acx_plplot.m4 2009-02-26 16:51:08.414884885 +0000 |
99 |
@@ -1,4 +1,5 @@ |
100 |
-dnl @synopsis ACX_PLPLOT([PLPLOT_DIR,[ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]]) |
101 |
+dnl @synopsis ACX_PLPLOT([PLPLOT_LIBDIR, PLPLOT_INCDIR, |
102 |
+dnl [ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]]) |
103 |
dnl This macro figures out if the PlPlot library and header files |
104 |
dnl are installed. |
105 |
dnl You may wish to use these variables in your default LIBS and CFLAGS: |
106 |
@@ -16,28 +17,71 @@ |
107 |
AC_DEFUN([ACX_PLPLOT], [ |
108 |
AC_REQUIRE([AC_CANONICAL_HOST]) |
109 |
|
110 |
-AC_CHECK_PROG(acx_plplot_ok, plplot-config, [yes], [no]) |
111 |
-plpath=`plplot-config --prefix` |
112 |
-if test x$acx_plplot_ok = xyes; then |
113 |
-AC_CHECK_HEADER([${plpath}/include/plplot/plplot.h],[acx_plplot_ok=yes]) |
114 |
+PLPLOT_LIBS="" |
115 |
+OLIBS="$LIBS" |
116 |
+LIBS="" |
117 |
+ |
118 |
+acx_plplot_ok=yes |
119 |
+acx_plplotpkg_ok=no |
120 |
+if test x$2 = x && test x$1 = x; then |
121 |
+ AC_MSG_CHECKING([for PLPlot pkg-config info]) |
122 |
+ if pkg-config --exists plplotd; then |
123 |
+ AC_MSG_RESULT([yes]) |
124 |
+ [PLPLOT_CFLAGS=`pkg-config --cflags plplotd`] |
125 |
+ [PLPLOT_LIBS=`pkg-config --libs plplotd`] |
126 |
+ AC_DEFINE(PLPLOT_H, "plplot.h", [PLPlot header filename.]) |
127 |
+ AC_DEFINE(PLPLOTP_H, "plplotP.h", [PLPlot private header filename.]) |
128 |
+ acx_plplotpkg_ok=yes |
129 |
+ else |
130 |
+ AC_MSG_RESULT([no]) |
131 |
fi |
132 |
-if test x$acx_plplot_ok = xyes; then |
133 |
- [PLPLOT_CFLAGS=`plplot-config --cflags`] |
134 |
- [PLPLOT_DIR="${plpath}"] |
135 |
- [PLPLOT_LIBPATH="-L${plpath}/lib"] |
136 |
+fi |
137 |
+if test x$acx_plplotpkg_ok = xno; then |
138 |
+ if test x$2 = x; then |
139 |
+ AC_CHECK_HEADER(plplot.h, [acx_plplothead_ok=yes], [acx_plplothead_ok=no]) |
140 |
+ if test x$acx_plplothead_ok = xyes; then |
141 |
+ AC_DEFINE(PLPLOT_H, "plplot.h", [PLPlot header filename.]) |
142 |
+ AC_DEFINE(PLPLOTP_H, "plplotP.h", [PLPlot private header filename.]) |
143 |
+ else |
144 |
+ AC_CHECK_HEADER(plplot/plplot.h, |
145 |
+ [acx_plplothead_ok=yes], [acx_plplothead_ok=no]) |
146 |
+ if test x$acx_plplothead_ok = xyes; then |
147 |
+ AC_DEFINE(PLPLOT_H, "plplot/plplot.h", [PLPlot header filename.]) |
148 |
+ AC_DEFINE(PLPLOTP_H, "plplot/plplotP.h", |
149 |
+ [PLPlot private header filename.]) |
150 |
+ else |
151 |
+ acx_plplot_ok=no |
152 |
+ fi |
153 |
+ fi |
154 |
+ else |
155 |
+ AC_CHECK_HEADER($2/plplot.h, |
156 |
+ [acx_plplothead_ok=yes], [acx_plplothead_ok=no]) |
157 |
+ if test x$acx_plplothead_ok = xyes; then |
158 |
+ AC_DEFINE(PLPLOT_H, "plplot.h", [PLPlot header filename.]) |
159 |
+ AC_DEFINE(PLPLOTP_H, "plplotP.h", [PLPlot private header filename.]) |
160 |
+ [PLPLOT_CFLAGS="-I$2"] |
161 |
+ else |
162 |
+ acx_plplot_ok=no |
163 |
+ fi |
164 |
+ fi |
165 |
+ if test x$1 = x; then |
166 |
+ AC_CHECK_LIB(plplotd, c_plinit,, [acx_plplot_ok=no]) |
167 |
[PLPLOT_LIBS="-lplplotd"] |
168 |
+ else |
169 |
+ AC_CHECK_LIB(plplotd, c_plinit,, [acx_plplot_ok=no], [-L$1]) |
170 |
+ [PLPLOT_LIBS="-L$1 -lplplotd"] |
171 |
+ fi |
172 |
fi |
173 |
|
174 |
-AC_SUBST(PLPLOT_LIBS) |
175 |
+LIBS="$OLIBS" |
176 |
+if test x$acx_plplot_ok = xyes; then |
177 |
AC_SUBST(PLPLOT_CFLAGS) |
178 |
- |
179 |
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: |
180 |
-if test x"$acx_plplot_ok" = xyes; then |
181 |
+ AC_SUBST(PLPLOT_LIBS) |
182 |
AC_DEFINE(HAVE_PLPLOT,1, |
183 |
[Define if you have the PLPlot libraries and header files.]) |
184 |
- $2 |
185 |
-else |
186 |
$3 |
187 |
+else |
188 |
+ $4 |
189 |
fi |
190 |
|
191 |
])dnl ACX_PLPLOT |
192 |
diff -Nur scamp-1.4.6.orig/configure.ac scamp-1.4.6/configure.ac |
193 |
--- scamp-1.4.6.orig/configure.ac 2009-02-26 16:50:10.382847729 +0000 |
194 |
+++ scamp-1.4.6/configure.ac 2009-02-26 16:51:08.310883768 +0000 |
195 |
@@ -53,15 +53,13 @@ |
196 |
# GCC is chosen last because it is likely to yield less optimized code |
197 |
AC_LANG(C) |
198 |
AC_PROG_CC([$cclist]) |
199 |
-# C Compiler: Check that it is ANSI C |
200 |
+# C Compiler: Check that it is ANSI C and POSIX-compliant |
201 |
AM_PROG_CC_STDC |
202 |
-AC_DISABLE_STATIC |
203 |
-AC_PROG_LIBTOOL |
204 |
- |
205 |
-# C Compiler: Check that it is POSIX-compliant |
206 |
AC_ISC_POSIX |
207 |
ACX_PROG_CC_OPTIM |
208 |
+AC_DISABLE_STATIC |
209 |
#AC_DISABLE_SHARED |
210 |
+AC_PROG_LIBTOOL |
211 |
AC_PROG_INSTALL |
212 |
|
213 |
# Checks for libraries. |
214 |
@@ -89,21 +87,11 @@ |
215 |
AC_CHECK_FUNC([isnan], AC_DEFINE_UNQUOTED([HAVE_ISNAN2], 1, |
216 |
[Second isnan check])) |
217 |
|
218 |
-datadir2=$(URBI_RESOLVE_DIR([$datadir])) |
219 |
+# Check support for large files |
220 |
+AC_SYS_LARGEFILE |
221 |
+AC_FUNC_FSEEKO |
222 |
|
223 |
-# Provide a special option for PlPLOT |
224 |
-AC_ARG_WITH(plplot, |
225 |
- [AC_HELP_STRING([--with-plplot@<:@=<PLPlot dir>@:>@], |
226 |
- [Provide an alternative path to the PLPlot library])], |
227 |
- use_plplot="yes" |
228 |
- if "$withval" == "no"; then |
229 |
- use_plplot="no" |
230 |
- fi |
231 |
- if test "$withval" != "yes"; then |
232 |
- plplot_dir=$withval |
233 |
- fi, |
234 |
- use_plplot="yes" |
235 |
- ) |
236 |
+datadir2=$(URBI_RESOLVE_DIR([$datadir])) |
237 |
|
238 |
# Provide special option for debugging |
239 |
AC_MSG_CHECKING([for debugger mode]) |
240 |
@@ -115,6 +103,27 @@ |
241 |
use_debug="no" |
242 |
AC_MSG_RESULT([no])) |
243 |
|
244 |
+# Provide special options for PLPLOT |
245 |
+AC_ARG_WITH(plplot, |
246 |
+ [AC_HELP_STRING([--with-plplot@<:@=<PLPlot library dir>@:>@], |
247 |
+ [Activate PLPlot library (default = yes)])], |
248 |
+ if test "$withval" = "no"; then |
249 |
+ use_plplot="no" |
250 |
+ else |
251 |
+ use_plplot="yes" |
252 |
+ if test "$withval" != "yes"; then |
253 |
+ plplot_dir=$withval |
254 |
+ fi |
255 |
+ fi, |
256 |
+ use_plplot="yes" |
257 |
+ ) |
258 |
+AC_ARG_WITH(plplot-incdir, |
259 |
+ [AC_HELP_STRING([--with-plplot-incdir=<PLPlot include dir>], |
260 |
+ [Provide an alternative path to the PLPlot include directory])], |
261 |
+ plplot_incdir=$withval, |
262 |
+ plplot_incdir="" |
263 |
+ ) |
264 |
+ |
265 |
# Provide special options for ATLAS |
266 |
AC_ARG_WITH(atlas, |
267 |
[AC_HELP_STRING([--with-atlas=<ATLAS library path>], |
268 |
@@ -162,17 +171,19 @@ |
269 |
AC_DEFINE_UNQUOTED([XSL_URL], "$xsl_url",[Default URL of the XSLT filter]) |
270 |
|
271 |
# Set flags for multithreading |
272 |
+n_pthreads=16 |
273 |
AC_ARG_ENABLE(threads, |
274 |
[AC_HELP_STRING([--enable-threads@<:@=<max_number_of_threads>@:>@], |
275 |
- [Enable multhreading (off by default)])], |
276 |
- if test "$enableval" = "yes"; then |
277 |
- n_pthreads=16 |
278 |
+ [Enable multhreading (on with up to $n_pthreads threads by default)])], |
279 |
+ if test "$enableval" = "no"; then |
280 |
+ use_pthreads="no" |
281 |
else |
282 |
+ use_pthreads="yes" |
283 |
+ if test "$enableval" != "yes"; then |
284 |
n_pthreads=$enableval |
285 |
fi |
286 |
- use_pthreads=yes, |
287 |
- n_pthreads=1 |
288 |
- use_pthreads=no |
289 |
+ fi, |
290 |
+ use_pthreads=yes |
291 |
) |
292 |
|
293 |
# Provide special option for profiling |
294 |
@@ -239,34 +250,35 @@ |
295 |
fi |
296 |
|
297 |
################# handle the PLPlot library (graphic plots) ################## |
298 |
+AC_MSG_CHECKING([for PLPlot configure option]) |
299 |
if test "$use_plplot" = "yes"; then |
300 |
- ACX_PLPLOT(,,[use_plplot=no]) |
301 |
- if test "$use_plplot" = "no"; then |
302 |
- AC_MSG_WARN(PLPlot library not found! Plotting deactivated.) |
303 |
- fi |
304 |
-fi |
305 |
- |
306 |
+ AC_MSG_RESULT([yes]) |
307 |
+ ACX_PLPLOT($plplot_dir,$plplot_incdir,,[use_plplot=no]) |
308 |
if test "$use_plplot" = "yes"; then |
309 |
- AC_SUBST(PLPLOT_CFLAGS) |
310 |
[CFLAGS="$CFLAGS $PLPLOT_CFLAGS"] |
311 |
- [LIBS="$PLPLOT_LIBS $PTHREAD_LIBS $LIBS"] |
312 |
+ [LIBS="$PLPLOT_LIBS $LIBS"] |
313 |
+ else |
314 |
+ AC_MSG_WARN(PLPlot library not found/incomplete! Plotting deactivated.) |
315 |
fi |
316 |
-AM_CONDITIONAL(USE_PLPLOT, test $use_plplot = "yes") |
317 |
- |
318 |
-# Special optimization options for the INTEL C compiler |
319 |
-if test $use_icc = "yes" && test $CC = "icc"; then |
320 |
- CFLAGS="$CFLAGS -O3 -axPW -ip -unroll" |
321 |
- LDFLAGS="$LDFLAGS -static-intel" |
322 |
+else |
323 |
+ AC_MSG_RESULT([no]) |
324 |
+ AC_MSG_WARN(Plotting deactivated.) |
325 |
fi |
326 |
+AM_CONDITIONAL(USE_PLPLOT, test $use_plplot = "yes") |
327 |
|
328 |
# Debugging |
329 |
if test "$use_debug" = "yes"; then |
330 |
CFLAGS="-g $CFLAGS" |
331 |
fi |
332 |
|
333 |
-# Profiling |
334 |
-if test "$use_prof" = "yes"; then |
335 |
- CFLAGS="-pg -O3 -Wall $CFLAGS" |
336 |
+# Link with gprof option |
337 |
+if test "$use_gprof" = "yes"; then |
338 |
+ if test "$use_icc" = "yes"; then |
339 |
+ CFLAGS="$CFLAGS -pq" |
340 |
+ else |
341 |
+ CFLAGS="$CFLAGS -pg" |
342 |
+ fi |
343 |
+ use_static="no" |
344 |
fi |
345 |
|
346 |
# Static linking option |