public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail•com>
To: git@vger•kernel.org
Subject: [PATCH 4/4] autoconf: Move variables which we always set to config.mak.in
Date: Tue, 8 Aug 2006 18:39:06 +0200	[thread overview]
Message-ID: <200608081839.07112.jnareb@gmail.com> (raw)
In-Reply-To: <200608081834.09271.jnareb@gmail.com>

Move detected NO_STH and NEED_STH variables, which we always output,
either setting or unsetting (setting to empty string) to config.mak.in
and use setting appropriately named variables and doing AC_SUBST
instead of adding them via GIT_CONF_APPEND_LINE macro and
config.mak.append temporary file.

Variables which might and might not be set are still added via
config.mak.append; this include all STH_PATH variables.

Signed-off-by: Jakub Narebski <jnareb@gmail•com>
---
This makes our configure.ac more typical.

 config.mak.in |   15 +++++++++++
 configure.ac  |   75 +++++++++++++++++++++++++++++++++------------------------
 2 files changed, 59 insertions(+), 31 deletions(-)

diff --git a/config.mak.in b/config.mak.in
index 04f508a..99b13a7 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -22,3 +22,18 @@ VPATH = @srcdir@
 export exec_prefix mandir
 export srcdir VPATH
 
+NO_PYTHON=@NO_PYTHON@
+NEEDS_SSL_WITH_CRYPTO=@NEEDS_SSL_WITH_CRYPTO@
+NO_CURL=@NO_CURL@
+NO_EXPAT=@NO_EXPAT@
+NEEDS_LIBICONV=@NEEDS_LIBICONV@
+NEEDS_SOCKET=@NEEDS_SOCKET@
+NO_D_INO_IN_DIRENT=@NO_D_INO_IN_DIRENT@
+NO_D_TYPE_IN_DIRENT=@NO_D_TYPE_IN_DIRENT@
+NO_SOCKADDR_STORAGE=@NO_SOCKADDR_STORAGE@
+NO_IPV6=@NO_IPV6@
+NO_C99_FORMAT=@NO_C99_FORMAT@
+NO_STRCASESTR=@NO_STRCASESTR@
+NO_STRLCPY=@NO_STRLCPY@
+NO_SETENV=@NO_SETENV@
+
diff --git a/configure.ac b/configure.ac
index c27a994..bc2824b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -149,7 +149,6 @@ if test -z "$NO_PYTHON"; then
 		NO_PYTHON=""
 	fi
 fi
-GIT_CONF_APPEND_LINE([NO_PYTHON=@NO_PYTHON@])
 
 
 ## Checks for libraries.
