# [PATCH] Makefile: add Minix configuration options.

2 messages from 2011-07-19 to 2011-07-19. Participants: Thomas Cort, Junio C Hamano.
Thread: https://gitlist.dev/t/27858

## Thomas Cort, 2011-07-19 20:26

Subject: [PATCH] Makefile: add Minix configuration options.
Message-ID: <20110719162659.81020d7c.tcort@minix3.org>
URL: https://gitlist.dev/e/20110719162659.81020d7c.tcort%40minix3.org

```
 * Adds a $(uname_S) case for Minix with the correct options.

 * Adds NEEDS_SSL_WITH_CURL and NEEDS_CRYPTO_WITH_SSL to the
   libcurl section. On Minix both -lssl and -lcrypto are
   needed when using -lcurl.

 * Changes OPENSSL_LINK to OPENSSL_LIBSSL in the
   NEEDS_CRYPTO_WITH_SSL conditional in the libopenssl section.
   The -lcrypto needs to be in OPENSSL_LIBSSL.

Signed-off-by: Thomas Cort <tcort@minix3.org>
---
 Makefile |   26 +++++++++++++++++++++++++-
 1 files changed, 25 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 46793d1..e8280fc 100644
--- a/Makefile
+++ b/Makefile
@@ -1146,6 +1146,20 @@ ifeq ($(uname_S),Interix)
 		NO_FNMATCH_CASEFOLD = YesPlease
 	endif
 endif
+ifeq ($(uname_S),Minix)
+	NO_IPV6 = YesPlease
+	NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
+	NO_NSEC = YesPlease
+	NEEDS_LIBGEN =
+	NEEDS_CRYPTO_WITH_SSL = YesPlease
+	NEEDS_IDN_WITH_CURL = YesPlease
+	NEEDS_SSL_WITH_CURL = YesPlease
+	NEEDS_RESOLV =
+	NO_HSTRERROR = YesPlease
+	NO_MMAP = YesPlease
+	NO_CURL =
+	NO_EXPAT =
+endif
 ifneq (,$(findstring MINGW,$(uname_S)))
 	pathsep = ;
 	NO_PREAD = YesPlease
@@ -1290,6 +1304,16 @@ else
 	else
 		CURL_LIBCURL = -lcurl
 	endif
+	ifdef NEEDS_SSL_WITH_CURL
+		CURL_LIBCURL +=	-lssl
+	endif
+	ifdef NEEDS_CRYPTO_WITH_SSL
+		CURL_LIBCURL += -lcrypto
+	endif
+	ifdef NEEDS_IDN_WITH_CURL
+		CURL_LIBCURL += -lidn
+	endif
+
 	REMOTE_CURL_PRIMARY = git-remote-http$X
 	REMOTE_CURL_ALIASES = git-remote-https$X git-remote-ftp$X git-remote-ftps$X
 	REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES)
@@ -1326,7 +1350,7 @@ ifndef NO_OPENSSL
 		OPENSSL_LINK =
 	endif
 	ifdef NEEDS_CRYPTO_WITH_SSL
-		OPENSSL_LINK += -lcrypto
+		OPENSSL_LIBSSL += -lcrypto
 	endif
 else
 	BASIC_CFLAGS += -DNO_OPENSSL
-- 
1.7.4.1

```

## Junio C Hamano, 2011-07-19 21:39

Subject: Re: [PATCH] Makefile: add Minix configuration options.
Message-ID: <7vaaca7xx9.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vaaca7xx9.fsf%40alter.siamese.dyndns.org
In-Reply-To: <20110719162659.81020d7c.tcort@minix3.org>

```
Thomas Cort <tcort@minix3.org> writes:

>  * Adds a $(uname_S) case for Minix with the correct options.

Ok, but lose the asterisk and speak as if you are giving an order to the
codebase or the person who maintains it, i.e. "Add $(uname_S) case...".

>  * Adds NEEDS_SSL_WITH_CURL and NEEDS_CRYPTO_WITH_SSL to the
>    libcurl section. On Minix both -lssl and -lcrypto are
>    needed when using -lcurl.

These...

> +	NEEDS_IDN_WITH_CURL = YesPlease
> +	NEEDS_SSL_WITH_CURL = YesPlease

... are not described in the beginning of Makefile; add them.

>  * Changes OPENSSL_LINK to OPENSSL_LIBSSL in the
>    NEEDS_CRYPTO_WITH_SSL conditional in the libopenssl section.

Why is this change necessary?

>    The -lcrypto needs to be in OPENSSL_LIBSSL.

Ditto.

Thanks.

```
