Commit graph

72 commits

Author SHA1 Message Date
Ben Walton 08df6a3086 configure: reorganize flow of argument checks
Move the argument tests from the 'site overrides' so that they are
ahead of any library tests.  This allows for library tests to take
user specified paths into account.  The intent here is to avoid things
like NO_DEFLATE_BOUND being set due to finding old zlib when the user
has specified an alternate location for zlib.  (Ignore the fact that
properly set *FLAGS can avoid solve this issue.)

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-12 23:23:38 -07:00
Ben Walton e068f4f53b configure: ensure settings from user are also usable in the script
Allow things set by the user (--with-lib, --with-iconv, etc) to set
variables for use by other parts of the script.  Display values as
they're set.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-12 23:23:38 -07:00
Ralf Wildenhues a1a587ef72 Fix naming scheme for configure cache variables.
In order to be cached, configure variables need to contain the
string '_cv_', and they should begin with a package-specific
prefix in order to avoid interfering with third-party macros.
Rename ld_dashr, ld_wl_rpath, ld_rpath to git_cv_ld_dashr etc.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-21 00:12:25 -08:00
Junio C Hamano 8b75d31c94 Merge branch 'ds/uintmax-config'
* ds/uintmax-config:
  autoconf: Enable threaded delta search when pthreads are supported
2009-01-17 23:08:53 -08:00
Paul Jarc 50a4b35245 configure clobbers LDFLAGS
In a couple of tests, configure clobbers the LDFLAGS value set by the
caller.  This patch fixes it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-05 19:46:19 -08:00
David M. Syzdek d937c374cc autoconf: Enable threaded delta search when pthreads are supported
Automatically set THREADED_DELTA_SEARCH when autoconf test detects
support for pthreads on the platform.  This will change the default for
some platforms that did not enable threaded delta search previously.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-02 22:48:58 -08:00
Junio C Hamano 46059cc632 Makefile: introduce NO_PTHREADS
This introduces make variable NO_PTHREADS for platforms that lack the
support for pthreads library or people who do not want to use it for
whatever reason.  When defined, it makes the multi-threaded index
preloading into a no-op, and also disables threaded delta searching by
pack-objects.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Mike Ralphson <mike@abacus.co.uk>
Tested-by: Johannes Sixt <j6t@kdbg.org> (AIX 4.3.x)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-02 15:29:12 -08:00
Junio C Hamano 3e9f158c80 Merge branch 'ds/uintmax-config' (early part)
* 'ds/uintmax-config' (early part):
  Add autoconf tests for pthreads
  Make Pthread link flags configurable
  Add Makefile check for FreeBSD 4.9-SECURITY
  Build: add NO_UINTMAX_T to support ancient systems

Conflicts:
	Makefile
2008-11-12 22:27:33 -08:00
David M. Syzdek 20f7a39825 Add autoconf tests for pthreads
Set the value of PTHREAD_LIBS to the correct flags for linking pthreads on
the current environment.

Signed-off-by: David M. Syzdek <david.syzdek@acsalaska.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-09 11:26:54 -08:00
David M. Syzdek 1689c5de87 autoconf: Add link tests to each AC_CHECK_FUNC() test
Update configure.ac to test libraries for getaddrinfo, strcasestr, memmem,
strlcpy, strtoumax, setenv, unsetenv, and mkdtemp.  The default compilers
on FreeBSD 4.9-SECURITY and FreeBSD 6.2-RELEASE-p4 do not generate warnings
for missing prototypes unless `-Wall' is used. This behavior renders the
results of AC_CHECK_FUNC() void on these platforms. The test AC_SEARCH_LIBS()
verifies a function is valid by linking to symbol within the system libraries.

Since this pattern needs to be repeated for many functions that are
checked with AC_CHECK_FUNC(), we add GIT_CHECK_FUNC() to drive the two
autoconf macros together.

Signed-off-by: David M. Syzdek <david.syzdek@acsalaska.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-02 15:39:54 -08:00
David M. Syzdek 0bc3e781de Build: add NO_UINTMAX_T to support ancient systems
This adds NO_UINTMAX_T for ancient systems, such as FreeBSD 4.9-SECURITY.
If NO_UINTMAX_T is defined, then uintmax_t is defined as uint32_t.

Signed-off-by: David M. Syzdek <david.syzdek@acsalaska.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-02 01:09:34 -07:00
Giovanni Funchal 798a945002 configure: auto detect dynamic library path switches
Most systems (e.g. Linux gcc) use "-Wl,-rpath," to pass to the linker the
runtime dynamic library paths. Some other systems (e.g. Sun, some BSD) use
"-R" etc. This patch adds tests in configure for the three most common
switches (to my best knowledge) which should cover all current platforms
where Git is used.

Signed-Off-By: Giovanni Funchal <gafunchal@gmail.com>

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-17 17:42:02 -07:00
Johan Herland 8da1e21231 Consistency: Use "libcurl" instead of "cURL library" and "curl"
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-15 13:35:10 -07:00
Michal Rokos 8ce1f243e5 autoconf: Test FREAD_READS_DIRECTORIES
Add test for FREAD_READS_DIRECTORIES to detect when fread() reads fopen'ed
directory.

Tested on these platforms:

  AIX 5.3 - FREAD_READS_DIRECTORIES=UnfortunatelyYes
  HP-UX B.11.11 - FREAD_READS_DIRECTORIES=UnfortunatelyYes
  HP-UX B.11.23 - FREAD_READS_DIRECTORIES=UnfortunatelyYes
  Linux 2.6.25-rc4 - FREAD_READS_DIRECTORIES=
  Tru64 V5.1 - FREAD_READS_DIRECTORIES=UnfortunatelyYes
  Windows - FREAD_READS_DIRECTORIES=

Signed-off-by: Michal Rokos <michal.rokos@nextsoft.cz>
Tested-by: Mike Ralphson <mike@abacus.co.uk>
Tested-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-11 02:10:43 -07:00
Michal Rokos c4582f93a2 Add compat/snprintf.c for systems that return bogus
Some systems (namely HPUX and Windows) return -1 when maxsize in snprintf()
and in vsnprintf() is reached. So replace snprintf() and vsnprintf()
functions with our own ones that return correct value upon overflow.

[jc: verified that review comments by J6t have been incorporated, and
 tightened the check to verify the resulting buffer contents, suggested
 by Wayne Davison]

Signed-off-by: Michal Rokos <michal.rokos@nextsoft.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-05 13:12:07 -08:00
Jakub Narebski 3cf3237400 autoconf: define NO_SYS_SELECT_H on systems without <sys/select.h>.
Pre-POSIX.1-2001 systems don't have <sys/select.h>, but select(2)
is declared in <sys/time.h>, which git-compat-util.h includes.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-25 22:26:08 -08:00
Jakub Narebski bfa8fccf47 autoconf: Add checking for unsetenv function
Update configure.ac (and config.mak.in) by adding test for unsetenv
(NO_UNSETENV).  Add comment about NO_UNSETENV to Makefile header, as
original commit 731043fd adding compat/unsetenv.c didn't do that.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-17 23:35:36 -08:00
Jakub Narebski 923db42eea autoconf: Check asciidoc version to automatically set ASCIIDOC8
Check for asciidoc, and if it exists check asciidoc version, setting
ASCIIDOC8 when needed.  Currently it just runs asciidoc in asciidoc7
compatibility mode (see: Documentation/Makefile).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-11 00:38:38 -08:00
Jakub Narebski 0f7a9c9b7b autoconf: Add test for OLD_ICONV (squelching compiler warning)
Update configure.ac (and config.mak.in) to keep up with git
development by adding [compile] test whether your library has an old
iconv(), where the second (input buffer pointer) parameter is declared
with type (const char **) (OLD_ICONV).

Test-proposed-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-06 23:23:42 -08:00
Junio C Hamano 65c6a4696a Merge branch 'maint'
* maint:
  Replace the word 'update-cache' by 'update-index' everywhere
  cvsimport: fix usage of cvsimport.module
  t7003-filter-branch: Fix test of a failing --msg-filter.
  cvsimport: miscellaneous packed-ref fixes
  cvsimport: use rev-parse to support packed refs
  Add basic cvsimport tests
2007-11-30 16:21:33 -08:00
Johannes Schindelin 10455d2a95 Replace the word 'update-cache' by 'update-index' everywhere
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-30 15:09:40 -08:00
Jakub Narebski 2439755630 autoconf: Add tests for memmem, strtoumax and mkdtemp functions
Update configure.ac (and config.mak.in) to keep up with git
development by adding tests for memmem (NO_MEMMEM), strtoumax
(NO_STRTOUMAX) and mkdtemp (NO_MKDTEMP) functions.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-20 13:16:15 -08:00
Junio C Hamano 0380074315 Merge branch 'ds/maint-deflatebound'
* ds/maint-deflatebound:
  Improve accuracy of check for presence of deflateBound.
2007-11-07 18:17:20 -08:00
Ralf Wildenhues 3c307bfbe8 Fix minor nits in configure.ac
Avoid "test -o" as it is only XSI not POSIX, and not portable.
Avoid exit(3) in test programs in favor of return, to accommodate
for newer Autoconf not providing a declaration for exit.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-07 17:21:41 -08:00
David Symonds 609a2289d7 Improve accuracy of check for presence of deflateBound.
ZLIB_VERNUM isn't defined in some zlib versions, so this patch does a proper
linking test in autoconf to see whether deflateBound exists in zlib. Also,
setting NO_DEFLATE_BOUND will also work for folk not using autoconf.

Signed-off-by: David Symonds <dsymonds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-07 17:06:14 -08:00
Robert Schiele 96e24abc9f the ar tool is called gar on some systems
Some systems that have only installed the GNU toolchain (prefixed with "g")
do not provide "ar" but only "gar".  Make configure find this tool as well.

Signed-off-by: Robert Schiele <rschiele@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02 21:10:25 -07:00
Robert Schiele 10861beaa8 make the name of the library directory a config option
Introduce new makefile variable lib to hold the name of the lib
directory ("lib" by default).  Also introduce a switch for configure
to specify this name with --with-lib=ARG.  This is useful for systems
that use a different name than "lib" (like "lib64" on some 64 bit
Linux architectures).

Signed-off-by: Robert Schiele <rschiele@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-31 22:36:55 -07:00
Robert Schiele bef19da9b6 add option to find zlib in custom path
Some systems do not provide zlib development headers and libraries in
default search path of the compiler.  For these systems we should allow
specifying the location by --with-zlib=PATH or by setting ZLIB_PATH in
the makefile.

Signed-off-by: Robert Schiele <rschiele@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-31 01:23:43 -07:00
Eygene Ryabinkin 68daee085c Eliminate checks of user-specified Tcl/Tk interpreter.
Do not make the checks on the Tcl/Tk interpreter passed by
'--with-tcltk=/path/to/wish' configure option: user is free to pass
anything.

Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-31 23:59:47 -07:00
Eygene Ryabinkin 81b63c707e Add --with-tcltk and --without-tcltk to configure.
--with-tcltk enables the search of the Tcl/Tk interpreter. If no
interpreter is found then Tcl/Tk dependend parts are disabled.

--without-tcltk unconditionally disables Tcl/Tk dependent parts.

The original behaviour is not changed: bare './configure' just
installs the Tcl/Tk part doing no checks for the interpreter.

Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>
2007-03-31 23:59:47 -07:00
Fredrik Kuivinen e63ccb84e3 New autoconf test for iconv
On a Solaris machine I have access to libc contains the symbol
"iconv" but, when compiling with gcc and including iconv.h we get
iconv.h from GNU libiconv. This header file define (among other
things) "iconv" to "libiconv" and so on.

In order to link with GNU libiconv we need -liconv. Currently we
test if the symbol "iconv" is in libc (which is true), then we get
a undefined reference error because we don't have libiconv_open.

The solution this patch implements is to compile and link a
small test program, instead of just checking if the libraries
(libc and libiconv) contains the symbol "iconv".

Signed-off-by: Fredrik Kuivinen <frekui@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-18 15:57:36 -08:00
Eric Wong 40f656cd02 Remove NO_ACCURATE_DIFF options from build systems
The code no longer uses it, as we have --inaccurate-eof in
git-apply.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-22 23:13:28 -08:00
Brian Gernhardt c17f9f12a4 Remove COLLISION_CHECK from Makefile since it's not used.
It's rather misleading to have configuration options that don't do
anything.  If someone adds collision checking they might also want to
restore this option.

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-19 21:33:35 -08:00
Junio C Hamano 7cdbff14d4 remove merge-recursive-old
This frees the Porcelain-ish that comes with the core Python-free.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-21 20:55:39 -08:00
Junio C Hamano 69de8cc852 Merge branch 'jc/gitpm'
* jc/gitpm: (52 commits)
  Remove -fPIC which was only needed for Git.xs
  Git.pm: Kill Git.xs for now
  Revert "Make it possible to set up libgit directly (instead of from the environment)"
  Revert "Git.pm: Introduce fast get_object() method"
  Revert "Convert git-annotate to use Git.pm"
  Fix compilation with Sun CC
  pass DESTDIR to the generated perl/Makefile
  Eliminate Scalar::Util usage from private-Error.pm
  Convert git-annotate to use Git.pm
  Git.pm: Introduce fast get_object() method
  Make it possible to set up libgit directly (instead of from the environment)
  Work around sed and make interactions on the backslash at the end of line.
  Git.pm: Introduce ident() and ident_person() methods
  Convert git-send-email to use Git.pm
  Git.pm: Add config() method
  Use $GITPERLLIB instead of $RUNNING_GIT_TESTS and centralize @INC munging
  INSTALL: a tip for running after building but without installing.
  Perly Git: make sure we do test the freshly built one.
  Git.pm: Don't #define around die
  Git.xs: older perl do not know const char *
  ...
2006-09-30 23:38:24 -07:00
Junio C Hamano f7661ce0b8 Remove -fPIC which was only needed for Git.xs
The distinction between BASIC_ vs ALL_ is still kept, since it
is not Git.xs specific -- we could face the same issue when we
do other language bindings (e.g. Python).

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-29 18:52:38 -07:00
Junio C Hamano a06f678eb9 Deprecate merge-recursive.py
This renames merge-recursive written in Python to merge-recursive-old,
and makes merge-recur as a synonym to merge-recursive.  We do not remove
merge-recur yet, but we will remove merge-recur and merge-recursive-old
in a few releases down the road.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-24 20:33:35 -07:00
Jakub Narebski baf1219acb autoconf: Add support for setting NO_ICONV and ICONVDIR
Add support for ./configure options --without-iconv (if neither libc
nor libiconv properly support iconv), and for --with-iconv=PATH (to
set prefix to libiconv library and headers, used only when
NEED_LIBICONV is set).  While at it, make ./configure set or unset
NO_ICONV always (it is not autodetected in Makefile).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-07 13:04:21 -07:00
Jakub Narebski 6ff88de7f7 autoconf: Set NO_ICONV if iconv is found neither in libc, nor in libiconv
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-07 13:02:29 -07:00
Jakub Narebski 825b045f52 autoconf: Fix copy'n'paste error
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-05 13:36:19 -07:00
Jakub Narebski f685d07de0 autoconf: Quote AC_CACHE_CHECK arguments
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-04 18:56:09 -07:00
Jakub Narebski f8affe317d autoconf: Check for subprocess.py
Add custom test for checking if Python comes with subprocess.py, or
should we use our own subprocess.py by defining WITH_OWN_SUBPROCESS_PY.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-04 18:55:35 -07:00
Jakub Narebski c23cca1720 autoconf: Add -liconv to LIBS when NEEDS_LIBICONV
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-04 18:54:27 -07:00
Dennis Stosberg 60a144f280 Fix compilation with Sun CC
- Add the CFLAGS variable to config.mak.in to override the Makefile's
  default, which is gcc-specific and won't work with Sun CC.
- Prefer "cc" over "gcc", because Pasky's Git.pm will not compile with gcc
  on Solaris at all. On Linux and the free BSDs "cc" is linked to "gcc"
  anyway.
- Set correct flag to generate position-independent code.
- Add "-xO3" (= use default optimization level) to CFLAGS.

Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-15 03:13:47 -07:00
Dennis Stosberg d1b9944db8 Fix detection of ipv6 on Solaris
The configuration script detects whether linking with -lsocket is
necessary but doesn't add -lsocket to LIBS.  This lets the ipv6 test
fail.

Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-15 02:58:47 -07:00
Dennis Stosberg ab5573ae9f Look for sockaddr_storage in sys/socket.h
On Solaris and the BSDs the definition of "struct sockaddr_storage"
is not available from "netinet/in.h".  On Solaris "sys/socket.h" is
enough, at least OpenBSD needs "sys/types.h", too.

Using "sys/types.h" and "sys/socket.h" seems to be a more portable
way.

Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-15 02:57:42 -07:00
Jakub Narebski a20b4d899a autoconf: Add support for setting CURLDIR, OPENSSLDIR, EXPATDIR
Add support for --with-openssl=PATH and --without-openssl,
--with-curl=PATH and --without-curl, --with-expat=PATH and
--without-expat ./configure options, each setting or unsetting
appropriate NO_PACKAGE and if called with argument also PACKAGEDIR
(of which only CURLDIR is documented in Makefile)

All above options are supported as override to autodetection; more to
come in the same style (override to autodetection), so moved the bulk
of comments for site configuration down.

Needs review by someone well versed in autoconf and m4.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-08 22:07:08 -07:00
Jakub Narebski 7b1e9d3d85 autoconf: It is --without-python, not --no-python
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-08 17:47:36 -07:00
Jakub Narebski 424adc50b7 autoconf: Move variables which we always set to config.mak.in
Move detected NO_STH and NEED_STH variables, which we always output,
either setting or unsetting (setting to empty string) to config.mak.in
and use setting appropriately named variables and doing AC_SUBST
instead of adding them via GIT_CONF_APPEND_LINE macro and
config.mak.append temporary file.

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

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-08 17:19:18 -07:00
Jakub Narebski af6058cc2b autoconf: Improvements in NO_PYTHON/PYTHON_PATH handling
Unset NO_PYTHON for --with-python without arguments, and when
PYTHON_PATH is set.  Do not check for PYTHON_PATH if it is set
via --with-python=PYTHON_PATH.  Prefer "python" over version
specific names such as "python2.4".

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-08 13:34:00 -07:00