1#!/bin/sh
2# Copyright (C) 1999, 2002, 2003, 2004, 2011 Free Software Foundation, Inc.
3#
4# This file is free software; as a special exception the author gives
5# unlimited permission to copy and/or distribute it, with or without
6# modifications, as long as this notice is preserved.
7#
8# This file is distributed in the hope that it will be useful, but
9# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
10# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11#
12# File: src/libgcrypt-config.  Generated from libgcrypt-config.in by configure.
13
14# General.
15prefix="/usr/local"
16exec_prefix="${prefix}"
17version="1.5.0"
18includedir="${prefix}/include"
19libdir="${exec_prefix}/lib"
20gpg_error_libs="-L/usr/local/lib -lgpg-error"
21gpg_error_cflags="-I/usr/local/include"
22
23# libgcrypt values.
24libs="-lgcrypt"
25cflags=""
26
27# API info
28api_version="1"
29
30# Configured for host
31my_host="mipsel-uclibc-linux-gnu"
32
33# Misc information.
34symmetric_ciphers="arcfour"
35asymmetric_ciphers="rsa"
36digests="md5 rmd160 sha1 sha256 sha512"
37
38# State variables.
39echo_libs=no
40echo_cflags=no
41echo_prefix=no
42echo_algorithms=no
43echo_exec_prefix=no
44echo_version=no
45echo_api_version=no
46echo_host=no
47
48# Prints usage information.
49usage()
50{
51    cat <<EOF
52Usage: $0 [OPTIONS]
53Options:
54	[--prefix]
55	[--exec-prefix]
56	[--version]
57        [--api-version]
58	[--libs]
59	[--cflags]
60	[--algorithms]
61        [--host]
62EOF
63    exit $1
64}
65
66if test $# -eq 0; then
67    # Nothing to do.
68    usage 1 1>&2
69fi
70
71while test $# -gt 0; do
72    case "$1" in
73	# Set up `optarg'.
74	--*=*)
75	    optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
76	    ;;
77	*)
78	    optarg=""
79	    ;;
80    esac
81
82    case $1 in
83	--thread=*)
84	    echo "$0: --thread option obsolete: use the thread callback interface" 1>&2
85	    exit 1
86	    ;;
87        --prefix=*)
88            # For compatibility reasons with old M4 macros, we ignore
89            # setting of prefix.
90            ;;
91	--prefix)
92	    echo_prefix=yes
93	    ;;
94        --exec-prefix=*)
95            ;;
96	--exec-prefix)
97	    echo_exec_prefix=yes
98	    ;;
99	--version)
100	    echo_version=yes
101	    ;;
102        --api-version)
103            echo_api_version=yes
104            ;;
105	--cflags)
106	    echo_cflags=yes
107	    ;;
108	--libs)
109	    echo_libs=yes
110	    ;;
111	--algorithms)
112	    echo_algorithms=yes
113	    ;;
114        --host)
115            echo_host=yes
116            ;;
117	*)
118	    usage 1 1>&2
119	    ;;
120    esac
121    shift
122done
123
124if test "$echo_prefix" = "yes"; then
125    echo "$prefix"
126fi
127
128if test "$echo_exec_prefix" = "yes"; then
129    echo "$exec_prefix"
130fi
131
132if test "$echo_cflags" = "yes"; then
133    includes=""
134    cflags_final="$cflags"
135
136    # Set up `includes'.
137    if test "x$includedir" != "x/usr/include" -a "x$includedir" != "x/include"; then
138	includes="-I$includedir"
139    fi
140    # Set up `cflags_final'.
141    cflags_final="$cflags_final $gpg_error_cflags"
142
143    tmp=""
144    for i in $includes $cflags_final; do
145       if echo "$tmp" | fgrep -v -- "$i" >/dev/null; then
146           tmp="$tmp $i"
147       fi
148    done
149    echo $tmp
150fi
151
152if test "$echo_libs" = "yes"; then
153    libdirs=""
154    libs_final="$libs"
155
156    # Set up `libdirs'.
157    if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/lib"; then
158	libdirs="-L$libdir"
159    fi
160
161    # Set up `libs_final'.
162    libs_final="$libs_final $gpg_error_libs"
163
164    tmp=""
165    for i in $libdirs $libs_final; do
166       if echo "$tmp" | fgrep -v -- "$i" >/dev/null; then
167           tmp="$tmp $i"
168       fi
169    done
170    echo $tmp
171fi
172
173if test "$echo_version" = "yes"; then
174    echo "$version"
175fi
176
177if test "$echo_api_version" = "yes"; then
178    echo "$api_version"
179fi
180
181if test "$echo_host" = "yes"; then
182    echo "$my_host"
183fi
184
185if test "$echo_algorithms" = "yes"; then
186    echo "Symmetric cipher algorithms: $symmetric_ciphers"
187    echo "Public-key cipher algorithms: $asymmetric_ciphers"
188    echo "Message digest algorithms: $digests"
189fi
190