+dnl Optional functions.
+AC_CHECK_FUNCS([socket gethostbyname htons connect])
+
+dnl Default location for CA certificate bundle.
+AC_ARG_ENABLE([cainfo],
+ [AS_HELP_STRING([--enable-cainfo=PATH],
+ [Set the path to the CA certificate bundle.])],
+ [CAINFO=$enableval],
+ [CAINFO=$sysconfdir/pki/tls/certs/ca-bundle.crt])
+AC_SUBST([CAINFO])
+
+dnl If the C compiler is really GCC, enable warnings and
+dnl GCC-specific flags. Bug in glib GStaticMutex prevents
+dnl us from using strict aliasing safely.
+dnl NB: We have to do this after all the function tests
+dnl because '-Werror' tends to break them.
+if test "$GCC" = "yes"; then
+ CFLAGS="$CFLAGS -Wall -Werror -fno-strict-aliasing"
+fi
+
+dnl Output.