Blame src/libassuan-config.in

Packit 3c2767
#!/bin/sh
Packit 3c2767
#    Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
Packit 3c2767
#
Packit 3c2767
# This file is free software; as a special exception the author gives
Packit 3c2767
# unlimited permission to copy and/or distribute it, with or without
Packit 3c2767
# modifications, as long as this notice is preserved.
Packit 3c2767
#
Packit 3c2767
# This file is distributed in the hope that it will be useful, but
Packit 3c2767
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
Packit 3c2767
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Packit 3c2767
# SPDX-License-Identifier: FSFULLR
Packit 3c2767
Packit 3c2767
# Configure libgpg-error.
Packit 3c2767
gpg_error_cflags="@GPG_ERROR_CFLAGS@"
Packit 3c2767
gpg_error_libs="@GPG_ERROR_LIBS@"
Packit 3c2767
Packit 3c2767
PGM=libassuan-config
Packit 3c2767
lib="@LIBASSUAN_CONFIG_LIB@"
Packit 3c2767
extralibs="@LIBASSUAN_CONFIG_EXTRA_LIBS@ $gpg_error_libs"
Packit 3c2767
cflags="@LIBASSUAN_CONFIG_CFLAGS@ $gpg_error_cflags"
Packit 3c2767
api_version="@LIBASSUAN_CONFIG_API_VERSION@"
Packit Service 2ac659
my_host="none"
Packit 3c2767
prefix=@prefix@
Packit 3c2767
exec_prefix=@exec_prefix@
Packit 3c2767
includes=""
Packit 3c2767
libdirs=""
Packit 3c2767
exec_prefix_set=no
Packit 3c2767
echo_libs=no
Packit 3c2767
echo_cflags=no
Packit 3c2767
echo_prefix=no
Packit 3c2767
echo_exec_prefix=no
Packit 3c2767
echo_host=no
Packit 3c2767
Packit 3c2767
Packit 3c2767
usage()
Packit 3c2767
{
Packit 3c2767
	cat <
Packit 3c2767
Usage: $PGM [OPTIONS]
Packit 3c2767
Options:
Packit 3c2767
	[--prefix[=DIR]]
Packit 3c2767
	[--exec-prefix[=DIR]]
Packit 3c2767
	[--version]
Packit 3c2767
	[--libs]
Packit 3c2767
	[--cflags]
Packit 3c2767
        [--host]
Packit 3c2767
EOF
Packit 3c2767
	exit $1
Packit 3c2767
}
Packit 3c2767
Packit 3c2767
if test $# -eq 0; then
Packit 3c2767
  usage 1 1>&2
Packit 3c2767
fi
Packit 3c2767
Packit 3c2767
while test $# -gt 0; do
Packit 3c2767
  case "$1" in
Packit 3c2767
  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
Packit 3c2767
  *) optarg= ;;
Packit 3c2767
  esac
Packit 3c2767
Packit 3c2767
  case $1 in
Packit 3c2767
    --prefix=*)
Packit 3c2767
      # Dummy
Packit 3c2767
      ;;
Packit 3c2767
    --prefix)
Packit 3c2767
      echo_prefix=yes
Packit 3c2767
      ;;
Packit 3c2767
    --exec-prefix=*)
Packit 3c2767
      # Dummy
Packit 3c2767
      ;;
Packit 3c2767
    --exec-prefix)
Packit 3c2767
      echo_exec_prefix=yes
Packit 3c2767
      ;;
Packit 3c2767
    --version)
Packit 3c2767
      echo "@VERSION@"
Packit 3c2767
      exit 0
Packit 3c2767
      ;;
Packit 3c2767
    --api-version)
Packit 3c2767
      echo_api_version=yes
Packit 3c2767
      ;;
Packit 3c2767
    --cflags)
Packit 3c2767
      echo_cflags=yes
Packit 3c2767
      ;;
Packit 3c2767
    --libs)
Packit 3c2767
      echo_libs=yes
Packit 3c2767
      ;;
Packit 3c2767
    --host)
Packit 3c2767
      echo_host=yes
Packit 3c2767
      ;;
Packit 3c2767
    *)
Packit 3c2767
      usage 1 1>&2
Packit 3c2767
      ;;
Packit 3c2767
  esac
Packit 3c2767
  shift
Packit 3c2767
done
Packit 3c2767
Packit 3c2767
if test "$echo_prefix" = "yes"; then
Packit 3c2767
    echo $prefix
Packit 3c2767
fi
Packit 3c2767
Packit 3c2767
if test "$echo_exec_prefix" = "yes"; then
Packit 3c2767
    echo $exec_prefix
Packit 3c2767
fi
Packit 3c2767
Packit 3c2767
if test "$echo_api_version" = "yes"; then
Packit 3c2767
    echo $api_version
Packit 3c2767
fi
Packit 3c2767
Packit 3c2767
if test "$echo_host" = "yes"; then
Packit 3c2767
    echo "$my_host"
Packit 3c2767
fi
Packit 3c2767
Packit 3c2767
if test "$echo_cflags" = "yes"; then
Packit 3c2767
    if test "@includedir@" != "/usr/include" ; then
Packit 3c2767
      includes="-I@includedir@"
Packit 3c2767
      for i in $cflags ; do
Packit 3c2767
	if test "$i" = "-I@includedir@" ; then
Packit 3c2767
	  includes=""
Packit 3c2767
	fi
Packit 3c2767
      done
Packit 3c2767
    fi
Packit 3c2767
    echo $includes $cflags
Packit 3c2767
fi
Packit 3c2767
Packit 3c2767
if test "$echo_libs" = "yes"; then
Packit Service 2ac659
    # libdir is always standard and implicitly searched
Packit Service 2ac659
    libdirs=""
Packit 3c2767
    echo $libdirs $lib $extralibs
Packit 3c2767
fi