# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_check_openssl.html # =========================================================================== # # SYNOPSIS # # AX_CHECK_OPENSSL([action-if-found[, action-if-not-found]]) # # DESCRIPTION # # Look for OpenSSL in a number of default spots, or in a user-selected # spot (via --with-openssl). Sets # # OPENSSL_INCLUDES to the include directives required # OPENSSL_LIBS to the -l directives required # OPENSSL_LDFLAGS to the -L or -R flags required # # and calls ACTION-IF-FOUND or ACTION-IF-NOT-FOUND appropriately # # This macro sets OPENSSL_INCLUDES such that source files should use the # openssl/ directory in include directives: # # #include # # LICENSE # # Copyright (c) 2009, 2010 Zmanda Inc. # Copyright (c) 2009, 2010 Dustin J. Mitchell # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 6 AU_ALIAS([CHECK_SSL], [AX_CHECK_OPENSSL]) AC_DEFUN([AX_CHECK_OPENSSL], [ found=false AC_ARG_WITH(openssl, AS_HELP_STRING([--with-openssl=DIR], [root of the OpenSSL directory]), [ case "$withval" in "" | y | ye | yes | n | no) AC_MSG_ERROR([Invalid --with-openssl value]) ;; *) ssldirs="$withval" ;; esac ], [ # if pkg-config is installed and openssl has installed a .pc file, # then use that information and don't search ssldirs AC_PATH_PROG(PKG_CONFIG, pkg-config) if test x"$PKG_CONFIG" != x""; then OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null` if test $? = 0; then OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null` OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null` found=true fi fi # no such luck; use some default ssldirs if ! $found; then ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr" fi ] ) # note that we #include , so the OpenSSL headers have to be in # an 'openssl' subdirectory if ! $found; then OPENSSL_INCLUDES= for ssldir in $ssldirs; do AC_MSG_CHECKING([for openssl/ssl.h in $ssldir]) if test -f "$ssldir/include/openssl/ssl.h"; then OPENSSL_INCLUDES="-I$ssldir/include" OPENSSL_LDFLAGS="-L$ssldir/lib" OPENSSL_LIBS="-lssl -lcrypto" found=true AC_MSG_RESULT([yes]) break else AC_MSG_RESULT([no]) fi done # if the file wasn't found, well, go ahead and try the link anyway -- maybe # it will just work! fi # try the preprocessor and linker with our new flags, # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS AC_MSG_CHECKING([whether coHTTP/1.1 200 OK Access-Control-Expose-Headers: Content-Disposition Cache-Control: public, max-age=21600, no-transform Content-Type: text/plain; charset=utf-8 Set-Cookie: i_like_gitea=f6c188522db59b71; Path=/; HttpOnly; Secure; SameSite=Lax Set-Cookie: _csrf=Rx17D_I2KhjFXaHXAHVuuz5k4VU6MTc1MzI5ODIyNDIzNzM4NTU5MA; Path=/; Max-Age=86400; HttpOnly; Secure; SameSite=Lax X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN Content-Disposition: inline; filename="ax_check_openssl.m4"; filename*=UTF-8''ax_check_openssl.m4 Content-Length: 4178 Etag: "aecf20849b11286f648b35b8b1f049ac4e466fd8" Last-Modified: Sat, 05 Jun 2010 18:40:19 GMT Date: Wed, 23 Jul 2025 19:17:04 GMT Connection: close X-Cache-Status: HIT X-Cache-Age: 0 # ===========================================