Index: trunk/Server/Makefile
===================================================================
--- trunk/Server/Makefile	(revision 39)
+++ trunk/Server/Makefile	(revision 43)
@@ -6,10 +6,10 @@
 .SUFFIXES: .c .o
 
-OBJS = version.o main.o config.o server.o ssl.o http.o module.o strptime.o
+OBJS = version.o main.o config.o server.o http.o module.o strptime.o $(EXTOBJS)
 
 all: tewi$(EXEC)
 
 tewi$(EXEC): $(OBJS) ../Common/common.a
-	$(CC) $(LDFLAGS) -o $@ $(OBJS) -lssl -lcrypto $(LIBS) ../Common/common.a
+	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(EXTLIBS) $(LIBS) ../Common/common.a
 
 .c.o:
Index: trunk/Server/http.c
===================================================================
--- trunk/Server/http.c	(revision 39)
+++ trunk/Server/http.c	(revision 43)
@@ -2,4 +2,6 @@
 
 #define SOURCE
+
+#include "../config.h"
 
 #include "tw_http.h"
@@ -60,5 +62,7 @@
 		tv.tv_sec = 5;
 		tv.tv_usec = 0;
+#ifndef NO_SSL
 		if(ssl == NULL || !SSL_has_pending(ssl)) {
+#endif
 			int n = select(FD_SETSIZE, &fds, NULL, NULL, &tv);
 			if(n <= 0) {
@@ -67,5 +71,7 @@
 				return -1;
 			}
-		}
+#ifndef NO_SSL
+		}
+#endif
 		int len = tw_read(ssl, sock, buffer, 512);
 		if(len <= 0) break;
Index: trunk/Server/main.c
===================================================================
--- trunk/Server/main.c	(revision 39)
+++ trunk/Server/main.c	(revision 43)
@@ -2,4 +2,6 @@
 
 #define SOURCE
+
+#include "../config.h"
 
 #include <stdio.h>
@@ -8,5 +10,7 @@
 #include <signal.h>
 
+#ifndef NO_SSL
 #include <openssl/opensslv.h>
+#endif
 
 #include <cm_log.h>
@@ -29,5 +33,9 @@
 				if(!cm_do_log) {
 					cm_do_log = true;
+#ifndef NO_SSL
 					cm_log("", "This is Tewi HTTPd, version %s, using %s", tw_get_version(), OPENSSL_VERSION_TEXT);
+#else
+					cm_log("", "This is Tewi HTTPd, version %s", tw_get_version());
+#endif
 				} else {
 					cm_do_log = true;
Index: trunk/Server/option.c
===================================================================
--- trunk/Server/option.c	(revision 43)
+++ trunk/Server/option.c	(revision 43)
@@ -0,0 +1,31 @@
+/* $Id$ */
+/* This file is not intended to be in the server. */
+
+#include <stdio.h>
+#include <string.h>
+
+#include "../config.h"
+
+int main(int argc, char** argv) {
+	if(argc < 3) {
+		return 1;
+	}
+	if(strcmp(argv[1], "cflags") == 0) {
+#ifndef NO_SSL
+		printf("-I %s/openssl/include", argv[2]);
+#endif
+	} else if(strcmp(argv[1], "ldflags") == 0) {
+#ifndef NO_SSL
+		printf("-I %s/openssl/lib", argv[2]);
+#endif
+	} else if(strcmp(argv[1], "objs") == 0) {
+#ifndef NO_SSL
+		printf("ssl.o");
+#endif
+	} else if(strcmp(argv[1], "libs") == 0) {
+#ifndef NO_SSL
+		printf("-lssl -lcrypto");
+#endif
+	}
+	printf("\n");
+}
Index: trunk/Server/server.c
===================================================================
--- trunk/Server/server.c	(revision 39)
+++ trunk/Server/server.c	(revision 43)
@@ -3,7 +3,12 @@
 #define SOURCE
 
+#include "../config.h"
+
 #include "tw_server.h"
 
+#ifndef NO_SSL
 #include "tw_ssl.h"
+#endif
+
 #include "tw_config.h"
 #include "tw_http.h"
@@ -15,4 +20,6 @@
 #include <stdbool.h>
 #include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
 #include <sys/stat.h>
 #include <time.h>
@@ -143,4 +150,5 @@
 
 size_t tw_read(SSL* ssl, int s, void* data, size_t len) {
+#ifndef NO_SSL
 	if(ssl == NULL) {
 		return recv(s, data, len, 0);
@@ -148,7 +156,11 @@
 		return SSL_read(ssl, data, len);
 	}
+#else
+	return recv(s, data, len, 0);
+#endif
 }
 
 size_t tw_write(SSL* ssl, int s, void* data, size_t len) {
+#ifndef NO_SSL
 	if(ssl == NULL) {
 		return send(s, data, len, 0);
@@ -156,4 +168,7 @@
 		return SSL_write(ssl, data, len);
 	}
+#else
+	return send(s, data, len, 0);
+#endif
 }
 
@@ -389,4 +404,5 @@
 	char* name = config.hostname;
 
+#ifndef NO_SSL
 	SSL_CTX* ctx = NULL;
 	SSL* s = NULL;
@@ -399,4 +415,7 @@
 		sslworks = true;
 	}
+#else
+	void* s = NULL;
+#endif
 	struct tw_http_request req;
 	struct tw_http_response res;
@@ -661,4 +680,5 @@
 	}
 cleanup:
+#ifndef NO_SSL
 	if(sslworks) {
 		SSL_shutdown(s);
@@ -666,7 +686,9 @@
 	SSL_free(s);
 	close_socket(sock);
+#endif
 #ifdef __MINGW32__
 	_endthreadex(0);
 #endif
+	;
 }
 
Index: trunk/Server/tw_http.h
===================================================================
--- trunk/Server/tw_http.h	(revision 39)
+++ trunk/Server/tw_http.h	(revision 43)
@@ -5,4 +5,6 @@
 
 #include <stdbool.h>
+
+#include "../config.h"
 
 struct tw_http_request {
@@ -22,7 +24,13 @@
 
 #ifdef SOURCE
+#ifndef NO_SSL
 #include <openssl/ssl.h>
+#endif
 void tw_free_request(struct tw_http_request* req);
+#ifndef NO_SSL
 int tw_http_parse(SSL* ssl, int sock, struct tw_http_request* req);
+#else
+int tw_http_parse(void* ssl, int sock, struct tw_http_request* req);
+#endif
 #endif
 
Index: trunk/Server/tw_server.h
===================================================================
--- trunk/Server/tw_server.h	(revision 39)
+++ trunk/Server/tw_server.h	(revision 43)
@@ -4,10 +4,22 @@
 #define __TW_SERVER_H__
 
+#include "../config.h"
+
+#include <stddef.h>
+
+#ifndef NO_SSL
 #include <openssl/ssl.h>
+#endif
 
 int tw_server_init(void);
 void tw_server_loop(void);
+
+#ifndef NO_SSL
 size_t tw_read(SSL* ssl, int s, void* data, size_t len);
 size_t tw_write(SSL* ssl, int s, void* data, size_t len);
+#else
+size_t tw_read(void* ssl, int s, void* data, size_t len);
+size_t tw_write(void* ssl, int s, void* data, size_t len);
+#endif
 
 #endif
