mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
Dan Grayson pointed out that we set the CURL_CA_BUNDLE variable wrongly in
the configure script. We set it differently now and generate the lib/ca-bundle.h file entirely.
This commit is contained in:
parent
269d491b6a
commit
756bc0f4b7
16
configure.ac
16
configure.ac
@ -14,7 +14,7 @@ This configure script may be copied, distributed and modified under the
|
|||||||
terms of the curl license; see COPYING for more details])
|
terms of the curl license; see COPYING for more details])
|
||||||
|
|
||||||
AC_CONFIG_SRCDIR([lib/urldata.h])
|
AC_CONFIG_SRCDIR([lib/urldata.h])
|
||||||
AM_CONFIG_HEADER(lib/config.h src/config.h tests/server/config.h lib/ca-bundle.h)
|
AM_CONFIG_HEADER(lib/config.h src/config.h tests/server/config.h )
|
||||||
AM_MAINTAINER_MODE
|
AM_MAINTAINER_MODE
|
||||||
|
|
||||||
AC_PATH_PROG( SED, sed, , $PATH:/usr/bin:/usr/local/bin)
|
AC_PATH_PROG( SED, sed, , $PATH:/usr/bin:/usr/local/bin)
|
||||||
@ -834,7 +834,6 @@ AC_CHECK_FUNCS( socket \
|
|||||||
tcgetattr \
|
tcgetattr \
|
||||||
perror \
|
perror \
|
||||||
closesocket \
|
closesocket \
|
||||||
setvbuf \
|
|
||||||
sigaction \
|
sigaction \
|
||||||
signal \
|
signal \
|
||||||
getpass_r \
|
getpass_r \
|
||||||
@ -890,7 +889,7 @@ AC_HELP_STRING([--without-ca-bundle], [Don't install the CA bundle]),
|
|||||||
[ ca="$withval" ],
|
[ ca="$withval" ],
|
||||||
[
|
[
|
||||||
if test "x$prefix" != xNONE; then
|
if test "x$prefix" != xNONE; then
|
||||||
ca="$prefix/share/curl/curl-ca-bundle.crt"
|
ca="\${prefix}/share/curl/curl-ca-bundle.crt"
|
||||||
else
|
else
|
||||||
ca="$ac_default_prefix/share/curl/curl-ca-bundle.crt"
|
ca="$ac_default_prefix/share/curl/curl-ca-bundle.crt"
|
||||||
fi
|
fi
|
||||||
@ -901,15 +900,10 @@ then
|
|||||||
ca="no"
|
ca="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$ca" = "xno"; then
|
if test "x$ca" != "xno"; then
|
||||||
dnl let's not keep "no" as path name, blank it instead
|
CURL_CA_BUNDLE='"'$ca'"'
|
||||||
ca=""
|
AC_SUBST(CURL_CA_BUNDLE)
|
||||||
else
|
|
||||||
AC_DEFINE_UNQUOTED(CURL_CA_BUNDLE, "$ca", [CA bundle full path name])
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CURL_CA_BUNDLE="$ca"
|
|
||||||
AC_SUBST(CURL_CA_BUNDLE)
|
|
||||||
AC_MSG_RESULT([$ca])
|
AC_MSG_RESULT([$ca])
|
||||||
|
|
||||||
AC_PROG_YACC
|
AC_PROG_YACC
|
||||||
|
@ -69,16 +69,23 @@ memdebug.h inet_ntoa_r.h http_chunks.c http_chunks.h strtok.c strtok.h \
|
|||||||
connect.c connect.h llist.c llist.h hash.c hash.h multi.c \
|
connect.c connect.h llist.c llist.h hash.c hash.h multi.c \
|
||||||
content_encoding.c content_encoding.h share.c share.h http_digest.c \
|
content_encoding.c content_encoding.h share.c share.h http_digest.c \
|
||||||
md5.c md5.h http_digest.h http_negotiate.c http_negotiate.h \
|
md5.c md5.h http_digest.h http_negotiate.c http_negotiate.h \
|
||||||
http_ntlm.c http_ntlm.h
|
http_ntlm.c http_ntlm.h ca-bundle.h
|
||||||
|
|
||||||
noinst_HEADERS = setup.h transfer.h
|
noinst_HEADERS = setup.h transfer.h
|
||||||
|
|
||||||
|
BUILT_SOURCES = $(srcdir)/getdate.c $(srcdir)/ca-bundle.h
|
||||||
|
|
||||||
# Say $(srcdir), so GNU make does not report an ambiguity with the .y.c rule.
|
# Say $(srcdir), so GNU make does not report an ambiguity with the .y.c rule.
|
||||||
$(srcdir)/getdate.c: getdate.y
|
$(srcdir)/getdate.c: getdate.y
|
||||||
cd $(srcdir) && \
|
cd $(srcdir) && \
|
||||||
$(YACC) $(YFLAGS) getdate.y; \
|
$(YACC) $(YFLAGS) getdate.y; \
|
||||||
mv -f y.tab.c getdate.c
|
mv -f y.tab.c getdate.c
|
||||||
|
|
||||||
|
$(srcdir)/ca-bundle.h: Makefile.in Makefile
|
||||||
|
cd $(srcdir) && \
|
||||||
|
echo "/* The file is generated automaticly */" > $@
|
||||||
|
echo '#define CURL_CA_BUNDLE @CURL_CA_BUNDLE@' >> $@
|
||||||
|
|
||||||
install-data-hook:
|
install-data-hook:
|
||||||
@if test -n "@CURL_CA_BUNDLE@"; then \
|
@if test -n "@CURL_CA_BUNDLE@"; then \
|
||||||
$(mkinstalldirs) `dirname $(DESTDIR)@CURL_CA_BUNDLE@`; \
|
$(mkinstalldirs) `dirname $(DESTDIR)@CURL_CA_BUNDLE@`; \
|
||||||
@ -88,4 +95,4 @@ install-data-hook:
|
|||||||
# this hook is mainly for non-unix systems to build even if configure
|
# this hook is mainly for non-unix systems to build even if configure
|
||||||
# isn't run
|
# isn't run
|
||||||
dist-hook:
|
dist-hook:
|
||||||
cp $(srcdir)/ca-bundle.h.in $(distdir)/ca-bundle.h
|
echo "/* ca bundle path set in here*/" > $(distdir)/ca-bundle.h
|
||||||
|
Loading…
Reference in New Issue
Block a user