* gv/portable:
test-lib: use DIFF definition from GIT-BUILD-OPTIONS
build: propagate $DIFF to scripts
Makefile: Tru64 portability fix
Makefile: HP-UX 10.20 portability fixes
Makefile: HPUX11 portability fixes
Makefile: SunOS 5.6 portability fix
inline declaration does not work on AIX
Allow disabling "inline"
Some platforms lack socklen_t type
Make NO_{INET_NTOP,INET_PTON} configured independently
Makefile: some platforms do not have hstrerror anywhere
git-compat-util.h: some platforms with mmap() lack MAP_FAILED definition
test_cmp: do not use "diff -u" on platforms that lack one
fixup: do not unconditionally disable "diff -u"
tests: use "test_cmp", not "diff", when verifying the result
Do not use "diff" found on PATH while building and installing
enums: omit trailing comma for portability
Makefile: -lpthread may still be necessary when libc has only pthread stubs
Rewrite dynamic structure initializations to runtime assignment
Makefile: pass CPPFLAGS through to fllow customization
Conflicts:
Makefile
wt-status.h
Compiler support for inline is sometimes buggy, and occasionally
missing entirely. This patch adds a test for inline support, and
redefines the keyword with the preprocessor if necessary at compile
time.
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Some platforms do not have a socklen_t type declaration.
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Being careful not to overwrite the results of testing for hstrerror in
libresolv, also test whether inet_ntop/inet_pton are available from
that library.
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This patch improves the logic of the test for hstrerror, not to
blindly assume that if there is no hstrerror in libc that it must
exist in libresolv.
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Some of the flags used with the first diff found in PATH cause the
vendor diff to choke.
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Without this patch, systems that provide stubs for pthread functions
in libc, but which still require libpthread for full the pthread
implementation are not detected correctly.
Also, some systems require -pthread in CFLAGS for each compilation
unit for a successful link of an mt binary, which is also addressed by
this patch.
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This will allow users to set a JavaScript/CSS minifier when/if they run
the autoconfigure script while building git.
Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This patch allows someone to use configure to build git while at the
same time disabling the python remote helper code. It leverages the
ability of GIT_ARG_SET_PATH to accept an optional second argument
indicating that --without-$PROGRAM is acceptable.
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add an optional second argument to both GIT_ARG_SET_PATH and
GIT_CONF_APPEND_PATH such that any value of the second argument will
enable configure to set NO_$PROGRAM in addition to an empty
$PROGRAM_PATH. This is initially useful for allowing configure to
disable the use of python, as the remote helper code has nothing
leveraging it yet.
The Makefile already recognizes NO_PYTHON, but configure provided no
way to set it appropriately.
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When the first piece of threaded code was introduced in commit 8ecce684, it
came with its own THREADED_DELTA_SEARCH Makefile option. Since this time,
more threaded code has come into the codebase and a NO_PTHREADS option has
also been added. Get rid of the original option as the newer, more generic
option covers everything we need.
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* sr/vcs-helper:
tests: handle NO_PYTHON setting
builtin-push: don't access freed transport->url
Add Python support library for remote helpers
Basic build infrastructure for Python scripts
Allow helpers to report in "list" command that the ref is unchanged
Fix various memory leaks in transport-helper.c
Allow helper to map private ref names into normal names
Add support for "import" helper command
Allow specifying the remote helper in the url
Add a config option for remotes to specify a foreign vcs
Allow fetch to modify refs
Use a function to determine whether a remote is valid
Allow programs to not depend on remotes having urls
Fix memory leak in helper method for disconnect
Conflicts:
Documentation/git-remote-helpers.txt
Makefile
builtin-ls-remote.c
builtin-push.c
transport-helper.c
This patch adds basic boilerplate support (based on corresponding Perl
sections) for enabling the building and installation Python scripts.
There are currently no Python scripts being built, and when Python
scripts are added in future patches, their building and installation
can be disabled by defining NO_PYTHON.
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Use the new GIT_PARSE_WITH_SET_MAKE_VAR macro to allow configuration
settings for ETC_GITCONFIG, DEFAULT_PAGER and DEFAULT_EDITOR.
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add macro GIT_PARSE_WITH_SET_MAKE_VAR to configure.ac to allow --with
style options that set values for variables used during the make
process.
Arguments are the $name part of --with-$name, the name of
the variable to set in the Makefile (config.mak.autogen) and
the help text for the option.
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
They are both slower than the new BLK_SHA1 implementation, so it is
pointless to keep them around.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The empty assignment NEEDS_SSL_WITH_CRYPTO= was mistakenly paired with the
assignment NEEDS_SSL_WITH_CRYPTO=YesPlease in the "action-if-found"
parameter of the AC_CHECK_LIB macro. The empty assignment was intended for
the "action-if-not-found" section, since in that case, the necessary sha1
hash function was not found and the internal sha1 implementation will be
used instead.
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The "action" parameters for these two tests were supplied incorrectly for
the way the tests were implemented. The tests check whether a program
which calls hstrerror() or basename() successfully links when -lresolv or
-lgen are used, respectively. A successful linking would result in
NEEDS_RESOLV or NEEDS_LIBGEN being unset, and failure would result in
setting the respective variable.
Aside from that issue, the tests did not handle the case where neither
library was necessary for accessing the functions in question. So solve
both of these issues by re-working the two tests so that their form is like
the NEEDS_SOCKET test which attempts to link with just the c library, and
if it fails then assumes that the additional library is necessary and sets
the appropriate variable.
Also an entry in the config.mak.in file is necessary for the NEEDS_LIBGEN
variable to appear in the config.mak.autogen file with the value assigned
by the configure script. Without it, the generated shell script would
contain a snippet like this:
for ac_lib in ; do
...
which is incorrect.
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commit 003b33a8 recently added a call to basename(). On IRIX 6.5, this
function resides in libgen and -lgen is required for the linker.
Update configure.ac too.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bc/solaris:
configure: test whether -lresolv is needed
Makefile: insert SANE_TOOL_PATH to PATH before /bin or /usr/bin
git-compat-util.h: avoid using c99 flex array feature with Sun compiler 5.8
Makefile: add section for SunOS 5.7
Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH
Makefile: define __sun__ on SunOS
git-compat-util.h: tweak the way _XOPEN_SOURCE is set on Solaris
On Solaris choose the OLD_ICONV iconv() declaration based on the UNIX spec
Makefile: add NEEDS_RESOLV to optionally add -lresolv to compile arguments
Makefile: use /usr/ucb/install on SunOS platforms rather than ginstall
Conflicts:
Makefile
Check if -lresolv is needed for hstrerror; set NEEDS_RESOLV
accordingly, and substitute in config.mak.in.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Fix the way in which the configure script handles --without-iconv
(and --with-iconv=no), which it used to essentially ignore.
Also fix the way the configure script determines the value of
NEEDS_LIBICONV, which would be incorrectly set to 'YesPlease' on
systems that lack iconv entirely.
Signed-off-by: Marco Nelissen <marcone@xs4all.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Some systems such as Windows lack libgen.h so provide a
basename() implementation for cross-platform use.
This introduces the NO_LIBGEN_H construct to the Makefile
and autoconf scripts.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
mkstemps() is a BSD extension so provide an implementation
for cross-platform use.
Signed-off-by: David Aguilar <davvid@gmail.com>
Tested-by: Johannes Sixt <j6t@kdbg.org> (Windows)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The tests for POSIX threads can now be controlled by the user with the
--enable-pthreads=FLAGS option. If this is set (to some value other
than yes or no), the value is passed to the compiler. Thread support
is based solely on the outcome of this test. The user may specify not
to use threading at all or to use the default tests (first -pthread
then -lpthread) by not specifying FLAGS when passing --enable-pthreads.
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
--with-iconv is now taken into account when doing the tests for iconv.
If the user requests alternate handling for libiconv, the -liconv test
is run before the -lc test.
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Redirect stderr to /dev/null instead of stdout. This discards warnings
generated by python 2.6 related to the reorganization of functions within
modules. The warnings were causing the version detection to break.
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Libraries that can have user specificed base paths are wrapped with
GIT_STASH_FLAGS/GIT_UNSTASH_FLAGS to ensure that the proper versions
on the system are tested. This ensures, for example, that the zlib
tests for deflateUnbound are done with the version of zlib requested
by the user. This is most useful in the absence of good settings for
CPPFLAGS and/or LDFLAGS.
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Allow for quick stash/unstash of CPPFLAGS and LDFLAGS. Library tests
can now be easily bracketted with these macros to allow for values
set in user/site arguments.
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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>
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>
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>
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>
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>
* '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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
* 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
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>
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>
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>
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>
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>
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>
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>
--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>
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>
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>
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>
* 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 *
...
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
Error out on --without-shell/--with-shell=no and
--without-perl/--with-perl=no instead of just warning
and continuing.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
While at it fill git version information in configure.ac
configure target needs autoconf, of course.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
When configure detects some NO_XXX or NEEDS_XXX is unneeded, unset
this variable (actually set it to empty string). This allow
autodetection to override the default set in Makefile.
[jc: while at it fixed a thinko in IPv6 detection.]
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
NEEDS_SSL_WITH_CRYPTO means you cannot just say "-lcrypto" to
use SHA1 stuff, but need to say "-lcrypto -lssl".
Signed-off-by: Junio C Hamano <junkio@cox.net>
Copy description of new build configuration variables from the
commentary in the top Makefile, namely NO_FINK and NO_DARWIN_PORTS
configuration variables, putting them in site configuration section.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Add custom test for checking whether formatted IO functions
(printf/scanf et.al.) support 'size specifiers' introduced by C99,
namely ll, hh, j, z, t. (representing long long int, char, intmax_t,
size_t, ptrdiff_t).
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This patch adds support for setting either PYTHON_PATH or NO_PYTHON to
autoconf generated ./configure script via --with-python=PATH (sets
PYTHON_PATH) or --without-python (sets NO_PYTHON). Autodetect
PYTHON_PATH via AC_PATH_PROGS.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Move site configuration section, i.e. --with-PACKAGE[=ARG] and
--without-PACKAGE, --enable-FEATURE[=ARG] and --disable-FEATURE
options to the beginning of configure.ac file, just after definitions
of macros.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This patch adds support for setting SHELL_PATH and PERL_PATH to
autoconf generated ./configure script via --with-shell=PATH and
--with-perl=PATH options.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Not quoting macro arguments that contain other macros is a big no-no in
Autoconf. It can break at any time.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
./configure script checks now for the following programs:
* CC - using AC_PROG_CC
* AR - using AC_CHECK_TOOL among ar
* TAR - among gtar, tar
Checks not implemented:
* INSTALL - needs install-sh or install.sh in sources
* RPMBUILD - not known alternatives for rpmbuild
* PYTHON - no PYTHON variable in Makefile,
has to set NO_PYTHON if not present
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
./configure script checks now if the following libraries are present:
* -lssl for SHA1_Init (NO_OPENSSL)
* -lcurl for curl_easy_setopt (NO_CURL)
* -lexpat for XML_ParserCreate (NO_EXPAT)
It also checks if adding the following libraries are needed:
* -lcrypto for SHA1_Init (NEEDS_SSL_WITH_CRYPTO)
* -liconv for iconv (NEEDS_LIBICONV)
* -lsocket for socket (NEEDS_SOCKET)
Policy: we check also if NEEDS_LIBRARY libraries are present, even if
there is no NO_LIBRARY variable.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>