aboutsummaryrefslogtreecommitdiff
blob: 326af7672ad0233501f2272821b449f8762899b4 (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
Fix build with as-needed

--- ceph-0.22/configure.ac
+++ ceph-0.22/configure.ac
@@ -160,6 +160,7 @@
 AC_CHECK_HEADER([openssl/md5.h],
 	[],
 	[AC_MSG_ERROR([Sorry you need openssl dev files (libssl-dev on debian)])])
+PKG_CHECK_MODULES([OPENSSL], [openssl])
 
 AC_CHECK_HEADERS([sys/xattr.h arpa/inet.h netdb.h netinet/in.h sys/file.h sys/ioctl.h sys/mount.h sys/param.h sys/socket.h sys/statvfs.h sys/time.h sys/vfs.h syslog.h utime.h])
 
--- ceph-0.22/src/Makefile.am
+++ ceph-0.22/src/Makefile.am
@@ -10,37 +10,37 @@
 
 # monitor
 cmon_SOURCES = cmon.cc msg/SimpleMessenger.cc
-cmon_LDADD = libmon.a libcrush.a libcommon.a -lpthread -lm -lcrypto
+cmon_LDADD = libmon.a libcrush.a libcommon.a -lpthread -lm $(OPENSSL_LIBS)
 bin_PROGRAMS += cmon
 
 # osd
 cosd_SOURCES = cosd.cc msg/SimpleMessenger.cc objclass/class_debug.cc \
 	       objclass/class_api.cc
-cosd_LDADD = libosd.a libos.a libcrush.a libcommon.a -ldl -lpthread -lm -lcrypto
+cosd_LDADD = libosd.a libos.a libcrush.a libcommon.a -ldl -lpthread -lm $(OPENSSL_LIBS)
 bin_PROGRAMS += cosd
 cosd_CXXFLAGS = ${AM_CFLAGS}
 
 # mds
 cmds_SOURCES = cmds.cc msg/SimpleMessenger.cc
-cmds_LDADD = libmds.a libosdc.a libcrush.a libcommon.a -lpthread -lm -lcrypto
+cmds_LDADD = libmds.a libosdc.a libcrush.a libcommon.a -lpthread -lm $(OPENSSL_LIBS)
 bin_PROGRAMS += cmds
 cmds_CXXFLAGS = ${AM_CFLAGS}
 
 # admin tools
 ceph_SOURCES = ceph.cc msg/SimpleMessenger.cc
-ceph_LDADD = libcrush.a libcommon.a -ledit -lpthread -lm -lcrypto
+ceph_LDADD = libcrush.a libcommon.a -ledit -lpthread -lm $(OPENSSL_LIBS)
 cconf_SOURCES = cconf.cc
-cconf_LDADD = libcommon.a -lpthread -lm -lcrypto
+cconf_LDADD = libcommon.a -lpthread -lm $(OPENSSL_LIBS)
 cauthtool_SOURCES = cauthtool.cc
-cauthtool_LDADD = libcommon.a -lpthread -lm -lcrypto
+cauthtool_LDADD = libcommon.a -lpthread -lm $(OPENSSL_LIBS)
 bin_PROGRAMS += ceph cconf cauthtool
 
 monmaptool_SOURCES = monmaptool.cc
-monmaptool_LDADD = libcommon.a -lpthread -lm -lcrypto
+monmaptool_LDADD = libcommon.a -lpthread -lm $(OPENSSL_LIBS)
 crushtool_SOURCES = crushtool.cc
-crushtool_LDADD = libcrush.a libcommon.a -lpthread -lm -lcrypto
+crushtool_LDADD = libcrush.a libcommon.a -lpthread -lm $(OPENSSL_LIBS)
 osdmaptool_SOURCES = osdmaptool.cc
-osdmaptool_LDADD = libcrush.a libcommon.a -lpthread -lm -lcrypto
+osdmaptool_LDADD = libcrush.a libcommon.a -lpthread -lm $(OPENSSL_LIBS)
 bin_PROGRAMS += monmaptool crushtool osdmaptool
 
 mount_ceph_SOURCES = mount/mount.ceph.c
@@ -48,7 +48,7 @@
 
 # synthetic client
 csyn_SOURCES = csyn.cc msg/SimpleMessenger.cc
-csyn_LDADD = libclient.a libosdc.a libcrush.a libcommon.a -lpthread -lm -lcrypto
+csyn_LDADD = libclient.a libosdc.a libcrush.a libcommon.a -lpthread -lm $(OPENSSL_LIBS)
 bin_PROGRAMS += csyn
 
 core: cmon cosd cmds ceph cconf monmaptool osdmaptool crushtool csyn
@@ -57,7 +57,7 @@
 # fuse targets?
 if WITH_FUSE
 cfuse_SOURCES = cfuse.cc msg/SimpleMessenger.cc client/fuse.cc client/fuse_ll.cc
-cfuse_LDADD = -lfuse libclient.a libosdc.a libcrush.a libcommon.a -lpthread -lm -lcrypto
+cfuse_LDADD = -lfuse libclient.a libosdc.a libcrush.a libcommon.a -lpthread -lm $(OPENSSL_LIBS)
 cfuse_CXXFLAGS = ${AM_CFLAGS}
 bin_PROGRAMS += cfuse
 
@@ -87,26 +87,26 @@
 if WITH_DEBUG
 
 psim_SOURCES = psim.cc
-psim_LDADD = libcrush.a libcommon.a -lpthread -lm -lcrypto
+psim_LDADD = libcrush.a libcommon.a -lpthread -lm $(OPENSSL_LIBS)
 bin_PROGRAMS += psim
 
 testmsgr_SOURCES = testmsgr.cc msg/SimpleMessenger.cc
-testmsgr_LDADD = libcommon.a -lpthread -lm -lcrypto
+testmsgr_LDADD = libcommon.a -lpthread -lm $(OPENSSL_LIBS)
 bin_PROGRAMS += testmsgr
 
 test_ioctls_SOURCES = client/test_ioctls.c
 bin_PROGRAMS += test_ioctls
 
 dumpjournal_SOURCES = dumpjournal.cc msg/SimpleMessenger.cc
-dumpjournal_LDADD = libosdc.a libcrush.a libcommon.a -lpthread -lm -lcrypto
+dumpjournal_LDADD = libosdc.a libcrush.a libcommon.a -lpthread -lm $(OPENSSL_LIBS)
 dupstore_SOURCES = dupstore.cc
-dupstore_LDADD = libos.a libcommon.a -lpthread -lm -lcrypto
+dupstore_LDADD = libos.a libcommon.a -lpthread -lm $(OPENSSL_LIBS)
 streamtest_SOURCES = streamtest.cc
-streamtest_LDADD = libos.a libcommon.a -lpthread -lm -lcrypto
+streamtest_LDADD = libos.a libcommon.a -lpthread -lm $(OPENSSL_LIBS)
 bin_PROGRAMS += dumpjournal dupstore streamtest
 
 test_trans_SOURCES = test_trans.cc
-test_trans_LDADD = libos.a libcommon.a -lpthread -lm -lcrypto
+test_trans_LDADD = libos.a libcommon.a -lpthread -lm $(OPENSSL_LIBS)
 bin_PROGRAMS += test_trans
 
 
@@ -130,7 +130,8 @@
 	crush/hash.c
 libcrush_la_CFLAGS = ${AM_CFLAGS}
 libcrush_la_CXXFLAGS = ${AM_CXXFLAGS}
-libcrush_la_LDFLAGS = -version-info 1:0:0 -export-symbols-regex 'crush_.*' -lm
+libcrush_la_LDFLAGS = -version-info 1:0:0 -export-symbols-regex 'crush_.*'
+libcrush_la_LIBADD = -lm
 lib_LTLIBRARIES += libcrush.la
 
 # libceph
@@ -141,14 +142,14 @@
 	${libcommon_a_SOURCES} \
 	${libosdc_a_SOURCES}
 libceph_la_CFLAGS = ${AM_CFLAGS}
 libceph_la_CXXFLAGS= ${AM_CXXFLAGS}
-libceph_la_LIBADD = libcrush.la
-libceph_la_LDFLAGS = -version-info 1:0:0 -export-symbols-regex '^ceph_.*' -lpthread -lssl
+libceph_la_LIBADD = libcrush.la -lpthread $(OPENSSL_LIBS)
+libceph_la_LDFLAGS = -version-info 1:0:0 -export-symbols-regex '^ceph_.*' 
 lib_LTLIBRARIES += libceph.la
 
 if WITH_DEBUG
 testceph_SOURCES = client/testceph.cc
-testceph_LDADD = libceph.la libcrush.la -lpthread -lm -lcrypto
+testceph_LDADD = libceph.la libcrush.la -lpthread -lm $(OPENSSL_LIBS)
 bin_PROGRAMS += testceph
 endif
 
@@ -160,9 +160,9 @@
 	${libcommon_a_SOURCES}
 librados_la_SOURCES = ${librados_SOURCES}
 librados_la_CFLAGS = ${AM_CFLAGS}
-librados_la_CXXFLAGS = ${AM_CXXFLAGS}
-librados_la_LIBADD = libcrush.la
-librados_la_LDFLAGS = -version-info 1:0:0 -export-symbols-regex '^rados_.*' -lpthread
+librados_la_CXXFLAGS = ${AM_CXXFLAGS} 
+librados_la_LIBADD = libcrush.la -lpthread $(OPENSSL_LIBS)
+librados_la_LDFLAGS = -version-info 1:0:0 -export-symbols-regex '^rados_.*'
 lib_LTLIBRARIES += librados.la
 
 librados_a_SOURCES = ${librados_SOURCES}
@@ -170,21 +170,21 @@
 librados_a_CXXFLAGS = ${AM_CXXFLAGS}
 
 rados_SOURCES = rados.cc
-rados_LDADD = librados.la -lpthread -lm -lcrypto
+rados_LDADD = librados.la -lpthread -lm $(OPENSSL_LIBS)
 bin_PROGRAMS += rados
 
 if WITH_DEBUG
 testrados_SOURCES = testrados.c
-testrados_LDADD = librados.la -lpthread -lm -lcrypto
+testrados_LDADD = librados.la -lpthread -lm $(OPENSSL_LIBS)
 testradospp_SOURCES = testradospp.cc
-testradospp_LDADD = librados.la -lpthread -lm -lcrypto
+testradospp_LDADD = librados.la -lpthread -lm $(OPENSSL_LIBS)
 bin_PROGRAMS += testrados testradospp
 endif
 
 radosacl_SOURCES = radosacl.cc
-radosacl_LDADD = librados.la -lpthread -lm -lcrypto
+radosacl_LDADD = librados.la -lpthread -lm $(OPENSSL_LIBS)
 rbd_SOURCES = rbd.cc
-rbd_LDADD = librados.la -lpthread -lm -lcrypto
+rbd_LDADD = librados.la -lpthread -lm $(OPENSSL_LIBS)
 bin_PROGRAMS += radosacl rbd
 
 if WITH_RADOSGW
@@ -201,19 +201,19 @@
 # lib_LTLIBRARIES += libradosgw.a
 
 radosgw_SOURCES = rgw/rgw_main.cc
-radosgw_LDADD = libradosgw.a librados.a libcrush.a -lfcgi -lcrypto -lexpat -lpthread -lm
+radosgw_LDADD = libradosgw.a librados.a libcrush.a -lfcgi $(OPENSSL_LIBS) -lexpat -lpthread -lm
 radosgw_admin_SOURCES = rgw/rgw_admin.cc
-radosgw_admin_LDADD = libradosgw.a librados.a libcrush.a -lfcgi -lcrypto -lexpat -lpthread -lm
+radosgw_admin_LDADD = libradosgw.a librados.a libcrush.a -lfcgi $(OPENSSL_LIBS) -lexpat -lpthread -lm
 bin_PROGRAMS += radosgw radosgw_admin
 endif
 
 if WITH_DEBUG
 testcrypto_SOURCES = testcrypto.cc
-testcrypto_LDADD = libcommon.a -lpthread -lm -lcrypto
+testcrypto_LDADD = libcommon.a -lpthread -lm $(OPENSSL_LIBS)
 bin_PROGRAMS += testcrypto
 
 testkeys_SOURCES = testkeys.cc
-testkeys_LDADD = libmon.a libcommon.a -lpthread -lm -lcrypto
+testkeys_LDADD = libmon.a libcommon.a -lpthread -lm $(OPENSSL_LIBS)
 bin_PROGRAMS += testkeys
 endif
 
@@ -221,7 +221,7 @@
 ## rados object classes
 
 #libcls_crypto.so: cls_crypto.cc
-#	${CXX} -I. -fPIC -shared -g -o libcls_crypto.so -lcrypto cls_crypto.cc
+#	${CXX} -I. -fPIC -shared -g -o libcls_crypto.so $(OPENSSL_LIBS) cls_crypto.cc
 #BUILT_SOURCES += libcls_crypto.so
 
 #libcls_acl.so: cls_acl.cc
@@ -271,8 +271,8 @@
 LDADD =
 
 
-AM_CXXFLAGS = -Wall -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE -rdynamic
-AM_CFLAGS = -Wall -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE -rdynamic
+AM_CXXFLAGS = $(OPENSSL_CFLAGS) -Wall -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE -rdynamic
+AM_CFLAGS = $(OPENSSL_CFLAGS) -Wall -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE -rdynamic
 AM_LDFLAGS =
 
 if WITH_LIBATOMIC
@@ -294,7 +294,7 @@
 
 
 # work around old versions of automake that don't define $docdir
-docdir = ${datadir}/doc/ceph
+# docdir = ${datadir}/doc/ceph
 
 install-data-local:
 	$(install_sh_SCRIPT) -m 0755 cclass $(DESTDIR)$(bindir)/cclass