#!/nix/store/l0wlqpbsvh1pgvhcdhw7qkka3d31si7k-bash-5.1-p8/bin/sh
#***************************************************************************
#                                  _   _ ____  _
#  Project                     ___| | | |  _ \| |
#                             / __| | | | |_) | |
#                            | (__| |_| |  _ <| |___
#                             \___|\___/|_| \_\_____|
#
# Copyright (C) 2001 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
###########################################################################

prefix=/nix/store/4kx13qnwgwyb1zq57x0gnvzvdaq91m5r-curl-7.79.1
exec_prefix=${prefix}
includedir=/nix/store/mfnfwmffw8vflgkp9i07c0cxrppw90gg-curl-7.79.1-dev/include
cppflag_curl_staticlib=

usage()
{
    cat <<EOF
Usage: curl-config [OPTION]

Available values for OPTION include:

  --built-shared says 'yes' if libcurl was built shared
  --ca        ca bundle install path
  --cc        compiler
  --cflags    pre-processor and compiler flags
  --checkfor [version] check for (lib)curl of the specified version
  --configure the arguments given to configure when building curl
  --features  newline separated list of enabled features
  --help      display this help and exit
  --libs      library linking information
  --prefix    curl install prefix
  --protocols newline separated list of enabled protocols
  --ssl-backends output the SSL backends libcurl was built to support
  --static-libs static libcurl library linking information
  --version   output version information
  --vernum    output the version information as a number (hexadecimal)
EOF

    exit $1
}

if test $# -eq 0; then
    usage 1
fi

