dnl actually be a single double-quoted string concatenating all them.
AC_DEFUN([CURL_CHECK_DEF], [
- AC_REQUIRE([CURL_CPP_P])dnl
+ AC_REQUIRE([CURL_CPP_P])
OLDCPPFLAGS=$CPPFLAGS
- # CPPPFLAG comes from CURL_CPP_P
+ dnl CPPPFLAG comes from CURL_CPP_P
CPPFLAGS="$CPPFLAGS $CPPPFLAG"
- AS_VAR_PUSHDEF([ac_HaveDef], [curl_cv_have_def_$1])dnl
- AS_VAR_PUSHDEF([ac_Def], [curl_cv_def_$1])dnl
+ AS_VAR_PUSHDEF([ac_HaveDef], [curl_cv_have_def_$1])
+ AS_VAR_PUSHDEF([ac_Def], [curl_cv_def_$1])
if test -z "$SED"; then
AC_MSG_ERROR([SED not set. Cannot continue without SED being set.])
fi
AS_VAR_SET(ac_Def, $tmp_exp)
ifelse($3,,[AC_MSG_RESULT([$tmp_exp])])
fi
- AS_VAR_POPDEF([ac_Def])dnl
- AS_VAR_POPDEF([ac_HaveDef])dnl
+ AS_VAR_POPDEF([ac_Def])
+ AS_VAR_POPDEF([ac_HaveDef])
CPPFLAGS=$OLDCPPFLAGS
])
dnl will run silently when invoked with three arguments.
AC_DEFUN([CURL_CHECK_DEF_CC], [
- AS_VAR_PUSHDEF([ac_HaveDef], [curl_cv_have_def_$1])dnl
+ AS_VAR_PUSHDEF([ac_HaveDef], [curl_cv_have_def_$1])
ifelse($3,,[AC_MSG_CHECKING([for compiler definition of $1])])
AC_COMPILE_IFELSE([
AC_LANG_SOURCE(
AS_VAR_SET(ac_HaveDef, no)
ifelse($3,,[AC_MSG_RESULT([no])])
fi
- AS_VAR_POPDEF([ac_HaveDef])dnl
+ AS_VAR_POPDEF([ac_HaveDef])
])
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif])
- AC_BEFORE([$0], [AC_SYS_LARGEFILE])dnl
- AC_BEFORE([$0], [CURL_CONFIGURE_REENTRANT])dnl
+ AC_BEFORE([$0], [AC_SYS_LARGEFILE])
+ AC_BEFORE([$0], [CURL_CONFIGURE_REENTRANT])
AC_MSG_CHECKING([if OS is AIX (to define _ALL_SOURCE)])
AC_EGREP_CPP([yes_this_is_aix],[
#ifdef _AIX
dnl and check if it is needed even with ldap.h
AC_DEFUN([CURL_CHECK_HEADER_LBER], [
- AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])dnl
+ AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])
AC_CACHE_CHECK([for lber.h], [curl_cv_header_lber_h], [
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
if test "$curl_cv_header_lber_h" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_LBER_H, 1,
[Define to 1 if you have the lber.h header file.])
- #
+
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#undef inline
],[
curl_cv_need_header_lber_h="yes"
])
- #
+
case "$curl_cv_need_header_lber_h" in
yes)
AC_DEFINE_UNQUOTED(NEED_LBER_H, 1,
dnl Check for compilable and valid ldap.h header
AC_DEFUN([CURL_CHECK_HEADER_LDAP], [
- AC_REQUIRE([CURL_CHECK_HEADER_LBER])dnl
+ AC_REQUIRE([CURL_CHECK_HEADER_LBER])
AC_CACHE_CHECK([for ldap.h], [curl_cv_header_ldap_h], [
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
dnl Check for compilable and valid ldap_ssl.h header
AC_DEFUN([CURL_CHECK_HEADER_LDAP_SSL], [
- AC_REQUIRE([CURL_CHECK_HEADER_LDAP])dnl
+ AC_REQUIRE([CURL_CHECK_HEADER_LDAP])
AC_CACHE_CHECK([for ldap_ssl.h], [curl_cv_header_ldap_ssl_h], [
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
dnl before the WINLDAP default ones.
AC_DEFUN([CURL_CHECK_LIBS_WINLDAP], [
- AC_REQUIRE([CURL_CHECK_HEADER_WINBER])dnl
- #
+ AC_REQUIRE([CURL_CHECK_HEADER_WINBER])
+
AC_MSG_CHECKING([for WINLDAP libraries])
- #
+
u_libs=""
- #
+
ifelse($1,,,[
for x_lib in $1; do
case "$x_lib" in
fi
done
])
- #
+
curl_cv_save_LIBS="$LIBS"
curl_cv_ldap_LIBS="unknown"
- #
+
for x_nlibs in '' "$u_libs" \
'-lwldap32' ; do
if test "$curl_cv_ldap_LIBS" = "unknown"; then
])
fi
done
- #
+
LIBS="$curl_cv_save_LIBS"
- #
+
case X-"$curl_cv_ldap_LIBS" in
X-unknown)
AC_MSG_RESULT([cannot find WINLDAP libraries])
AC_MSG_RESULT([$curl_cv_ldap_LIBS])
;;
esac
- #
])
dnl before the default ones.
AC_DEFUN([CURL_CHECK_LIBS_LDAP], [
- AC_REQUIRE([CURL_CHECK_HEADER_LDAP])dnl
- #
+ AC_REQUIRE([CURL_CHECK_HEADER_LDAP])
+
AC_MSG_CHECKING([for LDAP libraries])
- #
+
u_libs=""
- #
+
ifelse($1,,,[
for x_lib in $1; do
case "$x_lib" in
fi
done
])
- #
+
curl_cv_save_LIBS="$LIBS"
curl_cv_ldap_LIBS="unknown"
- #
+
for x_nlibs in '' "$u_libs" \
'-lldap' \
'-lldap -llber' \
])
fi
done
- #
+
LIBS="$curl_cv_save_LIBS"
- #
+
case X-"$curl_cv_ldap_LIBS" in
X-unknown)
AC_MSG_RESULT([cannot find LDAP libraries])
else
LIBS="$curl_cv_ldap_LIBS $curl_cv_save_LIBS"
fi
- # FIXME: Enable when ldap was detected via pkg-config
+ dnl FIXME: Enable when ldap was detected via pkg-config
if false; then
LIBCURL_PC_REQUIRES_PRIVATE="ldap $LIBCURL_PC_REQUIRES_PRIVATE"
fi
AC_MSG_RESULT([$curl_cv_ldap_LIBS])
;;
esac
- #
])
dnl Test if the socket recv() function is available,
AC_DEFUN([CURL_CHECK_FUNC_RECV], [
- AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])dnl
- AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])dnl
+ AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])
+ AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])
AC_CHECK_HEADERS(sys/types.h)
- #
+
AC_MSG_CHECKING([for recv])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
AC_MSG_RESULT([no])
curl_cv_recv="no"
])
- #
+
if test "$curl_cv_recv" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_RECV, 1,
[Define to 1 if you have the recv function.])
dnl Test if the socket send() function is available,
AC_DEFUN([CURL_CHECK_FUNC_SEND], [
- AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])dnl
- AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])dnl
+ AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])
+ AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])
AC_CHECK_HEADERS(sys/types.h)
- #
+
AC_MSG_CHECKING([for send])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
AC_MSG_RESULT([no])
curl_cv_send="no"
])
- #
+
if test "$curl_cv_send" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_SEND, 1,
[Define to 1 if you have the send function.])
dnl Check for timeval struct
AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [
- AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])dnl
+ AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])
AC_CHECK_HEADERS(sys/types.h)
AC_CACHE_CHECK([for struct timeval], [curl_cv_struct_timeval], [
AC_COMPILE_IFELSE([
AC_DEFUN([CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC], [
AC_CHECK_HEADERS(sys/types.h)
AC_MSG_CHECKING([for monotonic clock_gettime])
- #
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
AC_DEFUN([CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC_RAW], [
AC_CHECK_HEADERS(sys/types.h)
AC_MSG_CHECKING([for raw monotonic clock_gettime])
- #
+
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#ifdef HAVE_SYS_TYPES_H
dnl check and prepended to LIBS any needed libraries.
AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
- AC_REQUIRE([CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC])dnl
- #
+ AC_REQUIRE([CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC])
+
if test "$curl_func_clock_gettime" = "yes"; then
- #
+
AC_MSG_CHECKING([for clock_gettime in libraries])
- #
+
curl_cv_save_LIBS="$LIBS"
curl_cv_gclk_LIBS="unknown"
- #
+
for x_xlibs in '' '-lrt' '-lposix4' ; do
if test "$curl_cv_gclk_LIBS" = "unknown"; then
if test -z "$x_xlibs"; then
])
fi
done
- #
+
LIBS="$curl_cv_save_LIBS"
- #
+
case X-"$curl_cv_gclk_LIBS" in
X-unknown)
AC_MSG_RESULT([cannot find clock_gettime])
fi
;;
esac
- #
+
dnl only do runtime verification when not cross-compiling
if test "$cross_compiling" != "yes" &&
test "$curl_func_clock_gettime" = "yes"; then
LIBS="$curl_cv_save_LIBS"
])
fi
- #
+
case "$curl_func_clock_gettime" in
yes)
AC_DEFINE_UNQUOTED(HAVE_CLOCK_GETTIME_MONOTONIC, 1,
[Define to 1 if you have the clock_gettime function and monotonic timer.])
;;
esac
- #
fi
- #
])
dnl using current libraries or if another one is required.
AC_DEFUN([CURL_CHECK_LIBS_CONNECT], [
- AC_REQUIRE([CURL_INCLUDES_WINSOCK2])dnl
- AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])dnl
+ AC_REQUIRE([CURL_INCLUDES_WINSOCK2])
+ AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])
AC_MSG_CHECKING([for connect in libraries])
tst_connect_save_LIBS="$LIBS"
tst_connect_need_LIBS="unknown"
fi
done
LIBS="$tst_connect_save_LIBS"
- #
+
case X-"$tst_connect_need_LIBS" in
X-unknown)
AC_MSG_RESULT([cannot find connect])
dnl Test if the socket select() function is available.
AC_DEFUN([CURL_CHECK_FUNC_SELECT], [
- AC_REQUIRE([CURL_CHECK_STRUCT_TIMEVAL])dnl
- AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])dnl
+ AC_REQUIRE([CURL_CHECK_STRUCT_TIMEVAL])
+ AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])
AC_CHECK_HEADERS(sys/select.h)
- #
+
AC_MSG_CHECKING([for select])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
AC_MSG_RESULT([no])
curl_cv_select="no"
])
- #
+
if test "$curl_cv_select" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_SELECT, 1,
[Define to 1 if you have the select function.])
capath="$want_capath"
ca="no"
elif test "$ca_native" != "no"; then
- # native ca configured, do not look further
+ dnl native ca configured, do not look further
ca="no"
capath="no"
else
dnl Check if curl's Win32 crypto lib can be used
AC_DEFUN([CURL_CHECK_WIN32_CRYPTO], [
- AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])dnl
+ AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])
AC_MSG_CHECKING([whether build target supports Win32 crypto API])
curl_win32_crypto_api="no"
if test "$curl_cv_native_windows" = "yes" && test "$curl_cv_winuwp" != "yes"; then
if test "$PKGCONFIG" != "no"; then
AC_MSG_CHECKING([for $1 options with pkg-config])
dnl ask pkg-config about $1
- itexists=`CURL_EXPORT_PCDIR([$2], [$3]) dnl
+ itexists=`CURL_EXPORT_PCDIR([$2], [$3])
$PKGCONFIG --exists $1 >/dev/null 2>&1 && echo 1`
if test -z "$itexists"; then
dnl harness needs information on how to run the C preprocessor.
AC_DEFUN([CURL_PREPARE_CONFIGUREHELP_PM], [
- AC_REQUIRE([AC_PROG_CPP])dnl
+ AC_REQUIRE([AC_PROG_CPP])
tmp_cpp=`eval echo "$ac_cpp" 2>/dev/null`
if test -z "$tmp_cpp"; then
tmp_cpp='cpp'
if test "$cpp_p" = "no"; then
AC_MSG_WARN([failed to figure out cpp -P alternative])
- # without -P
+ dnl without -P
CPPPFLAG=""
else
- # with -P
+ dnl with -P
CPPPFLAG="-P"
fi
dnl restore CPPFLAGS
CPPFLAGS=$OLDCPPFLAGS
else
- # without -P
+ dnl without -P
CPPPFLAG=""
fi
])
XC_CHECK_PATH_SEPARATOR
-#
-# save the configure arguments
-#
+dnl
+dnl save the configure arguments
+dnl
CONFIGURE_OPTIONS="\"$ac_configure_args\""
AC_SUBST(CONFIGURE_OPTIONS)
dnl TLS AC_ARG_WITH() invokes here and do the checks later
dnl **********************************************************************
OPT_SCHANNEL=no
-AC_ARG_WITH(schannel,dnl
+AC_ARG_WITH(schannel,
AS_HELP_STRING([--with-schannel],[enable Windows native SSL/TLS]),
OPT_SCHANNEL=$withval
TLSCHOICE="Schannel")
OPT_AMISSL=no
-AC_ARG_WITH(amissl,dnl
+AC_ARG_WITH(amissl,
AS_HELP_STRING([--with-amissl],[enable Amiga native SSL/TLS (AmiSSL)]),[
OPT_AMISSL=$withval
TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }AmiSSL"
OPT_OPENSSL=no
dnl Default to no CA bundle
ca="no"
-AC_ARG_WITH(ssl,dnl
+AC_ARG_WITH(ssl,
AS_HELP_STRING([--with-ssl=PATH],[old version of --with-openssl])
AS_HELP_STRING([--without-ssl], [build without any TLS library]),[
OPT_SSL=$withval
fi
])
-AC_ARG_WITH(openssl,dnl
+AC_ARG_WITH(openssl,
AS_HELP_STRING([--with-openssl=PATH],[Where to look for OpenSSL, PATH points
to the SSL installation (default: /usr/local/ssl); when possible, set
the PKG_CONFIG_PATH environment variable instead of using this option]),
])
OPT_GNUTLS=no
-AC_ARG_WITH(gnutls,dnl
+AC_ARG_WITH(gnutls,
AS_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root]),[
OPT_GNUTLS=$withval
if test "x$withval" != "xno"; then
])
OPT_MBEDTLS=no
-AC_ARG_WITH(mbedtls,dnl
+AC_ARG_WITH(mbedtls,
AS_HELP_STRING([--with-mbedtls=PATH],[where to look for mbedTLS, PATH points to the installation root]),[
OPT_MBEDTLS=$withval
if test "x$withval" != "xno"; then
])
OPT_WOLFSSL=no
-AC_ARG_WITH(wolfssl,dnl
+AC_ARG_WITH(wolfssl,
AS_HELP_STRING([--with-wolfssl=PATH],[where to look for wolfSSL, PATH points to the installation root (default: system lib default)]),[
OPT_WOLFSSL=$withval
if test "x$withval" != "xno"; then
])
OPT_RUSTLS=no
-AC_ARG_WITH(rustls,dnl
+AC_ARG_WITH(rustls,
AS_HELP_STRING([--with-rustls=PATH],[where to look for Rustls, PATH points to the installation root]),[
OPT_RUSTLS=$withval
if test "x$withval" != "xno"; then
])
OPT_APPLE_SECTRUST=$curl_cv_apple
-AC_ARG_WITH(apple-sectrust,dnl
+AC_ARG_WITH(apple-sectrust,
AS_HELP_STRING([--with-apple-sectrust],[enable Apple OS native certificate verification]),[
OPT_APPLE_SECTRUST=$withval
])
AM_CONDITIONAL(PERL, test -n "$PERL")
TEST_NGHTTPX=nghttpx
-AC_ARG_WITH(test-nghttpx,dnl
+AC_ARG_WITH(test-nghttpx,
AS_HELP_STRING([--with-test-nghttpx=PATH],[where to find nghttpx for testing]),
TEST_NGHTTPX=$withval
if test "x$TEST_NGHTTPX" = "xno"; then
elif test -x "`brew --prefix 2>/dev/null`/bin/caddy"; then
CADDY=`brew --prefix`/bin/caddy
fi
-AC_ARG_WITH(test-caddy,dnl
+AC_ARG_WITH(test-caddy,
AS_HELP_STRING([--with-test-caddy=PATH],[where to find caddy for testing]),
CADDY=$withval
if test "x$CADDY" = "xno"; then
elif test -x "`brew --prefix 2>/dev/null`/sbin/vsftpd"; then
VSFTPD=`brew --prefix`/sbin/vsftpd
fi
-AC_ARG_WITH(test-vsftpd,dnl
+AC_ARG_WITH(test-vsftpd,
AS_HELP_STRING([--with-test-vsftpd=PATH],[where to find vsftpd for testing]),
VSFTPD=$withval
if test "x$VSFTPD" = "xno"; then
[request_httpd=$withval], [request_httpd=check])
if test "x$request_httpd" = "xcheck" || test "x$request_httpd" = "xyes"; then
if test -x "/usr/sbin/apache2"; then
- # common location on distros (debian/ubuntu)
+ dnl common location on distros (debian/ubuntu)
HTTPD="/usr/sbin/apache2"
AC_PATH_PROG([APXS], [apxs])
if test -z "$APXS"; then
[request_danted=$withval], [request_danted=check])
if test "x$request_danted" = "xcheck" || test "x$request_danted" = "xyes"; then
if test -x "/usr/sbin/danted"; then
- # common location on distros (debian/ubuntu)
+ dnl common location on distros (debian/ubuntu)
DANTED="/usr/sbin/danted"
else
AC_PATH_PROG([DANTED], [danted])
[request_sshd=$withval], [request_sshd=check])
if test "x$request_sshd" = "xcheck" || test "x$request_sshd" = "xyes"; then
if test -x "/usr/sbin/sshd"; then
- # common location on distros (debian/ubuntu)
+ dnl common location on distros (debian/ubuntu)
SSHD="/usr/sbin/sshd"
else
AC_PATH_PROG([SSHD], [sshd])
SFTPD=""
else
if test -x "/usr/libexec/sftp-server"; then
- # common location on macOS)
+ dnl common location on macOS)
SFTPD="/usr/libexec/sftp-server"
elif test -x "/usr/lib/openssh/sftp-server"; then
- # common location on debian
+ dnl common location on debian
SFTPD="/usr/lib/openssh/sftp-server"
else
AC_PATH_PROG([SFTPD], [sftp-server])
dnl Get system canonical name
AC_DEFINE_UNQUOTED(CURL_OS, "${host}", [cpu-machine-OS])
-# Silence warning: ar: 'u' modifier ignored since 'D' is the default
+dnl Silence warning: ar: 'u' modifier ignored since 'D' is the default
AC_SUBST(AR_FLAGS, [cr])
dnl This defines _ALL_SOURCE for AIX
AM_CONDITIONAL(NOT_CURL_CI, test -z "$CURL_CI")
-#
-# Automake conditionals based on libtool related checks
-#
+dnl
+dnl Automake conditionals based on libtool related checks
+dnl
AM_CONDITIONAL([CURL_LT_SHLIB_USE_VERSION_INFO],
[test "$xc_lt_shlib_use_version_info" = "yes"])
AM_CONDITIONAL([CURL_LT_SHLIB_USE_MIMPURE_TEXT],
[test "$xc_lt_shlib_use_mimpure_text" = "yes"])
-#
-# Due to libtool and automake machinery limitations of not allowing
-# specifying separate CPPFLAGS or CFLAGS when compiling objects for
-# inclusion of these in shared or static libraries, we are forced to
-# build using separate configure runs for shared and static libraries
-# on systems where different CPPFLAGS or CFLAGS are mandatory in order
-# to compile objects for each kind of library. Notice that relying on
-# the '-DPIC' CFLAG that libtool provides is not valid given that the
-# user might for example choose to build static libraries with PIC.
-#
+dnl
+dnl Due to libtool and automake machinery limitations of not allowing
+dnl specifying separate CPPFLAGS or CFLAGS when compiling objects for
+dnl inclusion of these in shared or static libraries, we are forced to
+dnl build using separate configure runs for shared and static libraries
+dnl on systems where different CPPFLAGS or CFLAGS are mandatory in order
+dnl to compile objects for each kind of library. Notice that relying on
+dnl the '-DPIC' CFLAG that libtool provides is not valid given that the
+dnl user might for example choose to build static libraries with PIC.
+dnl
-#
-# Make our Makefile.am files use the staticlib CPPFLAG only when strictly
-# targeting a static library and not building its shared counterpart.
-#
+dnl
+dnl Make our Makefile.am files use the staticlib CPPFLAG only when strictly
+dnl targeting a static library and not building its shared counterpart.
+dnl
AM_CONDITIONAL([USE_CPPFLAG_CURL_STATICLIB],
[test "$xc_lt_build_static_only" = "yes"])
-#
-# Make staticlib CPPFLAG variable and its definition visible in output
-# files unconditionally, providing an empty definition unless strictly
-# targeting a static library and not building its shared counterpart.
-#
+dnl
+dnl Make staticlib CPPFLAG variable and its definition visible in output
+dnl files unconditionally, providing an empty definition unless strictly
+dnl targeting a static library and not building its shared counterpart.
+dnl
LIBCURL_PC_CFLAGS_PRIVATE='-DCURL_STATICLIB'
AC_SUBST(LIBCURL_PC_CFLAGS_PRIVATE)
CURL_SET_COMPILER_WARNING_OPTS
if test "$compiler_id" = "INTEL_UNIX_C"; then
- #
if test "$compiler_num" -ge "1000"; then
dnl icc 10.X or later
CFLAGS="$CFLAGS -shared-intel"
dnl icc 9.X specific
CFLAGS="$CFLAGS -i-dynamic"
fi
- #
fi
case $host in
CURL_CHECK_COMPILER_SYMBOL_HIDING
supports_unittests=yes
-# cross-compilation of unit tests static library/programs fails when
-# libcurl shared library is built. This might be due to a libtool or
-# automake issue. In this case we disable unit tests.
+dnl cross-compilation of unit tests static library/programs fails when
+dnl libcurl shared library is built. This might be due to a libtool or
+dnl automake issue. In this case we disable unit tests.
if test "$cross_compiling" != "no" &&
test "$enable_shared" != "no"; then
supports_unittests=no
fi
-# IRIX 6.5.24 gcc 3.3 autobuilds fail unittests library compilation due to
-# a problem related with OpenSSL headers and library versions not matching.
-# Disable unit tests while time to further investigate this is found.
+dnl IRIX 6.5.24 gcc 3.3 autobuilds fail unittests library compilation due to
+dnl a problem related with OpenSSL headers and library versions not matching.
+dnl Disable unit tests while time to further investigate this is found.
case $host in
mips-sgi-irix6.5)
if test "$compiler_id" = "GNU_C"; then
;;
esac
-# All AIX autobuilds fails unit tests linking against unittests library
-# due to unittests library being built with no symbols or members. Libtool ?
-# Disable unit tests while time to further investigate this is found.
+dnl All AIX autobuilds fails unit tests linking against unittests library
+dnl due to unittests library being built with no symbols or members. Libtool ?
+dnl Disable unit tests while time to further investigate this is found.
case $host_os in
aix*)
supports_unittests=no
AM_CONDITIONAL(BUILD_UNITTESTS, test "$supports_unittests" = "yes")
-# In order to detect support of sendmmsg() and accept4(), we need to escape the POSIX
-# jail by defining _GNU_SOURCE or <sys/socket.h> will not expose it.
+dnl In order to detect support of sendmmsg() and accept4(), we need to escape the POSIX
+dnl jail by defining _GNU_SOURCE or <sys/socket.h> will not expose it.
case $host_os in
*linux*|cygwin*|msys*|gnu*)
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
])
fi
-# In UWP mode gethostbyname gets detected via the core libs, but some
-# code (in6addr_any) still need ws2_32, so let us detect and add it.
+dnl In UWP mode gethostbyname gets detected via the core libs, but some
+dnl code (in6addr_any) still need ws2_32, so let us detect and add it.
if test "$HAVE_GETHOSTBYNAME" != "1" || test "$curl_cv_winuwp" = "yes"; then
if test "$curl_cv_native_windows" = "yes"; then
dnl This is for Winsock systems
dnl Default to compiler & linker defaults for BROTLI files & libraries.
OPT_BROTLI=off
-AC_ARG_WITH(brotli,dnl
+AC_ARG_WITH(brotli,
AS_HELP_STRING([--with-brotli=PATH],[Where to look for brotli, PATH points to the BROTLI installation;
when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
AS_HELP_STRING([--without-brotli], [disable BROTLI]),
dnl Default to compiler & linker defaults for libzstd
OPT_ZSTD=off
-AC_ARG_WITH(zstd,dnl
+AC_ARG_WITH(zstd,
AS_HELP_STRING([--with-zstd=PATH],[Where to look for libzstd, PATH points to the libzstd installation;
when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
AS_HELP_STRING([--without-zstd], [disable libzstd]),
Use --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-schannel, --with-amissl or --with-rustls to address this.])
;;
x1)
- # one SSL backend is enabled
+ dnl one SSL backend is enabled
SSL_ENABLED="1"
AC_MSG_NOTICE([built with one SSL backend])
;;
xD)
- # explicitly built without TLS
+ dnl explicitly built without TLS
;;
xD*)
AC_MSG_ERROR([--without-ssl has been set together with an explicit option to use an ssl library
Since these are conflicting parameters, verify which is the desired one and drop the other.])
;;
*)
- # more than one SSL backend is enabled
+ dnl more than one SSL backend is enabled
SSL_ENABLED="1"
CURL_WITH_MULTI_SSL="1"
AC_DEFINE(CURL_WITH_MULTI_SSL, 1, [built with multiple SSL backends])
dnl Default to compiler & linker defaults for LIBPSL files & libraries.
OPT_LIBPSL=off
-AC_ARG_WITH(libpsl,dnl
+AC_ARG_WITH(libpsl,
AS_HELP_STRING([--with-libpsl=PATH],[Where to look for libpsl, PATH points to the LIBPSL installation;
when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
AS_HELP_STRING([--without-libpsl], [disable LIBPSL]),
dnl **********************************************************************
OPT_LIBGSASL=no
-AC_ARG_WITH(libgsasl,dnl
+AC_ARG_WITH(libgsasl,
AS_HELP_STRING([--with-libgsasl=PATH],[Where to look for libgsasl, PATH points to the libgsasl installation;
when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
AS_HELP_STRING([--without-libgsasl], [disable libgsasl support for SCRAM]),
dnl Default to compiler & linker defaults for libssh2 files & libraries.
OPT_LIBSSH2=off
-AC_ARG_WITH(libssh2,dnl
+AC_ARG_WITH(libssh2,
AS_HELP_STRING([--with-libssh2=PATH],[Where to look for libssh2, PATH points to the libssh2 installation;
when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
AS_HELP_STRING([--with-libssh2], [enable libssh2]),
OPT_LIBSSH2=$withval, OPT_LIBSSH2=no)
OPT_LIBSSH=off
-AC_ARG_WITH(libssh,dnl
+AC_ARG_WITH(libssh,
AS_HELP_STRING([--with-libssh=PATH],[Where to look for libssh, PATH points to the libssh installation;
when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
AS_HELP_STRING([--with-libssh], [enable libssh]),
clean_LDFLAGSPC="$LDFLAGSPC"
clean_LIBS="$LIBS"
PKGCONFIG="no"
- #
+
if test "$want_idn_path" != "default"; then
dnl path has been specified
IDN_PCDIR="$want_idn_path/lib$libsuff/pkgconfig"
CURL_CHECK_PKGCONFIG(libidn2, [$IDN_PCDIR])
if test "$PKGCONFIG" != "no"; then
- IDN_LIBS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
+ IDN_LIBS=`CURL_EXPORT_PCDIR([$IDN_PCDIR])
$PKGCONFIG --libs-only-l libidn2 2>/dev/null`
- IDN_LDFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
+ IDN_LDFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR])
$PKGCONFIG --libs-only-L libidn2 2>/dev/null`
- IDN_CPPFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
+ IDN_CPPFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR])
$PKGCONFIG --cflags-only-I libidn2 2>/dev/null`
IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/^-L//'`
else
IDN_LIBS="-lidn2"
fi
fi
- #
+
if test "$PKGCONFIG" != "no"; then
AC_MSG_NOTICE([pkg-config: IDN_LIBS: "$IDN_LIBS"])
AC_MSG_NOTICE([pkg-config: IDN_LDFLAGS: "$IDN_LDFLAGS"])
AC_MSG_NOTICE([IDN_CPPFLAGS: "$IDN_CPPFLAGS"])
AC_MSG_NOTICE([IDN_DIR: "$IDN_DIR"])
fi
- #
+
CPPFLAGS="$CPPFLAGS $IDN_CPPFLAGS"
LDFLAGS="$LDFLAGS $IDN_LDFLAGS"
LDFLAGSPC="$LDFLAGSPC $IDN_LDFLAGS"
LIBS="$IDN_LIBS $LIBS"
- #
+
AC_MSG_CHECKING([if idn2_lookup_ul can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([idn2_lookup_ul])
AC_MSG_RESULT([no])
tst_links_libidn="no"
])
- #
+
AC_CHECK_HEADERS(idn2.h)
if test "$tst_links_libidn" = "yes"; then
OPT_H2="yes"
if test "$disable_http" = "yes"; then
- # without HTTP nghttp2 is no use
+ dnl without HTTP nghttp2 is no use
OPT_H2="no"
fi
$PKGCONFIG --libs-only-l libnghttp2`
AC_MSG_NOTICE([-l is $LIB_H2])
- CPP_H2=`CURL_EXPORT_PCDIR([$want_nghttp2_pkg_config_path]) dnl
+ CPP_H2=`CURL_EXPORT_PCDIR([$want_nghttp2_pkg_config_path])
$PKGCONFIG --cflags-only-I libnghttp2`
AC_MSG_NOTICE([-I is $CPP_H2])
CPPFLAGS="$CPPFLAGS $CPP_H2"
LIBS="$LIB_H2 $LIBS"
- # use nghttp2_session_get_stream_local_window_size to require nghttp2
- # >= 1.15.0
+ dnl use nghttp2_session_get_stream_local_window_size to require nghttp2
+ dnl >= 1.15.0
AC_CHECK_LIB(nghttp2, nghttp2_session_get_stream_local_window_size,
[
AC_CHECK_HEADERS(nghttp2/nghttp2.h,
OPT_TCP2="no"
if test "$disable_http" = "yes"; then
- # without HTTP, ngtcp2 is no use
+ dnl without HTTP, ngtcp2 is no use
OPT_TCP2="no"
fi
$PKGCONFIG --libs-only-l libngtcp2`
AC_MSG_NOTICE([-l is $LIB_TCP2])
- CPP_TCP2=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
+ CPP_TCP2=`CURL_EXPORT_PCDIR([$want_tcp2_path])
$PKGCONFIG --cflags-only-I libngtcp2`
AC_MSG_NOTICE([-I is $CPP_TCP2])
$PKGCONFIG --libs-only-l libngtcp2_crypto_libressl`
AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_LIBRESSL])
- CPP_NGTCP2_CRYPTO_LIBRESSL=`CURL_EXPORT_PCDIR([$want_tcp2_path], 1) dnl
+ CPP_NGTCP2_CRYPTO_LIBRESSL=`CURL_EXPORT_PCDIR([$want_tcp2_path], 1)
$PKGCONFIG --cflags-only-I libngtcp2_crypto_libressl`
AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_LIBRESSL])
$PKGCONFIG --libs-only-l libngtcp2_crypto_quictls`
AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_QUICTLS])
- CPP_NGTCP2_CRYPTO_QUICTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path], 1) dnl
+ CPP_NGTCP2_CRYPTO_QUICTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path], 1)
$PKGCONFIG --cflags-only-I libngtcp2_crypto_quictls`
AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_QUICTLS])
$PKGCONFIG --libs-only-l libngtcp2_crypto_ossl`
AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_OSSL])
- CPP_NGTCP2_CRYPTO_OSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path], 1) dnl
+ CPP_NGTCP2_CRYPTO_OSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path], 1)
$PKGCONFIG --cflags-only-I libngtcp2_crypto_ossl`
AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_OSSL])
$PKGCONFIG --libs-only-l libngtcp2_crypto_boringssl`
AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_BORINGSSL])
- CPP_NGTCP2_CRYPTO_BORINGSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path], 1) dnl
+ CPP_NGTCP2_CRYPTO_BORINGSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path], 1)
$PKGCONFIG --cflags-only-I libngtcp2_crypto_boringssl`
AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_BORINGSSL])
$PKGCONFIG --libs-only-l libngtcp2_crypto_gnutls`
AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_GNUTLS])
- CPP_NGTCP2_CRYPTO_GNUTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path], 1) dnl
+ CPP_NGTCP2_CRYPTO_GNUTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path], 1)
$PKGCONFIG --cflags-only-I libngtcp2_crypto_gnutls`
AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_GNUTLS])
$PKGCONFIG --libs-only-l libngtcp2_crypto_wolfssl`
AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_WOLFSSL])
- CPP_NGTCP2_CRYPTO_WOLFSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path], 1) dnl
+ CPP_NGTCP2_CRYPTO_WOLFSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path], 1)
$PKGCONFIG --cflags-only-I libngtcp2_crypto_wolfssl`
AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_WOLFSSL])
OPT_NGHTTP3="yes"
if test "$USE_NGTCP2" != "1"; then
- # without ngtcp2, nghttp3 is of no use for us
+ dnl without ngtcp2, nghttp3 is of no use for us
OPT_NGHTTP3="no"
want_nghttp3="no"
fi
if test "$want_nghttp3" != "no"; then
if test "x$USE_NGTCP2" != "x1"; then
- # without ngtcp2, nghttp3 is of no use for us
+ dnl without ngtcp2, nghttp3 is of no use for us
AC_MSG_ERROR([nghttp3 enabled without a QUIC library; enable ngtcp2])
fi
$PKGCONFIG --libs-only-l libnghttp3`
AC_MSG_NOTICE([-l is $LIB_NGHTTP3])
- CPP_NGHTTP3=`CURL_EXPORT_PCDIR([$want_nghttp3_path]) dnl
+ CPP_NGHTTP3=`CURL_EXPORT_PCDIR([$want_nghttp3_path])
$PKGCONFIG --cflags-only-I libnghttp3`
AC_MSG_NOTICE([-I is $CPP_NGHTTP3])
OPT_QUICHE="no"
if test "$disable_http" = "yes" || test "$USE_NGTCP" = "1"; then
- # without HTTP or with ngtcp2, quiche is no use
+ dnl without HTTP or with ngtcp2, quiche is no use
OPT_QUICHE="no"
fi
$PKGCONFIG --libs-only-l quiche`
AC_MSG_NOTICE([-l is $LIB_QUICHE])
- CPP_QUICHE=`CURL_EXPORT_PCDIR([$want_quiche_path]) dnl
+ CPP_QUICHE=`CURL_EXPORT_PCDIR([$want_quiche_path])
$PKGCONFIG --cflags-only-I quiche`
AC_MSG_NOTICE([-I is $CPP_QUICHE])
$PKGCONFIG --libs-only-l libuv`
AC_MSG_NOTICE([-l is $LIB_LIBUV])
- CPP_LIBUV=`CURL_EXPORT_PCDIR([$want_libuv_path]) dnl
+ CPP_LIBUV=`CURL_EXPORT_PCDIR([$want_libuv_path])
$PKGCONFIG --cflags-only-I libuv`
AC_MSG_NOTICE([-I is $CPP_LIBUV])
stdbool.h \
sys/filio.h \
sys/eventfd.h,
-dnl to do if not found
[],
-dnl to do if found
[],
-dnl default includes
+/* default includes */
[
#include <stdlib.h>
#ifdef HAVE_SYS_TYPES_H
AC_MSG_ERROR([64-bit curl_off_t is required])
fi
-# check for ssize_t
+dnl check for ssize_t
AC_CHECK_TYPE(ssize_t, ,
AC_DEFINE(ssize_t, int, [the signed version of size_t]))
-# check for bool type
+dnl check for bool type
AC_CHECK_TYPE([bool],[
AC_DEFINE(HAVE_BOOL_T, 1,
[Define to 1 if bool is an available type.])
])
if test "$curl_cv_native_windows" != "yes"; then
- # check for sa_family_t
+ dnl check for sa_family_t
AC_CHECK_TYPE(sa_family_t,
AC_DEFINE(HAVE_SA_FAMILY_T, 1, [Define to 1 if symbol `sa_family_t' exists]),,
[
])
fi
-# check for suseconds_t
+dnl check for suseconds_t
AC_CHECK_TYPE([suseconds_t],[
AC_DEFINE(HAVE_SUSECONDS_T, 1,
[Define to 1 if suseconds_t is an available type.])
dnl if it was not found without lib, search for it in pthread lib
if test "$HAVE_THREADS_POSIX" != "1"; then
- # assign PTHREAD for pkg-config use
+ dnl assign PTHREAD for pkg-config use
PTHREAD=" -pthread"
case $host in
;;
*)
if test "$SCHANNEL_ENABLED" = "1"; then
- # --with-schannel implies --enable-sspi
+ dnl --with-schannel implies --enable-sspi
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
;;
esac ],
if test "$SCHANNEL_ENABLED" = "1"; then
- # --with-schannel implies --enable-sspi
+ dnl --with-schannel implies --enable-sspi
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
curl_httpsrr_msg="enabled (--disable-httpsrr)"
else
AC_MSG_RESULT([no])
- # no HTTPSRR wanted
+ dnl no HTTPSRR wanted
if test "$want_threaded_resolver" = "yes"; then
- # and using the threaded resolver
+ dnl and using the threaded resolver
if test "$USE_ARES" = "1"; then
AC_MSG_ERROR([without HTTPS-RR support, asking for both threaded resolver and c-ares support is ambivalent. Please drop one of them.])
fi
AC_CHECK_FUNCS([SSL_set0_wbio])
fi
+dnl *************************************************************
+dnl WebSockets
+dnl
if test "$CURL_DISABLE_HTTP" != "1"; then
- dnl *************************************************************
- dnl WebSockets
- dnl
AC_MSG_CHECKING([whether to support WebSockets])
AC_ARG_ENABLE(websockets,
AS_HELP_STRING([--enable-websockets],[Enable WebSockets support])
#
# SPDX-License-Identifier: curl
#
-###########################################################################
+#***************************************************************************
# LIBCURL_CHECK_CONFIG([DEFAULT-ACTION], [MINIMUM-VERSION],
# [ACTION-IF-YES], [ACTION-IF-NO])
# ----------------------------------------------------------
if test -z "$LIBCURL"; then
LIBCURL=`$_libcurl_config --libs`
- # This is so silly, but Apple actually has a bug in their
- # curl-config script. Fixed in Tiger, but there are still
- # lots of Panther installs around.
+ dnl This is so silly, but Apple actually has a bug in their
+ dnl curl-config script. Fixed in Tiger, but there are still
+ dnl lots of Panther installs around.
case "${host}" in
powerpc-apple-darwin7*)
LIBCURL=`echo $LIBCURL | sed -e 's|-arch i386||g'`
esac
fi
- # All curl-config scripts support --feature
+ dnl All curl-config scripts support --feature
_libcurl_features=`$_libcurl_config --feature`
- # Is it modern enough to have --protocols? (7.12.4)
+ dnl Is it modern enough to have --protocols? (7.12.4)
if test "$_libcurl_version" -ge 461828; then
_libcurl_protocols=`$_libcurl_config --protocols`
fi
if test "$_libcurl_try_link" = "yes"; then
- # we did not find curl-config, so let's see if the user-supplied
- # link line (or failing that, "-lcurl") is enough.
+ dnl we did not find curl-config, so let's see if the user-supplied
+ dnl link line (or failing that, "-lcurl") is enough.
LIBCURL=${LIBCURL-"$_libcurl_ldflags -lcurl"}
AC_CACHE_CHECK([whether libcurl is usable],
if test "$libcurl_cv_lib_curl_usable" = "yes"; then
- # Does curl_free() exist in this version of libcurl?
- # If not, fake it with free()
+ dnl Does curl_free() exist in this version of libcurl?
+ dnl If not, fake it with free()
_libcurl_save_cppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
if test -z "$_libcurl_protocols"; then
- # We do not have --protocols; assume that all
- # protocols are available
+ dnl We do not have --protocols; assume that all
+ dnl protocols are available
_libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT TFTP"
if test "$libcurl_feature_SSL" = "yes"; then
_libcurl_protocols="$_libcurl_protocols HTTPS"
- # FTPS was not standards-compliant until version
- # 7.11.0 (0x070b00 == 461568)
+ dnl FTPS was not standards-compliant until version
+ dnl 7.11.0 (0x070b00 == 461568)
if test "$_libcurl_version" -ge 461568; then
_libcurl_protocols="$_libcurl_protocols FTPS"
fi
fi
- # RTSP, IMAP, POP3 and SMTP were added in
- # 7.20.0 (0x071400 == 463872)
+ dnl RTSP, IMAP, POP3 and SMTP were added in
+ dnl 7.20.0 (0x071400 == 463872)
if test "$_libcurl_version" -ge 463872; then
_libcurl_protocols="$_libcurl_protocols RTSP IMAP POP3 SMTP"
fi
fi
if test "x$_libcurl_with" = "xno" || test "$libcurl_cv_lib_curl_usable" != "yes"; then
- # This is the IF-NO path
+ dnl This is the IF-NO path
ifelse([$4],,:,[$4])
else
- # This is the IF-YES path
+ dnl This is the IF-YES path
ifelse([$3],,:,[$3])
fi
test "amissl" != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
AMISSL_ENABLED=1
OPENSSL_ENABLED=1
- # Use AmiSSL's built-in ca bundle
+ dnl Use AmiSSL's built-in ca bundle
check_for_ca_bundle=1
with_ca_fallback=yes
LIBS="-lamisslstubs -lamisslauto $LIBS"
#
#***************************************************************************
-# File version for 'aclocal' use. Keep it a single number.
-# serial 67
-
+dnl File version for 'aclocal' use. Keep it a single number.
+dnl serial 67
dnl CURL_CHECK_COMPILER
dnl -------------------------------------------------
dnl Verify if the C compiler being used is known.
AC_DEFUN([CURL_CHECK_COMPILER], [
- #
+
compiler_id="unknown"
compiler_ver=""
compiler_num="0"
- #
+
flags_dbg_yes="unknown"
flags_opt_all="unknown"
flags_opt_yes="unknown"
flags_opt_off="unknown"
- #
+
flags_prefer_cppflags="no"
- #
+
CURL_CHECK_COMPILER_DEC_C
CURL_CHECK_COMPILER_HPUX_C
CURL_CHECK_COMPILER_IBM_C
esac
CURL_CHECK_COMPILER_SUNPRO_C
CURL_CHECK_COMPILER_TINY_C
- #
+
if test "$compiler_id" = "unknown"; then
cat <<_EOF 1>&2
***
dnl Verify if compiler being used is clang.
AC_DEFUN([CURL_CHECK_COMPILER_CLANG], [
- AC_BEFORE([$0],[CURL_CHECK_COMPILER_GNU_C])dnl
+ AC_BEFORE([$0],[CURL_CHECK_COMPILER_GNU_C])
AC_MSG_CHECKING([if compiler is clang])
CURL_CHECK_DEF([__clang__], [], [silent])
if test "$curl_cv_have_def___clang__" = "yes"; then
dnl Version 9.2.1 => 900
dnl
AC_DEFUN([CURL_CHECK_COMPILER_GNU_C], [
- AC_REQUIRE([CURL_CHECK_COMPILER_INTEL_C])dnl
- AC_REQUIRE([CURL_CHECK_COMPILER_CLANG])dnl
+ AC_REQUIRE([CURL_CHECK_COMPILER_INTEL_C])
+ AC_REQUIRE([CURL_CHECK_COMPILER_CLANG])
AC_MSG_CHECKING([if compiler is GNU C])
CURL_CHECK_DEF([__GNUC__], [], [silent])
if test "$curl_cv_have_def___GNUC__" = "yes" &&
AC_MSG_RESULT([yes])
compiler_id="GNU_C"
AC_MSG_CHECKING([compiler version])
- # strip '-suffix' parts, e.g. Ubuntu Windows cross-gcc returns '10-win32'
+ dnl strip '-suffix' parts, e.g. Ubuntu Windows cross-gcc returns '10-win32'
gccver=`$CC -dumpversion | "$SED" 's/-.\{1,\}$//'`
gccvhi=`echo $gccver | cut -d . -f1`
if echo $gccver | grep -F '.' >/dev/null; then
dnl Verify if compiler being used is Intel C.
AC_DEFUN([CURL_CHECK_COMPILER_INTEL_C], [
- AC_BEFORE([$0],[CURL_CHECK_COMPILER_GNU_C])dnl
+ AC_BEFORE([$0],[CURL_CHECK_COMPILER_GNU_C])
AC_MSG_CHECKING([if compiler is Intel C])
CURL_CHECK_DEF([__INTEL_COMPILER], [], [silent])
if test "$curl_cv_have_def___INTEL_COMPILER" = "yes"; then
dnl Verify if compiler being used is SGI MIPS C.
AC_DEFUN([CURL_CHECK_COMPILER_SGI_MIPS_C], [
- AC_REQUIRE([CURL_CHECK_COMPILER_SGI_MIPSPRO_C])dnl
+ AC_REQUIRE([CURL_CHECK_COMPILER_SGI_MIPSPRO_C])
AC_MSG_CHECKING([if compiler is SGI MIPS C])
CURL_CHECK_DEF([__GNUC__], [], [silent])
CURL_CHECK_DEF([__sgi], [], [silent])
dnl Verify if compiler being used is SGI MIPSpro C.
AC_DEFUN([CURL_CHECK_COMPILER_SGI_MIPSPRO_C], [
- AC_BEFORE([$0],[CURL_CHECK_COMPILER_SGI_MIPS_C])dnl
+ AC_BEFORE([$0],[CURL_CHECK_COMPILER_SGI_MIPS_C])
AC_MSG_CHECKING([if compiler is SGI MIPSpro C])
CURL_CHECK_DEF([__GNUC__], [], [silent])
CURL_CHECK_DEF([_COMPILER_VERSION], [], [silent])
dnl GNUC versions these warnings are not silenced.
AC_DEFUN([CURL_CONVERT_INCLUDE_TO_ISYSTEM], [
- AC_REQUIRE([CURL_SHFUNC_SQUEEZE])dnl
- AC_REQUIRE([CURL_CHECK_COMPILER])dnl
+ AC_REQUIRE([CURL_SHFUNC_SQUEEZE])
+ AC_REQUIRE([CURL_CHECK_COMPILER])
AC_MSG_CHECKING([convert -I options to -isystem])
if test "$compiler_id" = "GNU_C" ||
test "$compiler_id" = "CLANG" ||
dnl options.
AC_DEFUN([CURL_SET_COMPILER_BASIC_OPTS], [
- AC_REQUIRE([CURL_CHECK_COMPILER])dnl
- AC_REQUIRE([CURL_SHFUNC_SQUEEZE])dnl
- #
+ AC_REQUIRE([CURL_CHECK_COMPILER])
+ AC_REQUIRE([CURL_SHFUNC_SQUEEZE])
+
if test "$compiler_id" != "unknown"; then
- #
+
tmp_save_CPPFLAGS="$CPPFLAGS"
tmp_save_CFLAGS="$CFLAGS"
tmp_CPPFLAGS=""
tmp_CFLAGS=""
- #
+
case "$compiler_id" in
- #
+
CLANG|APPLECLANG)
- #
+
dnl Disable warnings for unused arguments, otherwise clang will
dnl warn about compile-time arguments used during link-time, like
dnl -O and -g and -pedantic.
tmp_CFLAGS="$tmp_CFLAGS -Qunused-arguments"
tmp_CFLAGS="$tmp_CFLAGS -Werror-implicit-function-declaration"
;;
- #
+
DEC_C)
- #
+
dnl Select strict ANSI C compiler mode
tmp_CFLAGS="$tmp_CFLAGS -std1"
dnl Turn off optimizer ANSI C aliasing rules
dnl Change some warnings into fatal errors
tmp_CFLAGS="$tmp_CFLAGS -msg_fatal toofewargs,toomanyargs"
;;
- #
+
GNU_C)
- #
+
dnl turn implicit-function-declaration warning into error,
dnl at least gcc 2.95 and later support this
if test "$compiler_num" -ge "295"; then
tmp_CFLAGS="$tmp_CFLAGS -Werror-implicit-function-declaration"
fi
;;
- #
+
HP_UX_C)
- #
+
dnl Disallow runtime dereferencing of null pointers
tmp_CFLAGS="$tmp_CFLAGS -z"
dnl Disable some remarks
dnl #4255: padding size of struct with n bytes to alignment boundary
tmp_CFLAGS="$tmp_CFLAGS +W 4227,4255"
;;
- #
+
IBM_C)
- #
+
dnl Ensure that compiler optimizations are always thread-safe.
tmp_CPPFLAGS="$tmp_CPPFLAGS -qthreaded"
dnl Disable type based strict aliasing optimizations, using worst
dnl generating an object code file when compilation has errors.
tmp_CPPFLAGS="$tmp_CPPFLAGS -qhalt=e"
;;
- #
+
INTEL_UNIX_C)
- #
+
dnl On Unix this compiler uses gcc's header files, so
dnl we select ANSI C89 dialect plus GNU extensions.
tmp_CFLAGS="$tmp_CFLAGS -std=gnu89"
dnl #2259: non-pointer conversion from X to Y may lose significant bits
tmp_CPPFLAGS="$tmp_CPPFLAGS -diag-disable 279,981,1025,1469,2259"
;;
- #
+
INTEL_WINDOWS_C)
- #
+
dnl Placeholder
tmp_CFLAGS="$tmp_CFLAGS"
;;
- #
+
SGI_MIPS_C)
- #
+
dnl Placeholder
tmp_CFLAGS="$tmp_CFLAGS"
;;
- #
+
SGI_MIPSPRO_C)
- #
+
dnl Placeholder
tmp_CFLAGS="$tmp_CFLAGS"
;;
- #
+
SUNPRO_C)
- #
+
dnl Placeholder
tmp_CFLAGS="$tmp_CFLAGS"
;;
- #
+
TINY_C)
- #
+
dnl Placeholder
tmp_CFLAGS="$tmp_CFLAGS"
;;
- #
+
esac
- #
+
squeeze tmp_CPPFLAGS
squeeze tmp_CFLAGS
- #
+
if test -n "$tmp_CFLAGS" || test -n "$tmp_CPPFLAGS"; then
AC_MSG_CHECKING([if compiler accepts some basic options])
CPPFLAGS="$tmp_save_CPPFLAGS $tmp_CPPFLAGS"
CFLAGS="$tmp_save_CFLAGS"
])
fi
- #
fi
])
dnl on configure's debug option.
AC_DEFUN([CURL_SET_COMPILER_DEBUG_OPTS], [
- AC_REQUIRE([CURL_CHECK_OPTION_DEBUG])dnl
- AC_REQUIRE([CURL_CHECK_COMPILER])dnl
- AC_REQUIRE([CURL_SHFUNC_SQUEEZE])dnl
- #
+ AC_REQUIRE([CURL_CHECK_OPTION_DEBUG])
+ AC_REQUIRE([CURL_CHECK_COMPILER])
+ AC_REQUIRE([CURL_SHFUNC_SQUEEZE])
+
if test "$compiler_id" != "unknown"; then
- #
+
tmp_save_CFLAGS="$CFLAGS"
tmp_save_CPPFLAGS="$CPPFLAGS"
- #
+
tmp_options=""
tmp_CFLAGS="$CFLAGS"
tmp_CPPFLAGS="$CPPFLAGS"
- #
+
if test "$want_debug" = "yes"; then
AC_MSG_CHECKING([if compiler accepts debug enabling options])
tmp_options="$flags_dbg_yes"
fi
- #
+
if test "$flags_prefer_cppflags" = "yes"; then
CPPFLAGS="$tmp_CPPFLAGS $tmp_options"
CFLAGS="$tmp_CFLAGS"
dnl on configure's optimize option.
AC_DEFUN([CURL_SET_COMPILER_OPTIMIZE_OPTS], [
- AC_REQUIRE([CURL_CHECK_OPTION_OPTIMIZE])dnl
- AC_REQUIRE([CURL_CHECK_COMPILER])dnl
- AC_REQUIRE([CURL_SHFUNC_SQUEEZE])dnl
- #
+ AC_REQUIRE([CURL_CHECK_OPTION_OPTIMIZE])
+ AC_REQUIRE([CURL_CHECK_COMPILER])
+ AC_REQUIRE([CURL_SHFUNC_SQUEEZE])
+
if test "$compiler_id" != "unknown"; then
- #
+
tmp_save_CFLAGS="$CFLAGS"
tmp_save_CPPFLAGS="$CPPFLAGS"
- #
+
tmp_options=""
tmp_CFLAGS="$CFLAGS"
tmp_CPPFLAGS="$CPPFLAGS"
honor_optimize_option="yes"
- #
+
dnl If optimization request setting has not been explicitly specified,
dnl it has been derived from the debug setting and initially assumed.
dnl This initially assumed optimizer setting will finally be ignored
dnl if CFLAGS or CPPFLAGS already hold optimizer flags. This implies
dnl that an initially assumed optimizer setting might not be honored.
- #
+
if test "$want_optimize" = "assume_no" ||
test "$want_optimize" = "assume_yes"; then
AC_MSG_CHECKING([if compiler optimizer assumed setting might be used])
fi
fi
fi
- #
+
if test "$honor_optimize_option" = "yes"; then
CURL_VAR_STRIP([tmp_CFLAGS],[$flags_opt_all])
CURL_VAR_STRIP([tmp_CPPFLAGS],[$flags_opt_all])
CFLAGS="$tmp_save_CFLAGS"
])
fi
- #
fi
])
dnl configure's warnings given option.
AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
- AC_REQUIRE([CURL_CHECK_OPTION_WARNINGS])dnl
- AC_REQUIRE([CURL_CHECK_COMPILER])dnl
- AC_REQUIRE([CURL_SHFUNC_SQUEEZE])dnl
- #
+ AC_REQUIRE([CURL_CHECK_OPTION_WARNINGS])
+ AC_REQUIRE([CURL_CHECK_COMPILER])
+ AC_REQUIRE([CURL_SHFUNC_SQUEEZE])
+
if test "$compiler_id" != "unknown"; then
- #
+
tmp_save_CPPFLAGS="$CPPFLAGS"
tmp_save_CFLAGS="$CFLAGS"
tmp_CPPFLAGS=""
tmp_CFLAGS=""
- #
+
case "$compiler_id" in
- #
+
CLANG|APPLECLANG)
- #
+
if test "$want_warnings" = "yes"; then
if test "$compiler_num" -ge "302"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [pedantic])
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [cast-align])
tmp_CFLAGS="$tmp_CFLAGS -Wno-system-headers"
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [shorten-64-to-32])
- #
+
dnl Only clang 1.1 or later
if test "$compiler_num" -ge "101"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unused])
fi
- #
+
dnl Only clang 2.7 or later
if test "$compiler_num" -ge "207"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [address])
# tmp_CFLAGS="$tmp_CFLAGS -Wno-error=unused-macros"
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unreachable-code unused-parameter])
fi
- #
+
dnl Only clang 2.8 or later
if test "$compiler_num" -ge "208"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [ignored-qualifiers])
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [vla])
fi
- #
+
dnl Only clang 2.9 or later
if test "$compiler_num" -ge "209"; then
tmp_CFLAGS="$tmp_CFLAGS -Wno-sign-conversion"
tmp_CFLAGS="$tmp_CFLAGS -Wno-used-but-marked-unused" # for typecheck-gcc.h with clang 14+, dependency headers
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [shift-sign-overflow])
fi
- #
+
dnl Only clang 3.0 or later
if test "$compiler_num" -ge "300"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [conditional-uninitialized])
tmp_CFLAGS="$tmp_CFLAGS -Wno-covered-switch-default" # Annoying to fix or silence
tmp_CFLAGS="$tmp_CFLAGS -Wno-disabled-macro-expansion" # for std headers, and curl/curl.h (rare combos)
fi
- #
+
dnl Only clang 3.2 or later
if test "$compiler_num" -ge "302"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [enum-conversion])
if test "$compiler_num" -ge "303"; then
tmp_CFLAGS="$tmp_CFLAGS -Wno-documentation-unknown-command"
fi
- #
+
dnl Only clang 3.4 or later
if test "$compiler_num" -ge "304"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [header-guard])
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unused-const-variable])
fi
- #
+
dnl Only clang 3.5 or later
if test "$compiler_num" -ge "305"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [pragmas])
# CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unreachable-code-break]) # Not used: Silent in "unity" builds
fi
- #
+
dnl Only clang 3.6 or later
if test "$compiler_num" -ge "306"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [double-promotion])
fi
- #
+
dnl Only clang 3.9 or later
if test "$compiler_num" -ge "309"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [comma])
- # avoid the varargs warning, fixed in 4.0
- # https://bugs.llvm.org/show_bug.cgi?id=29140
+ dnl avoid the varargs warning, fixed in 4.0
+ dnl https://bugs.llvm.org/show_bug.cgi?id=29140
if test "$compiler_num" -lt "400"; then
tmp_CFLAGS="$tmp_CFLAGS -Wno-varargs"
fi
esac
fi
;;
- #
+
DEC_C)
- #
+
if test "$want_warnings" = "yes"; then
dnl Select a higher warning level than default level2
tmp_CFLAGS="$tmp_CFLAGS -msg_enable level3"
fi
;;
- #
+
GNU_C)
- #
+
dnl Leave disabled for GCC <4.6, because they lack #pragma features to silence locally.
if test "$want_warnings" = "yes" && test "$compiler_num" -ge "406"; then
- #
+
dnl Do not enable -pedantic when cross-compiling with a gcc older
dnl than 3.0, to avoid warnings from third party system headers.
if test "$cross_compiling" != "yes" ||
tmp_CFLAGS="$tmp_CFLAGS -pedantic"
fi
fi
- #
+
dnl Set of options we believe *ALL* gcc versions support:
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [all])
tmp_CFLAGS="$tmp_CFLAGS -W"
- #
+
dnl Only gcc 1.4 or later
if test "$compiler_num" -ge "104"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [pointer-arith write-strings])
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unused shadow])
fi
fi
- #
+
dnl Only gcc 2.7 or later
if test "$compiler_num" -ge "207"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [nested-externs])
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-prototypes])
fi
fi
- #
+
dnl Only gcc 2.95 or later
if test "$compiler_num" -ge "295"; then
tmp_CFLAGS="$tmp_CFLAGS -Wno-long-long"
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [bad-function-cast])
fi
- #
+
dnl Only gcc 2.96 or later
if test "$compiler_num" -ge "296"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [float-equal])
dnl headers with gcc 2.95.4 on FreeBSD 4.9
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [undef])
fi
- #
+
dnl Only gcc 3.0 or later
if test "$compiler_num" -ge "300"; then
dnl -Wunreachable-code seems totally unreliable on my gcc 3.3.2 on
dnl over making it unusable for generic purposes. Let's not use it.
tmp_CFLAGS="$tmp_CFLAGS"
fi
- #
+
dnl Only gcc 3.3 or later
if test "$compiler_num" -ge "303"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [endif-labels strict-prototypes])
fi
- #
+
dnl Only gcc 3.4 or later
if test "$compiler_num" -ge "304"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [declaration-after-statement])
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [old-style-definition])
fi
- #
+
dnl Only gcc 4.0 or later
if test "$compiler_num" -ge "400"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [cast-qual])
tmp_CFLAGS="$tmp_CFLAGS -Wstrict-aliasing=3"
fi
- #
+
dnl Only gcc 4.1 or later
if test "$compiler_num" -ge "401"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [attributes])
# CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unused-macros]) # Not practical
# tmp_CFLAGS="$tmp_CFLAGS -Wno-error=unused-macros"
fi
- #
+
dnl Only gcc 4.2 or later
if test "$compiler_num" -ge "402"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [cast-align])
fi
- #
+
dnl Only gcc 4.3 or later
if test "$compiler_num" -ge "403"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [address])
dnl required for -Warray-bounds, included in -Wall
tmp_CFLAGS="$tmp_CFLAGS -ftree-vrp"
fi
- #
+
dnl Only gcc 4.5 or later
if test "$compiler_num" -ge "405"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [jump-misses-init])
;;
esac
fi
- #
+
dnl Only gcc 4.6 or later
if test "$compiler_num" -ge "406"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [double-promotion])
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [trampolines])
fi
- #
+
dnl only gcc 4.8 or later
if test "$compiler_num" -ge "408"; then
tmp_CFLAGS="$tmp_CFLAGS -Wformat=2"
fi
- #
+
dnl Only gcc 5 or later
if test "$compiler_num" -ge "500"; then
tmp_CFLAGS="$tmp_CFLAGS -Warray-bounds=2"
tmp_CFLAGS="$tmp_CFLAGS -Wno-format-signedness"
fi
- #
+
dnl Only gcc 6 or later
if test "$compiler_num" -ge "600"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [shift-negative-value])
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [duplicated-cond])
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unused-const-variable])
fi
- #
+
dnl Only gcc 7 or later
if test "$compiler_num" -ge "700"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [duplicated-branches])
tmp_CFLAGS="$tmp_CFLAGS -Wformat-truncation=2"
tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough"
fi
- #
+
dnl Only gcc 10 or later
if test "$compiler_num" -ge "1000"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [arith-conversion])
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [enum-conversion])
fi
- #
+
dnl Only gcc 12 or later
if test "$compiler_num" -ge "1200"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [array-compare])
fi
- #
+
dnl Only gcc 13 or later
if test "$compiler_num" -ge "1300"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [enum-int-mismatch])
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [xor-used-as-pow])
fi
- #
+
dnl Only gcc 15 or later
if test "$compiler_num" -ge "1500"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [leading-whitespace=spaces])
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [trailing-whitespace=any])
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unterminated-string-initialization])
fi
- #
fi
- #
+
dnl Do not issue warnings for code in system include paths.
if test "$compiler_num" -ge "300"; then
tmp_CFLAGS="$tmp_CFLAGS -Wno-system-headers"
tmp_CFLAGS="$tmp_CFLAGS -Wno-conversion"
fi
;;
- #
+
HP_UX_C)
- #
+
if test "$want_warnings" = "yes"; then
dnl Issue all warnings
tmp_CFLAGS="$tmp_CFLAGS +w1"
fi
;;
- #
+
IBM_C)
- #
+
dnl Placeholder
tmp_CFLAGS="$tmp_CFLAGS"
;;
- #
+
INTEL_UNIX_C)
- #
+
if test "$want_warnings" = "yes"; then
if test "$compiler_num" -gt "600"; then
dnl Show errors, warnings, and remarks
dnl Value-safe optimizations on floating-point data
tmp_CFLAGS="$tmp_CFLAGS -fp-model precise"
;;
- #
+
INTEL_WINDOWS_C)
- #
+
dnl Placeholder
tmp_CFLAGS="$tmp_CFLAGS"
;;
- #
+
SGI_MIPS_C)
- #
+
if test "$want_warnings" = "yes"; then
dnl Perform stricter semantic and lint-like checks
tmp_CFLAGS="$tmp_CFLAGS -fullwarn"
fi
;;
- #
+
SGI_MIPSPRO_C)
- #
+
if test "$want_warnings" = "yes"; then
dnl Perform stricter semantic and lint-like checks
tmp_CFLAGS="$tmp_CFLAGS -fullwarn"
tmp_CFLAGS="$tmp_CFLAGS -woff 1209"
fi
;;
- #
+
SUNPRO_C)
- #
+
if test "$want_warnings" = "yes"; then
dnl Perform stricter semantic and lint-like checks
tmp_CFLAGS="$tmp_CFLAGS -v"
fi
;;
- #
+
TINY_C)
- #
+
if test "$want_warnings" = "yes"; then
dnl Activate all warnings
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [all])
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unsupported])
fi
;;
- #
+
esac
- #
+
squeeze tmp_CPPFLAGS
squeeze tmp_CFLAGS
- #
+
if test -n "$tmp_CFLAGS" || test -n "$tmp_CPPFLAGS"; then
AC_MSG_CHECKING([if compiler accepts strict warning options])
CPPFLAGS="$tmp_save_CPPFLAGS $tmp_CPPFLAGS"
CFLAGS="$tmp_save_CFLAGS"
])
fi
- #
fi
])
dnl type for a constant array with negative dimension.
AC_DEFUN([CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE], [
- AC_REQUIRE([CURL_CHECK_COMPILER_HALT_ON_ERROR])dnl
+ AC_REQUIRE([CURL_CHECK_COMPILER_HALT_ON_ERROR])
AC_MSG_CHECKING([if compiler halts on negative sized arrays])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
dnl type definition of a constant array.
AC_DEFUN([CURL_CHECK_COMPILER_STRUCT_MEMBER_SIZE], [
- AC_REQUIRE([CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE])dnl
+ AC_REQUIRE([CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE])
AC_MSG_CHECKING([if compiler struct member size checking works])
tst_compiler_check_one_works="unknown"
AC_COMPILE_IFELSE([
dnl variables symbol_hiding_CFLAGS and symbol_hiding_EXTERN when supported.
AC_DEFUN([CURL_CHECK_COMPILER_SYMBOL_HIDING], [
- AC_REQUIRE([CURL_CHECK_COMPILER])dnl
- AC_BEFORE([$0],[CURL_CONFIGURE_SYMBOL_HIDING])dnl
+ AC_REQUIRE([CURL_CHECK_COMPILER])
+ AC_BEFORE([$0],[CURL_CONFIGURE_SYMBOL_HIDING])
AC_MSG_CHECKING([if compiler supports hiding library internal symbols])
supports_symbol_hiding="no"
symbol_hiding_CFLAGS=""
dnl a prototype which does not match previous one.
AC_DEFUN([CURL_CHECK_COMPILER_PROTOTYPE_MISMATCH], [
- AC_REQUIRE([CURL_CHECK_COMPILER_HALT_ON_ERROR])dnl
+ AC_REQUIRE([CURL_CHECK_COMPILER_HALT_ON_ERROR])
AC_MSG_CHECKING([if compiler halts on function prototype mismatch])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
dnl from VALUE is removed from VARNAME when present.
AC_DEFUN([CURL_VAR_STRIP], [
- AC_REQUIRE([CURL_SHFUNC_SQUEEZE])dnl
+ AC_REQUIRE([CURL_SHFUNC_SQUEEZE])
ac_var_stripped=""
for word1 in $[$1]; do
ac_var_strip_word="no"
dnl been disabled via CFLAGS to WARNING-LIST.
AC_DEFUN([CURL_ADD_COMPILER_WARNINGS], [
- AC_REQUIRE([CURL_SHFUNC_SQUEEZE])dnl
+ AC_REQUIRE([CURL_SHFUNC_SQUEEZE])
ac_var_added_warnings=""
for warning in [$2]; do
CURL_VAR_MATCH(CFLAGS, [-Wno-$warning -W$warning])
#
#***************************************************************************
-# File version for 'aclocal' use. Keep it a single number.
-# serial 19
+dnl File version for 'aclocal' use. Keep it a single number.
+dnl serial 19
dnl CURL_CHECK_OPTION_THREADED_RESOLVER
dnl -------------------------------------------------
dnl set shell variable want_ares as appropriate.
AC_DEFUN([CURL_CHECK_OPTION_ARES], [
- AC_BEFORE([$0],[CURL_CHECK_LIB_ARES])dnl
+ AC_BEFORE([$0],[CURL_CHECK_LIB_ARES])
AC_MSG_CHECKING([whether to enable c-ares for DNS lookups])
OPT_ARES="default"
AC_ARG_ENABLE(ares,
dnl variable want_debug value as appropriate.
AC_DEFUN([CURL_CHECK_OPTION_DEBUG], [
- AC_BEFORE([$0],[CURL_CHECK_OPTION_WARNINGS])dnl
- AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl
+ AC_BEFORE([$0],[CURL_CHECK_OPTION_WARNINGS])
+ AC_BEFORE([$0],[XC_CHECK_PROG_CC])
AC_MSG_CHECKING([whether to enable debug build options])
OPT_DEBUG_BUILD="default"
AC_ARG_ENABLE(debug,
dnl shell variable want_optimize value as appropriate.
AC_DEFUN([CURL_CHECK_OPTION_OPTIMIZE], [
- AC_REQUIRE([CURL_CHECK_OPTION_DEBUG])dnl
- AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl
+ AC_REQUIRE([CURL_CHECK_OPTION_DEBUG])
+ AC_BEFORE([$0],[XC_CHECK_PROG_CC])
AC_MSG_CHECKING([whether to enable compiler optimizer])
OPT_COMPILER_OPTIMIZE="default"
AC_ARG_ENABLE(optimize,
dnl setting shell variable want_symbol_hiding value.
AC_DEFUN([CURL_CHECK_OPTION_SYMBOL_HIDING], [
- AC_BEFORE([$0],[CURL_CHECK_COMPILER_SYMBOL_HIDING])dnl
+ AC_BEFORE([$0],[CURL_CHECK_COMPILER_SYMBOL_HIDING])
AC_MSG_CHECKING([whether to enable hiding of library internal symbols])
OPT_SYMBOL_HIDING="default"
AC_ARG_ENABLE(symbol-hiding,
dnl as appropriate.
AC_DEFUN([CURL_CHECK_OPTION_RT], [
- AC_BEFORE([$0], [CURL_CHECK_LIB_THREADS])dnl
+ AC_BEFORE([$0], [CURL_CHECK_LIB_THREADS])
AC_MSG_CHECKING([whether to disable dependency on -lrt])
OPT_RT="default"
AC_ARG_ENABLE(rt,
dnl shell variable want_warnings as appropriate.
AC_DEFUN([CURL_CHECK_OPTION_WARNINGS], [
- AC_REQUIRE([CURL_CHECK_OPTION_DEBUG])dnl
- AC_BEFORE([$0],[CURL_CHECK_OPTION_WERROR])dnl
- AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl
+ AC_REQUIRE([CURL_CHECK_OPTION_DEBUG])
+ AC_BEFORE([$0],[CURL_CHECK_OPTION_WERROR])
+ AC_BEFORE([$0],[XC_CHECK_PROG_CC])
AC_MSG_CHECKING([whether to enable strict compiler warnings])
OPT_COMPILER_WARNINGS="default"
AC_ARG_ENABLE(warnings,
dnl shell variable want_werror as appropriate.
AC_DEFUN([CURL_CHECK_OPTION_WERROR], [
- AC_BEFORE([$0],[CURL_CHECK_COMPILER])dnl
+ AC_BEFORE([$0],[CURL_CHECK_COMPILER])
AC_MSG_CHECKING([whether to enable compiler warnings as errors])
OPT_COMPILER_WERROR="default"
AC_ARG_ENABLE(werror,
dnl Check for how to set a socket into non-blocking state.
AC_DEFUN([CURL_CHECK_NONBLOCKING_SOCKET], [
- AC_REQUIRE([CURL_CHECK_FUNC_FCNTL])dnl
- AC_REQUIRE([CURL_CHECK_FUNC_IOCTLSOCKET])dnl
- AC_REQUIRE([CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL])dnl
- #
+ AC_REQUIRE([CURL_CHECK_FUNC_FCNTL])
+ AC_REQUIRE([CURL_CHECK_FUNC_IOCTLSOCKET])
+ AC_REQUIRE([CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL])
+
tst_method="unknown"
AC_MSG_CHECKING([how to set a socket into non-blocking mode])
dnl and adjustments needed to enable support of this library.
AC_DEFUN([CURL_CHECK_LIB_ARES], [
- #
+
if test "$want_ares" = "yes"; then
dnl c-ares library support has been requested
clean_CPPFLAGS="$CPPFLAGS"
ares_LIBS="-lcares"
fi
fi
- #
+
CPPFLAGS="$clean_CPPFLAGS $ares_CPPFLAGS"
LDFLAGS="$clean_LDFLAGS $ares_LDFLAGS"
LDFLAGSPC="$clean_LDFLAGSPC $ares_LDFLAGS"
LIBS="$ares_LIBS $clean_LIBS"
- #
dnl check if c-ares new enough, 1.16.0 or newer
AC_CHECK_FUNC([ares_getaddrinfo],
LDFLAGS="$clean_LDFLAGS"
LDFLAGSPC="$clean_LDFLAGSPC"
LIBS="$clean_LIBS"
- # prevent usage
+ dnl prevent usage
want_ares="no"
])
#
#***************************************************************************
-# File version for 'aclocal' use. Keep it a single number.
-# serial 73
-
+dnl File version for 'aclocal' use. Keep it a single number.
+dnl serial 73
dnl CURL_INCLUDES_ARPA_INET
dnl -------------------------------------------------
dnl HAVE_ALARM will be defined.
AC_DEFUN([CURL_CHECK_FUNC_ALARM], [
- AC_REQUIRE([CURL_INCLUDES_UNISTD])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_UNISTD])
+
tst_links_alarm="unknown"
tst_proto_alarm="unknown"
tst_compi_alarm="unknown"
tst_allow_alarm="unknown"
- #
+
AC_MSG_CHECKING([if alarm can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([alarm])
AC_MSG_RESULT([no])
tst_links_alarm="no"
])
- #
+
if test "$tst_links_alarm" = "yes"; then
AC_MSG_CHECKING([if alarm is prototyped])
AC_EGREP_CPP([alarm],[
tst_proto_alarm="no"
])
fi
- #
+
if test "$tst_proto_alarm" = "yes"; then
AC_MSG_CHECKING([if alarm is compilable])
AC_COMPILE_IFELSE([
tst_compi_alarm="no"
])
fi
- #
+
if test "$tst_compi_alarm" = "yes"; then
AC_MSG_CHECKING([if alarm usage allowed])
if test "x$curl_disallow_alarm" != "xyes"; then
tst_allow_alarm="no"
fi
fi
- #
+
AC_MSG_CHECKING([if alarm might be used])
if test "$tst_links_alarm" = "yes" &&
test "$tst_proto_alarm" = "yes" &&
dnl HAVE_BASENAME will be defined.
AC_DEFUN([CURL_CHECK_FUNC_BASENAME], [
- AC_REQUIRE([CURL_INCLUDES_STRING])dnl
- AC_REQUIRE([CURL_INCLUDES_LIBGEN])dnl
- AC_REQUIRE([CURL_INCLUDES_UNISTD])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_STRING])
+ AC_REQUIRE([CURL_INCLUDES_LIBGEN])
+ AC_REQUIRE([CURL_INCLUDES_UNISTD])
+
tst_links_basename="unknown"
tst_proto_basename="unknown"
tst_compi_basename="unknown"
tst_allow_basename="unknown"
- #
+
AC_MSG_CHECKING([if basename can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([basename])
AC_MSG_RESULT([no])
tst_links_basename="no"
])
- #
+
if test "$tst_links_basename" = "yes"; then
AC_MSG_CHECKING([if basename is prototyped])
AC_EGREP_CPP([basename],[
tst_proto_basename="no"
])
fi
- #
+
if test "$tst_proto_basename" = "yes"; then
AC_MSG_CHECKING([if basename is compilable])
AC_COMPILE_IFELSE([
tst_compi_basename="no"
])
fi
- #
+
if test "$tst_compi_basename" = "yes"; then
AC_MSG_CHECKING([if basename usage allowed])
if test "x$curl_disallow_basename" != "xyes"; then
tst_allow_basename="no"
fi
fi
- #
+
AC_MSG_CHECKING([if basename might be used])
if test "$tst_links_basename" = "yes" &&
test "$tst_proto_basename" = "yes" &&
dnl HAVE_CLOSESOCKET will be defined.
AC_DEFUN([CURL_CHECK_FUNC_CLOSESOCKET], [
- AC_REQUIRE([CURL_INCLUDES_WINSOCK2])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_WINSOCK2])
+
tst_links_closesocket="unknown"
tst_proto_closesocket="unknown"
tst_compi_closesocket="unknown"
tst_allow_closesocket="unknown"
- #
+
AC_MSG_CHECKING([if closesocket can be linked])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
AC_MSG_RESULT([no])
tst_links_closesocket="no"
])
- #
+
if test "$tst_links_closesocket" = "yes"; then
AC_MSG_CHECKING([if closesocket is prototyped])
AC_EGREP_CPP([closesocket],[
tst_proto_closesocket="no"
])
fi
- #
+
if test "$tst_proto_closesocket" = "yes"; then
AC_MSG_CHECKING([if closesocket is compilable])
AC_COMPILE_IFELSE([
tst_compi_closesocket="no"
])
fi
- #
+
if test "$tst_compi_closesocket" = "yes"; then
AC_MSG_CHECKING([if closesocket usage allowed])
if test "x$curl_disallow_closesocket" != "xyes"; then
tst_allow_closesocket="no"
fi
fi
- #
+
AC_MSG_CHECKING([if closesocket might be used])
if test "$tst_links_closesocket" = "yes" &&
test "$tst_proto_closesocket" = "yes" &&
dnl then HAVE_CLOSESOCKET_CAMEL will be defined.
AC_DEFUN([CURL_CHECK_FUNC_CLOSESOCKET_CAMEL], [
- AC_REQUIRE([CURL_INCLUDES_SYS_SOCKET])dnl
- AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_SYS_SOCKET])
+ AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])
+
tst_links_closesocket_camel="unknown"
tst_compi_closesocket_camel="unknown"
tst_allow_closesocket_camel="unknown"
- #
+
AC_MSG_CHECKING([if CloseSocket can be linked])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
AC_MSG_RESULT([no])
tst_links_closesocket_camel="no"
])
- #
+
if test "$tst_links_closesocket_camel" = "yes"; then
AC_MSG_CHECKING([if CloseSocket is compilable])
AC_COMPILE_IFELSE([
tst_compi_closesocket_camel="no"
])
fi
- #
+
if test "$tst_compi_closesocket_camel" = "yes"; then
AC_MSG_CHECKING([if CloseSocket usage allowed])
if test "x$curl_disallow_closesocket_camel" != "xyes"; then
tst_allow_closesocket_camel="no"
fi
fi
- #
+
AC_MSG_CHECKING([if CloseSocket might be used])
if test "$tst_links_closesocket_camel" = "yes" &&
test "$tst_compi_closesocket_camel" = "yes" &&
dnl HAVE_FCNTL will be defined.
AC_DEFUN([CURL_CHECK_FUNC_FCNTL], [
- AC_REQUIRE([CURL_INCLUDES_FCNTL])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_FCNTL])
+
tst_links_fcntl="unknown"
tst_proto_fcntl="unknown"
tst_compi_fcntl="unknown"
tst_allow_fcntl="unknown"
- #
+
AC_MSG_CHECKING([if fcntl can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([fcntl])
AC_MSG_RESULT([no])
tst_links_fcntl="no"
])
- #
+
if test "$tst_links_fcntl" = "yes"; then
AC_MSG_CHECKING([if fcntl is prototyped])
AC_EGREP_CPP([fcntl],[
tst_proto_fcntl="no"
])
fi
- #
+
if test "$tst_proto_fcntl" = "yes"; then
AC_MSG_CHECKING([if fcntl is compilable])
AC_COMPILE_IFELSE([
tst_compi_fcntl="no"
])
fi
- #
+
if test "$tst_compi_fcntl" = "yes"; then
AC_MSG_CHECKING([if fcntl usage allowed])
if test "x$curl_disallow_fcntl" != "xyes"; then
tst_allow_fcntl="no"
fi
fi
- #
+
AC_MSG_CHECKING([if fcntl might be used])
if test "$tst_links_fcntl" = "yes" &&
test "$tst_proto_fcntl" = "yes" &&
dnl will be defined.
AC_DEFUN([CURL_CHECK_FUNC_FCNTL_O_NONBLOCK], [
- #
+
tst_compi_fcntl_o_nonblock="unknown"
tst_allow_fcntl_o_nonblock="unknown"
- #
+
case $host_os in
sunos4* | aix3*)
dnl O_NONBLOCK does not work on these platforms
curl_disallow_fcntl_o_nonblock="yes"
;;
esac
- #
+
if test "$curl_cv_func_fcntl" = "yes"; then
AC_MSG_CHECKING([if fcntl O_NONBLOCK is compilable])
AC_COMPILE_IFELSE([
tst_compi_fcntl_o_nonblock="no"
])
fi
- #
+
if test "$tst_compi_fcntl_o_nonblock" = "yes"; then
AC_MSG_CHECKING([if fcntl O_NONBLOCK usage allowed])
if test "x$curl_disallow_fcntl_o_nonblock" != "xyes"; then
tst_allow_fcntl_o_nonblock="no"
fi
fi
- #
+
AC_MSG_CHECKING([if fcntl O_NONBLOCK might be used])
if test "$tst_compi_fcntl_o_nonblock" = "yes" &&
test "$tst_allow_fcntl_o_nonblock" = "yes"; then
dnl HAVE_FREEADDRINFO will be defined.
AC_DEFUN([CURL_CHECK_FUNC_FREEADDRINFO], [
- AC_REQUIRE([CURL_INCLUDES_WS2TCPIP])dnl
- AC_REQUIRE([CURL_INCLUDES_SYS_SOCKET])dnl
- AC_REQUIRE([CURL_INCLUDES_NETDB])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_WS2TCPIP])
+ AC_REQUIRE([CURL_INCLUDES_SYS_SOCKET])
+ AC_REQUIRE([CURL_INCLUDES_NETDB])
+
tst_links_freeaddrinfo="unknown"
tst_proto_freeaddrinfo="unknown"
tst_compi_freeaddrinfo="unknown"
tst_allow_freeaddrinfo="unknown"
- #
+
AC_MSG_CHECKING([if freeaddrinfo can be linked])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
AC_MSG_RESULT([no])
tst_links_freeaddrinfo="no"
])
- #
+
if test "$tst_links_freeaddrinfo" = "yes"; then
AC_MSG_CHECKING([if freeaddrinfo is prototyped])
AC_EGREP_CPP([freeaddrinfo],[
tst_proto_freeaddrinfo="no"
])
fi
- #
+
if test "$tst_proto_freeaddrinfo" = "yes"; then
AC_MSG_CHECKING([if freeaddrinfo is compilable])
AC_COMPILE_IFELSE([
tst_compi_freeaddrinfo="no"
])
fi
- #
+
if test "$tst_compi_freeaddrinfo" = "yes"; then
AC_MSG_CHECKING([if freeaddrinfo usage allowed])
if test "x$curl_disallow_freeaddrinfo" != "xyes"; then
tst_allow_freeaddrinfo="no"
fi
fi
- #
+
AC_MSG_CHECKING([if freeaddrinfo might be used])
if test "$tst_links_freeaddrinfo" = "yes" &&
test "$tst_proto_freeaddrinfo" = "yes" &&
dnl HAVE_FSETXATTR will be defined.
AC_DEFUN([CURL_CHECK_FUNC_FSETXATTR], [
- AC_REQUIRE([CURL_INCLUDES_SYS_XATTR])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_SYS_XATTR])
+
tst_links_fsetxattr="unknown"
tst_proto_fsetxattr="unknown"
tst_compi_fsetxattr="unknown"
tst_allow_fsetxattr="unknown"
tst_nargs_fsetxattr="unknown"
- #
+
AC_MSG_CHECKING([if fsetxattr can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([fsetxattr])
AC_MSG_RESULT([no])
tst_links_fsetxattr="no"
])
- #
+
if test "$tst_links_fsetxattr" = "yes"; then
AC_MSG_CHECKING([if fsetxattr is prototyped])
AC_EGREP_CPP([fsetxattr],[
tst_proto_fsetxattr="no"
])
fi
- #
+
if test "$tst_proto_fsetxattr" = "yes"; then
if test "$tst_nargs_fsetxattr" = "unknown"; then
AC_MSG_CHECKING([if fsetxattr takes 5 args.])
AC_MSG_RESULT([no])
fi
fi
- #
+
if test "$tst_compi_fsetxattr" = "yes"; then
AC_MSG_CHECKING([if fsetxattr usage allowed])
if test "x$curl_disallow_fsetxattr" != "xyes"; then
tst_allow_fsetxattr="no"
fi
fi
- #
+
AC_MSG_CHECKING([if fsetxattr might be used])
if test "$tst_links_fsetxattr" = "yes" &&
test "$tst_proto_fsetxattr" = "yes" &&
[Define to 1 if you have the fsetxattr function.])
dnl AC_DEFINE_UNQUOTED(FSETXATTR_ARGS, $tst_nargs_fsetxattr,
dnl [Specifies the number of arguments to fsetxattr])
- #
+
if test "$tst_nargs_fsetxattr" -eq "5"; then
AC_DEFINE(HAVE_FSETXATTR_5, 1, [fsetxattr() takes 5 args])
elif test "$tst_nargs_fsetxattr" -eq "6"; then
AC_DEFINE(HAVE_FSETXATTR_6, 1, [fsetxattr() takes 6 args])
fi
- #
+
curl_cv_func_fsetxattr="yes"
else
AC_MSG_RESULT([no])
dnl defining HAVE_GETADDRINFO_THREADSAFE when true.
AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
- AC_REQUIRE([CURL_INCLUDES_WS2TCPIP])dnl
- AC_REQUIRE([CURL_INCLUDES_STDLIB])dnl
- AC_REQUIRE([CURL_INCLUDES_STRING])dnl
- AC_REQUIRE([CURL_INCLUDES_SYS_SOCKET])dnl
- AC_REQUIRE([CURL_INCLUDES_NETDB])dnl
- AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_WS2TCPIP])
+ AC_REQUIRE([CURL_INCLUDES_STDLIB])
+ AC_REQUIRE([CURL_INCLUDES_STRING])
+ AC_REQUIRE([CURL_INCLUDES_SYS_SOCKET])
+ AC_REQUIRE([CURL_INCLUDES_NETDB])
+ AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])
+
tst_links_getaddrinfo="unknown"
tst_proto_getaddrinfo="unknown"
tst_compi_getaddrinfo="unknown"
tst_works_getaddrinfo="unknown"
tst_allow_getaddrinfo="unknown"
tst_tsafe_getaddrinfo="unknown"
- #
+
AC_MSG_CHECKING([if getaddrinfo can be linked])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
AC_MSG_RESULT([no])
tst_links_getaddrinfo="no"
])
- #
+
if test "$tst_links_getaddrinfo" = "yes"; then
AC_MSG_CHECKING([if getaddrinfo is prototyped])
AC_EGREP_CPP([getaddrinfo],[
tst_proto_getaddrinfo="no"
])
fi
- #
+
if test "$tst_proto_getaddrinfo" = "yes"; then
AC_MSG_CHECKING([if getaddrinfo is compilable])
AC_COMPILE_IFELSE([
tst_compi_getaddrinfo="no"
])
fi
- #
+
dnl only do runtime verification when not cross-compiling
if test "$cross_compiling" != "yes" &&
test "$tst_compi_getaddrinfo" = "yes"; then
tst_works_getaddrinfo="no"
])
fi
- #
+
if test "$tst_compi_getaddrinfo" = "yes" &&
test "$tst_works_getaddrinfo" != "no"; then
AC_MSG_CHECKING([if getaddrinfo usage allowed])
tst_allow_getaddrinfo="no"
fi
fi
- #
+
AC_MSG_CHECKING([if getaddrinfo might be used])
if test "$tst_proto_getaddrinfo" = "yes" &&
test "$tst_compi_getaddrinfo" = "yes" &&
curl_cv_func_getaddrinfo="no"
curl_cv_func_getaddrinfo_threadsafe="no"
fi
- #
+
if test "$curl_cv_func_getaddrinfo" = "yes"; then
AC_MSG_CHECKING([if getaddrinfo is thread-safe])
if test "$curl_cv_apple" = "yes"; then
dnl HAVE_GETHOSTBYNAME_R will be defined.
AC_DEFUN([CURL_CHECK_FUNC_GETHOSTBYNAME_R], [
- AC_REQUIRE([CURL_INCLUDES_NETDB])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_NETDB])
+
tst_links_gethostbyname_r="unknown"
tst_proto_gethostbyname_r="unknown"
tst_compi_gethostbyname_r="unknown"
tst_allow_gethostbyname_r="unknown"
tst_nargs_gethostbyname_r="unknown"
- #
+
AC_MSG_CHECKING([if gethostbyname_r can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([gethostbyname_r])
AC_MSG_RESULT([no])
tst_links_gethostbyname_r="no"
])
- #
+
if test "$tst_links_gethostbyname_r" = "yes"; then
AC_MSG_CHECKING([if gethostbyname_r is prototyped])
AC_EGREP_CPP([gethostbyname_r],[
tst_proto_gethostbyname_r="no"
])
fi
- #
+
if test "$tst_proto_gethostbyname_r" = "yes"; then
if test "$tst_nargs_gethostbyname_r" = "unknown"; then
AC_MSG_CHECKING([if gethostbyname_r takes 3 args.])
AC_MSG_RESULT([no])
fi
fi
- #
+
if test "$tst_compi_gethostbyname_r" = "yes"; then
AC_MSG_CHECKING([if gethostbyname_r usage allowed])
if test "x$curl_disallow_gethostbyname_r" != "xyes"; then
tst_allow_gethostbyname_r="no"
fi
fi
- #
+
AC_MSG_CHECKING([if gethostbyname_r might be used])
if test "$tst_links_gethostbyname_r" = "yes" &&
test "$tst_proto_gethostbyname_r" = "yes" &&
[Define to 1 if you have the gethostbyname_r function.])
dnl AC_DEFINE_UNQUOTED(GETHOSTBYNAME_R_ARGS, $tst_nargs_gethostbyname_r,
dnl [Specifies the number of arguments to gethostbyname_r])
- #
+
if test "$tst_nargs_gethostbyname_r" -eq "3"; then
AC_DEFINE(HAVE_GETHOSTBYNAME_R_3, 1, [gethostbyname_r() takes 3 args])
elif test "$tst_nargs_gethostbyname_r" -eq "5"; then
elif test "$tst_nargs_gethostbyname_r" -eq "6"; then
AC_DEFINE(HAVE_GETHOSTBYNAME_R_6, 1, [gethostbyname_r() takes 6 args])
fi
- #
+
curl_cv_func_gethostbyname_r="yes"
else
AC_MSG_RESULT([no])
dnl HAVE_GETHOSTNAME will be defined.
AC_DEFUN([CURL_CHECK_FUNC_GETHOSTNAME], [
- AC_REQUIRE([CURL_INCLUDES_WINSOCK2])dnl
- AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])dnl
- AC_REQUIRE([CURL_INCLUDES_UNISTD])dnl
- AC_REQUIRE([CURL_PREPROCESS_CALLCONV])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_WINSOCK2])
+ AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])
+ AC_REQUIRE([CURL_INCLUDES_UNISTD])
+ AC_REQUIRE([CURL_PREPROCESS_CALLCONV])
+
tst_links_gethostname="unknown"
tst_proto_gethostname="unknown"
tst_compi_gethostname="unknown"
tst_allow_gethostname="unknown"
- #
+
AC_MSG_CHECKING([if gethostname can be linked])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
AC_MSG_RESULT([no])
tst_links_gethostname="no"
])
- #
+
if test "$tst_links_gethostname" = "yes"; then
AC_MSG_CHECKING([if gethostname is prototyped])
AC_EGREP_CPP([gethostname],[
tst_proto_gethostname="no"
])
fi
- #
+
if test "$tst_proto_gethostname" = "yes"; then
AC_MSG_CHECKING([if gethostname is compilable])
AC_COMPILE_IFELSE([
tst_compi_gethostname="no"
])
fi
- #
+
if test "$tst_compi_gethostname" = "yes"; then
AC_MSG_CHECKING([for gethostname arg 2 data type])
tst_gethostname_type_arg2="unknown"
[Define to the type of arg 2 for gethostname.])
fi
fi
- #
+
if test "$tst_compi_gethostname" = "yes"; then
AC_MSG_CHECKING([if gethostname usage allowed])
if test "x$curl_disallow_gethostname" != "xyes"; then
tst_allow_gethostname="no"
fi
fi
- #
+
AC_MSG_CHECKING([if gethostname might be used])
if test "$tst_links_gethostname" = "yes" &&
test "$tst_proto_gethostname" = "yes" &&
dnl HAVE_GETPEERNAME will be defined.
AC_DEFUN([CURL_CHECK_FUNC_GETPEERNAME], [
- AC_REQUIRE([CURL_INCLUDES_WINSOCK2])dnl
- AC_REQUIRE([CURL_INCLUDES_UNISTD])dnl
- AC_REQUIRE([CURL_PREPROCESS_CALLCONV])dnl
- AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_WINSOCK2])
+ AC_REQUIRE([CURL_INCLUDES_UNISTD])
+ AC_REQUIRE([CURL_PREPROCESS_CALLCONV])
+ AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])
+
tst_links_getpeername="unknown"
tst_proto_getpeername="unknown"
tst_compi_getpeername="unknown"
tst_allow_getpeername="unknown"
- #
+
AC_MSG_CHECKING([if getpeername can be linked])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
AC_MSG_RESULT([no])
tst_links_getpeername="no"
])
- #
+
if test "$tst_links_getpeername" = "yes"; then
AC_MSG_CHECKING([if getpeername is prototyped])
AC_EGREP_CPP([getpeername],[
tst_proto_getpeername="no"
])
fi
- #
+
if test "$tst_proto_getpeername" = "yes"; then
AC_MSG_CHECKING([if getpeername is compilable])
AC_COMPILE_IFELSE([
tst_compi_getpeername="no"
])
fi
- #
+
if test "$tst_compi_getpeername" = "yes"; then
AC_MSG_CHECKING([if getpeername usage allowed])
if test "x$curl_disallow_getpeername" != "xyes"; then
tst_allow_getpeername="no"
fi
fi
- #
+
AC_MSG_CHECKING([if getpeername might be used])
if test "$tst_links_getpeername" = "yes" &&
test "$tst_proto_getpeername" = "yes" &&
dnl HAVE_GETSOCKNAME will be defined.
AC_DEFUN([CURL_CHECK_FUNC_GETSOCKNAME], [
- AC_REQUIRE([CURL_INCLUDES_WINSOCK2])dnl
- AC_REQUIRE([CURL_INCLUDES_UNISTD])dnl
- AC_REQUIRE([CURL_PREPROCESS_CALLCONV])dnl
- AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_WINSOCK2])
+ AC_REQUIRE([CURL_INCLUDES_UNISTD])
+ AC_REQUIRE([CURL_PREPROCESS_CALLCONV])
+ AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])
+
tst_links_getsockname="unknown"
tst_proto_getsockname="unknown"
tst_compi_getsockname="unknown"
tst_allow_getsockname="unknown"
- #
+
AC_MSG_CHECKING([if getsockname can be linked])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
AC_MSG_RESULT([no])
tst_links_getsockname="no"
])
- #
+
if test "$tst_links_getsockname" = "yes"; then
AC_MSG_CHECKING([if getsockname is prototyped])
AC_EGREP_CPP([getsockname],[
tst_proto_getsockname="no"
])
fi
- #
+
if test "$tst_proto_getsockname" = "yes"; then
AC_MSG_CHECKING([if getsockname is compilable])
AC_COMPILE_IFELSE([
tst_compi_getsockname="no"
])
fi
- #
+
if test "$tst_compi_getsockname" = "yes"; then
AC_MSG_CHECKING([if getsockname usage allowed])
if test "x$curl_disallow_getsockname" != "xyes"; then
tst_allow_getsockname="no"
fi
fi
- #
+
AC_MSG_CHECKING([if getsockname might be used])
if test "$tst_links_getsockname" = "yes" &&
test "$tst_proto_getsockname" = "yes" &&
dnl HAVE_GETIFADDRS will be defined.
AC_DEFUN([CURL_CHECK_FUNC_GETIFADDRS], [
- AC_REQUIRE([CURL_INCLUDES_STDLIB])dnl
- AC_REQUIRE([CURL_INCLUDES_IFADDRS])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_STDLIB])
+ AC_REQUIRE([CURL_INCLUDES_IFADDRS])
+
tst_links_getifaddrs="unknown"
tst_proto_getifaddrs="unknown"
tst_compi_getifaddrs="unknown"
tst_works_getifaddrs="unknown"
tst_allow_getifaddrs="unknown"
- #
+
AC_MSG_CHECKING([if getifaddrs can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([getifaddrs])
AC_MSG_RESULT([no])
tst_links_getifaddrs="no"
])
- #
+
if test "$tst_links_getifaddrs" = "yes"; then
AC_MSG_CHECKING([if getifaddrs is prototyped])
AC_EGREP_CPP([getifaddrs],[
tst_proto_getifaddrs="no"
])
fi
- #
+
if test "$tst_proto_getifaddrs" = "yes"; then
AC_MSG_CHECKING([if getifaddrs is compilable])
AC_COMPILE_IFELSE([
tst_compi_getifaddrs="no"
])
fi
- #
+
dnl only do runtime verification when not cross-compiling
if test "$cross_compiling" != "yes" &&
test "$tst_compi_getifaddrs" = "yes"; then
tst_works_getifaddrs="no"
])
fi
- #
+
if test "$tst_compi_getifaddrs" = "yes" &&
test "$tst_works_getifaddrs" != "no"; then
AC_MSG_CHECKING([if getifaddrs usage allowed])
tst_allow_getifaddrs="no"
fi
fi
- #
+
AC_MSG_CHECKING([if getifaddrs might be used])
if test "$tst_links_getifaddrs" = "yes" &&
test "$tst_proto_getifaddrs" = "yes" &&
dnl HAVE_GMTIME_R will be defined.
AC_DEFUN([CURL_CHECK_FUNC_GMTIME_R], [
- AC_REQUIRE([CURL_INCLUDES_STDLIB])dnl
- AC_REQUIRE([CURL_INCLUDES_TIME])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_STDLIB])
+ AC_REQUIRE([CURL_INCLUDES_TIME])
+
tst_links_gmtime_r="unknown"
tst_proto_gmtime_r="unknown"
tst_compi_gmtime_r="unknown"
tst_works_gmtime_r="unknown"
tst_allow_gmtime_r="unknown"
- #
+
AC_MSG_CHECKING([if gmtime_r can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([gmtime_r])
AC_MSG_RESULT([no])
tst_links_gmtime_r="no"
])
- #
+
if test "$tst_links_gmtime_r" = "yes"; then
AC_MSG_CHECKING([if gmtime_r is prototyped])
AC_EGREP_CPP([gmtime_r],[
tst_proto_gmtime_r="no"
])
fi
- #
+
if test "$tst_proto_gmtime_r" = "yes"; then
AC_MSG_CHECKING([if gmtime_r is compilable])
AC_COMPILE_IFELSE([
tst_compi_gmtime_r="no"
])
fi
- #
+
dnl only do runtime verification when not cross-compiling
if test "$cross_compiling" != "yes" &&
test "$tst_compi_gmtime_r" = "yes"; then
tst_works_gmtime_r="no"
])
fi
- #
+
if test "$tst_compi_gmtime_r" = "yes" &&
test "$tst_works_gmtime_r" != "no"; then
AC_MSG_CHECKING([if gmtime_r usage allowed])
tst_allow_gmtime_r="no"
fi
fi
- #
+
AC_MSG_CHECKING([if gmtime_r might be used])
if test "$tst_links_gmtime_r" = "yes" &&
test "$tst_proto_gmtime_r" = "yes" &&
dnl HAVE_LOCALTIME_R will be defined.
AC_DEFUN([CURL_CHECK_FUNC_LOCALTIME_R], [
- AC_REQUIRE([CURL_INCLUDES_STDLIB])dnl
- AC_REQUIRE([CURL_INCLUDES_TIME])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_STDLIB])
+ AC_REQUIRE([CURL_INCLUDES_TIME])
+
tst_links_localtime_r="unknown"
tst_proto_localtime_r="unknown"
tst_compi_localtime_r="unknown"
tst_works_localtime_r="unknown"
tst_allow_localtime_r="unknown"
- #
+
AC_MSG_CHECKING([if localtime_r can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([localtime_r])
AC_MSG_RESULT([no])
tst_links_localtime_r="no"
])
- #
+
if test "$tst_links_localtime_r" = "yes"; then
AC_MSG_CHECKING([if localtime_r is prototyped])
AC_EGREP_CPP([localtime_r],[
tst_proto_localtime_r="no"
])
fi
- #
+
if test "$tst_proto_localtime_r" = "yes"; then
AC_MSG_CHECKING([if localtime_r is compilable])
AC_COMPILE_IFELSE([
tst_compi_localtime_r="no"
])
fi
- #
+
dnl only do runtime verification when not cross-compiling
if test "$cross_compiling" != "yes" &&
test "$tst_compi_localtime_r" = "yes"; then
tst_works_localtime_r="no"
])
fi
- #
+
if test "$tst_compi_localtime_r" = "yes" &&
test "$tst_works_localtime_r" != "no"; then
AC_MSG_CHECKING([if localtime_r usage allowed])
tst_allow_localtime_r="no"
fi
fi
- #
+
AC_MSG_CHECKING([if localtime_r might be used])
if test "$tst_links_localtime_r" = "yes" &&
test "$tst_proto_localtime_r" = "yes" &&
dnl HAVE_INET_NTOP will be defined.
AC_DEFUN([CURL_CHECK_FUNC_INET_NTOP], [
- AC_REQUIRE([CURL_INCLUDES_STDLIB])dnl
- AC_REQUIRE([CURL_INCLUDES_ARPA_INET])dnl
- AC_REQUIRE([CURL_INCLUDES_STRING])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_STDLIB])
+ AC_REQUIRE([CURL_INCLUDES_ARPA_INET])
+ AC_REQUIRE([CURL_INCLUDES_STRING])
+
tst_links_inet_ntop="unknown"
tst_proto_inet_ntop="unknown"
tst_compi_inet_ntop="unknown"
tst_works_inet_ntop="unknown"
tst_allow_inet_ntop="unknown"
- #
+
AC_MSG_CHECKING([if inet_ntop can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([inet_ntop])
AC_MSG_RESULT([no])
tst_links_inet_ntop="no"
])
- #
+
if test "$tst_links_inet_ntop" = "yes"; then
AC_MSG_CHECKING([if inet_ntop is prototyped])
AC_EGREP_CPP([inet_ntop],[
tst_proto_inet_ntop="no"
])
fi
- #
+
if test "$tst_proto_inet_ntop" = "yes"; then
AC_MSG_CHECKING([if inet_ntop is compilable])
AC_COMPILE_IFELSE([
tst_compi_inet_ntop="no"
])
fi
- #
+
dnl only do runtime verification when not cross-compiling
if test "$cross_compiling" != "yes" &&
test "$tst_compi_inet_ntop" = "yes"; then
tst_works_inet_ntop="no"
])
fi
- #
+
if test "$tst_compi_inet_ntop" = "yes" &&
test "$tst_works_inet_ntop" != "no"; then
AC_MSG_CHECKING([if inet_ntop usage allowed])
tst_allow_inet_ntop="no"
fi
fi
- #
+
AC_MSG_CHECKING([if inet_ntop might be used])
if test "$tst_links_inet_ntop" = "yes" &&
test "$tst_proto_inet_ntop" = "yes" &&
dnl HAVE_INET_PTON will be defined.
AC_DEFUN([CURL_CHECK_FUNC_INET_PTON], [
- AC_REQUIRE([CURL_INCLUDES_STDLIB])dnl
- AC_REQUIRE([CURL_INCLUDES_ARPA_INET])dnl
- AC_REQUIRE([CURL_INCLUDES_STRING])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_STDLIB])
+ AC_REQUIRE([CURL_INCLUDES_ARPA_INET])
+ AC_REQUIRE([CURL_INCLUDES_STRING])
+
tst_links_inet_pton="unknown"
tst_proto_inet_pton="unknown"
tst_compi_inet_pton="unknown"
tst_works_inet_pton="unknown"
tst_allow_inet_pton="unknown"
- #
+
AC_MSG_CHECKING([if inet_pton can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([inet_pton])
AC_MSG_RESULT([no])
tst_links_inet_pton="no"
])
- #
+
if test "$tst_links_inet_pton" = "yes"; then
AC_MSG_CHECKING([if inet_pton is prototyped])
AC_EGREP_CPP([inet_pton],[
tst_proto_inet_pton="no"
])
fi
- #
+
if test "$tst_proto_inet_pton" = "yes"; then
AC_MSG_CHECKING([if inet_pton is compilable])
AC_COMPILE_IFELSE([
tst_compi_inet_pton="no"
])
fi
- #
+
dnl only do runtime verification when not cross-compiling
if test "$cross_compiling" != "yes" &&
test "$tst_compi_inet_pton" = "yes"; then
tst_works_inet_pton="no"
])
fi
- #
+
if test "$tst_compi_inet_pton" = "yes" &&
test "$tst_works_inet_pton" != "no"; then
AC_MSG_CHECKING([if inet_pton usage allowed])
tst_allow_inet_pton="no"
fi
fi
- #
+
AC_MSG_CHECKING([if inet_pton might be used])
if test "$tst_links_inet_pton" = "yes" &&
test "$tst_proto_inet_pton" = "yes" &&
dnl curl_cv_func_ioctl is set to "yes".
AC_DEFUN([CURL_CHECK_FUNC_IOCTL], [
- AC_REQUIRE([CURL_INCLUDES_STROPTS])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_STROPTS])
+
tst_links_ioctl="unknown"
tst_proto_ioctl="unknown"
tst_compi_ioctl="unknown"
tst_allow_ioctl="unknown"
- #
+
AC_MSG_CHECKING([if ioctl can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([ioctl])
AC_MSG_RESULT([no])
tst_links_ioctl="no"
])
- #
+
if test "$tst_links_ioctl" = "yes"; then
AC_MSG_CHECKING([if ioctl is prototyped])
AC_EGREP_CPP([ioctl],[
tst_proto_ioctl="no"
])
fi
- #
+
if test "$tst_proto_ioctl" = "yes"; then
AC_MSG_CHECKING([if ioctl is compilable])
AC_COMPILE_IFELSE([
tst_compi_ioctl="no"
])
fi
- #
+
if test "$tst_compi_ioctl" = "yes"; then
AC_MSG_CHECKING([if ioctl usage allowed])
if test "x$curl_disallow_ioctl" != "xyes"; then
tst_allow_ioctl="no"
fi
fi
- #
+
AC_MSG_CHECKING([if ioctl might be used])
if test "$tst_links_ioctl" = "yes" &&
test "$tst_proto_ioctl" = "yes" &&
dnl will be defined.
AC_DEFUN([CURL_CHECK_FUNC_IOCTL_FIONBIO], [
- #
+
tst_compi_ioctl_fionbio="unknown"
tst_allow_ioctl_fionbio="unknown"
- #
+
if test "$curl_cv_func_ioctl" = "yes"; then
AC_MSG_CHECKING([if ioctl FIONBIO is compilable])
AC_COMPILE_IFELSE([
tst_compi_ioctl_fionbio="no"
])
fi
- #
+
if test "$tst_compi_ioctl_fionbio" = "yes"; then
AC_MSG_CHECKING([if ioctl FIONBIO usage allowed])
if test "x$curl_disallow_ioctl_fionbio" != "xyes"; then
tst_allow_ioctl_fionbio="no"
fi
fi
- #
+
AC_MSG_CHECKING([if ioctl FIONBIO might be used])
if test "$tst_compi_ioctl_fionbio" = "yes" &&
test "$tst_allow_ioctl_fionbio" = "yes"; then
dnl will be defined.
AC_DEFUN([CURL_CHECK_FUNC_IOCTL_SIOCGIFADDR], [
- #
+
tst_compi_ioctl_siocgifaddr="unknown"
tst_allow_ioctl_siocgifaddr="unknown"
- #
+
if test "$curl_cv_func_ioctl" = "yes"; then
AC_MSG_CHECKING([if ioctl SIOCGIFADDR is compilable])
AC_COMPILE_IFELSE([
tst_compi_ioctl_siocgifaddr="no"
])
fi
- #
+
if test "$tst_compi_ioctl_siocgifaddr" = "yes"; then
AC_MSG_CHECKING([if ioctl SIOCGIFADDR usage allowed])
if test "x$curl_disallow_ioctl_siocgifaddr" != "xyes"; then
tst_allow_ioctl_siocgifaddr="no"
fi
fi
- #
+
AC_MSG_CHECKING([if ioctl SIOCGIFADDR might be used])
if test "$tst_compi_ioctl_siocgifaddr" = "yes" &&
test "$tst_allow_ioctl_siocgifaddr" = "yes"; then
dnl HAVE_IOCTLSOCKET will be defined.
AC_DEFUN([CURL_CHECK_FUNC_IOCTLSOCKET], [
- AC_REQUIRE([CURL_INCLUDES_WINSOCK2])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_WINSOCK2])
+
tst_links_ioctlsocket="unknown"
tst_proto_ioctlsocket="unknown"
tst_compi_ioctlsocket="unknown"
tst_allow_ioctlsocket="unknown"
- #
+
AC_MSG_CHECKING([if ioctlsocket can be linked])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
AC_MSG_RESULT([no])
tst_links_ioctlsocket="no"
])
- #
+
if test "$tst_links_ioctlsocket" = "yes"; then
AC_MSG_CHECKING([if ioctlsocket is prototyped])
AC_EGREP_CPP([ioctlsocket],[
tst_proto_ioctlsocket="no"
])
fi
- #
+
if test "$tst_proto_ioctlsocket" = "yes"; then
AC_MSG_CHECKING([if ioctlsocket is compilable])
AC_COMPILE_IFELSE([
tst_compi_ioctlsocket="no"
])
fi
- #
+
if test "$tst_compi_ioctlsocket" = "yes"; then
AC_MSG_CHECKING([if ioctlsocket usage allowed])
if test "x$curl_disallow_ioctlsocket" != "xyes"; then
tst_allow_ioctlsocket="no"
fi
fi
- #
+
AC_MSG_CHECKING([if ioctlsocket might be used])
if test "$tst_links_ioctlsocket" = "yes" &&
test "$tst_proto_ioctlsocket" = "yes" &&
dnl will be defined.
AC_DEFUN([CURL_CHECK_FUNC_IOCTLSOCKET_FIONBIO], [
- #
+
tst_compi_ioctlsocket_fionbio="unknown"
tst_allow_ioctlsocket_fionbio="unknown"
- #
+
if test "$curl_cv_func_ioctlsocket" = "yes"; then
AC_MSG_CHECKING([if ioctlsocket FIONBIO is compilable])
AC_COMPILE_IFELSE([
tst_compi_ioctlsocket_fionbio="no"
])
fi
- #
+
if test "$tst_compi_ioctlsocket_fionbio" = "yes"; then
AC_MSG_CHECKING([if ioctlsocket FIONBIO usage allowed])
if test "x$curl_disallow_ioctlsocket_fionbio" != "xyes"; then
tst_allow_ioctlsocket_fionbio="no"
fi
fi
- #
+
AC_MSG_CHECKING([if ioctlsocket FIONBIO might be used])
if test "$tst_compi_ioctlsocket_fionbio" = "yes" &&
test "$tst_allow_ioctlsocket_fionbio" = "yes"; then
dnl then HAVE_IOCTLSOCKET_CAMEL will be defined.
AC_DEFUN([CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL], [
- AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])
+
tst_links_ioctlsocket_camel="unknown"
tst_compi_ioctlsocket_camel="unknown"
tst_allow_ioctlsocket_camel="unknown"
- #
+
AC_MSG_CHECKING([if IoctlSocket can be linked])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
AC_MSG_RESULT([no])
tst_links_ioctlsocket_camel="no"
])
- #
+
if test "$tst_links_ioctlsocket_camel" = "yes"; then
AC_MSG_CHECKING([if IoctlSocket is compilable])
AC_COMPILE_IFELSE([
tst_compi_ioctlsocket_camel="no"
])
fi
- #
+
if test "$tst_compi_ioctlsocket_camel" = "yes"; then
AC_MSG_CHECKING([if IoctlSocket usage allowed])
if test "x$curl_disallow_ioctlsocket_camel" != "xyes"; then
tst_allow_ioctlsocket_camel="no"
fi
fi
- #
+
AC_MSG_CHECKING([if IoctlSocket might be used])
if test "$tst_links_ioctlsocket_camel" = "yes" &&
test "$tst_compi_ioctlsocket_camel" = "yes" &&
dnl true, then HAVE_IOCTLSOCKET_CAMEL_FIONBIO will be defined.
AC_DEFUN([CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL_FIONBIO], [
- AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])
+
tst_compi_ioctlsocket_camel_fionbio="unknown"
tst_allow_ioctlsocket_camel_fionbio="unknown"
- #
+
if test "$curl_cv_func_ioctlsocket_camel" = "yes"; then
AC_MSG_CHECKING([if IoctlSocket FIONBIO is compilable])
AC_COMPILE_IFELSE([
tst_compi_ioctlsocket_camel_fionbio="no"
])
fi
- #
+
if test "$tst_compi_ioctlsocket_camel_fionbio" = "yes"; then
AC_MSG_CHECKING([if IoctlSocket FIONBIO usage allowed])
if test "x$curl_disallow_ioctlsocket_camel_fionbio" != "xyes"; then
tst_allow_ioctlsocket_camel_fionbio="no"
fi
fi
- #
+
AC_MSG_CHECKING([if IoctlSocket FIONBIO might be used])
if test "$tst_compi_ioctlsocket_camel_fionbio" = "yes" &&
test "$tst_allow_ioctlsocket_camel_fionbio" = "yes"; then
dnl HAVE_MEMRCHR will be defined.
AC_DEFUN([CURL_CHECK_FUNC_MEMRCHR], [
- AC_REQUIRE([CURL_INCLUDES_STRING])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_STRING])
+
tst_links_memrchr="unknown"
tst_macro_memrchr="unknown"
tst_proto_memrchr="unknown"
tst_compi_memrchr="unknown"
tst_allow_memrchr="unknown"
- #
+
AC_MSG_CHECKING([if memrchr can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([memrchr])
AC_MSG_RESULT([no])
tst_links_memrchr="no"
])
- #
+
if test "$tst_links_memrchr" = "no"; then
AC_MSG_CHECKING([if memrchr seems a macro])
AC_LINK_IFELSE([
tst_macro_memrchr="no"
])
fi
- #
+
if test "$tst_links_memrchr" = "yes"; then
AC_MSG_CHECKING([if memrchr is prototyped])
AC_EGREP_CPP([memrchr],[
tst_proto_memrchr="no"
])
fi
- #
+
if test "$tst_proto_memrchr" = "yes" ||
test "$tst_macro_memrchr" = "yes"; then
AC_MSG_CHECKING([if memrchr is compilable])
tst_compi_memrchr="no"
])
fi
- #
+
if test "$tst_compi_memrchr" = "yes"; then
AC_MSG_CHECKING([if memrchr usage allowed])
if test "x$curl_disallow_memrchr" != "xyes"; then
tst_allow_memrchr="no"
fi
fi
- #
+
AC_MSG_CHECKING([if memrchr might be used])
if (test "$tst_proto_memrchr" = "yes" ||
test "$tst_macro_memrchr" = "yes") &&
dnl HAVE_SIGACTION will be defined.
AC_DEFUN([CURL_CHECK_FUNC_SIGACTION], [
- AC_REQUIRE([CURL_INCLUDES_SIGNAL])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_SIGNAL])
+
tst_links_sigaction="unknown"
tst_proto_sigaction="unknown"
tst_compi_sigaction="unknown"
tst_allow_sigaction="unknown"
- #
+
AC_MSG_CHECKING([if sigaction can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([sigaction])
AC_MSG_RESULT([no])
tst_links_sigaction="no"
])
- #
+
if test "$tst_links_sigaction" = "yes"; then
AC_MSG_CHECKING([if sigaction is prototyped])
AC_EGREP_CPP([sigaction],[
tst_proto_sigaction="no"
])
fi
- #
+
if test "$tst_proto_sigaction" = "yes"; then
AC_MSG_CHECKING([if sigaction is compilable])
AC_COMPILE_IFELSE([
tst_compi_sigaction="no"
])
fi
- #
+
if test "$tst_compi_sigaction" = "yes"; then
AC_MSG_CHECKING([if sigaction usage allowed])
if test "x$curl_disallow_sigaction" != "xyes"; then
tst_allow_sigaction="no"
fi
fi
- #
+
AC_MSG_CHECKING([if sigaction might be used])
if test "$tst_links_sigaction" = "yes" &&
test "$tst_proto_sigaction" = "yes" &&
dnl HAVE_SIGINTERRUPT will be defined.
AC_DEFUN([CURL_CHECK_FUNC_SIGINTERRUPT], [
- AC_REQUIRE([CURL_INCLUDES_SIGNAL])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_SIGNAL])
+
tst_links_siginterrupt="unknown"
tst_proto_siginterrupt="unknown"
tst_compi_siginterrupt="unknown"
tst_allow_siginterrupt="unknown"
- #
+
AC_MSG_CHECKING([if siginterrupt can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([siginterrupt])
AC_MSG_RESULT([no])
tst_links_siginterrupt="no"
])
- #
+
if test "$tst_links_siginterrupt" = "yes"; then
AC_MSG_CHECKING([if siginterrupt is prototyped])
AC_EGREP_CPP([siginterrupt],[
tst_proto_siginterrupt="no"
])
fi
- #
+
if test "$tst_proto_siginterrupt" = "yes"; then
AC_MSG_CHECKING([if siginterrupt is compilable])
AC_COMPILE_IFELSE([
tst_compi_siginterrupt="no"
])
fi
- #
+
if test "$tst_compi_siginterrupt" = "yes"; then
AC_MSG_CHECKING([if siginterrupt usage allowed])
if test "x$curl_disallow_siginterrupt" != "xyes"; then
tst_allow_siginterrupt="no"
fi
fi
- #
+
AC_MSG_CHECKING([if siginterrupt might be used])
if test "$tst_links_siginterrupt" = "yes" &&
test "$tst_proto_siginterrupt" = "yes" &&
dnl HAVE_SIGNAL will be defined.
AC_DEFUN([CURL_CHECK_FUNC_SIGNAL], [
- AC_REQUIRE([CURL_INCLUDES_SIGNAL])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_SIGNAL])
+
tst_links_signal="unknown"
tst_proto_signal="unknown"
tst_compi_signal="unknown"
tst_allow_signal="unknown"
- #
+
AC_MSG_CHECKING([if signal can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([signal])
AC_MSG_RESULT([no])
tst_links_signal="no"
])
- #
+
if test "$tst_links_signal" = "yes"; then
AC_MSG_CHECKING([if signal is prototyped])
AC_EGREP_CPP([signal],[
tst_proto_signal="no"
])
fi
- #
+
if test "$tst_proto_signal" = "yes"; then
AC_MSG_CHECKING([if signal is compilable])
AC_COMPILE_IFELSE([
tst_compi_signal="no"
])
fi
- #
+
if test "$tst_compi_signal" = "yes"; then
AC_MSG_CHECKING([if signal usage allowed])
if test "x$curl_disallow_signal" != "xyes"; then
tst_allow_signal="no"
fi
fi
- #
+
AC_MSG_CHECKING([if signal might be used])
if test "$tst_links_signal" = "yes" &&
test "$tst_proto_signal" = "yes" &&
dnl HAVE_SIGSETJMP will be defined.
AC_DEFUN([CURL_CHECK_FUNC_SIGSETJMP], [
- AC_REQUIRE([CURL_INCLUDES_SETJMP])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_SETJMP])
+
tst_links_sigsetjmp="unknown"
tst_macro_sigsetjmp="unknown"
tst_proto_sigsetjmp="unknown"
tst_compi_sigsetjmp="unknown"
tst_allow_sigsetjmp="unknown"
- #
+
AC_MSG_CHECKING([if sigsetjmp can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([sigsetjmp])
AC_MSG_RESULT([no])
tst_links_sigsetjmp="no"
])
- #
+
if test "$tst_links_sigsetjmp" = "no"; then
AC_MSG_CHECKING([if sigsetjmp seems a macro])
AC_LINK_IFELSE([
tst_macro_sigsetjmp="no"
])
fi
- #
+
if test "$tst_links_sigsetjmp" = "yes"; then
AC_MSG_CHECKING([if sigsetjmp is prototyped])
AC_EGREP_CPP([sigsetjmp],[
tst_proto_sigsetjmp="no"
])
fi
- #
+
if test "$tst_proto_sigsetjmp" = "yes" ||
test "$tst_macro_sigsetjmp" = "yes"; then
AC_MSG_CHECKING([if sigsetjmp is compilable])
tst_compi_sigsetjmp="no"
])
fi
- #
+
if test "$tst_compi_sigsetjmp" = "yes"; then
AC_MSG_CHECKING([if sigsetjmp usage allowed])
if test "x$curl_disallow_sigsetjmp" != "xyes"; then
tst_allow_sigsetjmp="no"
fi
fi
- #
+
AC_MSG_CHECKING([if sigsetjmp might be used])
if (test "$tst_proto_sigsetjmp" = "yes" ||
test "$tst_macro_sigsetjmp" = "yes") &&
dnl HAVE_SOCKET will be defined.
AC_DEFUN([CURL_CHECK_FUNC_SOCKET], [
- AC_REQUIRE([CURL_INCLUDES_WINSOCK2])dnl
- AC_REQUIRE([CURL_INCLUDES_SYS_SOCKET])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_WINSOCK2])
+ AC_REQUIRE([CURL_INCLUDES_SYS_SOCKET])
+
tst_links_socket="unknown"
tst_proto_socket="unknown"
tst_compi_socket="unknown"
tst_allow_socket="unknown"
- #
+
AC_MSG_CHECKING([if socket can be linked])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
AC_MSG_RESULT([no])
tst_links_socket="no"
])
- #
+
if test "$tst_links_socket" = "yes"; then
AC_MSG_CHECKING([if socket is prototyped])
AC_EGREP_CPP([socket],[
tst_proto_socket="no"
])
fi
- #
+
if test "$tst_proto_socket" = "yes"; then
AC_MSG_CHECKING([if socket is compilable])
AC_COMPILE_IFELSE([
tst_compi_socket="no"
])
fi
- #
+
if test "$tst_compi_socket" = "yes"; then
AC_MSG_CHECKING([if socket usage allowed])
if test "x$curl_disallow_socket" != "xyes"; then
tst_allow_socket="no"
fi
fi
- #
+
AC_MSG_CHECKING([if socket might be used])
if test "$tst_links_socket" = "yes" &&
test "$tst_proto_socket" = "yes" &&
dnl HAVE_SOCKETPAIR will be defined.
AC_DEFUN([CURL_CHECK_FUNC_SOCKETPAIR], [
- AC_REQUIRE([CURL_INCLUDES_SYS_SOCKET])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_SYS_SOCKET])
+
tst_links_socketpair="unknown"
tst_proto_socketpair="unknown"
tst_compi_socketpair="unknown"
tst_allow_socketpair="unknown"
- #
+
AC_MSG_CHECKING([if socketpair can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([socketpair])
AC_MSG_RESULT([no])
tst_links_socketpair="no"
])
- #
+
if test "$tst_links_socketpair" = "yes"; then
AC_MSG_CHECKING([if socketpair is prototyped])
AC_EGREP_CPP([socketpair],[
tst_proto_socketpair="no"
])
fi
- #
+
if test "$tst_proto_socketpair" = "yes"; then
AC_MSG_CHECKING([if socketpair is compilable])
AC_COMPILE_IFELSE([
tst_compi_socketpair="no"
])
fi
- #
+
if test "$tst_compi_socketpair" = "yes"; then
AC_MSG_CHECKING([if socketpair usage allowed])
if test "x$curl_disallow_socketpair" != "xyes"; then
tst_allow_socketpair="no"
fi
fi
- #
+
AC_MSG_CHECKING([if socketpair might be used])
if test "$tst_links_socketpair" = "yes" &&
test "$tst_proto_socketpair" = "yes" &&
dnl HAVE_STRCASECMP will be defined.
AC_DEFUN([CURL_CHECK_FUNC_STRCASECMP], [
- AC_REQUIRE([CURL_INCLUDES_STRING])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_STRING])
+
tst_links_strcasecmp="unknown"
tst_proto_strcasecmp="unknown"
tst_compi_strcasecmp="unknown"
tst_allow_strcasecmp="unknown"
- #
+
AC_MSG_CHECKING([if strcasecmp can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([strcasecmp])
AC_MSG_RESULT([no])
tst_links_strcasecmp="no"
])
- #
+
if test "$tst_links_strcasecmp" = "yes"; then
AC_MSG_CHECKING([if strcasecmp is prototyped])
AC_EGREP_CPP([strcasecmp],[
tst_proto_strcasecmp="no"
])
fi
- #
+
if test "$tst_proto_strcasecmp" = "yes"; then
AC_MSG_CHECKING([if strcasecmp is compilable])
AC_COMPILE_IFELSE([
tst_compi_strcasecmp="no"
])
fi
- #
+
if test "$tst_compi_strcasecmp" = "yes"; then
AC_MSG_CHECKING([if strcasecmp usage allowed])
if test "x$curl_disallow_strcasecmp" != "xyes"; then
tst_allow_strcasecmp="no"
fi
fi
- #
+
AC_MSG_CHECKING([if strcasecmp might be used])
if test "$tst_links_strcasecmp" = "yes" &&
test "$tst_proto_strcasecmp" = "yes" &&
dnl HAVE_STRCMPI will be defined.
AC_DEFUN([CURL_CHECK_FUNC_STRCMPI], [
- AC_REQUIRE([CURL_INCLUDES_STRING])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_STRING])
+
tst_links_strcmpi="unknown"
tst_proto_strcmpi="unknown"
tst_compi_strcmpi="unknown"
tst_allow_strcmpi="unknown"
- #
+
AC_MSG_CHECKING([if strcmpi can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([strcmpi])
AC_MSG_RESULT([no])
tst_links_strcmpi="no"
])
- #
+
if test "$tst_links_strcmpi" = "yes"; then
AC_MSG_CHECKING([if strcmpi is prototyped])
AC_EGREP_CPP([strcmpi],[
tst_proto_strcmpi="no"
])
fi
- #
+
if test "$tst_proto_strcmpi" = "yes"; then
AC_MSG_CHECKING([if strcmpi is compilable])
AC_COMPILE_IFELSE([
tst_compi_strcmpi="no"
])
fi
- #
+
if test "$tst_compi_strcmpi" = "yes"; then
AC_MSG_CHECKING([if strcmpi usage allowed])
if test "x$curl_disallow_strcmpi" != "xyes"; then
tst_allow_strcmpi="no"
fi
fi
- #
+
AC_MSG_CHECKING([if strcmpi might be used])
if test "$tst_links_strcmpi" = "yes" &&
test "$tst_proto_strcmpi" = "yes" &&
dnl
AC_DEFUN([CURL_CHECK_FUNC_STRERROR_R], [
- AC_REQUIRE([CURL_INCLUDES_STDLIB])dnl
- AC_REQUIRE([CURL_INCLUDES_STRING])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_STDLIB])
+ AC_REQUIRE([CURL_INCLUDES_STRING])
+
tst_links_strerror_r="unknown"
tst_proto_strerror_r="unknown"
tst_compi_strerror_r="unknown"
tst_works_posix_strerror_r="unknown"
tst_glibc_strerror_r_type_arg3="unknown"
tst_posix_strerror_r_type_arg3="unknown"
- #
+
AC_MSG_CHECKING([if strerror_r can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([strerror_r])
AC_MSG_RESULT([no])
tst_links_strerror_r="no"
])
- #
+
if test "$tst_links_strerror_r" = "yes"; then
AC_MSG_CHECKING([if strerror_r is prototyped])
AC_EGREP_CPP([strerror_r],[
tst_proto_strerror_r="no"
])
fi
- #
+
if test "$tst_proto_strerror_r" = "yes"; then
AC_MSG_CHECKING([if strerror_r is compilable])
AC_COMPILE_IFELSE([
tst_compi_strerror_r="no"
])
fi
- #
+
if test "$tst_compi_strerror_r" = "yes"; then
AC_MSG_CHECKING([if strerror_r is glibc like])
tst_glibc_strerror_r_type_arg3="unknown"
;;
esac
fi
- #
+
dnl only do runtime verification when not cross-compiling
if test "$cross_compiling" != "yes" &&
test "$tst_glibc_strerror_r" = "yes"; then
tst_works_glibc_strerror_r="no"
])
fi
- #
+
if test "$tst_compi_strerror_r" = "yes" &&
test "$tst_works_glibc_strerror_r" != "yes"; then
AC_MSG_CHECKING([if strerror_r is POSIX like])
;;
esac
fi
- #
+
dnl only do runtime verification when not cross-compiling
if test "$cross_compiling" != "yes" &&
test "$tst_posix_strerror_r" = "yes"; then
tst_works_posix_strerror_r="no"
])
fi
- #
+
if test "$tst_works_glibc_strerror_r" = "yes"; then
tst_posix_strerror_r="no"
fi
tst_allow_strerror_r="no"
fi
fi
- #
+
AC_MSG_CHECKING([if strerror_r might be used])
if test "$tst_links_strerror_r" = "yes" &&
test "$tst_proto_strerror_r" = "yes" &&
AC_MSG_RESULT([no])
curl_cv_func_strerror_r="no"
fi
- #
+
if test "$tst_compi_strerror_r" = "yes" &&
test "$tst_allow_strerror_r" = "unknown"; then
AC_MSG_WARN([cannot determine strerror_r() style: edit lib/curl_config.h manually.])
fi
- #
+
])
dnl HAVE_STRICMP will be defined.
AC_DEFUN([CURL_CHECK_FUNC_STRICMP], [
- AC_REQUIRE([CURL_INCLUDES_STRING])dnl
- #
+ AC_REQUIRE([CURL_INCLUDES_STRING])
+
tst_links_stricmp="unknown"
tst_proto_stricmp="unknown"
tst_compi_stricmp="unknown"
tst_allow_stricmp="unknown"
- #
+
AC_MSG_CHECKING([if stricmp can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([stricmp])
AC_MSG_RESULT([no])
tst_links_stricmp="no"
])
- #
+
if test "$tst_links_stricmp" = "yes"; then
AC_MSG_CHECKING([if stricmp is prototyped])
AC_EGREP_CPP([stricmp],[
tst_proto_stricmp="no"
])
fi
- #
+
if test "$tst_proto_stricmp" = "yes"; then
AC_MSG_CHECKING([if stricmp is compilable])
AC_COMPILE_IFELSE([
tst_compi_stricmp="no"
])
fi
- #
+
if test "$tst_compi_stricmp" = "yes"; then
AC_MSG_CHECKING([if stricmp usage allowed])
if test "x$curl_disallow_stricmp" != "xyes"; then
tst_allow_stricmp="no"
fi
fi
- #
+
AC_MSG_CHECKING([if stricmp might be used])
if test "$tst_links_stricmp" = "yes" &&
test "$tst_proto_stricmp" = "yes" &&
LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
export LD_LIBRARY_PATH
AC_RUN_IFELSE([AC_LANG_SOURCE([$1])], $2, $3, $4)
- LD_LIBRARY_PATH=$old # restore
+ # restore
+ LD_LIBRARY_PATH=$old
CC=$oldcc
fi
])
])
])
-# Rewrite inspired by the functionality once provided by
-# AX_COMPILE_CHECK_SIZEOF. Uses the switch() "trick" to find the size of the
-# given type.
-#
-# This code fails to compile:
-#
-# switch() { case 0: case 0: }
-#
-# By making the second case number a boolean check, it fails to compile the
-# test code when the boolean is false and thus creating a zero, making it a
-# duplicated case label. If the boolean equals true, it becomes a one, the
-# code compiles and we know it was a match.
-#
-# The check iterates over all possible sizes and stops as soon it compiles
-# error-free.
-#
-# Usage:
-#
-# CURL_SIZEOF(TYPE, [HEADERS])
-#
+dnl Rewrite inspired by the functionality once provided by
+dnl AX_COMPILE_CHECK_SIZEOF. Uses the switch() "trick" to find the size of the
+dnl given type.
+dnl
+dnl This code fails to compile:
+dnl
+dnl switch() { case 0: case 0: }
+dnl
+dnl By making the second case number a boolean check, it fails to compile the
+dnl test code when the boolean is false and thus creating a zero, making it a
+dnl duplicated case label. If the boolean equals true, it becomes a one, the
+dnl code compiles and we know it was a match.
+dnl
+dnl The check iterates over all possible sizes and stops as soon it compiles
+dnl error-free.
+dnl
+dnl Usage:
+dnl
+dnl CURL_SIZEOF(TYPE, [HEADERS])
+dnl
AC_DEFUN([CURL_SIZEOF], [
dnl The #define name to make autoheader put the name in curl_config.h.in
- define(TYPE, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
+ define(TYPE, translit(sizeof_$1, [a-z *], [A-Z_P]))
AC_MSG_CHECKING(size of $1)
r=0
addlib=-lgnutls
addld=-L$OPT_GNUTLS/lib$libsuff
addcflags=-I$OPT_GNUTLS/include
- version="" # we just do not know
+ dnl we just do not know
+ version=""
gtlslib=$OPT_GNUTLS/lib$libsuff
fi
fi
test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
fi
+dnl
+dnl Check which crypto backend GnuTLS uses
+dnl
if test "$GNUTLS_ENABLED" = "1"; then
- dnl ---
- dnl Check which crypto backend GnuTLS uses
- dnl ---
USE_GNUTLS_NETTLE=
- # First check if we can detect either crypto library via transitive linking
+ dnl First check if we can detect either crypto library via transitive linking
AC_CHECK_LIB(gnutls, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ])
- # If not, try linking directly to both of them to see if they are available
+ dnl If not, try linking directly to both of them to see if they are available
if test -z "$USE_GNUTLS_NETTLE"; then
dnl this is with no particular path given
#
#***************************************************************************
-# File version for 'aclocal' use. Keep it a single number.
-# serial 5
+dnl File version for 'aclocal' use. Keep it a single number.
+dnl serial 5
dnl **********************************************************************
dnl Check for OpenSSL libraries and headers
fi
if test "$PKGTEST" != "yes"; then
- # try lib64 instead
+ dnl try lib64 instead
OPENSSL_PCDIR="$OPT_OPENSSL/lib64/pkgconfig"
if test -f "$OPENSSL_PCDIR/openssl.pc"; then
AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$OPENSSL_PCDIR"])
CURL_CHECK_PKGCONFIG(openssl, [$OPENSSL_PCDIR])
if test "$PKGCONFIG" != "no"; then
- SSL_LIBS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
+ SSL_LIBS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR])
$PKGCONFIG --libs-only-l --libs-only-other openssl 2>/dev/null`
- SSL_LDFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
+ SSL_LDFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR])
$PKGCONFIG --libs-only-L openssl 2>/dev/null`
- SSL_CPPFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
+ SSL_CPPFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR])
$PKGCONFIG --cflags-only-I openssl 2>/dev/null`
AC_MSG_NOTICE([pkg-config: SSL_LIBS: "$SSL_LIBS"])
LDFLAGSPC="$CLEANLDFLAGSPC -L$LIB_OPENSSL"
fi
if test "$PKGCONFIG" = "no" && test -n "$PREFIX_OPENSSL"; then
- # only set this if pkg-config was not used
+ dnl only set this if pkg-config was not used
CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include"
fi
- # Linking previously failed, try extra paths from --with-openssl or
- # pkg-config. Use a different function name to avoid reusing the earlier
- # cached result.
+ dnl Linking previously failed, try extra paths from --with-openssl or
+ dnl pkg-config. Use a different function name to avoid reusing the earlier
+ dnl cached result.
AC_CHECK_LIB(crypto, HMAC_Init_ex,[
HAVECRYPTO="yes"
LIBS="-lcrypto $LIBS"], [
#
# SPDX-License-Identifier: curl
#
-###########################################################################
-#***************************************************************************
#***************************************************************************
-# File version for 'aclocal' use. Keep it a single number.
-# serial 7
+dnl File version for 'aclocal' use. Keep it a single number.
+dnl serial 7
dnl CURL_OVERRIDE_AUTOCONF
dnl -------------------------------------------------
#
#***************************************************************************
-# File version for 'aclocal' use. Keep it a single number.
-# serial 10
+dnl File version for 'aclocal' use. Keep it a single number.
+dnl serial 10
dnl Note 1
dnl ------
dnl tests and generated config file.
AC_DEFUN([CURL_CONFIGURE_REENTRANT], [
- AC_PREREQ([2.50])dnl
- #
+ AC_PREREQ([2.50])
+
AC_MSG_CHECKING([if _REENTRANT is already defined])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
AC_MSG_RESULT([no])
tmp_reentrant_initially_defined="no"
])
- #
+
if test "$tmp_reentrant_initially_defined" = "no"; then
AC_MSG_CHECKING([if _REENTRANT is actually needed])
CURL_CHECK_NEED_REENTRANT_SYSTEM
AC_MSG_RESULT([no])
fi
fi
- #
+
AC_MSG_CHECKING([if _REENTRANT is onwards defined])
if test "$tmp_reentrant_initially_defined" = "yes" ||
test "$tmp_need_reentrant" = "yes"; then
else
AC_MSG_RESULT([no])
fi
- #
])
dnl tests and generated config file.
AC_DEFUN([CURL_CONFIGURE_THREAD_SAFE], [
- AC_PREREQ([2.50])dnl
- #
+ AC_PREREQ([2.50])
+
AC_MSG_CHECKING([if _THREAD_SAFE is already defined])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
AC_MSG_RESULT([no])
tmp_thread_safe_initially_defined="no"
])
- #
+
if test "$tmp_thread_safe_initially_defined" = "no"; then
AC_MSG_CHECKING([if _THREAD_SAFE is actually needed])
CURL_CHECK_NEED_THREAD_SAFE_SYSTEM
AC_MSG_RESULT([no])
fi
fi
- #
+
AC_MSG_CHECKING([if _THREAD_SAFE is onwards defined])
if test "$tmp_thread_safe_initially_defined" = "yes" ||
test "$tmp_need_thread_safe" = "yes"; then
else
AC_MSG_RESULT([no])
fi
- #
])
CLEANLDFLAGSPC="$LDFLAGSPC"
CLEANCPPFLAGS="$CPPFLAGS"
- ## NEW CODE
+ dnl NEW CODE
dnl use pkg-config unless we have been given a path
dnl even then, try pkg-config first
fi
if test "$PKGTEST" != "yes"; then
- # try lib64 instead
+ dnl try lib64 instead
RUSTLS_PCDIR="$PREFIX_RUSTLS/lib64/pkgconfig"
if test -f "$RUSTLS_PCDIR/rustls.pc"; then
AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$RUSTLS_PCDIR"])
CURL_CHECK_PKGCONFIG(rustls, [$RUSTLS_PCDIR])
if test "$PKGCONFIG" != "no"; then
- SSL_LIBS=`CURL_EXPORT_PCDIR([$RUSTLS_PCDIR]) dnl
+ SSL_LIBS=`CURL_EXPORT_PCDIR([$RUSTLS_PCDIR])
$PKGCONFIG --libs-only-l --libs-only-other rustls 2>/dev/null`
- SSL_LDFLAGS=`CURL_EXPORT_PCDIR([$RUSTLS_PCDIR]) dnl
+ SSL_LDFLAGS=`CURL_EXPORT_PCDIR([$RUSTLS_PCDIR])
$PKGCONFIG --libs-only-L rustls 2>/dev/null`
- SSL_CPPFLAGS=`CURL_EXPORT_PCDIR([$RUSTLS_PCDIR]) dnl
+ SSL_CPPFLAGS=`CURL_EXPORT_PCDIR([$RUSTLS_PCDIR])
$PKGCONFIG --cflags-only-I rustls 2>/dev/null`
AC_MSG_NOTICE([pkg-config: SSL_LIBS: "$SSL_LIBS"])
ssl_msg="Schannel"
test "schannel" != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
SCHANNEL_ENABLED=1
- # --with-schannel implies --enable-sspi
+ dnl --with-schannel implies --enable-sspi
AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support])
USE_WINDOWS_SSPI=1
curl_sspi_msg="enabled"
#
#---------------------------------------------------------------------------
-# serial 1
+dnl serial 1
dnl _XC_AUTOMAKE_BODY
dnl ones which lack this macro.
m4_define([_XC_AUTOMAKE_BODY],
-[dnl
-## --------------------------------------- ##
-## Start of automake initialization code ##
-## --------------------------------------- ##
+[
+dnl ---------------------------------------
+dnl Start of automake initialization code
+dnl ---------------------------------------
m4_ifdef([_AM_PROG_CC_C_O],
[
AM_INIT_AUTOMAKE([subdir-objects])
],[
AM_INIT_AUTOMAKE
-])dnl
-## ------------------------------------- ##
-## End of automake initialization code ##
-## ------------------------------------- ##
-dnl
-m4_define([$0], [])[]dnl
+])
+dnl -------------------------------------
+dnl End of automake initialization code
+dnl -------------------------------------
+m4_define([$0], [])[]
])
dnl is not used.
AC_DEFUN([XC_AUTOMAKE],
-[dnl
-AC_PREREQ([2.50])dnl
-dnl
-AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl
-dnl
+[
+AC_PREREQ([2.50])
+
+AC_BEFORE([$0],[AM_INIT_AUTOMAKE])
+
_XC_AUTOMAKE_BODY
-dnl
+
m4_ifdef([AM_INIT_AUTOMAKE],
- [m4_undefine([AM_INIT_AUTOMAKE])])dnl
-dnl
-m4_define([$0], [])[]dnl
+ [m4_undefine([AM_INIT_AUTOMAKE])])
+
+m4_define([$0], [])[]
])
#
#---------------------------------------------------------------------------
-# serial 1
+dnl serial 1
dnl _XC_PROG_CC_PREAMBLE
CFLAGS=$xc_prog_cc_prev_CFLAGS
LDFLAGS=$xc_prog_cc_prev_LDFLAGS
CPPFLAGS=$xc_prog_cc_prev_CPPFLAGS
- AC_SUBST([CC])dnl
- AC_SUBST([CPP])dnl
- AC_SUBST([LIBS])dnl
- AC_SUBST([CFLAGS])dnl
- AC_SUBST([LDFLAGS])dnl
- AC_SUBST([CPPFLAGS])dnl
+ AC_SUBST([CC])
+ AC_SUBST([CPP])
+ AC_SUBST([LIBS])
+ AC_SUBST([CFLAGS])
+ AC_SUBST([LDFLAGS])
+ AC_SUBST([CPPFLAGS])
])
dnl Private macro.
AC_DEFUN([_XC_PROG_CC], [
- AC_REQUIRE([_XC_PROG_CC_PREAMBLE])dnl
- AC_REQUIRE([XC_CHECK_BUILD_FLAGS])dnl
- AC_REQUIRE([AC_PROG_INSTALL])dnl
- AC_REQUIRE([AC_PROG_CC])dnl
- AC_REQUIRE([AM_PROG_CC_C_O])dnl
- AC_REQUIRE([AC_PROG_CPP])dnl
- AC_REQUIRE([_XC_PROG_CC_POSTLUDE])dnl
+ AC_REQUIRE([_XC_PROG_CC_PREAMBLE])
+ AC_REQUIRE([XC_CHECK_BUILD_FLAGS])
+ AC_REQUIRE([AC_PROG_INSTALL])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AM_PROG_CC_C_O])
+ AC_REQUIRE([AC_PROG_CPP])
+ AC_REQUIRE([_XC_PROG_CC_POSTLUDE])
])
dnl unexpectedly changed by underlying macros.
AC_DEFUN([XC_CHECK_PROG_CC], [
- AC_PREREQ([2.50])dnl
- AC_BEFORE([$0],[_XC_PROG_CC_PREAMBLE])dnl
- AC_BEFORE([$0],[AC_PROG_INSTALL])dnl
- AC_BEFORE([$0],[AC_PROG_CC])dnl
- AC_BEFORE([$0],[AM_PROG_CC_C_O])dnl
- AC_BEFORE([$0],[AC_PROG_CPP])dnl
- AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl
- AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl
- AC_BEFORE([$0],[_XC_PROG_CC_POSTLUDE])dnl
- AC_REQUIRE([_XC_PROG_CC])dnl
+ AC_PREREQ([2.50])
+ AC_BEFORE([$0],[_XC_PROG_CC_PREAMBLE])
+ AC_BEFORE([$0],[AC_PROG_INSTALL])
+ AC_BEFORE([$0],[AC_PROG_CC])
+ AC_BEFORE([$0],[AM_PROG_CC_C_O])
+ AC_BEFORE([$0],[AC_PROG_CPP])
+ AC_BEFORE([$0],[AC_PROG_LIBTOOL])
+ AC_BEFORE([$0],[AM_INIT_AUTOMAKE])
+ AC_BEFORE([$0],[_XC_PROG_CC_POSTLUDE])
+ AC_REQUIRE([_XC_PROG_CC])
])
#
#---------------------------------------------------------------------------
-# serial 1
+dnl serial 1
dnl _XC_LIBTOOL_PREAMBLE
dnl libtool code is actually used in script.
m4_define([_XC_LIBTOOL_PREAMBLE],
-[dnl
-# ------------------------------------ #
-# Determine libtool default behavior #
-# ------------------------------------ #
+[
+dnl ------------------------------------
+dnl Determine libtool default behavior
+dnl ------------------------------------
-#
-# Default behavior is to enable shared and static libraries on systems
-# where libtool knows how to build both library versions, and does not
-# require separate configuration and build runs for each flavor.
-#
+dnl
+dnl Default behavior is to enable shared and static libraries on systems
+dnl where libtool knows how to build both library versions, and does not
+dnl require separate configuration and build runs for each flavor.
+dnl
xc_lt_want_enable_shared='yes'
xc_lt_want_enable_static='yes'
-#
-# User may have disabled shared or static libraries.
-#
+dnl
+dnl User may have disabled shared or static libraries.
+dnl
case "x$enable_shared" in @%:@ (
xno)
xc_lt_want_enable_shared='no'
AC_MSG_ERROR([can not disable shared and static libraries simultaneously])
fi
-#
-# Default behavior on systems that require independent configuration
-# and build runs for shared and static is to enable shared libraries
-# and disable static ones. On these systems option '--disable-shared'
-# must be used in order to build a proper static library.
-#
+dnl
+dnl Default behavior on systems that require independent configuration
+dnl and build runs for shared and static is to enable shared libraries
+dnl and disable static ones. On these systems option '--disable-shared'
+dnl must be used in order to build a proper static library.
+dnl
if test "$xc_lt_want_enable_shared" = "yes" &&
test "$xc_lt_want_enable_static" = "yes"; then
esac
fi
-#
-# Make libtool aware of current shared and static library preferences
-# taking in account that, depending on host characteristics, libtool
-# may modify these option preferences later in this configure script.
-#
+dnl
+dnl Make libtool aware of current shared and static library preferences
+dnl taking in account that, depending on host characteristics, libtool
+dnl may modify these option preferences later in this configure script.
+dnl
enable_shared=$xc_lt_want_enable_shared
enable_static=$xc_lt_want_enable_static
-#
-# Default behavior is to build PIC objects for shared libraries and
-# non-PIC objects for static libraries.
-#
+dnl
+dnl Default behavior is to build PIC objects for shared libraries and
+dnl non-PIC objects for static libraries.
+dnl
xc_lt_want_with_pic='default'
-#
-# User may have specified PIC preference.
-#
+dnl
+dnl User may have specified PIC preference.
+dnl
case "x$with_pic" in @%:@ ((
xno)
;;
esac
-#
-# Default behavior on some systems where building a shared library out
-# of non-PIC compiled objects will fail with following linker error
-# "relocation R_X86_64_32 can not be used when making a shared object"
-# is to build PIC objects even for static libraries. This behavior may
-# be overridden using 'configure --disable-shared --without-pic'.
-#
+dnl
+dnl Default behavior on some systems where building a shared library out
+dnl of non-PIC compiled objects will fail with following linker error
+dnl "relocation R_X86_64_32 can not be used when making a shared object"
+dnl is to build PIC objects even for static libraries. This behavior may
+dnl be overridden using 'configure --disable-shared --without-pic'.
+dnl
if test "$xc_lt_want_with_pic" = "default"; then
case $host_cpu in @%:@ (
#
with_pic=$xc_lt_want_with_pic
-dnl
-m4_define([$0],[])dnl
+
+m4_define([$0],[])
])
dnl use when generating configure script.
m4_define([_XC_LIBTOOL_BODY],
-[dnl
-## ----------------------- ##
-## Start of libtool code ##
-## ----------------------- ##
+[
+dnl -----------------------
+dnl Start of libtool code
+dnl -----------------------
m4_ifdef([LT_INIT],
-[dnl
+[
LT_INIT([win32-dll])
-],[dnl
+],[
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
-])dnl
-## --------------------- ##
-## End of libtool code ##
-## --------------------- ##
+])
+dnl ---------------------
+dnl End of libtool code
+dnl ---------------------
dnl
-m4_define([$0], [])[]dnl
+m4_define([$0], [])[]
])
dnl xc_lt_build_static
m4_define([_XC_CHECK_LT_BUILD_LIBRARIES],
-[dnl
+[
#
# Verify if finally libtool shared libraries will be built
#
AC_MSG_ERROR([unexpected libtool enable_static value: $enable_static])
;;
esac
-dnl
-m4_define([$0],[])dnl
+
+m4_define([$0],[])
])
dnl Result stored in xc_lt_shlib_use_version_info.
m4_define([_XC_CHECK_LT_SHLIB_USE_VERSION_INFO],
-[dnl
+[
#
# Verify if libtool shared libraries should be linked using flag -version-info
#
;;
esac
AC_MSG_RESULT([$xc_lt_shlib_use_version_info])
-dnl
-m4_define([$0], [])[]dnl
+
+m4_define([$0], [])[]
])
dnl Result stored in xc_lt_shlib_use_no_undefined.
m4_define([_XC_CHECK_LT_SHLIB_USE_NO_UNDEFINED],
-[dnl
+[
#
# Verify if libtool shared libraries should be linked using flag -no-undefined
#
;;
esac
AC_MSG_RESULT([$xc_lt_shlib_use_no_undefined])
-dnl
-m4_define([$0], [])[]dnl
+
+m4_define([$0], [])[]
])
dnl Result stored in xc_lt_shlib_use_mimpure_text.
m4_define([_XC_CHECK_LT_SHLIB_USE_MIMPURE_TEXT],
-[dnl
+[
#
# Verify if libtool shared libraries should be linked using flag -mimpure-text
#
;;
esac
AC_MSG_RESULT([$xc_lt_shlib_use_mimpure_text])
-dnl
-m4_define([$0], [])[]dnl
+
+m4_define([$0], [])[]
])
dnl xc_lt_build_static_with_pic
m4_define([_XC_CHECK_LT_BUILD_WITH_PIC],
-[dnl
+[
#
# Find out whether libtool libraries would be built with PIC
#
AC_MSG_RESULT([$xc_lt_build_shared_with_pic])
AC_MSG_CHECKING([whether to build static libraries with PIC])
AC_MSG_RESULT([$xc_lt_build_static_with_pic])
-dnl
-m4_define([$0],[])dnl
+
+m4_define([$0],[])
])
dnl xc_lt_build_static_only
m4_define([_XC_CHECK_LT_BUILD_SINGLE_VERSION],
-[dnl
+[
#
# Verify if libtool shared libraries will be built while static not built
#
xc_lt_build_static_only='no'
fi
AC_MSG_RESULT([$xc_lt_build_static_only])
-dnl
-m4_define([$0],[])dnl
+
+m4_define([$0],[])
])
dnl for further info.
m4_define([_XC_LIBTOOL_POSTLUDE],
-[dnl
+[
_XC_CHECK_LT_BUILD_LIBRARIES
_XC_CHECK_LT_SHLIB_USE_VERSION_INFO
_XC_CHECK_LT_SHLIB_USE_NO_UNDEFINED
_XC_CHECK_LT_SHLIB_USE_MIMPURE_TEXT
_XC_CHECK_LT_BUILD_WITH_PIC
_XC_CHECK_LT_BUILD_SINGLE_VERSION
-dnl
-m4_define([$0],[])dnl
+
+m4_define([$0],[])
])
dnl xc_lt_build_static_only
AC_DEFUN([XC_LIBTOOL],
-[dnl
-AC_PREREQ([2.50])dnl
-dnl
-AC_BEFORE([$0],[LT_INIT])dnl
-AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])dnl
-dnl
-AC_REQUIRE([XC_CHECK_PATH_SEPARATOR])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-dnl
+[
+AC_PREREQ([2.50])
+
+AC_BEFORE([$0],[LT_INIT])
+AC_BEFORE([$0],[AC_PROG_LIBTOOL])
+AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])
+
+AC_REQUIRE([XC_CHECK_PATH_SEPARATOR])
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_CC])
+
_XC_LIBTOOL_PREAMBLE
_XC_LIBTOOL_BODY
_XC_LIBTOOL_POSTLUDE
-dnl
+
m4_ifdef([AC_LIBTOOL_WIN32_DLL],
- [m4_undefine([AC_LIBTOOL_WIN32_DLL])])dnl
+ [m4_undefine([AC_LIBTOOL_WIN32_DLL])])
m4_ifdef([AC_PROG_LIBTOOL],
- [m4_undefine([AC_PROG_LIBTOOL])])dnl
+ [m4_undefine([AC_PROG_LIBTOOL])])
m4_ifdef([LT_INIT],
- [m4_undefine([LT_INIT])])dnl
-dnl
-m4_define([$0],[])dnl
+ [m4_undefine([LT_INIT])])
+
+m4_define([$0],[])
])
#
#---------------------------------------------------------------------------
-# serial 1
+dnl serial 1
dnl _XC_CHECK_VAR_LIBS
dnl Intended to be used early in configure script.
AC_DEFUN([XC_CHECK_USER_FLAGS], [
- AC_PREREQ([2.50])dnl
- AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl
+ AC_PREREQ([2.50])
+ AC_BEFORE([$0],[XC_CHECK_PROG_CC])
dnl check order below matters
_XC_CHECK_VAR_LIBS
_XC_CHECK_VAR_LDFLAGS
dnl Intended to be used late in configure script.
AC_DEFUN([XC_CHECK_BUILD_FLAGS], [
- AC_PREREQ([2.50])dnl
+ AC_PREREQ([2.50])
dnl check order below matters
_XC_CHECK_VAR_LIBS
_XC_CHECK_VAR_LDFLAGS
dnl -------------------------------------------------
dnl Public macros.
-m4_define([XC_CONFIGURE_PREAMBLE_VER_MAJOR],[1])dnl
-m4_define([XC_CONFIGURE_PREAMBLE_VER_MINOR],[0])dnl
+m4_define([XC_CONFIGURE_PREAMBLE_VER_MAJOR],[1])
+m4_define([XC_CONFIGURE_PREAMBLE_VER_MINOR],[0])
dnl _XC_CFG_PRE_PREAMBLE
xc_configure_preamble_ver_major='XC_CONFIGURE_PREAMBLE_VER_MAJOR'
xc_configure_preamble_ver_minor='XC_CONFIGURE_PREAMBLE_VER_MINOR'
-#
-# Set IFS to space, tab and newline.
-#
+dnl
+dnl Set IFS to space, tab and newline.
+dnl
xc_space=' '
xc_tab=' '
'
IFS="$xc_space$xc_tab$xc_newline"
-#
-# Set internationalization behavior variables.
-#
+dnl
+dnl Set internationalization behavior variables.
+dnl
LANG='C'
LC_ALL='C'
export LC_ALL
export LANGUAGE
-#
-# Some useful variables.
-#
+dnl
+dnl Some useful variables.
+dnl
xc_msg_warn='configure: WARNING:'
xc_msg_abrt='Can not continue.'
dnl is available, otherwise aborts execution.
AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO],
-[dnl
-AC_REQUIRE([_XC_CFG_PRE_PREAMBLE])dnl
-#
-# Verify that 'echo' command is available, otherwise abort.
-#
+[
+AC_REQUIRE([_XC_CFG_PRE_PREAMBLE])
+dnl
+dnl Verify that 'echo' command is available, otherwise abort.
+dnl
xc_tst_str='unknown'
(`echo "$xc_tst_str" >/dev/null 2>&1`) && xc_tst_str='success'
:
;;
*)
- # Try built-in echo, and fail.
+ dnl Try built-in echo, and fail.
echo "$xc_msg_err 'echo' command not found. $xc_msg_abrt" >&2
exit 1
;;
dnl is available, otherwise aborts execution.
AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_CMD_TEST],
-[dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl
-#
-# Verify that 'test' command is available, otherwise abort.
-#
+[
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])
+dnl
+dnl Verify that 'test' command is available, otherwise abort.
+dnl
xc_tst_str='unknown'
(`test -n "$xc_tst_str" >/dev/null 2>&1`) && xc_tst_str='success'
dnl is set, otherwise aborts execution.
AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_VAR_PATH],
-[dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl
-#
-# Verify that 'PATH' variable is set, otherwise abort.
-#
+[
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_TEST])
+dnl
+dnl Verify that 'PATH' variable is set, otherwise abort.
+dnl
xc_tst_str='unknown'
(`test -n "$PATH" >/dev/null 2>&1`) && xc_tst_str='success'
dnl is available, otherwise aborts execution.
AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR],
-[dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
-#
-# Verify that 'expr' command is available, otherwise abort.
-#
+[
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])
+dnl
+dnl Verify that 'expr' command is available, otherwise abort.
+dnl
xc_tst_str='unknown'
xc_tst_str=`expr "$xc_tst_str" : '.*' 2>/dev/null`
dnl proper 'sed' this early, that should be done later.
AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_SED],
-[dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
-#
-# Verify that 'sed' utility is found within 'PATH', otherwise abort.
-#
+[
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])
+dnl
+dnl Verify that 'sed' utility is found within 'PATH', otherwise abort.
+dnl
xc_tst_str='unknown'
xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \
dnl proper 'grep' this early, that should be done later.
AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_GREP],
-[dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
-#
-# Verify that 'grep' utility is found within 'PATH', otherwise abort.
-#
+[
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])
+dnl
+dnl Verify that 'grep' utility is found within 'PATH', otherwise abort.
+dnl
xc_tst_str='unknown'
(`echo "$xc_tst_str" 2>/dev/null \
dnl is found within 'PATH', otherwise aborts execution.
AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_TR],
-[dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
-#
-# Verify that 'tr' utility is found within 'PATH', otherwise abort.
-#
+[
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])
+dnl
+dnl Verify that 'tr' utility is found within 'PATH', otherwise abort.
+dnl
xc_tst_str="${xc_tab}98s7u6c5c4e3s2s10"
xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \
dnl is found within 'PATH', otherwise aborts execution.
AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_WC],
-[dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl
-#
-# Verify that 'wc' utility is found within 'PATH', otherwise abort.
-#
+[
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_TR])
+dnl
+dnl Verify that 'wc' utility is found within 'PATH', otherwise abort.
+dnl
xc_tst_str='unknown unknown unknown unknown'
xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \
dnl is found within 'PATH', otherwise aborts execution.
AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_CAT],
-[dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl
-#
-# Verify that 'cat' utility is found within 'PATH', otherwise abort.
-#
+[
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_WC])
+dnl
+dnl Verify that 'cat' utility is found within 'PATH', otherwise abort.
+dnl
xc_tst_str='unknown'
xc_tst_str=`cat <<_EOT 2>/dev/null \
dnl overrides the auto-detected one.
AC_DEFUN([_XC_CFG_PRE_CHECK_PATH_SEPARATOR],
-[dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl
-#
-# Auto-detect and set 'PATH_SEPARATOR', unless it is already non-empty set.
-#
+[
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])
+dnl
+dnl Auto-detect and set 'PATH_SEPARATOR', unless it is already non-empty set.
+dnl
-# Directory count in 'PATH' when using a colon separator.
+dnl Directory count in 'PATH' when using a colon separator.
xc_tst_dirs_col='x'
xc_tst_prev_IFS=$IFS; IFS=':'
for xc_tst_dir in $PATH; do
IFS=$xc_tst_prev_IFS
xc_tst_dirs_col=`expr "$xc_tst_dirs_col" : '.*'`
-# Directory count in 'PATH' when using a semicolon separator.
+dnl Directory count in 'PATH' when using a semicolon separator.
xc_tst_dirs_sem='x'
xc_tst_prev_IFS=$IFS; IFS=';'
for xc_tst_dir in $PATH; do
xc_tst_dirs_sem=`expr "$xc_tst_dirs_sem" : '.*'`
if test "$xc_tst_dirs_sem" -eq "$xc_tst_dirs_col"; then
- # When both counting methods give the same result we do not want to
- # chose one over the other, and consider auto-detection not possible.
+ dnl When both counting methods give the same result we do not want to
+ dnl chose one over the other, and consider auto-detection not possible.
if test -z "$PATH_SEPARATOR"; then
- # User should provide the correct 'PATH_SEPARATOR' definition.
- # Until then, guess that it is colon!
+ dnl User should provide the correct 'PATH_SEPARATOR' definition.
+ dnl Until then, guess that it is colon!
echo "$xc_msg_warn path separator not determined, guessing colon" >&2
PATH_SEPARATOR=':'
fi
else
- # Separator with the greater directory count is the auto-detected one.
+ dnl Separator with the greater directory count is the auto-detected one.
if test "$xc_tst_dirs_sem" -gt "$xc_tst_dirs_col"; then
xc_tst_auto_separator=';'
else
xc_tst_auto_separator=':'
fi
if test -z "$PATH_SEPARATOR"; then
- # Use the auto-detected one when not already set.
+ dnl Use the auto-detected one when not already set.
PATH_SEPARATOR=$xc_tst_auto_separator
elif test "x$PATH_SEPARATOR" != "x$xc_tst_auto_separator"; then
echo "$xc_msg_warn 'PATH_SEPARATOR' does not match auto-detected one." >&2
fi
fi
xc_PATH_SEPARATOR=$PATH_SEPARATOR
-AC_SUBST([PATH_SEPARATOR])dnl
+AC_SUBST([PATH_SEPARATOR])
])
dnl Private macro.
AC_DEFUN([_XC_CFG_PRE_POSTLUDE],
-[dnl
-AC_REQUIRE([_XC_CFG_PRE_PREAMBLE])dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_SED])dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_GREP])dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_CAT])dnl
-AC_REQUIRE([_XC_CFG_PRE_CHECK_PATH_SEPARATOR])dnl
-dnl
+[
+AC_REQUIRE([_XC_CFG_PRE_PREAMBLE])
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_TEST])
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_SED])
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_GREP])
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_TR])
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_WC])
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_CAT])
+AC_REQUIRE([_XC_CFG_PRE_CHECK_PATH_SEPARATOR])
+
xc_configure_preamble_result='yes'
])
dnl PATH_SEPARATOR check.
AC_DEFUN([XC_CONFIGURE_PREAMBLE],
-[dnl
-AC_PREREQ([2.50])dnl
-dnl
-AC_BEFORE([$0],[_XC_CFG_PRE_PREAMBLE])dnl
-AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl
-AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl
-AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
-AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl
-AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_SED])dnl
-AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_GREP])dnl
-AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl
-AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl
-AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_CAT])dnl
-AC_BEFORE([$0],[_XC_CFG_PRE_CHECK_PATH_SEPARATOR])dnl
-AC_BEFORE([$0],[_XC_CFG_PRE_POSTLUDE])dnl
-dnl
-AC_BEFORE([$0],[AC_CHECK_TOOL])dnl
-AC_BEFORE([$0],[AC_CHECK_PROG])dnl
-AC_BEFORE([$0],[AC_CHECK_TOOLS])dnl
-AC_BEFORE([$0],[AC_CHECK_PROGS])dnl
-dnl
-AC_BEFORE([$0],[AC_PATH_TOOL])dnl
-AC_BEFORE([$0],[AC_PATH_PROG])dnl
-AC_BEFORE([$0],[AC_PATH_PROGS])dnl
-dnl
-AC_BEFORE([$0],[AC_PROG_SED])dnl
-AC_BEFORE([$0],[AC_PROG_GREP])dnl
-AC_BEFORE([$0],[AC_PROG_LN_S])dnl
-AC_BEFORE([$0],[AC_PROG_MKDIR_P])dnl
-AC_BEFORE([$0],[AC_PROG_INSTALL])dnl
-AC_BEFORE([$0],[AC_PROG_MAKE_SET])dnl
-AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl
-dnl
-AC_BEFORE([$0],[LT_INIT])dnl
-AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])dnl
-dnl
-AC_REQUIRE([_XC_CFG_PRE_PREAMBLE])dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_SED])dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_GREP])dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl
-AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_CAT])dnl
-AC_REQUIRE([_XC_CFG_PRE_CHECK_PATH_SEPARATOR])dnl
-AC_REQUIRE([_XC_CFG_PRE_POSTLUDE])dnl
-dnl
-m4_pattern_forbid([^_*XC])dnl
-m4_define([$0],[])dnl
+[
+AC_PREREQ([2.50])
+
+AC_BEFORE([$0],[_XC_CFG_PRE_PREAMBLE])
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_CMD_TEST])
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_VAR_PATH])
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_SED])
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_GREP])
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_TR])
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_WC])
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_CAT])
+AC_BEFORE([$0],[_XC_CFG_PRE_CHECK_PATH_SEPARATOR])
+AC_BEFORE([$0],[_XC_CFG_PRE_POSTLUDE])
+
+AC_BEFORE([$0],[AC_CHECK_TOOL])
+AC_BEFORE([$0],[AC_CHECK_PROG])
+AC_BEFORE([$0],[AC_CHECK_TOOLS])
+AC_BEFORE([$0],[AC_CHECK_PROGS])
+
+AC_BEFORE([$0],[AC_PATH_TOOL])
+AC_BEFORE([$0],[AC_PATH_PROG])
+AC_BEFORE([$0],[AC_PATH_PROGS])
+
+AC_BEFORE([$0],[AC_PROG_SED])
+AC_BEFORE([$0],[AC_PROG_GREP])
+AC_BEFORE([$0],[AC_PROG_LN_S])
+AC_BEFORE([$0],[AC_PROG_MKDIR_P])
+AC_BEFORE([$0],[AC_PROG_INSTALL])
+AC_BEFORE([$0],[AC_PROG_MAKE_SET])
+AC_BEFORE([$0],[AC_PROG_LIBTOOL])
+
+AC_BEFORE([$0],[LT_INIT])
+AC_BEFORE([$0],[AM_INIT_AUTOMAKE])
+AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])
+
+AC_REQUIRE([_XC_CFG_PRE_PREAMBLE])
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_TEST])
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_SED])
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_GREP])
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_TR])
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_WC])
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_CAT])
+AC_REQUIRE([_XC_CFG_PRE_CHECK_PATH_SEPARATOR])
+AC_REQUIRE([_XC_CFG_PRE_POSTLUDE])
+
+m4_pattern_forbid([^_*XC])
+m4_define([$0],[])
])
dnl
m4_ifdef([_AS_PATH_SEPARATOR_PREPARE],
-[dnl
-m4_undefine([_AS_PATH_SEPARATOR_PREPARE])dnl
+[
+m4_undefine([_AS_PATH_SEPARATOR_PREPARE])
m4_defun([_AS_PATH_SEPARATOR_PREPARE],
-[dnl
-AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl
-m4_define([$0],[])dnl
-])dnl
+[
+AC_REQUIRE([XC_CONFIGURE_PREAMBLE])
+m4_define([$0],[])
+])
])
dnl
dnl
m4_ifdef([_AC_INIT_PREPARE_FS_SEPARATORS],
-[dnl
-m4_undefine([_AC_INIT_PREPARE_FS_SEPARATORS])dnl
+[
+m4_undefine([_AC_INIT_PREPARE_FS_SEPARATORS])
m4_defun([_AC_INIT_PREPARE_FS_SEPARATORS],
-[dnl
-AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl
+[
+AC_REQUIRE([XC_CONFIGURE_PREAMBLE])
ac_path_separator=$PATH_SEPARATOR
-m4_define([$0],[])dnl
-])dnl
+m4_define([$0],[])
+])
])
dnl
dnl
m4_ifdef([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
-[dnl
-m4_undefine([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
+[
+m4_undefine([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])
m4_defun([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
-[dnl
-AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl
+[
+AC_REQUIRE([XC_CONFIGURE_PREAMBLE])
lt_cv_sys_path_separator=$PATH_SEPARATOR
-m4_define([$0],[])dnl
-])dnl
+m4_define([$0],[])
+])
])
dnl direct or indirect usage of this macro happens.
AC_DEFUN([XC_CHECK_PATH_SEPARATOR],
-[dnl
-AC_PREREQ([2.50])dnl
-dnl
-AC_BEFORE([$0],[AC_CHECK_TOOL])dnl
-AC_BEFORE([$0],[AC_CHECK_PROG])dnl
-AC_BEFORE([$0],[AC_CHECK_TOOLS])dnl
-AC_BEFORE([$0],[AC_CHECK_PROGS])dnl
-dnl
-AC_BEFORE([$0],[AC_PATH_TOOL])dnl
-AC_BEFORE([$0],[AC_PATH_PROG])dnl
-AC_BEFORE([$0],[AC_PATH_PROGS])dnl
-dnl
-AC_BEFORE([$0],[AC_PROG_SED])dnl
-AC_BEFORE([$0],[AC_PROG_GREP])dnl
-AC_BEFORE([$0],[AC_PROG_LN_S])dnl
-AC_BEFORE([$0],[AC_PROG_MKDIR_P])dnl
-AC_BEFORE([$0],[AC_PROG_INSTALL])dnl
-AC_BEFORE([$0],[AC_PROG_MAKE_SET])dnl
-AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl
-dnl
-AC_BEFORE([$0],[LT_INIT])dnl
-AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])dnl
+[
+AC_PREREQ([2.50])
+
+AC_BEFORE([$0],[AC_CHECK_TOOL])
+AC_BEFORE([$0],[AC_CHECK_PROG])
+AC_BEFORE([$0],[AC_CHECK_TOOLS])
+AC_BEFORE([$0],[AC_CHECK_PROGS])
+
+AC_BEFORE([$0],[AC_PATH_TOOL])
+AC_BEFORE([$0],[AC_PATH_PROG])
+AC_BEFORE([$0],[AC_PATH_PROGS])
+
+AC_BEFORE([$0],[AC_PROG_SED])
+AC_BEFORE([$0],[AC_PROG_GREP])
+AC_BEFORE([$0],[AC_PROG_LN_S])
+AC_BEFORE([$0],[AC_PROG_MKDIR_P])
+AC_BEFORE([$0],[AC_PROG_INSTALL])
+AC_BEFORE([$0],[AC_PROG_MAKE_SET])
+AC_BEFORE([$0],[AC_PROG_LIBTOOL])
+
+AC_BEFORE([$0],[LT_INIT])
+AC_BEFORE([$0],[AM_INIT_AUTOMAKE])
+AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])
+
+AC_REQUIRE([XC_CONFIGURE_PREAMBLE])
+
dnl
-AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl
+dnl Check that 'XC_CONFIGURE_PREAMBLE' has already run.
dnl
-#
-# Check that 'XC_CONFIGURE_PREAMBLE' has already run.
-#
if test -z "$xc_configure_preamble_result"; then
AC_MSG_ERROR([xc_configure_preamble_result not set (internal problem)])
fi
-#
-# Check that 'PATH_SEPARATOR' has already been set.
-#
+dnl
+dnl Check that 'PATH_SEPARATOR' has already been set.
+dnl
if test -z "$xc_PATH_SEPARATOR"; then
AC_MSG_ERROR([xc_PATH_SEPARATOR not set (internal problem)])
AC_MSG_RESULT([$xc_PATH_SEPARATOR])
AC_MSG_ERROR([path separator mismatch (internal or config.site problem)])
fi
-dnl
-m4_pattern_forbid([^_*XC])dnl
-m4_define([$0],[])dnl
+
+m4_pattern_forbid([^_*XC])
+m4_define([$0],[])
])
#
#---------------------------------------------------------------------------
-# serial 1
+dnl serial 1
dnl The funny name of this file is intentional in order to make it