aboutsummaryrefslogtreecommitdiff
blob: 7e12b370b0dc9f554cceeeb22376570369686315 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
 Makefile.am                     |   8 +-
 Makefile.am.porig               |  66 ++++
 ax_cblas.m4                     |  69 +++++
 bspline/Makefile.am             |   2 +-
 bspline/Makefile.am.porig       |  17 ++
 configure.ac                    |  10 +
 configure.ac.porig              | 647 ++++++++++++++++++++++++++++++++++++++++
 eigen/Makefile.am               |   2 +-
 eigen/Makefile.am.porig         |  18 ++
 gsl-config.in                   |   4 +-
 gsl-config.in.porig             |  80 +++++
 gsl.pc.in                       |   2 +-
 gsl.pc.in.porig                 |  11 +
 interpolation/Makefile.am       |   2 +-
 interpolation/Makefile.am.porig |  18 ++
 linalg/Makefile.am              |   2 +-
 linalg/Makefile.am.porig        |  16 +
 multifit/Makefile.am            |   4 +-
 multifit/Makefile.am.porig      |  74 +++++
 multimin/Makefile.am            |   4 +-
 multimin/Makefile.am.porig      |  20 ++
 multiroots/Makefile.am          |   2 +-
 multiroots/Makefile.am.porig    |  19 ++
 ode-initval/Makefile.am         |   2 +-
 ode-initval/Makefile.am.porig   |  18 ++
 poly/Makefile.am                |   2 +-
 poly/Makefile.am.porig          |  17 ++
 specfunc/Makefile.am            |   2 +-
 specfunc/Makefile.am.porig      |  19 ++
 wavelet/Makefile.am             |   2 +-
 wavelet/Makefile.am.porig       |  17 ++
 31 files changed, 1157 insertions(+), 19 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index c522001..4513bc8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,7 +19,7 @@ EXTRA_DIST = autogen.sh gsl-config.in gsl.pc.in configure.ac THANKS BUGS gsl.spe
 
 lib_LTLIBRARIES = libgsl.la
 libgsl_la_SOURCES = version.c
-libgsl_la_LIBADD = $(GSL_LIBADD) $(SUBLIBS)
+libgsl_la_LIBADD = $(GSL_LIBADD) $(SUBLIBS) @CBLAS_LINK_LIBS@
 libgsl_la_LDFLAGS = $(GSL_LDFLAGS) -version-info $(GSL_LT_VERSION)
 noinst_HEADERS = templates_on.h templates_off.h build.h
 
@@ -29,10 +29,10 @@ m4data_DATA = gsl.m4
 bin_PROGRAMS = gsl-randist gsl-histogram
 
 gsl_randist_SOURCES = gsl-randist.c
-gsl_randist_LDADD = libgsl.la cblas/libgslcblas.la
+gsl_randist_LDADD = libgsl.la
 
 gsl_histogram_SOURCES = gsl-histogram.c
-gsl_histogram_LDADD = libgsl.la cblas/libgslcblas.la
+gsl_histogram_LDADD = libgsl.la
 
 check_SCRIPTS = test_gsl_histogram.sh pkgconfig.test
 TESTS = test_gsl_histogram.sh pkgconfig.test
@@ -51,6 +51,8 @@ edit = $(SED) \
 	-e 's|@GSL_CFLAGS[@]|$(GSL_CFLAGS)|g' \
 	-e 's|@GSL_LIBM[@]|$(GSL_LIBM)|g' \
 	-e 's|@GSL_LIBS[@]|$(GSL_LIBS)|g' \
+	-e 's|@CBLAS_CFLAGS[@]|$(CBLAS_CFLAGS)|g' \
+	-e 's|@CBLAS_LIBS[@]|$(CBLAS_LIBS)|g' \
 	-e 's|@LIBS[@]|$(LIBS)|g' \
 	-e 's|@VERSION[@]|$(VERSION)|g'
 
