Source
119
119
-L*)
120
120
LIBCURL_LDFLAGS="$LIBCURL_LDFLAGS $i"
121
121
;;
122
122
-R*)
123
123
LIBCURL_LDFLAGS="$LIBCURL_LDFLAGS -Wl,$i"
124
124
;;
125
125
-lcurl)
126
126
if test "x$enable_static_libs" = "xyes" -a "x$static_linking_support" = "xno"; then
127
127
i="$_curl_dir_lib/libcurl.a"
128
128
elif test "x$enable_static_libs" = "xyes"; then
129
-
i="-Wl,-Bstatic $i -Wl,-Bdynamic"
129
+
i="${static_linking_support}static $i ${static_linking_support}dynamic"
130
130
fi
131
131
LIBCURL_LIBS="$LIBCURL_LIBS $i"
132
132
;;
133
133
-l*)
134
134
if test "x$enable_static_libs" = "xyes"; then
135
135
_lib_name=`echo "$i" | cut -b3-`
136
136
test -f "$_curl_dir_lib/lib$_lib_name.a" && i="$_curl_dir_lib/lib$_lib_name.a"
137
137
fi
138
138
LIBCURL_LIBS="$LIBCURL_LIBS $i"
139
139
;;
171
171
_lib_i=$i
172
172
_lib_name=`echo "$i" | cut -b3-`
173
173
AC_CHECK_LIB($_lib_name , main,[
174
174
if test "x$enable_static_libs" = "xyes"; then
175
175
case $i in
176
176
-lssl|-lcrypto)
177
177
test "x$want_openssl" = "xyes" && i="$OPENSSL_LIBS"
178
178
;;
179
179
-lldap|-lldap_r|-llber)
180
180
test "x$want_ldap" = "xyes" && i="$LDAP_LIBS"
181
-
;;
182
-
-lssl_a|-lcrypto_a)
183
-
test "x$want_openssl" = "xyes" && i="$OPENSSL_LIBS"
184
-
;;
185
-
-lldap_a|-lldap_r_a|-llber_a)
186
-
test "x$want_ldap" = "xyes" && i="$LDAP_LIBS"
187
181
;;
188
182
-l*)
189
183
test -f "$_curl_dir_lib/lib$_lib_name.a" && i="$_curl_dir_lib/lib$_lib_name.a"
190
184
;;
191
185
esac
192
186
fi
193
187
test -z "${LIBCURL_LIBS##*$_lib_i*}" && LIBCURL_LIBS=`echo "$LIBCURL_LIBS"|sed "s|$_lib_i||g"`
194
188
test -z "${LIBCURL_LIBS##*$i*}" || LIBCURL_LIBS="$LIBCURL_LIBS $i"
195
189
],[
196
190
AC_MSG_ERROR([static library $_lib_name required for linking libcurl not found])