X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=configure.ac;h=7c2856efc92ca55e3cf03fcf1c72ffb70318f7c3;hb=2c47789d817aaf745a5ce5d5f79619c634cc8566;hp=287149d304b8a631d879bd3be7b059c6f074e5fe;hpb=1cbcefb107776ce2da374697bb4f6e2bd22ff73f;p=git.git diff --git a/configure.ac b/configure.ac index 287149d30..7c2856efc 100644 --- a/configure.ac +++ b/configure.ac @@ -158,7 +158,7 @@ AC_CHECK_LIB([crypto], [SHA1_Init], AC_SUBST(NEEDS_SSL_WITH_CRYPTO) AC_SUBST(NO_OPENSSL) # -# Define NO_CURL if you do not have curl installed. git-http-pull and +# Define NO_CURL if you do not have libcurl installed. git-http-pull and # git-http-push are not built, and you cannot use http:// and https:// # transports. AC_CHECK_LIB([curl], [curl_global_init], @@ -327,6 +327,26 @@ else fi AC_SUBST(NO_C99_FORMAT) # +# Define FREAD_READS_DIRECTORIES if your are on a system which succeeds +# when attempting to read from an fopen'ed directory. +AC_CACHE_CHECK([whether system succeeds to read fopen'ed directory], + [ac_cv_fread_reads_directories], +[ +AC_RUN_IFELSE( + [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], + [[char c; + FILE *f = fopen(".", "r"); + return f && fread(&c, 1, 1, f)]])], + [ac_cv_fread_reads_directories=no], + [ac_cv_fread_reads_directories=yes]) +]) +if test $ac_cv_fread_reads_directories = yes; then + FREAD_READS_DIRECTORIES=UnfortunatelyYes +else + FREAD_READS_DIRECTORIES= +fi +AC_SUBST(FREAD_READS_DIRECTORIES) +# # Define SNPRINTF_RETURNS_BOGUS if your are on a system which snprintf() # or vsnprintf() return -1 instead of number of characters which would # have been written to the final string if enough space had been available.