Commit fd4af8d9 authored by Ted Zlatanov's avatar Ted Zlatanov
Browse files

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.
parent 418401a5
2011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
* 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 <bkey76@gmail.com> 2011-04-15 Ben Key <bkey76@gmail.com>
* configure.bat: Modified the code that parses the --cflags and * configure.bat: Modified the code that parses the --cflags and
......
...@@ -316,6 +316,15 @@ ...@@ -316,6 +316,15 @@
`dynamic-library-alist' and the value of `libpng-version', and `dynamic-library-alist' and the value of `libpng-version', and
download compatible DLLs if needed. 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 * Experimental SVG support
SVG support is currently experimental, and not built by default. SVG support is currently experimental, and not built by default.
......
...@@ -99,10 +99,13 @@ set COMPILER= ...@@ -99,10 +99,13 @@ set COMPILER=
set usercflags= set usercflags=
set docflags= set docflags=
set userldflags= set userldflags=
set extrauserlibs=
set doldflags= set doldflags=
set doextralibs=
set sep1= set sep1=
set sep2= set sep2=
set sep3= set sep3=
set sep4=
set distfiles= set distfiles=
rem ---------------------------------------------------------------------- rem ----------------------------------------------------------------------
...@@ -120,10 +123,12 @@ if "%1" == "--profile" goto profile ...@@ -120,10 +123,12 @@ if "%1" == "--profile" goto profile
if "%1" == "--no-cygwin" goto nocygwin if "%1" == "--no-cygwin" goto nocygwin
if "%1" == "--cflags" goto usercflags if "%1" == "--cflags" goto usercflags
if "%1" == "--ldflags" goto userldflags if "%1" == "--ldflags" goto userldflags
if "%1" == "--lib" goto extrauserlibs
if "%1" == "--without-png" goto withoutpng if "%1" == "--without-png" goto withoutpng
if "%1" == "--without-jpeg" goto withoutjpeg if "%1" == "--without-jpeg" goto withoutjpeg
if "%1" == "--without-gif" goto withoutgif if "%1" == "--without-gif" goto withoutgif
if "%1" == "--without-tiff" goto withouttiff if "%1" == "--without-tiff" goto withouttiff
if "%1" == "--without-gnutls" goto withoutgnutls
if "%1" == "--without-xpm" goto withoutxpm if "%1" == "--without-xpm" goto withoutxpm
if "%1" == "--with-svg" goto withsvg if "%1" == "--with-svg" goto withsvg
if "%1" == "--distfiles" goto distfiles if "%1" == "--distfiles" goto distfiles
...@@ -142,11 +147,13 @@ echo. --profile enable profiling ...@@ -142,11 +147,13 @@ echo. --profile enable profiling
echo. --no-cygwin use -mno-cygwin option with GCC echo. --no-cygwin use -mno-cygwin option with GCC
echo. --cflags FLAG pass FLAG to compiler echo. --cflags FLAG pass FLAG to compiler
echo. --ldflags FLAG pass FLAG to compiler when linking 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-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-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-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-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-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. --with-svg use the RSVG library (experimental)
echo. --distfiles path to files for make dist, e.g. libXpm.dll echo. --distfiles path to files for make dist, e.g. libXpm.dll
if "%use_extensions%" == "0" goto end if "%use_extensions%" == "0" goto end
...@@ -242,6 +249,14 @@ set sep1= %nothing% ...@@ -242,6 +249,14 @@ set sep1= %nothing%
shift shift
goto again goto again
:extrauserlibs
shift
echo. extrauserlibs: %extrauserlibs%
set extrauserlibs=%extrauserlibs%%sep4%%1
set sep4= %nothing%
shift
goto again
rem ---------------------------------------------------------------------- rem ----------------------------------------------------------------------
:userldflags :userldflags
...@@ -288,6 +303,14 @@ goto again ...@@ -288,6 +303,14 @@ goto again
rem ---------------------------------------------------------------------- rem ----------------------------------------------------------------------
:withoutgnutls
set tlssupport=N
set HAVE_GNUTLS=
shift
goto again
rem ----------------------------------------------------------------------
:withouttiff :withouttiff
set tiffsupport=N set tiffsupport=N
set HAVE_TIFF= set HAVE_TIFF=
...@@ -516,6 +539,30 @@ set HAVE_PNG=1 ...@@ -516,6 +539,30 @@ set HAVE_PNG=1
:pngDone :pngDone
rm -f junk.c junk.obj 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 if (%jpegsupport%) == (N) goto jpegDone
echo Checking for jpeg-6b... echo Checking for jpeg-6b...
...@@ -688,6 +735,8 @@ for %%v in (%usercflags%) do if not (%%v)==() set docflags=Y ...@@ -688,6 +735,8 @@ for %%v in (%usercflags%) do if not (%%v)==() set docflags=Y
if (%docflags%)==(Y) echo USER_CFLAGS=%usercflags%>>config.settings if (%docflags%)==(Y) echo USER_CFLAGS=%usercflags%>>config.settings
for %%v in (%userldflags%) do if not (%%v)==() set doldflags=Y for %%v in (%userldflags%) do if not (%%v)==() set doldflags=Y
if (%doldflags%)==(Y) echo USER_LDFLAGS=%userldflags%>>config.settings 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 # End of settings from configure.bat>>config.settings
echo. >>config.settings echo. >>config.settings
...@@ -700,6 +749,7 @@ if (%docflags%) == (Y) echo #define USER_CFLAGS " %usercflags%">>config.tmp ...@@ -700,6 +749,7 @@ if (%docflags%) == (Y) echo #define USER_CFLAGS " %usercflags%">>config.tmp
if (%doldflags%) == (Y) echo #define USER_LDFLAGS " %userldflags%">>config.tmp if (%doldflags%) == (Y) echo #define USER_LDFLAGS " %userldflags%">>config.tmp
if (%profile%) == (Y) echo #define PROFILING 1 >>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_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_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>config.tmp
if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 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 if not "(%HAVE_TIFF%)" == "()" echo #define HAVE_TIFF 1 >>config.tmp
...@@ -838,6 +888,7 @@ set distfiles= ...@@ -838,6 +888,7 @@ set distfiles=
set HAVE_DISTFILES= set HAVE_DISTFILES=
set distFilesOk= set distFilesOk=
set pngsupport= set pngsupport=
set tlssupport=
set jpegsupport= set jpegsupport=
set gifsupport= set gifsupport=
set tiffsupport= set tiffsupport=
......
...@@ -279,6 +279,10 @@ ifdef NOCYGWIN ...@@ -279,6 +279,10 @@ ifdef NOCYGWIN
NOCYGWIN = -mno-cygwin NOCYGWIN = -mno-cygwin
endif endif
ifdef USER_LIBS
USER_LIBS := $(patsubst %,-l%,$(USER_LIBS))
endif
ifeq "$(ARCH)" "i386" ifeq "$(ARCH)" "i386"
ifdef NOOPT ifdef NOOPT
ARCH_CFLAGS = -c $(DEBUG_FLAG) $(NOCYGWIN) ARCH_CFLAGS = -c $(DEBUG_FLAG) $(NOCYGWIN)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment