diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index b7112542b4..14012fad72 100644 --- a/configure.ac +++ b/configure.ac @@ -272,6 +272,14 @@ AS_HELP_STRING([], [ARG can be also prefix for libpcre library and hea GIT_CONF_SUBST([LIBPCREDIR]) fi) # +# Define HAVE_ALLOCA_H if you have working alloca(3) defined in that header. +AC_FUNC_ALLOCA +case $ac_cv_working_alloca_h in + yes) HAVE_ALLOCA_H=YesPlease;; + *) HAVE_ALLOCA_H='';; +esac +GIT_CONF_SUBST([HAVE_ALLOCA_H]) +# # Define NO_CURL if you do not have curl installed. git-http-pull and # git-http-push are not built, and you cannot use http:// and https:// # transports. @@ -738,6 +746,27 @@ case $ac_cv_type_socklen_t in esac GIT_CONF_SUBST([SOCKLEN_T]) +# +# Define NO_STRUCT_ITIMERVAL if you don't have struct itimerval. +AC_CHECK_TYPES([struct itimerval], +[NO_STRUCT_ITIMERVAL=], +[NO_STRUCT_ITIMERVAL=UnfortunatelyYes], +[#include <sys/time.h>]) +GIT_CONF_SUBST([NO_STRUCT_ITIMERVAL]) +# +# Define USE_ST_TIMESPEC=YesPlease when stat.st_mtimespec.tv_nsec exists. +# Define NO_NSEC=YesPlease when neither stat.st_mtim.tv_nsec nor +# stat.st_mtimespec.tv_nsec exists. +AC_CHECK_MEMBER([struct stat.st_mtimespec.tv_nsec]) +AC_CHECK_MEMBER([struct stat.st_mtim.tv_nsec]) +if test x$ac_cv_member_struct_stat_st_mtimespec_tv_nsec = xyes; then + USE_ST_TIMESPEC=YesPlease + GIT_CONF_SUBST([USE_ST_TIMESPEC]) +elif test x$ac_cv_member_struct_stat_st_mtim_tv_nsec != xyes; then + NO_NSEC=YesPlease + GIT_CONF_SUBST([NO_NSEC]) +fi +# # Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent. AC_CHECK_MEMBER(struct dirent.d_ino, [NO_D_INO_IN_DIRENT=], @@ -857,6 +886,29 @@ else SNPRINTF_RETURNS_BOGUS= fi GIT_CONF_SUBST([SNPRINTF_RETURNS_BOGUS]) +# +# Define NEEDS_MODE_TRANSLATION if your OS strays from the typical file type +# bits in mode values. +AC_CACHE_CHECK([whether the platform uses typical file type bits], + [ac_cv_sane_mode_bits], [ +AC_EGREP_CPP(yippeeyeswehaveit, + AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], +[#if S_IFMT == 0170000 && \ + S_IFREG == 0100000 && S_IFDIR == 0040000 && S_IFLNK == 0120000 && \ + S_IFBLK == 0060000 && S_IFCHR == 0020000 && \ + S_IFIFO == 0010000 && S_IFSOCK == 0140000 +yippeeyeswehaveit +#endif +]), + [ac_cv_sane_mode_bits=yes], + [ac_cv_sane_mode_bits=no]) +]) +if test $ac_cv_sane_mode_bits = yes; then + NEEDS_MODE_TRANSLATION= +else + NEEDS_MODE_TRANSLATION=UnfortunatelyYes +fi +GIT_CONF_SUBST([NEEDS_MODE_TRANSLATION]) ## Checks for library functions. @@ -895,6 +947,38 @@ AC_CHECK_LIB([iconv], [locale_charset], [CHARSET_LIB=-lcharset])]) GIT_CONF_SUBST([CHARSET_LIB]) # +# Define NO_HMAC_CTX_CLEANUP=YesPlease if HMAC_CTX_cleanup is missing. +AC_CHECK_LIB([crypto], [HMAC_CTX_cleanup], + [], [GIT_CONF_SUBST([NO_HMAC_CTX_CLEANUP], [YesPlease])]) +# +# Define HAVE_CLOCK_GETTIME=YesPlease if clock_gettime is available. +GIT_CHECK_FUNC(clock_gettime, + [HAVE_CLOCK_GETTIME=YesPlease], + [HAVE_CLOCK_GETTIME=]) +GIT_CONF_SUBST([HAVE_CLOCK_GETTIME]) + +AC_DEFUN([CLOCK_MONOTONIC_SRC], [ +AC_LANG_PROGRAM([[ +#include <time.h> +clockid_t id = CLOCK_MONOTONIC; +]])]) + +# +# Define HAVE_CLOCK_MONOTONIC=YesPlease if CLOCK_MONOTONIC is available. +AC_MSG_CHECKING([for CLOCK_MONOTONIC]) +AC_COMPILE_IFELSE([CLOCK_MONOTONIC_SRC], + [AC_MSG_RESULT([yes]) + HAVE_CLOCK_MONOTONIC=YesPlease], + [AC_MSG_RESULT([no]) + HAVE_CLOCK_MONOTONIC=]) +GIT_CONF_SUBST([HAVE_CLOCK_MONOTONIC]) +# +# Define NO_SETITIMER if you don't have setitimer. +GIT_CHECK_FUNC(setitimer, +[NO_SETITIMER=], +[NO_SETITIMER=YesPlease]) +GIT_CONF_SUBST([NO_SETITIMER]) +# # Define NO_STRCASESTR if you don't have strcasestr. GIT_CHECK_FUNC(strcasestr, [NO_STRCASESTR=], @@ -957,11 +1041,40 @@ GIT_CHECK_FUNC(initgroups, [NO_INITGROUPS=YesPlease]) GIT_CONF_SUBST([NO_INITGROUPS]) # +# Define HAVE_GETDELIM if you have getdelim in the C library. +GIT_CHECK_FUNC(getdelim, +[HAVE_GETDELIM=YesPlease], +[HAVE_GETDELIM=]) +GIT_CONF_SUBST([HAVE_GETDELIM]) +# # # Define NO_MMAP if you want to avoid mmap. # # Define NO_ICONV if your libc does not properly support iconv. +AC_DEFUN([BSD_SYSCTL_SRC], [ +AC_LANG_PROGRAM([[ +#include <stddef.h> +#include <sys/types.h> +#include <sys/sysctl.h> +]],[[ +int val, mib[2]; +size_t len; +mib[0] = CTL_HW; +mib[1] = 1; +len = sizeof(val); +return sysctl(mib, 2, &val, &len, NULL, 0) ? 1 : 0; +]])]) + +# +# Define HAVE_BSD_SYSCTL=YesPlease if a BSD-compatible sysctl function is available. +AC_MSG_CHECKING([for BSD sysctl]) +AC_COMPILE_IFELSE([BSD_SYSCTL_SRC], + [AC_MSG_RESULT([yes]) + HAVE_BSD_SYSCTL=YesPlease], + [AC_MSG_RESULT([no]) + HAVE_BSD_SYSCTL=]) +GIT_CONF_SUBST([HAVE_BSD_SYSCTL]) ## Other checks. # Define USE_PIC if you need the main git objects to be built with -fPIC |