[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r103996: Add GnuTLS support for W32.
From: |
Ted Zlatanov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r103996: Add GnuTLS support for W32. |
Date: |
Sun, 24 Apr 2011 20:29:31 -0500 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 103996
committer: Ted Zlatanov <address@hidden>
branch nick: quickfixes
timestamp: Sun 2011-04-24 20:29:31 -0500
message:
Add GnuTLS support for W32.
* nt/configure.bat: New options --without-gnutls and --lib, new build
variable USER_LIBS, automatically detect GnuTLS. Copies the PNG
library setup with trivial modifications.
* nt/INSTALL: Add instructions for GnuTLS support.
* nt/gmake.defs: Prefix USER_LIBS with -l.
modified:
nt/ChangeLog
nt/INSTALL
nt/configure.bat
nt/gmake.defs
=== modified file 'nt/ChangeLog'
--- a/nt/ChangeLog 2011-04-15 22:48:00 +0000
+++ b/nt/ChangeLog 2011-04-25 01:29:31 +0000
@@ -1,3 +1,11 @@
+2011-04-24 Teodor Zlatanov <address@hidden>
+
+ * configure.bat: New options --without-gnutls and --lib, new build
+ variable USER_LIBS, automatically detect GnuTLS. Copies the PNG
+ library setup with trivial modifications.
+ * INSTALL: Add instructions for GnuTLS support.
+ * gmake.defs: Prefix USER_LIBS with -l.
+
2011-04-15 Ben Key <address@hidden>
* configure.bat: Modified the code that parses the --cflags and
=== modified file 'nt/INSTALL'
--- a/nt/INSTALL 2011-04-15 22:48:00 +0000
+++ b/nt/INSTALL 2011-04-25 01:29:31 +0000
@@ -316,6 +316,15 @@
`dynamic-library-alist' and the value of `libpng-version', and
download compatible DLLs if needed.
+* Optional GnuTLS support
+
+ You can build Emacs with GnuTLS support. Put the gnutls/gnutls.h header in
+ the include path and link to the appropriate libraries (gnutls.dll and
+ gcrypt.dll) with the --lib option.
+
+ You can get pre-built binaries and an installer at
+ http://josefsson.org/gnutls4win/.
+
* Experimental SVG support
SVG support is currently experimental, and not built by default.
=== modified file 'nt/configure.bat'
--- a/nt/configure.bat 2011-04-15 22:48:00 +0000
+++ b/nt/configure.bat 2011-04-25 01:29:31 +0000
@@ -99,10 +99,13 @@
set usercflags=
set docflags=
set userldflags=
+set extrauserlibs=
set doldflags=
+set doextralibs=
set sep1=
set sep2=
set sep3=
+set sep4=
set distfiles=
rem ----------------------------------------------------------------------
@@ -120,10 +123,12 @@
if "%1" == "--no-cygwin" goto nocygwin
if "%1" == "--cflags" goto usercflags
if "%1" == "--ldflags" goto userldflags
+if "%1" == "--lib" goto extrauserlibs
if "%1" == "--without-png" goto withoutpng
if "%1" == "--without-jpeg" goto withoutjpeg
if "%1" == "--without-gif" goto withoutgif
if "%1" == "--without-tiff" goto withouttiff
+if "%1" == "--without-gnutls" goto withoutgnutls
if "%1" == "--without-xpm" goto withoutxpm
if "%1" == "--with-svg" goto withsvg
if "%1" == "--distfiles" goto distfiles
@@ -142,11 +147,13 @@
echo. --no-cygwin use -mno-cygwin option with GCC
echo. --cflags FLAG pass FLAG to compiler
echo. --ldflags FLAG pass FLAG to compiler when linking
+echo. --lib LIB link to extra library LIB
echo. --without-png do not use PNG library even if it is installed
echo. --without-jpeg do not use JPEG library even if it is installed
echo. --without-gif do not use GIF library even if it is installed
echo. --without-tiff do not use TIFF library even if it is installed
echo. --without-xpm do not use XPM library even if it is installed
+echo. --without-gnutls do not use GNUTLS library even if it is
installed
echo. --with-svg use the RSVG library (experimental)
echo. --distfiles path to files for make dist, e.g. libXpm.dll
if "%use_extensions%" == "0" goto end
@@ -242,6 +249,14 @@
shift
goto again
+:extrauserlibs
+shift
+echo. extrauserlibs: %extrauserlibs%
+set extrauserlibs=%extrauserlibs%%sep4%%1
+set sep4= %nothing%
+shift
+goto again
+
rem ----------------------------------------------------------------------
:userldflags
@@ -288,6 +303,14 @@
rem ----------------------------------------------------------------------
+:withoutgnutls
+set tlssupport=N
+set HAVE_GNUTLS=
+shift
+goto again
+
+rem ----------------------------------------------------------------------
+
:withouttiff
set tiffsupport=N
set HAVE_TIFF=
@@ -516,6 +539,30 @@
:pngDone
rm -f junk.c junk.obj
+if (%tlssupport%) == (N) goto tlsDone
+
+rem this is a copy of the PNG detection
+echo Checking for libgnutls...
+echo #include "gnutls/gnutls.h" >junk.c
+echo main (){} >>junk.c
+rem -o option is ignored with cl, but allows result to be consistent.
+echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log
+%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out
2>>config.log
+if exist junk.obj goto haveTls
+
+echo ...gnutls.h not found, building without TLS support.
+echo The failed program was: >>config.log
+type junk.c >>config.log
+set HAVE_GNUTLS=
+goto :tlsDone
+
+:haveTls
+echo ...GNUTLS header available, building with GNUTLS support.
+set HAVE_GNUTLS=1
+
+:tlsDone
+rm -f junk.c junk.obj
+
if (%jpegsupport%) == (N) goto jpegDone
echo Checking for jpeg-6b...
@@ -688,6 +735,8 @@
if (%docflags%)==(Y) echo USER_CFLAGS=%usercflags%>>config.settings
for %%v in (%userldflags%) do if not (%%v)==() set doldflags=Y
if (%doldflags%)==(Y) echo USER_LDFLAGS=%userldflags%>>config.settings
+for %%v in (%extrauserlibs%) do if not (%%v)==() set doextralibs=Y
+if (%doextralibs%)==(Y) echo USER_LIBS=%extrauserlibs%>>config.settings
echo # End of settings from configure.bat>>config.settings
echo. >>config.settings
@@ -700,6 +749,7 @@
if (%doldflags%) == (Y) echo #define USER_LDFLAGS " %userldflags%">>config.tmp
if (%profile%) == (Y) echo #define PROFILING 1 >>config.tmp
if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>config.tmp
+if not "(%HAVE_GNUTLS%)" == "()" echo #define HAVE_GNUTLS 1 >>config.tmp
if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>config.tmp
if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>config.tmp
if not "(%HAVE_TIFF%)" == "()" echo #define HAVE_TIFF 1 >>config.tmp
@@ -838,6 +888,7 @@
set HAVE_DISTFILES=
set distFilesOk=
set pngsupport=
+set tlssupport=
set jpegsupport=
set gifsupport=
set tiffsupport=
=== modified file 'nt/gmake.defs'
--- a/nt/gmake.defs 2011-01-25 04:08:28 +0000
+++ b/nt/gmake.defs 2011-04-25 01:29:31 +0000
@@ -279,6 +279,10 @@
NOCYGWIN = -mno-cygwin
endif
+ifdef USER_LIBS
+USER_LIBS := $(patsubst %,-l%,$(USER_LIBS))
+endif
+
ifeq "$(ARCH)" "i386"
ifdef NOOPT
ARCH_CFLAGS = -c $(DEBUG_FLAG) $(NOCYGWIN)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r103996: Add GnuTLS support for W32.,
Ted Zlatanov <=