Current flaws in the curl CMake build =====================================
Missing features in the cmake build:
- Builds libcurl without large file support - Does not support all SSL libraries (only OpenSSL, Schannel, Secure Transport, and mbed TLS, NSS, WolfSSL) - Doesn't allow different resolver backends (no c-ares build support) - No RTMP support built - Doesn't allow build curl and libcurl debug enabled - Doesn't allow a custom CA bundle path - Doesn't allow you to disable specific protocols from the build - Doesn't find or use krb4 or GSS - Rebuilds test files too eagerly, but still can't run the tests - Doesn't detect the correct strerror_r flavor when cross-compiling (issue #1123)
# # 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], [[ FILE *f = fopen(".", "r"); return f != NULL;]])], [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 GIT_CONF_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. AC_CACHE_CHECK([whether snprintf() and/or vsnprintf() return bogus value], [ac_cv_snprintf_returns_bogus], [ AC_RUN_IFELSE( [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT #include "stdarg.h"
int test_vsnprintf(char *str, size_t maxsize, const char *format, ...) { int ret; va_list ap; va_start(ap, format); ret = vsnprintf(str, maxsize, format, ap); va_end(ap); return ret; }], [[char buf[6]; if (test_vsnprintf(buf, 3, "%s", "12345") != 5 || strcmp(buf, "12")) return 1; if (snprintf(buf, 3, "%s", "12345") != 5 || strcmp(buf, "12")) return 1]])], [ac_cv_snprintf_returns_bogus=no], [ac_cv_snprintf_returns_bogus=yes]) ]) if test $ac_cv_snprintf_returns_bogus = yes; then SNPRINTF_RETURNS_BOGUS=UnfortunatelyYes else SNPRINTF_RETURNS_BOGUS= fi GIT_CONF_SUBST([SNPRINTF_RETURNS_BOGUS])
AC_ARG_ENABLE([pthreads], [AS_HELP_STRING([--enable-pthreads=FLAGS], [FLAGS is the value to pass to the compiler to enable POSIX Threads.] [The default if FLAGS is not specified is to try first -pthread] [and then -lpthread.] [--disable-pthreads will disable threading.])], [ if test "x$enableval" = "xyes"; then AC_MSG_NOTICE([Will try -pthread then -lpthread to enable POSIX Threads]) elif test "x$enableval" != "xno"; then PTHREAD_CFLAGS=$enableval AC_MSG_NOTICE([Setting '$PTHREAD_CFLAGS' as the FLAGS to enable POSIX Threads]) else AC_MSG_NOTICE([POSIX Threads will be disabled.]) NO_PTHREADS=YesPlease USER_NOPTHREAD=1 fi], [ AC_MSG_NOTICE([Will try -pthread then -lpthread to enable POSIX Threads.]) ])