@@ -158,35 +157,41 @@ #
 # Define NO_OPENSSL environment variable if you do not have OpenSSL.
 # Define NEEDS_SSL_WITH_CRYPTO if you need -lcrypto with -lssl (Darwin).
 AC_CHECK_LIB([crypto], [SHA1_Init],
-[GIT_CONF_APPEND_LINE(NEEDS_SSL_WITH_CRYPTO=)],
+[NEEDS_SSL_WITH_CRYPTO=],
 [AC_CHECK_LIB([ssl], [SHA1_Init],
- [GIT_CONF_APPEND_LINE(NEEDS_SSL_WITH_CRYPTO=YesPlease)
-  GIT_CONF_APPEND_LINE(NEEDS_SSL_WITH_CRYPTO=)],
- [GIT_CONF_APPEND_LINE(NO_OPENSSL=YesPlease)])])
+ [NEEDS_SSL_WITH_CRYPTO=YesPlease
+  NEEDS_SSL_WITH_CRYPTO=],
+ [NO_OPENSSL=YesPlease])])
+AC_SUBST(NEEDS_SSL_WITH_CRYPTO)
+AC_SUBST(NO_OPENSSL)
 #
 # Define NO_CURL if you do not have curl installed.  git-http-pull and
 # git-http-push are not built, and you cannot use http:// and https://
 # transports.
 AC_CHECK_LIB([curl], [curl_global_init],
-[GIT_CONF_APPEND_LINE(NO_CURL=)],
-[GIT_CONF_APPEND_LINE(NO_CURL=YesPlease)])
+[NO_CURL=],
+[NO_CURL=YesPlease])
+AC_SUBST(NO_CURL)
 #
 # Define NO_EXPAT if you do not have expat installed.  git-http-push is
 # not built, and you cannot push using http:// and https:// transports.
 AC_CHECK_LIB([expat], [XML_ParserCreate],
-[GIT_CONF_APPEND_LINE(NO_EXPAT=)],
-[GIT_CONF_APPEND_LINE(NO_EXPAT=YesPlease)])
+[NO_EXPAT=],
+[NO_EXPAT=YesPlease])
+AC_SUBST(NO_EXPAT)
 #
 # Define NEEDS_LIBICONV if linking with libc is not enough (Darwin).
 AC_CHECK_LIB([c], [iconv],
-[GIT_CONF_APPEND_LINE(NEEDS_LIBICONV=)],
-[GIT_CONF_APPEND_LINE(NEEDS_LIBICONV=YesPlease)])
+[NEEDS_LIBICONV=],
+[NEEDS_LIBICONV=YesPlease])
+AC_SUBST(NEEDS_LIBICONV)
 #
 # Define NEEDS_SOCKET if linking with libc is not enough (SunOS,
 # Patrick Mauritz).
 AC_CHECK_LIB([c], [socket],
-[GIT_CONF_APPEND_LINE(NEEDS_SOCKET=)],
-[GIT_CONF_APPEND_LINE(NEEDS_SOCKET=YesPlease)])
+[NEEDS_SOCKET=],
+[NEEDS_SOCKET=YesPlease])
+AC_SUBST(NEEDS_SOCKET)
 
 
 ## Checks for header files.
