* [PATCH] autoconf: Use autoconf to write installation directories to config.mak
@ 2006-06-29 1:01 Jakub Narebski
2006-06-29 7:18 ` Uwe Zeisberger
` (2 more replies)
0 siblings, 3 replies; 30+ messages in thread
From: Jakub Narebski @ 2006-06-29 1:01 UTC (permalink / raw)
To: git
This is beginning of patch series introducing installation configuration
using autoconf (and no other autotools) to git. The idea is to generate
config.mak using ./configure (generated from configure.ac) from
config.mak.in, so one can use autoconf as an _alternative_ to ordinary
Makefile, and creating one's own config.mak.
This patch includes minimal configure.ac and config.mak.in, so one
can set installation directories using ./configure script
e.g. ./configure --prefix=/usr
Ignoring files generated by running autoconf and ./configure
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
One of the ideas is to use in .spec RPM macro %configure which takes
care of setting all installation directories correctly.
Thoughts?
.gitignore | 4 ++++
config.mak.in | 12 ++++++++++++
configure.ac | 11 +++++++++++
3 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore
index 7b954d5..b0dd54d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -136,3 +136,7 @@ git-core.spec
*.py[co]
config.mak
git-blame
+autom4te.cache
+config.log
+config.status
+configure
diff --git a/config.mak.in b/config.mak.in
new file mode 100644
index 0000000..82d80e2
--- /dev/null
+++ b/config.mak.in
@@ -0,0 +1,12 @@
+# git Makefile configuration, included in main Makefile
+# @configure_input@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+#gitexecdir = @libexecdir@/git-core/
+template_dir = @datadir@/git-core/templates/
+GIT_PYTHON_DIR = @datadir@/git-core/python
+
+srcdir = @srcdir@
+VPATH = @srcdir@
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..4003ff6
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,11 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.59)
+AC_INIT([git], [1.4.0], [git@vger.kernel.org])
+
+AC_CONFIG_SRCDIR([git.c])
+
+# Output files
+AC_CONFIG_FILES([config.mak])
+AC_OUTPUT
--
1.4.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* Re: [PATCH] autoconf: Use autoconf to write installation directories to config.mak
2006-06-29 1:01 [PATCH] autoconf: Use autoconf to write installation directories to config.mak Jakub Narebski
@ 2006-06-29 7:18 ` Uwe Zeisberger
2006-06-29 11:59 ` [PATCH] autoconf: Use autoconf to check for libraries: openssl/crypto, curl, expat Jakub Narebski
2006-06-29 12:46 ` [PATCH] autoconf: Use autoconf to write installation directories to config.mak Matthias Lederhofer
2 siblings, 0 replies; 30+ messages in thread
From: Uwe Zeisberger @ 2006-06-29 7:18 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
Jakub Narebski wrote:
> This is beginning of patch series introducing installation configuration
> using autoconf (and no other autotools) to git. The idea is to generate
> config.mak using ./configure (generated from configure.ac) from
> config.mak.in, so one can use autoconf as an _alternative_ to ordinary
> Makefile, and creating one's own config.mak.
>
> This patch includes minimal configure.ac and config.mak.in, so one
> can set installation directories using ./configure script
> e.g. ./configure --prefix=/usr
autoconf does to much things, even with that little configure.ac. (But
I agree, it's much better than automake :-)
E.g.
./configure --prefix=$HOME/usr --mandir=$HOME/usr/share/man
is supported by the configure script, but the manpages are installed in
$HOME/usr/man all the same.
BTW: Even if I specify mandir=... in config.mak, it is not respected,
because only the toplevel Makefile includes config.mak. (I didn't test
it, but I think I could export mandir in config.mak ...)
Best regards
Uwe
--
Uwe Zeisberger
http://www.google.com/search?q=1+hertz+in+sec**-1
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH] autoconf: Use autoconf to check for libraries: openssl/crypto, curl, expat
2006-06-29 1:01 [PATCH] autoconf: Use autoconf to write installation directories to config.mak Jakub Narebski
2006-06-29 7:18 ` Uwe Zeisberger
@ 2006-06-29 11:59 ` Jakub Narebski
2006-06-29 13:36 ` [RFC/PATCH] autoconf: Use autoconf to check for some types and library functions Jakub Narebski
2006-06-29 12:46 ` [PATCH] autoconf: Use autoconf to write installation directories to config.mak Matthias Lederhofer
2 siblings, 1 reply; 30+ messages in thread
From: Jakub Narebski @ 2006-06-29 11:59 UTC (permalink / raw)
To: git
./configure script checks now if the following libraries are present:
* -lcrypto (checks for SHA1_Init, sets NO_OPENSSL=YesPlease if not found)
* -lcurl (checks for curl_easy_setopt, sets NO_CURL=YesPlease if not found)
* -lexpat (checks for XML_ParserCreate, sets NO_EXPAT=YesPlease if not found)
Appropriate lines in config.mak are generated using MY_APPEND_LINE macro by adding
lines to temporary file config.mak.append
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
Second patch in series introducing nonintrusive autoconf support to
git build process.
I'm not that sure about -lcrypto equals openssl.
configure.ac | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index 4003ff6..55d7a9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,6 +6,21 @@ AC_INIT([git], [1.4.0], [git@vger.kernel
AC_CONFIG_SRCDIR([git.c])
+# Definitions of macros
+# MY_APPEND_LINE(LINE)
+# --------------------
+# Append LINE to file config.mak.append
+AC_DEFUN([MY_APPEND_LINE],
+[[echo "$1" >> config.mak.append]])# AC_APPEND_LINE
+
+# Checks for libraries.
+AC_MSG_NOTICE(CHECKS for libraries)
+AC_CHECK_LIB([crypto], [SHA1_Init],,MY_APPEND_LINE(NO_OPENSSL=YesPlease))
+AC_CHECK_LIB([curl], [curl_easy_setopt],,MY_APPEND_LINE(NO_CURL=YesPlease))
+AC_CHECK_LIB([expat], [XML_ParserCreate],,MY_APPEND_LINE(NO_EXPAT=YesPlease))
+
# Output files
-AC_CONFIG_FILES([config.mak])
+AC_CONFIG_FILES([config.mak:config.mak.in:config.mak.append],
+[rm -f config.mak.append],
+[echo >> config.mak.append])
AC_OUTPUT
--
1.4.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* Re: [PATCH] autoconf: Use autoconf to write installation directories to config.mak
2006-06-29 1:01 [PATCH] autoconf: Use autoconf to write installation directories to config.mak Jakub Narebski
2006-06-29 7:18 ` Uwe Zeisberger
2006-06-29 11:59 ` [PATCH] autoconf: Use autoconf to check for libraries: openssl/crypto, curl, expat Jakub Narebski
@ 2006-06-29 12:46 ` Matthias Lederhofer
2006-06-29 13:48 ` Jakub Narebski
2006-06-29 18:23 ` Junio C Hamano
2 siblings, 2 replies; 30+ messages in thread
From: Matthias Lederhofer @ 2006-06-29 12:46 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
> This is beginning of patch series introducing installation configuration
> using autoconf (and no other autotools) to git. The idea is to generate
> config.mak using ./configure (generated from configure.ac) from
> config.mak.in, so one can use autoconf as an _alternative_ to ordinary
> Makefile, and creating one's own config.mak.
Are you sure this should be named config.mak? From INSTALL:
> You can place local settings in config.mak and the Makefile
> will include them. Note that config.mak is not distributed;
> the name is reserved for local settings.
So with another filename either include it
- before config.mak: the user may override ./configure options with
config.mak
- after config.mak: ./configure overrides config.mak
At least do not overwrite config.mak if it exists.
^ permalink raw reply [flat|nested] 30+ messages in thread
* [RFC/PATCH] autoconf: Use autoconf to check for some types and library functions
2006-06-29 11:59 ` [PATCH] autoconf: Use autoconf to check for libraries: openssl/crypto, curl, expat Jakub Narebski
@ 2006-06-29 13:36 ` Jakub Narebski
2006-06-29 15:04 ` [PATCH] autoconf: Cleanup generation of config.mak.append by ./configure Jakub Narebski
0 siblings, 1 reply; 30+ messages in thread
From: Jakub Narebski @ 2006-06-29 13:36 UTC (permalink / raw)
To: git
./configure script checks now for existence of the following types
and structure members:
* dirent.d_ino in dirent.h (NO_D_INO_IN_DIRENT)
* dirent.d_type in dirent.h (NO_D_TYPE_IN_DIRENT)
* 'struct sockaddr_storage' in netinet/in.h (NO_SOCKADDR_STORAGE)
./configure script checks now for the following library functions:
* strcasestr (NO_STRCASESTR)
* strlcpy (NO_STRLCPY)
* setenv (NO_SETENV)
in default C library and in libraries which have AC_CHECK_LIB done for
them (crypto, curl, expat).
NOTE: not all checks are implemented!
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
This patch needs review by someone better versed in compiling git on
different platforms, namely AC_CHECK_MEMBER and AC_CHECK_TYPE needs
checking if all header files where git search for specified structure
member or specified type.
I don't know (yet) how to implement checking for NEEDS_SSL_WITH_CRYPTO
(probably also checlking for crypto library needs correction),
NEEDS_LIBICONV, NEEDS_SOCKET, NO_IPV6, NO_ICONV, Python < 2.3 and
Python == 2.3, if to check for NO_MMAP, and for NO_ACCURATE_DIFF.
This patch is to be considered preliminary!
configure.ac | 28 ++++++++++++++++++++++++++--
1 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 55d7a9b..fbd46e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,17 +14,41 @@ AC_CONFIG_SRCDIR([git.c])
AC_DEFUN([MY_APPEND_LINE],
[[echo "$1" >> config.mak.append]])# AC_APPEND_LINE
+
# Checks for libraries.
-AC_MSG_NOTICE(CHECKS for libraries)
+AC_MSG_NOTICE([CHECKS for libraries])
AC_CHECK_LIB([crypto], [SHA1_Init],,MY_APPEND_LINE(NO_OPENSSL=YesPlease))
AC_CHECK_LIB([curl], [curl_easy_setopt],,MY_APPEND_LINE(NO_CURL=YesPlease))
AC_CHECK_LIB([expat], [XML_ParserCreate],,MY_APPEND_LINE(NO_EXPAT=YesPlease))
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_MSG_NOTICE([CHECKS for typedefs, structures, and compiler characteristics])
+
+AC_CHECK_MEMBER(struct dirent.d_ino,,
+MY_APPEND_LINE(NO_D_INO_IN_DIRENT=YesPlease),
+[#include <dirent.h>])
+AC_CHECK_MEMBER(struct dirent.d_type,,
+MY_APPEND_LINE(NO_D_TYPE_IN_DIRENT=YesPlease),
+[#include <dirent.h>])
+
+AC_CHECK_TYPE(struct sockaddr_storage,,
+MY_APPEND_LINE(NO_SOCKADDR_STORAGE=YesPlease),
+[#include <netinet/in.h>])
+
+
+# Checks for library functions.
+AC_MSG_NOTICE([CHECKS for library functions])
+AC_CHECK_FUNC(strcasestr,,MY_APPEND_LINE(NO_STRCASESTR=YesPlease))
+AC_CHECK_FUNC(strlcpy,,MY_APPEND_LINE(NO_STRLCPY=YesPlease))
+AC_CHECK_FUNC(setenv,,MY_APPEND_LINE(NO_SETENV=YesPlease))
+
+
# Output files
AC_CONFIG_FILES([config.mak:config.mak.in:config.mak.append],
[rm -f config.mak.append],
--
1.4.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* Re: [PATCH] autoconf: Use autoconf to write installation directories to config.mak
2006-06-29 12:46 ` [PATCH] autoconf: Use autoconf to write installation directories to config.mak Matthias Lederhofer
@ 2006-06-29 13:48 ` Jakub Narebski
2006-06-30 12:18 ` Andreas Ericsson
2006-06-29 18:23 ` Junio C Hamano
1 sibling, 1 reply; 30+ messages in thread
From: Jakub Narebski @ 2006-06-29 13:48 UTC (permalink / raw)
To: git
Matthias Lederhofer wrote:
>> This is beginning of patch series introducing installation configuration
>> using autoconf (and no other autotools) to git. The idea is to generate
>> config.mak using ./configure (generated from configure.ac) from
>> config.mak.in, so one can use autoconf as an _alternative_ to ordinary
>> Makefile, and creating one's own config.mak.
>
> Are you sure this should be named config.mak? From INSTALL:
>> You can place local settings in config.mak and the Makefile
>> will include them. Note that config.mak is not distributed;
>> the name is reserved for local settings.
>
> So with another filename either include it
> - before config.mak: the user may override ./configure options with
> config.mak
> - after config.mak: ./configure overrides config.mak
The idea was to use ./configure to _generate_ config.mak, which the user can
then edit.
But perhaps using another filename for results of ./configure script
(and including it in main Makefile) would be better idea.
> At least do not overwrite config.mak if it exists.
But one might want to run ./configure with different options, to finally
arrive at the set which is satisfactionary. So unless some magic to detect
if config.mak was generated from ./configure script, or generated by user
is used...
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH] autoconf: Cleanup generation of config.mak.append by ./configure
2006-06-29 13:36 ` [RFC/PATCH] autoconf: Use autoconf to check for some types and library functions Jakub Narebski
@ 2006-06-29 15:04 ` Jakub Narebski
2006-06-29 16:35 ` [PATCH] Allow INSTALL, bindir, mandir to be set in main Makefile Jakub Narebski
0 siblings, 1 reply; 30+ messages in thread
From: Jakub Narebski @ 2006-06-29 15:04 UTC (permalink / raw)
To: git
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
configure.ac | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index fbd46e2..f48307c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,12 +6,14 @@ AC_INIT([git], [1.4.0], [git@vger.kernel
AC_CONFIG_SRCDIR([git.c])
+echo "# config.mak.append. Generated by configure." >> config.mak.append
+
# Definitions of macros
# MY_APPEND_LINE(LINE)
# --------------------
# Append LINE to file config.mak.append
AC_DEFUN([MY_APPEND_LINE],
-[[echo "$1" >> config.mak.append]])# AC_APPEND_LINE
+[[echo "$1" >> config.mak.append]])# MY_APPEND_LINE
# Checks for libraries.
@@ -45,6 +47,5 @@ AC_CHECK_FUNC(setenv,,MY_APPEND_LINE(NO_
# Output files
AC_CONFIG_FILES([config.mak:config.mak.in:config.mak.append],
-[rm -f config.mak.append],
-[echo >> config.mak.append])
+[rm -f config.mak.append])
AC_OUTPUT
--
1.4.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH] Allow INSTALL, bindir, mandir to be set in main Makefile
2006-06-29 15:04 ` [PATCH] autoconf: Cleanup generation of config.mak.append by ./configure Jakub Narebski
@ 2006-06-29 16:35 ` Jakub Narebski
2006-06-29 17:47 ` [PATCH] autoconf: Set mandir in config.mak.in and export variables not in Makefile Jakub Narebski
2006-06-29 18:23 ` [PATCH] Allow INSTALL, bindir, mandir to be set in main Makefile Junio C Hamano
0 siblings, 2 replies; 30+ messages in thread
From: Jakub Narebski @ 2006-06-29 16:35 UTC (permalink / raw)
To: git
Makefiles in subdirectories now use existing value of INSTALL, bindir,
mandir if it is set, allowing those to be set in main Makefile or in
config.mak. Main Makefile exports variables which it sets.
Renames man1 and man7 variables to man1dir and man7dir, according to
"Makefile Conventions: Variables for Installation Directories" in
make.info of GNU Make. Renames bin to bindir (unused, perhaps to be
removed).
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
Part of autoconf series, but independent.
Should probably be split into two patches:
* first with export + '?='
* second renaming man1 and man7 to man1dir and man7dir
Documentation/Makefile | 14 +++++++-------
Makefile | 2 ++
contrib/emacs/Makefile | 4 ++--
contrib/git-svn/Makefile | 8 ++++----
4 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 2b0efe7..cc83610 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -25,10 +25,10 @@ DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT
DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
prefix?=$(HOME)
-bin=$(prefix)/bin
-mandir=$(prefix)/man
-man1=$(mandir)/man1
-man7=$(mandir)/man7
+bindir?=$(prefix)/bin
+mandir?=$(prefix)/man
+man1dir=$(mandir)/man1
+man7dir=$(mandir)/man7
# DESTDIR=
INSTALL?=install
@@ -52,9 +52,9 @@ man1: $(DOC_MAN1)
man7: $(DOC_MAN7)
install: man
- $(INSTALL) -d -m755 $(DESTDIR)$(man1) $(DESTDIR)$(man7)
- $(INSTALL) $(DOC_MAN1) $(DESTDIR)$(man1)
- $(INSTALL) $(DOC_MAN7) $(DESTDIR)$(man7)
+ $(INSTALL) -d -m755 $(DESTDIR)$(man1dir) $(DESTDIR)$(man7dir)
+ $(INSTALL) $(DOC_MAN1) $(DESTDIR)$(man1dir)
+ $(INSTALL) $(DOC_MAN7) $(DESTDIR)$(man7dir)
#
diff --git a/Makefile b/Makefile
index cde619c..b8fe669 100644
--- a/Makefile
+++ b/Makefile
@@ -100,6 +100,8 @@ template_dir = $(prefix)/share/git-core/
GIT_PYTHON_DIR = $(prefix)/share/git-core/python
# DESTDIR=
+export prefix bindir gitexecdir template_dir GIT_PYTHON_DIR
+
CC = gcc
AR = ar
TAR = tar
diff --git a/contrib/emacs/Makefile b/contrib/emacs/Makefile
index d3619db..350846d 100644
--- a/contrib/emacs/Makefile
+++ b/contrib/emacs/Makefile
@@ -3,9 +3,9 @@ ## Build and install stuff
EMACS = emacs
ELC = git.elc vc-git.elc
-INSTALL = install
+INSTALL ?= install
INSTALL_ELC = $(INSTALL) -m 644
-prefix = $(HOME)
+prefix ?= $(HOME)
emacsdir = $(prefix)/share/emacs/site-lisp
all: $(ELC)
diff --git a/contrib/git-svn/Makefile b/contrib/git-svn/Makefile
index 7c20946..8cac688 100644
--- a/contrib/git-svn/Makefile
+++ b/contrib/git-svn/Makefile
@@ -1,9 +1,9 @@
all: git-svn
prefix?=$(HOME)
-bindir=$(prefix)/bin
-mandir=$(prefix)/man
-man1=$(mandir)/man1
+bindir?=$(prefix)/bin
+mandir?=$(prefix)/man
+man1dir=$(mandir)/man1
INSTALL?=install
doc_conf=../../Documentation/asciidoc.conf
-include ../../config.mak
@@ -17,7 +17,7 @@ install: all
$(INSTALL) git-svn $(DESTDIR)$(bindir)
install-doc: doc
- $(INSTALL) git-svn.1 $(DESTDIR)$(man1)
+ $(INSTALL) git-svn.1 $(DESTDIR)$(man1dir)
doc: git-svn.1
git-svn.1 : git-svn.xml
--
1.4.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH] autoconf: Set mandir in config.mak.in and export variables not in Makefile
2006-06-29 16:35 ` [PATCH] Allow INSTALL, bindir, mandir to be set in main Makefile Jakub Narebski
@ 2006-06-29 17:47 ` Jakub Narebski
2006-06-30 0:11 ` [PATCH 7] autoconf: configure.ac uses variables to set in, out and temp files Jakub Narebski
2006-06-29 18:23 ` [PATCH] Allow INSTALL, bindir, mandir to be set in main Makefile Junio C Hamano
1 sibling, 1 reply; 30+ messages in thread
From: Jakub Narebski @ 2006-06-29 17:47 UTC (permalink / raw)
To: git
This patch with the previous "[PATCH] Allow INSTALL, bindir, mandir to
be set in main Makefile" patch allows ./configure script to set where
manpages will be installed using --mandir=DIR (./configure defaults to
PREFIX/man).
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
Uwe Zeisberger wrote:
> autoconf does to much things, even with that little configure.ac.
> (But I agree, it's much better than automake :-)
>
> E.g.
>
> ./configure --prefix=$HOME/usr --mandir=$HOME/usr/share/man
>
> is supported by the configure script, but the manpages are installed
> in $HOME/usr/man all the same.
>
> BTW: Even if I specify mandir=... in config.mak, it is not respected,
> because only the toplevel Makefile includes config.mak. (I didn't
> test it, but I think I could export mandir in config.mak ...)
This patch and previous one adressess this.
config.mak.in | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/config.mak.in b/config.mak.in
index 82d80e2..82c9781 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -8,5 +8,11 @@ #gitexecdir = @libexecdir@/git-core/
template_dir = @datadir@/git-core/templates/
GIT_PYTHON_DIR = @datadir@/git-core/python
+mandir=@mandir@
+
srcdir = @srcdir@
VPATH = @srcdir@
+
+export exec_prefix mandir
+export srcdir VPATH
+
--
1.4.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* Re: [PATCH] Allow INSTALL, bindir, mandir to be set in main Makefile
2006-06-29 16:35 ` [PATCH] Allow INSTALL, bindir, mandir to be set in main Makefile Jakub Narebski
2006-06-29 17:47 ` [PATCH] autoconf: Set mandir in config.mak.in and export variables not in Makefile Jakub Narebski
@ 2006-06-29 18:23 ` Junio C Hamano
2006-06-29 20:16 ` Jakub Narebski
1 sibling, 1 reply; 30+ messages in thread
From: Junio C Hamano @ 2006-06-29 18:23 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
Jakub Narebski <jnareb@gmail.com> writes:
> Part of autoconf series, but independent.
I'd like to take something like this, independently from
"optionally managing config.mak with autoconf" series.
> Should probably be split into two patches:
> * first with export + '?='
> * second renaming man1 and man7 to man1dir and man7dir
And I think it is probably a good idea to somehow keep people's
configurations that have been overriding man1 and man7 if
possible. Otherwise things would regress for them.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH] autoconf: Use autoconf to write installation directories to config.mak
2006-06-29 12:46 ` [PATCH] autoconf: Use autoconf to write installation directories to config.mak Matthias Lederhofer
2006-06-29 13:48 ` Jakub Narebski
@ 2006-06-29 18:23 ` Junio C Hamano
[not found] ` <20060701213305.GA29115@pasky.or.cz>
1 sibling, 1 reply; 30+ messages in thread
From: Junio C Hamano @ 2006-06-29 18:23 UTC (permalink / raw)
To: Matthias Lederhofer; +Cc: git, Jakub Narebski
Matthias Lederhofer <matled@gmx.net> writes:
>> This is beginning of patch series introducing installation configuration
>> using autoconf (and no other autotools) to git. The idea is to generate
>> config.mak using ./configure (generated from configure.ac) from
>> config.mak.in, so one can use autoconf as an _alternative_ to ordinary
>> Makefile, and creating one's own config.mak.
>
> Are you sure this should be named config.mak? From INSTALL:
>> You can place local settings in config.mak and the Makefile
>> will include them. Note that config.mak is not distributed;
>> the name is reserved for local settings.
>
> So with another filename either include it
> - before config.mak: the user may override ./configure options with
> config.mak
> - after config.mak: ./configure overrides config.mak
> At least do not overwrite config.mak if it exists.
Think of it as an incredibly smart editor that you can use to
edit your config.mak. As far as I understand it, this is an
"opt-in" way for you to manage config.mak without editing it
yourself, so I do not have much objections to the series in
principle.
I think it is fair to say that autoconf is not so bad compared
to its worse friends, but I am biased -- I used to deal with
autoconf quite a lot in old days (before there were automake nor
libtool), and my own changes to autoconf might still be
surviving in a few .m4 files but I doubt it it was so long ago.
Having said that, I am skeptical how well we can keep this
contained only to config.mak and keep it "opt-in", so I am not
enthused to have this series at the toplevel of the tree.
It would have been a bit easier to swallow if this whole
machinery to build config.mk were somewhere under contrib/ (say
in contrib/autoconf), with an instruction to make an "opt-in"
symlink "ln -s contrib/autoconf/config.mk config.mk" for people
who want to use it in the toplevel INSTALL file, perhaps.
The one that touches the Makefile to propagate some variables
down to submakes is probably a desirable change but that is
pretty much independent from the series.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH] Allow INSTALL, bindir, mandir to be set in main Makefile
2006-06-29 18:23 ` [PATCH] Allow INSTALL, bindir, mandir to be set in main Makefile Junio C Hamano
@ 2006-06-29 20:16 ` Jakub Narebski
0 siblings, 0 replies; 30+ messages in thread
From: Jakub Narebski @ 2006-06-29 20:16 UTC (permalink / raw)
To: git
Junio C Hamano wrote:
> Jakub Narebski <jnareb@gmail.com> writes:
>
>> Part of autoconf series, but independent.
>
> I'd like to take something like this, independently from
> "optionally managing config.mak with autoconf" series.
>
>> Should probably be split into two patches:
>> * first with export + '?='
>> * second renaming man1 and man7 to man1dir and man7dir
>
> And I think it is probably a good idea to somehow keep people's
> configurations that have been overriding man1 and man7 if
> possible. Otherwise things would regress for them.
Done. Resent as two patch "series", starting with
Message-Id: <200606292211.28352.jnareb@gmail.com>
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH 7] autoconf: configure.ac uses variables to set in, out and temp files
2006-06-29 17:47 ` [PATCH] autoconf: Set mandir in config.mak.in and export variables not in Makefile Jakub Narebski
@ 2006-06-30 0:11 ` Jakub Narebski
2006-06-30 0:32 ` [PATCH 8] autoconf: ./configure script outputs to config.mac.auto Jakub Narebski
0 siblings, 1 reply; 30+ messages in thread
From: Jakub Narebski @ 2006-06-30 0:11 UTC (permalink / raw)
To: git
configure.ac now uses variables to set input file (containing strings
substituted by ./configure script), temporary file (for appending
lines to output file) and output file (with the result configuration).
This is preparation to using other file than config.mak for output.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
configure.ac | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index f48307c..58ec57a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,14 +6,18 @@ AC_INIT([git], [1.4.0], [git@vger.kernel
AC_CONFIG_SRCDIR([git.c])
-echo "# config.mak.append. Generated by configure." >> config.mak.append
+config_file=config.mak
+config_append=config.mak.append
+config_in=config.mak.in
+
+echo "# ${config_append}. Generated by configure." >> "${config_append}"
# Definitions of macros
# MY_APPEND_LINE(LINE)
# --------------------
-# Append LINE to file config.mak.append
+# Append LINE to file ${config_append}
AC_DEFUN([MY_APPEND_LINE],
-[[echo "$1" >> config.mak.append]])# MY_APPEND_LINE
+[[echo "$1" >> "${config_append}"]])# MY_APPEND_LINE
# Checks for libraries.
@@ -46,6 +50,6 @@ AC_CHECK_FUNC(setenv,,MY_APPEND_LINE(NO_
# Output files
-AC_CONFIG_FILES([config.mak:config.mak.in:config.mak.append],
-[rm -f config.mak.append])
+AC_CONFIG_FILES(["${config_file}":"${config_in}":"${config_append}"],
+[rm -f "${config_append}"])
AC_OUTPUT
--
1.4.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 8] autoconf: ./configure script outputs to config.mac.auto
2006-06-30 0:11 ` [PATCH 7] autoconf: configure.ac uses variables to set in, out and temp files Jakub Narebski
@ 2006-06-30 0:32 ` Jakub Narebski
2006-06-30 12:37 ` [PATCH 9] autoconf: Cleanup generation of temporary "append" file Jakub Narebski
0 siblings, 1 reply; 30+ messages in thread
From: Jakub Narebski @ 2006-06-30 0:32 UTC (permalink / raw)
To: git
---
So now to actually use ./configure output you either have to add
-include config.mak.auto
to Makefile before including config.mak, link config.mak.auto to config.mak,
or rename (move) config.mak.auto to config.mak after done with ./configure
configure.ac | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index 58ec57a..799bc87 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,7 +6,7 @@ AC_INIT([git], [1.4.0], [git@vger.kernel
AC_CONFIG_SRCDIR([git.c])
-config_file=config.mak
+config_file=config.mak.auto
config_append=config.mak.append
config_in=config.mak.in
--
1.4.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* Re: [PATCH] autoconf: Use autoconf to write installation directories to config.mak
2006-06-29 13:48 ` Jakub Narebski
@ 2006-06-30 12:18 ` Andreas Ericsson
2006-06-30 15:15 ` Jakub Narebski
2006-07-01 13:58 ` Jakub Narebski
0 siblings, 2 replies; 30+ messages in thread
From: Andreas Ericsson @ 2006-06-30 12:18 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
Jakub Narebski wrote:
> Matthias Lederhofer wrote:
>
>
>>>This is beginning of patch series introducing installation configuration
>>>using autoconf (and no other autotools) to git. The idea is to generate
>>>config.mak using ./configure (generated from configure.ac) from
>>>config.mak.in, so one can use autoconf as an _alternative_ to ordinary
>>>Makefile, and creating one's own config.mak.
>>
>>Are you sure this should be named config.mak? From INSTALL:
>>
>>>You can place local settings in config.mak and the Makefile
>>>will include them. Note that config.mak is not distributed;
>>>the name is reserved for local settings.
>>
>>So with another filename either include it
>>- before config.mak: the user may override ./configure options with
>> config.mak
>>- after config.mak: ./configure overrides config.mak
>
>
> The idea was to use ./configure to _generate_ config.mak, which the user can
> then edit.
>
This is bad, since it forces users to do one thing first and then do
what they're used to. Better to have the script add
-include config.mak.autogen
LAST in config.mak, unless it's already in the file and generate
config.mak.autogen with configure.
Since Make does things bottoms-up (much like swedish students and
midsummer celebrators), the previous hand-edited defaults in config.mak
will beat the ones in config.mak.autogen (a good thing).
> But perhaps using another filename for results of ./configure script
> (and including it in main Makefile) would be better idea.
>
>
>>At least do not overwrite config.mak if it exists.
>
>
> But one might want to run ./configure with different options, to finally
> arrive at the set which is satisfactionary. So unless some magic to detect
> if config.mak was generated from ./configure script, or generated by user
> is used...
>
grep -q autogen config.mak || \
echo "-include config.mak.autogen" >> config.mak
I wouldn't want my long-standing, functioning config.mak overwritten,
but I *might* be interested in trying some of the options provided by
./configure.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH 9] autoconf: Cleanup generation of temporary "append" file
2006-06-30 0:32 ` [PATCH 8] autoconf: ./configure script outputs to config.mac.auto Jakub Narebski
@ 2006-06-30 12:37 ` Jakub Narebski
2006-06-30 12:39 ` [PATCH 10] autoconf: Write how to use ./configure generated file in git build process Jakub Narebski
0 siblings, 1 reply; 30+ messages in thread
From: Jakub Narebski @ 2006-06-30 12:37 UTC (permalink / raw)
To: git
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
configure.ac | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 799bc87..e387f5b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,7 +10,7 @@ config_file=config.mak.auto
config_append=config.mak.append
config_in=config.mak.in
-echo "# ${config_append}. Generated by configure." >> "${config_append}"
+echo "# ${config_append}. Generated by configure." > "${config_append}"
# Definitions of macros
# MY_APPEND_LINE(LINE)
@@ -50,6 +50,7 @@ AC_CHECK_FUNC(setenv,,MY_APPEND_LINE(NO_
# Output files
-AC_CONFIG_FILES(["${config_file}":"${config_in}":"${config_append}"],
-[rm -f "${config_append}"])
+AC_CONFIG_FILES(["${config_file}":"${config_in}":"${config_append}"])
AC_OUTPUT
+
+rm -f "${config_append}"
--
1.4.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 10] autoconf: Write how to use ./configure generated file in git build process
2006-06-30 12:37 ` [PATCH 9] autoconf: Cleanup generation of temporary "append" file Jakub Narebski
@ 2006-06-30 12:39 ` Jakub Narebski
2006-06-30 12:41 ` [PATCH 11] autoconf: Rename ./configure output file to config.mak.autogen Jakub Narebski
0 siblings, 1 reply; 30+ messages in thread
From: Jakub Narebski @ 2006-06-30 12:39 UTC (permalink / raw)
To: git
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
Probably there is better way to do this.
configure.ac | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index e387f5b..ef310ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,3 +54,9 @@ AC_CONFIG_FILES(["${config_file}":"${con
AC_OUTPUT
rm -f "${config_append}"
+
+cat <<_ACEOF
+
+Add '-include ${config_file}' to your config.mak,
+or rename ${config_file} to config.mak
+_ACEOF
--
1.4.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 11] autoconf: Rename ./configure output file to config.mak.autogen
2006-06-30 12:39 ` [PATCH 10] autoconf: Write how to use ./configure generated file in git build process Jakub Narebski
@ 2006-06-30 12:41 ` Jakub Narebski
2006-06-30 15:08 ` [PATCH 12] Revert "autoconf: Write how to use ./configure generated file in git build process" Jakub Narebski
0 siblings, 1 reply; 30+ messages in thread
From: Jakub Narebski @ 2006-06-30 12:41 UTC (permalink / raw)
To: git
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
Choose the name you are more comfortable with
configure.ac | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index ef310ee..f01fc17 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,7 +6,7 @@ AC_INIT([git], [1.4.0], [git@vger.kernel
AC_CONFIG_SRCDIR([git.c])
-config_file=config.mak.auto
+config_file=config.mak.autogen
config_append=config.mak.append
config_in=config.mak.in
--
1.4.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 12] Revert "autoconf: Write how to use ./configure generated file in git build process"
2006-06-30 12:41 ` [PATCH 11] autoconf: Rename ./configure output file to config.mak.autogen Jakub Narebski
@ 2006-06-30 15:08 ` Jakub Narebski
2006-06-30 15:11 ` [PATCH 13] autoconf: Append '-include config.mak.autogen' to config.mak if it is not present Jakub Narebski
0 siblings, 1 reply; 30+ messages in thread
From: Jakub Narebski @ 2006-06-30 15:08 UTC (permalink / raw)
To: git
This reverts 6015ccba6c0439b0b615615aacefaf463c546ba4 commit.
To be replaced by better solution, idea by Andreas Ericsson
---
Or just not apply [PATCH 10] (and this patch)
configure.ac | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index f01fc17..1ead656 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,9 +54,3 @@ AC_CONFIG_FILES(["${config_file}":"${con
AC_OUTPUT
rm -f "${config_append}"
-
-cat <<_ACEOF
-
-Add '-include ${config_file}' to your config.mak,
-or rename ${config_file} to config.mak
-_ACEOF
--
1.4.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 13] autoconf: Append '-include config.mak.autogen' to config.mak if it is not present
2006-06-30 15:08 ` [PATCH 12] Revert "autoconf: Write how to use ./configure generated file in git build process" Jakub Narebski
@ 2006-06-30 15:11 ` Jakub Narebski
2006-06-30 20:29 ` Jakub Narebski
2006-06-30 21:45 ` [RFC/PATCH 14] autoconf: Added --with/--without for openssl, curl, expat to ./configure Jakub Narebski
0 siblings, 2 replies; 30+ messages in thread
From: Jakub Narebski @ 2006-06-30 15:11 UTC (permalink / raw)
To: git; +Cc: Andreas Ericsson
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
Andreas Ericsson wrote:
> Jakub Narebski wrote:
>>
>> The idea was to use ./configure to _generate_ config.mak, which the user can
>> then edit.
>
> This is bad, since it forces users to do one thing first and then do
> what they're used to. Better to have the script add
>
> -include config.mak.autogen
>
> LAST in config.mak, unless it's already in the file and generate
> config.mak.autogen with configure, e.g. with
>
> grep -q autogen config.mak || \
> echo "-include config.mak.autogen" >> config.mak
>
> Since Make does things bottoms-up (much like swedish students and
> midsummer celebrators), the previous hand-edited defaults in config.mak
> will beat the ones in config.mak.autogen (a good thing).
>
> I wouldn't want my long-standing, functioning config.mak overwritten,
> but I *might* be interested in trying some of the options provided by
> ./configure.
Done, with small changes.
Can anyone tell me if frep use is portable enough?
configure.ac | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index 1ead656..2904077 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,3 +54,6 @@ AC_CONFIG_FILES(["${config_file}":"${con
AC_OUTPUT
rm -f "${config_append}"
+
+grep -q -s -F "-include ${config_file}" config.mak || \
+ echo "-include ${config_file}" >> config.mak
--
1.4.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* Re: [PATCH] autoconf: Use autoconf to write installation directories to config.mak
2006-06-30 12:18 ` Andreas Ericsson
@ 2006-06-30 15:15 ` Jakub Narebski
2006-07-01 13:58 ` Jakub Narebski
1 sibling, 0 replies; 30+ messages in thread
From: Jakub Narebski @ 2006-06-30 15:15 UTC (permalink / raw)
To: git
Andreas Ericsson wrote:
> grep -q autogen config.mak || \
> echo "-include config.mak.autogen" >> config.mak
>
> I wouldn't want my long-standing, functioning config.mak overwritten,
> but I *might* be interested in trying some of the options provided by
> ./configure.
Thanks for the solution. Done in my latest patch.
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 13] autoconf: Append '-include config.mak.autogen' to config.mak if it is not present
2006-06-30 15:11 ` [PATCH 13] autoconf: Append '-include config.mak.autogen' to config.mak if it is not present Jakub Narebski
@ 2006-06-30 20:29 ` Jakub Narebski
2006-06-30 21:45 ` [RFC/PATCH 14] autoconf: Added --with/--without for openssl, curl, expat to ./configure Jakub Narebski
1 sibling, 0 replies; 30+ messages in thread
From: Jakub Narebski @ 2006-06-30 20:29 UTC (permalink / raw)
To: git
Jakub Narebski wrote:
> +grep -q -s -F "-include ${config_file}" config.mak || \
> + echo "-include ${config_file}" >> config.mak
Gah, should be of course
+grep -q -s -F -e "-include ${config_file}" config.mak || \
+ echo "-include ${config_file}" >> config.mak
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 30+ messages in thread
* [RFC/PATCH 14] autoconf: Added --with/--without for openssl, curl, expat to ./configure
2006-06-30 15:11 ` [PATCH 13] autoconf: Append '-include config.mak.autogen' to config.mak if it is not present Jakub Narebski
2006-06-30 20:29 ` Jakub Narebski
@ 2006-06-30 21:45 ` Jakub Narebski
2006-06-30 21:57 ` Pavel Roskin
2006-06-30 22:34 ` Jakub Narebski
1 sibling, 2 replies; 30+ messages in thread
From: Jakub Narebski @ 2006-06-30 21:45 UTC (permalink / raw)
To: git
Added --with-PACKAGE[=PATH] (where PATH is prefix for PACKAGE
libraries and includes) and --without-PACKAGE (--with-PACKAGE=no)
support for curl, openssl, expat to configure.ac
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
I'm not autoconf/m4 expert: could anyone tell me how to uppercase
PACKAGE name, so one could write MY_PARSE_WITH(openssl)?
How to add [=PATH] to --with-PACKAGE option description in a way
which does not screw up AS_HELP_WITH calculations. I could use
@<:@=PATH@:>@ which transforms to [=PATH], but AS_HELP_WITH counts
number of characters in source I think.
configure.ac | 34 ++++++++++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index fcfc9ce..26d6f4d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,6 +19,22 @@ # Append LINE to file ${config_append}
AC_DEFUN([MY_APPEND_LINE],
[[echo "$1" >> "${config_append}"]])# MY_APPEND_LINE
+# MY_PARSE_WITH(PACKAGE)
+# ----------------------
+# For use in AC_ARG_WITH action-if-found, for packages default ON.
+# * Set NO_PACKAGE=YesPlease for --without-PACKAGE
+# * Set PACKAGEDIR=ARG for --with-PACKAGE=ARG
+# * Do nothing for --with-PACKAGE without ARG
+# PACKAGE option must be all uppercase
+AC_DEFUN([MY_PARSE_WITH],
+[[if test "$withval" = "no"; then \
+ MY_APPEND_LINE(NO_$1=YesPlease); \
+ elif test "$withval" != "yes"; then \
+ MY_APPEND_LINE($1DIR=$withval); \
+ fi; \
+]])# MY_PARSE_WITH
+
+
# Checks for libraries.
AC_MSG_NOTICE([CHECKS for libraries])
AC_CHECK_LIB([crypto], [SHA1_Init],,MY_APPEND_LINE(NO_OPENSSL=YesPlease))
@@ -48,6 +64,24 @@ AC_CHECK_FUNC(strlcpy,,MY_APPEND_LINE(NO
AC_CHECK_FUNC(setenv,,MY_APPEND_LINE(NO_SETENV=YesPlease))
+# Site configuration
+AC_MSG_NOTICE([CHECKS for site configuration])
+AC_ARG_WITH(curl,
+AS_HELP_STRING([--with-curl],[support http(s):// transports (default is YES)])
+AS_HELP_STRING([], [ARG can be also prefix for curl library and headers]),\
+MY_PARSE_WITH(CURL))
+
+AC_ARG_WITH(openssl,
+AS_HELP_STRING([--with-openssl],[use OpenSSL library (default is YES)])
+AS_HELP_STRING([], [ARG can be prefix for openssl library and headers]),\
+MY_PARSE_WITH(OPENSSL))
+
+AC_ARG_WITH(expat,
+AS_HELP_STRING([--with-expat],[support git-push using http:// and https:// transports via WebDAV (default is YES)])
+AS_HELP_STRING([], [ARG can be also prefix for expat library and headers]),\
+MY_PARSE_WITH(EXPAT))
+
+
# Output files
AC_CONFIG_FILES(["${config_file}":"${config_in}":"${config_append}"])
AC_OUTPUT
--
1.4.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* Re: [RFC/PATCH 14] autoconf: Added --with/--without for openssl, curl, expat to ./configure
2006-06-30 21:45 ` [RFC/PATCH 14] autoconf: Added --with/--without for openssl, curl, expat to ./configure Jakub Narebski
@ 2006-06-30 21:57 ` Pavel Roskin
2006-06-30 22:32 ` Jakub Narebski
2006-06-30 22:34 ` Jakub Narebski
1 sibling, 1 reply; 30+ messages in thread
From: Pavel Roskin @ 2006-06-30 21:57 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
Hi Jakub,
On Fri, 2006-06-30 at 23:45 +0200, Jakub Narebski wrote:
> I'm not autoconf/m4 expert: could anyone tell me how to uppercase
> PACKAGE name, so one could write MY_PARSE_WITH(openssl)?
I don't quite understand what you want, but you could check m4_toupper.
> How to add [=PATH] to --with-PACKAGE option description in a way
> which does not screw up AS_HELP_WITH calculations. I could use
> @<:@=PATH@:>@ which transforms to [=PATH], but AS_HELP_WITH counts
> number of characters in source I think.
Try another pair of square brackets as quotes for literal contents. In
this case, use [[=PATH]]
> +# MY_PARSE_WITH(PACKAGE)
By the way, it's better to use a prefix other than MY. I thing
GIT_PARSE_WITH would be great.
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [RFC/PATCH 14] autoconf: Added --with/--without for openssl, curl, expat to ./configure
2006-06-30 21:57 ` Pavel Roskin
@ 2006-06-30 22:32 ` Jakub Narebski
[not found] ` <20060630233004.7xckw444g4g0gcs8@webmail.spamcop.net>
0 siblings, 1 reply; 30+ messages in thread
From: Jakub Narebski @ 2006-06-30 22:32 UTC (permalink / raw)
To: git
<posted & mailed>
Pavel Roskin wrote:
> On Fri, 2006-06-30 at 23:45 +0200, Jakub Narebski wrote:
>> I'm not autoconf/m4 expert: could anyone tell me how to uppercase
>> PACKAGE name, so one could write MY_PARSE_WITH(openssl)?
>
> I don't quite understand what you want, but you could check m4_toupper.
Thanks. It works great. GIT_PARSE_WITH is now:
AC_DEFUN([GIT_PARSE_WITH],
[[PACKAGE=m4_toupper($1); \
if test "$withval" = "no"; then \
GIT_APPEND_LINE(NO_${PACKAGE}=YesPlease); \
elif test "$withval" != "yes"; then \
GIT_APPEND_LINE(${PACKAGE}DIR=$withval); \
fi; \
]])# GIT_PARSE_WITH
>> How to add [=PATH] to --with-PACKAGE option description in a way
>> which does not screw up AS_HELP_WITH calculations. I could use
>> @<:@=PATH@:>@ which transforms to [=PATH], but AS_HELP_WITH counts
>> number of characters in source I think.
>
> Try another pair of square brackets as quotes for literal contents. In
> this case, use [[=PATH]]
I suspect that AS_HELP_WITH does some strange quoting, or stripping. Both
[=PATH] and [[=PATH]] produces =PATH in ./configure --help output.
When using @<:@=PATH@:>@ I get [=PATH], but the description of option begins
line below.
>> +# MY_PARSE_WITH(PACKAGE)
>
> By the way, it's better to use a prefix other than MY. I thing
> GIT_PARSE_WITH would be great.
Any ideas for name of MY_APPEND_LINE(LINE)/GIT_APPEND_LINE(LINE) macro,
which as a result adds line to output (e.g. LINE = "NO_CURL=YesPlease")?
Thanks for all suggestions
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [RFC/PATCH 14] autoconf: Added --with/--without for openssl, curl, expat to ./configure
2006-06-30 21:45 ` [RFC/PATCH 14] autoconf: Added --with/--without for openssl, curl, expat to ./configure Jakub Narebski
2006-06-30 21:57 ` Pavel Roskin
@ 2006-06-30 22:34 ` Jakub Narebski
1 sibling, 0 replies; 30+ messages in thread
From: Jakub Narebski @ 2006-06-30 22:34 UTC (permalink / raw)
To: git
Jakub Narebski wrote:
> +AC_ARG_WITH(expat,
> +AS_HELP_STRING([--with-expat],[support git-push using http:// and https:// transports via WebDAV (default is YES)])
> +AS_HELP_STRING([], [ARG can be also prefix for expat library and headers]),\
> +MY_PARSE_WITH(EXPAT))
Of course to do anything for --with-expat=PATH case this patch needs
the one that introduces EXPATDIR (there was such patch on the list,
I'm not sure if it got accepted).
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH] autoconf: Use autoconf to write installation directories to config.mak
2006-06-30 12:18 ` Andreas Ericsson
2006-06-30 15:15 ` Jakub Narebski
@ 2006-07-01 13:58 ` Jakub Narebski
1 sibling, 0 replies; 30+ messages in thread
From: Jakub Narebski @ 2006-07-01 13:58 UTC (permalink / raw)
To: git
Andreas Ericsson wrote:
> This is bad, since it forces users to do one thing first and then do
> what they're used to. Better to have the script add
>
> -include config.mak.autogen
>
> LAST in config.mak, unless it's already in the file and generate
> config.mak.autogen with configure.
>
> Since Make does things bottoms-up (much like swedish students and
> midsummer celebrators), the previous hand-edited defaults in config.mak
> will beat the ones in config.mak.autogen (a good thing).
That's not true, unless we use '?=' assignment in Makefile. And we _want_ to
override defaults provided in main git Makefile, so in config.mak.autoconf,
and probably in user's own config.mak we use '=' overriding assignment. So
it would be better to just add "-include config.mak.autogen" to makefile
before "-include config.mak", as in patch below.
diff --git a/Makefile b/Makefile
index ccd7c62..a37d400 100644
--- a/Makefile
+++ b/Makefile
@@ -333,6 +333,7 @@ ifneq (,$(findstring arm,$(uname_M)))
ARM_SHA1 = YesPlease
endif
+-include config.mak.autogen
-include config.mak
ifdef WITH_OWN_SUBPROCESS_PY
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply related [flat|nested] 30+ messages in thread
* Re: [RFC/PATCH 14] autoconf: Added --with/--without for openssl, curl, expat to ./configure
[not found] ` <20060630233004.7xckw444g4g0gcs8@webmail.spamcop.net>
@ 2006-07-01 17:55 ` Jakub Narebski
2006-07-08 7:33 ` Pavel Roskin
0 siblings, 1 reply; 30+ messages in thread
From: Jakub Narebski @ 2006-07-01 17:55 UTC (permalink / raw)
To: Pavel Roskin, git
Pavel Roskin wrote:
> Hi Jakub,
>
> you lost cc: but please feel free to return to the list.
Sending reply to GMane newsgroup tied to mailing list, and via email
to author, but _not_ via mail to mailing list would do that...
especially if the author I'm replying to doesn't use newsgroup
interface.
> Quoting Jakub Narebski <jnareb@gmail.com>:
>> I suspect that AS_HELP_WITH does some strange quoting, or stripping. Both
>> [=PATH] and [[=PATH]] produces =PATH in ./configure --help output.
>> When using @<:@=PATH@:>@ I get [=PATH], but the description of option begins
>> line below.
>
> If you are not following quoting rules, every macro can do strange things!
Well, [=PATH] or [[=PATH]] doesn't work even if GIT_APPEND_LINE is without
double quotes. Besides, that doesn't matter because this is inside of
AS_HELP_STRING macro. No combination of quoting (I think I tried all)
works... I guess I would just not use AS_HELP_STRING, and format help
message "by hand".
>> Any ideas for name of MY_APPEND_LINE(LINE)/GIT_APPEND_LINE(LINE) macro,
>> which as a result adds line to output (e.g. LINE = "NO_CURL=YesPlease")?
>
> GIT_LIB_CURL
>
> Generally, please try to avoid negations. They are confising to the end users.
> Lack of curl may be an anomaly to git developers, but it is not an anomaly for a
> user who has never heard of curl. If you can, try to use positive logic, like
> CURL=1, and translate it to negative logic only as a temporary solution and far
> away from the user's eyes.
I'm following example set by main Makefile. That, and I tried to make configure.ac
as simple as possible...
By the way, if you know autoconf well, perhaps you could tell me how to write
tests for the following programs: ar, tar, rpmbuild, how to write test for
Python version (or rather for WITH_OWN_SUBPROCESS_PY) and other test autoconf.ac
lacks now (NEEDS_SSL_WITH_CRYPTO, NEEDS_LIBICONV, NEEDS_SOCKET, NO_MMAP,
NO_IPV6, NO_ICONV, NO_ACCURATE_DIFF unless that was removed or changed name).
--
Jakub Narebski
ShadeHawk on #git
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH] autoconf: Use autoconf to write installation directories to config.mak
[not found] ` <20060701213305.GA29115@pasky.or.cz>
@ 2006-07-01 22:04 ` Jakub Narebski
0 siblings, 0 replies; 30+ messages in thread
From: Jakub Narebski @ 2006-07-01 22:04 UTC (permalink / raw)
To: Petr Baudis; +Cc: Junio C Hamano, git
On 7/1/06, Petr Baudis <pasky@suse.cz> wrote:
> Dear diary, on Thu, Jun 29, 2006 at 08:23:31PM CEST, I got a letter
> where Junio C Hamano <junkio@cox.net> said that...
>> It would have been a bit easier to swallow if this whole
>> machinery to build config.mk were somewhere under contrib/ (say
>> in contrib/autoconf), with an instruction to make an "opt-in"
>> symlink "ln -s contrib/autoconf/config.mk config.mk" for people
>> who want to use it in the toplevel INSTALL file, perhaps.
>
> Well, I don't get the point of that - it doesn't make any sense to me to
> require this.
>
> The point of ./configure is to make things easier for the user, so to
> balance that we should make the ./configure harder to _call_ by requiring
> the user to do strange arbitrary steps after calling it.
Easiest way is to output ./configure result to e.g. configure.mak.autoconf,
and include this file just before configure.mak in main Makefile.
Just as in patches (although you have to discard or revert two alternate
mechanism patches)
--
Jakub Narebski
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [RFC/PATCH 14] autoconf: Added --with/--without for openssl, curl, expat to ./configure
2006-07-01 17:55 ` Jakub Narebski
@ 2006-07-08 7:33 ` Pavel Roskin
0 siblings, 0 replies; 30+ messages in thread
From: Pavel Roskin @ 2006-07-08 7:33 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
Hello, Jakub!
On Sat, 2006-07-01 at 19:55 +0200, Jakub Narebski wrote:
> >> I suspect that AS_HELP_WITH does some strange quoting, or stripping. Both
> >> [=PATH] and [[=PATH]] produces =PATH in ./configure --help output.
> >> When using @<:@=PATH@:>@ I get [=PATH], but the description of option begins
> >> line below.
Sorry, I misunderstood the problem. I think it's pure cosmetics.
Please don't let it stop you.
> I guess I would just not use AS_HELP_STRING, and format help
> message "by hand".
Please don't wast time on such minor things. It's more important to get
the functionality implemented.
> By the way, if you know autoconf well, perhaps you could tell me how to write
> tests for the following programs: ar, tar, rpmbuild, how to write test for
> Python version (or rather for WITH_OWN_SUBPROCESS_PY) and other test autoconf.ac
> lacks now (NEEDS_SSL_WITH_CRYPTO, NEEDS_LIBICONV, NEEDS_SOCKET, NO_MMAP,
> NO_IPV6, NO_ICONV, NO_ACCURATE_DIFF unless that was removed or changed name).
Generally, see the Autoconf manual for the specific test first, then for
more common test.
For ar, use AC_CHECK_TOOL to allow cross-compilation. For tar and
rpmbiuld, use
AC_CHECK_PROG. Python will have to run to find the version, I'm afraid,
which would complicate cross builds. Fortunately, it's on the way out.
Tests for sockets are described in the Autoconf documentation. Other
tests should probably be implemented as test programs unless they can be
reduced to checking for a specific symbol in a specific library.
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 30+ messages in thread
end of thread, other threads:[~2006-07-08 7:33 UTC | newest]
Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-29 1:01 [PATCH] autoconf: Use autoconf to write installation directories to config.mak Jakub Narebski
2006-06-29 7:18 ` Uwe Zeisberger
2006-06-29 11:59 ` [PATCH] autoconf: Use autoconf to check for libraries: openssl/crypto, curl, expat Jakub Narebski
2006-06-29 13:36 ` [RFC/PATCH] autoconf: Use autoconf to check for some types and library functions Jakub Narebski
2006-06-29 15:04 ` [PATCH] autoconf: Cleanup generation of config.mak.append by ./configure Jakub Narebski
2006-06-29 16:35 ` [PATCH] Allow INSTALL, bindir, mandir to be set in main Makefile Jakub Narebski
2006-06-29 17:47 ` [PATCH] autoconf: Set mandir in config.mak.in and export variables not in Makefile Jakub Narebski
2006-06-30 0:11 ` [PATCH 7] autoconf: configure.ac uses variables to set in, out and temp files Jakub Narebski
2006-06-30 0:32 ` [PATCH 8] autoconf: ./configure script outputs to config.mac.auto Jakub Narebski
2006-06-30 12:37 ` [PATCH 9] autoconf: Cleanup generation of temporary "append" file Jakub Narebski
2006-06-30 12:39 ` [PATCH 10] autoconf: Write how to use ./configure generated file in git build process Jakub Narebski
2006-06-30 12:41 ` [PATCH 11] autoconf: Rename ./configure output file to config.mak.autogen Jakub Narebski
2006-06-30 15:08 ` [PATCH 12] Revert "autoconf: Write how to use ./configure generated file in git build process" Jakub Narebski
2006-06-30 15:11 ` [PATCH 13] autoconf: Append '-include config.mak.autogen' to config.mak if it is not present Jakub Narebski
2006-06-30 20:29 ` Jakub Narebski
2006-06-30 21:45 ` [RFC/PATCH 14] autoconf: Added --with/--without for openssl, curl, expat to ./configure Jakub Narebski
2006-06-30 21:57 ` Pavel Roskin
2006-06-30 22:32 ` Jakub Narebski
[not found] ` <20060630233004.7xckw444g4g0gcs8@webmail.spamcop.net>
2006-07-01 17:55 ` Jakub Narebski
2006-07-08 7:33 ` Pavel Roskin
2006-06-30 22:34 ` Jakub Narebski
2006-06-29 18:23 ` [PATCH] Allow INSTALL, bindir, mandir to be set in main Makefile Junio C Hamano
2006-06-29 20:16 ` Jakub Narebski
2006-06-29 12:46 ` [PATCH] autoconf: Use autoconf to write installation directories to config.mak Matthias Lederhofer
2006-06-29 13:48 ` Jakub Narebski
2006-06-30 12:18 ` Andreas Ericsson
2006-06-30 15:15 ` Jakub Narebski
2006-07-01 13:58 ` Jakub Narebski
2006-06-29 18:23 ` Junio C Hamano
[not found] ` <20060701213305.GA29115@pasky.or.cz>
2006-07-01 22:04 ` Jakub Narebski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).