Add a custom ./configure script
PATCH 1/1 Add a custom ./configure script
This patch adds a custom hand-made and supposedly easy to debug ./configure script. It is originally based on mplayer's ./configure script but heavily modified and of course stripped of all the mplayer-specific tests, as well as many other tests we won't probably need (but we might reintroduce some of them later). I kept the CPU checks since they might come handy to decide which assembler SHA1 implementation to choose.
Also, I'm an autogeneration freak so compared to the mplayer's script this one has a bit different design wrt. the configuration variables; instead of adding random bits of code at various places you just insert one function call near the top and your test near the bottom, everything else is taken care of automagically. Also, the heavy machinery is split to a separate library config-lib.sh.
It's a shame that we have to carry something like this around. Wouldn't the world be much happier place if there would be something like autoconf but instead of mucking with M4 you would just write a shell script while calling various predefined functions? :/
The patch is on top of pu, that is Jakub Narebski's autoconf patch, because it reuses most of its infrastructure and just replaces the configure script.
---
.gitignore | 6 - INSTALL | 1 config-lib.sh | 449 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ config.mak.in | 18 -- configure | 78 ++++++++++ configure.ac | 14 -- 6 files changed, 528 insertions(+), 38 deletions(-)
.gitignore +1 -5
@@ -136,10 +136,6 @@ git-core.spec *.[ao] *.py[co] config.mak -autom4te.cache -config.log -config.status -config.mak.in config.mak.autogen -configure +config.log git-blame
INSTALL +0 -1
@@ -16,7 +16,6 @@ install" would not work. Alternatively you can use autoconf generated ./configure script to set up install paths (via config.mak.autogen), so you can write instead - $ autoconf ;# as yourself if ./configure doesn't exist yet $ ./configure --prefix=/usr ;# as yourself $ make all doc ;# as yourself # make install install-doc ;# as root
config-lib.sh new file +449 -0
449 lines not on this page · raw message
config.mak.in deleted +0 -18
@@ -1,18 +0,0 @@ -# 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 - -mandir=@mandir@ - -srcdir = @srcdir@ -VPATH = @srcdir@ - -export exec_prefix mandir -export srcdir VPATH -
configure new file +78 -0
78 lines not on this page · raw message
configure.ac deleted +0 -14
@@ -1,14 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -AC_PREREQ(2.59) -AC_INIT([git], [1.4.1], [[email protected]]) - -AC_CONFIG_SRCDIR([git.c]) - -config_file=config.mak.autogen -config_in=config.mak.in - -# Output files -AC_CONFIG_FILES(["${config_file}":"${config_in}"]) -AC_OUTPUT