threads / patch / 4702

patchautoconf: Use autoconf to write installation directories to config.mak

Subject: [PATCH] autoconf: Use autoconf to write installation directories to config.mak

## tl;dr

30 messages between Jun 29, 2006 and Jul 8, 2006. Diffs are folded; open one to read it.

replies: 29people: 6as markdown or json

Jakub Narebski· Jun 29, 2006, 01:01 UTC · lore

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(-)
Show changes to 3 files +27 −0

.gitignore, config.mak.in, configure.ac

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
Uwe Zeisberger· Jun 29, 2006, 07:18 UTC · re: Jakub Narebski · lore

Re: [PATCH] autoconf: Use autoconf to write installation directories to config.mak

Jakub Narebski wrote:
Show 9 quoted lines
> 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
Jakub Narebski· Jun 29, 2006, 11:59 UTC · re: Jakub Narebski · lore

[PATCH] autoconf: Use autoconf to check for libraries: openssl/crypto, curl, expat

./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(-)
Show changes to configure.ac +16 −1
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
Jakub Narebski· Jun 29, 2006, 13:36 UTC · re: Jakub Narebski · lore

[RFC/PATCH] autoconf: Use autoconf to check for some types and library functions

./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(-)
Show changes to configure.ac +25 −1
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
Jakub Narebski· Jun 29, 2006, 15:04 UTC · re: Jakub Narebski · lore

[PATCH] autoconf: Cleanup generation of config.mak.append by ./configure

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
 configure.ac |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
Show changes to configure.ac +4 −3
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
Jakub Narebski· Jun 29, 2006, 16:35 UTC · re: Jakub Narebski · lore

[PATCH] Allow INSTALL, bindir, mandir to be set in main Makefile

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(-)
Show changes to 4 files +15 −13

Documentation/Makefile, Makefile, contrib/emacs/Makefile, contrib/git-svn/Makefile

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
Jakub Narebski· Jun 29, 2006, 17:47 UTC · re: Jakub Narebski · lore

[PATCH] autoconf: Set mandir in config.mak.in and export variables not in Makefile

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:
Show 13 quoted lines
> 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(-)
Show changes to config.mak.in +6 −0
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
Jakub Narebski· Jun 30, 2006, 00:11 UTC · re: Jakub Narebski · lore

[PATCH 7] autoconf: configure.ac uses variables to set in, out and temp files

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(-)
Show changes to configure.ac +9 −5
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
Jakub Narebski· Jun 30, 2006, 00:32 UTC · re: Jakub Narebski · lore

[PATCH 8] autoconf: ./configure script outputs to config.mac.auto

---
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(-)
Show changes to configure.ac +1 −1
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
Jakub Narebski· Jun 30, 2006, 12:37 UTC · re: Jakub Narebski · lore

[PATCH 9] autoconf: Cleanup generation of temporary "append" file

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
 configure.ac |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
Show changes to configure.ac +4 −3
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
Jakub Narebski· Jun 30, 2006, 12:39 UTC · re: Jakub Narebski · lore

[PATCH 10] autoconf: Write how to use ./configure generated file in git build process

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(-)
Show changes to configure.ac +6 −0
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
Jakub Narebski· Jun 30, 2006, 12:41 UTC · re: Jakub Narebski · lore

[PATCH 11] autoconf: Rename ./configure output file to config.mak.autogen

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(-)
Show changes to configure.ac +1 −1
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
Jakub Narebski· Jun 30, 2006, 15:08 UTC · re: Jakub Narebski · lore

[PATCH 12] Revert "autoconf: Write how to use ./configure generated file in git build process"

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(-)
Show changes to configure.ac +0 −6
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
Jakub Narebski· Jun 30, 2006, 15:11 UTC · re: Jakub Narebski · lore

[PATCH 13] autoconf: Append '-include config.mak.autogen' to config.mak if it is not present

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
Andreas Ericsson wrote:
Show 23 quoted lines
> 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(-)
Show changes to configure.ac +3 −0
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
Jakub Narebski· Jun 30, 2006, 20:29 UTC · re: Jakub Narebski · lore

