aboutsummaryrefslogtreecommitdiff
blob: 3b863a22e5aa980364a2fbcb8bcacc78a3d1fd9d (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
Respect LDFLAGS, properly use shared libraries

http://bugs.gentoo.org/show_bug.cgi?id=301049

Patch written by Guillaume Horel <guillaume.horel@gmail.com>
--- a/configure.in
+++ b/configure.in
@@ -177,7 +177,7 @@
   *)
     if test -n "$withval" ; then
         z_lib="`echo $withval |cut -f2 -d, -s`"
-	ZLIB=$z_lib"/libz."$LLEXT
+	ZLIB="-L$z_lib -lz"
 	HAVE_ZLIB="yes"
     else
       ZLIB=""
@@ -211,7 +211,7 @@
   *)
     if test -n "$withval" ; then
         jpeg_lib="`echo $withval |cut -f2 -d, -s`"
-	JPEGLIB=$jpeg_lib"/libjpeg."$LLEXT
+	JPEGLIB="-L$jpeg_lib -ljpeg"
     	dnl AC_MSG_RESULT([jpeg found: $JPEGLIB]);
 	HAVE_JPEG="yes"
     else
@@ -246,7 +246,7 @@
   *)
 	if test -n "$withval" ; then
 	    sz_lib="`echo $withval |cut -f2 -d, -s`"
-		SZLIB=$sz_lib"/libsz."$LLEXT
+		SZLIB="-L$sz_lib -lsz"
 		dnl AC_MSG_RESULT([szlib found: $SZLIB]);
 		HAVE_SZIP="yes"
 	else
@@ -302,7 +302,7 @@
 	;;
 esac
 if test -n "$HDF4LIB"; then
-	LIBS="$HDF4LIB/libdf.$LLEXT $HDF4LIB/libmfhdf.$LLEXT $LIBS"
+	LIBS="-L$HDF4LIB -ldf -lmhdf $LIBS"
 	HAVE_HDF4="yes"
 fi
 AC_MSG_RESULT([$HAVE_HDF4])
@@ -363,7 +363,7 @@
   *)
 	if test -n "$withval" ; then
 	    hdf5_lib="`echo $withval |cut -f2 -d, -s`"
-		HDF5LIB=$hdf5_lib"/libhdf.$LLEXT"
+		HDF5LIB="-L$hdf5_lib -lhdf"
 	    hdf5_inc="`echo $withval |cut -f1 -d,`"
 	    if test -n "$hdf5_inc"; then
 	      HDF5INC="$hdf5_inc"
@@ -380,7 +380,7 @@
 	;;
 esac
 if test -n "$HDF5LIB"; then
-	LIBS="$HDF5LIB/libhdf5.$LLEXT $LIBS"
+	LIBS="-L$HDF5LIB -lhdf5 $LIBS"
 	HAVE_HDF5="yes"
 fi
 AC_MSG_RESULT([$HAVE_HDF5])
@@ -628,10 +628,6 @@
 	if test \( ! -d "$JH45INST" \); then
 		JH45INST_FOUND=0
 	fi
-	if test \( ! -w "$JH45INST" \); then
-		AC_MSG_ERROR( [ $JAVINST : not writable ])
-		JH45INST_FOUND=0
-	fi
 fi
 until test $JH45INST_FOUND -eq 1; do
 	echo "Please type the directory in which to install the JH45"
--- a/native/hdf5lib/Makefile.in
+++ b/native/hdf5lib/Makefile.in
@@ -35,7 +35,7 @@
 
 CFLAGS = -D_FILE_OFFSET_BITS=64 $(DEFS) -I. -I$(HDF5INC) -I$(JAVAINC1) -I$(JAVAINC2)
 
-LIBS =  $(HDF5LIB)/libhdf5.$(LLEXT) $(ZLIB) $(SZLIB) -lm
+LIBS =  -L$(HDF5LIB) -lhdf5 $(ZLIB) $(SZLIB) -lm
 
 # Macro def: object filename used
 OBJECTS =  exceptionImp.o h5Constants.o h5Imp.o h5aImp.o h5dImp.o h5eImp.o h5fImp.o h5gImp.o h5iImp.o h5lImp.o h5oImp.o h5pImp.o h5rImp.o h5sImp.o h5tImp.o nativeData.o h5util.o h5zImp.o
@@ -47,7 +47,7 @@
 
 libjhdf5: $(OBJECTS)
 	-mkdir -p $(LIBDIR);
-	$(LD) $(LDOPT) -o $(LIBDIR)/libjhdf5.$(JSLEXT) $(LDOPT2) $(OBJECTS) $(LIBS)
+	$(LD) $(LDOPT) $(LDFLAGS) -o $(LIBDIR)/libjhdf5.$(JSLEXT) $(LDOPT2) $(OBJECTS) $(LIBS)
 
 clean:
 	$(RM) -f *.o so_locations $(LIBDIR)/libjhdf5.$(JSLEXT)
--- a/native/hdflib/Makefile.in
+++ b/native/hdflib/Makefile.in
@@ -41,7 +41,7 @@
 CFLAGS = $(DEFS) -I. -I$(JAVAINC1) -I$(JAVAINC2) -I$(HDFINC)
 
 # Be sure to add -lbsd if compiling in a SYSV environment
-LIBS =  $(HDFLIB)/libmfhdf.$(LLEXT) $(HDFLIB)/libdf.$(LLEXT) $(SZLIB) $(ZLIB) $(JPEGLIB) -lm
+LIBS =  -L$(HDFLIB) -lmfhdf -ldf $(SZLIB) $(ZLIB) $(JPEGLIB) -lm
 
 # Macro def: object filename used
 OBJECTS =  hdfstructsutil.o \
@@ -60,7 +60,7 @@
 
 libjhdf: $(OBJECTS) 
 	-mkdir -p $(LIBDIR);
-	$(LD) $(LDOPT) -o $(LIBDIR)/libjhdf.$(JSLEXT) $(LDOPT2) $(OBJECTS) $(LIBS)
+	$(LD) $(LDOPT) $(LDFLAGS) -o $(LIBDIR)/libjhdf.$(JSLEXT) $(LDOPT2) $(OBJECTS) $(LIBS)
 
 clean:
 	$(RM) -f *.o so_locations $(LIBDIR)/libjhdf.$(JSLEXT)