diff --git a/Makefile.am.porig b/Makefile.am.porig
new file mode 100644
index 0000000..c522001
--- /dev/null
+++ b/Makefile.am.porig
@@ -0,0 +1,66 @@
+## Process this file with automake to produce Makefile.in
+
+# AUTOMAKE_OPTIONS = readme-alpha
+
+SUBDIRS = gsl utils sys test err const complex cheb block vector matrix permutation combination multiset sort ieee-utils cblas blas linalg eigen specfunc dht qrng rng randist fft poly fit multifit multifit_nlinear multilarge multilarge_nlinear rstat statistics siman sum integration interpolation histogram ode-initval ode-initval2 roots multiroots min multimin monte ntuple diff deriv cdf wavelet bspline spblas spmatrix splinalg doc
+
+SUBLIBS = block/libgslblock.la blas/libgslblas.la bspline/libgslbspline.la complex/libgslcomplex.la cheb/libgslcheb.la dht/libgsldht.la diff/libgsldiff.la deriv/libgslderiv.la eigen/libgsleigen.la err/libgslerr.la fft/libgslfft.la fit/libgslfit.la histogram/libgslhistogram.la ieee-utils/libgslieeeutils.la integration/libgslintegration.la interpolation/libgslinterpolation.la linalg/libgsllinalg.la matrix/libgslmatrix.la min/libgslmin.la monte/libgslmonte.la multifit/libgslmultifit.la multifit_nlinear/libgslmultifit_nlinear.la multilarge/libgslmultilarge.la multilarge_nlinear/libgslmultilarge_nlinear.la multimin/libgslmultimin.la multiroots/libgslmultiroots.la ntuple/libgslntuple.la ode-initval/libgslodeiv.la ode-initval2/libgslodeiv2.la permutation/libgslpermutation.la combination/libgslcombination.la multiset/libgslmultiset.la poly/libgslpoly.la qrng/libgslqrng.la randist/libgslrandist.la rng/libgslrng.la roots/libgslroots.la siman/libgslsiman.la sort/libgslsort.la specfunc/libgslspecfunc.la rstat/libgslrstat.la statistics/libgslstatistics.la sum/libgslsum.la sys/libgslsys.la test/libgsltest.la utils/libutils.la vector/libgslvector.la cdf/libgslcdf.la wavelet/libgslwavelet.la spmatrix/libgslspmatrix.la spblas/libgslspblas.la splinalg/libgslsplinalg.la
+
+pkginclude_HEADERS = gsl_math.h gsl_pow_int.h gsl_nan.h gsl_machine.h gsl_mode.h gsl_precision.h gsl_types.h gsl_version.h gsl_minmax.h gsl_inline.h
+
+bin_SCRIPTS = gsl-config
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA= gsl.pc
+
+CLEANFILES = gsl.pc gsl-config
+
+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 = $(GSL_LIBADD) $(SUBLIBS)
+libgsl_la_LDFLAGS = $(GSL_LDFLAGS) -version-info $(GSL_LT_VERSION)
+noinst_HEADERS = templates_on.h templates_off.h build.h
+
+m4datadir = $(datadir)/aclocal
+m4data_DATA = gsl.m4
+
+bin_PROGRAMS = gsl-randist gsl-histogram
+
+gsl_randist_SOURCES = gsl-randist.c
+gsl_randist_LDADD = libgsl.la cblas/libgslcblas.la
+
+gsl_histogram_SOURCES = gsl-histogram.c
+gsl_histogram_LDADD = libgsl.la cblas/libgslcblas.la
+
+check_SCRIPTS = test_gsl_histogram.sh pkgconfig.test
+TESTS = test_gsl_histogram.sh pkgconfig.test
+
+#bin_PROGRAMS = main dummy
+#dummy_SOURCES = version.c
+#dummy_LDADD = $(SUBLIBS)
+#main_SOURCES = version.c env.c
+#main_LDADD = libgsl.la
+
+edit = $(SED) \
+	-e 's|@prefix[@]|$(prefix)|g' \
+	-e 's|@exec_prefix[@]|$(exec_prefix)|g' \
+	-e 's|@libdir[@]|$(libdir)|g' \
+	-e 's|@includedir[@]|$(includedir)|g' \
+	-e 's|@GSL_CFLAGS[@]|$(GSL_CFLAGS)|g' \
+	-e 's|@GSL_LIBM[@]|$(GSL_LIBM)|g' \
+	-e 's|@GSL_LIBS[@]|$(GSL_LIBS)|g' \
+	-e 's|@LIBS[@]|$(LIBS)|g' \
+	-e 's|@VERSION[@]|$(VERSION)|g'
+
+gsl-config gsl.pc: Makefile 
+	@rm -f $@ $@.tmp
+	@$(edit) '$(srcdir)/$@.in' >>$@.tmp
+	@chmod a-w $@.tmp
+	@mv $@.tmp $@
+	@echo creating $@
+
+gsl-config: $(srcdir)/gsl-config.in
+gsl.pc: $(srcdir)/gsl.pc.in
+
diff --git a/ax_cblas.m4 b/ax_cblas.m4
new file mode 100644
index 0000000..6ef143a
--- /dev/null
+++ b/ax_cblas.m4
@@ -0,0 +1,69 @@
+AC_DEFUN([AX_CBLAS],[
+
+  ext_cblas=no
+  ext_cblas_libs="-lcblas"
+  ext_cblas_cflags=""
+
+  AC_ARG_WITH(cblas-external,
+	[AS_HELP_STRING([--with-cblas-external], 
+			[Use external CBLAS library (default is no)])],
+	[with_ext_cblas=$withval],
+	[with_ext_cblas=no])
+
+  case $with_ext_cblas in
+	no) ext_cblas=no ;;
+	yes) ext_cblas=yes ;;
+	-* | */* | *.a | *.so | *.so.* | *.o) 
+	   ext_cblas=yes
+	   ext_cblas_libs="$with_cblas" ;;
+	*) ext_cblas=yes
+	   ext_cblas_libs="-l$with_cblas" ;;
+  esac
+
+  AC_ARG_WITH(cblas-external-libs,
+	[AS_HELP_STRING([--with-cblas-external-libs=<libs>],
+			[External cblas libraries to link with (default is "$ext_cblas_libs")])],
+	[ext_cblas_libs=$withval],
+	[])
+
+  AC_ARG_WITH(cblas-external-cflags,
+	[AS_HELP_STRING([--with-cblas-external-cflags=<flags>],
+			[Pre-processing flags to compile with external cblas ("-I<dir>")])],
+	[ext_cblas_cflags=$withval],
+	[])
+
+  if test x$ext_cblas != xno; then
+	if test "x$CBLAS_LIBS" = x; then
+	   CBLAS_LIBS="$ext_cblas_libs"
+     	fi
+     	if test "x$CBLAS_CFLAGS" = x; then
+       	   CBLAS_CFLAGS="$ext_cblas_cflags"
+   	fi
+
+   	CFLAGS_sav="$CFLAGS"
+   	CFLAGS="$CFLAGS $CBLAS_CFLAGS"
+   	AC_CHECK_HEADER(cblas.h, ,
+		[AC_MSG_ERROR([
+	   	*** Header file cblas.h not found.
+	   	*** If you installed cblas header in a non standard place,
+	   	*** specify its install prefix using the following option
+	   	***  --with-cblas-external-cflags="-I<include_dir>"])
+	 	])
+   	CFLAGS="$CFLAGS_sav"
+
+   	LIBS_sav="$LIBS"
+   	LIBS="$LIBS $CBLAS_LIBS -lm"
+   	AC_MSG_CHECKING([for cblas_sgemm in $CBLAS_LIBS])
+   	AC_TRY_LINK_FUNC(cblas_sgemm, [ext_cblas=yes],
+    		[AC_MSG_ERROR([
+	    	*** Linking with cblas with $LIBS failed.
+       	    	*** If you installed cblas library in a non standard place,
+   	    	*** specify its install prefix using the following option
+	    	***  --with-cblas-external-libs="-L<lib_dir> -l<lib>"])
+	 	])
+   	AC_MSG_RESULT($ext_cblas)
+   	LIBS="$LIBS_sav"
+	AC_SUBST([CBLAS_CFLAGS])
+	AC_SUBST([CBLAS_LIBS])
+ fi
+])
diff --git a/bspline/Makefile.am b/bspline/Makefile.am
index 3f4f950..d413036 100644
--- a/bspline/Makefile.am
+++ b/bspline/Makefile.am
@@ -12,6 +12,6 @@ check_PROGRAMS = test
 
 TESTS = $(check_PROGRAMS)
 
-test_LDADD = libgslbspline.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../cblas/libgslcblas.la ../ieee-utils/libgslieeeutils.la  ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../statistics/libgslstatistics.la
+test_LDADD = libgslbspline.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la @CBLAS_LINK_LIBS@ ../ieee-utils/libgslieeeutils.la  ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../statistics/libgslstatistics.la
 
 test_SOURCES = test.c
diff --git a/bspline/Makefile.am.porig b/bspline/Makefile.am.porig
new file mode 100644
index 0000000..3f4f950
--- /dev/null
+++ b/bspline/Makefile.am.porig
@@ -0,0 +1,17 @@
+noinst_LTLIBRARIES = libgslbspline.la 
+
+pkginclude_HEADERS = gsl_bspline.h
+
+AM_CPPFLAGS = -I$(top_srcdir)
+
+libgslbspline_la_SOURCES = bspline.c greville.c
+
+noinst_HEADERS =  bspline.h
+
+check_PROGRAMS = test
+
+TESTS = $(check_PROGRAMS)
+
+test_LDADD = libgslbspline.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../cblas/libgslcblas.la ../ieee-utils/libgslieeeutils.la  ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../statistics/libgslstatistics.la
+
+test_SOURCES = test.c
diff --git a/configure.ac b/configure.ac
index a26fc1e..564d426 100644
--- a/configure.ac
+++ b/configure.ac
@@ -208,6 +208,16 @@ if test "x$LIBS" = "x" ; then
   AC_CHECK_LIB(m, cos)
 fi
 
+sinclude(ax_cblas.m4)
+AX_CBLAS
+if test "x$CBLAS_LIBS" != "x"; then
+   CBLAS_LINK_LIBS="$CBLAS_LIBS"
+else
+   CBLAS_LINK_LIBS="\$(top_builddir)/cblas/libgslcblas.la"
+   CBLAS_LIBS="-lgslcblas"
+fi
+AC_SUBST(CBLAS_LINK_LIBS)
+
 dnl Remember to put a definition in acconfig.h for each of these
 AC_CHECK_DECLS(feenableexcept,,,[#define _GNU_SOURCE 1
 #include <fenv.h>]) 
diff --git a/configure.ac.porig b/configure.ac.porig
new file mode 100644
index 0000000..a26fc1e
--- /dev/null
+++ b/configure.ac.porig
@@ -0,0 +1,647 @@
+dnl Process this file with autoconf to produce a configure script.
+
+AC_INIT([gsl],[2.3])
+AC_CONFIG_SRCDIR(gsl_math.h)
+
+AM_INIT_AUTOMAKE([gnu])
+AC_CONFIG_HEADERS([config.h])
+AM_MAINTAINER_MODE
+
+dnl Library versioning (C:R:A == current:revision:age)
+dnl See the libtool manual for an explanation of the numbers
+dnl
+dnl gsl-1.0    libgsl 0:0:0  libgslcblas 0:0:0
+dnl gsl-1.1    libgsl 1:0:1  libgslcblas 0:0:0
+dnl gsl-1.1.1  libgsl 2:0:2  libgslcblas 0:0:0
+dnl gsl-1.2    libgsl 3:0:3  libgslcblas 0:0:0
+dnl gsl-1.3    libgsl 4:0:4  libgslcblas 0:0:0
+dnl gsl-1.4    libgsl 5:0:5  libgslcblas 0:0:0
+dnl gsl-1.5    libgsl 6:0:6  libgslcblas 0:0:0
+dnl gsl-1.6    libgsl 7:0:7  libgslcblas 0:0:0
+dnl gsl-1.7    libgsl 8:0:8  libgslcblas 0:0:0
+dnl gsl-1.8    libgsl 9:0:9  libgslcblas 0:0:0
+dnl gsl-1.9    libgsl 10:0:10 libgslcblas 0:0:0 
+dnl gsl-1.10   libgsl 10:0:10 (*) libgslcblas 0:0:0 
+dnl gsl-1.11   libgsl 12:0:12  libgslcblas 0:0:0 
+dnl gsl-1.12   libgsl 13:0:13  libgslcblas 0:0:0 
+dnl gsl-1.13   libgsl 14:0:14  libgslcblas 0:0:0 
+dnl gsl-1.14   libgsl 15:0:15  libgslcblas 0:0:0 
+dnl gsl-1.15   libgsl 16:0:16  libgslcblas 0:0:0 
+dnl gsl-1.16   libgsl 17:0:17  libgslcblas 0:0:0 
+dnl gsl-2.0    libgsl 18:0:18  (**) libgslcblas 0:0:0 
+dnl gsl-2.1    libgsl 19:0:0   libgslcblas 0:0:0 
+dnl gsl-2.2    libgsl 20:0:1   libgslcblas 0:0:0 
+dnl gsl-2.2.1  libgsl 21:0:2   libgslcblas 0:0:0 
+dnl gsl-2.3    libgsl 22:0:3   libgslcblas 0:0:0 
+dnl 
+dnl (*) There was an error on this release.  Firstly, the versioning
+dnl numbers were not updated.  Secondly, 2 functions were removed, but
+dnl the age not reset--this should have been 11:0:0.  However these
+dnl functions were not documented and are regarded as internal, so we
+dnl will assume 11:0:11.
+dnl
+dnl (**) There was an error on this release. Age should have been
+dnl reset to 18:0:0
+dnl
+dnl How to update library version number
+dnl ====================================
+dnl 
+dnl C: increment if the interface has additions, changes, removals.
+dnl
+dnl R: increment any time the source changes; set to 0 if you
+dnl incremented CURRENT
+dnl
+dnl A: increment if any interfaces have been added; set to 0 if any
+dnl interfaces have been removed. removal has precedence over adding,
+dnl so set to 0 if both happened.
+dnl
+dnl See https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
+dnl for more detailed info
+
+dnl
+GSL_CURRENT=22
+GSL_REVISION=0
+GSL_AGE=3
+dnl
+CBLAS_CURRENT=0
+CBLAS_REVISION=0
+CBLAS_AGE=0
+
+GSL_LT_VERSION="${GSL_CURRENT}:${GSL_REVISION}:${GSL_AGE}"
+AC_SUBST(GSL_LT_VERSION)
+
+GSL_LT_CBLAS_VERSION="${CBLAS_CURRENT}:${CBLAS_REVISION}:${CBLAS_AGE}"
+AC_SUBST(GSL_LT_CBLAS_VERSION)
+
+case "$VERSION" in
+    *+)
+        ;;
+    *)
+        AC_DEFINE(RELEASED,[],[Defined if this is an official release])
+        ;;
+esac
+
+dnl Split VERSION into GSL_VERSION_MAJOR and GSL_VERSION_MINOR
+dnl Follows AX_SPLIT_VERSION macro from AC-Archive
+dnl Rhys Ulerich <rhys.ulerich@gmail.com>
+AC_PROG_SED
+GSL_MAJOR_VERSION=`echo "$VERSION" | $SED 's/\([[^.]][[^.]]*\).*/\1/'`
+GSL_MINOR_VERSION=`echo "$VERSION" | $SED 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'`
+AC_SUBST(GSL_MAJOR_VERSION)
+AC_SUBST(GSL_MINOR_VERSION)
+
+dnl things required by automake
+dnl AC_ARG_PROGRAM
+AC_PROG_MAKE_SET
+
+dnl Check for which system.
+AC_CANONICAL_HOST
+
+dnl Checks for programs.
+AC_LANG(C)
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_INSTALL
+AC_PROG_LN_S
+LT_INIT([win32-dll])
+
+dnl Check compiler features
+AC_TYPE_SIZE_T
+dnl AC_C_CONST
+AC_C_VOLATILE
+AC_C_INLINE
+AC_C_CHAR_UNSIGNED
+
+GSL_CFLAGS="-I$includedir"
+GSL_LIBS="-L$libdir -lgsl"
+dnl macro from libtool - can be replaced with LT_LIB_M when we require libtool 2
+LT_LIB_M
+GSL_LIBM=$LIBM
+
+AC_SUBST(GSL_CFLAGS)
+AC_SUBST(GSL_LIBS)
+AC_SUBST(GSL_LIBM)
+
+if test "$ac_cv_c_inline" != no ; then 
+dnl Check for "extern inline", using a modified version of the test
+dnl for AC_C_INLINE from acspecific.mt
+dnl
+   AC_CACHE_CHECK([for GNU-style extern inline], ac_cv_c_extern_inline,
+   [ac_cv_c_extern_inline=no
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[extern $ac_cv_c_inline double foo(double x);
+   extern $ac_cv_c_inline double foo(double x) { return x + 1.0 ; } ;
+   double foo (double x) { return x + 1.0 ; };]], [[  foo(1.0)  ]])],[ac_cv_c_extern_inline="yes"],[])
+   ])
+
+   if test "$ac_cv_c_extern_inline" != no ; then
+      AC_DEFINE(HAVE_INLINE,[1],[Define if you have inline])
+   else
+      AC_CACHE_CHECK([for C99-style inline], ac_cv_c_c99inline,
+      [ac_cv_c_c99inline=no
+      dnl next line is a necessary condition
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[extern inline void* foo() { foo(); return &foo ; };]], 
+      [[  return foo() != 0 ]])],[ac_cv_c_c99inline="yes"],[])
+      dnl but not sufficient, extern must work but inline on its own should not
+      if test "$ac_cv_c_c99inline" != no ; then
+            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[inline void* foo() { foo(); return &foo ; };]], 
+            [[  return foo() != 0 ]])],[],ac_cv_c_c99inline="no")
+      fi
+      ])
+      if test "$ac_cv_c_c99inline" != no ; then
+         AC_DEFINE(HAVE_INLINE,[1],[Define if you have inline])
+         AC_DEFINE(HAVE_C99_INLINE,[1],[Define if you have inline with C99 behavior])
+      fi
+   fi
+fi
+
+dnl Checks for header files.
+AC_CHECK_HEADERS(ieeefp.h)
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+
+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
+
+AC_SUBST(GSLCBLAS_LDFLAGS)
+AC_SUBST(GSL_LDFLAGS)
+AC_SUBST(GSL_LIBADD)
+
+dnl Checks for library functions.
+
+dnl AC_FUNC_ALLOCA
+AC_FUNC_VPRINTF
+
+dnl strcasecmp, strerror, xmalloc, xrealloc, probably others should be added.
+dnl removed strerror from this list, it's hardcoded in the err/ directory
+dnl Any functions which appear in this list of functions should be provided
+dnl in the utils/ directory
+dnl xmalloc is not used, removed (bjg)
+AC_REPLACE_FUNCS(memcpy memmove strdup strtol strtoul)
+
+AC_CACHE_CHECK(for EXIT_SUCCESS and EXIT_FAILURE,
+ac_cv_decl_exit_success_and_failure,
+AC_EGREP_CPP(yes,
+[
+#include <stdlib.h>
+#ifdef EXIT_SUCCESS
+yes
+#endif
+], 
+ac_cv_decl_exit_success_and_failure=yes,
+ac_cv_decl_exit_success_and_failure=no)
+)
+
+if test "$ac_cv_decl_exit_success_and_failure" = yes ; then
+  AC_DEFINE(HAVE_EXIT_SUCCESS_AND_FAILURE,1,[Defined if you have ansi EXIT_SUCCESS and EXIT_FAILURE in stdlib.h])
+fi ;
+
+dnl Use alternate libm if specified by user
+
+if test "x$LIBS" = "x" ; then
+  AC_CHECK_LIB(m, cos)
+fi
+
+dnl Remember to put a definition in acconfig.h for each of these
+AC_CHECK_DECLS(feenableexcept,,,[#define _GNU_SOURCE 1
+#include <fenv.h>]) 
+AC_CHECK_DECLS(fesettrapenable,,,[#define _GNU_SOURCE 1
+#include <fenv.h>]) 
+AC_CHECK_DECLS(hypot,,,[#include <math.h>]) 
+AC_CHECK_DECLS(expm1,,,[#include <math.h>])
+AC_CHECK_DECLS(acosh,,,[#include <math.h>])
+AC_CHECK_DECLS(asinh,,,[#include <math.h>])
+AC_CHECK_DECLS(atanh,,,[#include <math.h>])
+AC_CHECK_DECLS(ldexp,,,[#include <math.h>])
+AC_CHECK_DECLS(frexp,,,[#include <math.h>])
+AC_CHECK_DECLS([fprnd_t],[],[],[[#include <float.h>]]) 
+AC_CHECK_DECLS(isinf,,,[#include <math.h>])
+AC_CHECK_DECLS(isfinite,,,[#include <math.h>])
+AC_CHECK_DECLS(finite,,,[#include <math.h>
+#if HAVE_IEEEFP_H
+#include <ieeefp.h>
+#endif])
+AC_CHECK_DECLS(isnan,,,[#include <math.h>])
+
+dnl OpenBSD has a broken implementation of log1p.
+case "$host" in
+    *-*-*openbsd*)
+       AC_MSG_RESULT([avoiding OpenBSD system log1p - using gsl version])
+       ;;
+    *)
+        AC_CHECK_DECLS(log1p,,,[#include <math.h>])
+       ;;
+esac
+
+AC_CACHE_CHECK([for long double stdio], ac_cv_func_printf_longdouble,
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <stdlib.h>
+#include <stdio.h>
+int main (void) 
+{ 
+const char * s = "5678.25"; long double x = 1.234 ; 
+fprintf(stderr,"%Lg\n",x) ; 
+sscanf(s, "%Lg", &x);
+if (x == 5678.25) {exit (0);} else {exit(1); };
+}]])],[ac_cv_func_printf_longdouble="yes"],[ac_cv_func_printf_longdouble="no"],[ac_cv_func_printf_longdouble="no"])])
+
+if test "$ac_cv_func_printf_longdouble" != no; then
+  AC_DEFINE(HAVE_PRINTF_LONGDOUBLE,1,[Define this if printf can handle %Lf for long double])
+fi
+
+AC_CACHE_CHECK([for extended floating point registers],ac_cv_c_extended_fp,
+[case "$host" in
+    *sparc*-*-*)
+        ac_cv_c_extended_fp=no
+        ;;     
+    *powerpc*-*-*)
+        ac_cv_c_extended_fp=no
+        ;;      
+    *hppa*-*-*)
+        ac_cv_c_extended_fp=no
+        ;;      
+    *alpha*-*-*)
+        ac_cv_c_extended_fp=no
+        ;;      
+    *68k*-*-*)
+        ac_cv_c_extended_fp=yes
+        ;;      
+    *86-*-*)
+        ac_cv_c_extended_fp=yes
+        ;;      
+    x86_64-*-*)
+        ac_cv_c_extended_fp=yes
+        ;;      
+    *) 
+        ac_cv_c_extended_fp=unknown
+        ;;
+esac
+])
+
+if test $ac_cv_c_extended_fp != "no" ; then
+    AC_DEFINE(HAVE_EXTENDED_PRECISION_REGISTERS,1,[Defined on architectures with excess floating-point precision])
+fi
+
+AC_CACHE_CHECK([for IEEE arithmetic interface type], ac_cv_c_ieee_interface,
+[case "$host" in
+    sparc-*-linux*) 
+        ac_cv_c_ieee_interface=gnusparc
+        ;;
+    m68k-*-linux*) 
+        ac_cv_c_ieee_interface=gnum68k
+        ;;
+    powerpc-*-linux*) 
+        ac_cv_c_ieee_interface=gnuppc
+        ;;
+    *86-*-gnu | *86_64-*-gnu | *86-*-linux* | *86_64-*-linux*) 
+        ac_cv_c_ieee_interface=gnux86
+        ;;
+    *-*-sunos4*) 
+        ac_cv_c_ieee_interface=sunos4
+        ;;
+    *-*-solaris*) 
+        ac_cv_c_ieee_interface=solaris
+        ;;
+    *-*-hpux11*) 
+        ac_cv_c_ieee_interface=hpux11
+        ;;
+    *-*-hpux*) 
+        ac_cv_c_ieee_interface=hpux
+        ;;
+    *-*-osf*) 
+        ac_cv_c_ieee_interface=tru64
+        ;;
+    *-*-aix*) 
+        ac_cv_c_ieee_interface=aix
+        ;;
+    *-*-irix*) 
+        ac_cv_c_ieee_interface=irix
+        ;;
+    powerpc-*-*darwin*) 
+        ac_cv_c_ieee_interface=darwin
+        ;;
+    *86-*-*darwin*) 
+        ac_cv_c_ieee_interface=darwin86
+        ;;
+    *-*-*netbsd*) 
+        ac_cv_c_ieee_interface=netbsd
+        ;;
+    *-*-*openbsd*)  
+        ac_cv_c_ieee_interface=openbsd
+        ;;
+    *-*-*bsd*) 
+        ac_cv_c_ieee_interface=freebsd
+        ;;
+    *-*-os2*)
+        ac_cv_c_ieee_interface=os2emx
+        ;;
+    *)
+        ac_cv_c_ieee_interface=unknown
+        ;;
+esac
+])
+
+if test "$ac_cv_c_ieee_interface" = "gnux86" ; then
+    AC_CACHE_CHECK([for FPU_SETCW], ac_cv_c_fpu_setcw,
+    [ac_cv_c_fpu_setcw=no
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <fpu_control.h>
+#ifndef _FPU_SETCW
+#include <i386/fpu_control.h>
+#define _FPU_SETCW(cw) __setfpucw(cw)
+#endif
+]], [[ unsigned short mode = 0 ; _FPU_SETCW(mode); ]])],[ac_cv_c_fpu_setcw="yes"],[ac_cv_c_ieee_interface=unknown])
+    ])
+fi
+
+if test "$ac_cv_c_ieee_interface" = "gnux86" ; then
+    AC_CACHE_CHECK([for SSE extensions], ac_cv_c_fpu_sse,
+    [ac_cv_c_fpu_sse=no
+    AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <stdlib.h>
+#define _FPU_SETMXCSR(cw_sse) asm volatile ("ldmxcsr %0" : : "m" (*&cw_sse))
+]], [[ unsigned int mode = 0x1f80 ; _FPU_SETMXCSR(mode); exit(0); ]])],[ac_cv_c_fpu_sse="yes"],[ac_cv_c_fpu_sse="no"],[
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <stdlib.h>
+#define _FPU_SETMXCSR(cw_sse) asm volatile ("ldmxcsr %0" : : "m" (*&cw_sse))
+]], [[ unsigned int mode = 0x1f80 ; _FPU_SETMXCSR(mode); exit(0); ]])],[ac_cv_c_fpu_sse="yes"],[ac_cv_c_fpu_sse="no"])
+])])
+
+    if test $ac_cv_c_fpu_sse = yes; then
+        AC_DEFINE([HAVE_FPU_X86_SSE], 1,
+                  [Define if x86 processor has sse extensions.])
+   fi
+fi
+
+ac_tr_ieee_interface=HAVE_`echo $ac_cv_c_ieee_interface | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_IEEE_INTERFACE
+AC_DEFINE_UNQUOTED($ac_tr_ieee_interface,1,[IEEE Interface Type])
+
+AC_SUBST(HAVE_GNUSPARC_IEEE_INTERFACE)
+AC_SUBST(HAVE_GNUM68K_IEEE_INTERFACE)
+AC_SUBST(HAVE_GNUPPC_IEEE_INTERFACE)
+AC_SUBST(HAVE_GNUX86_IEEE_INTERFACE)
+AC_SUBST(HAVE_SUNOS4_IEEE_INTERFACE)
+AC_SUBST(HAVE_SOLARIS_IEEE_INTERFACE)
+AC_SUBST(HAVE_HPUX11_IEEE_INTERFACE)
+AC_SUBST(HAVE_HPUX_IEEE_INTERFACE)
+AC_SUBST(HAVE_TRU64_IEEE_INTERFACE)
+AC_SUBST(HAVE_IRIX_IEEE_INTERFACE)
+AC_SUBST(HAVE_AIX_IEEE_INTERFACE)
+AC_SUBST(HAVE_FREEBSD_IEEE_INTERFACE)
+AC_SUBST(HAVE_OS2EMX_IEEE_INTERFACE)
+AC_SUBST(HAVE_NETBSD_IEEE_INTERFACE)
+AC_SUBST(HAVE_OPENBSD_IEEE_INTERFACE)
+AC_SUBST(HAVE_DARWIN_IEEE_INTERFACE)
+AC_SUBST(HAVE_DARWIN86_IEEE_INTERFACE)
+
+dnl Check for IEEE control flags
+
+save_cflags="$CFLAGS"
+AC_CACHE_CHECK([for IEEE compiler flags], ac_cv_c_ieee_flags,
+[
+case "$host" in
+    alpha*-*-*)
+        if test X"$GCC" = Xyes ; then
+            ieee_flags='-mieee -mfp-rounding-mode=d'
+        else
+            # This assumes Compaq's C compiler.
+            ieee_flags='-ieee -fprm d'
+        fi
+        ;;
+esac
+if test X"$ieee_flags" != X ; then
+  CFLAGS="$ieee_flags $CFLAGS"
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int foo;]])],[ac_cv_c_ieee_flags="$ieee_flags"],[ac_cv_c_ieee_flags="none"])
+else
+  ac_cv_c_ieee_flags="none"
+fi])
+
+if test "$ac_cv_c_ieee_flags" != "none" ; then
+   CFLAGS="$ac_cv_c_ieee_flags $save_cflags"
+else
+   CFLAGS="$save_cflags"
+fi
+
+dnl Check IEEE comparisons, whether "x != x" is true for NaNs
+dnl
+AC_CACHE_CHECK([for IEEE comparisons], ac_cv_c_ieee_comparisons,
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <math.h>
+int main (void) 
+{ 
+   int status; double inf, nan;
+   inf = exp(1.0e10);
+   nan = inf / inf ;
+   status = (nan == nan);
+   exit (status);
+}]])],[ac_cv_c_ieee_comparisons="yes"],[ac_cv_c_ieee_comparisons="no"],[ac_cv_c_ieee_comparisons="yes"])
+])
+
+if test "$ac_cv_c_ieee_comparisons" != no ; then
+  AC_DEFINE(HAVE_IEEE_COMPARISONS,1,[Define this if IEEE comparisons work correctly (e.g. NaN != NaN)])
+fi
+
+dnl Check for IEEE denormalized arithmetic
+dnl
+AC_CACHE_CHECK([for IEEE denormalized values], ac_cv_c_ieee_denormals,
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <math.h> 
+int main (void) 
+{ 
+   int i, status; 
+   volatile double z = 1e-308;
+   for (i = 0; i < 5; i++) { z = z / 10.0 ; };        
+   for (i = 0; i < 5; i++) { z = z * 10.0 ; };
+   status = (z == 0.0);
+   exit (status);
+}]])],[ac_cv_c_ieee_denormals="yes"],[ac_cv_c_ieee_denormals="no"],[ac_cv_c_ieee_denormals="yes"])
+])
+
+if test "$ac_cv_c_ieee_denormals" != no ; then
+  AC_DEFINE(HAVE_IEEE_DENORMALS,1,[Define this if IEEE denormalized numbers are available])
+fi
+
+AH_TEMPLATE([HIDE_INLINE_STATIC],[Define if you need to hide the static definitions of inline functions])
+
+AH_BOTTOM([/* Use 0 and 1 for EXIT_SUCCESS and EXIT_FAILURE if we don't have them */
+#if !HAVE_EXIT_SUCCESS_AND_FAILURE
+#define EXIT_SUCCESS 0
+#define EXIT_FAILURE 1
+#endif])
+
+AH_BOTTOM([/* Define one of these if you have a known IEEE arithmetic interface */
+#undef HAVE_GNUSPARC_IEEE_INTERFACE
+#undef HAVE_GNUM68K_IEEE_INTERFACE
+#undef HAVE_GNUPPC_IEEE_INTERFACE
+#undef HAVE_GNUX86_IEEE_INTERFACE
+#undef HAVE_SUNOS4_IEEE_INTERFACE
+#undef HAVE_SOLARIS_IEEE_INTERFACE
+#undef HAVE_HPUX11_IEEE_INTERFACE
+#undef HAVE_HPUX_IEEE_INTERFACE
+#undef HAVE_TRU64_IEEE_INTERFACE
+#undef HAVE_IRIX_IEEE_INTERFACE
+#undef HAVE_AIX_IEEE_INTERFACE
+#undef HAVE_FREEBSD_IEEE_INTERFACE
+#undef HAVE_OS2EMX_IEEE_INTERFACE
+#undef HAVE_NETBSD_IEEE_INTERFACE
+#undef HAVE_OPENBSD_IEEE_INTERFACE
+#undef HAVE_DARWIN_IEEE_INTERFACE
+#undef HAVE_DARWIN86_IEEE_INTERFACE])
+
+AH_BOTTOM([/* Define a rounding function which moves extended precision values
+   out of registers and rounds them to double-precision. This should
+   be used *sparingly*, in places where it is necessary to keep
+   double-precision rounding for critical expressions while running in
+   extended precision. For example, the following code should ensure
+   exact equality, even when extended precision registers are in use,
+
+      double q = GSL_COERCE_DBL(3.0/7.0) ;
+      if (q == GSL_COERCE_DBL(3.0/7.0)) { ... } ;
+
+   It carries a penalty even when the program is running in double
+   precision mode unless you compile a separate version of the
+   library with HAVE_EXTENDED_PRECISION_REGISTERS turned off. */
+
+#if HAVE_EXTENDED_PRECISION_REGISTERS
+#define GSL_COERCE_DBL(x) (gsl_coerce_double(x))
+#else
+#define GSL_COERCE_DBL(x) (x)
+#endif])
+
+AH_BOTTOM([/* Substitute gsl functions for missing system functions */
+
+#if !HAVE_DECL_HYPOT
+#define hypot gsl_hypot
+#endif
+
+#if !HAVE_DECL_LOG1P
+#define log1p gsl_log1p
+#endif
+
+#if !HAVE_DECL_EXPM1
+#define expm1 gsl_expm1
+#endif
+
+#if !HAVE_DECL_ACOSH
+#define acosh gsl_acosh
+#endif
+
+#if !HAVE_DECL_ASINH
+#define asinh gsl_asinh
+#endif
+
+#if !HAVE_DECL_ATANH
+#define atanh gsl_atanh
+#endif
+
+#if !HAVE_DECL_LDEXP
+#define ldexp gsl_ldexp
+#endif
+
+#if !HAVE_DECL_FREXP
+#define frexp gsl_frexp
+#endif
+
+#if !HAVE_DECL_ISINF
+#define isinf gsl_isinf
+#endif
+
+#if !HAVE_DECL_ISFINITE
+#define isfinite gsl_finite
+#endif
+
+#if !HAVE_DECL_FINITE
+#define finite gsl_finite
+#endif
+
+#if !HAVE_DECL_ISNAN
+#define isnan gsl_isnan
+#endif])
+
+AH_BOTTOM([#ifdef __GNUC__
+#define DISCARD_POINTER(p) do { ; } while(p ? 0 : 0);
+#else
+#define DISCARD_POINTER(p) /* ignoring discarded pointer */
+#endif])
+
+AH_BOTTOM([#if defined(GSL_RANGE_CHECK_OFF) || !defined(GSL_RANGE_CHECK)
+#define GSL_RANGE_CHECK 0  /* turn off range checking by default internally */
+#endif])
+
+AH_BOTTOM([#define RETURN_IF_NULL(x) if (!x) { return ; }
+])
+
+AH_VERBATIM([GSL_DISABLE_DEPRECATED],
+[/* Disable deprecated functions and enums while building */
+#define GSL_DISABLE_DEPRECATED 1])
+
+dnl
+AC_CONFIG_FILES([            \
+Makefile                     \
+gsl_version.h                \
+gsl.spec                     \
+blas/Makefile                \
+block/Makefile               \
+bspline/Makefile             \
+cblas/Makefile               \
+cdf/Makefile                 \
+cheb/Makefile                \
+combination/Makefile         \
+complex/Makefile             \
+const/Makefile               \
+deriv/Makefile               \
+dht/Makefile                 \
+diff/Makefile                \
+doc/Makefile                 \
+doc/examples/Makefile        \
+eigen/Makefile               \
+err/Makefile                 \
+fit/Makefile                 \
+fft/Makefile                 \
+gsl/Makefile                 \
+histogram/Makefile           \
+ieee-utils/Makefile          \
+integration/Makefile         \
+interpolation/Makefile       \
+linalg/Makefile              \
+matrix/Makefile              \
+min/Makefile                 \
+monte/Makefile               \
+multifit/Makefile            \
+multifit_nlinear/Makefile    \
+multilarge/Makefile          \
+multilarge_nlinear/Makefile  \
+multimin/Makefile            \
+multiroots/Makefile          \
+multiset/Makefile            \
+ntuple/Makefile              \
+ode-initval/Makefile         \
+ode-initval2/Makefile        \
+permutation/Makefile         \
+poly/Makefile                \
+qrng/Makefile                \
+randist/Makefile             \
+rng/Makefile                 \
+roots/Makefile               \
+rstat/Makefile               \
+siman/Makefile               \
+sort/Makefile                \
+spblas/Makefile              \
+splinalg/Makefile            \
+spmatrix/Makefile            \
+specfunc/Makefile            \
+statistics/Makefile          \
+sum/Makefile                 \
+sys/Makefile                 \
+test/Makefile                \
+utils/Makefile               \
+vector/Makefile              \
+wavelet/Makefile             \
+])
+
+AC_OUTPUT
diff --git a/eigen/Makefile.am b/eigen/Makefile.am
index c28bfde..14197a4 100644
--- a/eigen/Makefile.am
+++ b/eigen/Makefile.am
@@ -11,7 +11,7 @@ noinst_HEADERS =  qrstep.c
 
 TESTS = $(check_PROGRAMS)
 
-test_LDADD = libgsleigen.la  ../test/libgsltest.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la  ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la ../err/libgslerr.la ../utils/libutils.la ../rng/libgslrng.la ../sort/libgslsort.la
+test_LDADD = libgsleigen.la  ../test/libgsltest.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la  ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la ../err/libgslerr.la ../utils/libutils.la ../rng/libgslrng.la ../sort/libgslsort.la
 
 test_SOURCES = test.c
 
diff --git a/eigen/Makefile.am.porig b/eigen/Makefile.am.porig
new file mode 100644
index 0000000..c28bfde
--- /dev/null
+++ b/eigen/Makefile.am.porig
@@ -0,0 +1,18 @@
+noinst_LTLIBRARIES = libgsleigen.la 
+
+check_PROGRAMS = test
+
+pkginclude_HEADERS = gsl_eigen.h
+libgsleigen_la_SOURCES =  jacobi.c symm.c symmv.c nonsymm.c nonsymmv.c herm.c hermv.c gensymm.c gensymmv.c genherm.c genhermv.c gen.c genv.c sort.c francis.c schur.c
+
+AM_CPPFLAGS = -I$(top_srcdir)
+
+noinst_HEADERS =  qrstep.c
+
+TESTS = $(check_PROGRAMS)
+
+test_LDADD = libgsleigen.la  ../test/libgsltest.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la  ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la ../err/libgslerr.la ../utils/libutils.la ../rng/libgslrng.la ../sort/libgslsort.la
+
+test_SOURCES = test.c
+
+
diff --git a/gsl-config.in b/gsl-config.in
old mode 100755
new mode 100644
index 3f3fa61..c9c4262
--- a/gsl-config.in
+++ b/gsl-config.in
@@ -58,11 +58,11 @@ while test $# -gt 0; do
 	;;
 
     --cflags)
-       	echo @GSL_CFLAGS@ 
+       	echo @GSL_CFLAGS@ @CBLAS_CFLAGS@ 
        	;;
 
     --libs)
-        : ${GSL_CBLAS_LIB=-lgslcblas}
+        : ${GSL_CBLAS_LIB=@CBLAS_LIBS@}
 	echo @GSL_LIBS@ $GSL_CBLAS_LIB @GSL_LIBM@
        	;;
 
diff --git a/gsl-config.in.porig b/gsl-config.in.porig
new file mode 100755
index 0000000..3f3fa61
--- /dev/null
+++ b/gsl-config.in.porig
@@ -0,0 +1,80 @@
+#! /bin/sh
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+includedir=@includedir@
+
+usage()
+{
+    cat <<EOF
+Usage: gsl-config [OPTION]
+
+Known values for OPTION are:
+
+  --prefix		show GSL installation prefix 
+  --libs		print library linking information, with cblas
+  --libs-without-cblas	print library linking information, without cblas
+  --cflags		print pre-processor and compiler flags
+  --help		display this help and exit
+  --version		output version information
+
+An external CBLAS library can be specified using the GSL_CBLAS_LIB
+environment variable. The GSL CBLAS library is used by default.
+
+EOF
+
+    exit $1
+}
+
+if test $# -eq 0; then
+    usage 1
+fi
+
+cflags=false
+libs=false
+
+while test $# -gt 0; do
+    case "$1" in
+    -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+    *) optarg= ;;
+    esac
+
+    case "$1" in
+    --prefix=*)
+	prefix=$optarg
+	;;
+
+    --prefix)
+	echo $prefix
+	;;
+
+    --version)
+	echo @VERSION@
+	exit 0
+	;;
+
+    --help)
+	usage 0
+	;;
+
+    --cflags)
+       	echo @GSL_CFLAGS@ 
+       	;;
+
+    --libs)
+        : ${GSL_CBLAS_LIB=-lgslcblas}
+	echo @GSL_LIBS@ $GSL_CBLAS_LIB @GSL_LIBM@
+       	;;
+
+    --libs-without-cblas)
+	echo @GSL_LIBS@ @GSL_LIBM@
+       	;;
+    *)
+	usage
+	exit 1
+	;;
+    esac
+    shift
+done
+
+exit 0
diff --git a/gsl.pc.in b/gsl.pc.in
index 5e9ef21..5a7a0f3 100644
--- a/gsl.pc.in
+++ b/gsl.pc.in
@@ -2,7 +2,7 @@ prefix=@prefix@
 exec_prefix=@exec_prefix@
 libdir=@libdir@
 includedir=@includedir@
-GSL_CBLAS_LIB=-lgslcblas
+GSL_CBLAS_LIB=@CBLAS_LIBS@
 
 Name: GSL
 Description: GNU Scientific Library
diff --git a/gsl.pc.in.porig b/gsl.pc.in.porig
new file mode 100644
index 0000000..5e9ef21
--- /dev/null
+++ b/gsl.pc.in.porig
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+GSL_CBLAS_LIB=-lgslcblas
+
+Name: GSL
+Description: GNU Scientific Library
+Version: @VERSION@
+Libs: @GSL_LIBS@ ${GSL_CBLAS_LIB} @GSL_LIBM@ @LIBS@
+Cflags: @GSL_CFLAGS@
diff --git a/interpolation/Makefile.am b/interpolation/Makefile.am
index 1d80755..e45bd51 100644
--- a/interpolation/Makefile.am
+++ b/interpolation/Makefile.am
@@ -12,7 +12,7 @@ AM_CPPFLAGS = -I$(top_srcdir)
 
 TESTS = $(check_PROGRAMS)
 
-test_LDADD = libgslinterpolation.la ../poly/libgslpoly.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../cblas/libgslcblas.la ../ieee-utils/libgslieeeutils.la  ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+test_LDADD = libgslinterpolation.la ../poly/libgslpoly.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la @CBLAS_LINK_LIBS@ ../ieee-utils/libgslieeeutils.la  ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
 
 test_SOURCES = test.c
 
diff --git a/interpolation/Makefile.am.porig b/interpolation/Makefile.am.porig
new file mode 100644
index 0000000..1d80755
--- /dev/null
+++ b/interpolation/Makefile.am.porig
@@ -0,0 +1,18 @@
+noinst_LTLIBRARIES = libgslinterpolation.la 
+
+check_PROGRAMS = test
+
+pkginclude_HEADERS = gsl_interp.h gsl_spline.h gsl_interp2d.h gsl_spline2d.h
+
+libgslinterpolation_la_SOURCES = accel.c akima.c cspline.c interp.c linear.c integ_eval.h spline.c poly.c steffen.c inline.c interp2d.c bilinear.c bicubic.c spline2d.c
+
+noinst_HEADERS = test2d.c
+
+AM_CPPFLAGS = -I$(top_srcdir)
+
+TESTS = $(check_PROGRAMS)
+
+test_LDADD = libgslinterpolation.la ../poly/libgslpoly.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../cblas/libgslcblas.la ../ieee-utils/libgslieeeutils.la  ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+test_SOURCES = test.c
+
diff --git a/linalg/Makefile.am b/linalg/Makefile.am
index a6c15b0..447ebbe 100644
--- a/linalg/Makefile.am
+++ b/linalg/Makefile.am
@@ -13,4 +13,4 @@ TESTS = $(check_PROGRAMS)
 check_PROGRAMS = test
 
 test_SOURCES = test.c
-test_LDADD = libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../rng/libgslrng.la
+test_LDADD = libgsllinalg.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../rng/libgslrng.la
diff --git a/linalg/Makefile.am.porig b/linalg/Makefile.am.porig
new file mode 100644
index 0000000..a6c15b0
--- /dev/null
+++ b/linalg/Makefile.am.porig
@@ -0,0 +1,16 @@
+noinst_LTLIBRARIES = libgsllinalg.la 
+
+pkginclude_HEADERS = gsl_linalg.h
+
+AM_CPPFLAGS = -I$(top_srcdir)
+
+libgsllinalg_la_SOURCES = cod.c condest.c invtri.c multiply.c exponential.c tridiag.c tridiag.h lu.c luc.c hh.c qr.c qrpt.c lq.c ptlq.c svd.c householder.c householdercomplex.c hessenberg.c hesstri.c cholesky.c choleskyc.c mcholesky.c pcholesky.c symmtd.c hermtd.c bidiag.c balance.c balancemat.c inline.c
+
+noinst_HEADERS = apply_givens.c cholesky_common.c svdstep.c tridiag.h test_cholesky.c
+
+TESTS = $(check_PROGRAMS)
+
+check_PROGRAMS = test
+
+test_SOURCES = test.c
+test_LDADD = libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../rng/libgslrng.la
diff --git a/multifit/Makefile.am b/multifit/Makefile.am
index 988614e..793b485 100644
--- a/multifit/Makefile.am
+++ b/multifit/Makefile.am
@@ -67,8 +67,8 @@ check_PROGRAMS = test #demo
 TESTS = $(check_PROGRAMS)
 
 test_SOURCES = test.c
-test_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../sort/libgslsort.la ../statistics/libgslstatistics.la ../vector/libgslvector.la ../block/libgslblock.la  ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la ../rng/libgslrng.la ../specfunc/libgslspecfunc.la ../min/libgslmin.la
+test_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../sort/libgslsort.la ../statistics/libgslstatistics.la ../vector/libgslvector.la ../block/libgslblock.la  ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la ../rng/libgslrng.la ../specfunc/libgslspecfunc.la ../min/libgslmin.la
 
 #demo_SOURCES = demo.c
-#demo_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../randist/libgslrandist.la ../rng/libgslrng.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la
+#demo_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../randist/libgslrandist.la ../rng/libgslrng.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la
 
diff --git a/multifit/Makefile.am.porig b/multifit/Makefile.am.porig
new file mode 100644
index 0000000..988614e
--- /dev/null
+++ b/multifit/Makefile.am.porig
@@ -0,0 +1,74 @@
+noinst_LTLIBRARIES = libgslmultifit.la 
+
+pkginclude_HEADERS = gsl_multifit.h gsl_multifit_nlin.h
+
+AM_CPPFLAGS = -I$(top_srcdir)
+
+libgslmultifit_la_SOURCES = gcv.c multilinear.c multiwlinear.c work.c lmniel.c lmder.c fsolver.c fdfsolver.c fdfridge.c fdjac.c convergence.c gradient.c covar.c multirobust.c robust_wfun.c multireg.c
+
+noinst_HEADERS =        \
+linear_common.c         \
+lmutil.c                \
+lmpar.c                 \
+lmset.c                 \
+lmiterate.c             \
+lmmisc.c                \
+qrsolv.c                \
+test_bard.c             \
+test_beale.c            \
+test_biggs.c            \
+test_box.c              \
+test_boxbod.c           \
+test_brown1.c           \
+test_brown2.c           \
+test_brown3.c           \
+test_eckerle.c          \
+test_enso.c             \
+test_estimator.c        \
+test_exp1.c             \
+test_filip.c            \
+test_gaussian.c         \
+test_hahn1.c            \
+test_helical.c          \
+test_jennrich.c         \
+test_kirby2.c           \
+test_kowalik.c          \
+test_lin1.c             \
+test_lin2.c             \
+test_lin3.c             \
+test_linear.c           \
+test_longley.c          \
+test_meyer.c            \
+test_meyerscal.c        \
+test_nelson.c           \
+test_nonlinear.c        \
+test_osborne.c          \
+test_penalty1.c         \
+test_penalty2.c         \
+test_pontius.c          \
+test_powell1.c          \
+test_powell2.c          \
+test_powell3.c          \
+test_rat42.c            \
+test_rat43.c            \
+test_reg.c              \
+test_rosenbrock.c       \
+test_rosenbrocke.c      \
+test_roth.c             \
+test_shaw.c             \
+test_thurber.c          \
+test_vardim.c           \
+test_watson.c           \
+test_wnlin.c            \
+test_wood.c
+
+check_PROGRAMS = test #demo
+
+TESTS = $(check_PROGRAMS)
+
+test_SOURCES = test.c
+test_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../sort/libgslsort.la ../statistics/libgslstatistics.la ../vector/libgslvector.la ../block/libgslblock.la  ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la ../rng/libgslrng.la ../specfunc/libgslspecfunc.la ../min/libgslmin.la
+
+#demo_SOURCES = demo.c
+#demo_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../randist/libgslrandist.la ../rng/libgslrng.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la
+
diff --git a/multimin/Makefile.am b/multimin/Makefile.am
index 7071359..65a488a 100644
--- a/multimin/Makefile.am
+++ b/multimin/Makefile.am
@@ -13,8 +13,8 @@ check_PROGRAMS = test #demo
 TESTS = $(check_PROGRAMS) 
 
 test_SOURCES = test.c test_funcs.c test_funcs.h
-test_LDADD = libgslmultimin.la ../min/libgslmin.la ../poly/libgslpoly.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+test_LDADD = libgslmultimin.la ../min/libgslmin.la ../poly/libgslpoly.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
 
 #demo_SOURCES = demo.c 
-#demo_LDADD = libgslmultimin.la ../min/libgslmin.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../linalg/libgsllinalg.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+#demo_LDADD = libgslmultimin.la ../min/libgslmin.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../linalg/libgsllinalg.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
 
diff --git a/multimin/Makefile.am.porig b/multimin/Makefile.am.porig
new file mode 100644
index 0000000..7071359
--- /dev/null
+++ b/multimin/Makefile.am.porig
@@ -0,0 +1,20 @@
+noinst_LTLIBRARIES = libgslmultimin.la 
+
+pkginclude_HEADERS = gsl_multimin.h
+
+AM_CPPFLAGS = -I$(top_srcdir)
+
+libgslmultimin_la_SOURCES = fdfminimizer.c steepest_descent.c conjugate_fr.c conjugate_pr.c convergence.c diff.c vector_bfgs.c vector_bfgs2.c fminimizer.c simplex.c simplex2.c
+
+noinst_HEADERS = directional_minimize.c linear_minimize.c linear_wrapper.c
+
+check_PROGRAMS = test #demo
+
+TESTS = $(check_PROGRAMS) 
+
+test_SOURCES = test.c test_funcs.c test_funcs.h
+test_LDADD = libgslmultimin.la ../min/libgslmin.la ../poly/libgslpoly.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+#demo_SOURCES = demo.c 
+#demo_LDADD = libgslmultimin.la ../min/libgslmin.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../linalg/libgsllinalg.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
diff --git a/multiroots/Makefile.am b/multiroots/Makefile.am
index a351c3f..6178448 100644
--- a/multiroots/Makefile.am
+++ b/multiroots/Makefile.am
@@ -15,5 +15,5 @@ check_PROGRAMS = test
 TESTS = $(check_PROGRAMS)
 
 test_SOURCES = test.c test_funcs.c test_funcs.h
-test_LDADD = libgslmultiroots.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la  ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+test_LDADD = libgslmultiroots.la ../linalg/libgsllinalg.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la  ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
 
diff --git a/multiroots/Makefile.am.porig b/multiroots/Makefile.am.porig
new file mode 100644
index 0000000..a351c3f
--- /dev/null
+++ b/multiroots/Makefile.am.porig
@@ -0,0 +1,19 @@
+# -*-makefile-*-
+
+noinst_LTLIBRARIES = libgslmultiroots.la 
+
+pkginclude_HEADERS = gsl_multiroots.h
+
+noinst_HEADERS = enorm.c dogleg.c
+
+AM_CPPFLAGS = -I$(top_srcdir)
+
+libgslmultiroots_la_SOURCES = fdjac.c fsolver.c fdfsolver.c convergence.c  newton.c gnewton.c dnewton.c broyden.c hybrid.c hybridj.c
+
+check_PROGRAMS = test
+
+TESTS = $(check_PROGRAMS)
+
+test_SOURCES = test.c test_funcs.c test_funcs.h
+test_LDADD = libgslmultiroots.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la  ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
diff --git a/ode-initval/Makefile.am b/ode-initval/Makefile.am
index 9c774b5..346c381 100644
--- a/ode-initval/Makefile.am
+++ b/ode-initval/Makefile.am
@@ -12,7 +12,7 @@ check_PROGRAMS = test
 
 TESTS = $(check_PROGRAMS)
 
-test_LDADD = libgslodeiv.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../permutation/libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la  ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la 
+test_LDADD = libgslodeiv.la ../linalg/libgsllinalg.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../permutation/libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la  ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la 
 
 test_SOURCES = test.c
 
diff --git a/ode-initval/Makefile.am.porig b/ode-initval/Makefile.am.porig
new file mode 100644
index 0000000..9c774b5
--- /dev/null
+++ b/ode-initval/Makefile.am.porig
@@ -0,0 +1,18 @@
+noinst_LTLIBRARIES = libgslodeiv.la 
+
+pkginclude_HEADERS = gsl_odeiv.h
+
+AM_CPPFLAGS = -I$(top_srcdir)
+
+libgslodeiv_la_SOURCES = control.c cstd.c cscal.c evolve.c step.c rk2.c rk2imp.c rk2simp.c rk4.c rk4imp.c rkf45.c rk8pd.c rkck.c bsimp.c gear1.c gear2.c
+
+noinst_HEADERS = odeiv_util.h
+
+check_PROGRAMS = test
+
+TESTS = $(check_PROGRAMS)
+
+test_LDADD = libgslodeiv.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../permutation/libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la  ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la 
+
+test_SOURCES = test.c
+
diff --git a/poly/Makefile.am b/poly/Makefile.am
index f1dae5d..e0f8e83 100644
--- a/poly/Makefile.am
+++ b/poly/Makefile.am
@@ -10,7 +10,7 @@ noinst_HEADERS = balance.c companion.c qr.c
 
 TESTS = $(check_PROGRAMS)
 
-check_PROGRAMS = test
+#check_PROGRAMS = test
 
 test_SOURCES = test.c
 test_LDADD = libgslpoly.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../sort/libgslsort.la
diff --git a/poly/Makefile.am.porig b/poly/Makefile.am.porig
new file mode 100644
index 0000000..f1dae5d
--- /dev/null
+++ b/poly/Makefile.am.porig
@@ -0,0 +1,17 @@
+noinst_LTLIBRARIES = libgslpoly.la 
+
+pkginclude_HEADERS = gsl_poly.h
+
+AM_CPPFLAGS = -I$(top_srcdir)
+
+libgslpoly_la_SOURCES = dd.c eval.c solve_quadratic.c solve_cubic.c zsolve_quadratic.c zsolve_cubic.c zsolve.c zsolve_init.c deriv.c
+
+noinst_HEADERS = balance.c companion.c qr.c
+
+TESTS = $(check_PROGRAMS)
+
+check_PROGRAMS = test
+
+test_SOURCES = test.c
+test_LDADD = libgslpoly.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../sort/libgslsort.la
+
diff --git a/specfunc/Makefile.am b/specfunc/Makefile.am
index eba9ab2..772cc7e 100644
--- a/specfunc/Makefile.am
+++ b/specfunc/Makefile.am
@@ -12,7 +12,7 @@ TESTS = $(check_PROGRAMS)
 
 check_PROGRAMS = test
 
-test_LDADD = libgslspecfunc.la ../eigen/libgsleigen.la ../linalg/libgsllinalg.la  ../sort/libgslsort.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../block/libgslblock.la ../complex/libgslcomplex.la ../poly/libgslpoly.la ../ieee-utils/libgslieeeutils.la  ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+test_LDADD = libgslspecfunc.la ../eigen/libgsleigen.la ../linalg/libgsllinalg.la  ../sort/libgslsort.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../block/libgslblock.la ../complex/libgslcomplex.la ../poly/libgslpoly.la ../ieee-utils/libgslieeeutils.la  ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
 
 test_SOURCES = test_sf.c test_sf.h test_airy.c test_bessel.c test_coulomb.c test_dilog.c test_gamma.c test_hyperg.c test_legendre.c test_mathieu.c
   
diff --git a/specfunc/Makefile.am.porig b/specfunc/Makefile.am.porig
new file mode 100644
index 0000000..eba9ab2
--- /dev/null
+++ b/specfunc/Makefile.am.porig
@@ -0,0 +1,19 @@
+noinst_LTLIBRARIES = libgslspecfunc.la 
+
+pkginclude_HEADERS = gsl_sf.h gsl_sf_airy.h gsl_sf_bessel.h gsl_sf_clausen.h gsl_sf_coulomb.h gsl_sf_coupling.h gsl_sf_dawson.h gsl_sf_debye.h gsl_sf_dilog.h gsl_sf_elementary.h gsl_sf_ellint.h gsl_sf_elljac.h gsl_sf_erf.h gsl_sf_exp.h gsl_sf_expint.h gsl_sf_fermi_dirac.h gsl_sf_gamma.h gsl_sf_gegenbauer.h gsl_sf_hyperg.h gsl_sf_laguerre.h gsl_sf_lambert.h gsl_sf_legendre.h gsl_sf_log.h gsl_sf_mathieu.h gsl_sf_pow_int.h gsl_sf_psi.h gsl_sf_result.h gsl_sf_synchrotron.h gsl_sf_transport.h gsl_sf_trig.h gsl_sf_zeta.h gsl_specfunc.h
+
+noinst_HEADERS = bessel_amp_phase.h bessel_olver.h bessel_temme.h bessel.h hyperg.h legendre.h eval.h chebyshev.h cheb_eval.c cheb_eval_mode.c check.h error.h legendre_source.c
+
+AM_CPPFLAGS = -I$(top_srcdir)
+
+libgslspecfunc_la_SOURCES = airy.c airy_der.c airy_zero.c atanint.c bessel.c bessel.h bessel_I0.c bessel_I1.c bessel_In.c bessel_Inu.c bessel_J0.c bessel_J1.c bessel_Jn.c bessel_Jnu.c bessel_K0.c bessel_K1.c bessel_Kn.c bessel_Knu.c bessel_Y0.c bessel_Y1.c bessel_Yn.c bessel_Ynu.c bessel_amp_phase.c bessel_amp_phase.h bessel_i.c bessel_j.c bessel_k.c bessel_olver.c bessel_temme.c bessel_y.c bessel_zero.c bessel_sequence.c beta.c beta_inc.c clausen.c coulomb.c coupling.c coulomb_bound.c dawson.c debye.c dilog.c elementary.c ellint.c elljac.c erfc.c exp.c expint.c expint3.c fermi_dirac.c gegenbauer.c gamma.c gamma_inc.c hyperg_0F1.c hyperg_2F0.c hyperg_1F1.c hyperg_2F1.c hyperg_U.c hyperg.c laguerre.c lambert.c legendre_H3d.c legendre_P.c legendre_Qn.c legendre_con.c legendre_poly.c log.c mathieu_angfunc.c mathieu_charv.c mathieu_coeff.c mathieu_radfunc.c mathieu_workspace.c poch.c pow_int.c psi.c recurse.h result.c shint.c sinint.c synchrotron.c transport.c trig.c zeta.c
+
+TESTS = $(check_PROGRAMS)
+
+check_PROGRAMS = test
+
+test_LDADD = libgslspecfunc.la ../eigen/libgsleigen.la ../linalg/libgsllinalg.la  ../sort/libgslsort.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../block/libgslblock.la ../complex/libgslcomplex.la ../poly/libgslpoly.la ../ieee-utils/libgslieeeutils.la  ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+test_SOURCES = test_sf.c test_sf.h test_airy.c test_bessel.c test_coulomb.c test_dilog.c test_gamma.c test_hyperg.c test_legendre.c test_mathieu.c
+  
+
diff --git a/wavelet/Makefile.am b/wavelet/Makefile.am
index 9da20d8..8cdbd77 100644
--- a/wavelet/Makefile.am
+++ b/wavelet/Makefile.am
@@ -10,7 +10,7 @@ check_PROGRAMS = test
 
 TESTS = $(check_PROGRAMS)
 
-test_LDADD = libgslwavelet.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la  ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+test_LDADD = libgslwavelet.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la  ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
 
 test_SOURCES = test.c
 
diff --git a/wavelet/Makefile.am.porig b/wavelet/Makefile.am.porig
new file mode 100644
index 0000000..9da20d8
--- /dev/null
+++ b/wavelet/Makefile.am.porig
@@ -0,0 +1,17 @@
+noinst_LTLIBRARIES = libgslwavelet.la 
+
+pkginclude_HEADERS = gsl_wavelet.h gsl_wavelet2d.h
+
+AM_CPPFLAGS = -I$(top_srcdir)
+
+libgslwavelet_la_SOURCES = dwt.c wavelet.c bspline.c daubechies.c haar.c
+
+check_PROGRAMS = test
+
+TESTS = $(check_PROGRAMS)
+
+test_LDADD = libgslwavelet.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la  ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+test_SOURCES = test.c
+
+