Re: [PATCH 13] autoconf: Append '-include config.mak.autogen' to config.mak if it is not present

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
Jakub Narebski· Jun 30, 2006, 21:45 UTC · re: Jakub Narebski · lore

[RFC/PATCH 14] autoconf: Added --with/--without for openssl, curl, expat to ./configure

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(-)
Show changes to configure.ac +34 −0
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
Pavel Roskin· Jun 30, 2006, 21:57 UTC · re: Jakub Narebski · lore

Re: [RFC/PATCH 14] autoconf: Added --with/--without for openssl, curl, expat to ./configure

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
Jakub Narebski· Jun 30, 2006, 22:32 UTC · re: Pavel Roskin · lore

Re: [RFC/PATCH 14] autoconf: Added --with/--without for openssl, curl, expat to ./configure

<posted & mailed>
Pavel Roskin wrote:
Show 5 quoted lines
> 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
Show 7 quoted lines
>> 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
Jakub Narebski· Jun 30, 2006, 22:34 UTC · re: Jakub Narebski · lore

Re: [RFC/PATCH 14] autoconf: Added --with/--without for openssl, curl, expat to ./configure

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
Junio C Hamano· Jun 29, 2006, 18:23 UTC · re: Jakub Narebski · lore

Re: [PATCH] Allow INSTALL, bindir, mandir to be set in main Makefile

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.

Jakub Narebski· Jun 29, 2006, 20:16 UTC · re: Junio C Hamano · lore

Re: [PATCH] Allow INSTALL, bindir, mandir to be set in main Makefile

Junio C Hamano wrote:
Show 14 quoted lines
> 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
Matthias Lederhofer· Jun 29, 2006, 12:46 UTC · re: Jakub Narebski · lore

Re: [PATCH] autoconf: Use autoconf to write installation directories to config.mak

Show 5 quoted lines
> 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.
Jakub Narebski· Jun 29, 2006, 13:48 UTC · re: Matthias Lederhofer · lore

Re: [PATCH] autoconf: Use autoconf to write installation directories to config.mak

Matthias Lederhofer wrote:
Show 15 quoted lines
>> 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
Andreas Ericsson· Jun 30, 2006, 12:18 UTC · re: Jakub Narebski · lore

Re: [PATCH] autoconf: Use autoconf to write installation directories to config.mak

Jakub Narebski wrote:
Show 24 quoted lines
> 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).

Show 12 quoted lines
> 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
Jakub Narebski· Jun 30, 2006, 15:15 UTC · re: Andreas Ericsson · lore

Re: [PATCH] autoconf: Use autoconf to write installation directories to config.mak

Andreas Ericsson wrote:
Show 6 quoted lines
> 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
Jakub Narebski· Jul 1, 2006, 13:58 UTC · re: Andreas Ericsson · lore

Re: [PATCH] autoconf: Use autoconf to write installation directories to config.mak

Andreas Ericsson wrote:
Show 11 quoted lines
> 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.

Show changes to Makefile +1 −0
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
Junio C Hamano· Jun 29, 2006, 18:23 UTC · re: Matthias Lederhofer · lore

Re: [PATCH] autoconf: Use autoconf to write installation directories to config.mak

Matthias Lederhofer <matled@gmx.net> writes:
Show 16 quoted lines
>> 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.

Jakub Narebski· Jul 1, 2006, 17:55 UTC · lore

Re: [RFC/PATCH 14] autoconf: Added --with/--without for openssl, curl, expat to ./configure

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>:
Show 6 quoted lines
>> 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".

Show 10 quoted lines
>> 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
Pavel Roskin· Jul 8, 2006, 07:33 UTC · re: Jakub Narebski · lore

Re: [RFC/PATCH 14] autoconf: Added --with/--without for openssl, curl, expat to ./configure

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.

Show 5 quoted lines
> 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
Jakub Narebski· Jul 1, 2006, 22:04 UTC · lore

Re: [PATCH] autoconf: Use autoconf to write installation directories to config.mak

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...
Show 12 quoted lines
>> 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

← back to recent threads