Accept configure --with-cafile without filename
This commit is contained in:
		
							
								
								
									
										29
									
								
								acinclude.m4
									
									
									
									
									
								
							
							
						
						
									
										29
									
								
								acinclude.m4
									
									
									
									
									
								
							| @@ -513,20 +513,23 @@ fi | |||||||
| AC_SUBST(DEF_CAFILE) | AC_SUBST(DEF_CAFILE) | ||||||
| w3m_cafile="" | w3m_cafile="" | ||||||
| if test x"$enable_sslverify" = xyes; then | if test x"$enable_sslverify" = xyes; then | ||||||
|   AC_MSG_CHECKING(for CA bundle location) |   AC_MSG_CHECKING(for CA file location) | ||||||
|   AC_ARG_WITH(cafile, |   AC_ARG_WITH(cafile, | ||||||
|     [   --with-cafile=CAFILE		CA file to verify SSL certificate], |   [   --with-cafile[[=CAFILE]]	CA file to verify SSL certificate | ||||||
|     [w3m_cafile="$with_cafile"],[ | 				default: autodetected],,[with_cafile=yes]) | ||||||
|       for f in /etc/ssl/certs/ca-certificates.crt \ |   if test x"$with_cafile" = xyes; then | ||||||
|         /etc/pki/tls/certs/ca-bundle.crt \ |     for f in /etc/ssl/certs/ca-certificates.crt \ | ||||||
|         /etc/ssl/ca-bundle.pem \ |       /etc/pki/tls/certs/ca-bundle.crt \ | ||||||
|         /usr/ssl/certs/ca-bundle.crt \ |       /etc/ssl/ca-bundle.pem \ | ||||||
|         /usr/local/share/certs/ca-root-nss.crt \ |       /usr/ssl/certs/ca-bundle.crt \ | ||||||
|         /etc/ssl/cert.pem \ |       /usr/local/share/certs/ca-root-nss.crt \ | ||||||
|         /etc/certs/ca-certificates.crt; do |       /etc/ssl/cert.pem \ | ||||||
|         if test -f "$f" -a -r "$f"; then w3m_cafile="$f"; break; fi |       /etc/certs/ca-certificates.crt; do | ||||||
|       done |       if test -f "$f" -a -r "$f"; then w3m_cafile="$f"; break; fi | ||||||
|     ]) |     done | ||||||
|  |   elif test x"$with_cafile" != xno; then | ||||||
|  |     w3m_cafile="$with_cafile" | ||||||
|  |   fi | ||||||
|   AC_MSG_RESULT($w3m_cafile) |   AC_MSG_RESULT($w3m_cafile) | ||||||
| fi | fi | ||||||
| AC_DEFINE_UNQUOTED(DEF_CAFILE, "$w3m_cafile") | AC_DEFINE_UNQUOTED(DEF_CAFILE, "$w3m_cafile") | ||||||
|   | |||||||
							
								
								
									
										34
									
								
								configure
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										34
									
								
								configure
									
									
									
									
										vendored
									
									
								
							| @@ -1536,7 +1536,8 @@ Optional Packages: | |||||||
|   --with-mailer=MAILER		default mailer (/usr/bin/mail) |   --with-mailer=MAILER		default mailer (/usr/bin/mail) | ||||||
|   --with-browser=BROWSER	default browser (/usr/bin/firefox) |   --with-browser=BROWSER	default browser (/usr/bin/firefox) | ||||||
|   --with-ssl			support https protocol |   --with-ssl			support https protocol | ||||||
|    --with-cafile=CAFILE		CA file to verify SSL certificate |    --with-cafile[=CAFILE]	CA file to verify SSL certificate | ||||||
|  | 				default: autodetected | ||||||
|   --with-termlib=LIBS		terminal library |   --with-termlib=LIBS		terminal library | ||||||
| 				 LIBS is space separated list of: | 				 LIBS is space separated list of: | ||||||
| 				  terminfo mytinfo termcap tinfo ncurses curses | 				  terminfo mytinfo termcap tinfo ncurses curses | ||||||
| @@ -8563,26 +8564,29 @@ fi | |||||||
|  |  | ||||||
| w3m_cafile="" | w3m_cafile="" | ||||||
| if test x"$enable_sslverify" = xyes; then | if test x"$enable_sslverify" = xyes; then | ||||||
|   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CA bundle location" >&5 |   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CA file location" >&5 | ||||||
| $as_echo_n "checking for CA bundle location... " >&6; } | $as_echo_n "checking for CA file location... " >&6; } | ||||||
|  |  | ||||||
| # Check whether --with-cafile was given. | # Check whether --with-cafile was given. | ||||||
| if test "${with_cafile+set}" = set; then : | if test "${with_cafile+set}" = set; then : | ||||||
|   withval=$with_cafile; w3m_cafile="$with_cafile" |   withval=$with_cafile; | ||||||
| else | else | ||||||
|  |   with_cafile=yes | ||||||
|       for f in /etc/ssl/certs/ca-certificates.crt \ |  | ||||||
|         /etc/pki/tls/certs/ca-bundle.crt \ |  | ||||||
|         /etc/ssl/ca-bundle.pem \ |  | ||||||
|         /usr/ssl/certs/ca-bundle.crt \ |  | ||||||
|         /usr/local/share/certs/ca-root-nss.crt \ |  | ||||||
|         /etc/ssl/cert.pem \ |  | ||||||
|         /etc/certs/ca-certificates.crt; do |  | ||||||
|         if test -f "$f" -a -r "$f"; then w3m_cafile="$f"; break; fi |  | ||||||
|       done |  | ||||||
|  |  | ||||||
| fi | fi | ||||||
|  |  | ||||||
|  |   if test x"$with_cafile" = xyes; then | ||||||
|  |     for f in /etc/ssl/certs/ca-certificates.crt \ | ||||||
|  |       /etc/pki/tls/certs/ca-bundle.crt \ | ||||||
|  |       /etc/ssl/ca-bundle.pem \ | ||||||
|  |       /usr/ssl/certs/ca-bundle.crt \ | ||||||
|  |       /usr/local/share/certs/ca-root-nss.crt \ | ||||||
|  |       /etc/ssl/cert.pem \ | ||||||
|  |       /etc/certs/ca-certificates.crt; do | ||||||
|  |       if test -f "$f" -a -r "$f"; then w3m_cafile="$f"; break; fi | ||||||
|  |     done | ||||||
|  |   elif test x"$with_cafile" != xno; then | ||||||
|  |     w3m_cafile="$with_cafile" | ||||||
|  |   fi | ||||||
|   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $w3m_cafile" >&5 |   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $w3m_cafile" >&5 | ||||||
| $as_echo "$w3m_cafile" >&6; } | $as_echo "$w3m_cafile" >&6; } | ||||||
| fi | fi | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user