@@ -197,33 +202,38 @@ AC_MSG_NOTICE([CHECKS for typedefs, stru
 #
 # Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent.
 AC_CHECK_MEMBER(struct dirent.d_ino,
-[GIT_CONF_APPEND_LINE(NO_D_INO_IN_DIRENT=)],
-[GIT_CONF_APPEND_LINE(NO_D_INO_IN_DIRENT=YesPlease)],
+[NO_D_INO_IN_DIRENT=],
+[NO_D_INO_IN_DIRENT=YesPlease],
 [#include <dirent.h>])
+AC_SUBST(NO_D_INO_IN_DIRENT)
 #
 # Define NO_D_TYPE_IN_DIRENT if your platform defines DT_UNKNOWN but lacks
 # d_type in struct dirent (latest Cygwin -- will be fixed soonish).
 AC_CHECK_MEMBER(struct dirent.d_type,
-[GIT_CONF_APPEND_LINE(NO_D_TYPE_IN_DIRENT=)],
-[GIT_CONF_APPEND_LINE(NO_D_TYPE_IN_DIRENT=YesPlease)],
+[NO_D_TYPE_IN_DIRENT=],
+[NO_D_TYPE_IN_DIRENT=YesPlease],
 [#include <dirent.h>])
+AC_SUBST(NO_D_TYPE_IN_DIRENT)
 #
 # Define NO_SOCKADDR_STORAGE if your platform does not have struct
 # sockaddr_storage.
 AC_CHECK_TYPE(struct sockaddr_storage,
-[GIT_CONF_APPEND_LINE(NO_SOCKADDR_STORAGE=)],
-[GIT_CONF_APPEND_LINE(NO_SOCKADDR_STORAGE=YesPlease)],
+[NO_SOCKADDR_STORAGE=],
+[NO_SOCKADDR_STORAGE=YesPlease],
 [#include <netinet/in.h>])
+AC_SUBST(NO_SOCKADDR_STORAGE)
+#
 # Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
 AC_CHECK_TYPE([struct addrinfo],[
  AC_CHECK_FUNC([getaddrinfo],
-  [GIT_CONF_APPEND_LINE(NO_IPV6=)],
-  [GIT_CONF_APPEND_LINE(NO_IPV6=YesPlease)])
-],[GIT_CONF_APPEND_LINE(NO_IPV6=YesPlease)],[
+  [NO_IPV6=],
+  [NO_IPV6=YesPlease])
+],[NO_IPV6=YesPlease],[
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netdb.h>
 ])
+AC_SUBST(NO_IPV6)
 #
 # Define NO_C99_FORMAT if your formatted IO functions (printf/scanf et.al.)
 # do not support the 'size specifiers' introduced by C99, namely ll, hh,
@@ -243,11 +253,11 @@ AC_RUN_IFELSE(
 	[ac_cv_c_c99_format=no])
 ])
 if test $ac_cv_c_c99_format = no; then
-	GIT_CONF_APPEND_LINE(NO_C99_FORMAT=YesPlease)
+	NO_C99_FORMAT=YesPlease
 else
-	GIT_CONF_APPEND_LINE(NO_C99_FORMAT=)
+	NO_C99_FORMAT=
 fi
-
+AC_SUBST(NO_C99_FORMAT)
 
 ## Checks for library functions.
 ## (in default C library and libraries checked by AC_CHECK_LIB)
@@ -255,18 +265,21 @@ AC_MSG_NOTICE([CHECKS for library functi
 #
 # Define NO_STRCASESTR if you don't have strcasestr.
 AC_CHECK_FUNC(strcasestr,
-[GIT_CONF_APPEND_LINE(NO_STRCASESTR=)],
-[GIT_CONF_APPEND_LINE(NO_STRCASESTR=YesPlease)])
+[NO_STRCASESTR=],
+[NO_STRCASESTR=YesPlease])
+AC_SUBST(NO_STRCASESTR)
 #
 # Define NO_STRLCPY if you don't have strlcpy.
 AC_CHECK_FUNC(strlcpy,
-[GIT_CONF_APPEND_LINE(NO_STRLCPY=)],
-[GIT_CONF_APPEND_LINE(NO_STRLCPY=YesPlease)])
+[NO_STRLCPY=],
+[NO_STRLCPY=YesPlease])
+AC_SUBST(NO_STRLCPY)
 #
 # Define NO_SETENV if you don't have setenv in the C library.
 AC_CHECK_FUNC(setenv,
-[GIT_CONF_APPEND_LINE(NO_SETENV=)],
-[GIT_CONF_APPEND_LINE(NO_SETENV=YesPlease)])
+[NO_SETENV=],
+[NO_SETENV=YesPlease])
+AC_SUBST(NO_SETENV)
 #
 # Define NO_MMAP if you want to avoid mmap.
 #
-- 
1.4.1.1

  parent reply	other threads:[~2006-08-08 16:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-08 16:34 [PATCH 0/4] autoconf: Some improvements Jakub Narebski
2006-08-08 16:35 ` [PATCH 1/4] autoconf: Add configure target to main Makefile Jakub Narebski
2006-08-08 16:48   ` [PATCH 5/4] autoconf: Mention "make configure" instead of "autoconf" in INSTALL Jakub Narebski
2006-08-08 16:36 ` [PATCH 2/4] autoconf: Error out on --without-shell and --without-perl Jakub Narebski
2006-08-08 16:38 ` [PATCH 3/4] autoconf: Improvements in NO_PYTHON/PYTHON_PATH handling Jakub Narebski
2006-08-08 16:39 ` Jakub Narebski [this message]
2006-08-08 23:42   ` [PATCH 6/4] autoconf: Add forgotten NO_OPENSSL=@NO_OPENSSL@ to config.mak.in Jakub Narebski
2006-08-08 20:43 ` [PATCH] autoconf: clean temporary file mak.append Junio C Hamano
2006-08-08 20:58   ` Jakub Narebski
2006-08-08 21:35     ` Junio C Hamano
2006-08-09  0:15 ` [PATCH 7] autoconf: Add support for setting CURLDIR, OPENSSLDIR, EXPATDIR Jakub Narebski
2006-08-10 10:50   ` Jakub Narebski
2006-08-10 21:27     ` Junio C Hamano
2006-08-10 21:43       ` Jakub Narebski
2006-08-09  0:19 ` [PATCH 8] autoconf: It is --without-python, not --no-python Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200608081839.07112.jnareb@gmail.com \
    --to=jnareb@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox