build: Compatibility to pkg-config.
authorNIIBE Yutaka <gniibe@fsij.org>
Wed, 24 Oct 2018 06:13:40 +0000 (15:13 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Wed, 24 Oct 2018 06:13:40 +0000 (15:13 +0900)
* src/libgcrypt-config.in: Support --variable and --modversion.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
src/libgcrypt-config.in

index f7a13af..6b3b356 100644 (file)
@@ -96,7 +96,19 @@ while test $# -gt 0; do
        --exec-prefix)
            echo_exec_prefix=yes
            ;;
-       --version)
+        --variable=*)
+            case "${1#*=}" in
+                prefix) echo "$prefix" ;;
+                exec_prefix) echo "$exec_prefix" ;;
+                host) echo "$my_host" ;;
+                api_version) echo "$api_version" ;;
+               symmetric_ciphers) echo "$symmetric_ciphers" ;;
+               asymmetric_ciphers) echo "$asymmetric_ciphers" ;;
+               digests) echo "$digests" ;;
+            esac
+            exit 0
+            ;;
+       --modversion|--version)
            echo_version=yes
            ;;
         --api-version)