summaryrefslogtreecommitdiff
path: root/configure.ac
AgeCommit message (Collapse)AuthorFilesLines
2013-06-28configure: fix option help message for --disable-pthreadsLibravatar Stefano Lattarini1-1/+1
The configure option to disable threading is '--disable-pthreads', not '--without-pthreads'. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-26Revert "compat: add strtok_r()"Libravatar Erik Faye-Lund1-6/+0
This reverts commit 78457bc0ccc1af8b9eb776a0b17986ebd50442bc. commit 28c5d9e ("vcs-svn: drop string_pool") previously removed the only call-site for strtok_r. So let's get rid of the compat implementation as well. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-03Merge branch 'mh/pthreads-autoconf'Libravatar Junio C Hamano1-1/+11
* mh/pthreads-autoconf: configure.ac: fix pthreads detection on Mac OS X
2013-01-03Merge branch 'dm/port'Libravatar Junio C Hamano1-0/+14
Add a few more knobs for new platform ports can tweak. * dm/port: git-compat-util.h: do not #include <sys/param.h> by default Generalize the inclusion of strings.h Detect when the passwd struct is missing pw_gecos Support builds when sys/param.h is missing
2012-12-19git-compat-util.h: do not #include <sys/param.h> by defaultLibravatar Junio C Hamano1-6/+0
Earlier we allowed platforms that lack <sys/param.h> not to include the header file from git-compat-util.h; we have included this header file since the early days back when we used MAXPATHLEN (which we no longer use) and also depended on it slurping ULONG_MAX (which we get by including stdint.h or inttypes.h these days). It turns out that we can compile our modern codebase just file without including it on many platforms (so far, Fedora, Debian, Ubuntu, MinGW, Mac OS X, Cygwin, HP-Nonstop, QNX and z/OS are reported to be OK). Let's stop including it by default, and on platforms that need it to be included, leave "make NEEDS_SYS_PARAM_H=YesPlease" as an escape hatch and ask them to report to us, so that we can find out about the real dependency and fix it in a more platform agnostic way. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-15Generalize the inclusion of strings.hLibravatar David Michael1-0/+6
The header strings.h was formerly only included for HP NonStop (aka Tandem) to define strcasecmp, but another platform requiring this inclusion has been found. The build system will now include the file based on its presence determined by configure. Signed-off-by: David Michael <fedora.dm0@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-15Detect when the passwd struct is missing pw_gecosLibravatar David Michael1-0/+8
NO_GECOS_IN_PWENT was documented with other Makefile variables but was only enforced by manually defining it to the C preprocessor. This adds support for detecting the condition with configure and defining the make variable. Signed-off-by: David Michael <fedora.dm0@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-15Support builds when sys/param.h is missingLibravatar David Michael1-0/+6
An option is added to the Makefile to skip the inclusion of sys/param.h. The only known platform with this condition thus far is the z/OS UNIX System Services environment. Signed-off-by: David Michael <fedora.dm0@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-27configure.ac: fix pthreads detection on Mac OS XLibravatar Max Horn1-1/+11
The configure script checks whether certain flags are required to use pthreads. But it did not consider that *none* might be needed (as is the case on Mac OS X). This lead to configure adding "-mt" to the list of flags (which does nothing on OS X except producing a warning). This in turn triggered a compiler warning on every single file. To solve this, we now first check if pthreads work without extra flags. This means the check is now order dependant, hence a comment is added explaining this, and the reasons for it. Note that it might be possible to write an order independent test, but it does not seem worth the extra effort required for implementing and testing such a solution, when this simple solution exists and works. Signed-off-by: Max Horn <max@quendi.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-04Merge branch 'sl/maint-configure-messages'Libravatar Jeff King1-2/+2
Minor message fixes for the configure script. * sl/maint-configure-messages: configure: fix some output message
2012-10-25configure: fix some output messageLibravatar Stefano Lattarini1-2/+2
Before this change, output from ./configure could contain botched wording like this: checking Checking for POSIX Threads with '-pthread'... yes instead of the intended: checking for POSIX Threads with '-pthread'... yes Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
2012-10-09configure.ac: Add missing comma to CC_LD_DYNPATHLibravatar Øyvind A. Holm1-1/+1
40bfbde ("build: don't duplicate substitution of make variables", 2012-09-11) by mistake removed a necessary comma at the end of "CC_LD_DYNPATH=-Wl,rpath," in line 414. When executing "./configure --with-zlib=PATH", this resulted in [...] CC xdiff/xhistogram.o AR xdiff/lib.a LINK git-credential-store /usr/bin/ld: bad -rpath option collect2: ld returned 1 exit status make: *** [git-credential-store] Error 1 $ during make. Signed-off-by: Øyvind A. Holm <sunny@sunbase.org> Acked-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-11build: don't duplicate substitution of make variablesLibravatar Stefano Lattarini1-68/+76
Thanks to our 'GIT_CONF_SUBST' layer in configure.ac, a make variable 'VAR' can be defined to a value 'VAL' at ./configure runtime in our build system simply by using "GIT_CONF_SUBST([VAR], [VAL])" in configure.ac, rather than having both to call "AC_SUBST([VAR], [VAL])" in configure.ac and adding the 'VAR = @VAR@' definition in config.mak.in. Less duplication, less margin for error, less possibility of confusion. While at it, fix some formatting issues in configure.ac that unnecessarily obscured the code flow. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-11build: improve GIT_CONF_SUBST signatureLibravatar Stefano Lattarini1-7/+8
Now, in configure.ac, a call like: GIT_CONF_SUBST([FOO]) will be considered equivalent to: GIT_CONF_SUBST([FOO], [$FOO]) This is mostly a preparatory refactoring in view of future changes. No semantic change to the generated configure or config.mak.auto is intended. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-19build: reconfigure automatically if configure.ac changesLibravatar Stefano Lattarini1-0/+2
This provides a reduced but still useful sibling of the Automake's "automatic Makefile rebuild" feature. It's important to note that we take care to enable the new rules only if the tree that has already be configured with './configure', so that users relying on manual configuration won't be negatively impacted. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-19autoconf: use AC_CONFIG_COMMANDS instead of ad-hoc 'config.mak.append'Libravatar Stefano Lattarini1-11/+17
This will allow "./config.status --recheck; ./config.status" to work correctly as a mean of reconfiguring the tree with the same configure argument used in the previous "./configure" invocation. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-19autoconf: remove few redundant semicolonsLibravatar Stefano Lattarini1-2/+2
They are merely useless now, but would get in the way of future changes. No semantic change is intended. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-19autoconf: remove some redundant shell indirectionsLibravatar Stefano Lattarini1-7/+5
They are merely useless now, but would get in the way of future changes. No semantic change is intended. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-19autoconf: GIT_CONF_APPEND_LINE -> GIT_CONF_SUBSTLibravatar Stefano Lattarini1-12/+12
The new name fits better with the macro signature, and underlines the similarities with the autoconf-provided macro AC_SUBST (which will be made even more pronounced in planned future commits). Once again, no semantic change is intended, and indeed no change to the generated configure script is expected. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-19autoconf: GIT_CONF_APPEND_LINE: change signatureLibravatar Stefano Lattarini1-14/+14
Change one-argument GIT_CONF_APPEND_LINE([VAR=VAL]) to GIT_CONF_APPEND_LINE([VAR], [VAL]), that is more similar to the usual AC_SUBST macro; this is only a preparatory change in view of future refactorings. No semantic change is intended. In fact, the generated configure file doesn't change at all. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-30docs: drop asciidoc7compatible flagLibravatar Jeff King1-7/+0
When we made the switch to supporting asciidoc 8 in 4c7100a (Documentation: adjust to AsciiDoc 8, 2007-06-14), we were able to leave most of the documentation intact by defining asciidoc7compatible. Since commit 6cf378f (docs: stop using asciidoc no-inline-literal, 2012-04-26), we don't support versions of asciidoc older than 8.4.1, which is when inline literals were introduced. Therefore there is not much point in keeping our documentation compatible with asciidoc 7. So we are now free to drop the asciidoc7compatible flag and update the documentation itself to assume asciidoc8. Fortunately, doing the latter is very easy; we weren't using any of the constructs impacted by asciidoc7compatible, so there are no changes to make. The reason is somewhat subtle. The asciidoc7compatible affects only super/sub-scripts ("^" and "~") and index terms. We don't use the latter at all. Nor we do we use the former, but we did have to protect them from accidental expansion in constructs like "rev^1". However, all of our uses of "~" and "^" are either in code blocks (which are rendered literally), or inside backticks. Prior to 6cf378f, backticks were not inline literals, and needed proper quoting. But post-6cf378f, we don't have to worry whether we are using the old or new rules, as those characters are not interpreted at all in either case. I verified that the result of "make install-html install-man" is identical before and after this patch on asciidoc 8.6.7. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-26configure: be more idiomaticLibravatar Stefano Lattarini1-89/+87
Lots of code in Git's configure.ac doesn't follow the typical formatting, idioms and best practices for Autoconf input files. Improve the situation. There are probably many more similar improvements to be done, but trying to clump all of them in a single change would make it unreviewable, so we content ourselves with a partial improvement. This change is just cosmetic, and should cause no semantic change. The most relevant of the changes introduced by this patch are: - Do not add trailing '\' characters for line continuation where they are not truly needed. - In several (but not all) macro calls, properly quote the arguments. - Few cosmetic changes in spacing and comments. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-26configure: avoid some code repetitions thanks to m4_{push,pop}defLibravatar Stefano Lattarini1-12/+14
This change is just cosmetic, and should cause no semantic change, nor any change in the generated configure script. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-26configure: move definitions of private m4 macros before AC_INIT invocationLibravatar Stefano Lattarini1-12/+13
This way, no spurious comments nor whitespace will be propagated in the generated configure script. This change is a pure code movement (plus addition of a comment line). Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-09configure: allow user to prevent $PATH "sanitization" on SolarisLibravatar Stefano Lattarini1-0/+17
On a Solaris 10 system with Solaris make installed as '/usr/xpg4/bin/make', GNU make installed as '/usr/local/bin/make', and with '/usr/local/bin' appearing in $PATH *before* '/usr/xpg4/bin', I was seeing errors like this upon invoking "make all": Usage : make [ -f makefile ][ -K statefile ]... make: Fatal error: Unknown option `-C' This happenes because the Git's Makefile, when running on Solaris, automatically "sanitizes" $PATH by prepending '/usr/xpg6/bin' and '/usr/xpg4/bin' to it in order to avoid using non-POSIX /bin/sh from being used. In the setup described above, however, this has an unintended consequence of forcing the use of Solaris make in recursive make invocations -- even if the $(MAKE) macro is being correctly used in them! When building without using the autoconf machinery, this can be solved by overriding $(SANE_TOOL_PATH). Teach the autoconf machinery to also allow users of ./configure to override it from the command line with a new --with-sane-tool-path option. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-23Merge branch 'js/configure-libintl'Libravatar Junio C Hamano1-8/+12
* js/configure-libintl: configure: don't use -lintl when there is no gettext support
2012-02-20configure: don't use -lintl when there is no gettext supportLibravatar John Szakmeister1-8/+12
The current configure script uses -lintl if gettext is not found in the C library, but does so before checking if there is libintl.h available in the first place, in which case we would later define NO_GETTEXT. Instead, check for the existence of libintl.h first. Only when libintl.h exists and libintl is not in libc, ask for -lintl. Signed-off-by: John Szakmeister <john@szakmeister.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-13Makefile: introduce CHARSET_LIB to link with -lcharsetLibravatar Дилян Палаузов1-0/+10
On some systems, the function locale_charset() may not be exported from libiconv but is available from libcharset, and we need -lcharset when linking. Introduce a make variable CHARSET_LIB that can be set to -lcharsetlib on such systems. Also autodetect this in the configure script by first looking for the symbol in libiconv, and then libcharset. Signed-off-by: Дилян Палаузов <dilyan.palauzov@aegee.org>
2011-12-05i18n: add infrastructure for translating Git with gettextLibravatar Ævar Arnfjörð Bjarmason1-0/+19
Change the skeleton implementation of i18n in Git to one that can show localized strings to users for our C, Shell and Perl programs using either GNU libintl or the Solaris gettext implementation. This new internationalization support is enabled by default. If gettext isn't available, or if Git is compiled with NO_GETTEXT=YesPlease, Git falls back on its current behavior of showing interface messages in English. When using the autoconf script we'll auto-detect if the gettext libraries are installed and act appropriately. This change is somewhat large because as well as adding a C, Shell and Perl i18n interface we're adding a lot of tests for them, and for those tests to work we need a skeleton PO file to actually test translations. A minimal Icelandic translation is included for this purpose. Icelandic includes multi-byte characters which makes it easy to test various edge cases, and it's a language I happen to understand. The rest of the commit message goes into detail about various sub-parts of this commit. = Installation Gettext .mo files will be installed and looked for in the standard $(prefix)/share/locale path. GIT_TEXTDOMAINDIR can also be set to override that, but that's only intended to be used to test Git itself. = Perl Perl code that's to be localized should use the new Git::I18n module. It imports a __ function into the caller's package by default. Instead of using the high level Locale::TextDomain interface I've opted to use the low-level (equivalent to the C interface) Locale::Messages module, which Locale::TextDomain itself uses. Locale::TextDomain does a lot of redundant work we don't need, and some of it would potentially introduce bugs. It tries to set the $TEXTDOMAIN based on package of the caller, and has its own hardcoded paths where it'll search for messages. I found it easier just to completely avoid it rather than try to circumvent its behavior. In any case, this is an issue wholly internal Git::I18N. Its guts can be changed later if that's deemed necessary. See <AANLkTilYD_NyIZMyj9dHtVk-ylVBfvyxpCC7982LWnVd@mail.gmail.com> for a further elaboration on this topic. = Shell Shell code that's to be localized should use the git-sh-i18n library. It's basically just a wrapper for the system's gettext.sh. If gettext.sh isn't available we'll fall back on gettext(1) if it's available. The latter is available without the former on Solaris, which has its own non-GNU gettext implementation. We also need to emulate eval_gettext() there. If neither are present we'll use a dumb printf(1) fall-through wrapper. = About libcharset.h and langinfo.h We use libcharset to query the character set of the current locale if it's available. I.e. we'll use it instead of nl_langinfo if HAVE_LIBCHARSET_H is set. The GNU gettext manual recommends using langinfo.h's nl_langinfo(CODESET) to acquire the current character set, but on systems that have libcharset.h's locale_charset() using the latter is either saner, or the only option on those systems. GNU and Solaris have a nl_langinfo(CODESET), FreeBSD can use either, but MinGW and some others need to use libcharset.h's locale_charset() instead. =Credits This patch is based on work by Jeff Epler <jepler@unpythonic.net> who did the initial Makefile / C work, and a lot of comments from the Git mailing list, including Jonathan Nieder, Jakub Narebski, Johannes Sixt, Erik Faye-Lund, Peter Krefting, Junio C Hamano, Thomas Rast and others. [jc: squashed a small Makefile fix from Ramsay] Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-09configure: Check for libpcreLibravatar Michał Kiedrowicz1-0/+40
This patch adds checks for libpcre to configure. By default libpcre is disabled, --with-libpcre enables it (if it works). Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-28Improve test for pthreads flagLibravatar Giuseppe Bilotta1-0/+2
When compiling with CC=clang using Clang 1.1 as shipped by Debian unstable (package version 2.7-3), the -mt flag is sufficient to compile during the `configure` test. However, building git would then fail at link time complaining about missing symbols such as `pthread_key_create' and `pthread_create'. Work around this issue by adding pthread key creation to the pthreads configure test source. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-17unbreak and eliminate NO_C99_FORMATLibravatar Jonathan Nieder1-24/+0
In the spirit of v1.5.0.2~21 (Check for PRIuMAX rather than NO_C99_FORMAT in fast-import.c, 2007-02-20), use PRIuMAX from git-compat-util.h on all platforms instead of C99-specific formats like %zu with dangerous fallbacks to %u or %lu. So now C99-challenged platforms can build git without provoking warnings or errors from printf, even if pointers do not have the same size as an int or long. The need for a fallback PRIuMAX is detected in git-compat-util.h with "#ifndef PRIuMAX". So while at it, simplify the Makefile and configure script by eliminating the NO_C99_FORMAT knob altogether. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-14configure: use AC_LANG_PROGRAM consistentlyLibravatar Ralf Wildenhues1-37/+19
Avoid warnings from Autoconf 2.68 about missing use of AC_LANG_PROGRAM and friends. Quoting autoconf-2.68/NEWS: ** The macros AC_PREPROC_IFELSE, AC_COMPILE_IFELSE, AC_LINK_IFELSE, and AC_RUN_IFELSE now warn if the first argument failed to use AC_LANG_SOURCE or AC_LANG_PROGRAM to generate the conftest file contents. A new macro AC_LANG_DEFINES_PROVIDED exists if you have a compelling reason why you cannot use AC_LANG_SOURCE but must avoid the warning. The underlying reason for that change is that AC_LANG_{SOURCE,PROGRAM} take care to supply the previously computed set of #defines (and include standard headers if so desired) for preprocessed languages like C and C++. In some cases, AC_LANG_PROGRAM is already used but not sufficiently m4-quoted, so we just need to add another set of [quotes] to prevent the autoconf warning from being triggered bogusly. Quoting all arguments (except when calling special macros that need to be expanded before recursion) is better style, anyway. These and more rules are described in detail in 'info Autoconf "Programming in M4"'. No change in the resulting config.mak.autogen after running ./configure intended. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-12Merge branch 'jk/asciidoc-update'Libravatar Junio C Hamano1-6/+6
* jk/asciidoc-update: docs: default to more modern toolset
2010-12-03Merge branch 'jj/icase-directory'Libravatar Junio C Hamano1-0/+28
* jj/icase-directory: Support case folding in git fast-import when core.ignorecase=true Support case folding for git add when core.ignorecase=true Add case insensitivity support when using git ls-files Add case insensitivity support for directories when using git status Case insensitivity support for .gitignore via core.ignorecase Add string comparison functions that respect the ignore_case variable. Makefile & configure: add a NO_FNMATCH_CASEFOLD flag Makefile & configure: add a NO_FNMATCH flag Conflicts: Makefile config.mak.in configure.ac fast-import.c
2010-11-24docs: default to more modern toolsetLibravatar Jeff King1-6/+6
When the ASCIIDOC8 and ASCIIDOC_NO_ROFF knobs were built, many people were still on asciidoc 7 and using older versions of docbook-xsl. These days, even the almost 2-year-old Debian stable needs these knobs turned. So let's turn them by default. The new knobs ASCIIDOC7 and ASCIIDOC_ROFF can be used to get the old behavior if people are on older systems. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-28Interix: add configure checksLibravatar Markus Duft1-0/+18
* check for sys/poll.h. define NO_SYS_POLL_H otherwise. * check for inttypes.h, define NO_INTTYPES_H otherwise. * check for initgroups(), define NO_INITGROUPS otherwise. Signed-off-by: Markus Duft <mduft@gentoo.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-06Makefile & configure: add a NO_FNMATCH_CASEFOLD flagLibravatar Ævar Arnfjörð Bjarmason1-0/+22
On some platforms (like Solaris) there is a fnmatch, but it doesn't support the GNU FNM_CASEFOLD extension that's used by the jj/icase-directory series' fnmatch_icase wrapper. Change the Makefile so that it's now possible to set NO_FNMATCH_CASEFOLD=YesPlease on those systems, and add a configure probe for it. Unlike the NO_REGEX check we don't add AC_INCLUDES_DEFAULT to our headers. This is because on a GNU system the definition of FNM_CASEFOLD in fnmatch.h is guarded by: #if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE One of the headers AC_INCLUDES_DEFAULT includes ends up defining one of those, so if we'd use it we'd always get NO_FNMATCH_CASEFOLD=YesPlease on GNU systems, even though they have FNM_CASEFOLD. When checking the flags we use: ifdef NO_FNMATCH ... else ifdef NO_FNMATCH_CASEFOLD ... endif endif The "else" so that we don't link against compat/fnmatch/fnmatch.o twice if both NO_FNMATCH and NO_FNMATCH_CASEFOLD are defined. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-06Makefile & configure: add a NO_FNMATCH flagLibravatar Ævar Arnfjörð Bjarmason1-0/+6
Windows and MinGW both lack fnmatch() in their C library and needed compat/fnmatch, but they had duplicate code for adding the compat function, and there was no Makefile flag or configure check for fnmatch. Change the Makefile it so that it's now possible to compile the compat function with a NO_FNMATCH=YesPlease flag, and add a configure probe for it. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-29Merge branch 'po/etc-gitattributes'Libravatar Junio C Hamano1-1/+9
* po/etc-gitattributes: Add global and system-wide gitattributes Conflicts: Documentation/config.txt Makefile
2010-09-03Merge branch 'ab/compat-regex'Libravatar Junio C Hamano1-0/+21
* ab/compat-regex: Fix compat/regex ANSIfication on MinGW autoconf: regex library detection typofix autoconf: don't use platform regex if it lacks REG_STARTEND t/t7008-grep-binary.sh: un-TODO a test that needs REG_STARTEND compat/regex: get rid of old-style definition compat/regex: define out variables only used under RE_ENABLE_I18N Change regerror() declaration from K&R style to ANSI C (C89) compat/regex: get the gawk regex engine to compile within git compat/regex: use the regex engine from gawk for compat Conflicts: compat/regex/regex.c
2010-09-01Add global and system-wide gitattributesLibravatar Petr Onderka1-1/+9
Allow gitattributes to be set globally and system wide. This way, settings for particular file types can be set in one place and apply for all user's repositories. The location of system-wide attributes file is $(prefix)/etc/gitattributes. The location of the global file can be configured by setting core.attributesfile. Some parts of the code were copied from the implementation of the same functionality in config.c. Signed-off-by: Petr Onderka <gsvick@gmail.com> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-22autoconf: regex library detection typofixLibravatar Junio C Hamano1-1/+1
2010-08-19autoconf: don't use platform regex if it lacks REG_STARTENDLibravatar Jonathan Nieder1-0/+21
If the platform regex cannot match null bytes, we might as well use the glibc version instead. Cc: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Cc: René Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Tested-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-14compat: add strtok_r()Libravatar Jonathan Nieder1-0/+6
Windows does not have strtok_r (and while it does have an identical strtok_s, but it is not obvious how to use it). Grab an implementation from glibc. The svn-fe tool uses strtok_r to parse paths. Acked-by: Johannes Sixt <j6t@kdbg.org> Helped-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-21Merge branch 'gv/portable'Libravatar Junio C Hamano1-8/+68
* 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
2010-05-31Allow disabling "inline"Libravatar Gary V. Vaughan1-0/+6
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>
2010-05-31Some platforms lack socklen_t typeLibravatar Gary V. Vaughan1-0/+6
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>
2010-05-31Make NO_{INET_NTOP,INET_PTON} configured independentlyLibravatar Gary V. Vaughan1-7/+30
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>
2010-05-31Makefile: some platforms do not have hstrerror anywhereLibravatar Gary V. Vaughan1-3/+14
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>