mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
ca-bundle stuff for configure and generated header file
This commit is contained in:
parent
daf55705e4
commit
ac285b453e
28
configure.in
28
configure.in
@ -8,7 +8,7 @@ AC_PREREQ(2.50)
|
|||||||
dnl First some basic init macros
|
dnl First some basic init macros
|
||||||
AC_INIT
|
AC_INIT
|
||||||
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)
|
AM_CONFIG_HEADER(lib/config.h src/config.h tests/server/config.h lib/ca-bundle.h)
|
||||||
|
|
||||||
dnl figure out the libcurl version
|
dnl figure out the libcurl version
|
||||||
VERSION=`sed -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curl.h`
|
VERSION=`sed -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curl.h`
|
||||||
@ -691,6 +691,32 @@ AC_PATH_PROGS( NROFF, gnroff nroff, ,
|
|||||||
$PATH:/usr/bin/:/usr/local/bin )
|
$PATH:/usr/bin/:/usr/local/bin )
|
||||||
AC_SUBST(NROFF)
|
AC_SUBST(NROFF)
|
||||||
|
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([CA cert bundle install path])
|
||||||
|
|
||||||
|
AC_ARG_WITH(ca-bundle,
|
||||||
|
AC_HELP_STRING([--with-ca-bundle=FILE], [File name to install the CA bundle as])
|
||||||
|
AC_HELP_STRING([--without-ca-bundle], [Don't install the CA bundle]),
|
||||||
|
[ ca="$withval" ],
|
||||||
|
[
|
||||||
|
if test "x$prefix" != xNONE; then
|
||||||
|
ca="$prefix/share/curl/curl-ca-bundle.crt"
|
||||||
|
else
|
||||||
|
ca="$ac_default_prefix/share/curl/curl-ca-bundle.crt"
|
||||||
|
fi
|
||||||
|
] )
|
||||||
|
|
||||||
|
if test "x$ca" = "xno"; then
|
||||||
|
dnl let's not keep "no" as path name, blank it instead
|
||||||
|
ca=""
|
||||||
|
else
|
||||||
|
AC_DEFINE_UNQUOTED(CURL_CA_BUNDLE, $ca, [CA bundle full path name])
|
||||||
|
fi
|
||||||
|
|
||||||
|
CURL_CA_BUNDLE="$ca"
|
||||||
|
AC_SUBST(CURL_CA_BUNDLE)
|
||||||
|
AC_MSG_RESULT([$ca])
|
||||||
|
|
||||||
AC_PROG_YACC
|
AC_PROG_YACC
|
||||||
|
|
||||||
dnl AC_PATH_PROG( RANLIB, ranlib, /usr/bin/ranlib,
|
dnl AC_PATH_PROG( RANLIB, ranlib, /usr/bin/ranlib,
|
||||||
|
@ -7,7 +7,7 @@ AUTOMAKE_OPTIONS = foreign nostdinc
|
|||||||
EXTRA_DIST = getdate.y Makefile.b32 Makefile.b32.resp Makefile.m32 \
|
EXTRA_DIST = getdate.y Makefile.b32 Makefile.b32.resp Makefile.m32 \
|
||||||
Makefile.vc6 Makefile.riscos libcurl.def dllinit.c curllib.dsp \
|
Makefile.vc6 Makefile.riscos libcurl.def dllinit.c curllib.dsp \
|
||||||
curllib.dsw config-vms.h config-win32.h config-riscos.h config-mac.h \
|
curllib.dsw config-vms.h config-win32.h config-riscos.h config-mac.h \
|
||||||
config.h.in
|
config.h.in ca-bundle.crt
|
||||||
|
|
||||||
lib_LTLIBRARIES = libcurl.la
|
lib_LTLIBRARIES = libcurl.la
|
||||||
|
|
||||||
@ -62,7 +62,6 @@ security.h security.c krb4.c krb4.h memdebug.c memdebug.h inet_ntoa_r.h \
|
|||||||
http_chunks.c http_chunks.h strtok.c strtok.h connect.c connect.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 share.c share.h
|
llist.c llist.h hash.c hash.h multi.c share.c share.h
|
||||||
|
|
||||||
|
|
||||||
noinst_HEADERS = setup.h transfer.h
|
noinst_HEADERS = setup.h transfer.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.
|
||||||
@ -70,3 +69,8 @@ $(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
|
||||||
|
|
||||||
|
install-data-hook:
|
||||||
|
@if test -n "@CURL_CA_BUNDLE@"; then \
|
||||||
|
@INSTALL_DATA@ ca-bundle.crt @CURL_CA_BUNDLE@; \
|
||||||
|
fi
|
||||||
|
31
lib/ca-bundle.h.in
Normal file
31
lib/ca-bundle.h.in
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#ifndef __CA_BUNDLE_H
|
||||||
|
#define __CA_BUNDLE_H
|
||||||
|
/*****************************************************************************
|
||||||
|
* _ _ ____ _
|
||||||
|
* Project ___| | | | _ \| |
|
||||||
|
* / __| | | | |_) | |
|
||||||
|
* | (__| |_| | _ <| |___
|
||||||
|
* \___|\___/|_| \_\_____|
|
||||||
|
*
|
||||||
|
* Copyright (C) 1998 - 2002, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* In order to be useful for every potential user, curl and libcurl are
|
||||||
|
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the MPL or the MIT/X-derivate
|
||||||
|
* licenses. You may pick one of these licenses.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef CURL_CA_BUNDLE
|
||||||
|
/* Set this to the full path file name of the ca cert bundle */
|
||||||
|
#undef CURL_CA_BUNDLE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __CA_BUNDLE_H */
|
Loading…
Reference in New Issue
Block a user