while test $# -gt 0; do
    case "$1" in
    # this deals with options in the style
    # --option=value and extracts the value part
    # [not currently used]
    -*=*) value=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
    *) value= ;;
    esac

    case "$1" in
    --built-shared)
        echo yes
        ;;

    --ca)
        echo 
        ;;

    --cc)
        echo "gcc"
        ;;

    --prefix)
        echo "$prefix"
        ;;

    --feature|--features)
        for feature in AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile NTLM NTLM_WB SPNEGO SSL TLS-SRP UnixSockets alt-svc brotli libz ""; do
            test -n "$feature" && echo "$feature"
        done
        ;;

    --protocols)
        for protocol in DICT FILE FTP FTPS GOPHER GOPHERS HTTP HTTPS IMAP IMAPS MQTT POP3 POP3S RTSP SCP SFTP SMB SMBS SMTP SMTPS TELNET TFTP; do
            echo "$protocol"
        done
        ;;

    --version)
        echo libcurl 7.79.1
        exit 0
        ;;

    --checkfor)
        checkfor=$2
        cmajor=`echo $checkfor | cut -d. -f1`
        cminor=`echo $checkfor | cut -d. -f2`
        # when extracting the patch part we strip off everything after a
        # dash as that's used for things like version 1.2.3-CVS
        cpatch=`echo $checkfor | cut -d. -f3 | cut -d- -f1`

        vmajor=`echo 7.79.1 | cut -d. -f1`
        vminor=`echo 7.79.1 | cut -d. -f2`
        # when extracting the patch part we strip off everything after a
        # dash as that's used for things like version 1.2.3-CVS
        vpatch=`echo 7.79.1 | cut -d. -f3 | cut -d- -f1`

        if test "$vmajor" -gt "$cmajor"; then
            exit 0;
        fi
        if test "$vmajor" -eq "$cmajor"; then
            if test "$vminor" -gt "$cminor"; then
                exit 0
            fi
            if test "$vminor" -eq "$cminor"; then
                if test "$cpatch" -le "$vpatch"; then
                    exit 0
                fi
            fi
        fi

        echo "requested version $checkfor is newer than existing 7.79.1"
        exit 1
        ;;

    --vernum)
        echo 074f01
        exit 0
        ;;

    --help)
        usage 0
        ;;

    --cflags)
        if test "X$cppflag_curl_staticlib" = "X-DCURL_STATICLIB"; then
          CPPFLAG_CURL_STATICLIB="-DCURL_STATICLIB "
        else
          CPPFLAG_CURL_STATICLIB=""
        fi
        if test "X/nix/store/mfnfwmffw8vflgkp9i07c0cxrppw90gg-curl-7.79.1-dev/include" = "X/usr/include"; then
          echo "$CPPFLAG_CURL_STATICLIB"
        else
          echo "${CPPFLAG_CURL_STATICLIB}-I/nix/store/mfnfwmffw8vflgkp9i07c0cxrppw90gg-curl-7.79.1-dev/include"
        fi
        ;;

    --libs)
        if test "X/nix/store/4kx13qnwgwyb1zq57x0gnvzvdaq91m5r-curl-7.79.1/lib" != "X/usr/lib" -a "X/nix/store/4kx13qnwgwyb1zq57x0gnvzvdaq91m5r-curl-7.79.1/lib" != "X/usr/lib64"; then
           CURLLIBDIR="-L/nix/store/4kx13qnwgwyb1zq57x0gnvzvdaq91m5r-curl-7.79.1/lib "
        else
           CURLLIBDIR=""
        fi
        if test "Xyes" = "Xno"; then
          echo ${CURLLIBDIR}-lcurl -lnghttp2 -lssh2 -lssh2 -lssl -lcrypto -lssl -lcrypto -L/nix/store/84k3qb7hpv231p52zmrsxd4x186vc0zm-libkrb5-1.18/lib -Wl,--enable-new-dtags -Wl,-rpath -Wl,/nix/store/84k3qb7hpv231p52zmrsxd4x186vc0zm-libkrb5-1.18/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lbrotlidec -lbrotlidec -lz -pthread
        else
          echo ${CURLLIBDIR}-lcurl
        fi
        ;;
    --ssl-backends)
        echo "OpenSSL"
        ;;

    --static-libs)
        if test "Xno" != "Xno" ; then
          echo /nix/store/4kx13qnwgwyb1zq57x0gnvzvdaq91m5r-curl-7.79.1/lib/libcurl.a -L/nix/store/1l4r0r4ab3v3a3ppir4jwiah3icalk9d-zlib-1.2.11/lib -L/nix/store/ni7avvif6pafhqlknzy9yr1cnv9kn702-brotli-1.0.9-lib/lib -L/nix/store/hl09r5178s52savxh4pmkg86jjlakd4p-openssl-1.1.1l/lib -L/nix/store/2s6k3rvk7x936218b32n04kl385m1w8x-libssh2-1.10.0-dev/lib -L/nix/store/sn0h44frwy9rfmzf0f5xs26h9gj9qxc7-nghttp2-1.43.0-lib/lib -lnghttp2 -lssh2 -lssh2 -lssl -lcrypto -lssl -lcrypto -L/nix/store/84k3qb7hpv231p52zmrsxd4x186vc0zm-libkrb5-1.18/lib -Wl,--enable-new-dtags -Wl,-rpath -Wl,/nix/store/84k3qb7hpv231p52zmrsxd4x186vc0zm-libkrb5-1.18/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lbrotlidec -lbrotlidec -lz -pthread
        else
          echo "curl was built with static libraries disabled" >&2
          exit 1
        fi
        ;;

    --configure)
        echo " '--disable-static' '--disable-dependency-tracking' '--prefix=/nix/store/4kx13qnwgwyb1zq57x0gnvzvdaq91m5r-curl-7.79.1' '--bindir=/nix/store/kraak5cql3zjqsb3jjv8d7i0qq30ikzs-curl-7.79.1-bin/bin' '--sbindir=/nix/store/kraak5cql3zjqsb3jjv8d7i0qq30ikzs-curl-7.79.1-bin/sbin' '--includedir=/nix/store/mfnfwmffw8vflgkp9i07c0cxrppw90gg-curl-7.79.1-dev/include' '--oldincludedir=/nix/store/mfnfwmffw8vflgkp9i07c0cxrppw90gg-curl-7.79.1-dev/include' '--mandir=/nix/store/649xkl75pcg9iwcfrq7bcpm459s5d0nx-curl-7.79.1-man/share/man' '--infodir=/nix/store/kraak5cql3zjqsb3jjv8d7i0qq30ikzs-curl-7.79.1-bin/share/info' '--docdir=/nix/store/4kx13qnwgwyb1zq57x0gnvzvdaq91m5r-curl-7.79.1/share/doc/curl' '--libdir=/nix/store/4kx13qnwgwyb1zq57x0gnvzvdaq91m5r-curl-7.79.1/lib' '--libexecdir=/nix/store/4kx13qnwgwyb1zq57x0gnvzvdaq91m5r-curl-7.79.1/libexec' '--localedir=/nix/store/4kx13qnwgwyb1zq57x0gnvzvdaq91m5r-curl-7.79.1/share/locale' '--without-ca-bundle' '--without-ca-path' '--with-ca-fallback' '--disable-manual' '--with-openssl=/nix/store/syx9zczfg4p6x013lyg4j6nr1fqj4l9m-openssl-1.1.1l-dev' '--without-gnutls' '--with-libssh2=/nix/store/2s6k3rvk7x936218b32n04kl385m1w8x-libssh2-1.10.0-dev' '--disable-ldap' '--disable-ldaps' '--with-libidn=/nix/store/jp0a4523pcaksa4almi01371z9vw8i09-libidn-1.38-dev' '--with-brotli' '--with-gssapi=/nix/store/gcy03zd1c0xjzmzv30hxapf0nlbq5s1c-libkrb5-1.18-dev' 'CC=gcc'"
        ;;

    *)
        echo "unknown option: $1"
        usage 1
        ;;
    esac
    shift
done

exit 0
